Skip to content

Instantly share code, notes, and snippets.

@aninde
Created June 30, 2021 14:45
Show Gist options
  • Save aninde/ec2068f7affc5cfa598c6aad745ef152 to your computer and use it in GitHub Desktop.
Save aninde/ec2068f7affc5cfa598c6aad745ef152 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
/*!
* Copyright (c) HANDSONCODE sp. z o. o.
*
* HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o.,
* a Polish corporation, based in Gdynia, Poland, at 96/98 Aleja Zwycięstwa,
* registered with the National Court Register under number 538651,
* EU tax ID number: PL5862294002, share capital: PLN 62,800.00.
*
* This software is protected by applicable copyright laws, including
* international treaties, and dual-licensed – depending on whether
* your use is intended for or may result in commercial advantage
* or monetary compensation (commercial purposes), or not.
*
* If your use involves only such purposes as research, private study,
* evaluation and the like, you agree to be bound by the terms included
* in the "handsontable-non-commercial-license.pdf" file, available
* in the main directory of this software repository.
*
* By installing, copying, or otherwise using this software for
* commercial purposes, you agree to be bound by the terms included
* in the "handsontable-general-terms.pdf" file, available in the main
* directory of this software repository.
*
* HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND. IN NO EVENT
* AND UNDER NO LEGAL THEORY, SHALL HANDSONCODE BE LIABLE
* TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL,
* INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING
* FROM USE OR INABILITY TO USE THIS SOFTWARE.
*
* Version: 9.0.1
* Release date: 17/06/2021 (built at 30/06/2021 16:43:14)
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Handsontable",[],t):"object"==typeof exports?exports.Handsontable=t():e.Handsontable=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=604)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(222),o=n(100),i=n(607);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var r=n(223).charAt,o=n(117),i=n(224),a=o.set,s=o.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(92),o=n(161),i=n(160),a=n(117),s=n(224),u=a.set,l=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){var r=n(56),o=n(315),i=n(3),a=n(99),s=n(59),u=s("iterator"),l=s("toStringTag"),c=i.values;for(var f in o){var h=r[f],d=h&&h.prototype;if(d){if(d[u]!==c)try{a(d,u,c)}catch(e){d[u]=c}if(d[l]||a(d,l,f),o[f])for(var p in i)if(d[p]!==i[p])try{a(d,p,i[p])}catch(e){d[p]=i[p]}}}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(29),o=n(134),i=n(135),a=n(67),s=n(62),u=n(136),l=n(606),c=n(46),f=o("Reflect","construct"),h=c((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),d=!c((function(){f((function(){}))})),p=h||d;r({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(d&&!h)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(l.apply(e,r))}var o=n.prototype,c=u(s(o)?o:Object.prototype),p=Function.apply.call(e,c,t);return s(p)?p:c}})},function(e,t,n){"use strict";var r=n(29),o=n(56),i=n(134),a=n(133),s=n(77),u=n(220),l=n(304),c=n(46),f=n(78),h=n(156),d=n(62),p=n(67),m=n(86),v=n(92),g=n(150),y=n(148),E=n(136),T=n(155),C=n(152),w=n(303),R=n(216),b=n(109),O=n(82),S=n(181),N=n(99),A=n(100),M=n(183),k=n(182),_=n(151),I=n(184),x=n(59),P=n(313),L=n(314),D=n(187),F=n(117),U=n(124).forEach,j=k("hidden"),H=x("toPrimitive"),V=F.set,B=F.getterFor("Symbol"),W=Object.prototype,Y=o.Symbol,G=i("JSON","stringify"),z=b.f,K=O.f,X=w.f,q=S.f,Q=M("symbols"),$=M("op-symbols"),Z=M("string-to-symbol-registry"),J=M("symbol-to-string-registry"),ee=M("wks"),te=o.QObject,ne=!te||!te.prototype||!te.prototype.findChild,re=s&&c((function(){return 7!=E(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=z(W,t);r&&delete W[t],K(e,t,n),r&&e!==W&&K(W,t,r)}:K,oe=function(e,t){var n=Q[e]=E(Y.prototype);return V(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=l?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Y},ae=function(e,t,n){e===W&&ae($,t,n),p(e);var r=g(t,!0);return p(n),f(Q,r)?(n.enumerable?(f(e,j)&&e[j][r]&&(e[j][r]=!1),n=E(n,{enumerable:y(0,!1)})):(f(e,j)||K(e,j,y(1,{})),e[j][r]=!0),re(e,r,n)):K(e,r,n)},se=function(e,t){p(e);var n=v(t),r=T(n).concat(fe(n));return U(r,(function(t){s&&!ue.call(n,t)||ae(e,t,n[t])})),e},ue=function(e){var t=g(e,!0),n=q.call(this,t);return!(this===W&&f(Q,t)&&!f($,t))&&(!(n||!f(this,t)||!f(Q,t)||f(this,j)&&this[j][t])||n)},le=function(e,t){var n=v(e),r=g(t,!0);if(n!==W||!f(Q,r)||f($,r)){var o=z(n,r);return!o||!f(Q,r)||f(n,j)&&n[j][r]||(o.enumerable=!0),o}},ce=function(e){var t=X(v(e)),n=[];return U(t,(function(e){f(Q,e)||f(_,e)||n.push(e)})),n},fe=function(e){var t=e===W,n=X(t?$:v(e)),r=[];return U(n,(function(e){!f(Q,e)||t&&!f(W,e)||r.push(Q[e])})),r};(u||(A((Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=I(e),n=function(e){this===W&&n.call($,e),f(this,j)&&f(this[j],t)&&(this[j][t]=!1),re(this,t,y(1,e))};return s&&ne&&re(W,t,{configurable:!0,set:n}),oe(t,e)}).prototype,"toString",(function(){return B(this).tag})),A(Y,"withoutSetter",(function(e){return oe(I(e),e)})),S.f=ue,O.f=ae,b.f=le,C.f=w.f=ce,R.f=fe,P.f=function(e){return oe(x(e),e)},s&&(K(Y.prototype,"description",{configurable:!0,get:function(){return B(this).description}}),a||A(W,"propertyIsEnumerable",ue,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:Y}),U(T(ee),(function(e){L(e)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(f(Z,t))return Z[t];var n=Y(t);return Z[t]=n,J[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(f(J,e))return J[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?E(e):se(E(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ce,getOwnPropertySymbols:fe}),r({target:"Object",stat:!0,forced:c((function(){R.f(1)}))},{getOwnPropertySymbols:function(e){return R.f(m(e))}}),G)&&r({target:"JSON",stat:!0,forced:!u||c((function(){var e=Y();return"[null]"!=G([e])||"{}"!=G({a:e})||"{}"!=G(Object(e))}))},{stringify:function(e,t,n){for(var r,o=[e],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=t,(d(t)||void 0!==e)&&!ie(e))return h(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),o[1]=t,G.apply(null,o)}});Y.prototype[H]||N(Y.prototype,H,Y.prototype.valueOf),D(Y,"Symbol"),_[j]=!0},function(e,t,n){"use strict";var r,o=n(56),i=n(229),a=n(162),s=n(188),u=n(340),l=n(62),c=n(117).enforce,f=n(297),h=!o.ActiveXObject&&"ActiveXObject"in o,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=e.exports=s("WeakMap",p,u);if(f&&h){r=u.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var v=m.prototype,g=v.delete,y=v.has,E=v.get,T=v.set;i(v,{delete:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),y.call(this,e)?E.call(this,e):t.frozen.get(e)}return E.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var n=c(this);n.frozen||(n.frozen=new r),y.call(this,e)?T.call(this,e,t):n.frozen.set(e,t)}else T.call(this,e,t);return this}})}},function(e,t,n){"use strict";var r=n(29),o=n(77),i=n(56),a=n(78),s=n(62),u=n(82).f,l=n(298),c=i.Symbol;if(o&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var f={},h=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof h?new c(e):void 0===e?c():c(e);return""===e&&(f[t]=!0),t};l(h,c);var d=h.prototype=c.prototype;d.constructor=h;var p=d.toString,m="Symbol(test)"==String(c("test")),v=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=p.call(e);if(a(f,e))return"";var n=m?t.slice(7,-1):t.replace(v,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:h})}},function(e,t,n){n(314)("iterator")},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(533);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(18).default,o=n(44);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.duckSchema=function e(t){var n;Array.isArray(t)?n=[]:(n={},l(t,(function(t,r){"__children"!==r&&(t&&"object"===(0,i.default)(t)&&!Array.isArray(t)?n[r]=e(t):Array.isArray(t)?t.length&&"object"===(0,i.default)(t[0])&&!Array.isArray(t[0])?n[r]=[e(t[0])]:n[r]=[]:n[r]=null)})));return n},t.inherit=function(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e},t.extend=function(e,t,n){var r=Array.isArray(n);return l(t,(function(t,o){(!1===r||n.includes(o))&&(e[o]=t)})),e},t.deepExtend=function e(t,n){l(n,(function(r,o){n[o]&&"object"===(0,i.default)(n[o])?(t[o]||(Array.isArray(n[o])?t[o]=[]:"[object Date]"===Object.prototype.toString.call(n[o])?t[o]=n[o]:t[o]={}),e(t[o],n[o])):t[o]=n[o]}))},t.deepClone=s,t.clone=function(e){var t={};return l(e,(function(e,n){t[n]=e})),t},t.mixin=function(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(0,a.arrayEach)(n,(function(t){e.MIXINS.push(t.MIXIN_NAME),l(t,(function(t,n){if(void 0!==e.prototype[n])throw new Error("Mixin conflict. Property '".concat(n,"' already exist and cannot be overwritten."));if("function"==typeof t)e.prototype[n]=t;else{Object.defineProperty(e.prototype,n,{get:(r=n,o=t,i="_".concat(r),function(){var e;return void 0===this[i]&&(this[i]=(e=o,(Array.isArray(e)||u(e))&&(e=s(e)),e)),this[i]}),set:function(e){var t="_".concat(e);return function(e){this[t]=e}}(n),configurable:!0})}var r,o,i}))})),e},t.isObjectEqual=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.isObject=u,t.defineGetter=function(e,t,n,r){r.value=n,r.writable=!1!==r.writable,r.enumerable=!1!==r.enumerable,r.configurable=!1!==r.configurable,Object.defineProperty(e,t,r)},t.objectEach=l,t.getProperty=function(e,t){var n=t.split("."),r=e;return l(n,(function(e){if(void 0===(r=r[e]))return r=void 0,!1})),r},t.setProperty=function(e,t,n){var r=t.split("."),o=e;r.forEach((function(e,t){t!==r.length-1?(c(o,e)||(o[e]={}),o=o[e]):o[e]=n}))},t.deepObjectSize=function(e){if(!u(e))return 0;return function e(t){var n=0;return u(t)?l(t,(function(t,r){"__children"!==r&&(n+=e(t))})):n+=1,n}(e)},t.createObjectPropListener=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r="_".concat(n),i=(t={_touched:!1},(0,o.default)(t,r,e),(0,o.default)(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},t.hasOwnProperty=c,n(37),n(47),n(1),n(34),n(63),n(27);var o=r(n(52)),i=r(n(18)),a=n(16);function s(e){return"object"===(0,i.default)(e)?JSON.parse(JSON.stringify(e)):e}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(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 c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){"use strict";function r(e,t,n,r){var o=-1,i=e,a=n;Array.isArray(e)||(i=Array.from(e));var s=i.length;for(r&&s&&(a=i[o+=1]),o+=1;o<s;)a=t(a,i[o],o,i),o+=1;return a}function o(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));for(var o=r.length;n<o&&!1!==t(r[n],n,r);)n+=1;return e}function i(e){return r(e,(function(e,t){return e+t}),0)}t.__esModule=!0,t.to2dArray=function(e){var t=e.length,n=0;for(;n<t;)e[n]=[e[n]],n+=1},t.extendArray=function(e,t){var n=t.length,r=0;for(;r<n;)e.push(t[r]),r+=1},t.pivot=function(e){var t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;for(var n=e.length,r=e[0].length,o=0;o<n;o++)for(var i=0;i<r;i++)t[i]||(t[i]=[]),t[i][o]=e[o][i];return t},t.arrayReduce=r,t.arrayFilter=function(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));var o=r.length,i=[],a=-1;for(;n<o;){var s=r[n];t(s,n,r)&&(i[a+=1]=s),n+=1}return i},t.arrayMap=function(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));var o=r.length,i=[],a=-1;for(;n<o;){var s=r[n];i[a+=1]=t(s,n,r),n+=1}return i},t.arrayEach=o,t.arraySum=i,t.arrayMax=function(e){return r(e,(function(e,t){return e>t?e:t}),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return r(e,(function(e,t){return e<t?e:t}),Array.isArray(e)?e[0]:void 0)},t.arrayAvg=function(e){if(!e.length)return 0;return i(e)/e.length},t.arrayFlatten=function e(t){return r(t,(function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])},t.arrayUnique=function(e){var t=[];return o(e,(function(e){-1===t.indexOf(e)&&t.push(e)})),t},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=[].concat(t),i=r[0],a=r.slice(1),s=i;return o(a,(function(e){s=s.filter((function(t){return!e.includes(t)}))})),s},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=[].concat(t),i=r[0],a=r.slice(1),s=i;return o(a,(function(e){s=s.filter((function(t){return e.includes(t)}))})),s},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=[].concat(t),i=r[0],a=r.slice(1),s=new Set(i);return o(a,(function(e){o(e,(function(e){s.has(e)||s.add(e)}))})),Array.from(s)},t.stringToArray=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},n(23),n(2),n(20),n(30),n(19),n(38),n(37),n(47),n(3),n(1),n(57),n(4),n(34),n(63)},function(e,t,n){var r=n(29),o=n(46),i=n(92),a=n(109).f,s=n(77),u=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(29),o=n(62),i=n(156),a=n(153),s=n(71),u=n(92),l=n(157),c=n(59),f=n(158)("slice"),h=c("species"),d=[].slice,p=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,r,c,f=u(this),m=s(f.length),v=a(e,m),g=a(void 0===t?m:t,m);if(i(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[h])&&(n=void 0):n=void 0,n===Array||void 0===n))return d.call(f,v,g);for(r=new(void 0===n?Array:n)(p(g-v,0)),c=0;v<g;v++,c++)v in f&&l(r,c,f[v]);return r.length=c,r}})},function(e,t,n){"use strict";var r=n(29),o=n(46),i=n(156),a=n(62),s=n(86),u=n(71),l=n(157),c=n(225),f=n(158),h=n(59),d=n(154),p=h("isConcatSpreadable"),m=d>=51||!o((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),v=f("concat"),g=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!m||!v},{concat:function(e){var t,n,r,o,i,a=s(this),f=c(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(g(i=-1===t?a:arguments[t])){if(h+(o=u(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,h++)n in i&&l(f,h,i[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(f,h++,i)}return f.length=h,f}})},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getParent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,o=e;for(;null!==o;){if(n===t){r=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(n+=1,o=o.parentNode)}return r},t.getFrameElement=f,t.getParentWindow=function(e){return f(e)&&e.parent},t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.closest=h,t.closestDown=function(e,t,n){var r=[],o=e;for(;o&&(o=h(o,t,n))&&(!n||n.contains(o));)r.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;var i=r.length;return i?r[i-1]:null},t.isChildOf=function(e,t){var n=e.parentNode,r=[];"string"==typeof t?r=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);for(;null!==n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1},t.index=function(e){var t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t},t.overlayContainsElement=function(e,t,n){var r=n.parentElement.querySelector(".ht_clone_".concat(e));return r?r.contains(t):null},t.hasClass=function(e,t){return i(e,t)},t.addClass=function(e,t){a(e,t)},t.removeClass=function(e,t){s(e,t)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1)for(var n=t.childNodes,r=n.length-1;r>=0;r--)e(n[r],t)},t.empty=v,t.fastInnerHTML=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];y.test(t)?e.innerHTML=n?(0,c.sanitize)(t):t:E(e,t)},t.fastInnerText=E,t.isVisible=function e(t){var n=t.ownerDocument.documentElement,r=t;for(;r!==n;){if(null===r)return!1;if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r.host){if(r.host.impl)return e(r.host.impl);if(r.host)return e(r.host);throw new Error("Lost in Web Components world")}return!1}if(r.style&&"none"===r.style.display)return!1;r=r.parentNode}return!0},t.offset=function(e){var t,n,r,o,i=e.ownerDocument,a=i.defaultView,s=i.documentElement,l=e;if((0,u.hasCaptionProblem)()&&l.firstChild&&"CAPTION"===l.firstChild.nodeName)return{top:(o=l.getBoundingClientRect()).top+(a.pageYOffset||s.scrollTop)-(s.clientTop||0),left:o.left+(a.pageXOffset||s.scrollLeft)-(s.clientLeft||0)};t=l.offsetLeft,n=l.offsetTop,r=l;for(;(l=l.offsetParent)&&l!==i.body;)t+=l.offsetLeft,n+=l.offsetTop,r=l;r&&"fixed"===r.style.position&&(t+=a.pageXOffset||s.scrollLeft,n+=a.pageYOffset||s.scrollTop);return{left:t,top:n}},t.getWindowScrollTop=T,t.getWindowScrollLeft=C,t.getScrollTop=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return T(t);return e.scrollTop},t.getScrollLeft=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return C(t);return e.scrollLeft},t.getScrollableElement=function(e){var t=e.ownerDocument,n=t?t.defaultView:void 0;t||(t=e.document?e.document:e,n=t.defaultView);var r=["auto","scroll"],o=(0,u.isGetComputedStyleSupported)(),i=e.parentNode;for(;i&&i.style&&t.body!==i;){var a=i.style,s=a.overflow,l=a.overflowX,c=a.overflowY;if([s,l,c].includes("scroll"))return i;if(o){var f=n.getComputedStyle(i);if(s=f.overflow,l=f.overflowX,c=f.overflowY,r.includes(s)||r.includes(l)||r.includes(c))return i}if(i.clientHeight<=i.scrollHeight+1&&(r.includes(c)||r.includes(s)))return i;if(i.clientWidth<=i.scrollWidth+1&&(r.includes(l)||r.includes(s)))return i;i=i.parentNode}return n},t.getTrimmingContainer=function(e){var t=e.ownerDocument,n=t.defaultView,r=e.parentNode;for(;r&&r.style&&t.body!==r;){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;var o=w(r,n),i=["scroll","hidden","auto"],a=o.getPropertyValue("overflow"),s=o.getPropertyValue("overflow-y"),u=o.getPropertyValue("overflow-x");if(i.includes(a)||i.includes(s)||i.includes(u))return r;r=r.parentNode}return n},t.getStyle=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===n)return"width"===t?"".concat(n.innerWidth,"px"):"height"===t?"".concat(n.innerHeight,"px"):void 0;var r=e.style[t];if(""!==r&&void 0!==r)return r;var o=w(e,n);if(""!==o[t]&&void 0!==o[t])return o[t]},t.matchesCSSRules=function(e,t){var n=t.selectorText,r=!1;t.type===CSSRule.STYLE_RULE&&n&&(e.msMatchesSelector?r=e.msMatchesSelector(n):e.matches&&(r=e.matches(n)));return r},t.getComputedStyle=w,t.outerWidth=function(e){return Math.ceil(e.getBoundingClientRect().width)},t.outerHeight=function(e){if((0,u.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return e.offsetHeight+e.firstChild.offsetHeight;return e.offsetHeight},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.addEvent=function(e,t,n){e.addEventListener(t,n,!1)},t.removeEvent=function(e,t,n){e.removeEventListener(t,n,!1)},t.getCaretPosition=function(e){var t=e.ownerDocument;if(e.selectionStart)return e.selectionStart;if(t.selection){e.focus();var n=t.selection.createRange();if(null===n)return 0;var r=e.createTextRange(),o=r.duplicate();return r.moveToBookmark(n.getBookmark()),o.setEndPoint("EndToStart",r),o.text.length}return 0},t.getSelectionEndPosition=function(e){var t=e.ownerDocument;if(e.selectionEnd)return e.selectionEnd;if(t.selection){var n=t.selection.createRange();return null===n?0:e.createTextRange().text.indexOf(n.text)+n.text.length}return 0},t.getSelectionText=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document,n="";e.getSelection?n=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(n=t.selection.createRange().text);return n},t.clearTextSelection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document;e.getSelection?e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges():t.selection&&t.selection.empty()},t.setCaretPosition=function(e,t,n){void 0===n&&(n=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var r=e.parentNode,o=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=o}}},t.getScrollbarWidth=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===g&&(g=R(e));return g},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.setOverlayPosition=function(e,t,n){(0,l.isIE9)()?(e.style.top=n,e.style.left=t):(0,l.isSafari)()?(e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)"),e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)")):e.style.transform="translate3d(".concat(t,",").concat(n,",0)")},t.getCssTransform=function(e){var t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];if(e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"]))return["-webkit-transform",t];return-1},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")},t.isInput=b,t.isOutsideInput=O,t.selectElementIfAllowed=function(e){O(e.ownerDocument.activeElement)||e.select()},t.isDetached=function(e){return!e.parentNode},t.HTML_CHARACTERS=void 0;var o=r(n(40));n(24),n(37),n(47),n(19),n(30),n(38),n(34),n(63),n(93),n(60),n(74),n(111),n(61),n(1),n(20);var i,a,s,u=n(121),l=n(104),c=n(90);function f(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function h(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=Node,o=r.ELEMENT_NODE,i=r.DOCUMENT_FRAGMENT_NODE,a=e;null!=a&&a!==n;){var s=a,u=s.nodeType,l=s.nodeName;if(u===o&&(t.includes(l)||t.includes(a)))return a;var c=a,f=c.host;a=f&&u===i?f:a.parentNode}return null}function d(e){return e&&e.length?e.filter((function(e){return!!e})):[]}if((0,u.isClassListSupported)()){var p=function(e){var t=e.createElement("div");return t.classList.add("test","test2"),t.classList.contains("test2")};i=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},a=function(e,t){var n,r=e.ownerDocument,i=t;if("string"==typeof i&&(i=i.split(" ")),(i=d(i)).length>0)if(p(r))(n=e.classList).add.apply(n,(0,o.default)(i));else for(var a=0;i&&i[a];)e.classList.add(i[a]),a+=1},s=function(e,t){var n,r=e.ownerDocument,i=t;if("string"==typeof i&&(i=i.split(" ")),(i=d(i)).length>0)if(p(r))(n=e.classList).remove.apply(n,(0,o.default)(i));else for(var a=0;i&&i[a];)e.classList.remove(i[a]),a+=1}}else{var m=function(e){return new RegExp("(\\s|^)".concat(e,"(\\s|$)"))};i=function(e,t){return void 0!==e.className&&m(t).test(e.className)},a=function(e,t){var n=e.className,r=t;if("string"==typeof r&&(r=r.split(" ")),r=d(r),""===n)n=r.join(" ");else for(var o=0;o<r.length;o++)r[o]&&!m(r[o]).test(n)&&(n+=" ".concat(r[o]));e.className=n},s=function(e,t){var n=0,r=e.className,o=t;for("string"==typeof o&&(o=o.split(" ")),o=d(o);o&&o[n];)r=r.replace(m(o[n])," ").trim(),n+=1;e.className!==r&&(e.className=r)}}function v(e){for(var t;t=e.lastChild;)e.removeChild(t)}var g,y=/(<(.*)>|&(.*);)/;function E(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?u.isTextContentSupported?n.textContent=t:n.data=t:(v(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollY;return void 0===t&&(t=e.document.documentElement.scrollTop),t}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollX;return void 0===t&&(t=e.document.documentElement.scrollLeft),t}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function R(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=e.createElement("div");t.style.height="200px",t.style.width="100%";var n=e.createElement("div");n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(t),(e.body||e.documentElement).appendChild(n);var r=t.offsetWidth;n.style.overflow="scroll";var o=t.offsetWidth;return r===o&&(o=n.clientWidth),(e.body||e.documentElement).removeChild(n),r-o}function b(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function O(e){return b(e)&&!1===e.hasAttribute("data-hot-input")}t.HTML_CHARACTERS=y},function(e,t,n){"use strict";n.r(t),n.d(t,"ErrorType",(function(){return r})),n.d(t,"CellType",(function(){return o})),n.d(t,"getCellType",(function(){return h})),n.d(t,"CellValueNoNumber",(function(){return c})),n.d(t,"CellValueJustNumber",(function(){return f})),n.d(t,"CellValueType",(function(){return d})),n.d(t,"CellValueDetailedType",(function(){return p})),n.d(t,"CellValueTypeOrd",(function(){return m})),n.d(t,"getCellValueType",(function(){return v})),n.d(t,"getCellValueDetailedType",(function(){return g})),n.d(t,"getCellValueFormat",(function(){return y})),n.d(t,"CellError",(function(){return E})),n.d(t,"simpleRowAddress",(function(){return T})),n.d(t,"invalidSimpleRowAddress",(function(){return C})),n.d(t,"simpleColumnAddress",(function(){return w})),n.d(t,"invalidSimpleColumnAddress",(function(){return R})),n.d(t,"simpleCellAddress",(function(){return b})),n.d(t,"invalidSimpleCellAddress",(function(){return O})),n.d(t,"movedSimpleCellAddress",(function(){return S})),n.d(t,"absoluteSheetReference",(function(){return N}));n(83);var r,o,i=n(101),a=n(39),s=n(50),u=n(98);function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.DIV_BY_ZERO="DIV_BY_ZERO",e.NAME="NAME",e.VALUE="VALUE",e.NUM="NUM",e.NA="NA",e.CYCLE="CYCLE",e.REF="REF",e.LIC="LIC",e.ERROR="ERROR"}(r||(r={})),function(e){e.FORMULA="FORMULA",e.VALUE="VALUE",e.MATRIX="MATRIX",e.EMPTY="EMPTY"}(o||(o={}));var c,f,h=function(e){return e instanceof i.FormulaCellVertex||e instanceof i.ParsingErrorVertex?o.FORMULA:e instanceof i.ValueCellVertex||e instanceof i.MatrixVertex&&e.isNumeric()?o.VALUE:e instanceof i.MatrixVertex&&e.isFormula()?o.MATRIX:o.EMPTY};!function(e){e.EMPTY="EMPTY",e.NUMBER="NUMBER",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.ERROR="ERROR"}(c||(c={})),function(e){e.NUMBER="NUMBER"}(f||(f={}));var d=Object.assign(Object.assign({},c),f),p=Object.assign(Object.assign({},c),s.NumberType),m=function(e){switch(e){case d.EMPTY:return 0;case d.NUMBER:return 1;case d.STRING:return 2;case d.BOOLEAN:return 3;case d.ERROR:return 4}throw new Error("Cell value not computed")},v=function(e){if(e===s.EmptyValue)return d.EMPTY;if(e instanceof E||e instanceof u.SimpleRangeValue)return d.ERROR;if("string"==typeof e)return d.STRING;if(Object(s.isExtendedNumber)(e))return d.NUMBER;if("boolean"==typeof e)return d.BOOLEAN;throw new Error("Cell value not computed")},g=function(e){return Object(s.isExtendedNumber)(e)?Object(s.getTypeOfExtendedNumber)(e):v(e)},y=function(e){return Object(s.isExtendedNumber)(e)?Object(s.getFormatOfExtendedNumber)(e):void 0},E=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.message=n,this.address=r}var t,n,o;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,o=[{key:"parsingError",value:function(){return new e(r.ERROR,a.ErrorMessage.ParseError)}}],(n=[{key:"attachAddress",value:function(t){return void 0===this.address?new e(this.type,this.message,t):this}}])&&l(t.prototype,n),o&&l(t,o),e}(),T=function(e,t){return{sheet:e,row:t}},C=function(e){return e.row<0},w=function(e,t){return{sheet:e,col:t}},R=function(e){return e.col<0},b=function(e,t,n){return{sheet:e,col:t,row:n}},O=function(e){return e.col<0||e.row<0},S=function(e,t,n,r){return b(t,e.col+n,e.row+r)},N=function(e,t){return null===e.sheet?t.sheet:e.sheet}},function(e,t,n){var r=n(29),o=n(608);r({target:"Array",stat:!0,forced:!n(310)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){var r=n(29),o=n(46),i=n(86),a=n(186),s=n(302);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(77),o=n(82).f,i=Function.prototype,a=i.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){"use strict";t.__esModule=!0,t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=t.FILTERS_BUTTONS_CANCEL=t.FILTERS_BUTTONS_OK=t.FILTERS_BUTTONS_CLEAR=t.FILTERS_BUTTONS_SELECT_ALL=t.FILTERS_VALUES_BLANK_CELLS=t.FILTERS_LABELS_DISJUNCTION=t.FILTERS_LABELS_CONJUNCTION=t.FILTERS_DIVS_FILTER_BY_VALUE=t.FILTERS_DIVS_FILTER_BY_CONDITION=t.FILTERS_CONDITIONS_YESTERDAY=t.FILTERS_CONDITIONS_TOMORROW=t.FILTERS_CONDITIONS_TODAY=t.FILTERS_CONDITIONS_BEFORE=t.FILTERS_CONDITIONS_AFTER=t.FILTERS_CONDITIONS_NOT_BETWEEN=t.FILTERS_CONDITIONS_BETWEEN=t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=t.FILTERS_CONDITIONS_LESS_THAN=t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=t.FILTERS_CONDITIONS_GREATER_THAN=t.FILTERS_CONDITIONS_BY_VALUE=t.FILTERS_CONDITIONS_NOT_CONTAIN=t.FILTERS_CONDITIONS_CONTAINS=t.FILTERS_CONDITIONS_ENDS_WITH=t.FILTERS_CONDITIONS_BEGINS_WITH=t.FILTERS_CONDITIONS_NOT_EQUAL=t.FILTERS_CONDITIONS_EQUAL=t.FILTERS_CONDITIONS_NOT_EMPTY=t.FILTERS_CONDITIONS_EMPTY=t.FILTERS_CONDITIONS_NONE=t.FILTERS_CONDITIONS_NAMESPACE=t.FILTERS_NAMESPACE=t.CONTEXTMENU_ITEMS_SHOW_ROW=t.CONTEXTMENU_ITEMS_HIDE_ROW=t.CONTEXTMENU_ITEMS_SHOW_COLUMN=t.CONTEXTMENU_ITEMS_HIDE_COLUMN=t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=t.CONTEXTMENU_ITEMS_BORDERS_LEFT=t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=t.CONTEXTMENU_ITEMS_BORDERS_TOP=t.CONTEXTMENU_ITEMS_BORDERS=t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=t.CONTEXTMENU_ITEMS_ALIGNMENT=t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=t.CONTEXTMENU_ITEMS_EDIT_COMMENT=t.CONTEXTMENU_ITEMS_ADD_COMMENT=t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=t.CONTEXTMENU_ITEMS_MERGE_CELLS=t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=t.CONTEXTMENU_ITEMS_CUT=t.CONTEXTMENU_ITEMS_COPY=t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=t.CONTEXTMENU_ITEMS_READ_ONLY=t.CONTEXTMENU_ITEMS_REDO=t.CONTEXTMENU_ITEMS_UNDO=t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=t.CONTEXTMENU_ITEMS_REMOVE_ROW=t.CONTEXTMENU_ITEMS_INSERT_RIGHT=t.CONTEXTMENU_ITEMS_INSERT_LEFT=t.CONTEXTMENU_ITEMS_ROW_BELOW=t.CONTEXTMENU_ITEMS_ROW_ABOVE=t.CONTEXTMENU_ITEMS_NO_ITEMS=t.CONTEXT_MENU_ITEMS_NAMESPACE=void 0;t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items";var r="".concat("ContextMenu:items",".noItems");t.CONTEXTMENU_ITEMS_NO_ITEMS=r;var o="".concat("ContextMenu:items",".insertRowAbove");t.CONTEXTMENU_ITEMS_ROW_ABOVE=o;var i="".concat("ContextMenu:items",".insertRowBelow");t.CONTEXTMENU_ITEMS_ROW_BELOW=i;var a="".concat("ContextMenu:items",".insertColumnOnTheLeft");t.CONTEXTMENU_ITEMS_INSERT_LEFT=a;var s="".concat("ContextMenu:items",".insertColumnOnTheRight");t.CONTEXTMENU_ITEMS_INSERT_RIGHT=s;var u="".concat("ContextMenu:items",".removeRow");t.CONTEXTMENU_ITEMS_REMOVE_ROW=u;var l="".concat("ContextMenu:items",".removeColumn");t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=l;var c="".concat("ContextMenu:items",".undo");t.CONTEXTMENU_ITEMS_UNDO=c;var f="".concat("ContextMenu:items",".redo");t.CONTEXTMENU_ITEMS_REDO=f;var h="".concat("ContextMenu:items",".readOnly");t.CONTEXTMENU_ITEMS_READ_ONLY=h;var d="".concat("ContextMenu:items",".clearColumn");t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=d;var p="".concat("ContextMenu:items",".copy");t.CONTEXTMENU_ITEMS_COPY=p;var m="".concat("ContextMenu:items",".cut");t.CONTEXTMENU_ITEMS_CUT=m;var v="".concat("ContextMenu:items",".freezeColumn");t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=v;var g="".concat("ContextMenu:items",".unfreezeColumn");t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=g;var y="".concat("ContextMenu:items",".mergeCells");t.CONTEXTMENU_ITEMS_MERGE_CELLS=y;var E="".concat("ContextMenu:items",".unmergeCells");t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=E;var T="".concat("ContextMenu:items",".addComment");t.CONTEXTMENU_ITEMS_ADD_COMMENT=T;var C="".concat("ContextMenu:items",".editComment");t.CONTEXTMENU_ITEMS_EDIT_COMMENT=C;var w="".concat("ContextMenu:items",".removeComment");t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=w;var R="".concat("ContextMenu:items",".readOnlyComment");t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=R;var b="".concat("ContextMenu:items",".align");t.CONTEXTMENU_ITEMS_ALIGNMENT=b;var O="".concat("ContextMenu:items",".align.left");t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=O;var S="".concat("ContextMenu:items",".align.center");t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=S;var N="".concat("ContextMenu:items",".align.right");t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=N;var A="".concat("ContextMenu:items",".align.justify");t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=A;var M="".concat("ContextMenu:items",".align.top");t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=M;var k="".concat("ContextMenu:items",".align.middle");t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=k;var _="".concat("ContextMenu:items",".align.bottom");t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=_;var I="".concat("ContextMenu:items",".borders");t.CONTEXTMENU_ITEMS_BORDERS=I;var x="".concat("ContextMenu:items",".borders.top");t.CONTEXTMENU_ITEMS_BORDERS_TOP=x;var P="".concat("ContextMenu:items",".borders.right");t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=P;var L="".concat("ContextMenu:items",".borders.bottom");t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=L;var D="".concat("ContextMenu:items",".borders.left");t.CONTEXTMENU_ITEMS_BORDERS_LEFT=D;var F="".concat("ContextMenu:items",".borders.remove");t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=F;var U="".concat("ContextMenu:items",".nestedHeaders.insertChildRow");t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=U;var j="".concat("ContextMenu:items",".nestedHeaders.detachFromParent");t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=j;var H="".concat("ContextMenu:items",".hideColumn");t.CONTEXTMENU_ITEMS_HIDE_COLUMN=H;var V="".concat("ContextMenu:items",".showColumn");t.CONTEXTMENU_ITEMS_SHOW_COLUMN=V;var B="".concat("ContextMenu:items",".hideRow");t.CONTEXTMENU_ITEMS_HIDE_ROW=B;var W="".concat("ContextMenu:items",".showRow");t.CONTEXTMENU_ITEMS_SHOW_ROW=W;t.FILTERS_NAMESPACE="Filters:";var Y="".concat("Filters:","conditions");t.FILTERS_CONDITIONS_NAMESPACE=Y;var G="".concat(Y,".none");t.FILTERS_CONDITIONS_NONE=G;var z="".concat(Y,".isEmpty");t.FILTERS_CONDITIONS_EMPTY=z;var K="".concat(Y,".isNotEmpty");t.FILTERS_CONDITIONS_NOT_EMPTY=K;var X="".concat(Y,".isEqualTo");t.FILTERS_CONDITIONS_EQUAL=X;var q="".concat(Y,".isNotEqualTo");t.FILTERS_CONDITIONS_NOT_EQUAL=q;var Q="".concat(Y,".beginsWith");t.FILTERS_CONDITIONS_BEGINS_WITH=Q;var $="".concat(Y,".endsWith");t.FILTERS_CONDITIONS_ENDS_WITH=$;var Z="".concat(Y,".contains");t.FILTERS_CONDITIONS_CONTAINS=Z;var J="".concat(Y,".doesNotContain");t.FILTERS_CONDITIONS_NOT_CONTAIN=J;var ee="".concat(Y,".byValue");t.FILTERS_CONDITIONS_BY_VALUE=ee;var te="".concat(Y,".greaterThan");t.FILTERS_CONDITIONS_GREATER_THAN=te;var ne="".concat(Y,".greaterThanOrEqualTo");t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=ne;var re="".concat(Y,".lessThan");t.FILTERS_CONDITIONS_LESS_THAN=re;var oe="".concat(Y,".lessThanOrEqualTo");t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=oe;var ie="".concat(Y,".isBetween");t.FILTERS_CONDITIONS_BETWEEN=ie;var ae="".concat(Y,".isNotBetween");t.FILTERS_CONDITIONS_NOT_BETWEEN=ae;var se="".concat(Y,".after");t.FILTERS_CONDITIONS_AFTER=se;var ue="".concat(Y,".before");t.FILTERS_CONDITIONS_BEFORE=ue;var le="".concat(Y,".today");t.FILTERS_CONDITIONS_TODAY=le;var ce="".concat(Y,".tomorrow");t.FILTERS_CONDITIONS_TOMORROW=ce;var fe="".concat(Y,".yesterday");t.FILTERS_CONDITIONS_YESTERDAY=fe;var he="".concat("Filters:","labels.filterByCondition");t.FILTERS_DIVS_FILTER_BY_CONDITION=he;var de="".concat("Filters:","labels.filterByValue");t.FILTERS_DIVS_FILTER_BY_VALUE=de;var pe="".concat("Filters:","labels.conjunction");t.FILTERS_LABELS_CONJUNCTION=pe;var me="".concat("Filters:","labels.disjunction");t.FILTERS_LABELS_DISJUNCTION=me;var ve="".concat("Filters:","values.blankCells");t.FILTERS_VALUES_BLANK_CELLS=ve;var ge="".concat("Filters:","buttons.selectAll");t.FILTERS_BUTTONS_SELECT_ALL=ge;var ye="".concat("Filters:","buttons.clear");t.FILTERS_BUTTONS_CLEAR=ye;var Ee="".concat("Filters:","buttons.ok");t.FILTERS_BUTTONS_OK=Ee;var Te="".concat("Filters:","buttons.cancel");t.FILTERS_BUTTONS_CANCEL=Te;var Ce="".concat("Filters:","buttons.placeholder.search");t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=Ce;var we="".concat("Filters:","buttons.placeholder.value");t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=we;var Re="".concat("Filters:","buttons.placeholder.secondValue");t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=Re},function(e,t,n){var r=n(56),o=n(315),i=n(613),a=n(99);for(var s in o){var u=r[s],l=u&&u.prototype;if(l&&l.forEach!==i)try{a(l,"forEach",i)}catch(e){l.forEach=i}}},function(e,t,n){var r=n(737);function o(t,n,i){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=o=Reflect.get,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var o=r(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}},e.exports.default=e.exports,e.exports.__esModule=!0),o(t,n,i||t)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(56),o=n(109).f,i=n(99),a=n(100),s=n(212),u=n(298),l=n(185);e.exports=function(e,t){var n,c,f,h,d,p=e.target,m=e.global,v=e.stat;if(n=m?r:v?r[p]||s(p,{}):(r[p]||{}).prototype)for(c in t){if(h=t[c],f=e.noTargetGet?(d=o(n,c))&&d.value:n[c],!l(m?c:p+(v?".":"#")+c,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&i(h,"sham",!0),a(n,c,h,e)}}},function(e,t,n){"use strict";var r=n(29),o=n(214).indexOf,i=n(137),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,u=i("indexOf");r({target:"Array",proto:!0,forced:s||!u},{indexOf:function(e){return s?a.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(395),o=n(694),i=n(270),a=n(397);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.stringify=function(e){var t;switch((0,f.default)(e)){case"string":case"number":t="".concat(e);break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t},t.isDefined=function(e){return void 0!==e},t.isUndefined=p,t.isEmpty=m,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t._injectProductInfo=function(e,t){var n,r=!m(e),o="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="invalid",a="invalid",s=function(e){var t=[][v],n=t;if(e[v]!==T("Z"))return!1;for(var r="",o="B<H4P+".split(""),i=T(o.shift());i;i=T(o.shift()||"A"))--i<""[v]?n|=(y("".concat(y(g(r)+(g(E(e,Math.abs(i),2))+[]).padStart(2,"0"))))%97||2)>>1:r=E(e,i,i?1===o[v]?9:8:6);return n===t}(e=C(e||""));if(r||o||s)if(s){var u=(0,h.default)("17/06/2021","DD/MM/YYYY"),l=Math.floor(u.toDate().getTime()/864e5),c=g(E(C(d=e),g("12"),T("F")))/(g(E(C(d),T("B"),~~![][v]))||9);if(n=(0,h.default)(864e5*(c+1),"x").format("MMMM DD, YYYY"),l>c){var f=(0,h.default)().diff(u,"days");i=f<=1?"valid":"expired",a=f<=15?"valid":"expired"}else i="valid",a="valid"}else o?(i="non_commercial",a="valid"):(i="invalid",a="invalid");else i="missing",a="missing";var d;"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)&&(i="valid",a="valid");if(!w&&"valid"!==i){R[i]({keyValidityDate:n,hotVersion:"9.0.1"})&&console["non_commercial"===i?"info":"warn"](R[i]({keyValidityDate:n,hotVersion:"9.0.1"})),w=!0}if("valid"!==a&&t.parentNode){if(b[a]({keyValidityDate:n,hotVersion:"9.0.1"})){var p=document.createElement("div");p.id="hot-display-license-info",p.innerHTML=b[a]({keyValidityDate:n,hotVersion:"9.0.1"}),t.parentNode.insertBefore(p,t.nextSibling)}}};var o=r(n(80));n(1),n(60),n(265),n(34),n(61),n(63),n(266);var i,a,s,u,l,c,f=r(n(18)),h=r(n(96)),d=n(81);function p(e){return void 0===e}function m(e){return null===e||""===e||p(e)}var v="length",g=function(e){return parseInt(e,16)},y=function(e){return parseInt(e,10)},E=function(e,t,n){return e.substr(t,n)},T=function(e){return e.codePointAt(0)-65},C=function(e){return"".concat(e).replace(/\-/g,"")},w=!1,R={invalid:function(){return(0,d.toSingleLine)(i||(i=(0,o.default)(["\n The license key for Handsontable is invalid. \n If you need any help, contact us at [email protected]."],["\n The license key for Handsontable is invalid.\\x20\n If you need any help, contact us at [email protected]."])))},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return(0,d.toSingleLine)(a||(a=(0,o.default)(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",". Renew your license key at handsontable.com or downgrade to a version released prior \n to ",". If you need any help, contact us at [email protected]."],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",". Renew your license key at handsontable.com or downgrade to a version released prior\\x20\n to ",". If you need any help, contact us at [email protected]."])),t,n,t)},missing:function(){return(0,d.toSingleLine)(s||(s=(0,o.default)(["\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: 'non-commercial-and-evaluation'. If you need any help, contact \n us at [email protected]."],["\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\\x20\n us at [email protected]."])))},non_commercial:function(){return""}},b={invalid:function(){return(0,d.toSingleLine)(u||(u=(0,o.default)(['\n The license key for Handsontable is invalid. \n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to \n install it properly or contact us at <a href="mailto:[email protected]">[email protected]</a>.'],['\n The license key for Handsontable is invalid.\\x20\n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\\x20\n install it properly or contact us at <a href="mailto:[email protected]">[email protected]</a>.'])))},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return(0,d.toSingleLine)(l||(l=(0,o.default)(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",'. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your \n license key or downgrade to a version released prior to ','. If you need any \n help, contact us at <a href="mailto:[email protected]">[email protected]</a>.'],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",'. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\\x20\n license key or downgrade to a version released prior to ','. If you need any\\x20\n help, contact us at <a href="mailto:[email protected]">[email protected]</a>.'])),t,n,t)},missing:function(){return(0,d.toSingleLine)(c||(c=(0,o.default)(['\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: \'non-commercial-and-evaluation\'. \n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in \n the documentation or contact us at <a href="mailto:[email protected]">[email protected]</a>.'],['\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: \'non-commercial-and-evaluation\'.\\x20\n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\\x20\n the documentation or contact us at <a href="mailto:[email protected]">[email protected]</a>.'])))},non_commercial:function(){return""}}},function(e,t,n){"use strict";var r=n(188),o=n(318);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o)},function(e,t,n){"use strict";var r=n(29),o=n(189);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){"use strict";n.r(t),n.d(t,"ArgumentTypes",(function(){return r})),n.d(t,"FunctionPlugin",(function(){return v}));n(41),n(66),n(48),n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(19),n(25),n(23);var r,o=n(79),i=n(22),a=n(39),s=n(69),u=n(112),l=n(50),c=n(98);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=d(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.STRING="STRING",e.NUMBER="NUMBER",e.BOOLEAN="BOOLEAN",e.SCALAR="SCALAR",e.NOERROR="NOERROR",e.RANGE="RANGE",e.INTEGER="INTEGER",e.COMPLEX="COMPLEX",e.ANY="ANY"}(r||(r={}));var v=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.coerceScalarToNumberOrError=function(e){return n.interpreter.arithmeticHelper.coerceScalarToNumberOrError(e)},this.runFunction=function(e,t,r,o){return n.runFunctionTemplate(e,t,r,o)},this.runMatrixFunction=function(e,t,r,o){return n.runFunctionTemplate(e,t,r,o)},this.runFunctionTemplate=function(e,t,o,s){var u,l,c,f,d=o.parameters;f=o.expandRanges?n.listOfScalarValues(e,t):e.map((function(e){return[n.evaluateAst(e,t),!1]}));var p=[],m=void 0;if(void 0===o.repeatLastArgs&&d.length<f.length)return new i.CellError(i.ErrorType.NA,a.ErrorMessage.WrongArgNumber);if(void 0!==o.repeatLastArgs&&f.length>d.length&&(f.length-d.length)%o.repeatLastArgs!=0)return new i.CellError(i.ErrorType.NA,a.ErrorMessage.WrongArgNumber);for(var v=0,g=0;v<Math.max(f.length,d.length);v++,g++){g===d.length&&(g-=o.repeatLastArgs);var y=h(null!==(u=f[v])&&void 0!==u?u:[void 0,void 0],2),E=y[0],T=y[1],C=null!=E?E:null===(l=d[g])||void 0===l?void 0:l.defaultValue;if(void 0===C){if(!(null===(c=d[g])||void 0===c?void 0:c.optionalArg))return new i.CellError(i.ErrorType.NA,a.ErrorMessage.WrongArgNumber);p.push(void 0)}else{var w=void 0!==E?n.coerceToType(C,d[g]):C;void 0!==w?(w instanceof i.CellError&&d[g].argumentType!==r.SCALAR&&(m=null!=m?m:w),p.push(w)):T||(m=null!=m?m:new i.CellError(i.ErrorType.VALUE,a.ErrorMessage.WrongType))}}return null!=m?m:n.returnNumberWrapper(s.apply(void 0,p),o.returnNumberType)},this.runFunctionWithReferenceArgument=function(e,t,r,u,l){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return new i.CellError(i.ErrorType.NA,a.ErrorMessage.CellRefExpected)};if(0===e.length)return n.returnNumberWrapper(u(),r.returnNumberType);if(e.length>1)return new i.CellError(i.ErrorType.NA,a.ErrorMessage.WrongArgNumber);for(var f,h=e[0];h.type===s.AstNodeType.PARENTHESIS;)h=h.expression;if(h.type===s.AstNodeType.CELL_REFERENCE)f=h.reference.toSimpleCellAddress(t);else if(h.type===s.AstNodeType.CELL_RANGE||h.type===s.AstNodeType.COLUMN_RANGE||h.type===s.AstNodeType.ROW_RANGE)try{f=o.AbsoluteCellRange.fromAst(h,t).start}catch(e){return new i.CellError(i.ErrorType.REF,a.ErrorMessage.CellRefExpected)}return void 0!==f?n.returnNumberWrapper(l(f),r.returnNumberType):n.runFunction(e,t,r,c)},this.interpreter=t,this.dependencyGraph=t.dependencyGraph,this.columnSearch=t.columnSearch,this.config=t.config,this.serialization=t.serialization}var t,n,d;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,(n=[{key:"evaluateAst",value:function(e,t){return this.interpreter.evaluateAst(e,t)}},{key:"listOfScalarValues",value:function(e,t){var n,r=[],o=f(e);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=this.evaluateAst(i,t);if(a instanceof c.SimpleRangeValue){var s,u=f(a.valuesFromTopLeftCorner());try{for(u.s();!(s=u.n()).done;){var l=s.value;r.push([l,!0])}}catch(e){u.e(e)}finally{u.f()}}else r.push([a,!1])}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"coerceToType",value:function(e,t){var n;if(e instanceof c.SimpleRangeValue)switch(t.argumentType){case r.RANGE:case r.ANY:n=e;break;default:return}else switch(t.argumentType){case r.INTEGER:case r.NUMBER:var o=this.coerceScalarToNumberOrError(e);if(!Object(l.isExtendedNumber)(o)){n=o;break}var s=Object(l.getRawValue)(o);if(void 0!==t.maxValue&&s>t.maxValue)return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ValueLarge);if(void 0!==t.minValue&&s<t.minValue)return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ValueSmall);if(void 0!==t.lessThan&&s>=t.lessThan)return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ValueLarge);if(void 0!==t.greaterThan&&s<=t.greaterThan)return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ValueSmall);if(t.argumentType===r.INTEGER&&!Number.isInteger(s))return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.IntegerExpected);n=o;break;case r.STRING:n=Object(u.coerceScalarToString)(e);break;case r.BOOLEAN:n=Object(u.coerceScalarToBoolean)(e);break;case r.SCALAR:case r.NOERROR:case r.ANY:n=e;break;case r.RANGE:if(e instanceof i.CellError)return e;n=Object(u.coerceToRange)(Object(l.getRawValue)(e));break;case r.COMPLEX:return this.interpreter.arithmeticHelper.coerceScalarToComplex(Object(l.getRawValue)(e))}return t.passSubtype||void 0===n?n:Object(l.getRawValue)(n)}},{key:"metadata",value:function(e){var t=this.constructor.implementedFunctions[e];if(void 0!==t)return t;throw new Error("No metadata for function ".concat(e,"."))}},{key:"returnNumberWrapper",value:function(e,t,n){return void 0!==t&&Object(l.isExtendedNumber)(e)?this.interpreter.arithmeticHelper.ExtendedNumberFactory(Object(l.getRawValue)(e),{type:t,format:n}):e}}])&&m(t.prototype,n),d&&m(t,d),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"NoSheetWithIdError",(function(){return m})),n.d(t,"NoSheetWithNameError",(function(){return v})),n.d(t,"SheetNameAlreadyTakenError",(function(){return g})),n.d(t,"SheetSizeLimitExceededError",(function(){return y})),n.d(t,"NotAFormulaError",(function(){return E})),n.d(t,"InvalidAddressError",(function(){return T})),n.d(t,"InvalidArgumentsError",(function(){return C})),n.d(t,"NamedExpressionNameIsAlreadyTakenError",(function(){return w})),n.d(t,"NamedExpressionNameIsInvalidError",(function(){return R})),n.d(t,"NamedExpressionDoesNotExistError",(function(){return b})),n.d(t,"NoOperationToUndoError",(function(){return O})),n.d(t,"NoOperationToRedoError",(function(){return S})),n.d(t,"NothingToPasteError",(function(){return N})),n.d(t,"UnableToParseError",(function(){return M})),n.d(t,"ExpectedValueOfTypeError",(function(){return k})),n.d(t,"ConfigValueEmpty",(function(){return _})),n.d(t,"ConfigValueTooSmallError",(function(){return I})),n.d(t,"ConfigValueTooBigError",(function(){return x})),n.d(t,"ExpectedOneOfValuesError",(function(){return P})),n.d(t,"EvaluationSuspendedError",(function(){return L})),n.d(t,"MissingTranslationError",(function(){return D})),n.d(t,"ProtectedFunctionTranslationError",(function(){return F})),n.d(t,"LanguageNotRegisteredError",(function(){return U})),n.d(t,"LanguageAlreadyRegisteredError",(function(){return j})),n.d(t,"FunctionPluginValidationError",(function(){return H})),n.d(t,"ProtectedFunctionError",(function(){return V})),n.d(t,"SourceLocationHasMatrixError",(function(){return B})),n.d(t,"TargetLocationHasMatrixError",(function(){return W})),n.d(t,"MatrixFormulasNotSupportedError",(function(){return Y})),n.d(t,"NoRelativeAddressesAllowedError",(function(){return G})),n.d(t,"AliasAlreadyExisting",(function(){return z}));n(20),n(1),n(60),n(93),n(34),n(24),n(7),n(3),n(33),n(2),n(4),n(8),n(10),n(11);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function i(e){return(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})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function u(e){var t=h();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return f(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,e)})(e)}function f(e,t,n){return(f=h()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&d(o,n.prototype),o}).apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var m=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"There's no sheet with id = ".concat(e))}return n}(c(Error)),v=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"There's no sheet with name '".concat(e,"'"))}return n}(c(Error)),g=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Sheet with name ".concat(e," already exists"))}return n}(c(Error)),y=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Sheet size limit exceeded")}return n}(c(Error)),E=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"This is not a formula")}return n}(c(Error)),T=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Address (row = ".concat(e.row,", col = ").concat(e.col,") is invalid"))}return n}(c(Error)),C=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Invalid arguments, expected ".concat(e))}return n}(c(Error)),w=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Name of Named Expression '".concat(e,"' is already present"))}return n}(c(Error)),R=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Name of Named Expression '".concat(e,"' is invalid"))}return n}(c(Error)),b=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Named Expression '".concat(e,"' does not exist"))}return n}(c(Error)),O=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"There is no operation to undo")}return n}(c(Error)),S=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"There is no operation to redo")}return n}(c(Error)),N=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"There is nothing to paste")}return n}(c(Error));function A(e,t){switch(i(t)){case"function":case"symbol":return t.toString();case"bigint":return"BigInt("+t.toString()+")";default:return t instanceof RegExp?"RegExp("+t.toString()+")":t}}var M=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Unable to parse value: ".concat(JSON.stringify(e,A,4)))}return n}(c(Error)),k=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Expected value of type: ".concat(e," for config parameter: ").concat(r))}return n}(c(Error)),_=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Config parameter ".concat(e," cannot be empty."))}return n}(c(Error)),I=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Config parameter ".concat(e," should be at least ").concat(r))}return n}(c(Error)),x=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Config parameter ".concat(e," should be at most ").concat(r))}return n}(c(Error)),P=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Expected one of ".concat(e," for config parameter: ").concat(r))}return n}(c(Error)),L=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Computations are suspended")}return n}(c(Error)),D=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Translation for ".concat(e," is missing in the translation package you're using."))}return n}(c(Error)),F=function(e){s(n,e);var t=u(n);function n(e){return a(this,n),t.call(this,"Cannot register translation for function with id: ".concat(e))}return n}(c(Error)),U=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Language not registered.")}return n}(c(Error)),j=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Language already registered.")}return n}(c(Error)),H=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.apply(this,arguments)}return o(n,null,[{key:"functionNotDeclaredInPlugin",value:function(e,t){return new n("Function with id ".concat(e," not declared in plugin ").concat(t))}},{key:"functionMethodNotFound",value:function(e,t){return new n("Function method ".concat(e," not found in plugin ").concat(t))}}]),n}(c(Error)),V=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.apply(this,arguments)}return o(n,null,[{key:"cannotRegisterFunctionWithId",value:function(e){return new n("Cannot register function with id ".concat(e))}},{key:"cannotUnregisterFunctionWithId",value:function(e){return new n("Cannot unregister function with id ".concat(e))}},{key:"cannotUnregisterProtectedPlugin",value:function(){return new n("Cannot unregister protected plugin")}}]),n}(c(Error)),B=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Cannot perform this operation, source location has a matrix inside.")}return n}(c(Error)),W=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Cannot perform this operation, target location has a matrix inside.")}return n}(c(Error)),Y=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Matrix formulas are not supported in named expressions.")}return n}(c(Error)),G=function(e){s(n,e);var t=u(n);function n(){return a(this,n),t.call(this,"Relative addresses not allowed in named expressions.")}return n}(c(Error)),z=function(e){s(n,e);var t=u(n);function n(e,r){return a(this,n),t.call(this,"Alias id ".concat(e," in plugin ").concat(r," already defined as a function or alias."))}return n}(c(Error))},function(e,t,n){"use strict";var r=n(29),o=n(214).includes,i=n(161);r({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,n){"use strict";var r=n(29),o=n(124).filter;r({target:"Array",proto:!0,forced:!n(158)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"ErrorMessage",(function(){return r}));
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};r.DistinctSigns="Distinct signs.",r.WrongArgNumber="Wrong number of arguments.",r.EmptyArg="Empty function argument.",r.MatrixDimensions="Matrix dimensions are not compatible.",r.ValueSmall="Value too small.",r.ValueLarge="Value too large.",r.BadCriterion="Incorrect criterion.",r.RangeManySheets="Range spans more than one sheet.",r.CellRangeExpected="Cell range expected.",r.ScalarExpected="Cell range not allowed.",r.NumberCoercion="Value cannot be coerced to number.",r.NumberExpected="Number argument expected.",r.IntegerExpected="Value needs to be an integer.",r.BadMode="Mode not recognized.",r.DateBounds="Date outside of bounds.",r.OutOfSheet="Resulting reference is out of the sheet.",r.WrongType="Wrong type of argument.",r.NaN="NaN or infinite value encountered.",r.EqualLength="Ranges need to be of equal length.",r.Negative="Value cannot be negative.",r.NotBinary="String does not represent a binary number.",r.NotOctal="String does not represent an octal number.",r.NotHex="String does not represent a hexadecimal number.",r.EndStartPeriod="End period needs to be at least start period.",r.CellRefExpected="Cell reference expected.",r.BadRef="Address is not correct.",r.NumberRange="Number-only range expected.",r.ValueNotFound="Value not found.",r.ValueBaseLarge="Value in base too large.",r.ValueBaseSmall="Value in base too small.",r.ValueBaseLong="Value in base too long.",r.NegativeLength="Length cannot be negative.",r.PatternNotFound="Pattern not found.",r.MatrixParams="Matrix function parameters are not compatible.",r.OneValue="Needs at least one value.",r.TwoValues="Range needs to contain at least two elements.",r.ThreeValues="Range needs to contain at least three elements.",r.IndexBounds="Index out of bounds.",r.IndexLarge="Index too large.",r.Formula="Expected formula.",r.NegativeCount="Count cannot be negative.",r.ParseError="Parsing error.",r.SheetRef="Sheet does not exist.",r.MatrixFunction="Matrix function not recognized.",r.PeriodLong="Period number cannot exceed life length.",r.InvalidDate="Invalid date.",r.BitshiftLong="Result of bitshift is too long.",r.EmptyString="Empty-string argument not allowed.",r.LengthBounds="Length out of bounds.",r.NegativeTime="Time cannot be negative.",r.NoDefault="No default option.",r.Selector="Selector cannot exceed the number of arguments.",r.StartEndDate="Start date needs to be earlier than end date.",r.IncorrectDateTime="String does not represent correct DateTime.",r.CharacterCodeBounds="Character code out of bounds.",r.NonZero="Argument cannot be 0.",r.LessThanOne="Argument cannot be less than 1.",r.WeekendString="Incorrect weekend bitmask string.",r.InvalidRoman="Invalid roman numeral.",r.WrongOrder="Wrong order of values.",r.ComplexNumberExpected="Complex number expected.",r.ShouldBeIorJ="Should be 'i' or 'j'.",r.FunctionName=function(e){return"Function name ".concat(e," not recognized.")},r.NamedExpressionName=function(e){return"Named expression ".concat(e," not recognized.")},r.LicenseKey=function(e){return"License key is ".concat(e,".")}},function(e,t,n){var r=n(695),o=n(398),i=n(270),a=n(696);e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(29),o=n(124).map;r({target:"Array",proto:!0,forced:!n(158)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";function r(e){return e&&0===e.length}function o(e){return null==e?[]:Object.keys(e)}function i(e){for(var t=[],n=Object.keys(e),r=0;r<n.length;r++)t.push(e[n[r]]);return t}function a(e,t){for(var n=[],r=o(e),i=0;i<r.length;i++){var a=r[i];n.push(t.call(null,e[a],a))}return n}function s(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t.call(null,e[r],r));return n}function u(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Array.isArray(r)?t=t.concat(u(r)):t.push(r)}return t}function l(e){return r(e)?void 0:e[0]}function c(e){var t=e&&e.length;return t?e[t-1]:void 0}function f(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t.call(null,e[n],n);else{if(!I(e))throw Error("non exhaustive match");var r=o(e);for(n=0;n<r.length;n++){var i=r[n],a=e[i];t.call(null,a,i)}}}function h(e){return"string"==typeof e}function d(e){return void 0===e}function p(e){return e instanceof Function}function m(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function v(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function g(e,t){var n=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var o=e[r];t.call(null,o)&&n.push(o)}return n}function y(e,t){return g(e,(function(e){return!t(e)}))}function E(e,t){for(var n=Object.keys(e),r={},o=0;o<n.length;o++){var i=n[o],a=e[i];t(a)&&(r[i]=a)}return r}function T(e,t){return!!I(e)&&e.hasOwnProperty(t)}function C(e,t){return void 0!==b(e,(function(e){return e===t}))}function w(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function R(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function b(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t.call(null,r))return r}}function O(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];t.call(null,o)&&n.push(o)}return n}function S(e,t,n){for(var r=Array.isArray(e),a=r?e:i(e),s=r?[]:o(e),u=n,l=0;l<a.length;l++)u=t.call(null,u,a[l],r?l:s[l]);return u}function N(e){return y(e,(function(e){return null==e}))}function A(e,t){void 0===t&&(t=function(e){return e});var n=[];return S(e,(function(e,r){var o=t(r);return C(n,o)?e:(n.push(o),e.concat(r))}),[])}function M(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=[null],o=r.concat(t);return Function.bind.apply(e,o)}function k(e){return Array.isArray(e)}function _(e){return e instanceof RegExp}function I(e){return e instanceof Object}function x(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}function P(e,t){return y(e,(function(e){return C(t,e)}))}function L(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}function D(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function F(e,t){var n=w(e);return n.sort((function(e,n){return t(e)-t(n)})),n}function U(e,t){if(e.length!==t.length)throw Error("can't zipObject with different number of keys and values!");for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}function j(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)for(var i=t[r],a=o(i),s=0;s<a.length;s++){var u=a[s];e[u]=i[u]}return e}function H(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var i=t[r];if(!d(i))for(var a=o(i),s=0;s<a.length;s++){var u=a[s];T(e,u)||(e[u]=i[u])}}return e}function V(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return H.apply(null,[{}].concat(e))}function B(e,t){var n={};return f(e,(function(e){var r=t(e),o=n[r];o?o.push(e):n[r]=[e]})),n}function W(e,t){for(var n=R(e),r=o(t),i=0;i<r.length;i++){var a=r[i],s=t[a];n[a]=s}return n}function Y(){}function G(e){return e}function z(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(void 0!==r?r:void 0)}return t}function K(e){console&&console.error&&console.error("Error: "+e)}function X(e){console&&console.warn&&console.warn("Warning: "+e)}function q(){return"function"==typeof Map}function Q(e,t){t.forEach((function(t){var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(r){if("constructor"!==r){var o=Object.getOwnPropertyDescriptor(n,r);o&&(o.get||o.set)?Object.defineProperty(e.prototype,r,o):e.prototype[r]=t.prototype[r]}}))}))}function $(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.bar}return r(),r(),e}function Z(e){return e[e.length-1]}function J(e){var t=(new Date).getTime(),n=e();return{time:(new Date).getTime()-t,value:n}}n.r(t),n.d(t,"isEmpty",(function(){return r})),n.d(t,"keys",(function(){return o})),n.d(t,"values",(function(){return i})),n.d(t,"mapValues",(function(){return a})),n.d(t,"map",(function(){return s})),n.d(t,"flatten",(function(){return u})),n.d(t,"first",(function(){return l})),n.d(t,"last",(function(){return c})),n.d(t,"forEach",(function(){return f})),n.d(t,"isString",(function(){return h})),n.d(t,"isUndefined",(function(){return d})),n.d(t,"isFunction",(function(){return p})),n.d(t,"drop",(function(){return m})),n.d(t,"dropRight",(function(){return v})),n.d(t,"filter",(function(){return g})),n.d(t,"reject",(function(){return y})),n.d(t,"pick",(function(){return E})),n.d(t,"has",(function(){return T})),n.d(t,"contains",(function(){return C})),n.d(t,"cloneArr",(function(){return w})),n.d(t,"cloneObj",(function(){return R})),n.d(t,"find",(function(){return b})),n.d(t,"findAll",(function(){return O})),n.d(t,"reduce",(function(){return S})),n.d(t,"compact",(function(){return N})),n.d(t,"uniq",(function(){return A})),n.d(t,"partial",(function(){return M})),n.d(t,"isArray",(function(){return k})),n.d(t,"isRegExp",(function(){return _})),n.d(t,"isObject",(function(){return I})),n.d(t,"every",(function(){return x})),n.d(t,"difference",(function(){return P})),n.d(t,"some",(function(){return L})),n.d(t,"indexOf",(function(){return D})),n.d(t,"sortBy",(function(){return F})),n.d(t,"zipObject",(function(){return U})),n.d(t,"assign",(function(){return j})),n.d(t,"assignNoOverwrite",(function(){return H})),n.d(t,"defaults",(function(){return V})),n.d(t,"groupBy",(function(){return B})),n.d(t,"merge",(function(){return W})),n.d(t,"NOOP",(function(){return Y})),n.d(t,"IDENTITY",(function(){return G})),n.d(t,"packArray",(function(){return z})),n.d(t,"PRINT_ERROR",(function(){return K})),n.d(t,"PRINT_WARNING",(function(){return X})),n.d(t,"isES2015MapSupported",(function(){return q})),n.d(t,"applyMixins",(function(){return Q})),n.d(t,"toFastProperties",(function(){return $})),n.d(t,"peek",(function(){return Z})),n.d(t,"timer",(function(){return J}))},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.isNumeric=function(e){var t=(0,o.default)(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)},t.rangeEach=function(e,t,n){var r=-1;"function"==typeof t?(n=t,t=e):r=e-1;for(;++r<=t&&!1!==n(r););},t.rangeEachReverse=function(e,t,n){var r=e+1;"function"==typeof t&&(n=t,t=0);for(;--r>=t&&!1!==n(r););},t.valueAccordingPercent=function(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100,10)},n(34),n(61),n(1),n(60);var o=r(n(18))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0,t.BasePlugin=t.PLUGIN_KEY=void 0;var r=n(822);t.PLUGIN_KEY=r.PLUGIN_KEY,t.BasePlugin=r.BasePlugin},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=n(29),o=n(218),i=n(85);r({target:"String",proto:!0,forced:!n(221)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(o(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(77),o=n(56),i=n(185),a=n(100),s=n(78),u=n(116),l=n(228),c=n(150),f=n(46),h=n(136),d=n(152).f,p=n(109).f,m=n(82).f,v=n(320).trim,g=o.Number,y=g.prototype,E="Number"==u(h(y)),T=function(e){var t,n,r,o,i,a,s,u,l=c(e,!1);if("string"==typeof l&&l.length>2)if(43===(t=(l=v(l)).charCodeAt(0))||45===t){if(88===(n=l.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(l.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(a=(i=l.slice(2)).length,s=0;s<a;s++)if((u=i.charCodeAt(s))<48||u>o)return NaN;return parseInt(i,r)}return+l};if(i("Number",!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var C,w=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof w&&(E?f((function(){y.valueOf.call(n)})):"Number"!=u(n))?l(new g(T(t)),n,w):T(t)},R=r?d(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),b=0;R.length>b;b++)s(g,C=R[b])&&!s(w,C)&&m(w,C,p(g,C));w.prototype=y,y.constructor=w,a(o,"Number",w)}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getListenersCounter=function(){return u},t.default=void 0,n(55);var o=r(n(5)),i=r(n(6)),a=n(121),s=n(65),u=0;function l(e){var t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,s.stopImmediatePropagation)(this)},e}var c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,o.default)(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return(0,i.default)(e,[{key:"addEventListener",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){n.call(this,l(e))}return"boolean"==typeof o||(0,a.isPassiveEventSupported)()||(o=!1),this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:i,options:o,eventManager:this}),e.addEventListener(t,i,o),u+=1,function(){r.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var r,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;i;)if(i-=1,(r=this.context.eventListeners[i]).event===t&&r.element===e){if(n&&n!==r.callback)continue;if(o&&r.eventManager!==this)continue;this.context.eventListeners.splice(i,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),u-=1}}},{key:"clearEvents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.context)for(var t=this.context.eventListeners.length;t;){t-=1;var n=this.context.eventListeners[t];n&&this.removeEventListener(n.element,n.event,n.callback,e)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"destroyWithOwnEventsOnly",value:function(){this.clearEvents(!0),this.context=null}},{key:"fireEvent",value:function(e,t){var n=e.document,r=e;n||(r=(n=e.ownerDocument?e.ownerDocument:e).defaultView);var o,i={bubbles:!0,cancelable:"mousemove"!==t,view:r,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};n.createEvent?(o=n.createEvent("MouseEvents")).initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||n.body.parentNode):o=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on".concat(t),o)}}]),e}();t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"EmptyValue",(function(){return h})),n.d(t,"getRawValue",(function(){return d})),n.d(t,"RichNumber",(function(){return p})),n.d(t,"cloneNumber",(function(){return m})),n.d(t,"DateNumber",(function(){return g})),n.d(t,"CurrencyNumber",(function(){return y})),n.d(t,"TimeNumber",(function(){return E})),n.d(t,"DateTimeNumber",(function(){return T})),n.d(t,"PercentNumber",(function(){return C})),n.d(t,"isExtendedNumber",(function(){return w})),n.d(t,"NumberType",(function(){return v})),n.d(t,"getTypeOfExtendedNumber",(function(){return R})),n.d(t,"getFormatOfExtendedNumber",(function(){return b})),n.d(t,"getTypeFormatOfExtendedNumber",(function(){return O}));n(8),n(10),n(1),n(24),n(7),n(11),n(3),n(2),n(4);function r(e){return(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})(e)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=Symbol("Empty value");function d(e){return e instanceof p?e.val:e}var p=function(){function e(t,n){l(this,e),this.val=t,this.format=n}return f(e,[{key:"fromNumber",value:function(e){return new this.constructor(e)}}]),e}();function m(e,t){if("number"==typeof e)return t;var n=e.fromNumber(t);return n.format=e.format,n}var v,g=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return v.NUMBER_DATE}}]),n}(p),y=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return v.NUMBER_CURRENCY}}]),n}(p),E=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return v.NUMBER_TIME}}]),n}(p),T=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return v.NUMBER_DATETIME}}]),n}(p),C=function(e){o(n,e);var t=a(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"getDetailedType",value:function(){return v.NUMBER_PERCENT}}]),n}(p);function w(e){return"number"==typeof e||e instanceof p}function R(e){return e instanceof p?e.getDetailedType():v.NUMBER_RAW}function b(e){return e instanceof p?e.format:void 0}function O(e){return e instanceof p?{type:e.getDetailedType(),format:e.format}:{type:v.NUMBER_RAW}}!function(e){e.NUMBER_RAW="NUMBER_RAW",e.NUMBER_DATE="NUMBER_DATE",e.NUMBER_TIME="NUMBER_TIME",e.NUMBER_DATETIME="NUMBER_DATETIME",e.NUMBER_CURRENCY="NUMBER_CURRENCY",e.NUMBER_PERCENT="NUMBER_PERCENT"}(v||(v={}))},function(e,t,n){var r=n(29),o=n(86),i=n(155);r({target:"Object",stat:!0,forced:n(46)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n.d(t,"AbstractProduction",(function(){return s})),n.d(t,"NonTerminal",(function(){return u})),n.d(t,"Rule",(function(){return l})),n.d(t,"Flat",(function(){return c})),n.d(t,"Option",(function(){return f})),n.d(t,"RepetitionMandatory",(function(){return h})),n.d(t,"RepetitionMandatoryWithSeparator",(function(){return d})),n.d(t,"Repetition",(function(){return p})),n.d(t,"RepetitionWithSeparator",(function(){return m})),n.d(t,"Alternation",(function(){return v})),n.d(t,"Terminal",(function(){return g})),n.d(t,"serializeGrammar",(function(){return y})),n.d(t,"serializeProduction",(function(){return E}));var r,o=n(42),i=n(89),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),Object(o.forEach)(this.definition,(function(t){t.accept(e)}))},e}(),u=function(e){function t(t){var n=e.call(this,[])||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),Object.defineProperty(t.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.accept=function(e){e.visit(this)},t}(s),l=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.orgText="",Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),c=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.ignoreAmbiguities=!1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),f=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),h=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),d=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),p=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),m=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),v=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(o.assign)(n,Object(o.pick)(t,(function(e){return void 0!==e}))),n}return a(t,e),t}(s),g=function(){function e(e){this.idx=1,Object(o.assign)(this,Object(o.pick)(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function y(e){return Object(o.map)(e,E)}function E(e){function t(e){return Object(o.map)(e,E)}if(e instanceof u)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof c)return{type:"Flat",definition:t(e.definition)};if(e instanceof f)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof h)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof d)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:E(new g({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof m)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:E(new g({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof p)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof v)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof g){var n={type:"Terminal",name:e.terminalType.name,label:Object(i.tokenLabel)(e.terminalType),idx:e.idx},r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(n.pattern=Object(o.isRegExp)(r)?r.source:r),n}if(e instanceof l)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}},function(e,t,n){"use strict";t.__esModule=!0,t.getCondition=function(e,t){if(!r[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));var n=r[e],o=n.condition,i=n.descriptor,a=t;i.inputValuesDecorator&&(a=i.inputValuesDecorator(a));return function(e){return o.apply(e.meta.instance,[].concat([e],[a]))}},t.getConditionDescriptor=function(e){if(!r[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));return r[e].descriptor},t.registerCondition=function(e,t,n){n.key=e,r[e]={condition:t,descriptor:n}},t.conditions=void 0,n(20);var r={};t.conditions=r},function(e,t,n){"use strict";var r=n(29),o=n(153),i=n(118),a=n(71),s=n(86),u=n(225),l=n(157),c=n(158)("splice"),f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!c},{splice:function(e,t){var n,r,c,d,p,m,v=s(this),g=a(v.length),y=o(e,g),E=arguments.length;if(0===E?n=r=0:1===E?(n=0,r=g-y):(n=E-2,r=h(f(i(t),0),g-y)),g+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=u(v,r),d=0;d<r;d++)(p=y+d)in v&&l(c,d,v[p]);if(c.length=r,n<r){for(d=y;d<g-r;d++)m=d+n,(p=d+r)in v?v[m]=v[p]:delete v[m];for(d=g;d>g-r+n;d--)delete v[d-1]}else if(n>r)for(d=g-r;d>y;d--)m=d+n-1,(p=d+r-1)in v?v[m]=v[p]:delete v[m];for(d=0;d<n;d++)v[d+y]=arguments[d+2];return v.length=g-r+n,c}})},function(e,t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||function(){return this}()||Function("return this")()},function(e,t,n){"use strict";var r=n(188),o=n(318);e.exports=r("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o)},function(e,t,n){"use strict";n(3),n(1),n(2),n(9),n(4),n(17);var r=n(0),o=n(18);t.__esModule=!0,t.Renderer=void 0;var i=r(n(527));t.ViewportColumnsCalculator=i.default;var a=r(n(528));t.ViewportRowsCalculator=a.default;var s=r(n(171));t.CellCoords=s.default;var u=r(n(529));t.CellRange=u.default;var l=r(n(530));t.ColumnFilter=l.default;var c=r(n(531));t.RowFilter=c.default;var f=r(n(532));t.MasterTable=f.default;var h=n(539);t.LeftOverlay=h.LeftOverlay,t.TopOverlay=h.TopOverlay,t.TopLeftCornerOverlay=h.TopLeftCornerOverlay,t.BottomOverlay=h.BottomOverlay,t.BottomLeftCornerOverlay=h.BottomLeftCornerOverlay;var d=r(n(542));t.Border=d.default;var p=r(n(723));t.default=p.default,t.Core=p.default;var m=r(n(543));t.Event=m.default;var v=r(n(544));t.Overlays=v.default;var g=r(n(545));t.Scroll=g.default;var y=r(n(725));t.Selection=y.default;var E=r(n(546));t.Settings=E.default;var T=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(534));t.Renderer=T;var C=n(201);t.OrderView=C.OrderView,t.SharedOrderView=C.SharedOrderView;var w=r(n(547));t.Viewport=w.default;var R=n(49);function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}t.getListenersCounter=R.getListenersCounter},function(e,t,n){var r=n(56),o=n(183),i=n(78),a=n(184),s=n(220),u=n(304),l=o("wks"),c=r.Symbol,f=u?c:c&&c.withoutSetter||a;e.exports=function(e){return i(l,e)&&(s||"string"==typeof l[e])||(s&&i(c,e)?l[e]=c[e]:l[e]=f("Symbol."+e)),l[e]}},function(e,t,n){"use strict";var r=n(100),o=n(67),i=n(46),a=n(231),s=RegExp.prototype,u=s.toString,l=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),c="toString"!=u.name;(l||c)&&r(RegExp.prototype,"toString",(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var r=n(190),o=n(67),i=n(71),a=n(118),s=n(85),u=n(233),l=n(617),c=n(191),f=Math.max,h=Math.min;r("replace",2,(function(e,t,n,r){var d=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,p=r.REPLACE_KEEPS_$0,m=d?"$":"$0";return[function(n,r){var o=s(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!d&&p||"string"==typeof r&&-1===r.indexOf(m)){var s=n(t,e,this,r);if(s.done)return s.value}var v=o(e),g=String(this),y="function"==typeof r;y||(r=String(r));var E=v.global;if(E){var T=v.unicode;v.lastIndex=0}for(var C=[];;){var w=c(v,g);if(null===w)break;if(C.push(w),!E)break;""===String(w[0])&&(v.lastIndex=u(g,i(v.lastIndex),T))}for(var R,b="",O=0,S=0;S<C.length;S++){w=C[S];for(var N=String(w[0]),A=f(h(a(w.index),g.length),0),M=[],k=1;k<w.length;k++)M.push(void 0===(R=w[k])?R:String(R));var _=w.groups;if(y){var I=[N].concat(M,A,g);void 0!==_&&I.push(_);var x=String(r.apply(void 0,I))}else x=l(N,g,A,M,_,r);A>=O&&(b+=g.slice(O,A)+x,O=A+N.length)}return b+g.slice(O)}]}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(190),o=n(219),i=n(67),a=n(85),s=n(616),u=n(233),l=n(71),c=n(191),f=n(189),h=n(232).UNSUPPORTED_Y,d=[].push,p=Math.min;r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!o(e))return t.call(r,e,i);for(var s,u,l,c=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,m=new RegExp(e.source,h+"g");(s=f.call(m,r))&&!((u=m.lastIndex)>p&&(c.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&d.apply(c,s.slice(1)),l=s[0].length,p=u,c.length>=i));)m.lastIndex===s.index&&m.lastIndex++;return p===r.length?!l&&m.test("")||c.push(""):c.push(r.slice(p)),c.length>i?c.slice(0,i):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=a(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var a=n(r,e,this,o,r!==t);if(a.done)return a.value;var f=i(e),d=String(this),m=s(f,RegExp),v=f.unicode,g=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(h?"g":"y"),y=new m(h?"^(?:"+f.source+")":f,g),E=void 0===o?4294967295:o>>>0;if(0===E)return[];if(0===d.length)return null===c(y,d)?[d]:[];for(var T=0,C=0,w=[];C<d.length;){y.lastIndex=h?0:C;var R,b=c(y,h?d.slice(C):d);if(null===b||(R=p(l(y.lastIndex+(h?C:0)),d.length))===T)C=u(d,C,v);else{if(w.push(d.slice(T,C)),w.length===E)return w;for(var O=1;O<=b.length-1;O++)if(w.push(b[O]),w.length===E)return w;C=T=R}}return w.push(d.slice(T)),w}]}),h)},function(e,t,n){var r=n(29),o=n(56),i=n(123),a=[].slice,s=function(e){return function(t,n){var r=arguments.length>2,o=r?a.call(arguments,2):void 0;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,o)}:t,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:s(o.setTimeout),setInterval:s(o.setInterval)})},function(e,t,n){"use strict";t.__esModule=!0,t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0},t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isRightClick=function(e){return 2===e.button},t.isLeftClick=function(e){return 0===e.button}},function(e,t,n){n(29)({target:"Number",stat:!0},{isInteger:n(633)})},function(e,t,n){var r=n(62);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0,n(3),n(33),n(1),n(2),n(4),n(30),n(55);var o,i=r(n(5)),a=r(n(6)),s=r(n(80)),u=n(16),l=n(15),c=n(90),f=n(87),h=n(81),d=["afterCellMetaReset","afterChange","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","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","afterRender","beforeRenderer","afterRenderer","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeSetCellMeta","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyRowHeader","modifyRowHeight","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","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","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","beforeAutofillInsidePopulate","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],p=(0,h.toSingleLine)(o||(o=(0,s.default)(['The plugin hook "[hookName]" was removed in Handsontable [removedInVersion]. \n Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to \n learn about the migration path.'],['The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\\x20\n Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\\x20\n learn about the migration path.']))),m=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),v=new Map([["beforeAutofillInsidePopulate",'The plugin hook "beforeAutofillInsidePopulate" is deprecated and will be removed in the next major release.']]),g=function(){function e(){(0,i.default)(this,e),this.globalBucket=this.createEmptyBucket()}return(0,a.default)(e,[{key:"createEmptyBucket",value:function(){var e=Object.create(null);return(0,u.arrayEach)(d,(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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,u.arrayEach)(t,(function(t){return n.add(e,t,r)}));else{m.has(e)&&(0,f.warn)((0,c.substitute)(p,{hookName:e,removedInVersion:m.get(e)})),v.has(e)&&(0,f.warn)(v.get(e));var o=this.getBucket(r);if(void 0===o[e]&&(this.register(e),o[e]=[]),t.skip=!1,-1===o[e].indexOf(t)){var i=!1;t.initialHook&&(0,u.arrayEach)(o[e],(function(n,r){if(n.initialHook)return o[e][r]=t,i=!0,!1})),i||o[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,u.arrayEach)(t,(function(t){return n.once(e,t,r)})):(t.runOnce=!0,this.add(e,t,r))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(n);return void 0!==r[e]&&r[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,r,o,i,a,s){var u=this.globalBucket[t],l=u?u.length:0,c=0;if(l)for(;c<l;)if(u[c]&&!u[c].skip){var f=u[c].call(e,n,r,o,i,a,s);void 0!==f&&(n=f),u[c]&&u[c].runOnce&&this.remove(t,u[c]),c+=1}else c+=1;var h=this.getBucket(e)[t],d=h?h.length:0,p=0;if(d)for(;p<d;)if(h[p]&&!h[p].skip){var m=h[p].call(e,n,r,o,i,a,s);void 0!==m&&(n=m),h[p]&&h[p].runOnce&&this.remove(t,h[p],e),p+=1}else p+=1;return n}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,l.objectEach)(this.getBucket(e),(function(e,t,n){return n[t].length=0}))}},{key:"register",value:function(e){this.isRegistered(e)||d.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&d.splice(d.indexOf(e),1)}},{key:"isDeprecated",value:function(e){return v.has(e)||m.has(e)}},{key:"isRegistered",value:function(e){return d.indexOf(e)>=0}},{key:"getRegistered",value:function(){return d}}],[{key:"getSingleton",value:function(){return y}}]),e}(),y=new g;var E=g;t.default=E},function(e,t,n){"use strict";n.r(t);var r=n(102);n.d(t,"cellAddressFromString",(function(){return r.cellAddressFromString})),n.d(t,"simpleCellAddressFromString",(function(){return r.simpleCellAddressFromString})),n.d(t,"simpleCellAddressToString",(function(){return r.simpleCellAddressToString}));var o=n(192);n.d(t,"CellAddress",(function(){return o.CellAddress}));var i=n(331);n.d(t,"ParserWithCaching",(function(){return i.ParserWithCaching}));var a=n(334);n.d(t,"collectDependencies",(function(){return a.collectDependencies}));var s=n(163);n.d(t,"buildLexerConfig",(function(){return s.buildLexerConfig}));var u=n(241);n.d(t,"FormulaLexer",(function(){return u.FormulaLexer}));var l=n(95);n.d(t,"AstNodeType",(function(){return l.AstNodeType})),n.d(t,"ParsingErrorType",(function(){return l.ParsingErrorType})),n.d(t,"buildProcedureAst",(function(){return l.buildProcedureAst})),n.d(t,"buildCellRangeAst",(function(){return l.buildCellRangeAst})),n.d(t,"buildParsingErrorAst",(function(){return l.buildParsingErrorAst})),n.d(t,"buildCellErrorAst",(function(){return l.buildCellErrorAst}));var c=n(242);n.d(t,"Unparser",(function(){return c.Unparser}));var f=n(139);n.d(t,"AddressDependency",(function(){return f.AddressDependency})),n.d(t,"CellRangeDependency",(function(){return f.CellRangeDependency})),n.d(t,"ColumnRangeDependency",(function(){return f.ColumnRangeDependency})),n.d(t,"RowRangeDependency",(function(){return f.RowRangeDependency})),n.d(t,"NamedExpressionDependency",(function(){return f.NamedExpressionDependency}))},function(e,t,n){"use strict";var r=n(29),o=n(135),i=n(86),a=n(71),s=n(46),u=n(636),l=n(137),c=n(637),f=n(638),h=n(154),d=n(639),p=[],m=p.sort,v=s((function(){p.sort(void 0)})),g=s((function(){p.sort(null)})),y=l("sort"),E=!s((function(){if(h)return h<70;if(!(c&&c>3)){if(f)return!0;if(d)return d<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)p.push({k:t+r,v:n})}for(p.sort((function(e,t){return t.v-e.v})),r=0;r<p.length;r++)t=p[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}}));r({target:"Array",proto:!0,forced:v||!g||!y||!E},{sort:function(e){void 0!==e&&o(e);var t=i(this);if(E)return void 0===e?m.call(t):m.call(t,e);var n,r,s=[],l=a(t.length);for(r=0;r<l;r++)r in t&&s.push(t[r]);for(n=(s=u(s,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:String(t)>String(n)?1:-1}}(e))).length,r=0;r<n;)t[r]=s[r++];for(;r<l;)delete t[r++];return t}})},function(e,t,n){var r=n(118),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new R(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function h(){}function d(){}var p={};p[o]=function(){return this};var m=Object.getPrototypeOf,v=m&&m(m(b([])));v&&v!==t&&n.call(v,o)&&(p=v);var g=d.prototype=f.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function T(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function b(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=g.constructor=d,d.constructor=h,h.displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(E.prototype),E.prototype[i]=function(){return this},e.AsyncIterator=E,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new E(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(g),s(g,a,"Generator"),g[o]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=b,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:b(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";n.r(t),n.d(t,"END_OF_FILE",(function(){return C})),n.d(t,"DEFAULT_PARSER_CONFIG",(function(){return R})),n.d(t,"DEFAULT_RULE_CONFIG",(function(){return b})),n.d(t,"ParserDefinitionErrorType",(function(){return w})),n.d(t,"EMPTY_ALT",(function(){return O})),n.d(t,"Parser",(function(){return S})),n.d(t,"CstParser",(function(){return N})),n.d(t,"EmbeddedActionsParser",(function(){return A}));var r,o=n(42),i=n(618),a=n(89),s=n(239),u=n(126),l=n(167),c=n(327),f=n(621),h=n(622),d=n(624),p=n(625),m=n(626),v=n(627),g=n(628),y=n(629),E=n(630),T=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=Object(a.createTokenInstance)(a.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(C);var w,R=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:u.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),b=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function O(e){return void 0===e&&(e=void 0),function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",e[e.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=14]="TOO_MANY_ALTS"}(w||(w={}));var S=function(){function e(e,t){void 0===t&&(t=R),this.ignoredIssues=R.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),Object(o.has)(t,"ignoredIssues")&&t.ignoredIssues!==R.ignoredIssues&&Object(o.PRINT_WARNING)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=Object(o.has)(t,"ignoredIssues")?t.ignoredIssues:R.ignoredIssues,this.skipValidations=Object(o.has)(t,"skipValidations")?t.skipValidations:R.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;t.selfAnalysisDone=!0;var r=t.className;t.TRACE_INIT("toFastProps",(function(){Object(o.toFastProperties)(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),Object(o.forEach)(t.definedRulesNames,(function(e){var n=t[e].originalGrammarAction,r=void 0;t.TRACE_INIT(e+" Rule",(function(){r=t.topLevelRuleRecord(e,n)})),t.gastProductionsCache[e]=r}))}finally{t.disableRecording()}}));var a=[];if(t.TRACE_INIT("Grammar Resolving",(function(){a=Object(l.resolveGrammar)({rules:Object(o.values)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,a)})),t.TRACE_INIT("Grammar Validations",(function(){if(Object(o.isEmpty)(a)&&!1===t.skipValidations){var e=Object(l.validateGrammar)({rules:Object(o.values)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:Object(o.values)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:u.defaultGrammarValidatorErrorProvider,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}})),Object(o.isEmpty)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e=Object(i.computeAllProdsFollows)(Object(o.values)(t.gastProductionsCache));t.resyncFollows=e})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions(Object(o.values)(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e=Object(s.expandAllNestedRuleNames)(Object(o.values)(t.gastProductionsCache),t.fullRuleNameToShort);t.allRuleNames=e.allRuleNames})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(o.isEmpty)(t.definitionErrors))throw n=Object(o.map)(t.definitionErrors,(function(e){return e.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();Object(o.applyMixins)(S,[c.Recoverable,f.LooksAhead,h.TreeBuilder,d.LexerAdapter,m.RecognizerEngine,p.RecognizerApi,v.ErrorHandler,g.ContentAssist,y.GastRecorder,E.PerformanceTracer]);var N=function(e){function t(t,n){void 0===n&&(n=R);var r=Object(o.cloneObj)(n);return r.outputCst=!0,e.call(this,t,r)||this}return T(t,e),t}(S),A=function(e){function t(t,n){void 0===n&&(n=R);var r=Object(o.cloneObj)(n);return r.outputCst=!1,e.call(this,t,r)||this}return T(t,e),t}(S)},function(e,t,n){"use strict";var r=n(29),o=n(149),i=n(92),a=n(137),s=[].join,u=o!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:u||!l},{join:function(e){return s.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";t.__esModule=!0,t.isFunction=function(e){return"function"==typeof e},t.throttle=o,t.throttleAfterHits=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=o(e,t),i=n;function a(){i=n}function s(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return i?(i-=1,e.apply(this,n)):r.apply(this,n)}return s.clearHits=a,s},t.debounce=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=null;function o(){for(var o=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&clearTimeout(r),r=setTimeout((function(){t=e.apply(o,a)}),n),t}return o},t.pipe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],i=t.slice(1);return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.arrayReduce)(i,(function(e,t){return t(e)}),o.apply(this,t))}},t.partial=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return e.apply(this,n.concat(r))}},t.curry=function(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=r.concat(i);return s.length>=t?e.apply(this,s):n(s)}}([])},t.curryRight=function(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=r.concat(i.reverse());return s.length>=t?e.apply(this,s):n(s)}}([])},n(64),n(19),n(20),n(120);var r=n(16);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0,r={lastCallThrottled:!0},o=null;function i(){for(var i=this,a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var l=Date.now(),c=!1;r.lastCallThrottled=!0,n||(n=l,c=!0);var f=t-(l-n);return c?(r.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout((function(){r.lastCallThrottled=!1,e.apply(i,s),n=0,o=void 0}),f)),r}return i}},function(e,t,n){"use strict";n(27),n(51),t.__esModule=!0;var r={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0};t.alterUtilsFactory=t.getDecreasedIndexes=t.getIncreasedIndexes=t.getRegisteredMapsCounter=t.IndexMapper=void 0;var o=n(735);t.IndexMapper=o.IndexMapper;var i=n(279);t.getRegisteredMapsCounter=i.getRegisteredMapsCounter;var a=n(554);t.getIncreasedIndexes=a.getIncreasedIndexes,t.getDecreasedIndexes=a.getDecreasedIndexes,t.alterUtilsFactory=a.alterUtilsFactory;var s=n(552);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(r,e)||e in t&&t[e]===s[e]||(t[e]=s[e]))}))},function(e,t,n){var r=n(46);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(86),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(r(e),t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"DIFFERENT_SHEETS_ERROR",(function(){return m})),n.d(t,"WRONG_RANGE_SIZE",(function(){return v})),n.d(t,"AbsoluteCellRange",(function(){return g})),n.d(t,"AbsoluteColumnRange",(function(){return y})),n.d(t,"AbsoluteRowRange",(function(){return E}));n(72),n(230),n(48),n(20),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(69),i=n(168);function a(e){return(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})(e)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var m="AbsoluteCellRange: Start and end are in different sheets",v="AbsoluteCellRange: Wrong range size",g=function(){function e(t,n){if(h(this,e),t.sheet!==n.sheet)throw new Error(m);this.start=Object(r.simpleCellAddress)(t.sheet,t.col,t.row),this.end=Object(r.simpleCellAddress)(n.sheet,n.col,n.row)}return p(e,[{key:"sheet",get:function(){return this.start.sheet}},{key:"isFinite",value:function(){return Number.isFinite(this.size())}},{key:"doesOverlap",value:function(e){return this.start.sheet==e.start.sheet&&(!(this.end.row<e.start.row||this.start.row>e.end.row)&&!(this.end.col<e.start.col||this.start.col>e.end.col))}},{key:"addressInRange",value:function(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row&&this.start.col<=e.col&&this.end.col>=e.col)}},{key:"columnInRange",value:function(e){return this.sheet===e.sheet&&(this.start.col<=e.col&&this.end.col>=e.col)}},{key:"rowInRange",value:function(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row)}},{key:"containsRange",value:function(e){return this.addressInRange(e.start)&&this.addressInRange(e.end)}},{key:"intersectionWith",value:function(t){if(this.sheet!==t.start.sheet)return null;var n=Math.max(this.start.row,t.start.row),o=Math.min(this.end.row,t.end.row),i=Math.max(this.start.col,t.start.col),a=Math.min(this.end.col,t.end.col);return n>o||i>a?null:new e(Object(r.simpleCellAddress)(this.sheet,i,n),Object(r.simpleCellAddress)(this.sheet,a,o))}},{key:"includesRow",value:function(e){return this.start.row<e&&this.end.row>=e}},{key:"includesColumn",value:function(e){return this.start.col<e&&this.end.col>=e}},{key:"shiftByRows",value:function(e){this.start.row+=e,this.end.row+=e}},{key:"expandByRows",value:function(e){this.end.row+=e}},{key:"shiftByColumns",value:function(e){this.start.col+=e,this.end.col+=e}},{key:"shifted",value:function(t,n){return e.spanFrom(Object(r.simpleCellAddress)(this.sheet,this.start.col+t,this.start.row+n),this.width(),this.height())}},{key:"expandByColumns",value:function(e){this.end.col+=e}},{key:"moveToSheet",value:function(e){this.start.sheet=e,this.end.sheet=e}},{key:"removeSpan",value:function(e){e instanceof i.RowsSpan?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}},{key:"removeRows",value:function(e,t){if(!(e>this.end.row)){if(t<this.start.row){var n=t-e+1;return this.shiftByRows(-n)}e<=this.start.row&&(this.start.row=e),this.end.row-=Math.min(t,this.end.row)-e+1}}},{key:"removeColumns",value:function(e,t){if(!(e>this.end.col)){if(t<this.start.col){var n=t-e+1;return this.shiftByColumns(-n)}e<=this.start.col&&(this.start.col=e),this.end.col-=Math.min(t,this.end.col)-e+1}}},{key:"shouldBeRemoved",value:function(){return this.width()<=0||this.height()<=0}},{key:"rangeWithSameWidth",value:function(t,n){return e.spanFrom(Object(r.simpleCellAddress)(this.sheet,this.start.col,t),this.width(),n)}},{key:"rangeWithSameHeight",value:function(t,n){return e.spanFrom(Object(r.simpleCellAddress)(this.sheet,t,this.start.row),n,this.height())}},{key:"toString",value:function(){return"".concat(this.start.sheet,",").concat(this.start.col,",").concat(this.start.row,",").concat(this.end.col,",").concat(this.end.row)}},{key:"width",value:function(){return this.end.col-this.start.col+1}},{key:"height",value:function(){return this.end.row-this.start.row+1}},{key:"size",value:function(){return this.height()*this.width()}},{key:"arrayOfAddressesInRange",value:function(){for(var e=[],t=0;t<this.height();++t){e[t]=[];for(var n=0;n<this.width();++n){var o=Object(r.simpleCellAddress)(this.sheet,this.start.col+n,this.start.row+t);e[t].push(o)}}return e}},{key:"withStart",value:function(t){return new e(t,this.end)}},{key:"sameDimensionsAs",value:function(e){return this.width()===e.width()&&this.height()===e.height()}},{key:"addresses",value:regeneratorRuntime.mark((function e(t){var n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.start.row;case 1:if(!(n<=this.effectiveEndRow(t))){e.next=12;break}o=this.start.col;case 3:if(!(o<=this.effectiveEndColumn(t))){e.next=9;break}return e.next=6,Object(r.simpleCellAddress)(this.start.sheet,o,n);case 6:o++,e.next=3;break;case 9:n++,e.next=1;break;case 12:case"end":return e.stop()}}),e,this)}))},{key:"addressesWithDirection",value:regeneratorRuntime.mark((function e(t,n,o){var i,a,s,u,l,c,f,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>0)){e.next=30;break}if(!(n>0)){e.next=16;break}i=this.effectiveEndRow(o);case 3:if(!(i>=this.start.row)){e.next=14;break}a=this.effectiveEndColumn(o);case 5:if(!(a>=this.start.col)){e.next=11;break}return e.next=8,Object(r.simpleCellAddress)(this.start.sheet,a,i);case 8:a-=1,e.next=5;break;case 11:i-=1,e.next=3;break;case 14:e.next=28;break;case 16:s=this.start.row;case 17:if(!(s<=this.effectiveEndRow(o))){e.next=28;break}u=this.effectiveEndColumn(o);case 19:if(!(u>=this.start.col)){e.next=25;break}return e.next=22,Object(r.simpleCellAddress)(this.start.sheet,u,s);case 22:u-=1,e.next=19;break;case 25:s+=1,e.next=17;break;case 28:e.next=57;break;case 30:if(!(n>0)){e.next=45;break}l=this.effectiveEndRow(o);case 32:if(!(l>=this.start.row)){e.next=43;break}c=this.start.col;case 34:if(!(c<=this.effectiveEndColumn(o))){e.next=40;break}return e.next=37,Object(r.simpleCellAddress)(this.start.sheet,c,l);case 37:c+=1,e.next=34;break;case 40:l-=1,e.next=32;break;case 43:e.next=57;break;case 45:f=this.start.row;case 46:if(!(f<=this.effectiveEndRow(o))){e.next=57;break}h=this.start.col;case 48:if(!(h<=this.effectiveEndColumn(o))){e.next=54;break}return e.next=51,Object(r.simpleCellAddress)(this.start.sheet,h,f);case 51:h+=1,e.next=48;break;case 54:f+=1,e.next=46;break;case 57:case"end":return e.stop()}}),e,this)}))},{key:"getAddress",value:function(e,t){if(e<0||t<0||t>this.height()-1||e>this.width()-1)throw Error("Index out of bound");return Object(r.simpleCellAddress)(this.start.sheet,this.start.col+e,this.start.row+t)}},{key:"exceedsSheetSizeLimits",value:function(e,t){return this.end.col>=e||this.end.row>=t}},{key:"effectiveEndColumn",value:function(e){return this.end.col}},{key:"effectiveEndRow",value:function(e){return this.end.row}}],[{key:"fromAst",value:function(t,n){return t.type===o.AstNodeType.CELL_RANGE?e.fromCellRange(t,n):t.type===o.AstNodeType.COLUMN_RANGE?y.fromColumnRange(t,n):E.fromRowRange(t,n)}},{key:"fromCellRange",value:function(t,n){return new e(new o.CellAddress(t.start.sheet,t.start.col,t.start.row,t.start.type).toSimpleCellAddress(n),new o.CellAddress(t.end.sheet,t.end.col,t.end.row,t.end.type).toSimpleCellAddress(n))}},{key:"spanFrom",value:function(t,n,o){if(!Number.isFinite(n)&&Number.isFinite(o))return new E(t.sheet,t.row,t.row+o-1);if(!Number.isFinite(o)&&Number.isFinite(n))return new y(t.sheet,t.col,t.col+n-1);if(Number.isFinite(o)&&Number.isFinite(n))return new e(t,Object(r.simpleCellAddress)(t.sheet,t.col+n-1,t.row+o-1));throw new Error(v)}},{key:"fromCoordinates",value:function(t,n,o,i,a){return new e(Object(r.simpleCellAddress)(t,n,o),Object(r.simpleCellAddress)(t,i,a))}},{key:"singleRangeFromCellAddress",value:function(t,n){var r=t.toSimpleCellAddress(n);return new e(r,r)}}]),e}(),y=function(e){s(n,e);var t=l(n);function n(e,o,i){return h(this,n),t.call(this,Object(r.simpleCellAddress)(e,o,0),Object(r.simpleCellAddress)(e,i,Number.POSITIVE_INFINITY))}return p(n,[{key:"shouldBeRemoved",value:function(){return this.width()<=0}},{key:"shiftByRows",value:function(e){}},{key:"expandByRows",value:function(e){}},{key:"shifted",value:function(e,t){return new n(this.sheet,this.start.col+e,this.end.col+e)}},{key:"removeRows",value:function(e,t){}},{key:"rangeWithSameHeight",value:function(e,t){return new n(this.sheet,e,e+t-1)}},{key:"exceedsSheetSizeLimits",value:function(e,t){return this.end.col>=e}},{key:"effectiveEndRow",value:function(e){return e.getSheetHeight(this.sheet)-1}}],[{key:"fromColumnRange",value:function(e,t){var r=e.start.toSimpleColumnAddress(t),o=e.end.toSimpleColumnAddress(t);if(r.sheet!==o.sheet)throw new Error(m);return new n(r.sheet,r.col,o.col)}}]),n}(g),E=function(e){s(n,e);var t=l(n);function n(e,o,i){return h(this,n),t.call(this,Object(r.simpleCellAddress)(e,0,o),Object(r.simpleCellAddress)(e,Number.POSITIVE_INFINITY,i))}return p(n,[{key:"shouldBeRemoved",value:function(){return this.height()<=0}},{key:"shiftByColumns",value:function(e){}},{key:"expandByColumns",value:function(e){}},{key:"shifted",value:function(e,t){return new n(this.sheet,this.start.row+t,this.end.row+t)}},{key:"removeColumns",value:function(e,t){}},{key:"rangeWithSameWidth",value:function(e,t){return new n(this.sheet,e,e+t-1)}},{key:"exceedsSheetSizeLimits",value:function(e,t){return this.end.row>=t}},{key:"effectiveEndColumn",value:function(e){return e.getSheetWidth(this.sheet)-1}}],[{key:"fromRowRange",value:function(e,t){var r=e.start.toSimpleRowAddress(t),o=e.end.toSimpleRowAddress(t);if(r.sheet!==o.sheet)throw new Error(m);return new n(r.sheet,r.row,o.row)}}]),n}(g)},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0,t.toSingleLine=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=(0,r.arrayReduce)(e,(function(e,t,r){return e+t.replace(/\r?\n\s*/g,"")+(n[r]?n[r]:"")}),"");return i.trim()},n(34),n(61),n(111);var r=n(16)},function(e,t,n){var r=n(77),o=n(295),i=n(67),a=n(150),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)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){var r=n(29),o=n(612);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var r=n(29),o=n(77),i=n(299),a=n(92),s=n(109),u=n(157);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=s.f,l=i(r),c={},f=0;l.length>f;)void 0!==(n=o(r,t=l[f++]))&&u(c,t,n);return c}})},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(85);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";t.__esModule=!0,t.log=function(){var e;(0,r.isDefined)(console)&&(e=console).log.apply(e,arguments)},t.warn=function(){var e;(0,r.isDefined)(console)&&(e=console).warn.apply(e,arguments)},t.info=function(){var e;(0,r.isDefined)(console)&&(e=console).info.apply(e,arguments)},t.error=function(){var e;(0,r.isDefined)(console)&&(e=console).error.apply(e,arguments)};var r=n(32)},function(e,t,n){"use strict";t.__esModule=!0,t.isPrintableChar=function(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90},t.isMetaKey=function(e){return-1!==[o.ARROW_DOWN,o.ARROW_UP,o.ARROW_LEFT,o.ARROW_RIGHT,o.HOME,o.END,o.DELETE,o.BACKSPACE,o.F1,o.F2,o.F3,o.F4,o.F5,o.F6,o.F7,o.F8,o.F9,o.F10,o.F11,o.F12,o.TAB,o.PAGE_DOWN,o.PAGE_UP,o.ENTER,o.ESCAPE,o.SHIFT,o.CAPS_LOCK,o.ALT].indexOf(e)},t.isCtrlKey=function(e){var t=[];navigator.platform.includes("Mac")?t.push(o.COMMAND_LEFT,o.COMMAND_RIGHT,o.COMMAND_FIREFOX):t.push(o.CONTROL);return t.includes(e)},t.isCtrlMetaKey=function(e){return[o.CONTROL,o.COMMAND_LEFT,o.COMMAND_RIGHT,o.COMMAND_FIREFOX].includes(e)},t.isKey=function(e,t){var n=t.split("|"),i=!1;return(0,r.arrayEach)(n,(function(t){if(e===o[t])return i=!0,!1})),i},t.KEY_CODES=void 0,n(30),n(37),n(47),n(34),n(63);var r=n(16),o={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,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88};t.KEY_CODES=o},function(e,t,n){"use strict";n.r(t),n.d(t,"tokenLabel",(function(){return a})),n.d(t,"tokenName",(function(){return s})),n.d(t,"hasTokenLabel",(function(){return u})),n.d(t,"createToken",(function(){return l})),n.d(t,"EOF",(function(){return c})),n.d(t,"createTokenInstance",(function(){return f})),n.d(t,"tokenMatcher",(function(){return h}));var r=n(42),o=n(138),i=n(164);function a(e){return u(e)?e.LABEL:e.name}function s(e){return e.name}function u(e){return Object(r.isString)(e.LABEL)&&""!==e.LABEL}function l(e){return function(e){var t=e.pattern,n={};n.name=e.name,Object(r.isUndefined)(t)||(n.PATTERN=t);if(Object(r.has)(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";Object(r.has)(e,"categories")&&(n.CATEGORIES=e.categories);Object(i.augmentTokenTypes)([n]),Object(r.has)(e,"label")&&(n.LABEL=e.label);Object(r.has)(e,"group")&&(n.GROUP=e.group);Object(r.has)(e,"pop_mode")&&(n.POP_MODE=e.pop_mode);Object(r.has)(e,"push_mode")&&(n.PUSH_MODE=e.push_mode);Object(r.has)(e,"longer_alt")&&(n.LONGER_ALT=e.longer_alt);Object(r.has)(e,"line_breaks")&&(n.LINE_BREAKS=e.line_breaks);Object(r.has)(e,"start_chars_hint")&&(n.START_CHARS_HINT=e.start_chars_hint);return n}(e)}var c=l({name:"EOF",pattern:o.Lexer.NA});function f(e,t,n,r,o,i,a,s){return{image:t,startOffset:n,endOffset:r,startLine:o,endLine:i,startColumn:a,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function h(e,t){return Object(i.tokenStructuredMatcher)(e,t)}Object(i.augmentTokenTypes)([c])},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},t.equalsIgnoreCase=function(){for(var e=[],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length;for(;o;){o-=1;var a=(0,i.stringify)(n[o]).toLowerCase();-1===e.indexOf(a)&&e.push(a)}return 1===e.length},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.substitute=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,(function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]}))},t.stripTags=function(e){return a("".concat(e),{ALLOWED_TAGS:[]})},t.sanitize=a,n(30),n(1),n(60),n(34),n(61);var o=r(n(399)),i=n(32);function a(e,t){return o.default.sanitize(e,t)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(16),o=n(15),i={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e){for(var t=this,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this._localHooks[e]&&(0,r.arrayEach)(this._localHooks[e],(function(e){return e.apply(t,o)}))},clearLocalHooks:function(){return this._localHooks={},this}};(0,o.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});var a=i;t.default=a},function(e,t,n){var r=n(149),o=n(85);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(77),o=n(56),i=n(185),a=n(228),s=n(82).f,u=n(152).f,l=n(219),c=n(231),f=n(232),h=n(100),d=n(46),p=n(117).enforce,m=n(319),v=n(59)("match"),g=o.RegExp,y=g.prototype,E=/a/g,T=/a/g,C=new g(E)!==E,w=f.UNSUPPORTED_Y;if(r&&i("RegExp",!C||w||d((function(){return T[v]=!1,g(E)!=E||g(T)==T||"/a/i"!=g(E,"i")})))){for(var R=function(e,t){var n,r=this instanceof R,o=l(e),i=void 0===t;if(!r&&o&&e.constructor===R&&i)return e;C?o&&!i&&(e=e.source):e instanceof R&&(i&&(t=c.call(e)),e=e.source),w&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var s=a(C?new g(e,t):g(e,t),r?this:y,R);w&&n&&(p(s).sticky=!0);return s},b=function(e){e in R||s(R,e,{configurable:!0,get:function(){return g[e]},set:function(t){g[e]=t}})},O=u(g),S=0;O.length>S;)b(O[S++]);y.constructor=R,R.prototype=y,h(o,"RegExp",R)}m("RegExp")},function(e,t,n){"use strict";var r=n(29),o=n(615).left,i=n(137),a=n(154),s=n(322);r({target:"Array",proto:!0,forced:!i("reduce")||!s&&a>79&&a<83},{reduce:function(e){return o(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"parsingError",(function(){return s})),n.d(t,"ParsingErrorType",(function(){return r})),n.d(t,"AstNodeType",(function(){return o})),n.d(t,"RangeSheetReferenceType",(function(){return i})),n.d(t,"buildEmptyArgAst",(function(){return u})),n.d(t,"buildNumberAst",(function(){return l})),n.d(t,"buildStringAst",(function(){return c})),n.d(t,"buildCellReferenceAst",(function(){return f})),n.d(t,"buildCellRangeAst",(function(){return h})),n.d(t,"buildColumnRangeAst",(function(){return d})),n.d(t,"buildRowRangeAst",(function(){return p})),n.d(t,"buildConcatenateOpAst",(function(){return m})),n.d(t,"buildEqualsOpAst",(function(){return v})),n.d(t,"buildNotEqualOpAst",(function(){return g})),n.d(t,"buildGreaterThanOpAst",(function(){return y})),n.d(t,"buildLessThanOpAst",(function(){return E})),n.d(t,"buildGreaterThanOrEqualOpAst",(function(){return T})),n.d(t,"buildLessThanOrEqualOpAst",(function(){return C})),n.d(t,"buildPlusOpAst",(function(){return w})),n.d(t,"buildMinusOpAst",(function(){return R})),n.d(t,"buildTimesOpAst",(function(){return b})),n.d(t,"buildDivOpAst",(function(){return O})),n.d(t,"buildPowerOpAst",(function(){return S})),n.d(t,"buildMinusUnaryOpAst",(function(){return N})),n.d(t,"buildPlusUnaryOpAst",(function(){return A})),n.d(t,"buildPercentOpAst",(function(){return M})),n.d(t,"buildProcedureAst",(function(){return k})),n.d(t,"buildNamedExpressionAst",(function(){return _})),n.d(t,"buildParenthesisAst",(function(){return I})),n.d(t,"buildCellErrorAst",(function(){return x})),n.d(t,"buildErrorWithRawInputAst",(function(){return P})),n.d(t,"buildParsingErrorAst",(function(){return L})),n.d(t,"imageWithWhitespace",(function(){return F}));n(19);var r,o,i,a=n(22),s=function(e,t){return{type:e,message:t}};!function(e){e.LexingError="LexingError",e.ParserError="ParsingError",e.StaticOffsetError="StaticOffsetError",e.StaticOffsetOutOfRangeError="StaticOffsetOutOfRangeError",e.RangeOffsetNotAllowed="RangeOffsetNotAllowed"}(r||(r={})),function(e){e.EMPTY="EMPTY",e.NUMBER="NUMBER",e.STRING="STRING",e.MINUS_UNARY_OP="MINUS_UNARY_OP",e.PLUS_UNARY_OP="PLUS_UNARY_OP",e.PERCENT_OP="PERCENT_OP",e.CONCATENATE_OP="CONCATENATE_OP",e.EQUALS_OP="EQUALS_OP",e.NOT_EQUAL_OP="NOT_EQUAL_OP",e.GREATER_THAN_OP="GREATER_THAN_OP",e.LESS_THAN_OP="LESS_THAN_OP",e.GREATER_THAN_OR_EQUAL_OP="GREATER_THAN_OR_EQUAL_OP",e.LESS_THAN_OR_EQUAL_OP="LESS_THAN_OR_EQUAL_OP",e.PLUS_OP="PLUS_OP",e.MINUS_OP="MINUS_OP",e.TIMES_OP="TIMES_OP",e.DIV_OP="DIV_OP",e.POWER_OP="POWER_OP",e.FUNCTION_CALL="FUNCTION_CALL",e.NAMED_EXPRESSION="NAMED_EXPRESSION",e.PARENTHESIS="PARENTHESES",e.CELL_REFERENCE="CELL_REFERENCE",e.CELL_RANGE="CELL_RANGE",e.COLUMN_RANGE="COLUMN_RANGE",e.ROW_RANGE="ROW_RANGE",e.ERROR="ERROR",e.ERROR_WITH_RAW_INPUT="ERROR_WITH_RAW_INPUT"}(o||(o={})),function(e){e[e.RELATIVE=0]="RELATIVE",e[e.START_ABSOLUTE=1]="START_ABSOLUTE",e[e.BOTH_ABSOLUTE=2]="BOTH_ABSOLUTE"}(i||(i={}));var u=function(e){return{type:o.EMPTY,leadingWhitespace:null==e?void 0:e.image}},l=function(e,t){return{type:o.NUMBER,value:e,leadingWhitespace:null==t?void 0:t.image}},c=function(e){var t;return{type:o.STRING,value:e.image.slice(1,-1),leadingWhitespace:null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image}},f=function(e,t){return{type:o.CELL_REFERENCE,reference:e,leadingWhitespace:null==t?void 0:t.image}},h=function(e,t,n,r){return D(e,t,n),{type:o.CELL_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:r}},d=function(e,t,n,r){return D(e,t,n),{type:o.COLUMN_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null==r?void 0:r.image}},p=function(e,t,n,r){return D(e,t,n),{type:o.ROW_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null==r?void 0:r.image}},m=function(e,t,n){return{type:o.CONCATENATE_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},v=function(e,t,n){return{type:o.EQUALS_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},g=function(e,t,n){return{type:o.NOT_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},y=function(e,t,n){return{type:o.GREATER_THAN_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},E=function(e,t,n){return{type:o.LESS_THAN_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},T=function(e,t,n){return{type:o.GREATER_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},C=function(e,t,n){return{type:o.LESS_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},w=function(e,t,n){return{type:o.PLUS_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},R=function(e,t,n){return{type:o.MINUS_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},b=function(e,t,n){return{type:o.TIMES_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},O=function(e,t,n){return{type:o.DIV_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},S=function(e,t,n){return{type:o.POWER_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}},N=function(e,t){return{type:o.MINUS_UNARY_OP,value:e,leadingWhitespace:null==t?void 0:t.image}},A=function(e,t){return{type:o.PLUS_UNARY_OP,value:e,leadingWhitespace:null==t?void 0:t.image}},M=function(e,t){return{type:o.PERCENT_OP,value:e,leadingWhitespace:null==t?void 0:t.image}},k=function(e,t,n,r){return{type:o.FUNCTION_CALL,procedureName:e,args:t,leadingWhitespace:null==n?void 0:n.image,internalWhitespace:null==r?void 0:r.image}},_=function(e,t){return{type:o.NAMED_EXPRESSION,expressionName:e,leadingWhitespace:null==t?void 0:t.image}},I=function(e,t,n){return{type:o.PARENTHESIS,expression:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==n?void 0:n.image}},x=function(e,t){return{type:o.ERROR,error:e,leadingWhitespace:null==t?void 0:t.image}},P=function(e,t,n){return{type:o.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null==n?void 0:n.image}},L=function(){return{type:o.ERROR,error:a.CellError.parsingError()}};function D(e,t,n){if(null!==e.sheet&&null===t.sheet||null===e.sheet&&null!==t.sheet)throw new Error("Start address inconsistent with end address");if(null===e.sheet&&n!==i.RELATIVE||null!==e.sheet&&n===i.RELATIVE)throw new Error("Sheet address inconsistent with sheet reference type")}function F(e,t){return(null!=t?t:"")+e}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var n in t)f(t,n)&&(e[n]=t[n]);return f(t,"toString")&&(e.toString=t.toString),f(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,r){return bt(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=p(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function v(e){var t=d(NaN);return null!=e?h(p(t),e):p(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var g=o.momentProperties=[];function y(e,t){var n,r,o;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=p(t)),s(t._locale)||(e._locale=t._locale),g.length>0)for(n=0;n<g.length;n++)s(o=t[r=g[n]])||(e[r]=o);return e}var E=!1;function T(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===E&&(E=!0,o.updateOffset(this),E=!1)}function C(e){return e instanceof T||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function R(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=w(t)),n}function b(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&R(e[r])!==R(t[r]))&&a++;return a+i}function O(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function S(e,t){var n=!0;return h((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];i.push(r)}O(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var N,A={};function M(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),A[e]||(O(t),A[e]=!0)}function k(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function _(e,t){var n,r=h({},e);for(n in t)f(t,n)&&(a(e[n])&&a(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)f(e,n)&&!f(t,n)&&a(e[n])&&(r[n]=h({},r[n]));return r}function I(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,N=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)f(e,t)&&n.push(t);return n};var x={};function P(e,t){var n=e.toLowerCase();x[n]=x[n+"s"]=x[t]=e}function L(e){return"string"==typeof e?x[e]||x[e.toLowerCase()]:void 0}function D(e){var t,n,r={};for(n in e)f(e,n)&&(t=L(n))&&(r[t]=e[n]);return r}var F={};function U(e,t){F[e]=t}function j(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},W={};function Y(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(W[e]=o),t&&(W[t[0]]=function(){return j(o.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),B[t]=B[t]||function(e){var t,n,r,o=e.match(H);for(t=0,n=o.length;t<n;t++)W[o[t]]?o[t]=W[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=k(o[r])?o[r].call(t,e):o[r];return i}}(t),B[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(V.lastIndex=0;n>=0&&V.test(e);)e=e.replace(V,r),V.lastIndex=0,n-=1;return e}var K=/\d/,X=/\d\d/,q=/\d{3}/,Q=/\d{4}/,$=/[+-]?\d{6}/,Z=/\d\d?/,J=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,oe=/\d+/,ie=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,le={};function ce(e,t,n){le[e]=k(t)?t:function(e,r){return e&&n?n:t}}function fe(e,t){return f(le,e)?le[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var de={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),u(t)&&(r=function(e,n){n[t]=R(e)}),n=0;n<e.length;n++)de[e[n]]=r}function me(e,t){pe(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function ve(e,t,n){null!=t&&f(de,e)&&de[e](t,n._a,n,e)}function ge(e){return ye(e)?366:365}function ye(e){return e%4==0&&e%100!=0||e%400==0}Y("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),Y(0,["YY",2],0,(function(){return this.year()%100})),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),P("year","y"),U("year",1),ce("Y",ie),ce("YY",Z,X),ce("YYYY",ne,Q),ce("YYYYY",re,$),ce("YYYYYY",re,$),pe(["YYYYY","YYYYYY"],0),pe("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):R(e)})),pe("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),pe("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return R(e)+(R(e)>68?1900:2e3)};var Ee,Te=Ce("FullYear",!0);function Ce(e,t){return function(n){return null!=n?(Re(this,e,n),o.updateOffset(this,t),this):we(this,e)}}function we(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Re(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ye(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),be(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function be(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ye(e)?29:28:31-r%7%2}Ee=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},Y("M",["MM",2],"Mo",(function(){return this.month()+1})),Y("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),Y("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),P("month","M"),U("month",8),ce("M",Z),ce("MM",Z,X),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),pe(["M","MM"],(function(e,t){t[1]=R(e)-1})),pe(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:p(n).invalidMonth=e}));var Oe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Se="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ne="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ae(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Ee.call(this._shortMonthsParse,a))?o:null:-1!==(o=Ee.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=Ee.call(this._shortMonthsParse,a))||-1!==(o=Ee.call(this._longMonthsParse,a))?o:null:-1!==(o=Ee.call(this._longMonthsParse,a))||-1!==(o=Ee.call(this._shortMonthsParse,a))?o:null}function Me(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=R(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),be(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ke(e){return null!=e?(Me(this,e),o.updateOffset(this,!0),this):we(this,"Month")}var _e=ue,Ie=ue;function xe(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=d([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)r[t]=he(r[t]),o[t]=he(o[t]);for(t=0;t<24;t++)i[t]=he(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Pe(e,t,n,r,o,i,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,i,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,i,a),s}function Le(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function De(e,t,n){var r=7+t-n;return-(7+Le(e,0,r).getUTCDay()-t)%7+r-1}function Fe(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+De(e,r,o);return s<=0?a=ge(i=e-1)+s:s>ge(e)?(i=e+1,a=s-ge(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Ue(e,t,n){var r,o,i=De(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+je(o=e.year()-1,t,n):a>je(e.year(),t,n)?(r=a-je(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function je(e,t,n){var r=De(e,t,n),o=De(e+1,t,n);return(ge(e)-r+o)/7}function He(e,t){return e.slice(t,7).concat(e.slice(0,t))}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),U("week",5),U("isoWeek",5),ce("w",Z),ce("ww",Z,X),ce("W",Z),ce("WW",Z,X),me(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=R(e)})),Y("d",0,"do","day"),Y("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),Y("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),Y("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),U("day",11),U("weekday",11),U("isoWeekday",11),ce("d",Z),ce("e",Z),ce("E",Z),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:p(n).invalidWeekday=e})),me(["d","e","E"],(function(e,t,n,r){t[r]=R(e)}));var Ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),We="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ye(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,a))||-1!==(o=Ee.call(this._shortWeekdaysParse,a))||-1!==(o=Ee.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,a))||-1!==(o=Ee.call(this._weekdaysParse,a))||-1!==(o=Ee.call(this._minWeekdaysParse,a))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,a))||-1!==(o=Ee.call(this._weekdaysParse,a))||-1!==(o=Ee.call(this._shortWeekdaysParse,a))?o:null}var Ge=ue,ze=ue,Ke=ue;function Xe(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],u=[],l=[];for(t=0;t<7;t++)n=d([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),u.push(i),l.push(r),l.push(o),l.push(i);for(a.sort(e),s.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)s[t]=he(s[t]),u[t]=he(u[t]),l[t]=he(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function qe(){return this.hours()%12||12}function Qe(e,t){Y(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function $e(e,t){return t._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,qe),Y("k",["kk",2],0,(function(){return this.hours()||24})),Y("hmm",0,0,(function(){return""+qe.apply(this)+j(this.minutes(),2)})),Y("hmmss",0,0,(function(){return""+qe.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),Y("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),Y("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),P("hour","h"),U("hour",13),ce("a",$e),ce("A",$e),ce("H",Z),ce("h",Z),ce("k",Z),ce("HH",Z,X),ce("hh",Z,X),ce("kk",Z,X),ce("hmm",J),ce("hmmss",ee),ce("Hmm",J),ce("Hmmss",ee),pe(["H","HH"],3),pe(["k","kk"],(function(e,t,n){var r=R(e);t[3]=24===r?0:r})),pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),pe(["h","hh"],(function(e,t,n){t[3]=R(e),p(n).bigHour=!0})),pe("hmm",(function(e,t,n){var r=e.length-2;t[3]=R(e.substr(0,r)),t[4]=R(e.substr(r)),p(n).bigHour=!0})),pe("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=R(e.substr(0,r)),t[4]=R(e.substr(r,2)),t[5]=R(e.substr(o)),p(n).bigHour=!0})),pe("Hmm",(function(e,t,n){var r=e.length-2;t[3]=R(e.substr(0,r)),t[4]=R(e.substr(r))})),pe("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=R(e.substr(0,r)),t[4]=R(e.substr(r,2)),t[5]=R(e.substr(o))}));var Ze,Je=Ce("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Se,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ve,weekdaysMin:We,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function ot(t){var r=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{r=Ze._abbr,n(698)("./"+t),it(r)}catch(e){}return tt[t]}function it(e,t){var n;return e&&((n=s(t)?st(e):at(e,t))?Ze=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ze._abbr}function at(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=ot(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new I(_(r,t)),nt[e]&&nt[e].forEach((function(e){at(e.name,e.config)})),it(e),tt[e]}return delete tt[e],null}function st(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!i(e)){if(t=ot(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=rt(e[i]).split("-")).length,n=(n=rt(e[i+1]))?n.split("-"):null;t>0;){if(r=ot(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&b(o,n,!0)>=t-1)break;t--}i++}return Ze}(e)}function ut(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>be(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,r,i,a,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,o,i,a,s,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=lt(t.GG,e._a[0],Ue(Ot(),1,4).year),r=lt(t.W,1),((o=lt(t.E,1))<1||o>7)&&(u=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var l=Ue(Ot(),i,a);n=lt(t.gg,e._a[0],l.year),r=lt(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(u=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(u=!0)):o=i}r<1||r>je(n,i,a)?p(e)._overflowWeeks=!0:null!=u?p(e)._overflowWeekday=!0:(s=Fe(n,r,o,i,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=lt(e._a[0],r[0]),(e._dayOfYear>ge(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Le(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Le:Pe).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(p(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vt=/^\/?Date\((\-?\d+)/i;function gt(e){var t,n,r,o,i,a,s=e._i,u=ft.exec(s)||ht.exec(s);if(u){for(p(e).iso=!0,t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(u[1])){o=pt[t][0],r=!1!==pt[t][2];break}if(null==o)return void(e._isValid=!1);if(u[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(u[3])){i=(u[2]||" ")+mt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(u[4]){if(!dt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),wt(e)}else e._isValid=!1}var yt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Et(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var Tt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ct(e){var t,n,r,o,i,a,s,u=yt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){var l=(t=u[4],n=u[3],r=u[2],o=u[5],i=u[6],a=u[7],s=[Et(t),Ne.indexOf(n),parseInt(r,10),parseInt(o,10),parseInt(i,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],l,e))return;e._a=l,e._tzm=function(e,t,n){if(e)return Tt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(u[8],u[9],u[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function wt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],p(e).empty=!0;var t,n,r,i,a,s=""+e._i,u=s.length,l=0;for(r=z(e._f,e._locale).match(H)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(fe(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),l+=n.length),W[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),ve(i,n,e)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=u-l,s.length>0&&p(e).unusedInput.push(s),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),ct(e),ut(e)}else Ct(e);else gt(e)}function Rt(e){var t=e._i,n=e._f;return e._locale=e._locale||st(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),C(t)?new T(ut(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],wt(t),m(t)&&(i+=p(t).charsLeftOver,i+=10*p(t).unusedTokens.length,p(t).score=i,(null==r||i<r)&&(r=i,n=t));h(e,n||t)}(e):n?wt(e):function(e){var t=e._i;s(t)?e._d=new Date(o.now()):l(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=vt.exec(e._i);null===t?(gt(e),!1===e._isValid&&(delete e._isValid,Ct(e),!1===e._isValid&&(delete e._isValid,o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),ct(e)):a(t)?function(e){if(!e._d){var t=D(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),ct(e)}}(e):u(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function bt(e,t,n,r,o){var s,u={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=o,u._l=n,u._i=e,u._f=t,u._strict=r,(s=new T(ut(Rt(u))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ot(e,t,n,r){return bt(e,t,n,r,!1)}o.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var St=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()})),Nt=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()}));function At(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ot();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Mt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function kt(e){var t=D(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,u=t.minute||0,l=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ee.call(Mt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Mt.length;++r)if(e[Mt[r]]){if(n)return!1;parseFloat(e[Mt[r]])!==R(e[Mt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*l+6e4*u+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=st(),this._bubble()}function _t(e){return e instanceof kt}function It(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function xt(e,t){Y(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+j(~~(e/60),2)+t+j(~~e%60,2)}))}xt("Z",":"),xt("ZZ",""),ce("Z",se),ce("ZZ",se),pe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Lt(se,e)}));var Pt=/([\+\-]|\d\d)/gi;function Lt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Pt)||["-",0,0],o=60*r[1]+R(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Dt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(C(e)||l(e)?e.valueOf():Ot(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Ot(e).local()}function Ft(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Ut(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var jt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ht=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Vt(e,t){var n,r,o,i,a,s,l=e,c=null;return _t(e)?l={ms:e._milliseconds,d:e._days,M:e._months}:u(e)?(l={},t?l[t]=e:l.milliseconds=e):(c=jt.exec(e))?(n="-"===c[1]?-1:1,l={y:0,d:R(c[2])*n,h:R(c[3])*n,m:R(c[4])*n,s:R(c[5])*n,ms:R(It(1e3*c[6]))*n}):(c=Ht.exec(e))?(n="-"===c[1]?-1:1,l={y:Bt(c[2],n),M:Bt(c[3],n),w:Bt(c[4],n),d:Bt(c[5],n),h:Bt(c[6],n),m:Bt(c[7],n),s:Bt(c[8],n)}):null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(i=Ot(l.from),a=Ot(l.to),o=i.isValid()&&a.isValid()?(a=Dt(a,i),i.isBefore(a)?s=Wt(i,a):((s=Wt(a,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(l={}).ms=o.milliseconds,l.M=o.months),r=new kt(l),_t(e)&&f(e,"_locale")&&(r._locale=e._locale),r}function Bt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Yt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(M(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Gt(this,Vt(n="string"==typeof n?+n:n,r),e),this}}function Gt(e,t,n,r){var i=t._milliseconds,a=It(t._days),s=It(t._months);e.isValid()&&(r=null==r||r,s&&Me(e,we(e,"Month")+s*n),a&&Re(e,"Date",we(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}Vt.fn=kt.prototype,Vt.invalid=function(){return Vt(NaN)};var zt=Yt(1,"add"),Kt=Yt(-1,"subtract");function Xt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=st(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qt=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function $t(){return this._locale}function Zt(e,t){return(e%t+t)%t}function Jt(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function en(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function tn(e,t){Y(0,[e,e.length],0,t)}function nn(e,t,n,r,o){var i;return null==e?Ue(this,r,o).year:(t>(i=je(e,r,o))&&(t=i),rn.call(this,e,t,n,r,o))}function rn(e,t,n,r,o){var i=Fe(e,t,n,r,o),a=Le(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}Y(0,["gg",2],0,(function(){return this.weekYear()%100})),Y(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tn("gggg","weekYear"),tn("ggggg","weekYear"),tn("GGGG","isoWeekYear"),tn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Z,X),ce("gg",Z,X),ce("GGGG",ne,Q),ce("gggg",ne,Q),ce("GGGGG",re,$),ce("ggggg",re,$),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=R(e)})),me(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),Y("Q",0,"Qo","quarter"),P("quarter","Q"),U("quarter",7),ce("Q",K),pe("Q",(function(e,t){t[1]=3*(R(e)-1)})),Y("D",["DD",2],"Do","date"),P("date","D"),U("date",9),ce("D",Z),ce("DD",Z,X),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],2),pe("Do",(function(e,t){t[2]=R(e.match(Z)[0])}));var on=Ce("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),U("dayOfYear",4),ce("DDD",te),ce("DDDD",q),pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=R(e)})),Y("m",["mm",2],0,"minute"),P("minute","m"),U("minute",14),ce("m",Z),ce("mm",Z,X),pe(["m","mm"],4);var an=Ce("Minutes",!1);Y("s",["ss",2],0,"second"),P("second","s"),U("second",15),ce("s",Z),ce("ss",Z,X),pe(["s","ss"],5);var sn,un=Ce("Seconds",!1);for(Y("S",0,0,(function(){return~~(this.millisecond()/100)})),Y(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Y(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Y(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Y(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Y(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Y(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),P("millisecond","ms"),U("millisecond",16),ce("S",te,K),ce("SS",te,X),ce("SSS",te,q),sn="SSSS";sn.length<=9;sn+="S")ce(sn,oe);function ln(e,t){t[6]=R(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")pe(sn,ln);var cn=Ce("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var fn=T.prototype;function hn(e){return e}fn.add=zt,fn.calendar=function(e,t){var n=e||Ot(),r=Dt(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(k(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Ot(n)))},fn.clone=function(){return new T(this)},fn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Dt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=L(t)){case"year":i=Xt(this,r)/12;break;case"month":i=Xt(this,r);break;case"quarter":i=Xt(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:w(i)},fn.endOf=function(e){var t;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Jt;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Zt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Zt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Zt(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},fn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||Ot(e).isValid())?Vt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(Ot(),e)},fn.to=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||Ot(e).isValid())?Vt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(Ot(),e)},fn.get=function(e){return k(this[e=L(e)])?this[e]():this},fn.invalidAt=function(){return p(this).overflow},fn.isAfter=function(e,t){var n=C(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=C(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.isBetween=function(e,t,n,r){var o=C(e)?e:Ot(e),i=C(t)?t:Ot(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},fn.isSame=function(e,t){var n,r=C(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return m(this)},fn.lang=Qt,fn.locale=qt,fn.localeData=$t,fn.max=Nt,fn.min=St,fn.parsingFlags=function(){return h({},p(this))},fn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=D(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(k(this[e=L(e)]))return this[e](t);return this},fn.startOf=function(e){var t;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?en:Jt;switch(e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Zt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Zt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Zt(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},fn.subtract=Kt,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Te,fn.isLeapYear=function(){return ye(this.year())},fn.weekYear=function(e){return nn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return nn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=ke,fn.daysInMonth=function(){return be(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ue(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return je(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return je(this.year(),1,4)},fn.date=on,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=Je,fn.minute=fn.minutes=an,fn.second=fn.seconds=un,fn.millisecond=fn.milliseconds=cn,fn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Lt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Ft(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Gt(this,Vt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Ft(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ft(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Lt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=Ut,fn.isUTC=Ut,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=S("dates accessor is deprecated. Use date instead.",on),fn.months=S("months accessor is deprecated. Use month instead",ke),fn.years=S("years accessor is deprecated. Use year instead",Te),fn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),fn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Rt(e))._a){var t=e._isUTC?d(e._a):Ot(e._a);this._isDSTShifted=this.isValid()&&b(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var dn=I.prototype;function pn(e,t,n,r){var o=st(),i=d().set(r,t);return o[n](i,e)}function mn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=pn(e,r,n,"month");return o}function vn(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,i=st(),a=e?i._week.dow:0;if(null!=n)return pn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=pn(t,(o+a)%7,r,"day");return s}dn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return k(r)?r.call(t,n):r},dn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},dn.invalidDate=function(){return this._invalidDate},dn.ordinal=function(e){return this._ordinal.replace("%d",e)},dn.preparse=hn,dn.postformat=hn,dn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return k(o)?o(e,t,n,r):o.replace(/%d/i,e)},dn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)},dn.set=function(e){var t,n;for(n in e)k(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},dn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},dn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},dn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Ae.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},dn.monthsRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||xe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Ie),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},dn.monthsShortRegex=function(e){return this._monthsParseExact?(f(this,"_monthsRegex")||xe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=_e),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},dn.week=function(e){return Ue(e,this._week.dow,this._week.doy).week},dn.firstDayOfYear=function(){return this._week.doy},dn.firstDayOfWeek=function(){return this._week.dow},dn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?He(n,this._week.dow):e?n[e.day()]:n},dn.weekdaysMin=function(e){return!0===e?He(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},dn.weekdaysShort=function(e){return!0===e?He(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},dn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Ye.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},dn.weekdaysRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},dn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},dn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ke),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},dn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},dn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===R(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=S("moment.lang is deprecated. Use moment.locale instead.",it),o.langData=S("moment.langData is deprecated. Use moment.localeData instead.",st);var gn=Math.abs;function yn(e,t,n,r){var o=Vt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function Cn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Rn=wn("ms"),bn=wn("s"),On=wn("m"),Sn=wn("h"),Nn=wn("d"),An=wn("w"),Mn=wn("M"),kn=wn("Q"),_n=wn("y");function In(e){return function(){return this.isValid()?this._data[e]:NaN}}var xn=In("milliseconds"),Pn=In("seconds"),Ln=In("minutes"),Dn=In("hours"),Fn=In("days"),Un=In("months"),jn=In("years"),Hn=Math.round,Vn={ss:44,s:45,m:45,h:22,d:26,M:11};function Bn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Wn=Math.abs;function Yn(e){return(e>0)-(e<0)||+e}function Gn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Wn(this._milliseconds)/1e3,r=Wn(this._days),o=Wn(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var i=w(o/12),a=o%=12,s=r,u=t,l=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var h=f<0?"-":"",d=Yn(this._months)!==Yn(f)?"-":"",p=Yn(this._days)!==Yn(f)?"-":"",m=Yn(this._milliseconds)!==Yn(f)?"-":"";return h+"P"+(i?d+i+"Y":"")+(a?d+a+"M":"")+(s?p+s+"D":"")+(u||l||c?"T":"")+(u?m+u+"H":"")+(l?m+l+"M":"")+(c?m+c+"S":"")}var zn=kt.prototype;return zn.isValid=function(){return this._isValid},zn.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},zn.add=function(e,t){return yn(this,e,t,1)},zn.subtract=function(e,t){return yn(this,e,t,-1)},zn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=L(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Tn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Cn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},zn.asMilliseconds=Rn,zn.asSeconds=bn,zn.asMinutes=On,zn.asHours=Sn,zn.asDays=Nn,zn.asWeeks=An,zn.asMonths=Mn,zn.asQuarters=kn,zn.asYears=_n,zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*R(this._months/12):NaN},zn._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,u=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*En(Cn(s)+a),a=0,s=0),u.milliseconds=i%1e3,e=w(i/1e3),u.seconds=e%60,t=w(e/60),u.minutes=t%60,n=w(t/60),u.hours=n%24,a+=w(n/24),o=w(Tn(a)),s+=o,a-=En(Cn(o)),r=w(s/12),s%=12,u.days=a,u.months=s,u.years=r,this},zn.clone=function(){return Vt(this)},zn.get=function(e){return e=L(e),this.isValid()?this[e+"s"]():NaN},zn.milliseconds=xn,zn.seconds=Pn,zn.minutes=Ln,zn.hours=Dn,zn.days=Fn,zn.weeks=function(){return w(this.days()/7)},zn.months=Un,zn.years=jn,zn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Vt(e).abs(),o=Hn(r.as("s")),i=Hn(r.as("m")),a=Hn(r.as("h")),s=Hn(r.as("d")),u=Hn(r.as("M")),l=Hn(r.as("y")),c=o<=Vn.ss&&["s",o]||o<Vn.s&&["ss",o]||i<=1&&["m"]||i<Vn.m&&["mm",i]||a<=1&&["h"]||a<Vn.h&&["hh",a]||s<=1&&["d"]||s<Vn.d&&["dd",s]||u<=1&&["M"]||u<Vn.M&&["MM",u]||l<=1&&["y"]||["yy",l];return c[2]=t,c[3]=+e>0,c[4]=n,Bn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},zn.toISOString=Gn,zn.toString=Gn,zn.toJSON=Gn,zn.locale=qt,zn.localeData=$t,zn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gn),zn.lang=Qt,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),pe("x",(function(e,t,n){n._d=new Date(R(e))})),o.version="2.24.0",t=Ot,o.fn=fn,o.min=function(){var e=[].slice.call(arguments,0);return At("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return At("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=d,o.unix=function(e){return Ot(1e3*e)},o.months=function(e,t){return mn(e,t,"months")},o.isDate=l,o.locale=it,o.invalid=v,o.duration=Vt,o.isMoment=C,o.weekdays=function(e,t,n){return vn(e,t,n,"weekdays")},o.parseZone=function(){return Ot.apply(null,arguments).parseZone()},o.localeData=st,o.isDuration=_t,o.monthsShort=function(e,t){return mn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return vn(e,t,n,"weekdaysMin")},o.defineLocale=at,o.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=(r=ot(e))&&(o=r._config),t=_(o,t),(n=new I(t)).parentLocale=tt[e],tt[e]=n,it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return N(tt)},o.weekdaysShort=function(e,t,n){return vn(e,t,n,"weekdaysShort")},o.normalizeUnits=L,o.relativeTimeRounding=function(e){return void 0===e?Hn:"function"==typeof e&&(Hn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Vn[e]&&(void 0===t?Vn[e]:(Vn[e]=t,"s"===e&&(Vn.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=fn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}(),window.moment=n(96)}).call(this,n(697)(e))},function(e,t,n){"use strict";t.__esModule=!0,t.normalizeSelection=function(e){return(0,r.arrayMap)(e,(function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}))},t.isSeparator=function(e){return(0,o.hasClass)(e,"htSeparator")},t.hasSubMenu=function(e){return(0,o.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,o.hasClass)(e,"htDisabled")},t.isSelectionDisabled=function(e){return(0,o.hasClass)(e,"htSelectionDisabled")},t.getValidSelection=function(e){var t=e.getSelected();if(!t)return null;if(t[0]<0)return null;return t},t.prepareVerticalAlignClass=a,t.prepareHorizontalAlignClass=s,t.getAlignmentClasses=function(e,t){var n={};return(0,r.arrayEach)(e,(function(e){e.forAll((function(e,r){e>=0&&r>=0&&(n[e]||(n[e]=[]),n[e][r]=t(e,r))}))})),n},t.align=function(e,t,n,o,i){(0,r.arrayEach)(e,(function(e){e.forAll((function(e,r){e>=0&&r>=0&&function(e,t,n,r,o,i){var u=o(e,t),l=r;u.className&&(l="vertical"===n?a(u.className,r):s(u.className,r));i(e,t,"className",l)}(e,r,t,n,o,i)}))}))},t.checkSelectionConsistency=function(e,t){var n=!1;Array.isArray(e)&&(0,r.arrayEach)(e,(function(e){return e.forAll((function(e,r){if(e>=0&&r>=0&&t(e,r))return n=!0,!1})),n}));return n},t.markLabelAsSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.filterSeparators=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.KEY,n=e.slice(0);return n=c(n=l(n=u(n,t),t))},n(30),n(34),n(61),n(20),n(19),n(25),n(120);var r=n(16),o=n(21),i=n(287);function a(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return"".concat(n," ").concat(t)}function s(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return"".concat(n," ").concat(t)}function u(e,t){for(var n=e.slice(0);0<n.length&&n[0].name===t;)n.shift();return n}function l(e,t){var n=e.slice(0);return n.reverse(),(n=u(n,t)).reverse(),n}function c(e){var t=[];return(0,r.arrayEach)(e,(function(e,n){n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}},function(e,t,n){"use strict";n.r(t),n.d(t,"ArrayData",(function(){return d})),n.d(t,"OnlyRangeData",(function(){return p})),n.d(t,"SimpleRangeValue",(function(){return m}));n(2),n(3),n(4),n(19),n(1),n(25),n(23),n(8),n(10),n(11),n(72);var r=n(22),o=n(39),i=n(50);function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(){function e(t,n,r){c(this,e),this.size=t,this.data=n,this._hasOnlyNumbers=r}return h(e,[{key:"range",value:function(){}},{key:"hasOnlyNumbers",value:function(){return this._hasOnlyNumbers}},{key:"topLeftCorner",value:function(){if(this.size.height>0&&this.size.width>0)return this.data[0][0]}},{key:"valuesFromTopLeftCorner",value:function(){for(var e=[],t=0;t<this.size.height;t++)for(var n=0;n<this.size.width;n++)e.push(this.data[t][n]);return e}},{key:"iterateValuesFromTopLeftCorner",value:regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t<this.size.height)){e.next=12;break}n=0;case 3:if(!(n<this.size.width)){e.next=9;break}return e.next=6,this.data[t][n];case 6:n++,e.next=3;break;case 9:t++,e.next=1;break;case 12:case"end":return e.stop()}}),e,this)}))},{key:"raw",value:function(){return this.data}},{key:"rawNumbers",value:function(){if(this.hasOnlyNumbers())return this.data;throw new Error("Data is not only numbers")}}]),e}(),p=function(){function e(t,n,r){c(this,e),this.size=t,this._range=n,this.dependencyGraph=r}return h(e,[{key:"raw",value:function(){return this.ensureThatComputed(),this.data}},{key:"rawNumbers",value:function(){if(this.hasOnlyNumbers())return this.data;throw new Error("Data is not only numbers")}},{key:"hasOnlyNumbers",value:function(){if(this.ensureThatComputed(),void 0===this._hasOnlyNumbers){var e,t=s(this.iterateValuesFromTopLeftCorner());try{for(t.s();!(e=t.n()).done;){if("number"!=typeof e.value){this._hasOnlyNumbers=!1;break}}}catch(e){t.e(e)}finally{t.f()}this._hasOnlyNumbers=!0}return this._hasOnlyNumbers}},{key:"topLeftCorner",value:function(){if(void 0!==this.data&&this.size.height>0&&this.size.width>0)return this.data[0][0]}},{key:"range",value:function(){return this._range}},{key:"valuesFromTopLeftCorner",value:function(){this.ensureThatComputed();for(var e=[],t=0;t<this.data.length;t++)for(var n=0;n<this.data[0].length;n++)e.push(this.data[t][n]);return e}},{key:"iterateValuesFromTopLeftCorner",value:regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.ensureThatComputed(),t=0;case 2:if(!(t<this.data.length)){e.next=13;break}n=0;case 4:if(!(n<this.data[0].length)){e.next=10;break}return e.next=7,this.data[t][n];case 7:n++,e.next=4;break;case 10:t++,e.next=2;break;case 13:case"end":return e.stop()}}),e,this)}))},{key:"ensureThatComputed",value:function(){void 0===this.data&&(this.data=this.computeDataFromDependencyGraph())}},{key:"computeDataFromDependencyGraph",value:function(){var e,t=[],n=0,u=[],l=s(this._range.addresses(this.dependencyGraph));try{for(l.s();!(e=l.n()).done;){var c=e.value,f=this.dependencyGraph.getCellValue(c);f instanceof m?u.push(new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.ScalarExpected)):Object(i.isExtendedNumber)(f)?u.push(f):(u.push(f),this._hasOnlyNumbers=!1),++n%this.size.width==0&&(n=0,t.push(a(u)),u=[])}}catch(e){l.e(e)}finally{l.f()}return t}}]),e}(),m=function(){function e(t,n){c(this,e),this.data=t,this._range=n}return h(e,[{key:"size",get:function(){return this.data.size}},{key:"width",value:function(){return this.data.size.width}},{key:"height",value:function(){return this.data.size.height}},{key:"raw",value:function(){return this.data.raw()}},{key:"topLeftCornerValue",value:function(){return this.data.topLeftCorner()}},{key:"valuesFromTopLeftCorner",value:function(){return this.data.valuesFromTopLeftCorner()}},{key:"iterateValuesFromTopLeftCorner",value:regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.data.iterateValuesFromTopLeftCorner(),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"numberOfElements",value:function(){return this.data.size.width*this.data.size.height}},{key:"hasOnlyNumbers",value:function(){return this.data.hasOnlyNumbers()}},{key:"rawNumbers",value:function(){return this.data.rawNumbers()}},{key:"range",value:function(){var e;return null!==(e=this._range)&&void 0!==e?e:this.data.range()}},{key:"sameDimensionsAs",value:function(e){return this.width()===e.width()&&this.height()===e.height()}}],[{key:"onlyNumbersDataWithRange",value:function(t,n,r){return new e(new d(n,t,!0),r)}},{key:"onlyNumbersDataWithoutRange",value:function(t,n){return new e(new d(n,t,!0))}},{key:"onlyRange",value:function(t,n){return new e(new p({width:t.width(),height:t.height()},t,n))}},{key:"fromScalar",value:function(t){var n=Object(i.isExtendedNumber)(t);return new e(new d({width:1,height:1},[[t]],n))}}]),e}()},function(e,t,n){var r=n(77),o=n(82),i=n(148);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(56),o=n(99),i=n(78),a=n(212),s=n(296),u=n(117),l=u.get,c=u.enforce,f=String(String).split("String");(e.exports=function(e,t,n,s){var u,l=!!s&&!!s.unsafe,h=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),(u=c(n)).source||(u.source=f.join("string"==typeof t?t:""))),e!==r?(l?!d&&e[t]&&(h=!0):delete e[t],h?e[t]=n:o(e,t,n)):h?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},function(e,t,n){"use strict";n.r(t);var r=n(316);n.d(t,"DependencyGraph",(function(){return r.DependencyGraph}));var o=n(245);n.d(t,"AddressMapping",(function(){return o.AddressMapping}));var i=n(249);n.d(t,"Graph",(function(){return i.Graph}));var a=n(251);n.d(t,"RangeMapping",(function(){return a.RangeMapping}));var s=n(252);n.d(t,"SheetMapping",(function(){return s.SheetMapping}));var u=n(250);n.d(t,"MatrixMapping",(function(){return u.MatrixMapping}));var l=n(247);n.d(t,"MatrixVertex",(function(){return l.MatrixVertex}));var c=n(246);n.d(t,"FormulaCellVertex",(function(){return c.FormulaCellVertex}));var f=n(336);n.d(t,"EmptyCellVertex",(function(){return f.EmptyCellVertex}));var h=n(337);n.d(t,"ValueCellVertex",(function(){return h.ValueCellVertex}));var d=n(338);n.d(t,"ParsingErrorVertex",(function(){return d.ParsingErrorVertex}));var p=n(248);n.d(t,"RangeVertex",(function(){return p.RangeVertex}));var m=n(255);n.d(t,"SparseStrategy",(function(){return m.SparseStrategy}));var v=n(256);n.d(t,"DenseStrategy",(function(){return v.DenseStrategy}))},function(e,t,n){"use strict";n.r(t),n.d(t,"cellAddressFromString",(function(){return h})),n.d(t,"columnAddressFromString",(function(){return d})),n.d(t,"rowAddressFromString",(function(){return p})),n.d(t,"simpleCellAddressFromString",(function(){return m})),n.d(t,"simpleCellAddressToString",(function(){return v})),n.d(t,"columnIndexToLabel",(function(){return y})),n.d(t,"sheetIndexToString",(function(){return E}));n(93),n(34),n(60),n(48),n(20),n(94),n(63),n(61);var r=n(22),o=n(192),i=n(323),a=n(163),s=n(330),u=new RegExp("^(".concat(a.sheetNameRegexp,")?(\\$?)([A-Za-z]+)(\\$?)([0-9]+)$")),l=new RegExp("^(".concat(a.sheetNameRegexp,")?(\\$?)([A-Za-z]+)$")),c=new RegExp("^(".concat(a.sheetNameRegexp,")?(\\$?)([0-9]+)$")),f=new RegExp("^".concat(a.simpleSheetName,"$")),h=function(e,t,n){var r=u.exec(t),i=g(r[6]),a=T(r,e);if(void 0!==a){var s=Number(r[8])-1;return"$"===r[5]&&"$"===r[7]?o.CellAddress.absolute(a,i,s):"$"===r[5]?o.CellAddress.absoluteCol(a,i,s-n.row):"$"===r[7]?o.CellAddress.absoluteRow(a,i-n.col,s):o.CellAddress.relative(a,i-n.col,s-n.row)}},d=function(e,t,n){var r=l.exec(t),o=T(r,e);if(void 0!==o){var a=g(r[6]);return"$"===r[5]?i.ColumnAddress.absolute(o,a):i.ColumnAddress.relative(o,a-n.col)}},p=function(e,t,n){var r=c.exec(t),o=T(r,e);if(void 0!==o){var i=Number(r[6])-1;return"$"===r[5]?s.RowAddress.absolute(o,i):s.RowAddress.relative(o,i-n.row)}},m=function(e,t,n){var o=u.exec(t),i=g(o[6]),a=T(o,e);if(void 0!==a){null===a&&(a=n);var s=Number(o[8])-1;return Object(r.simpleCellAddress)(a,i,s)}},v=function(e,t,n){var r=y(t.col),o=E(t.sheet,e);if(void 0!==o)return n!==t.sheet?"".concat(o,"!").concat(r).concat(t.row+1):"".concat(r).concat(t.row+1)};function g(e){return 1===e.length?e.toUpperCase().charCodeAt(0)-65:e.split("").reduce((function(e,t){return 26*e+(t.toUpperCase().charCodeAt(0)-64)}),0)-1}function y(e){for(var t="";e>=0;)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function E(e,t){var n=t(e);if(void 0!==n)return f.test(n)?n:(n=n.replace(/'/g,"''"),"'".concat(n,"'"))}function T(e,t){var n,r=null!==(n=e[3])&&void 0!==n?n:e[2],o=null;if(!r||void 0!==(o=t(r=r.replace(/''/g,"'"))))return o}},function(e,t,n){"use strict";n.r(t),n.d(t,"isRecognitionException",(function(){return i})),n.d(t,"MismatchedTokenException",(function(){return a})),n.d(t,"NoViableAltException",(function(){return s})),n.d(t,"NotAllInputParsedException",(function(){return u})),n.d(t,"EarlyExitException",(function(){return l}));var r=n(42),o=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"];function i(e){return Object(r.contains)(o,e.name)}function a(e,t,n){this.name="MismatchedTokenException",this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function s(e,t,n){this.name="NoViableAltException",this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function u(e,t){this.name="NotAllInputParsedException",this.message=e,this.token=t,this.resyncedTokens=[]}function l(e,t,n){this.name="EarlyExitException",this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(o),a.prototype=Error.prototype,s.prototype=Error.prototype,u.prototype=Error.prototype,l.prototype=Error.prototype},function(e,t,n){"use strict";t.__esModule=!0,t.setBrowserMeta=s,t.setPlatformMeta=u,t.isChrome=function(){return i.chrome.value},t.isChromeWebKit=function(){return i.chromeWebKit.value},t.isFirefox=function(){return i.firefox.value},t.isFirefoxWebKit=function(){return i.firefoxWebKit.value},t.isSafari=function(){return i.safari.value},t.isEdge=function(){return i.edge.value},t.isEdgeWebKit=function(){return i.edgeWebKit.value},t.isIE=function(){return i.ie.value},t.isIE9=function(){return i.ie9.value},t.isMSBrowser=function(){return i.ie.value||i.edge.value},t.isMobileBrowser=function(){return i.mobile.value},t.isIOS=function(){return a.ios.value},t.isIpadOS=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator,t=e.maxTouchPoints;return t>2&&a.mac.value},t.isWindowsOS=function(){return a.win.value},t.isMacOS=function(){return a.mac.value},t.isLinuxOS=function(){return a.linux.value};var r=n(15),o=function(e){var t={value:!1,test:function(n,r){t.value=e(n,r)}};return t},i={chrome:o((function(e,t){return/Chrome/.test(e)&&/Google/.test(t)})),chromeWebKit:o((function(e){return/CriOS/.test(e)})),edge:o((function(e){return/Edge/.test(e)})),edgeWebKit:o((function(e){return/EdgiOS/.test(e)})),firefox:o((function(e){return/Firefox/.test(e)})),firefoxWebKit:o((function(e){return/FxiOS/.test(e)})),ie:o((function(e){return/Trident/.test(e)})),ie9:o((function(){return!!document.documentMode})),mobile:o((function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)})),safari:o((function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)}))},a={mac:o((function(e){return/^Mac/.test(e)})),win:o((function(e){return/^Win/.test(e)})),linux:o((function(e){return/^Linux/.test(e)})),ios:o((function(e){return/iPhone|iPad|iPod/i.test(e)}))};function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,o=e.vendor,a=void 0===o?navigator.vendor:o;(0,r.objectEach)(i,(function(e){(0,e.test)(n,a)}))}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.platform,n=void 0===t?navigator.platform:t;(0,r.objectEach)(a,(function(e){(0,e.test)(n)}))}s(),u()},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";i.has(e)||i.set(e,new Map);var t=i.get(e);function n(e,n){t.set(e,n)}function r(e){return t.get(e)}function a(e){return t.has(e)}function s(){return(0,o.default)(t.keys())}function u(){return(0,o.default)(t.values())}return{register:n,getItem:r,hasItem:a,getNames:s,getValues:u}},t.collection=void 0;var o=r(n(40));n(3),n(33),n(1),n(2),n(4);var i=new Map;t.collection=i},function(e,t,n){var r=n(744),o=n(555);e.exports=function(e,t){var n=o(e,t,"get");return r(e,n)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(745),o=n(555);e.exports=function(e,t,n){var i=o(e,t,"set");return r(e,i,n),n},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0,t.CUSTOM_SELECTION_TYPE=t.HEADER_TYPE=t.FILL_TYPE=t.CELL_TYPE=t.AREA_TYPE=t.ACTIVE_HEADER_TYPE=void 0;t.ACTIVE_HEADER_TYPE="active-header";t.AREA_TYPE="area";t.CELL_TYPE="cell";t.FILL_TYPE="fill";t.HEADER_TYPE="header";t.CUSTOM_SELECTION_TYPE="custom-selection"},function(e,t,n){var r=n(77),o=n(181),i=n(148),a=n(92),s=n(150),u=n(78),l=n(295),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){"use strict";var r,o=n(29),i=n(109).f,a=n(71),s=n(218),u=n(85),l=n(221),c=n(133),f="".startsWith,h=Math.min,d=l("startsWith");o({target:"String",proto:!0,forced:!!(c||d||(r=i(String.prototype,"startsWith"),!r||r.writable))&&!d},{startsWith:function(e){var t=String(u(this));s(e);var n=a(h(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return f?f.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(29),o=n(320).trim;r({target:"String",proto:!0,forced:n(641)("trim")},{trim:function(){return o(this)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"ArithmeticHelper",(function(){return g})),n.d(t,"coerceComplexToString",(function(){return y})),n.d(t,"coerceToRange",(function(){return E})),n.d(t,"coerceToRangeNumbersOrError",(function(){return T})),n.d(t,"coerceBooleanToNumber",(function(){return C})),n.d(t,"coerceEmptyToValue",(function(){return w})),n.d(t,"coerceScalarToBoolean",(function(){return R})),n.d(t,"coerceScalarToString",(function(){return b})),n.d(t,"zeroIfEmpty",(function(){return O})),n.d(t,"numberCmp",(function(){return S})),n.d(t,"isNumberOverflow",(function(){return N})),n.d(t,"fixNegativeZero",(function(){return A})),n.d(t,"forceNormalizeString",(function(){return F})),n.d(t,"normalizeString",(function(){return U}));n(20),n(34),n(93),n(60),n(61),n(111),n(48),n(1),n(37),n(19),n(25),n(23),n(2),n(8),n(10),n(11),n(3),n(4);var r=n(645),o=n.n(r),i=n(22),a=n(39),s=n(646),u=n(50),l=n(98);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=d(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var v=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/,g=function(){function e(t,n,r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.dateTimeHelper=n,this.numberLiteralsHelper=r,this.lt=function(e,t){return o.compare(e,t)<0},this.leq=function(e,t){return o.compare(e,t)<=0},this.gt=function(e,t){return o.compare(e,t)>0},this.geq=function(e,t){return o.compare(e,t)>=0},this.eq=function(e,t){return 0===o.compare(e,t)},this.neq=function(e,t){return 0!==o.compare(e,t)},this.pow=function(e,t){return Math.pow(Object(u.getRawValue)(e),Object(u.getRawValue)(t))},this.addWithEpsilonRaw=function(e,t){var n=e+t;return Math.abs(n)<o.actualEps*Math.abs(e)?0:n},this.addWithEpsilon=function(e,t){var n=L(e,t);return o.ExtendedNumberFactory(o.addWithEpsilonRaw(Object(u.getRawValue)(e),Object(u.getRawValue)(t)),n)},this.unaryMinus=function(e){return Object(u.cloneNumber)(e,-Object(u.getRawValue)(e))},this.unaryPlus=function(e){return e},this.unaryPercent=function(e){return new u.PercentNumber(Object(u.getRawValue)(e)/100)},this.concat=function(e,t){return e.concat(t)},this.nonstrictadd=function(e,t){return e instanceof i.CellError?e:t instanceof i.CellError?t:"number"==typeof e?"number"==typeof t?o.addWithEpsilonRaw(e,t):e:"number"==typeof t?t:0},this.subtract=function(e,t){var n=L(e,t),r=Object(u.getRawValue)(e),i=r-Object(u.getRawValue)(t);return Math.abs(i)<o.actualEps*Math.abs(r)&&(i=0),o.ExtendedNumberFactory(i,n)},this.divide=function(e,t){var n=Object(u.getRawValue)(e),r=Object(u.getRawValue)(t);if(0===r)return new i.CellError(i.ErrorType.DIV_BY_ZERO);var a=D(e,t);return o.ExtendedNumberFactory(n/r,a)},this.multiply=function(e,t){var n=D(e,t);return o.ExtendedNumberFactory(Object(u.getRawValue)(e)*Object(u.getRawValue)(t),n)},this.manyToExactComplex=function(e){var t,n=[],r=h(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a instanceof i.CellError)return a;if(Object(u.isExtendedNumber)(a)||"string"==typeof a){var s=o.coerceScalarToComplex(a);s instanceof i.CellError||n.push(s)}}}catch(e){r.e(e)}finally{r.f()}return n},this.coerceNumbersExactRanges=function(e){return o.manyToNumbers(e,o.manyToExactNumbers)},this.coerceNumbersCoerceRangesDropNulls=function(e){return o.manyToNumbers(e,o.manyToCoercedNumbersDropNulls)},this.manyToExactNumbers=function(e){var t,n=[],r=h(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o instanceof i.CellError)return o;Object(u.isExtendedNumber)(o)&&n.push(Object(u.getRawValue)(o))}}catch(e){r.e(e)}finally{r.f()}return n},this.manyToOnlyNumbersDropNulls=function(e){var t,n=[],r=h(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o instanceof i.CellError)return o;if(o!==u.EmptyValue){if(!Object(u.isExtendedNumber)(o))return new i.CellError(i.ErrorType.VALUE,a.ErrorMessage.NumberExpected);n.push(Object(u.getRawValue)(o))}}}catch(e){r.e(e)}finally{r.f()}return n},this.manyToCoercedNumbersDropNulls=function(e){var t,n=[],r=h(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;if(a instanceof i.CellError)return a;if(a!==u.EmptyValue){var s=o.coerceScalarToNumberOrError(a);Object(u.isExtendedNumber)(s)&&n.push(Object(u.getRawValue)(s))}}}catch(e){r.e(e)}finally{r.f()}return n},this.collator=Object(s.collatorFromConfig)(t),this.actualEps=t.smartRounding?t.precisionEpsilon:0}var t,n,r;return t=e,(n=[{key:"eqMatcherFunction",value:function(e){var t=this,n=this.buildRegex(e);return function(e){return"string"==typeof e&&n.test(t.normalizeString(e))}}},{key:"neqMatcherFunction",value:function(e){var t=this,n=this.buildRegex(e);return function(e){return!("string"==typeof e&&n.test(t.normalizeString(e)))}}},{key:"searchString",value:function(e,t){var n,r=this.buildRegex(e,!1).exec(t);return null!==(n=null==r?void 0:r.index)&&void 0!==n?n:-1}},{key:"requiresRegex",value:function(e){if(!this.config.useRegularExpressions&&!this.config.useWildcards)return!this.config.matchWholeCell;for(var t=0;t<e.length;t++){var n=e.charAt(t);if(M(n)||this.config.useRegularExpressions&&_(n))return!0}return!1}},{key:"buildRegex",value:function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e=this.normalizeString(e);var r=this.config.useWildcards,o=this.config.useRegularExpressions;if(o)try{RegExp(e)}catch(e){o=!1,r=!1}return t=o?P(e,this.config.caseSensitive):r?I(e,this.config.caseSensitive):x(e,this.config.caseSensitive),this.config.matchWholeCell&&n?RegExp("^("+t+")$"):RegExp(t)}},{key:"normalizeString",value:function(e){return this.config.caseSensitive||(e=e.toLowerCase()),this.config.accentSensitive||(e=U(e,"nfd").replace(/[\u0300-\u036f]/g,"")),e}},{key:"compare",value:function(e,t){if("string"==typeof e||"string"==typeof t){var n="string"==typeof e?this.dateTimeHelper.dateStringToDateNumber(e):e,r="string"==typeof t?this.dateTimeHelper.dateStringToDateNumber(t):t;if(Object(u.isExtendedNumber)(n)&&Object(u.isExtendedNumber)(r))return this.floatCmp(n,r)}return e===u.EmptyValue?e=w(t):t===u.EmptyValue&&(t=w(e)),"string"==typeof e&&"string"==typeof t?this.stringCmp(e,t):"boolean"==typeof e&&"boolean"==typeof t?S(C(e),C(t)):Object(u.isExtendedNumber)(e)&&Object(u.isExtendedNumber)(t)?this.floatCmp(e,t):e===u.EmptyValue&&t===u.EmptyValue?0:S(Object(i.CellValueTypeOrd)(Object(i.getCellValueType)(e)),Object(i.CellValueTypeOrd)(Object(i.getCellValueType)(t)))}},{key:"floatCmp",value:function(e,t){var n=Object(u.getRawValue)(e),r=Object(u.getRawValue)(t),o=1+this.actualEps;return r>=0&&n*o>=r&&n<=r*o||r<=0&&n*o<=r&&n>=r*o?0:n>r?1:-1}},{key:"stringCmp",value:function(e,t){return this.collator.compare(e,t)}},{key:"coerceScalarToNumberOrError",value:function(e){var t;return e instanceof i.CellError?e:null!==(t=this.coerceToMaybeNumber(e))&&void 0!==t?t:new i.CellError(i.ErrorType.VALUE,a.ErrorMessage.NumberCoercion)}},{key:"coerceToMaybeNumber",value:function(e){var t;return null!==(t=this.coerceNonDateScalarToMaybeNumber(e))&&void 0!==t?t:"string"==typeof e?this.dateTimeHelper.dateStringToDateNumber(e):void 0}},{key:"coerceNonDateScalarToMaybeNumber",value:function(e){return e===u.EmptyValue?0:"string"==typeof e?""===e?0:this.numberLiteralsHelper.numericStringToMaybeNumber(e.trim()):Object(u.isExtendedNumber)(e)?e:"boolean"==typeof e?Number(e):void 0}},{key:"coerceComplexExactRanges",value:function(e){var t,n=[],r=h(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;if(o instanceof l.SimpleRangeValue)n.push(o);else if(o!==u.EmptyValue){var a=this.coerceScalarToComplex(o);if(a instanceof i.CellError)return a;n.push(a)}}}catch(e){r.e(e)}finally{r.f()}for(var s=[],c=0,d=n;c<d.length;c++){var p=d[c];if(p instanceof l.SimpleRangeValue){var m=this.manyToExactComplex(p.valuesFromTopLeftCorner());if(m instanceof i.CellError)return m;s.push.apply(s,f(m))}else s.push(p)}return s}},{key:"manyToNumbers",value:function(e,t){var n,r=[],o=h(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a instanceof l.SimpleRangeValue)r.push(a);else{var s=Object(u.getRawValue)(this.coerceScalarToNumberOrError(a));if(s instanceof i.CellError)return s;r.push(s)}}}catch(e){o.e(e)}finally{o.f()}for(var c=[],d=0,p=r;d<p.length;d++){var m=p[d];if(m instanceof l.SimpleRangeValue){var v=t(m.valuesFromTopLeftCorner());if(v instanceof i.CellError)return v;c.push.apply(c,f(v))}else c.push(m)}return c}},{key:"coerceScalarToComplex",value:function(e){return e instanceof i.CellError?e:e===u.EmptyValue?[0,0]:Object(u.isExtendedNumber)(e)?[Object(u.getRawValue)(e),0]:"string"==typeof e?this.coerceStringToComplex(e):new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ComplexNumberExpected)}},{key:"coerceStringToComplex",value:function(e){var t,n,r=v.exec(e);return null===r?new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ComplexNumberExpected):(t=void 0!==r[6]?"-"===r[1]?[0,-1]:[0,1]:this.parseComplexToken(r[1]+r[3],r[5]))instanceof i.CellError||void 0===r[8]?t:(n=void 0!==r[14]?"-"===r[9]?[0,-1]:[0,1]:this.parseComplexToken(r[9]+r[11],r[13]))instanceof i.CellError?n:""!==r[5]||""===r[13]?new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ComplexNumberExpected):"+"===r[8]?[t[0]+n[0],t[1]+n[1]]:[t[0]-n[0],t[1]-n[1]]}},{key:"parseComplexToken",value:function(e,t){var n=Object(u.getRawValue)(this.coerceNonDateScalarToMaybeNumber(e));return void 0===n?new i.CellError(i.ErrorType.NUM,a.ErrorMessage.ComplexNumberExpected):""===t?[n,0]:[0,n]}},{key:"ExtendedNumberFactory",value:function(e,t){var n=t.type,r=t.format;switch(n){case u.NumberType.NUMBER_RAW:return e;case u.NumberType.NUMBER_CURRENCY:return new u.CurrencyNumber(e,null!=r?r:this.config.currencySymbol[0]);case u.NumberType.NUMBER_DATE:return new u.DateNumber(e,r);case u.NumberType.NUMBER_DATETIME:return new u.DateTimeNumber(e,r);case u.NumberType.NUMBER_TIME:return new u.TimeNumber(e,r);case u.NumberType.NUMBER_PERCENT:return new u.PercentNumber(e,r)}}}])&&m(t.prototype,n),r&&m(t,r),e}();function y(e,t){var n=c(e,2),r=n[0],o=n[1];if(!isFinite(r)||!isFinite(o))return new i.CellError(i.ErrorType.NUM,a.ErrorMessage.NaN);if(t=null!=t?t:"i",0===o)return"".concat(r);var s="".concat(-1===o||1===o?"":Math.abs(o)).concat(t);return 0===r?"".concat(o<0?"-":"").concat(s):"".concat(r).concat(o<0?"-":"+").concat(s)}function E(e){return e instanceof l.SimpleRangeValue?e:l.SimpleRangeValue.fromScalar(e)}function T(e){return e instanceof l.SimpleRangeValue&&e.hasOnlyNumbers()||e instanceof i.CellError?e:Object(u.isExtendedNumber)(e)?l.SimpleRangeValue.fromScalar(e):null}function C(e){return Number(e)}function w(e){return"string"==typeof e?"":Object(u.isExtendedNumber)(e)?0:"boolean"!=typeof e&&u.EmptyValue}function R(e){if(e instanceof i.CellError||"boolean"==typeof e)return e;if(e===u.EmptyValue)return!1;if(Object(u.isExtendedNumber)(e))return 0!==Object(u.getRawValue)(e);var t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&(""!==t&&void 0)}function b(e){return e instanceof i.CellError||"string"==typeof e?e:e===u.EmptyValue?"":Object(u.isExtendedNumber)(e)?Object(u.getRawValue)(e).toString():e?"TRUE":"FALSE"}function O(e){return e===u.EmptyValue?0:e}function S(e,t){var n=Object(u.getRawValue)(e),r=Object(u.getRawValue)(t);return n>r?1:n<r?-1:0}function N(e){return isNaN(e)||e===1/0||e===-1/0}function A(e){return 0===e?0:e}function M(e){return["*","?"].includes(e)}var k=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function _(e){return k.includes(e)}function I(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if("~"===o){if(r==e.length-1){n+="~";continue}var i=e.charAt(r+1);M(i)||_(i)?(n+="\\"+i,r++):(n+=i,r++)}else M(o)?n+="."+o:_(o)?n+="\\"+o:n+=t?o:o.toLowerCase()}return n}function x(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);M(o)||_(o)?n+="\\"+o:n+=t?o:o.toLowerCase()}return n}function P(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);M(o)||_(o)?n+=o:n+=t?o:o.toLowerCase()}return n}function L(e,t){var n=Object(u.getTypeFormatOfExtendedNumber)(e),r=n.type,o=n.format,i=Object(u.getTypeFormatOfExtendedNumber)(t),a=i.type,s=i.format;if(r===u.NumberType.NUMBER_RAW)return{type:a,format:s};if(a===u.NumberType.NUMBER_RAW)return{type:r,format:o};if(!(r!==u.NumberType.NUMBER_DATETIME&&r!==u.NumberType.NUMBER_DATE||a!==u.NumberType.NUMBER_DATETIME&&a!==u.NumberType.NUMBER_DATE))return{type:u.NumberType.NUMBER_RAW};if(r===u.NumberType.NUMBER_TIME){if(a===u.NumberType.NUMBER_DATE)return{type:u.NumberType.NUMBER_DATETIME,format:s+" "+o};if(a===u.NumberType.NUMBER_DATETIME)return{type:u.NumberType.NUMBER_DATETIME,format:s}}if(a===u.NumberType.NUMBER_TIME){if(r===u.NumberType.NUMBER_DATE)return{type:u.NumberType.NUMBER_DATETIME,format:o+" "+s};if(r===u.NumberType.NUMBER_DATETIME)return{type:u.NumberType.NUMBER_DATETIME,format:o}}return{type:r,format:o}}function D(e,t){var n=Object(u.getTypeFormatOfExtendedNumber)(e),r=n.type,o=n.format,i=Object(u.getTypeFormatOfExtendedNumber)(t),a=i.type,s=i.format;return r===u.NumberType.NUMBER_PERCENT&&(r=u.NumberType.NUMBER_RAW,o=void 0),a===u.NumberType.NUMBER_PERCENT&&(a=u.NumberType.NUMBER_RAW,s=void 0),r===u.NumberType.NUMBER_RAW?{type:a,format:s}:a===u.NumberType.NUMBER_RAW?{type:r,format:o}:{type:u.NumberType.NUMBER_RAW}}function F(e){return U(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function U(e,t){return"function"==typeof e.normalize?e.normalize(t.toUpperCase()):o.a[t](e)}},function(e,t,n){"use strict";t.__esModule=!0,t.CLONE_TYPES=t.CLONE_BOTTOM_LEFT_CORNER=t.CLONE_TOP_LEFT_CORNER=t.CLONE_LEFT=t.CLONE_BOTTOM=t.CLONE_TOP=void 0;t.CLONE_TOP="top";t.CLONE_BOTTOM="bottom";t.CLONE_LEFT="left";t.CLONE_TOP_LEFT_CORNER="top_left_corner";t.CLONE_BOTTOM_LEFT_CORNER="bottom_left_corner";var r=["top","bottom","left","top_left_corner","bottom_left_corner"];t.CLONE_TYPES=r},function(e,t,n){var r=n(753);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n(3),n(1),n(2),n(9),n(4),n(17);var r=n(0),o=n(18);t.__esModule=!0,t.predefinedItems=function(){var e={};return(0,a.objectEach)(b,(function(t,n){e[n]=t()})),e},t.addItem=function(e,t){-1===R.indexOf(e)&&(b[e]=t)},t.ITEMS=t.UNDO=t.NO_ITEMS=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,n(30);var i=r(n(52)),a=n(15),s=w(n(850));t.ALIGNMENT=s.KEY;var u=w(n(851));t.CLEAR_COLUMN=u.KEY;var l=w(n(852));t.COLUMN_LEFT=l.KEY;var c=w(n(853));t.COLUMN_RIGHT=c.KEY;var f=w(n(854));t.READ_ONLY=f.KEY;var h=w(n(855));t.REDO=h.KEY;var d=w(n(856));t.REMOVE_COLUMN=d.KEY;var p=w(n(857));t.REMOVE_ROW=p.KEY;var m=w(n(858));t.ROW_ABOVE=m.KEY;var v=w(n(859));t.ROW_BELOW=v.KEY;var g=w(n(287));t.SEPARATOR=g.KEY;var y=w(n(860));t.NO_ITEMS=y.KEY;var E,T=w(n(861));function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}t.UNDO=T.KEY;var R=[m.KEY,v.KEY,l.KEY,c.KEY,u.KEY,p.KEY,d.KEY,T.KEY,h.KEY,f.KEY,s.KEY,g.KEY,y.KEY];t.ITEMS=R;var b=(E={},(0,i.default)(E,g.KEY,g.default),(0,i.default)(E,y.KEY,y.default),(0,i.default)(E,m.KEY,m.default),(0,i.default)(E,v.KEY,v.default),(0,i.default)(E,l.KEY,l.default),(0,i.default)(E,c.KEY,c.default),(0,i.default)(E,u.KEY,u.default),(0,i.default)(E,p.KEY,p.default),(0,i.default)(E,d.KEY,d.default),(0,i.default)(E,T.KEY,T.default),(0,i.default)(E,h.KEY,h.default),(0,i.default)(E,f.KEY,f.default),(0,i.default)(E,s.KEY,s.default),E)},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r,o,i,a=n(297),s=n(56),u=n(62),l=n(99),c=n(78),f=n(213),h=n(182),d=n(151),p=s.WeakMap;if(a||f.state){var m=f.state||(f.state=new p),v=m.get,g=m.has,y=m.set;r=function(e,t){if(g.call(m,e))throw new TypeError("Object already initialized");return t.facade=e,y.call(m,e,t),t},o=function(e){return v.call(m,e)||{}},i=function(e){return g.call(m,e)}}else{var E=h("state");d[E]=!0,r=function(e,t){if(c(e,E))throw new TypeError("Object already initialized");return t.facade=e,l(e,E,t),t},o=function(e){return c(e,E)?e[E]:{}},i=function(e){return c(e,E)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){"use strict";n.r(t);var r=n(335);n.d(t,"EmptyStatistics",(function(){return r.EmptyStatistics}));var o=n(243);n.d(t,"Statistics",(function(){return o.Statistics}));var i=n(244);n.d(t,"StatType",(function(){return i.StatType}))},function(e,t,n){"use strict";var r=n(29),o=n(156),i=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),i.call(this)}})},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.requestAnimationFrame=function(e){return c.call(window,e)},t.isClassListSupported=function(){return!!document.documentElement.classList},t.isTextContentSupported=function(){return!!document.createTextNode("test").textContent},t.isGetComputedStyleSupported=function(){return!!window.getComputedStyle},t.cancelAnimationFrame=function(e){f.call(window,e)},t.isTouchSupported=function(){return"ontouchstart"in window},t.hasCaptionProblem=function(){void 0===i&&function(){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),i=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}();return i},t.getComparisonFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a)return a;a="object"===("undefined"==typeof Intl?"undefined":(0,o.default)(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return"".concat(e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1};return a},t.isPassiveEventSupported=function(){if(void 0!==s)return s;try{var e={get passive(){s=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){s=!1}return s};var o=r(n(18));n(64);for(var i,a,s,u=0,l=["ms","moz","webkit","o"],c=window.requestAnimationFrame,f=window.cancelAnimationFrame,h=0;h<l.length&&!c;++h)c=window["".concat(l[h],"RequestAnimationFrame")],f=window["".concat(l[h],"CancelAnimationFrame")]||window["".concat(l[h],"CancelRequestAnimationFrame")];c||(c=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-u)),r=window.setTimeout((function(){e(t+n)}),n);return u=t+n,r}),f||(f=function(e){clearTimeout(e)})},function(e,t,n){"use strict";n(70),t.__esModule=!0;var r=n(581);t.registerRootComparator=r.registerRootComparator,t.getRootComparator=r.getRootComparator,t.getCompareFunctionFactory=r.getCompareFunctionFactory;var o=n(840);t.FIRST_AFTER_SECOND=o.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=o.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=o.DO_NOT_SWAP,t.sort=o.sort},function(e,t,n){var r=n(134);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(159),o=n(149),i=n(86),a=n(71),s=n(225),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,h=7==e,d=5==e||f;return function(p,m,v,g){for(var y,E,T=i(p),C=o(T),w=r(m,v,3),R=a(C.length),b=0,O=g||s,S=t?O(p,R):n||h?O(p,0):void 0;R>b;b++)if((d||b in C)&&(E=w(y=C[b],b,T),e))if(t)S[b]=E;else if(E)switch(e){case 3:return!0;case 5:return y;case 6:return b;case 2:u.call(S,y)}else switch(e){case 4:return!1;case 7:u.call(S,y)}return f?-1:l||c?c:S}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterOut:l(7)}},function(e,t,n){"use strict";n.r(t),n.d(t,"GAstVisitor",(function(){return o}));var r=n(53),o=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case r.NonTerminal:return this.visitNonTerminal(t);case r.Flat:return this.visitFlat(t);case r.Option:return this.visitOption(t);case r.RepetitionMandatory:return this.visitRepetitionMandatory(t);case r.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case r.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case r.Repetition:return this.visitRepetition(t);case r.Alternation:return this.visitAlternation(t);case r.Terminal:return this.visitTerminal(t);case r.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultParserErrorProvider",(function(){return u})),n.d(t,"defaultGrammarResolverErrorProvider",(function(){return l})),n.d(t,"defaultGrammarValidatorErrorProvider",(function(){return c}));var r=n(89),o=n(42),i=n(53),a=n(165),s=n(194),u={buildMismatchTokenMessage:function(e){var t=e.expected,n=e.actual;e.previous,e.ruleName;return"Expecting "+(Object(r.hasTokenLabel)(t)?"--\x3e "+Object(r.tokenLabel)(t)+" <--":"token of type --\x3e "+t.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,n=e.actual,i=(e.previous,e.customUserDescription),a=(e.ruleName,"\nbut found: '"+Object(o.first)(n).image+"'");if(i)return"Expecting: "+i+a;var s=Object(o.reduce)(t,(function(e,t){return e.concat(t)}),[]),u=Object(o.map)(s,(function(e){return"["+Object(o.map)(e,(function(e){return Object(r.tokenLabel)(e)})).join(", ")+"]"}));return"Expecting: "+("one of these possible Token sequences:\n"+Object(o.map)(u,(function(e,t){return" "+(t+1)+". "+e})).join("\n"))+a},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,n=e.actual,i=e.customUserDescription,a=(e.ruleName,"\nbut found: '"+Object(o.first)(n).image+"'");return i?"Expecting: "+i+a:"Expecting: "+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+Object(o.map)(t,(function(e){return"["+Object(o.map)(e,(function(e){return Object(r.tokenLabel)(e)})).join(",")+"]"})).join(" ,")+">")+a}};Object.freeze(u);var l={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},c={buildDuplicateFoundError:function(e,t){var n,r=e.name,s=Object(o.first)(t),u=s.idx,l=Object(a.getProductionDslName)(s),c=(n=s)instanceof i.Terminal?n.terminalType.name:n instanceof i.NonTerminal?n.nonTerminalName:"",f="->"+l+(u>0?u:"")+"<- "+(c?"with argument: ->"+c+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return f=(f=f.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildInvalidNestedRuleNameError:function(e,t){return"Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+s.validNestedRuleName.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(e,t){return"Duplicate nested rule name: ->"+Object(o.first)(t).name+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule."},buildNamespaceConflictError:function(e){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+e.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(e){var t=Object(o.map)(e.prefixPath,(function(e){return Object(r.tokenLabel)(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return"Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(e){var t=Object(o.map)(e.prefixPath,(function(e){return Object(r.tokenLabel)(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,i="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return i+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(e){var t=Object(a.getProductionDslName)(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),"The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(e){return"Invalid Grammar Token name: ->"+e.tokenType.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(e){return"Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+"> in <OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(e){return"An Alternation cannot have more than 256 alternatives:\n<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has "+(e.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(e){var t=e.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(t+" --\x3e "+o.map(e.leftRecursionPath,(function(e){return e.name})).concat([t]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(e){return"Invalid grammar rule name: ->"+e.topLevelRule.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(e){return"Duplicate definition, rule: ->"+(e.topLevelRule instanceof i.Rule?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}}},function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixSize",(function(){return d})),n.d(t,"matrixSizeForTranspose",(function(){return p})),n.d(t,"matrixSizeForMultiplication",(function(){return m})),n.d(t,"matrixSizeForPoolFunction",(function(){return v})),n.d(t,"checkMatrixSize",(function(){return g})),n.d(t,"NotComputedMatrix",(function(){return y})),n.d(t,"Matrix",(function(){return E})),n.d(t,"ErroredMatrix",(function(){return T}));n(72),n(55),n(20),n(140),n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(23),n(19),n(25);var r=n(79),o=n(22),i=n(39),a=n(69);function s(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function e(t,n){if(h(this,e),this.width=t,this.height=n,t<=0||n<=0)throw Error("Incorrect matrix size")};function p(e){return new d(e.height,e.width)}function m(e,t){return new d(t.width,e.height)}function v(e,t,n){return new d(1+(e.width-t)/n,1+(e.height-t)/n)}function g(e,t){if(e.type!==a.AstNodeType.FUNCTION_CALL){if(e.type===a.AstNodeType.CELL_RANGE){var n=r.AbsoluteCellRange.fromCellRange(e,t);return{width:n.width(),height:n.height()}}return e.type===a.AstNodeType.NUMBER||e.type===a.AstNodeType.CELL_REFERENCE?{width:1,height:1}:new o.CellError(o.ErrorType.VALUE)}switch(e.procedureName){case"MMULT":if(2!==e.args.length)return new o.CellError(o.ErrorType.NA,i.ErrorMessage.WrongArgNumber);if(e.args.some((function(e){return e.type===a.AstNodeType.EMPTY})))return new o.CellError(o.ErrorType.NUM,i.ErrorMessage.EmptyArg);var s=g(e.args[0],t),u=g(e.args[1],t);return s instanceof o.CellError?s:u instanceof o.CellError?u:s.width!==u.height?new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.MatrixDimensions):m(s,u);case"MEDIANPOOL":case"MAXPOOL":if(e.args.length<2||e.args.length>3)return new o.CellError(o.ErrorType.NA,i.ErrorMessage.WrongArgNumber);if(e.args.some((function(e){return e.type===a.AstNodeType.EMPTY})))return new o.CellError(o.ErrorType.NUM,i.ErrorMessage.EmptyArg);var l=g(e.args[0],t),c=e.args[1];if(l instanceof o.CellError)return l;if(c.type!==a.AstNodeType.NUMBER)return new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.NumberExpected);var f=c.value,h=c.value;if(3===e.args.length){var d=e.args[2];if(d.type!==a.AstNodeType.NUMBER)return new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.MatrixParams);h=d.value}return f>l.width||f>l.height||h>f||(l.width-f)%h!=0||(l.height-f)%h!=0?new o.CellError(o.ErrorType.VALUE):v(l,f,h);case"TRANSPOSE":if(1!==e.args.length)return new o.CellError(o.ErrorType.NA,i.ErrorMessage.WrongArgNumber);if(e.args[0].type===a.AstNodeType.EMPTY)return new o.CellError(o.ErrorType.NUM,i.ErrorMessage.EmptyArg);var y=g(e.args[0],t);return y instanceof o.CellError?y:p(y);default:return new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.MatrixFunction)}}var y=function(){function e(t){h(this,e),this.size=t}return f(e,[{key:"width",value:function(){return this.size.width}},{key:"height",value:function(){return this.size.height}},{key:"get",value:function(e,t){throw Error("Matrix not computed yet.")}}]),e}(),E=function(){function e(t){h(this,e),this.size=new d(t.length>0?t[0].length:0,t.length),this.matrix=t}return f(e,[{key:"addRows",value:function(e,t){var n;(n=this.matrix).splice.apply(n,[e,0].concat(s(this.zeroArrays(t,this.width())))),this.size.height+=t}},{key:"addColumns",value:function(e,t){for(var n=0;n<this.height();n++){var r;(r=this.matrix[n]).splice.apply(r,[e,0].concat(s(new Array(t).fill(0))))}this.size.width+=t}},{key:"removeRows",value:function(e,t){if(this.outOfBound(0,e)||this.outOfBound(0,t))throw Error("Matrix index out of bound");var n=t-e+1;this.matrix.splice(e,n),this.size.height-=n}},{key:"removeColumns",value:function(e,t){if(this.outOfBound(e,0)||this.outOfBound(t,0))throw Error("Matrix index out of bound");var n,r=t-e+1,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(this.matrix);try{for(o.s();!(n=o.n()).done;){n.value.splice(e,r)}}catch(e){o.e(e)}finally{o.f()}this.size.width-=r}},{key:"zeroArrays",value:function(e,t){for(var n=[],r=0;r<e;++r)n.push(new Array(t).fill(0));return n}},{key:"get",value:function(e,t){if(this.outOfBound(e,t))throw Error("Matrix index out of bound");return this.matrix[t][e]}},{key:"set",value:function(e,t,n){if(this.outOfBound(e,t))throw Error("Matrix index out of bound");this.matrix[t][e]=n}},{key:"width",value:function(){return this.size.width}},{key:"height",value:function(){return this.size.height}},{key:"raw",value:function(){return this.matrix}},{key:"generateValues",value:regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.size.height)){e.next=12;break}r=0;case 3:if(!(r<this.size.width)){e.next=9;break}return e.next=6,[this.matrix[n][r],Object(o.simpleCellAddress)(t.sheet,t.col+r,t.row+n)];case 6:++r,e.next=3;break;case 9:++n,e.next=1;break;case 12:case"end":return e.stop()}}),e,this)}))},{key:"outOfBound",value:function(e,t){return e<0||t<0||t>this.size.height-1||e>this.size.width-1}}]),e}(),T=function(){function e(t,n){h(this,e),this.error=t,this.size=n}return f(e,[{key:"get",value:function(e,t){return this.error}},{key:"width",value:function(){return this.size.width}},{key:"height",value:function(){return this.size.height}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Transformer",(function(){return l}));n(83),n(41),n(19),n(1),n(25),n(23),n(2),n(8),n(10),n(11),n(3),n(4);var r=n(22),o=n(69);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,s;return t=e,(n=[{key:"performEagerTransformations",value:function(e,t){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}(e.matrixFormulaNodes());try{for(r.s();!(n=r.n()).done;){var o=n.value,s=i(this.transformSingleAst(o.getFormula(),o.getAddress()),2),u=s[0],l=s[1],c=t.rememberNewAst(u);o.setFormula(c),o.setAddress(l)}}catch(e){r.e(e)}finally{r.f()}}},{key:"transformSingleAst",value:function(e,t){return[this.transformAst(e,t),this.fixNodeAddress(t)]}},{key:"transformAst",value:function(e,t){var n=this;switch(e.type){case o.AstNodeType.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case o.AstNodeType.CELL_RANGE:return this.transformCellRangeAst(e,t);case o.AstNodeType.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case o.AstNodeType.ROW_RANGE:return this.transformRowRangeAst(e,t);case o.AstNodeType.EMPTY:case o.AstNodeType.ERROR:case o.AstNodeType.NUMBER:case o.AstNodeType.NAMED_EXPRESSION:case o.AstNodeType.ERROR_WITH_RAW_INPUT:case o.AstNodeType.STRING:return e;case o.AstNodeType.PERCENT_OP:case o.AstNodeType.MINUS_UNARY_OP:case o.AstNodeType.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{type:e.type,value:this.transformAst(e.value,t)});case o.AstNodeType.FUNCTION_CALL:return Object.assign(Object.assign({},e),{type:e.type,procedureName:e.procedureName,args:e.args.map((function(e){return n.transformAst(e,t)}))});case o.AstNodeType.PARENTHESIS:return Object.assign(Object.assign({},e),{type:e.type,expression:this.transformAst(e.expression,t)});default:return Object.assign(Object.assign({},e),{type:e.type,left:this.transformAst(e.left,t),right:this.transformAst(e.right,t)})}}},{key:"transformCellReferenceAst",value:function(e,t){var n=this.transformCellAddress(e.reference,t);return n instanceof o.CellAddress?Object.assign(Object.assign({},e),{reference:n}):n===r.ErrorType.REF?Object(o.buildCellErrorAst)(new r.CellError(r.ErrorType.REF)):e}},{key:"transformCellRangeAst",value:function(e,t){var n=this.transformCellRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===r.ErrorType.REF?Object(o.buildCellErrorAst)(new r.CellError(r.ErrorType.REF)):e}},{key:"transformColumnRangeAst",value:function(e,t){var n=this.transformColumnRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===r.ErrorType.REF?Object(o.buildCellErrorAst)(new r.CellError(r.ErrorType.REF)):e}},{key:"transformRowRangeAst",value:function(e,t){var n=this.transformRowRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===r.ErrorType.REF?Object(o.buildCellErrorAst)(new r.CellError(r.ErrorType.REF)):e}}])&&u(t.prototype,n),s&&u(t,s),e}()},function(e,t,n){"use strict";var r=n(29),o=n(124).find,i=n(161),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(e,t,n){var r=n(29),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(e){return(e>0?i:o)(e)}})},function(e,t,n){"use strict";t.__esModule=!0,t.TextEditor=t.EDITOR_TYPE=void 0;var r=n(770);t.EDITOR_TYPE=r.EDITOR_TYPE,t.TextEditor=r.TextEditor},function(e,t,n){"use strict";t.__esModule=!0,t.textRenderer=t.RENDERER_TYPE=void 0;var r=n(773);t.RENDERER_TYPE=r.RENDERER_TYPE,t.textRenderer=r.textRenderer},function(e,t){e.exports=!1},function(e,t,n){var r=n(300),o=n(56),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r,o=n(67),i=n(605),a=n(215),s=n(151),u=n(305),l=n(211),c=n(182),f=c("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=r?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=l("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=o(e),n=new h,h.prototype=null,n[f]=e):n=p(),void 0===t?n:i(n,t)}},function(e,t,n){"use strict";var r=n(46);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"LexerDefinitionErrorType",(function(){return r})),n.d(t,"Lexer",(function(){return c}));var r,o=n(324),i=n(42),a=n(164),s=n(238),u=n(237);!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(r||(r={}));var l={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:s.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(l);var c=function(){function e(e,t){var n=this;if(void 0===t&&(t=l),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i.merge)(l,t);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,s=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===l.lineTerminatorsPattern)n.config.lineTerminatorsPattern=o.LineTerminatorOptimizedTester;else if(n.config.lineTerminatorCharacters===l.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i.isArray)(e)?((r={modes:{}}).modes[o.DEFAULT_MODE]=Object(i.cloneArr)(e),r[o.DEFAULT_MODE]=o.DEFAULT_MODE):(s=!1,r=Object(i.cloneObj)(e))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(Object(o.performRuntimeChecks)(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(Object(o.performWarningRuntimeChecks)(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i.forEach)(r.modes,(function(e,t){r.modes[t]=Object(i.reject)(e,(function(e){return Object(i.isUndefined)(e)}))}));var c=Object(i.keys)(r.modes);if(Object(i.forEach)(r.modes,(function(e,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var s;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(Object(o.validatePatterns)(e,c))})),Object(i.isEmpty)(n.lexerDefinitionErrors))&&(Object(a.augmentTokenTypes)(e),n.TRACE_INIT("analyzeTokenTypes",(function(){s=Object(o.analyzeTokenTypes)(e,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=s.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=s.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i.merge)(n.emptyGroups,s.emptyGroups),n.hasCustom=s.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=s.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i.isEmpty)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var f=Object(i.map)(n.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+f)}Object(i.forEach)(n.lexerDefinitionWarning,(function(e){Object(i.PRINT_WARNING)(e.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(o.SUPPORT_STICKY?(n.chopInput=i.IDENTITY,n.match=n.matchWithTest):(n.updateLastIndex=i.NOOP,n.match=n.matchWithExec),s&&(n.handleModes=i.NOOP),!1===n.trackStartLines&&(n.computeNewColumn=i.IDENTITY),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i.NOOP),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var e=Object(i.reduce)(n.canModeBeOptimized,(function(e,t,n){return!1===t&&e.push(n),e}),[]);if(t.ensureOptimizations&&!Object(i.isEmpty)(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){Object(u.clearRegExpParserCache)()})),n.TRACE_INIT("toFastProperties",(function(){Object(i.toFastProperties)(n)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!Object(i.isEmpty)(this.lexerDefinitionErrors)){var n=Object(i.map)(this.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var n,r,a,s,u,l,c,f,h,d,p,m,v,g,y=this,E=e,T=E.length,C=0,w=0,R=this.hasCustom?0:Math.floor(e.length/10),b=new Array(R),O=[],S=this.trackStartLines?1:void 0,N=this.trackStartLines?1:void 0,A=Object(o.cloneEmptyGroups)(this.emptyGroups),M=this.trackStartLines,k=this.config.lineTerminatorsPattern,_=0,I=[],x=[],P=[],L=[];Object.freeze(L);var D=void 0;function F(){return I}function U(e){var t=Object(o.charCodeToOptimizedIndex)(e),n=x[t];return void 0===n?L:n}var j,H=function(e){if(1===P.length&&void 0===e.tokenType.PUSH_MODE){var t=y.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);O.push({offset:e.startOffset,line:void 0!==e.startLine?e.startLine:void 0,column:void 0!==e.startColumn?e.startColumn:void 0,length:e.image.length,message:t})}else{P.pop();var n=Object(i.last)(P);I=y.patternIdxToConfig[n],x=y.charCodeToPatternIdxToConfig[n],_=I.length;var r=y.canModeBeOptimized[n]&&!1===y.config.safeMode;D=x&&r?U:F}};function V(e){P.push(e),x=this.charCodeToPatternIdxToConfig[e],I=this.patternIdxToConfig[e],_=I.length,_=I.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;D=x&&t?U:F}for(V.call(this,t);C<T;){u=null;var B=E.charCodeAt(C),W=D(B),Y=W.length;for(n=0;n<Y;n++){var G=(j=W[n]).pattern;if(l=null,!1!==(te=j.short)?B===te&&(u=G):!0===j.isCustom?null!==(g=G.exec(E,C,b,A))?(u=g[0],void 0!==g.payload&&(l=g.payload)):u=null:(this.updateLastIndex(G,C),u=this.match(G,e,C)),null!==u){if(void 0!==(s=j.longerAlt)){var z=I[s],K=z.pattern;c=null,!0===z.isCustom?null!==(g=K.exec(E,C,b,A))?(a=g[0],void 0!==g.payload&&(c=g.payload)):a=null:(this.updateLastIndex(K,C),a=this.match(K,e,C)),a&&a.length>u.length&&(u=a,l=c,j=z)}break}}if(null!==u){if(f=u.length,void 0!==(h=j.group)&&(d=j.tokenTypeIdx,p=this.createTokenInstance(u,C,d,j.tokenType,S,N,f),this.handlePayload(p,l),!1===h?w=this.addToken(b,w,p):A[h].push(p)),e=this.chopInput(e,f),C+=f,N=this.computeNewColumn(N,f),!0===M&&!0===j.canLineTerminator){var X=0,q=void 0,Q=void 0;k.lastIndex=0;do{!0===(q=k.test(u))&&(Q=k.lastIndex-1,X++)}while(!0===q);0!==X&&(S+=X,N=f-Q,this.updateTokenEndLineColumnLocation(p,h,Q,X,S,N,f))}this.handleModes(j,H,V,p)}else{for(var $=C,Z=S,J=N,ee=!1;!ee&&C<T;)for(E.charCodeAt(C),e=this.chopInput(e,1),C++,r=0;r<_;r++){var te,ne=I[r];G=ne.pattern;if(!1!==(te=ne.short)?E.charCodeAt(C)===te&&(ee=!0):!0===ne.isCustom?ee=null!==G.exec(E,C,b,A):(this.updateLastIndex(G,C),ee=null!==G.exec(e)),!0===ee)break}m=C-$,v=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(E,$,m,Z,J),O.push({offset:$,line:Z,column:J,length:m,message:v})}}return this.hasCustom||(b.length=w),{tokens:b,groups:A,errors:O}},e.prototype.handleModes=function(e,t,n,r){if(!0===e.pop){var o=e.push;t(r),void 0!==o&&n.call(this,o)}else void 0!==e.push&&n.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,n,r,o,i,a){var s,u;void 0!==t&&(u=(s=n===a-1)?-1:0,1===r&&!0===s||(e.endLine=o+u,e.endColumn=i-1-u))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}},e.prototype.createStartOnlyToken=function(e,t,n,r,o,i){return{image:e,startOffset:t,startLine:o,startColumn:i,tokenTypeIdx:n,tokenType:r}},e.prototype.createFullToken=function(e,t,n,r,o,i,a){return{image:e,startOffset:t,endOffset:t+a-1,startLine:o,endLine:o,startColumn:i,endColumn:i+a-1,tokenTypeIdx:n,tokenType:r}},e.prototype.addToken=function(e,t,n){return 666},e.prototype.addTokenUsingPush=function(e,t,n){return e.push(n),t},e.prototype.addTokenUsingMemberAccess=function(e,t,n){return e[t]=n,++t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){null!==t&&(e.payload=t)},e.prototype.match=function(e,t,n){return null},e.prototype.matchWithTest=function(e,t,n){return!0===e.test(t)?t.substring(n,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var n=e.exec(t);return null!==n?n[0]:n},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+e+">");var r=Object(i.timer)(t),o=r.time,a=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(n+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,a}return t()},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"AddressDependency",(function(){return s})),n.d(t,"CellRangeDependency",(function(){return u})),n.d(t,"ColumnRangeDependency",(function(){return l})),n.d(t,"RowRangeDependency",(function(){return c})),n.d(t,"NamedExpressionDependency",(function(){return f}));n(25);var r=n(79);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var s=function(){function e(t){o(this,e),this.dependency=t}return a(e,[{key:"absolutize",value:function(e){return this.dependency.toSimpleCellAddress(e)}}]),e}(),u=function(){function e(t,n){o(this,e),this.start=t,this.end=n}return a(e,[{key:"absolutize",value:function(e){return new r.AbsoluteCellRange(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}]),e}(),l=function(){function e(t,n){o(this,e),this.start=t,this.end=n}return a(e,[{key:"absolutize",value:function(e){var t=this.start.toSimpleColumnAddress(e),n=this.end.toSimpleColumnAddress(e);return new r.AbsoluteColumnRange(t.sheet,t.col,n.col)}}]),e}(),c=function(){function e(t,n){o(this,e),this.start=t,this.end=n}return a(e,[{key:"absolutize",value:function(e){var t=this.start.toSimpleRowAddress(e),n=this.end.toSimpleRowAddress(e);return new r.AbsoluteRowRange(t.sheet,t.row,n.row)}}]),e}(),f=function(){function e(t){o(this,e),this.name=t}return a(e,[{key:"absolutize",value:function(e){return this}}]),e}()},function(e,t,n){var r=n(29),o=n(634),i=n(161);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(e,t,n){"use strict";n.r(t),n.d(t,"CellContent",(function(){return r})),n.d(t,"isFormula",(function(){return p})),n.d(t,"isBoolean",(function(){return m})),n.d(t,"isMatrix",(function(){return v})),n.d(t,"isError",(function(){return g})),n.d(t,"CellContentParser",(function(){return y}));n(110),n(258),n(19),n(111),n(1),n(25),n(23),n(2),n(8),n(10),n(11),n(3),n(4);var r,o=n(22),i=n(36),a=n(112),s=n(50);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function p(e){return e.startsWith("=")}function m(e){var t=e.toLowerCase();return"true"===t||"false"===t}function v(e){return"string"==typeof e&&(e.length>1&&e.startsWith("{")&&e.endsWith("}"))}function g(e,t){var n=e.toUpperCase();return/#[A-Za-z0-9\/]+[?!]?/.test(n)&&Object.prototype.hasOwnProperty.call(t,n)}!function(e){e.Number=function e(t){d(this,e),this.value=t,this.value=Object(s.cloneNumber)(this.value,Object(a.fixNegativeZero)(Object(s.getRawValue)(this.value)))};e.String=function e(t){d(this,e),this.value=t};e.Boolean=function e(t){d(this,e),this.value=t};var t=function(){function e(){d(this,e)}return h(e,null,[{key:"getSingletonInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();e.Empty=t;e.Formula=function e(t){d(this,e),this.formula=t};var n=function(){function e(t){d(this,e),this.formula=t}return h(e,[{key:"formulaWithBraces",value:function(){return"{"+this.formula+"}"}}]),e}();e.MatrixFormula=n;e.Error=function e(t){d(this,e),this.value=new o.CellError(t)}}(r||(r={}));var y=function(){function e(t,n,r){d(this,e),this.config=t,this.dateHelper=n,this.numberLiteralsHelper=r}return h(e,[{key:"currencyMatcher",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(this.config.currencySymbol);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(e.startsWith(r))return[r,e.slice(r.length)];if(e.endsWith(r))return[r,e.slice(0,e.length-r.length)]}}catch(e){n.e(e)}finally{n.f()}}},{key:"parse",value:function(e){if(null==e)return r.Empty.getSingletonInstance();if("number"==typeof e)return Object(a.isNumberOverflow)(e)?new r.Error(o.ErrorType.NUM):new r.Number(e);if("boolean"==typeof e)return new r.Boolean(e);if(e instanceof Date)return new r.Number(new s.DateNumber(this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}),"Date()"));if("string"==typeof e){if(m(e))return new r.Boolean("true"===e.toLowerCase());if(v(e))return new r.MatrixFormula(e.substr(1,e.length-2));if(p(e))return new r.Formula(e);if(g(e,this.config.errorMapping))return new r.Error(this.config.errorMapping[e.toUpperCase()]);var t,n=e.trim(),l=0;if(n.endsWith("%"))l=1,n=n.slice(0,n.length-1);else{var c=this.currencyMatcher(n);if(void 0!==c){l=2;var f=u(c,2);t=f[0],n=f[1]}}var h,d=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==d)return h=1===l?new s.PercentNumber(d/100):2===l?new s.CurrencyNumber(d,t):d,new r.Number(h);var y=this.dateHelper.dateStringToDateNumber(n);return void 0!==y?new r.Number(y):new r.String(e.startsWith("'")?e.slice(1):e)}throw new i.UnableToParseError(e)}}]),e}()},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0,n(23),n(2),n(37),n(27);var o=r(n(40)),i=r(n(31)),a=r(n(5)),s=r(n(6)),u=n(21),l=n(75),c=r(n(171)),f=r(n(530)),h=r(n(531)),d=n(534),p=r(n(710)),m=r(n(711)),v=n(537),g=n(113),y=function(){function e(t,n){var r=this;(0,a.default)(this,e),this.isMaster=!t.cloneOverlay,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,this.hasTableHeight=!0,this.hasTableWidth=!0,this.isTableVisible=!1,(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.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;var o=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return r._modifyRowHeaderWidth(o)},this.rowUtils=new m.default(this.wot),this.columnUtils=new p.default(this.wot),this.tableRenderer=new d.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wot.wtSettings.settings.cellRenderer})}return(0,s.default)(e,[{key:"is",value:function(e){return(0,v.isOverlayTypeOf)(this.wot.cloneOverlay,e)}},{key:"fixTableDomTree",value:function(){var e=this.wot.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.wot.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length&&this.THEAD.appendChild(e.createElement("TR"))}},{key:"createSpreader",value:function(e){var t,n=e.parentNode;return n&&n.nodeType===Node.ELEMENT_NODE&&(0,u.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).className="wtSpreader",n&&n.insertBefore(t,e),t.appendChild(e)),t.style.position="relative",t}},{key:"createHider",value:function(e){var t,n=e.parentNode;return n&&n.nodeType===Node.ELEMENT_NODE&&(0,u.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).className="wtHider",n&&n.insertBefore(t,e),t.appendChild(e)),t}},{key:"createHolder",value:function(e){var t,n=e.parentNode;return n&&n.nodeType===Node.ELEMENT_NODE&&(0,u.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).style.position="relative",t.className="wtHolder",n&&n.insertBefore(t,e),this.isMaster&&(t.parentNode.className+="ht_master handsontable"),t.appendChild(e)),t}},{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot,n=t.wtOverlays,r=t.wtViewport,o=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),s=a.length,l=t.getSetting("columnHeaders"),c=l.length,d=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,u.offset)(this.holder),p=r.createRenderCalculators(p),s&&!t.getSetting("fixedColumnsLeft"))){var m=n.leftOverlay.getScrollPosition(),v=this.correctHeaderWidth;this.correctHeaderWidth=m>0,v!==this.correctHeaderWidth&&(p=!1)}if(this.isMaster&&(d=n.prepareOverlays()),p)this.isMaster&&r.createVisibleCalculators(),n&&n.refresh(!0);else{this.isMaster?this.tableOffset=(0,u.offset)(this.TABLE):this.tableOffset=this.wot.cloneSource.wtTable.tableOffset;var y=o>0?this.getFirstRenderedRow():0,E=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new h.default(y,o,c),this.columnFilter=new f.default(E,i,s);var T,C=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();var w={};this.wot.getSetting("beforeDraw",!0,w),C=!0!==w.skipRender}if(C)if(this.tableRenderer.setHeaderContentRenderers(a,l),(this.is(g.CLONE_BOTTOM)||this.is(g.CLONE_BOTTOM_LEFT_CORNER))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(T=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(g.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var R=(0,u.outerWidth)(this.hider),b=(0,u.outerWidth)(this.TABLE);0!==R&&b!==R&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),T!==this.wot.wtViewport.getWorkspaceWidth()&&(this.wot.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wot.getSetting("onDraw",!0)}else this.is(g.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize()}if(this.isMaster){var O=n.topOverlay.resetFixedPosition();n.bottomOverlay.clone&&(O=n.bottomOverlay.resetFixedPosition()||O),O=n.leftOverlay.resetFixedPosition()||O,n.topLeftCornerOverlay&&n.topLeftCornerOverlay.resetFixedPosition(),n.bottomLeftCornerOverlay&&n.bottomLeftCornerOverlay.clone&&n.bottomLeftCornerOverlay.resetFixedPosition(),O&&(n.refreshAll(),n.adjustElementsSize())}return this.refreshSelections(p),d&&n.syncScrollWithMaster(),t.drawn=!0,this}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t,n,r,o=this.wot.wtTable.columnFilter.renderedToSource(e),i=this.wot.getSetting("columnHeaders").length,a=this.wot.wtSettings.settings.defaultRowHeight,s=this.wot.getSetting("columnHeaderHeight")||[];i;)i-=1,t=this.wot.wtTable.getColumnHeaderHeight(i),(n=this.wot.wtTable.getColumnHeader(o,i))&&(r=(0,u.innerHeight)(n),(!t&&a<r||t<r)&&(this.wot.wtViewport.oversizedColumnHeaders[i]=r),Array.isArray(s)?null!==s[i]&&void 0!==s[i]&&(this.wot.wtViewport.oversizedColumnHeaders[i]=s[i]):isNaN(s)||(this.wot.wtViewport.oversizedColumnHeaders[i]=s),this.wot.wtViewport.oversizedColumnHeaders[i]<(s[i]||s)&&(this.wot.wtViewport.oversizedColumnHeaders[i]=s[i]||s))}},{key:"adjustColumnHeaderHeights",value:function(){for(var e=this.wot,t=e.wtTable.THEAD.childNodes,n=e.wtViewport.oversizedColumnHeaders,r=0,o=e.getSetting("columnHeaders").length;r<o;r++)if(n[r]){if(!t[r]||0===t[r].childNodes.length)return;t[r].childNodes[0].style.height="".concat(n[r],"px")}}},{key:"resetOversizedRows",value:function(){var e=this.wot;if((this.isMaster||this.is(g.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator"))for(var t=this.getRenderedRowsCount(),n=0;n<t;n++){var r=this.rowFilter.renderedToSource(n);e.wtViewport.oversizedRows&&e.wtViewport.oversizedRows[r]&&(e.wtViewport.oversizedRows[r]=void 0)}}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll(".".concat(e)),n=0,r=t.length;n<r;n++)(0,u.removeClass)(t[n],e)}},{key:"refreshSelections",value:function(e){var t=this.wot;if(t.selections){var n=Array.from(t.selections),r=n.length;if(e){for(var o=[],i=0;i<r;i++){for(var a=n[i].settings,s=a.highlightHeaderClassName,u=a.highlightRowClassName,l=a.highlightColumnClassName,c=n[i].classNames,f=c.length,h=0;h<f;h++)o.includes(c[h])||o.push(c[h]);s&&!o.includes(s)&&o.push(s),u&&!o.includes(u)&&o.push(u),l&&!o.includes(l)&&o.push(l)}var d=t.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(d))for(var p=0;p<d.length;p++)o.push(d[p]);for(var m=o.length,v=0;v<m;v++)this.removeClassFromCells(o[v])}for(var g=0;g<r;g++)n[g].draw(t,e)}}},{key:"getCell",value:function(e){var t,n=e.row,r=e.col,o=this.wot.getSetting("onModifyGetCellCoords",n,r);if(o&&Array.isArray(o)){var a=(0,i.default)(o,2);n=a[0],r=a[1]}if(this.isRowBeforeRenderedRows(n))return-1;if(this.isRowAfterRenderedRows(n))return-2;if(this.isColumnBeforeRenderedColumns(r))return-3;if(this.isColumnAfterRenderedColumns(r))return-4;if(!(t=n<0?this.THEAD.childNodes[this.rowFilter.sourceRowToVisibleColHeadedRow(n)]:this.TBODY.childNodes[this.rowFilter.sourceToRendered(n)])&&n>=0)throw new Error("TR was expected to be rendered but is not");var s=t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)];if(!s&&r>=0)throw new Error("TD or TH was expected to be rendered but is not");return s}},{key:"getColumnHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.THEAD.childNodes[t];return null==n?void 0:n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getColumnHeaders",value:function(e){var t=[],n=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((function(e){var r=e.childNodes[n];r&&t.push(r)})),t}},{key:"getRowHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0!==this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0)){var n=this.wot.getSetting("rowHeaders").length;if(!(t>=n)){var r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return null==r?void 0:r.childNodes[t]}}}},{key:"getRowHeaders",value:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return[];for(var t=[],n=this.wot.getSetting("rowHeaders").length,r=0;r<n;r++){var o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],i=null==o?void 0:o.childNodes[r];i&&t.push(i)}return t}},{key:"getCoords",value:function(e){var t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,u.closest)(t,["TD","TH"])),null===t)return null;var n=t.parentNode,r=n.parentNode,o=(0,u.index)(n),i=t.cellIndex;if((0,u.overlayContainsElement)(g.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||(0,u.overlayContainsElement)(g.CLONE_TOP,t,this.wtRootElement))"THEAD"===r.nodeName&&(o-=r.childNodes.length);else if((0,u.overlayContainsElement)(g.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)||(0,u.overlayContainsElement)(g.CLONE_BOTTOM,t,this.wtRootElement)){o=this.wot.getSetting("totalRows")-r.childNodes.length+o}else o=r===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(o):this.rowFilter.renderedToSource(o);return i=(0,u.overlayContainsElement)(g.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||(0,u.overlayContainsElement)(g.CLONE_LEFT,t,this.wtRootElement)||(0,u.overlayContainsElement)(g.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),new c.default(o,i)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,n,r,o,i=this.TBODY.childNodes.length;if(i*this.wot.wtSettings.settings.defaultRowHeight!==(0,u.innerHeight)(this.TBODY)-1||this.wot.getSetting("fixedRowsBottom"))for(;i;)i-=1,n=this.rowFilter.renderedToSource(i),e=this.getRowHeight(n),t=(o=(r=this.getTrForRow(n)).querySelector("th"))?(0,u.innerHeight)(o):(0,u.innerHeight)(r)-1,(!e&&this.wot.wtSettings.settings.defaultRowHeight<t||e<t)&&(t+=1,this.wot.wtViewport.oversizedRows[n]=t)}}},{key:"getTrForRow",value:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}},{key:"isColumnHeaderRendered",value:function(e){if(e>=0)return!1;var t=this.wot.getSetting("rowHeaders").length;return Math.abs(e)<=t}},{key:"isRowHeaderRendered",value:function(e){if(e>=0)return!1;var t=this.wot.getSetting("columnHeaders").length;return Math.abs(e)<=t}},{key:"isRowBeforeRenderedRows",value:function(e){var t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}},{key:"isRowAfterRenderedRows",value:function(e){return e>this.getLastRenderedRow()}},{key:"isColumnBeforeRenderedColumns",value:function(e){var t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}},{key:"isColumnAfterRenderedColumns",value:function(e){return this.columnFilter&&e>this.getLastRenderedColumn()}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&e>this.getLastVisibleColumn()}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&e>this.getLastVisibleRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getRowHeight",value:function(e){return this.rowUtils.getHeight(e)}},{key:"getColumnHeaderHeight",value:function(e){return this.columnUtils.getHeaderHeight(e)}},{key:"getColumnWidth",value:function(e){return this.columnUtils.getWidth(e)}},{key:"getStretchedColumnWidth",value:function(e){return this.columnUtils.getStretchedColumnWidth(e)}},{key:"hasDefinedSize",value:function(){return this.hasTableHeight&&this.hasTableWidth}},{key:"isVisible",value:function(){return(0,u.isVisible)(this.TABLE)}},{key:"_modifyRowHeaderWidth",value:function(e){var t=(0,l.isFunction)(e)?e():null;return Array.isArray(t)?(t=(0,o.default)(t))[t.length-1]=this._correctRowHeaderWidth(t[t.length-1]):t=this._correctRowHeaderWidth(t),t}},{key:"_correctRowHeaderWidth",value:function(e){var t=e;return"number"!=typeof e&&(t=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}]),e}();t.default=y},function(e,t,n){var r=n(533),o=n(713);function i(t,n,a){return o()?(e.exports=i=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=i=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},e.exports.default=e.exports,e.exports.__esModule=!0),i.apply(null,arguments)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.Overlay=void 0,n(30);var o=r(n(5)),i=r(n(6)),a=n(21),s=n(15),u=n(16),l=n(87),c=r(n(49)),f=n(113),h=function(){function e(t){(0,o.default)(this,e),(0,s.defineGetter)(this,"wot",t,{writable:!1});var n=this.wot.wtTable,r=n.TABLE,i=n.hider,u=n.spreader,l=n.holder,c=n.wtRootElement;this.instance=this.wot,this.type="",this.mainTableScrollableElement=null,this.TABLE=r,this.hider=i,this.spreader=u,this.holder=l,this.wtRootElement=c,this.trimmingContainer=(0,a.getTrimmingContainer)(this.hider.parentNode.parentNode),this.updateStateOfRendering()}return(0,i.default)(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,a.getTrimmingContainer)(this.hider.parentNode.parentNode)}},{key:"updateMainScrollableElement",value:function(){var e=this.wot,t=e.wtTable;"hidden"===e.rootWindow.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,a.getScrollableElement)(t.TABLE)}},{key:"getRelativeCellPosition",value:function(e,t,n){if(!1!==this.clone.wtTable.holder.contains(e)){var r=this.mainTableScrollableElement===this.wot.rootWindow,o=n<this.wot.getSetting("fixedColumnsLeft"),i=t<this.wot.getSetting("fixedRowsTop"),a=t>=this.wot.getSetting("totalRows")-this.wot.getSetting("fixedRowsBottom"),s={left:this.clone.wtTable.spreader.offsetLeft,top:this.clone.wtTable.spreader.offsetTop},u={left:e.offsetLeft,top:e.offsetTop};return r?this.getRelativeCellPositionWithinWindow(i,o,u,s):this.getRelativeCellPositionWithinHolder(i,a,o,u,s)}(0,l.warn)("The provided element is not a child of the ".concat(this.type," overlay"))}},{key:"getRelativeCellPositionWithinWindow",value:function(e,t,n,r){var o=this.wot.wtTable.wtRootElement.getBoundingClientRect(),i=0,a=0;(i=t?o.left<=0?-1*o.left:0:r.left,e)?a=this.clone.wtTable.TABLE.getBoundingClientRect().top-o.top:a=r.top;return{left:n.left+i,top:n.top+a}}},{key:"getRelativeCellPositionWithinHolder",value:function(e,t,n,r,o){var i=this.clone.cloneSource.wtOverlays.leftOverlay.getScrollPosition(),a=this.clone.cloneSource.wtOverlays.topOverlay.getScrollPosition(),s=0,u=0;if(n||(s=i-o.left),t){var l=this.wot.wtTable.wtRootElement.getBoundingClientRect();u=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+l.top}else e||(u=a-o.top);return{left:r.left-s,top:r.top-u}}},{key:"makeClone",value:function(e){if(-1===f.CLONE_TYPES.indexOf(e))throw new Error('Clone type "'.concat(e,'" is not supported.'));var t=this.wot,n=t.wtTable,r=t.rootDocument,o=t.rootWindow,i=r.createElement("DIV"),s=r.createElement("TABLE"),u=n.wtRootElement.parentNode;i.className="ht_clone_".concat(e," handsontable"),i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.overflow="visible",s.className=n.TABLE.className,i.appendChild(s),this.type=e,u.appendChild(i);var l=this.wot.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===f.CLONE_TOP||"vertical"===l&&this.type===f.CLONE_LEFT?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(u).getPropertyValue("overflow")?this.mainTableScrollableElement=n.holder:this.mainTableScrollableElement=(0,a.getScrollableElement)(n.TABLE),new this.wot.constructor({cloneSource:this.wot,cloneOverlay:this,table:s})}},{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,t=this.clone.wtTable.hider,n=e.style,r=t.style,o=e.parentNode.style;(0,u.arrayEach)([n,r,o],(function(e){e.width="",e.height=""}))}}},{key:"destroy",value:function(){new c.default(this.clone).destroy()}}]),e}();t.Overlay=h},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.spreadsheetColumnLabel=u,t.spreadsheetColumnIndex=function(e){var t=0;if(e)for(var n=0,r=e.length-1;n<e.length;n+=1,r-=1)t+=Math.pow(s,r)*("ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(e[n])+1);return t-=1},t.createSpreadsheetData=function(){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,o=[];for(e=0;e<n;e++){var i=[];for(t=0;t<r;t++)i.push(u(t)+(e+1));o.push(i)}return o},t.createSpreadsheetObjectData=function(){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,o=[];for(e=0;e<n;e++){var i={};for(t=0;t<r;t++)i["prop".concat(t)]=u(t)+(e+1);o.push(i)}return o},t.createEmptySpreadsheetData=function(e,t){for(var n,r=[],o=0;o<e;o++){n=[];for(var i=0;i<t;i++)n.push("");r.push(n)}return r},t.translateRowsToColumns=function(e){var t,n,r,o,i=[],a=0;for(t=0,n=e.length;t<n;t++)for(r=0,o=e[t].length;r<o;r++)r===a&&(i.push([]),a+=1),i[r].push(e[t][r]);return i},t.cellMethodLookupFactory=function(e,t){var n=void 0===t||t;return function(t,r){return function t(r){if(r){if((0,a.hasOwnProperty)(r,e)&&void 0!==r[e])return r[e];if((0,a.hasOwnProperty)(r,"type")&&r.type){if("string"!=typeof r.type)throw new Error('Cell "type" must be a string');var o=(0,i.getCellType)(r.type);if((0,a.hasOwnProperty)(o,e))return o[e];if(n)return}return t(Object.getPrototypeOf(r))}}("number"==typeof t?this.getCellMeta(t,r):t)}},t.dataRowToChangesArray=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e,r=[];Array.isArray(e)&&Array.isArray(e[0])||(n=[e]);return n.forEach((function(e,n){Array.isArray(e)?e.forEach((function(e,o){r.push([n+t,o,e])})):Object.keys(e).forEach((function(o){r.push([n+t,o,e[o]])}))})),r},t.countFirstRowKeys=function(e){var t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,a.isObject)(e[0])&&(t=(0,a.deepObjectSize)(e[0])));return t},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((function(e){return Array.isArray(e)})))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((function(e){return"object"===(0,o.default)(e)&&!Array.isArray(e)&&null!==e})))};var o=r(n(18));n(24),n(27),n(51);var i=n(175),a=n(15),s="ABCDEFGHIJKLMNOPQRSTUVWXYZ".length;function u(e){for(var t,n=e+1,r="";n>0;)t=(n-1)%s,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/s,10);return r}},function(e,t,n){"use strict";n(7);var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(31)),i=r(n(5)),a=r(n(6)),s=r(n(28)),u=r(n(13)),l=r(n(14)),c=r(n(12)),f=n(58);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.default)(e);if(t){var o=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}var d=function(e){(0,u.default)(n,e);var t=h(n);function n(e,r){var o;return(0,i.default)(this,n),(o=t.call(this,e,null)).visualCellRange=r||null,o.commit(),o}return(0,a.default)(n,[{key:"add",value:function(e){return null===this.visualCellRange?this.visualCellRange=new f.CellRange(e):this.visualCellRange.expand(e),this}},{key:"clear",value:function(){return this.visualCellRange=null,(0,s.default)((0,c.default)(n.prototype),"clear",this).call(this)}},{key:"findVisibleCoordsInRange",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,o=this.findVisibleCoordsInRowsRange(e.row,t.row,n);if(null===o)return null;var i=this.findVisibleCoordsInColumnsRange(e.col,t.col,r);return null===i?null:new f.CellCoords(o,i)}},{key:"findVisibleCoordsInRowsRange",value:function(e,t,n){var r=this.settings.visualToRenderableCoords({row:e,col:-1}).row;return t===e&&null===r?null:null===r?this.findVisibleCoordsInRowsRange(e+n,t,n):e}},{key:"findVisibleCoordsInColumnsRange",value:function(e,t,n){var r=this.settings.visualToRenderableCoords({row:-1,col:e}).col;return t===e&&null===r?null:null===r?this.findVisibleCoordsInColumnsRange(e+n,t,n):e}},{key:"findVisibleHeaderRange",value:function(e,t,n,r){var o=this.findVisibleCoordsInRowsRange(e.row,t.row,n),i=this.findVisibleCoordsInRowsRange(t.row,e.row,-n),a=this.findVisibleCoordsInColumnsRange(e.col,t.col,r),s=this.findVisibleCoordsInColumnsRange(t.col,e.col,-r);return null===o&&null===i&&null===a&&null===s?null:[new f.CellCoords(o,a),new f.CellCoords(i,s)]}},{key:"commit",value:function(){if(null===this.visualCellRange)return this;var e=this.visualCellRange,t=e.from,n=e.to,r=this.getRowSearchDirection(this.visualCellRange),i=this.getColumnSearchDirection(this.visualCellRange),a=this.findVisibleCoordsInRange(t,n,r,i),s=this.findVisibleCoordsInRange(n,t,-r,-i);if(null===a||null===s){var u=null;if("header"===this.settings.type){var l=this.findVisibleHeaderRange(t,n,r,i),c=(0,o.default)(l,2),f=c[0],h=c[1];u=this.createRenderableCellRange(f,h)}this.cellRange=u}else this.cellRange=this.createRenderableCellRange(a,s);return this}},{key:"adjustCoordinates",value:function(e){var t=this.getRowSearchDirection(e),n=this.getColumnSearchDirection(e),r=e.from.clone().normalize(),o=e.to.clone().normalize(),i=this.findVisibleCoordsInRange(r,o,t,n);if(null!==i){if(null===this.cellRange){var a=this.settings.visualToRenderableCoords(i);this.cellRange=new f.CellRange(a)}return e.setHighlight(i),this}return e.setHighlight(e.from),this}},{key:"getCorners",value:function(){var e=this.cellRange,t=e.from,n=e.to,r=null===t.row||null===n.row,o=null===t.col||null===n.col,i=new f.CellCoords(r?null:Math.min(t.row,n.row),o?null:Math.min(t.col,n.col)),a=new f.CellCoords(r?null:Math.max(t.row,n.row),o?null:Math.max(t.col,n.col));return[i.row,i.col,a.row,a.col]}},{key:"getVisualCorners",value:function(){var e=this.settings.renderableToVisualCoords(this.cellRange.getTopLeftCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomRightCorner());return[e.row,e.col,t.row,t.col]}},{key:"createRenderableCellRange",value:function(e,t){var n=this.settings.visualToRenderableCoords(e),r=this.settings.visualToRenderableCoords(t);return new f.CellRange(n,n,r)}},{key:"getRowSearchDirection",value:function(e){return e.from.row<e.to.row?1:-1}},{key:"getColumnSearchDirection",value:function(e){return e.from.col<e.to.col?1:-1}}]),n}(f.Selection);t.default=d},function(e,t,n){"use strict";t.__esModule=!0,t.createId=i,t.createDefaultCustomBorder=a,t.createSingleEmptyBorder=s,t.createDefaultHtBorder=u,t.createEmptyBorders=function(e,t){return{id:i(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},right:{hide:!0},bottom:{hide:!0},left:{hide:!0}}},t.extendDefaultBorder=function(e,t){(0,r.hasOwnProperty)(t,"border")&&(e.border=t.border);(0,r.hasOwnProperty)(t,"top")&&(t.top?((0,r.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,r.hasOwnProperty)(t,"right")&&(t.right?((0,r.isObject)(t.right)||(t.right={width:1,color:"#000"}),e.right=t.right):(t.right={hide:!0},e.right=t.right));(0,r.hasOwnProperty)(t,"bottom")&&(t.bottom?((0,r.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,r.hasOwnProperty)(t,"left")&&(t.left?((0,r.isObject)(t.left)||(t.left={width:1,color:"#000"}),e.left=t.left):(t.left={hide:!0},e.left=t.left));return e},t.checkSelectionBorders=function(e,t){var n=!1;return(0,o.arrayEach)(e.getSelectedRange(),(function(o){o.forAll((function(o,i){if(!(o<0||i<0)){var a=e.getCellMeta(o,i).borders;if(a){if(!t)return n=!0,!1;if(!(0,r.hasOwnProperty)(a[t],"hide")||!1===a[t].hide)return n=!0,!1}}}))})),n},t.markSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)},n(20);var r=n(15),o=n(16);function i(e,t){return"border_row".concat(e,"col").concat(t)}function a(){return{width:1,color:"#000"}}function s(){return{hide:!0}}function u(){return{width:1,color:"#000",cornerVisible:!1}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(46),o=n(116),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(62);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports={}},function(e,t,n){var r=n(301),o=n(215).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(118),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){var r,o,i=n(56),a=n(123),s=i.process,u=s&&s.versions,l=u&&u.v8;l?o=(r=l.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){var r=n(301),o=n(215);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(116);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(150),o=n(82),i=n(148);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){var r=n(46),o=n(59),i=n(154),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r=n(135);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports={}},function(e,t,n){var r=n(59),o=n(136),i=n(82),a=r("unscopables"),s=Array.prototype;null==s[a]&&i.f(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){var r=n(151),o=n(62),i=n(78),a=n(82).f,s=n(184),u=n(317),l=s("meta"),c=0,f=Object.isExtensible||function(){return!0},h=function(e){a(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,l)){if(!f(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!i(e,l)){if(!f(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return u&&d.REQUIRED&&f(e)&&!i(e,l)&&h(e),e}};r[l]=!0},function(e,t,n){"use strict";n.r(t),n.d(t,"AdditionOp",(function(){return o})),n.d(t,"PlusOp",(function(){return i})),n.d(t,"MinusOp",(function(){return a})),n.d(t,"MultiplicationOp",(function(){return s})),n.d(t,"TimesOp",(function(){return u})),n.d(t,"DivOp",(function(){return l})),n.d(t,"PowerOp",(function(){return c})),n.d(t,"PercentOp",(function(){return f})),n.d(t,"BooleanOp",(function(){return h})),n.d(t,"EqualsOp",(function(){return d})),n.d(t,"NotEqualOp",(function(){return p})),n.d(t,"GreaterThanOp",(function(){return m})),n.d(t,"LessThanOp",(function(){return v})),n.d(t,"GreaterThanOrEqualOp",(function(){return g})),n.d(t,"LessThanOrEqualOp",(function(){return y})),n.d(t,"ConcatenateOp",(function(){return E})),n.d(t,"simpleSheetName",(function(){return T})),n.d(t,"quotedSheetName",(function(){return C})),n.d(t,"sheetNameRegexp",(function(){return w})),n.d(t,"CellReference",(function(){return R})),n.d(t,"ColumnRange",(function(){return b})),n.d(t,"RowRange",(function(){return O})),n.d(t,"RangeSeparator",(function(){return S})),n.d(t,"LParen",(function(){return N})),n.d(t,"RParen",(function(){return A})),n.d(t,"ProcedureName",(function(){return M})),n.d(t,"NamedExpression",(function(){return k})),n.d(t,"StringLiteral",(function(){return _})),n.d(t,"ErrorLiteral",(function(){return I})),n.d(t,"WhiteSpace",(function(){return x})),n.d(t,"buildLexerConfig",(function(){return P}));n(93),n(34),n(60),n(20);var r=n(193),o=Object(r.createToken)({name:"AdditionOp",pattern:r.Lexer.NA}),i=Object(r.createToken)({name:"PlusOp",pattern:/\+/,categories:o}),a=Object(r.createToken)({name:"MinusOp",pattern:/-/,categories:o}),s=Object(r.createToken)({name:"MultiplicationOp",pattern:r.Lexer.NA}),u=Object(r.createToken)({name:"TimesOp",pattern:/\*/,categories:s}),l=Object(r.createToken)({name:"DivOp",pattern:/\//,categories:s}),c=Object(r.createToken)({name:"PowerOp",pattern:/\^/}),f=Object(r.createToken)({name:"PercentOp",pattern:/%/}),h=Object(r.createToken)({name:"BooleanOp",pattern:r.Lexer.NA}),d=Object(r.createToken)({name:"EqualsOp",pattern:/=/,categories:h}),p=Object(r.createToken)({name:"NotEqualOp",pattern:/<>/,categories:h}),m=Object(r.createToken)({name:"GreaterThanOp",pattern:/>/,categories:h}),v=Object(r.createToken)({name:"LessThanOp",pattern:/</,categories:h}),g=Object(r.createToken)({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:h}),y=Object(r.createToken)({name:"LessThanOrEqualOp",pattern:/<=/,categories:h}),E=Object(r.createToken)({name:"ConcatenateOp",pattern:/&/}),T="[A-Za-z0-9_À-ʯ]+",C="'(((?!').|'')*)'",w="(".concat(T,"|").concat(C,")!"),R=Object(r.createToken)({name:"CellReference",pattern:new RegExp("(".concat(w,")?\\$?[A-Za-z]+\\$?[0-9]+"))}),b=Object(r.createToken)({name:"ColumnRange",pattern:new RegExp("(".concat(w,")?\\$?[A-Za-z]+:(").concat(w,")?\\$?[A-Za-z]+"))}),O=Object(r.createToken)({name:"RowRange",pattern:new RegExp("(".concat(w,")?\\$?[0-9]+:(").concat(w,")?\\$?[0-9]+"))}),S=Object(r.createToken)({name:"RangeSeparator",pattern:/:/}),N=Object(r.createToken)({name:"LParen",pattern:/\(/}),A=Object(r.createToken)({name:"RParen",pattern:/\)/}),M=Object(r.createToken)({name:"ProcedureName",pattern:/([A-Za-z\u00C0-\u02AF][A-Za-z0-9\u00C0-\u02AF._]*)\(/}),k=Object(r.createToken)({name:"NamedExpression",pattern:/[A-Za-z\u00C0-\u02AF_][A-Za-z0-9\u00C0-\u02AF._]*/}),_=Object(r.createToken)({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),I=Object(r.createToken)({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),x=Object(r.createToken)({name:"WhiteSpace",pattern:/[ \t\n\r]+/}),P=function(e){var t=e.translationPackage.getFunctionTranslation("OFFSET"),n=e.errorMapping,T=e.translationPackage.buildFunctionMapping(),C=Object(r.createToken)({name:"ArgSeparator",pattern:e.functionArgSeparator}),w=Object(r.createToken)({name:"NumberLiteral",pattern:new RegExp("(([".concat(e.decimalSeparator,"]\\d+)|(\\d+([").concat(e.decimalSeparator,"]\\d*)?))(e[+-]?\\d+)?"))}),P=Object(r.createToken)({name:"OffsetProcedureName",pattern:new RegExp(t,"i")});return{ArgSeparator:C,NumberLiteral:w,OffsetProcedureName:P,allTokens:[x,i,a,u,l,c,d,p,f,g,y,m,v,N,A,P,M,S,C,b,O,w,_,I,E,h,o,s,R,k],errorMapping:n,functionMapping:T,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}}},function(e,t,n){"use strict";n.r(t),n.d(t,"tokenStructuredMatcher",(function(){return o})),n.d(t,"tokenStructuredMatcherNoCategories",(function(){return i})),n.d(t,"tokenShortNameIdx",(function(){return a})),n.d(t,"tokenIdxToClass",(function(){return s})),n.d(t,"augmentTokenTypes",(function(){return u})),n.d(t,"expandCategories",(function(){return l})),n.d(t,"assignTokenDefaultProps",(function(){return c})),n.d(t,"assignCategoriesTokensProp",(function(){return f})),n.d(t,"assignCategoriesMapProp",(function(){return h})),n.d(t,"singleAssignCategoriesToksMap",(function(){return d})),n.d(t,"hasShortKeyProperty",(function(){return p})),n.d(t,"hasCategoriesProperty",(function(){return m})),n.d(t,"hasExtendingTokensTypesProperty",(function(){return v})),n.d(t,"hasExtendingTokensTypesMapProperty",(function(){return g})),n.d(t,"isTokenType",(function(){return y}));var r=n(42);function o(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function i(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var a=1,s={};function u(e){var t=l(e);c(t),h(t),f(t),Object(r.forEach)(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function l(e){for(var t=Object(r.cloneArr)(e),n=e,o=!0;o;){n=Object(r.compact)(Object(r.flatten)(Object(r.map)(n,(function(e){return e.CATEGORIES}))));var i=Object(r.difference)(n,t);t=t.concat(i),Object(r.isEmpty)(i)?o=!1:n=i}return t}function c(e){Object(r.forEach)(e,(function(e){p(e)||(s[a]=e,e.tokenTypeIdx=a++),m(e)&&!Object(r.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),m(e)||(e.CATEGORIES=[]),v(e)||(e.categoryMatches=[]),g(e)||(e.categoryMatchesMap={})}))}function f(e){Object(r.forEach)(e,(function(e){e.categoryMatches=[],Object(r.forEach)(e.categoryMatchesMap,(function(t,n){e.categoryMatches.push(s[n].tokenTypeIdx)}))}))}function h(e){Object(r.forEach)(e,(function(e){d([],e)}))}function d(e,t){Object(r.forEach)(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),Object(r.forEach)(t.CATEGORIES,(function(n){var o=e.concat(t);Object(r.contains)(o,n)||d(o,n)}))}function p(e){return Object(r.has)(e,"tokenTypeIdx")}function m(e){return Object(r.has)(e,"CATEGORIES")}function v(e){return Object(r.has)(e,"categoryMatches")}function g(e){return Object(r.has)(e,"categoryMatchesMap")}function y(e){return Object(r.has)(e,"tokenTypeIdx")}},function(e,t,n){"use strict";n.r(t),n.d(t,"isSequenceProd",(function(){return u})),n.d(t,"isOptionalProd",(function(){return l})),n.d(t,"isBranchingProd",(function(){return c})),n.d(t,"getProductionDslName",(function(){return f})),n.d(t,"DslMethodsCollectorVisitor",(function(){return h})),n.d(t,"collectMethods",(function(){return p}));var r,o=n(42),i=n(53),a=n(125),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function u(e){return e instanceof i.Flat||e instanceof i.Option||e instanceof i.Repetition||e instanceof i.RepetitionMandatory||e instanceof i.RepetitionMandatoryWithSeparator||e instanceof i.RepetitionWithSeparator||e instanceof i.Terminal||e instanceof i.Rule}function l(e,t){return void 0===t&&(t=[]),!!(e instanceof i.Option||e instanceof i.Repetition||e instanceof i.RepetitionWithSeparator)||(e instanceof i.Alternation?Object(o.some)(e.definition,(function(e){return l(e,t)})):!(e instanceof i.NonTerminal&&Object(o.contains)(t,e))&&(e instanceof i.AbstractProduction&&(e instanceof i.NonTerminal&&t.push(e),Object(o.every)(e.definition,(function(e){return l(e,t)})))))}function c(e){return e instanceof i.Alternation}function f(e){if(e instanceof i.NonTerminal)return"SUBRULE";if(e instanceof i.Option)return"OPTION";if(e instanceof i.Alternation)return"OR";if(e instanceof i.RepetitionMandatory)return"AT_LEAST_ONE";if(e instanceof i.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(e instanceof i.RepetitionWithSeparator)return"MANY_SEP";if(e instanceof i.Repetition)return"MANY";if(e instanceof i.Terminal)return"CONSUME";throw Error("non exhaustive match")}var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return s(t,e),t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+"Terminal";Object(o.has)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";Object(o.has)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitOption=function(e){this.dslMethods.option.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},t.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},t.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},t}(a.GAstVisitor),d=new h;function p(e){d.reset(),e.accept(d);var t=d.dslMethods;return d.reset(),t}},function(e,t,n){"use strict";n.r(t),n.d(t,"BITS_FOR_METHOD_TYPE",(function(){return r})),n.d(t,"BITS_FOR_OCCURRENCE_IDX",(function(){return o})),n.d(t,"BITS_FOR_RULE_IDX",(function(){return i})),n.d(t,"BITS_FOR_ALT_IDX",(function(){return a})),n.d(t,"OR_IDX",(function(){return s})),n.d(t,"OPTION_IDX",(function(){return u})),n.d(t,"MANY_IDX",(function(){return l})),n.d(t,"AT_LEAST_ONE_IDX",(function(){return c})),n.d(t,"MANY_SEP_IDX",(function(){return f})),n.d(t,"AT_LEAST_ONE_SEP_IDX",(function(){return h})),n.d(t,"getKeyForAutomaticLookahead",(function(){return d})),n.d(t,"getKeyForAltIndex",(function(){return m}));var r=4,o=8,i=12,a=8,s=1<<o,u=2<<o,l=3<<o,c=4<<o,f=5<<o,h=6<<o;function d(e,t,n){return n|t|e}var p=32-a;function m(e,t,n,r){var o=r+1<<p;return d(e,t,n)|o}},function(e,t,n){"use strict";n.r(t),n.d(t,"resolveGrammar",(function(){return u})),n.d(t,"validateGrammar",(function(){return l})),n.d(t,"assignOccurrenceIndices",(function(){return c}));var r=n(42),o=n(620),i=n(194),a=n(126),s=n(165);function u(e){e=Object(r.defaults)(e,{errMsgProvider:a.defaultGrammarResolverErrorProvider});var t={};return Object(r.forEach)(e.rules,(function(e){t[e.name]=e})),Object(o.resolveGrammar)(t,e.errMsgProvider)}function l(e){return e=Object(r.defaults)(e,{errMsgProvider:a.defaultGrammarValidatorErrorProvider,ignoredIssues:{}}),Object(i.validateGrammar)(e.rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function c(e){Object(r.forEach)(e.rules,(function(e){var t=new s.DslMethodsCollectorVisitor;e.accept(t),Object(r.forEach)(t.dslMethods,(function(e){Object(r.forEach)(e,(function(e,t){e.idx=t+1}))}))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"RowsSpan",(function(){return a})),n.d(t,"ColumnsSpan",(function(){return s}));n(72);function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var a=function(){function e(t,n,o){if(r(this,e),this.sheet=t,this.rowStart=n,this.rowEnd=o,n<0)throw Error("Starting row cant be less than 0");if(o<n)throw Error("Row span cant end before start")}return i(e,[{key:"numberOfRows",get:function(){return this.rowEnd-this.rowStart+1}},{key:"rows",value:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.rowStart;case 1:if(!(t<=this.rowEnd)){e.next=7;break}return e.next=4,t;case 4:++t,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"intersect",value:function(t){if(this.sheet!==t.sheet)throw Error("Can't intersect spans from different sheets");var n=Math.max(this.rowStart,t.rowStart),r=Math.min(this.rowEnd,t.rowEnd);return n>r?null:new e(this.sheet,n,r)}},{key:"firstRow",value:function(){return new e(this.sheet,this.rowStart,this.rowStart)}},{key:"start",get:function(){return this.rowStart}},{key:"end",get:function(){return this.rowEnd}}],[{key:"fromNumberOfRows",value:function(t,n,r){return new e(t,n,n+r-1)}},{key:"fromRowStartAndEnd",value:function(t,n,r){return new e(t,n,r)}}]),e}(),s=function(){function e(t,n,o){if(r(this,e),this.sheet=t,this.columnStart=n,this.columnEnd=o,n<0)throw Error("Starting column cant be less than 0");if(o<n)throw Error("Column span cant end before start")}return i(e,[{key:"numberOfColumns",get:function(){return this.columnEnd-this.columnStart+1}},{key:"columns",value:regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.columnStart;case 1:if(!(t<=this.columnEnd)){e.next=7;break}return e.next=4,t;case 4:++t,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"intersect",value:function(t){if(this.sheet!==t.sheet)throw Error("Can't intersect spans from different sheets");var n=Math.max(this.columnStart,t.columnStart),r=Math.min(this.columnEnd,t.columnEnd);return n>r?null:new e(this.sheet,n,r)}},{key:"firstColumn",value:function(){return new e(this.sheet,this.columnStart,this.columnStart)}},{key:"start",get:function(){return this.columnStart}},{key:"end",get:function(){return this.columnEnd}}],[{key:"fromNumberOfColumns",value:function(t,n,r){return new e(t,n,n+r-1)}},{key:"fromColumnStartAndEnd",value:function(t,n,r){return new e(t,n,r)}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"instanceOfSimpleDate",(function(){return c})),n.d(t,"instanceOfSimpleTime",(function(){return f})),n.d(t,"maxDate",(function(){return h})),n.d(t,"DateTimeHelper",(function(){return d})),n.d(t,"offsetMonth",(function(){return p})),n.d(t,"truncateDayInMonth",(function(){return m})),n.d(t,"roundToNearestSecond",(function(){return v})),n.d(t,"numberToSimpleTime",(function(){return g})),n.d(t,"timeToNumber",(function(){return y})),n.d(t,"toBasisEU",(function(){return E}));n(83),n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(19),n(25),n(23);var r=n(50);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e){return(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})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var u=[31,28,31,30,31,30,31,31,30,31,30,31],l=[0,31,59,90,120,151,181,212,243,273,304,334];function c(e){return!(!e||"object"!==s(e)&&"function"!=typeof e)&&("year"in e&&"number"==typeof e.year&&"month"in e&&"number"==typeof e.month&&"day"in e&&"number"==typeof e.day)}function f(e){return!(!e||"object"!==s(e)&&"function"!=typeof e)&&("hours"in e&&"number"==typeof e.hours&&"minutes"in e&&"number"==typeof e.minutes&&"seconds"in e&&"number"==typeof e.seconds)}var h={year:9999,month:12,day:31},d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.minDateAboluteValue=this.dateToNumberFromZero(t.nullDate),this.maxDateValue=this.dateToNumber(h),this.leapYear1900=t.leapYear1900,!this.leapYear1900&&0<=this.dateToNumber({year:1900,month:2,day:28})?this.epochYearZero=this.numberToSimpleDate(2).year:this.epochYearZero=this.numberToSimpleDate(1).year,this.parseDateTime=t.parseDateTime}var t,n,i;return t=e,(n=[{key:"getWithinBounds",value:function(e){return e<=this.maxDateValue&&e>=0?e:void 0}},{key:"dateStringToDateNumber",value:function(e){var t=this.parseDateTimeFromConfigFormats(e),n=t.dateTime,o=t.dateFormat,i=void 0===o?"":o,a=t.timeFormat,s=void 0===a?"":a;if(void 0!==n)return f(n)?c(n)?new r.DateTimeNumber(y(n)+this.dateToNumber(n),i+" "+s):new r.TimeNumber(y(n),s):c(n)?new r.DateNumber(this.dateToNumber(n),i):0}},{key:"parseSingleFormat",value:function(e,t,n){var r=this.parseDateTime(e,t,n);if(!c(r)||(r.year>=0&&r.year<100&&(r.year<this.getNullYear()?r.year+=2e3:r.year+=1900),this.isValidDate(r)))return r}},{key:"parseDateTimeFromConfigFormats",value:function(e){return this.parseDateTimeFromFormats(e,this.config.dateFormats,this.config.timeFormats)}},{key:"parseDateTimeFromFormats",value:function(e,t,n){var r,i=0===t.length?[void 0]:t,a=0===n.length?[void 0]:n,s=o(i);try{for(s.s();!(r=s.n()).done;){var u,l=r.value,c=o(a);try{for(c.s();!(u=c.n()).done;){var f=u.value,h=this.parseSingleFormat(e,l,f);if(void 0!==h)return{dateTime:h,timeFormat:f,dateFormat:l}}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}return{}}},{key:"getNullYear",value:function(){return this.config.nullYear}},{key:"getEpochYearZero",value:function(){return this.epochYearZero}},{key:"isValidDate",value:function(e){return!(isNaN(e.year)||isNaN(e.month)||isNaN(e.day)||e.day!==Math.round(e.day)||e.month!==Math.round(e.month)||e.year!==Math.round(e.year)||e.year<1582||e.month<1||e.month>12||e.day<1||!(this.isLeapYear(e.year)&&2===e.month?e.day<=29:e.day<=u[e.month-1]))}},{key:"dateToNumber",value:function(e){return this.dateToNumberFromZero(e)-this.minDateAboluteValue}},{key:"relativeNumberToAbsoluteNumber",value:function(e){return e+this.minDateAboluteValue-(this.leapYear1900?1:0)}},{key:"numberToSimpleDate",value:function(e){var t=Math.floor(e)+this.minDateAboluteValue,n=Math.floor(t/365.2425);this.dateToNumberFromZero({year:n+1,month:1,day:1})<=t?n++:this.dateToNumberFromZero({year:n-1,month:1,day:1})>t&&n--;var r=t-this.dateToNumberFromZero({year:n,month:1,day:1}),o=function(e){var t=0;return l[t+6]<=e&&(t+=6),l[t+3]<=e&&(t+=3),l[t+2]<=e?t+=2:l[t+1]<=e&&(t+=1),t}(r-(this.isLeapYear(n)&&r>=59?1:0));return{year:n,month:o+1,day:r-l[o]-(this.isLeapYear(n)&&o>1?1:0)+1}}},{key:"numberToSimpleDateTime",value:function(e){return Object.assign(Object.assign({},this.numberToSimpleDate(Math.floor(e))),g(e%1))}},{key:"leapYearsCount",value:function(e){return Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)+(this.config.leapYear1900&&e>=1900?1:0)}},{key:"countLeapDays",value:function(e){return e.month>2||2===e.month&&e.day>=29?this.leapYearsCount(e.year):this.leapYearsCount(e.year-1)}},{key:"dateToNumberFromZero",value:function(e){return 365*e.year+l[e.month-1]+e.day-1+(e.month<=2?this.leapYearsCount(e.year-1):this.leapYearsCount(e.year))}},{key:"isLeapYear",value:function(e){return!(e%4)&&(!!(e%100)||!(e%400)||1900===e&&this.config.leapYear1900)}},{key:"daysInMonth",value:function(e,t){return this.isLeapYear(e)&&2===t?29:u[t-1]}},{key:"endOfMonth",value:function(e){return{year:e.year,month:e.month,day:this.daysInMonth(e.year,e.month)}}},{key:"toBasisUS",value:function(e,t){return 31===e.day&&(e.day=30),30===e.day&&31===t.day&&(t.day=30),2===e.month&&e.day===this.daysInMonth(e.year,e.month)&&(e.day=30,2===t.month&&t.day===this.daysInMonth(t.year,t.month)&&(t.day=30)),[e,t]}},{key:"yearLengthForBasis",value:function(e,t){return e.year!==t.year?e.year+1!==t.year||e.month<t.month||e.month===t.month&&e.day<t.day?(this.leapYearsCount(t.year)-this.leapYearsCount(e.year-1))/(t.year-e.year+1)+365:this.countLeapDays(t)!==this.countLeapDays({year:e.year,month:e.month,day:e.day-1})?366:365:this.isLeapYear(e.year)?366:365}}])&&a(t.prototype,n),i&&a(t,i),e}();function p(e,t){var n=12*e.year+e.month-1+t;return{year:Math.floor(n/12),month:n%12+1,day:e.day}}function m(e){return{year:e.year,month:e.month,day:Math.min(e.day,u[e.month-1])}}function v(e){return Math.round(3600*e*24)/86400}function g(e){e=Math.round(24*e*60*60*1e5)/864e7,e*=24;var t=Math.floor(e);e-=t,e*=60;var n=Math.floor(e);return e-=n,e*=60,{hours:t,minutes:n,seconds:Math.round(1e5*e)/1e5}}function y(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function E(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"HyperFormula",(function(){return E}));n(27),n(25),n(20),n(41),n(23),n(2),n(3),n(1),n(4),n(33),n(8),n(10),n(11),n(19);var r=n(79),o=n(22),i=n(141),a=n(169),s=n(198),u=n(262),l=n(36),c=n(69),f=n(653),h=n(655),d=n(264);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var E=function(){function e(t,n,r,o,i,a,s,u,l,c,h,d,p,m){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=t,this._stats=n,this._dependencyGraph=r,this._columnSearch=o,this._parser=i,this._unparser=a,this._cellContentParser=s,this._evaluator=u,this._lazilyTransformingAstService=l,this._crudOperations=c,this._exporter=h,this._namedExpressions=d,this._serialization=p,this._functionRegistry=m,this._emitter=new f.Emitter,this._evaluationSuspended=!1}var t,n,v;return t=e,v=[{key:"buildFromEngineState",value:function(t){return new e(t.config,t.stats,t.dependencyGraph,t.columnSearch,t.parser,t.unparser,t.cellContentParser,t.evaluator,t.lazilyTransformingAstService,t.crudOperations,t.exporter,t.namedExpressions,t.serialization,t.functionRegistry)}},{key:"buildFromArray",value:function(e,t){return this.buildFromEngineState(h.BuildEngineFactory.buildFromSheet(e,t))}},{key:"buildFromSheets",value:function(e,t){return this.buildFromEngineState(h.BuildEngineFactory.buildFromSheets(e,t))}},{key:"buildEmpty",value:function(e){return this.buildFromEngineState(h.BuildEngineFactory.buildEmpty(e))}},{key:"getLanguage",value:function(e){var t=this.registeredLanguages.get(e);if(void 0===t)throw new l.LanguageNotRegisteredError;return t}},{key:"registerLanguage",value:function(e,t){if(this.registeredLanguages.has(e))throw new l.LanguageAlreadyRegisteredError;this.registeredLanguages.set(e,Object(s.buildTranslationPackage)(t))}},{key:"unregisterLanguage",value:function(e){if(!this.registeredLanguages.has(e))throw new l.LanguageNotRegisteredError;this.registeredLanguages.delete(e)}},{key:"getRegisteredLanguagesCodes",value:function(){return Array.from(this.registeredLanguages.keys())}},{key:"registerFunctionPlugin",value:function(e,t){d.FunctionRegistry.registerFunctionPlugin(e,t)}},{key:"unregisterFunctionPlugin",value:function(e){d.FunctionRegistry.unregisterFunctionPlugin(e)}},{key:"registerFunction",value:function(e,t,n){d.FunctionRegistry.registerFunction(e,t,n)}},{key:"unregisterFunction",value:function(e){d.FunctionRegistry.unregisterFunction(e)}},{key:"unregisterAllFunctions",value:function(){d.FunctionRegistry.unregisterAll()}},{key:"getRegisteredFunctionNames",value:function(e){var t=d.FunctionRegistry.getRegisteredFunctionIds();return this.getLanguage(e).getFunctionTranslations(t)}},{key:"getFunctionPlugin",value:function(e){return d.FunctionRegistry.getFunctionPlugin(e)}},{key:"getAllFunctionPlugins",value:function(){return d.FunctionRegistry.getPlugins()}}],(n=[{key:"graph",get:function(){return this.dependencyGraph.graph}},{key:"rangeMapping",get:function(){return this.dependencyGraph.rangeMapping}},{key:"matrixMapping",get:function(){return this.dependencyGraph.matrixMapping}},{key:"sheetMapping",get:function(){return this.dependencyGraph.sheetMapping}},{key:"addressMapping",get:function(){return this.dependencyGraph.addressMapping}},{key:"dependencyGraph",get:function(){return this._dependencyGraph}},{key:"evaluator",get:function(){return this._evaluator}},{key:"columnSearch",get:function(){return this._columnSearch}},{key:"lazilyTransformingAstService",get:function(){return this._lazilyTransformingAstService}},{key:"licenseKeyValidityState",get:function(){return this._config.licenseKeyValidityState}},{key:"getCellValue",value:function(e){return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}},{key:"ensureEvaluationIsNotSuspended",value:function(){if(this._evaluationSuspended)throw new l.EvaluationSuspendedError}},{key:"getCellFormula",value:function(e){return this._serialization.getCellFormula(e)}},{key:"getCellSerialized",value:function(e){return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}},{key:"getSheetValues",value:function(e){return this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}},{key:"getSheetFormulas",value:function(e){return this._serialization.getSheetFormulas(e)}},{key:"getSheetSerialized",value:function(e){return this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}},{key:"getAllSheetsDimensions",value:function(){var e=this;return this._serialization.genericAllSheetsGetter((function(t){return e.getSheetDimensions(t)}))}},{key:"getSheetDimensions",value:function(e){return{width:this.dependencyGraph.getSheetWidth(e),height:this.dependencyGraph.getSheetHeight(e)}}},{key:"getAllSheetsValues",value:function(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsValues()}},{key:"getAllSheetsFormulas",value:function(){return this._serialization.getAllSheetsFormulas()}},{key:"getAllSheetsSerialized",value:function(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsSerialized()}},{key:"updateConfig",value:function(e){var t=this,n=this._config.mergeConfig(e),r=this._config.mergeConfig({language:e.language}),o=this._serialization.withNewConfig(r,this._namedExpressions).getAllSheetsSerialized(),i=this._serialization.getAllNamedExpressionsSerialized(),a=h.BuildEngineFactory.rebuildWithConfig(n,o,this._stats);this._config=a.config,this._stats=a.stats,this._dependencyGraph=a.dependencyGraph,this._columnSearch=a.columnSearch,this._parser=a.parser,this._unparser=a.unparser,this._cellContentParser=a.cellContentParser,this._evaluator=a.evaluator,this._lazilyTransformingAstService=a.lazilyTransformingAstService,this._crudOperations=a.crudOperations,this._exporter=a.exporter,this._namedExpressions=a.namedExpressions,this._serialization=a.serialization,this._functionRegistry=a.functionRegistry,i.forEach((function(e){t.addNamedExpression(e.name,e.expression,e.scope,e.options)}))}},{key:"getConfig",value:function(){return this._config.getConfig()}},{key:"rebuildAndRecalculate",value:function(){this.updateConfig({})}},{key:"getStats",value:function(){return this._stats.snapshot()}},{key:"undo",value:function(){return this._crudOperations.undo(),this.recomputeIfDependencyGraphNeedsIt()}},{key:"redo",value:function(){return this._crudOperations.redo(),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isThereSomethingToUndo",value:function(){return this._crudOperations.isThereSomethingToUndo()}},{key:"isThereSomethingToRedo",value:function(){return this._crudOperations.isThereSomethingToRedo()}},{key:"isItPossibleToSetCellContents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;try{this._crudOperations.ensureRangeInSizeLimits(r.AbsoluteCellRange.spanFrom(e,t,n));for(var o=0;o<t;o++)for(var i=0;i<n;i++)this._crudOperations.ensureItIsPossibleToChangeContent({col:e.col+o,row:e.row+i,sheet:e.sheet})}catch(e){return!1}return!0}},{key:"setCellContents",value:function(e,t){return this._crudOperations.setCellContents(e,t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"swapRowIndexes",value:function(e,t){return this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToSwapRowIndexes",value:function(e,t){try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForMatrices(e,t),!0}catch(e){return!1}}},{key:"setRowOrder",value:function(e,t){var n=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,n)}},{key:"isItPossibleToSetRowOrder",value:function(e,t){try{var n=this._crudOperations.mappingFromOrder(e,t,"row");return this._crudOperations.validateSwapRowIndexes(e,n),this._crudOperations.testRowOrderForMatrices(e,n),!0}catch(e){return!1}}},{key:"swapColumnIndexes",value:function(e,t){return this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToSwapColumnIndexes",value:function(e,t){try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForMatrices(e,t),!0}catch(e){return!1}}},{key:"setColumnOrder",value:function(e,t){var n=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,n)}},{key:"isItPossibleToSetColumnOrder",value:function(e,t){try{var n=this._crudOperations.mappingFromOrder(e,t,"column");return this._crudOperations.validateSwapColumnIndexes(e,n),this._crudOperations.testColumnOrderForMatrices(e,n),!0}catch(e){return!1}}},{key:"isItPossibleToAddRows",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object(u.normalizeAddedIndexes)(n);try{var i;return(i=this._crudOperations).ensureItIsPossibleToAddRows.apply(i,[e].concat(m(o))),!0}catch(e){return!1}}},{key:"addRows",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this._crudOperations).addRows.apply(t,[e].concat(r)),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToRemoveRows",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object(u.normalizeRemovedIndexes)(n);try{var i;return(i=this._crudOperations).ensureItIsPossibleToRemoveRows.apply(i,[e].concat(m(o))),!0}catch(e){return!1}}},{key:"removeRows",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this._crudOperations).removeRows.apply(t,[e].concat(r)),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToAddColumns",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object(u.normalizeAddedIndexes)(n);try{var i;return(i=this._crudOperations).ensureItIsPossibleToAddColumns.apply(i,[e].concat(m(o))),!0}catch(e){return!1}}},{key:"addColumns",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this._crudOperations).addColumns.apply(t,[e].concat(r)),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToRemoveColumns",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object(u.normalizeRemovedIndexes)(n);try{var i;return(i=this._crudOperations).ensureItIsPossibleToRemoveColumns.apply(i,[e].concat(m(o))),!0}catch(e){return!1}}},{key:"removeColumns",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this._crudOperations).removeColumns.apply(t,[e].concat(r)),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToMoveCells",value:function(e,t,n,r){try{return this._crudOperations.operations.ensureItIsPossibleToMoveCells(e,t,n,r),!0}catch(e){return!1}}},{key:"moveCells",value:function(e,t,n,r){return this._crudOperations.moveCells(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToMoveRows",value:function(e,t,n,r){try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,n,r),!0}catch(e){return!1}}},{key:"moveRows",value:function(e,t,n,r){return this._crudOperations.moveRows(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToMoveColumns",value:function(e,t,n,r){try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,n,r),!0}catch(e){return!1}}},{key:"moveColumns",value:function(e,t,n,r){return this._crudOperations.moveColumns(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}},{key:"copy",value:function(e,t,n){return this._crudOperations.copy(e,t,n),this.getRangeValues(e,t,n)}},{key:"cut",value:function(e,t,n){return this._crudOperations.cut(e,t,n),this.getRangeValues(e,t,n)}},{key:"paste",value:function(e){return this.ensureEvaluationIsNotSuspended(),this._crudOperations.paste(e),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isClipboardEmpty",value:function(){return this._crudOperations.isClipboardEmpty()}},{key:"clearClipboard",value:function(){this._crudOperations.clearClipboard()}},{key:"clearRedoStack",value:function(){this._crudOperations.undoRedo.clearRedoStack()}},{key:"clearUndoStack",value:function(){this._crudOperations.undoRedo.clearUndoStack()}},{key:"getRangeValues",value:function(e,t,n){var o=this;return r.AbsoluteCellRange.spanFrom(e,t,n).arrayOfAddressesInRange().map((function(e){return e.map((function(e){return o.getCellValue(e)}))}))}},{key:"getRangeFormulas",value:function(e,t,n){var o=this;return r.AbsoluteCellRange.spanFrom(e,t,n).arrayOfAddressesInRange().map((function(e){return e.map((function(e){return o.getCellFormula(e)}))}))}},{key:"getRangeSerialized",value:function(e,t,n){var o=this;return r.AbsoluteCellRange.spanFrom(e,t,n).arrayOfAddressesInRange().map((function(e){return e.map((function(e){return o.getCellSerialized(e)}))}))}},{key:"isItPossibleToAddSheet",value:function(e){try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(e){return!1}}},{key:"addSheet",value:function(e){var t=this._crudOperations.addSheet(e);return this._emitter.emit(f.Events.SheetAdded,t),t}},{key:"isItPossibleToRemoveSheet",value:function(e){try{return this._crudOperations.ensureSheetExists(e),!0}catch(e){return!1}}},{key:"removeSheet",value:function(e){var t=this.sheetMapping.getDisplayNameByName(e);this._crudOperations.removeSheet(e);var n=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(f.Events.SheetRemoved,t,n),n}},{key:"isItPossibleToClearSheet",value:function(e){try{return this._crudOperations.ensureSheetExists(e),!0}catch(e){return!1}}},{key:"clearSheet",value:function(e){return this._crudOperations.ensureSheetExists(e),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToReplaceSheetContent",value:function(e,t){try{this._crudOperations.ensureSheetExists(e);var n=this.sheetMapping.fetch(e);return this._crudOperations.ensureItIsPossibleToChangeSheetContents(n,t),!0}catch(e){return!1}}},{key:"setSheetContent",value:function(e,t){return this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}},{key:"simpleCellAddressFromString",value:function(e,t){return Object(c.simpleCellAddressFromString)(this.sheetMapping.get,e,t)}},{key:"simpleCellAddressToString",value:function(e,t){return Object(c.simpleCellAddressToString)(this.sheetMapping.fetchDisplayName,e,t)}},{key:"getCellDependents",value:function(e){var t;if(e instanceof r.AbsoluteCellRange){if(void 0===(t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)))return[]}else if(null===(t=this._dependencyGraph.addressMapping.getCell(e)))return[];return this._dependencyGraph.getAdjacentNodesAddresses(t)}},{key:"getCellPrecedents",value:function(e){var t,n;if(e instanceof r.AbsoluteCellRange){if(void 0===(n=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)))return[]}else if(null===(n=this._dependencyGraph.addressMapping.getCell(e)))return[];return null!==(t=this._dependencyGraph.dependencyQueryAddresses(n))&&void 0!==t?t:[]}},{key:"getSheetName",value:function(e){return this.sheetMapping.getDisplayName(e)}},{key:"getSheetNames",value:function(){return this.sheetMapping.sheetNames()}},{key:"getSheetId",value:function(e){return this.sheetMapping.get(e)}},{key:"doesSheetExist",value:function(e){return this.sheetMapping.hasSheetWithName(e)}},{key:"getCellType",value:function(e){var t=this.dependencyGraph.getCell(e);return Object(o.getCellType)(t)}},{key:"doesCellHaveSimpleValue",value:function(e){return this.getCellType(e)===o.CellType.VALUE}},{key:"doesCellHaveFormula",value:function(e){return this.getCellType(e)===o.CellType.FORMULA}},{key:"isCellEmpty",value:function(e){return this.getCellType(e)===o.CellType.EMPTY}},{key:"isCellPartOfMatrix",value:function(e){return this.getCellType(e)===o.CellType.MATRIX}},{key:"getCellValueType",value:function(e){this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return Object(o.getCellValueType)(t)}},{key:"getCellValueDetailedType",value:function(e){this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return Object(o.getCellValueDetailedType)(t)}},{key:"getCellValueFormat",value:function(e){this.ensureEvaluationIsNotSuspended();var t=this.dependencyGraph.getCellValue(e);return Object(o.getCellValueFormat)(t)}},{key:"countSheets",value:function(){return this.sheetMapping.numberOfSheets()}},{key:"isItPossibleToRenameSheet",value:function(e,t){try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(e){return!1}}},{key:"renameSheet",value:function(e,t){var n=this._crudOperations.renameSheet(e,t);void 0!==n&&this._emitter.emit(f.Events.SheetRenamed,n,t)}},{key:"batch",value:function(e){this.suspendEvaluation(),this._crudOperations.beginUndoRedoBatchMode();try{e()}catch(e){throw this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation(),e}return this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation()}},{key:"suspendEvaluation",value:function(){this._evaluationSuspended=!0,this._emitter.emit(f.Events.EvaluationSuspended)}},{key:"resumeEvaluation",value:function(){this._evaluationSuspended=!1;var e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(f.Events.EvaluationResumed,e),e}},{key:"isEvaluationSuspended",value:function(){return this._evaluationSuspended}},{key:"isItPossibleToAddNamedExpression",value:function(e,t,n){try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,n),!0}catch(e){return!1}}},{key:"addNamedExpression",value:function(e,t,n,r){this._crudOperations.addNamedExpression(e,t,n,r);var o=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(f.Events.NamedExpressionAdded,e,o),o}},{key:"getNamedExpressionValue",value:function(e,t){this.ensureEvaluationIsNotSuspended();var n=this._crudOperations.scopeId(t),r=this._namedExpressions.namedExpressionForScope(e,n);return r?this._serialization.getCellValue(r.address):void 0}},{key:"getNamedExpressionFormula",value:function(e,t){var n=this._crudOperations.scopeId(t),r=this._namedExpressions.namedExpressionForScope(e,n);return void 0===r?void 0:this._serialization.getCellFormula(r.address)}},{key:"getNamedExpression",value:function(e,t){var n=this._crudOperations.scopeId(t),r=this._namedExpressions.namedExpressionForScope(e,n);if(void 0!==r)return{name:e,scope:t,expression:this._serialization.getCellFormula(r.address),options:r.options}}},{key:"isItPossibleToChangeNamedExpression",value:function(e,t,n){try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,n),!0}catch(e){return!1}}},{key:"changeNamedExpression",value:function(e,t,n,r){return this._crudOperations.changeNamedExpressionExpression(e,n,t,r),this.recomputeIfDependencyGraphNeedsIt()}},{key:"isItPossibleToRemoveNamedExpression",value:function(e,t){try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(e){return!1}}},{key:"removeNamedExpression",value:function(e,t){var n=this._crudOperations.removeNamedExpression(e,t);if(n){var r=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(f.Events.NamedExpressionRemoved,n.displayName,r),r}return[]}},{key:"listNamedExpressions",value:function(e){var t=this._crudOperations.scopeId(e);return this._namedExpressions.getAllNamedExpressionsNamesInScope(t)}},{key:"normalizeFormula",value:function(e){var t=p(this.extractTemporaryFormula(e),2),n=t[0],r=t[1];if(void 0===n)throw new l.NotAFormulaError;return this._unparser.unparse(n,r)}},{key:"calculateFormula",value:function(e,t){this._crudOperations.ensureSheetExists(t);var n=this.sheetMapping.fetch(t),r=p(this.extractTemporaryFormula(e,n),3),o=r[0],i=r[1],a=r[2];if(void 0===o)throw new l.NotAFormulaError;var s=this.evaluator.runAndForget(o,i,a);return this._exporter.exportValue(s)}},{key:"validateFormula",value:function(e){var t=p(this.extractTemporaryFormula(e),1)[0];return void 0!==t&&!(t.type===c.AstNodeType.ERROR&&!t.error)}},{key:"getRegisteredFunctionNames",value:function(){return e.getLanguage(this._config.language).getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}},{key:"getFunctionPlugin",value:function(e){return this._functionRegistry.getFunctionPlugin(e)}},{key:"getAllFunctionPlugins",value:function(){return this._functionRegistry.getPlugins()}},{key:"numberToDateTime",value:function(e){return this._evaluator.dateHelper.numberToSimpleDateTime(e)}},{key:"numberToDate",value:function(e){return this._evaluator.dateHelper.numberToSimpleDate(e)}},{key:"numberToTime",value:function(e){return Object(a.numberToSimpleTime)(e)}},{key:"extractTemporaryFormula",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this._cellContentParser.parse(e),r={sheet:t,col:0,row:0};if(!(n instanceof i.CellContent.Formula))return[void 0,r,[]];var o=this._parser.parse(n.formula,r),a=o.ast,s=o.errors,u=o.dependencies;return s.length>0?[void 0,r,[]]:[a,r,u]}},{key:"on",value:function(e,t){this._emitter.on(e,t)}},{key:"once",value:function(e,t){this._emitter.once(e,t)}},{key:"off",value:function(e,t){this._emitter.off(e,t)}},{key:"destroy",value:function(){this.dependencyGraph.destroy(),this.columnSearch.destroy(),this.evaluator.destroy(),this._parser.destroy(),this._lazilyTransformingAstService.destroy(),this._stats.destroy(),this._crudOperations.clearClipboard()}},{key:"recomputeIfDependencyGraphNeedsIt",value:function(){if(this._evaluationSuspended)return[];var e=this._crudOperations.getAndClearContentChanges(),t=Array.from(this.dependencyGraph.verticesToRecompute());this.dependencyGraph.clearRecentlyChangedVertices(),t.length>0&&e.addAll(this.evaluator.partialRun(t));var n=e.exportChanges(this._exporter);return e.isEmpty()||this._emitter.emit(f.Events.ValuesUpdated,n),n}}])&&y(t.prototype,n),v&&y(t,v),e}();E.version="0.6.2",E.buildDate="26/05/2021 10:36:03",E.releaseDate="26/05/2021",E.languages={},E.registeredLanguages=new Map},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=r(n(6)),a=function(){function e(t,n){(0,o.default)(this,e),this.row=null,this.col=null,void 0!==t&&void 0!==n&&(this.row=t,this.col=n)}return(0,i.default)(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 this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"normalize",value:function(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}},{key:"clone",value:function(){return new e(this.row,this.col)}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),e}();t.default=a},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=r(n(6)),a=r(n(704)),s=function(){function e(t,n){(0,o.default)(this,e),this.nodesPool="string"==typeof t?new a.default(t):null,this.nodeType=t,this.rootNode=n,this.table=null,this.renderedNodes=0}return(0,i.default)(e,[{key:"setTable",value:function(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}},{key:"adjust",value:function(){}},{key:"render",value:function(){}}]),e}();t.default=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){var n;if("function"==typeof e)a.get(e)||p(null,e),n=a.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=l(e)}if(!n)throw Error('No editor registered under name "'.concat(e,'"'));return n.getInstance(t)},t.registerEditor=p,t.getEditor=function(e){if(!c(e))throw Error('No registered editor found under "'.concat(e,'" name'));return l(e).getConstructor()},t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=void 0,n(3),n(1),n(2),n(9),n(4);var o=r(n(68)),i=r(n(105)),a=new WeakMap,s=(0,i.default)("editors"),u=s.register,l=s.getItem,c=s.hasItem,f=s.getNames,h=s.getValues;function d(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]},o.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function p(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);var n=new d(t);"string"==typeof e&&u(e,n),a.set(t,n)}t.getRegisteredEditors=h,t.getRegisteredEditorNames=f,t.hasEditor=c},function(e,t,n){"use strict";t.__esModule=!0,t.BaseEditor=t.EDITOR_TYPE=t.EDITOR_STATE=void 0;var r=n(726);t.EDITOR_STATE=r.EDITOR_STATE,t.EDITOR_TYPE=r.EDITOR_TYPE,t.BaseEditor=r.BaseEditor},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);var n=t,r=n.editor,o=n.renderer,u=n.validator;r&&(0,i.registerEditor)(e,r);o&&(0,a.registerRenderer)(e,o);u&&(0,s.registerValidator)(e,u);l(e,t)},t.getCellType=function(e){if(!f(e))throw Error('You declared cell type "'.concat(e,'" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method'));return c(e)},t.getRegisteredCellTypes=t.getRegisteredCellTypeNames=t.hasCellType=void 0;var o=r(n(105)),i=n(173),a=n(202),s=n(203),u=(0,o.default)("cellTypes"),l=u.register,c=u.getItem,f=u.hasItem,h=u.getNames,d=u.getValues;t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=h,t.hasCellType=f},function(e,t,n){"use strict";t.__esModule=!0,t.expandMetaType=function(e,t){var n="string"==typeof e?(0,o.getCellType)(e):e;if(!(0,r.isObject)(n))return;var i=(0,r.isObject)(t),a={};return(0,r.objectEach)(n,(function(e,n){"CELL_TYPE"===n||i&&(!i||(0,r.hasOwnProperty)(t,n))||(a[n]=e)})),a},t.columnFactory=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function n(){}(0,r.inherit)(n,e);for(var o=0;o<t.length;o++)n.prototype[t[o]]=void 0;return n},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},t.assert=function(e,t){if(!e())throw new Error("Assertion failed: ".concat(t))},t.isNullish=function(e){return null==e},n(66),n(48);var r=n(15),o=n(175)},function(e,t,n){"use strict";t.__esModule=!0,t.autocompleteRenderer=t.RENDERER_TYPE=void 0;var r=n(789);t.RENDERER_TYPE=r.RENDERER_TYPE,t.autocompleteRenderer=r.autocompleteRenderer},function(e,t,n){"use strict";t.__esModule=!0,t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return i(e,t)},t.toVisualValue=a,t.createArrayAssertion=l,t.toEmptyString=function(e){return null==e?"":e},t.unifyColumnValues=function(e){var t=e;t=u?Array.from(new Set(t)):(0,o.arrayUnique)(t);return t=t.sort((function(e,t){return"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1}))},t.intersectValues=function(e,t,n,r){var i,s=[],u=e===t;u||(i=l(t));return(0,o.arrayEach)(e,(function(e){var t=!1;(u||i(e))&&(t=!0);var o={checked:t,value:e,visualValue:a(e,n)};r&&r(o),s.push(o)})),s},n(3),n(1),n(57),n(2),n(4),n(23),n(30),n(70);var r=n(121),o=n(16),i=(0,r.getComparisonFunction)();function a(e,t){var n=e;return""===n&&(n="(".concat(t,")")),n}var s=new Set([1]).has(1),u=s&&"function"==typeof Array.from;function l(e){var t=e;return s&&(t=new Set(t)),function(e){return s?t.has(e):!!~t.indexOf(e)}}},function(e,t,n){"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!r[e])throw Error('Operation with id "'.concat(e,'" does not exist.'));var t=r[e].func;return function(e,n){return t(e,n)}},t.getOperationName=function(e){return r[e].name},t.registerOperation=function(e,t,n){r[e]={name:t,func:n}},t.operations=void 0,n(25);var r={};t.operations=r},function(e,t,n){"use strict";n(3),n(1),n(2),n(9),n(4),n(17);var r=n(0),o=n(18);t.__esModule=!0,t.default=void 0,n(110);var i=r(n(5)),a=r(n(6)),s=n(15),u=r(n(91)),l=r(n(49)),c=n(21),f=n(16),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(26));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}var p=["click","input","keydown","keypress","keyup","focus","blur","change"],m=function(){function e(t,n){(0,i.default)(this,e),this.hot=t,this.eventManager=new l.default(this),this.options=(0,s.extend)(e.DEFAULTS,n),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName),this.buildState=!1}return(0,a.default)(e,[{key:"setValue",value:function(e){this.options.value=e,this.update()}},{key:"getValue",value:function(){return this.options.value}},{key:"element",get:function(){return"building"===this.buildState?this._element:"built"===this.buildState?(this.update(),this._element):(this.buildState="building",this.build(),this.buildState="built",this._element)}},{key:"isBuilt",value:function(){return"built"===this.buildState}},{key:"translateIfPossible",value:function(e){return"string"==typeof e&&e.startsWith(h.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}},{key:"build",value:function(){var e=this,t=function(t,n){e.eventManager.addEventListener(t,n,(function(t){return e.runLocalHooks(n,t,e)}))};if(this.buildState||(this.buildState="building"),this.options.className&&(0,c.addClass)(this._element,this.options.className),this.options.children.length)(0,f.arrayEach)(this.options.children,(function(t){return e._element.appendChild(t.element)}));else if(this.options.wrapIt){var n=this.hot.rootDocument.createElement(this.options.tagName);(0,s.objectEach)(this.options,(function(t,r){void 0!==n[r]&&"className"!==r&&"tagName"!==r&&"children"!==r&&(n[r]=e.translateIfPossible(t))})),this._element.appendChild(n),(0,f.arrayEach)(p,(function(e){return t(n,e)}))}else(0,f.arrayEach)(p,(function(n){return t(e._element,n)}))}},{key:"update",value:function(){}},{key:"reset",value:function(){this.options.value="",this.update()}},{key:"show",value:function(){this.element.style.display=""}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"focus",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}],[{key:"DEFAULTS",get:function(){return(0,s.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}}]),e}();(0,s.mixin)(m,u.default);var v=m;t.default=v},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(183),o=n(184),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){var r=n(133),o=n(213);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.14.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(46),o=/#|\.prototype\./,i=function(e,t){var n=s[a(e)];return n==l||n!=u&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=i.data={},u=i.NATIVE="N",l=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(78),o=n(86),i=n(182),a=n(302),s=i("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=o(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){var r=n(82).f,o=n(78),i=n(59)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(29),o=n(56),i=n(185),a=n(100),s=n(162),u=n(226),l=n(227),c=n(62),f=n(46),h=n(310),d=n(187),p=n(228);e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),v=-1!==e.indexOf("Weak"),g=m?"set":"add",y=o[e],E=y&&y.prototype,T=y,C={},w=function(e){var t=E[e];a(E,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(v&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof y||!(v||E.forEach&&!f((function(){(new y).entries().next()})))))T=n.getConstructor(t,e,m,g),s.REQUIRED=!0;else if(i(e,!0)){var R=new T,b=R[g](v?{}:-0,1)!=R,O=f((function(){R.has(1)})),S=h((function(e){new y(e)})),N=!v&&f((function(){for(var e=new y,t=5;t--;)e[g](t,t);return!e.has(-0)}));S||((T=t((function(t,n){l(t,T,e);var r=p(new y,t,T);return null!=n&&u(n,r[g],{that:r,AS_ENTRIES:m}),r}))).prototype=E,E.constructor=T),(O||N)&&(w("delete"),w("has"),m&&w("get")),(N||b)&&w(g),v&&E.clear&&delete E.clear}return C[e]=T,r({global:!0,forced:T!=y},C),d(T,e),v||n.setStrong(T,e,m),T}},function(e,t,n){"use strict";var r,o,i=n(231),a=n(232),s=n(183),u=RegExp.prototype.exec,l=s("native-string-replace",String.prototype.replace),c=u,f=(r=/a/,o=/b*/g,u.call(r,"a"),u.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),h=a.UNSUPPORTED_Y||a.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(f||d||h)&&(c=function(e){var t,n,r,o,a=this,s=h&&a.sticky,c=i.call(a),p=a.source,m=0,v=e;return s&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),v=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(p="(?: "+p+")",v=" "+v,m++),n=new RegExp("^(?:"+p+")",c)),d&&(n=new RegExp("^"+p+"$(?!\\s)",c)),f&&(t=a.lastIndex),r=u.call(s?n:a,v),s?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:f&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),d&&r&&r.length>1&&l.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=c},function(e,t,n){"use strict";n(34);var r=n(100),o=n(189),i=n(46),a=n(59),s=n(99),u=a("species"),l=RegExp.prototype,c=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),f="$0"==="a".replace(/./,"$0"),h=a("replace"),d=!!/./[h]&&""===/./[h]("a","$0"),p=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,h){var m=a(e),v=!i((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),g=v&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t}));if(!v||!g||"replace"===e&&(!c||!f||d)||"split"===e&&!p){var y=/./[m],E=n(m,""[e],(function(e,t,n,r,i){var a=t.exec;return a===o||a===l.exec?v&&!i?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),T=E[0],C=E[1];r(String.prototype,e,T),r(l,m,2==t?function(e,t){return C.call(e,this,t)}:function(e){return C.call(e,this)})}h&&s(l[m],"sham",!0)}},function(e,t,n){var r=n(116),o=n(189);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"CellReferenceType",(function(){return r})),n.d(t,"CellAddress",(function(){return s}));n(20);var r,o=n(22),i=n(102);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.CELL_REFERENCE_RELATIVE="CELL_REFERENCE",e.CELL_REFERENCE_ABSOLUTE="CELL_REFERENCE_ABSOLUTE",e.CELL_REFERENCE_ABSOLUTE_COL="CELL_REFERENCE_ABSOLUTE_COL",e.CELL_REFERENCE_ABSOLUTE_ROW="CELL_REFERENCE_ABSOLUTE_ROW"}(r||(r={}));var s=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sheet=t,this.col=n,this.row=r,this.type=o}var t,n,s;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,s=[{key:"relative",value:function(t,n,o){return new e(t,n,o,r.CELL_REFERENCE_RELATIVE)}},{key:"absolute",value:function(t,n,o){return new e(t,n,o,r.CELL_REFERENCE_ABSOLUTE)}},{key:"absoluteCol",value:function(t,n,o){return new e(t,n,o,r.CELL_REFERENCE_ABSOLUTE_COL)}},{key:"absoluteRow",value:function(t,n,o){return new e(t,n,o,r.CELL_REFERENCE_ABSOLUTE_ROW)}}],(n=[{key:"toSimpleCellAddress",value:function(e){var t=Object(o.absoluteSheetReference)(this,e);return this.type===r.CELL_REFERENCE_ABSOLUTE?Object(o.simpleCellAddress)(t,this.col,this.row):this.type===r.CELL_REFERENCE_ABSOLUTE_ROW?Object(o.simpleCellAddress)(t,e.col+this.col,this.row):this.type===r.CELL_REFERENCE_ABSOLUTE_COL?Object(o.simpleCellAddress)(t,this.col,e.row+this.row):Object(o.simpleCellAddress)(t,e.col+this.col,e.row+this.row)}},{key:"toSimpleColumnAddress",value:function(e){var t=Object(o.absoluteSheetReference)(this,e),n=this.col;return this.isColumnRelative()&&(n+=e.col),Object(o.simpleColumnAddress)(t,n)}},{key:"toSimpleRowAddress",value:function(e){var t=Object(o.absoluteSheetReference)(this,e),n=this.row;return this.isRowRelative()&&(n+=e.row),Object(o.simpleRowAddress)(t,n)}},{key:"isRowAbsolute",value:function(){return this.type===r.CELL_REFERENCE_ABSOLUTE||this.type===r.CELL_REFERENCE_ABSOLUTE_ROW}},{key:"isColumnAbsolute",value:function(){return this.type===r.CELL_REFERENCE_ABSOLUTE||this.type===r.CELL_REFERENCE_ABSOLUTE_COL}},{key:"isColumnRelative",value:function(){return this.type===r.CELL_REFERENCE_RELATIVE||this.type===r.CELL_REFERENCE_ABSOLUTE_ROW}},{key:"isRowRelative",value:function(){return this.type===r.CELL_REFERENCE_RELATIVE||this.type===r.CELL_REFERENCE_ABSOLUTE_COL}},{key:"isAbsolute",value:function(){return this.type===r.CELL_REFERENCE_ABSOLUTE&&null!==this.sheet}},{key:"shiftedByRows",value:function(t){return new e(this.sheet,this.col,this.row+t,this.type)}},{key:"shiftedByColumns",value:function(t){return new e(this.sheet,this.col+t,this.row,this.type)}},{key:"moved",value:function(t,n,r){return new e(null===this.sheet?null:t,this.col+n,this.row+r,this.type)}},{key:"withAbsoluteSheet",value:function(t){return new e(t,this.col,this.row,this.type)}},{key:"isInvalid",value:function(e){return Object(o.invalidSimpleCellAddress)(this.toSimpleCellAddress(e))}},{key:"shiftRelativeDimensions",value:function(t,n){var r=this.isColumnAbsolute()?this.col:this.col+t,o=this.isRowAbsolute()?this.row:this.row+n;return new e(this.sheet,r,o,this.type)}},{key:"shiftAbsoluteDimensions",value:function(t,n){var r=this.isColumnRelative()?this.col:this.col+t,o=this.isRowRelative()?this.row:this.row+n;return new e(this.sheet,r,o,this.type)}},{key:"hash",value:function(e){var t=e&&null!==this.sheet?"#".concat(this.sheet):"";switch(this.type){case r.CELL_REFERENCE_RELATIVE:return"".concat(t,"#").concat(this.row,"R").concat(this.col);case r.CELL_REFERENCE_ABSOLUTE:return"".concat(t,"#").concat(this.row,"A").concat(this.col);case r.CELL_REFERENCE_ABSOLUTE_COL:return"".concat(t,"#").concat(this.row,"AC").concat(this.col);case r.CELL_REFERENCE_ABSOLUTE_ROW:return"".concat(t,"#").concat(this.row,"AR").concat(this.col)}}},{key:"unparse",value:function(e){var t=this.toSimpleCellAddress(e);if(!Object(o.invalidSimpleCellAddress)(t)){var n=Object(i.columnIndexToLabel)(t.col),a=this.type===r.CELL_REFERENCE_ABSOLUTE||this.type===r.CELL_REFERENCE_ABSOLUTE_ROW?"$":"",s=this.type===r.CELL_REFERENCE_ABSOLUTE||this.type===r.CELL_REFERENCE_ABSOLUTE_COL?"$":"";return"".concat(s).concat(n).concat(a).concat(t.row+1)}}},{key:"exceedsSheetSizeLimits",value:function(e,t){return this.row>=t||this.col>=e}}])&&a(t.prototype,n),s&&a(t,s),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"clearCache",(function(){return m}));var r=n(234);n.d(t,"VERSION",(function(){return r.VERSION}));var o=n(73);n.d(t,"Parser",(function(){return o.Parser})),n.d(t,"CstParser",(function(){return o.CstParser})),n.d(t,"EmbeddedActionsParser",(function(){return o.EmbeddedActionsParser})),n.d(t,"ParserDefinitionErrorType",(function(){return o.ParserDefinitionErrorType})),n.d(t,"EMPTY_ALT",(function(){return o.EMPTY_ALT}));var i=n(138);n.d(t,"Lexer",(function(){return i.Lexer})),n.d(t,"LexerDefinitionErrorType",(function(){return i.LexerDefinitionErrorType}));var a=n(89);n.d(t,"createToken",(function(){return a.createToken})),n.d(t,"createTokenInstance",(function(){return a.createTokenInstance})),n.d(t,"EOF",(function(){return a.EOF})),n.d(t,"tokenLabel",(function(){return a.tokenLabel})),n.d(t,"tokenMatcher",(function(){return a.tokenMatcher})),n.d(t,"tokenName",(function(){return a.tokenName}));var s=n(126);n.d(t,"defaultGrammarResolverErrorProvider",(function(){return s.defaultGrammarResolverErrorProvider})),n.d(t,"defaultGrammarValidatorErrorProvider",(function(){return s.defaultGrammarValidatorErrorProvider})),n.d(t,"defaultParserErrorProvider",(function(){return s.defaultParserErrorProvider}));var u=n(103);n.d(t,"EarlyExitException",(function(){return u.EarlyExitException})),n.d(t,"isRecognitionException",(function(){return u.isRecognitionException})),n.d(t,"MismatchedTokenException",(function(){return u.MismatchedTokenException})),n.d(t,"NotAllInputParsedException",(function(){return u.NotAllInputParsedException})),n.d(t,"NoViableAltException",(function(){return u.NoViableAltException}));var l=n(238);n.d(t,"defaultLexerErrorProvider",(function(){return l.defaultLexerErrorProvider}));var c=n(53);n.d(t,"Alternation",(function(){return c.Alternation})),n.d(t,"Flat",(function(){return c.Flat})),n.d(t,"NonTerminal",(function(){return c.NonTerminal})),n.d(t,"Option",(function(){return c.Option})),n.d(t,"Repetition",(function(){return c.Repetition})),n.d(t,"RepetitionMandatory",(function(){return c.RepetitionMandatory})),n.d(t,"RepetitionMandatoryWithSeparator",(function(){return c.RepetitionMandatoryWithSeparator})),n.d(t,"RepetitionWithSeparator",(function(){return c.RepetitionWithSeparator})),n.d(t,"Rule",(function(){return c.Rule})),n.d(t,"Terminal",(function(){return c.Terminal})),n.d(t,"serializeGrammar",(function(){return c.serializeGrammar})),n.d(t,"serializeProduction",(function(){return c.serializeProduction}));var f=n(125);n.d(t,"GAstVisitor",(function(){return f.GAstVisitor}));var h=n(167);n.d(t,"assignOccurrenceIndices",(function(){return h.assignOccurrenceIndices})),n.d(t,"resolveGrammar",(function(){return h.resolveGrammar})),n.d(t,"validateGrammar",(function(){return h.validateGrammar}));var d=n(329);n.d(t,"createSyntaxDiagramsCode",(function(){return d.createSyntaxDiagramsCode}));var p=n(240);function m(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}n.d(t,"generateParserFactory",(function(){return p.generateParserFactory})),n.d(t,"generateParserModule",(function(){return p.generateParserModule}))},function(e,t,n){"use strict";n.r(t),n.d(t,"validateGrammar",(function(){return d})),n.d(t,"identifyProductionForDuplicates",(function(){return p})),n.d(t,"OccurrenceValidationCollector",(function(){return v})),n.d(t,"validTermsPattern",(function(){return g})),n.d(t,"validNestedRuleName",(function(){return y})),n.d(t,"validateRuleName",(function(){return E})),n.d(t,"validateNestedRuleName",(function(){return T})),n.d(t,"validateTokenName",(function(){return C})),n.d(t,"validateRuleDoesNotAlreadyExist",(function(){return w})),n.d(t,"validateRuleIsOverridden",(function(){return R})),n.d(t,"validateNoLeftRecursion",(function(){return b})),n.d(t,"getFirstNoneTerminal",(function(){return O})),n.d(t,"validateEmptyOrAlternative",(function(){return N})),n.d(t,"validateAmbiguousAlternationAlternatives",(function(){return A})),n.d(t,"RepetionCollector",(function(){return M})),n.d(t,"validateTooManyAlts",(function(){return k})),n.d(t,"validateSomeNonEmptyLookaheadPath",(function(){return _})),n.d(t,"checkPrefixAlternativesAmbiguities",(function(){return I}));var r,o=n(42),i=n(73),a=n(165),s=n(195),u=n(239),l=n(196),c=n(53),f=n(125),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function d(e,t,n,r,s,l){var c=o.map(e,(function(e){return function(e,t){var n=new v;e.accept(n);var r=n.allProductions,s=o.groupBy(r,p),u=o.pick(s,(function(e){return e.length>1}));return o.map(o.values(u),(function(n){var r=o.first(n),s=t.buildDuplicateFoundError(e,n),u=Object(a.getProductionDslName)(r),l={message:s,type:i.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:u,occurrence:r.idx},c=m(r);return c&&(l.parameter=c),l}))}(e,s)})),f=o.map(e,(function(e){return b(e,e,s)})),h=[],d=[],g=[];Object(o.every)(f,o.isEmpty)&&(h=Object(o.map)(e,(function(e){return N(e,s)})),d=Object(o.map)(e,(function(e){return A(e,t,r,s)})),g=_(e,t,s));var y=function(e,t,n){var r=[],a=Object(o.map)(t,(function(e){return e.name}));return Object(o.forEach)(e,(function(e){var t=e.name;if(Object(o.contains)(a,t)){var s=n.buildNamespaceConflictError(e);r.push({message:s,type:i.ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}(e,n,s),R=o.map(n,(function(e){return C(e,s)})),O=function(e,t){var n=[];return Object(o.forEach)(e,(function(e){var r=new u.NamedDSLMethodsCollectorVisitor("");e.accept(r);var i=Object(o.map)(r.result,(function(e){return e.orgProd}));n.push(Object(o.map)(i,(function(n){return T(e,n,t)})))})),Object(o.flatten)(n)}(e,s),S=function(e,t){var n=[];return Object(o.forEach)(e,(function(e){var r=new u.NamedDSLMethodsCollectorVisitor("");e.accept(r);var a=Object(o.groupBy)(r.result,(function(e){return e.name})),s=Object(o.pick)(a,(function(e){return e.length>1}));Object(o.forEach)(Object(o.values)(s),(function(r){var a=Object(o.map)(r,(function(e){return e.orgProd})),s=t.buildDuplicateNestedRuleNameError(e,a);n.push({message:s,type:i.ParserDefinitionErrorType.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),n}(e,s),M=Object(o.map)(e,(function(e){return k(e,s)})),I=Object(o.map)(e,(function(e){return E(e,s)})),x=Object(o.map)(e,(function(t){return w(t,e,l,s)}));return o.flatten(c.concat(R,O,S,g,f,h,d,y,M,I,x))}function p(e){return Object(a.getProductionDslName)(e)+"_#_"+e.idx+"_#_"+m(e)}function m(e){return e instanceof c.Terminal?e.terminalType.name:e instanceof c.NonTerminal?e.nonTerminalName:""}var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return h(t,e),t.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},t.prototype.visitOption=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t.prototype.visitAlternation=function(e){this.allProductions.push(e)},t.prototype.visitTerminal=function(e){this.allProductions.push(e)},t}(f.GAstVisitor),g=/^[a-zA-Z_]\w*$/,y=new RegExp(g.source.replace("^","^\\$"));function E(e,t){var n=[],r=e.name;return r.match(g)||n.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:g}),type:i.ParserDefinitionErrorType.INVALID_RULE_NAME,ruleName:r}),n}function T(e,t,n){var r,o=[];return t.name.match(y)||(r=n.buildInvalidNestedRuleNameError(e,t),o.push({message:r,type:i.ParserDefinitionErrorType.INVALID_NESTED_RULE_NAME,ruleName:e.name})),o}function C(e,t){var n=[];return e.name.match(g)||n.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:g}),type:i.ParserDefinitionErrorType.INVALID_TOKEN_NAME}),n}function w(e,t,n,r){var a=[];if(Object(o.reduce)(t,(function(t,n){return n.name===e.name?t+1:t}),0)>1){var s=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});a.push({message:s,type:i.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}function R(e,t,n){var r,a=[];return o.contains(t,e)||(r="Invalid rule override, rule: ->"+e+"<- cannot be overridden in the grammar: ->"+n+"<-as it is not defined in any of the super grammars ",a.push({message:r,type:i.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:e})),a}function b(e,t,n,r){void 0===r&&(r=[]);var a=[],s=O(t.definition);if(o.isEmpty(s))return[];var u=e.name;o.contains(s,e)&&a.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:i.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:u});var l=o.difference(s,r.concat([e])),c=o.map(l,(function(t){var i=o.cloneArr(r);return i.push(t),b(e,t,n,i)}));return a.concat(o.flatten(c))}function O(e){var t=[];if(o.isEmpty(e))return t;var n=o.first(e);if(n instanceof c.NonTerminal)t.push(n.referencedRule);else if(n instanceof c.Flat||n instanceof c.Option||n instanceof c.RepetitionMandatory||n instanceof c.RepetitionMandatoryWithSeparator||n instanceof c.RepetitionWithSeparator||n instanceof c.Repetition)t=t.concat(O(n.definition));else if(n instanceof c.Alternation)t=o.flatten(o.map(n.definition,(function(e){return O(e.definition)})));else if(!(n instanceof c.Terminal))throw Error("non exhaustive match");var r=Object(a.isOptionalProd)(n),i=e.length>1;if(r&&i){var s=o.drop(e);return t.concat(O(s))}return t}var S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return h(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(f.GAstVisitor);function N(e,t){var n=new S;e.accept(n);var r=n.alternations;return o.reduce(r,(function(n,r){var a=o.dropRight(r.definition),s=o.map(a,(function(n,a){var s=Object(l.nextPossibleTokensAfter)([n],[],null,1);return o.isEmpty(s)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:a}),type:i.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:a+1}:null}));return n.concat(o.compact(s))}),[])}function A(e,t,n,r){var u=new S;e.accept(u);var l=u.alternations,c=n[e.name];return c&&(l=Object(o.reject)(l,(function(e){return c[Object(a.getProductionDslName)(e)+(0===e.idx?"":e.idx)]}))),l=Object(o.reject)(l,(function(e){return!0===e.ignoreAmbiguities})),o.reduce(l,(function(n,a){var u=a.idx,l=a.maxLookahead||t,c=Object(s.getLookaheadPathsForOr)(u,e,l,a),f=function(e,t,n,r){var a=[],u=Object(o.reduce)(e,(function(n,r,i){return!0===t.definition[i].ignoreAmbiguities||Object(o.forEach)(r,(function(r){var u=[i];Object(o.forEach)(e,(function(e,n){i!==n&&Object(s.containsPath)(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&u.push(n)})),u.length>1&&!Object(s.containsPath)(a,r)&&(a.push(r),n.push({alts:u,path:r}))})),n}),[]);return o.map(u,(function(e){var a=Object(o.map)(e.alts,(function(e){return e+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:a,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:[e.alts]}}))}(c,a,e,r),h=I(c,a,e,r);return n.concat(f,h)}),[])}var M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return h(t,e),t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t}(f.GAstVisitor);function k(e,t){var n=new S;e.accept(n);var r=n.alternations;return o.reduce(r,(function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:i.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n}),[])}function _(e,t,n){var r=[];return Object(o.forEach)(e,(function(e){var a=new M;e.accept(a);var u=a.allProductions;Object(o.forEach)(u,(function(a){var u=Object(s.getProdType)(a),l=a.maxLookahead||t,c=a.idx,f=Object(s.getLookaheadPathsForOptionalProd)(c,e,u,l)[0];if(Object(o.isEmpty)(Object(o.flatten)(f))){var h=n.buildEmptyRepetitionError({topLevelRule:e,repetition:a});r.push({message:h,type:i.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}function I(e,t,n,r){var a=[],u=Object(o.reduce)(e,(function(e,t,n){var r=Object(o.map)(t,(function(e){return{idx:n,path:e}}));return e.concat(r)}),[]);return Object(o.forEach)(u,(function(e){if(!0!==t.definition[e.idx].ignoreAmbiguities){var l=e.idx,c=e.path,f=Object(o.findAll)(u,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<l&&Object(s.isStrictPrefixOfPath)(e.path,c)})),h=Object(o.map)(f,(function(e){var o=[e.idx+1,l+1],a=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:o,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:a,alternatives:o}}));a=a.concat(h)}})),a}},function(e,t,n){"use strict";n.r(t),n.d(t,"PROD_TYPE",(function(){return o})),n.d(t,"getProdType",(function(){return h})),n.d(t,"buildLookaheadFuncForOr",(function(){return d})),n.d(t,"buildLookaheadFuncForOptionalProd",(function(){return p})),n.d(t,"buildAlternativesLookAheadFunc",(function(){return m})),n.d(t,"buildSingleAlternativeLookaheadFunction",(function(){return v})),n.d(t,"lookAheadSequenceFromAlternatives",(function(){return w})),n.d(t,"getLookaheadPathsForOr",(function(){return R})),n.d(t,"getLookaheadPathsForOptionalProd",(function(){return b})),n.d(t,"containsPath",(function(){return O})),n.d(t,"isStrictPrefixOfPath",(function(){return S})),n.d(t,"areTokenCategoriesNotUsed",(function(){return N}));var r,o,i=n(42),a=n(196),s=n(235),u=n(164),l=n(53),c=n(125),f=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function h(e){if(e instanceof l.Option)return o.OPTION;if(e instanceof l.Repetition)return o.REPETITION;if(e instanceof l.RepetitionMandatory)return o.REPETITION_MANDATORY;if(e instanceof l.RepetitionMandatoryWithSeparator)return o.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof l.RepetitionWithSeparator)return o.REPETITION_WITH_SEPARATOR;if(e instanceof l.Alternation)return o.ALTERNATION;throw Error("non exhaustive match")}function d(e,t,n,r,o,i){var a=R(e,t,n);return i(a,r,N(a)?u.tokenStructuredMatcherNoCategories:u.tokenStructuredMatcher,o)}function p(e,t,n,r,o,i){var a=b(e,t,o,n),s=N(a)?u.tokenStructuredMatcherNoCategories:u.tokenStructuredMatcher;return i(a[0],s,r)}function m(e,t,n,r){var o=e.length,a=Object(i.every)(e,(function(e){return Object(i.every)(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var r=Object(i.map)(t,(function(e){return e.GATE})),a=0;a<o;a++){var s=e[a],u=s.length,l=r[a];if(void 0===l||!1!==l.call(this))e:for(var c=0;c<u;c++){for(var f=s[c],h=f.length,d=0;d<h;d++){var p=this.LA(d+1);if(!1===n(p,f[d]))continue e}return a}}};if(a&&!r){var s=Object(i.map)(e,(function(e){return Object(i.flatten)(e)})),u=Object(i.reduce)(s,(function(e,t,n){return Object(i.forEach)(t,(function(t){Object(i.has)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),Object(i.forEach)(t.categoryMatches,(function(t){Object(i.has)(e,t)||(e[t]=n)}))})),e}),[]);return function(){var e=this.LA(1);return u[e.tokenTypeIdx]}}return function(){for(var t=0;t<o;t++){var r=e[t],i=r.length;e:for(var a=0;a<i;a++){for(var s=r[a],u=s.length,l=0;l<u;l++){var c=this.LA(l+1);if(!1===n(c,s[l]))continue e}return t}}}}function v(e,t,n){var r=Object(i.every)(e,(function(e){return 1===e.length})),o=e.length;if(r&&!n){var a=Object(i.flatten)(e);if(1===a.length&&Object(i.isEmpty)(a[0].categoryMatches)){var s=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}var u=Object(i.reduce)(a,(function(e,t,n){return e[t.tokenTypeIdx]=!0,Object(i.forEach)(t.categoryMatches,(function(t){e[t]=!0})),e}),[]);return function(){var e=this.LA(1);return!0===u[e.tokenTypeIdx]}}return function(){e:for(var n=0;n<o;n++){for(var r=e[n],i=r.length,a=0;a<i;a++){var s=this.LA(a+1);if(!1===t(s,r[a]))continue e}return!0}return!1}}!function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"}(o||(o={}));var g=function(e){function t(t,n,r){var o=e.call(this)||this;return o.topProd=t,o.targetOccurrence=n,o.targetProdType=r,o}return f(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)},t.prototype.walkOption=function(t,n,r){this.checkIsTarget(t,o.OPTION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOne=function(t,n,r){this.checkIsTarget(t,o.REPETITION_MANDATORY,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOneSep=function(t,n,r){this.checkIsTarget(t,o.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkMany=function(t,n,r){this.checkIsTarget(t,o.REPETITION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkManySep=function(t,n,r){this.checkIsTarget(t,o.REPETITION_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t}(s.RestWalker),y=function(e){function t(t,n,r){var o=e.call(this)||this;return o.targetOccurrence=t,o.targetProdType=n,o.targetRef=r,o.result=[],o}return f(t,e),t.prototype.checkIsTarget=function(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)},t.prototype.visitOption=function(e){this.checkIsTarget(e,o.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,o.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,o.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,o.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,o.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,o.ALTERNATION)},t}(c.GAstVisitor);function E(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=[];return t}function T(e){for(var t=[""],n=0;n<e.length;n++){for(var r=e[n],o=[],i=0;i<t.length;i++){var a=t[i];o.push(a+"_"+r.tokenTypeIdx);for(var s=0;s<r.categoryMatches.length;s++){var u="_"+r.categoryMatches[s];o.push(a+u)}}t=o}return t}function C(e,t,n){for(var r=0;r<e.length;r++)if(r!==n)for(var o=e[r],i=0;i<t.length;i++){if(!0===o[t[i]])return!1}return!0}function w(e,t){for(var n=Object(i.map)(e,(function(e){return Object(a.possiblePathsFrom)([e],1)})),r=E(n.length),o=Object(i.map)(n,(function(e){var t={};return Object(i.forEach)(e,(function(e){var n=T(e.partialPath);Object(i.forEach)(n,(function(e){t[e]=!0}))})),t})),s=n,u=1;u<=t;u++){var l=s;s=E(l.length);for(var c=function(e){for(var n=l[e],c=0;c<n.length;c++){var f=n[c].partialPath,h=n[c].suffixDef,d=T(f);if(C(o,d,e)||Object(i.isEmpty)(h)||f.length===t){var p=r[e];if(!1===O(p,f)){p.push(f);for(var m=0;m<d.length;m++){var v=d[m];o[e][v]=!0}}}else{var g=Object(a.possiblePathsFrom)(h,u+1,f);s[e]=s[e].concat(g),Object(i.forEach)(g,(function(t){var n=T(t.partialPath);Object(i.forEach)(n,(function(t){o[e][t]=!0}))}))}}},f=0;f<l.length;f++)c(f)}return r}function R(e,t,n,r){var i=new y(e,o.ALTERNATION,r);return t.accept(i),w(i.result,n)}function b(e,t,n,r){var o=new y(e,n);t.accept(o);var i=o.result,a=new g(t,e,n).startWalking();return w([new l.Flat({definition:i}),new l.Flat({definition:a})],r)}function O(e,t){e:for(var n=0;n<e.length;n++){var r=e[n];if(r.length===t.length){for(var o=0;o<r.length;o++){var i=t[o],a=r[o];if(!1===(i===a||void 0!==a.categoryMatchesMap[i.tokenTypeIdx]))continue e}return!0}}return!1}function S(e,t){return e.length<t.length&&Object(i.every)(e,(function(e,n){var r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}function N(e){return Object(i.every)(e,(function(e){return Object(i.every)(e,(function(e){return Object(i.every)(e,(function(e){return Object(i.isEmpty)(e.categoryMatches)}))}))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"AbstractNextPossibleTokensWalker",(function(){return l})),n.d(t,"NextAfterTokenWalker",(function(){return c})),n.d(t,"AbstractNextTerminalAfterProductionWalker",(function(){return f})),n.d(t,"NextTerminalAfterManyWalker",(function(){return h})),n.d(t,"NextTerminalAfterManySepWalker",(function(){return d})),n.d(t,"NextTerminalAfterAtLeastOneWalker",(function(){return p})),n.d(t,"NextTerminalAfterAtLeastOneSepWalker",(function(){return m})),n.d(t,"possiblePathsFrom",(function(){return v})),n.d(t,"nextPossibleTokensAfter",(function(){return g}));var r,o=n(235),i=n(42),a=n(325),s=n(53),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t,n){var r=e.call(this)||this;return r.topProd=t,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return u(t,e),t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,n){void 0===n&&(n=[]),this.found||e.prototype.walk.call(this,t,n)},t.prototype.walkProdRef=function(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}},t.prototype.updateExpectedNext=function(){Object(i.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(o.RestWalker),c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return u(t,e),t.prototype.walkTerminal=function(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var r=t.concat(n),o=new s.Flat({definition:r});this.possibleTokTypes=Object(a.first)(o),this.found=!0}},t}(l),f=function(e){function t(t,n){var r=e.call(this)||this;return r.topRule=t,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return u(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(o.RestWalker),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.walkMany=function(t,n,r){if(t.idx===this.occurrence){var o=Object(i.first)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof s.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,n,r)},t}(f),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.walkManySep=function(t,n,r){if(t.idx===this.occurrence){var o=Object(i.first)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof s.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,n,r)},t}(f),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.walkAtLeastOne=function(t,n,r){if(t.idx===this.occurrence){var o=Object(i.first)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof s.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,r)},t}(f),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.walkAtLeastOneSep=function(t,n,r){if(t.idx===this.occurrence){var o=Object(i.first)(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof s.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,r)},t}(f);function v(e,t,n){void 0===n&&(n=[]),n=Object(i.cloneArr)(n);var r=[],o=0;function a(a){var s=v(a.concat(Object(i.drop)(e,o+1)),t,n);return r.concat(s)}for(;n.length<t&&o<e.length;){var u=e[o];if(u instanceof s.Flat)return a(u.definition);if(u instanceof s.NonTerminal)return a(u.definition);if(u instanceof s.Option)r=a(u.definition);else{if(u instanceof s.RepetitionMandatory)return a(l=u.definition.concat([new s.Repetition({definition:u.definition})]));if(u instanceof s.RepetitionMandatoryWithSeparator)return a(l=[new s.Flat({definition:u.definition}),new s.Repetition({definition:[new s.Terminal({terminalType:u.separator})].concat(u.definition)})]);if(u instanceof s.RepetitionWithSeparator){var l=u.definition.concat([new s.Repetition({definition:[new s.Terminal({terminalType:u.separator})].concat(u.definition)})]);r=a(l)}else if(u instanceof s.Repetition){l=u.definition.concat([new s.Repetition({definition:u.definition})]);r=a(l)}else{if(u instanceof s.Alternation)return Object(i.forEach)(u.definition,(function(e){r=a(e.definition)})),r;if(!(u instanceof s.Terminal))throw Error("non exhaustive match");n.push(u.terminalType)}}o++}return r.push({partialPath:n,suffixDef:Object(i.drop)(e,o)}),r}function g(e,t,n,r){var o=["EXIT_NONE_TERMINAL"],a=!1,u=t.length,l=u-r-1,c=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Object(i.isEmpty)(f);){var h=f.pop();if("EXIT_ALTERNATIVE"!==h){var d=h.def,p=h.idx,m=h.ruleStack,v=h.occurrenceStack;if(!Object(i.isEmpty)(d)){var g=d[0];if("EXIT_NONE_TERMINAL"===g){var E={idx:p,def:Object(i.drop)(d),ruleStack:Object(i.dropRight)(m),occurrenceStack:Object(i.dropRight)(v)};f.push(E)}else if(g instanceof s.Terminal)if(p<u-1){var T=p+1;if(n(t[T],g.terminalType)){E={idx:T,def:Object(i.drop)(d),ruleStack:m,occurrenceStack:v};f.push(E)}}else{if(p!==u-1)throw Error("non exhaustive match");c.push({nextTokenType:g.terminalType,nextTokenOccurrence:g.idx,ruleStack:m,occurrenceStack:v}),a=!0}else if(g instanceof s.NonTerminal){var C=Object(i.cloneArr)(m);C.push(g.nonTerminalName);var w=Object(i.cloneArr)(v);w.push(g.idx);E={idx:p,def:g.definition.concat(o,Object(i.drop)(d)),ruleStack:C,occurrenceStack:w};f.push(E)}else if(g instanceof s.Option){var R={idx:p,def:Object(i.drop)(d),ruleStack:m,occurrenceStack:v};f.push(R),f.push("EXIT_ALTERNATIVE");var b={idx:p,def:g.definition.concat(Object(i.drop)(d)),ruleStack:m,occurrenceStack:v};f.push(b)}else if(g instanceof s.RepetitionMandatory){var O=new s.Repetition({definition:g.definition,idx:g.idx});E={idx:p,def:g.definition.concat([O],Object(i.drop)(d)),ruleStack:m,occurrenceStack:v};f.push(E)}else if(g instanceof s.RepetitionMandatoryWithSeparator){var S=new s.Terminal({terminalType:g.separator});O=new s.Repetition({definition:[S].concat(g.definition),idx:g.idx}),E={idx:p,def:g.definition.concat([O],Object(i.drop)(d)),ruleStack:m,occurrenceStack:v};f.push(E)}else if(g instanceof s.RepetitionWithSeparator){R={idx:p,def:Object(i.drop)(d),ruleStack:m,occurrenceStack:v};f.push(R),f.push("EXIT_ALTERNATIVE");S=new s.Terminal({terminalType:g.separator});var N=new s.Repetition({definition:[S].concat(g.definition),idx:g.idx});b={idx:p,def:g.definition.concat([N],Object(i.drop)(d)),ruleStack:m,occurrenceStack:v};f.push(b)}else if(g instanceof s.Repetition){R={idx:p,def:Object(i.drop)(d),ruleStack:m,occurrenceStack:v};f.push(R),f.push("EXIT_ALTERNATIVE");N=new s.Repetition({definition:g.definition,idx:g.idx}),b={idx:p,def:g.definition.concat([N],Object(i.drop)(d)),ruleStack:m,occurrenceStack:v};f.push(b)}else if(g instanceof s.Alternation)for(var A=g.definition.length-1;A>=0;A--){var M={idx:p,def:g.definition[A].definition.concat(Object(i.drop)(d)),ruleStack:m,occurrenceStack:v};f.push(M),f.push("EXIT_ALTERNATIVE")}else if(g instanceof s.Flat)f.push({idx:p,def:g.definition.concat(Object(i.drop)(d)),ruleStack:m,occurrenceStack:v});else{if(!(g instanceof s.Rule))throw Error("non exhaustive match");f.push(y(g,p,m,v))}}}else a&&Object(i.last)(f).idx<=l&&f.pop()}return c}function y(e,t,n,r){var o=Object(i.cloneArr)(n);o.push(e.name);var a=Object(i.cloneArr)(r);return a.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:a}}},function(e,t,n){"use strict";n.r(t),n.d(t,"absolutizeDependencies",(function(){return a})),n.d(t,"filterDependenciesOutOfScope",(function(){return s}));n(41),n(38);var r=n(22),o=n(69),i=n(79),a=function(e,t){return e.map((function(e){return e.absolutize(t)}))},s=function(e){return e.filter((function(e){return e instanceof o.NamedExpressionDependency||(e instanceof i.AbsoluteCellRange?!(Object(r.invalidSimpleCellAddress)(e.start)||Object(r.invalidSimpleCellAddress)(e.end)):!Object(r.invalidSimpleCellAddress)(e))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"UIElement",(function(){return r}));var r,o=n(253);n.d(t,"TranslationPackage",(function(){return o.TranslationPackage})),n.d(t,"buildTranslationPackage",(function(){return o.buildTranslationPackage})),function(e){e.NEW_SHEET_PREFIX="NEW_SHEET_PREFIX"}(r||(r={}))},function(e,t,n){"use strict";n.r(t),n.d(t,"InternalNamedExpression",(function(){return u})),n.d(t,"NamedExpressions",(function(){return f})),n.d(t,"doesContainRelativeReferences",(function(){return h}));n(3),n(33),n(1),n(2),n(4),n(38),n(23),n(41),n(27);var r=n(22),o=n(69);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var u=function(){function e(t,n,r,o){i(this,e),this.displayName=t,this.address=n,this.added=r,this.options=o}return s(e,[{key:"normalizeExpressionName",value:function(){return this.displayName.toLowerCase()}},{key:"copy",value:function(){return new e(this.displayName,this.address,this.added,this.options)}}]),e}(),l=function(){function e(){i(this,e),this.mapping=new Map}return s(e,[{key:"has",value:function(e){return this.mapping.has(this.normalizeExpressionName(e))}},{key:"isNameAvailable",value:function(e){var t=this.normalizeExpressionName(e),n=this.mapping.get(t);return!(n&&n.added)}},{key:"add",value:function(e){this.mapping.set(e.normalizeExpressionName(),e)}},{key:"get",value:function(e){return this.mapping.get(this.normalizeExpressionName(e))}},{key:"getExisting",value:function(e){var t=this.mapping.get(this.normalizeExpressionName(e));return t&&t.added?t:void 0}},{key:"remove",value:function(e){var t=this.normalizeExpressionName(e),n=this.mapping.get(t);n&&(n.added=!1)}},{key:"getAllNamedExpressions",value:function(){return Array.from(this.mapping.values()).filter((function(e){return e.added}))}},{key:"normalizeExpressionName",value:function(e){return e.toLowerCase()}}]),e}(),c=function(){function e(){i(this,e),this.mapping=new Map}return s(e,[{key:"add",value:function(e){this.mapping.set(this.normalizeExpressionName(e.displayName),e)}},{key:"get",value:function(e){return this.mapping.get(this.normalizeExpressionName(e))}},{key:"has",value:function(e){return this.mapping.has(this.normalizeExpressionName(e))}},{key:"getAllNamedExpressions",value:function(){return Array.from(this.mapping.values()).filter((function(e){return e.added}))}},{key:"normalizeExpressionName",value:function(e){return e.toLowerCase()}},{key:"isNameAvailable",value:function(e){var t=this.normalizeExpressionName(e);return!this.mapping.has(t)}},{key:"remove",value:function(e){var t=this.normalizeExpressionName(e);this.mapping.get(t)&&this.mapping.delete(t)}}]),e}(),f=function(){function e(){i(this,e),this.nextNamedExpressionRow=0,this.workbookStore=new l,this.worksheetStores=new Map,this.addressCache=new Map}return s(e,[{key:"isNameAvailable",value:function(e,t){var n,r;return void 0===t?this.workbookStore.isNameAvailable(e):null===(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.isNameAvailable(e))||void 0===r||r}},{key:"namedExpressionInAddress",value:function(e){var t=this.addressCache.get(e);return t&&t.added?t:void 0}},{key:"namedExpressionForScope",value:function(e,t){var n;return void 0===t?this.workbookStore.getExisting(e):null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e)}},{key:"nearestNamedExpression",value:function(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e))&&void 0!==r?r:this.workbookStore.getExisting(e)}},{key:"isExpressionInScope",value:function(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.has(e))&&void 0!==r&&r}},{key:"isNameValid",value:function(e){return!/^[A-Za-z]+[0-9]+$/.test(e)&&/^[A-Za-z\u00C0-\u02AF_][A-Za-z0-9\u00C0-\u02AF._]*$/.test(e)}},{key:"addNamedExpression",value:function(e,t,n){var r=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t),o=r.get(e);return o?(o.added=!0,o.displayName=e,o.options=n):(o=new u(e,this.nextAddress(),!0,n),r.add(o)),this.addressCache.set(o.address.row,o),o}},{key:"restoreNamedExpression",value:function(e,t){var n=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);return e.added=!0,n.add(e),this.addressCache.set(e.address.row,e),e}},{key:"worksheetStoreOrCreate",value:function(e){var t=this.worksheetStores.get(e);return t||(t=new c,this.worksheetStores.set(e,t)),t}},{key:"worksheetStore",value:function(e){return this.worksheetStores.get(e)}},{key:"namedExpressionOrPlaceholder",value:function(e,t){var n;return null!==(n=this.worksheetStoreOrCreate(t).get(e))&&void 0!==n?n:this.workbookNamedExpressionOrPlaceholder(e)}},{key:"workbookNamedExpressionOrPlaceholder",value:function(e){var t=this.workbookStore.get(e);return void 0===t&&(t=new u(e,this.nextAddress(),!1),this.workbookStore.add(t)),t}},{key:"remove",value:function(e,t){var n,r=null==(n=void 0===t?this.workbookStore:this.worksheetStore(t))?void 0:n.get(e);if(void 0===n||void 0===r||!r.added)throw"Named expression does not exist";n.remove(e),n instanceof c&&0===n.mapping.size&&this.worksheetStores.delete(t),this.addressCache.delete(r.address.row)}},{key:"getAllNamedExpressionsNamesInScope",value:function(e){return this.getAllNamedExpressions().filter((function(t){return t.scope===e})).map((function(e){return e.expression.displayName}))}},{key:"getAllNamedExpressionsNames",value:function(){return this.getAllNamedExpressions().map((function(e){return e.expression.displayName}))}},{key:"getAllNamedExpressions",value:function(){var e=[];return this.workbookStore.getAllNamedExpressions().forEach((function(t){e.push({expression:t,scope:void 0})})),this.worksheetStores.forEach((function(t,n){t.getAllNamedExpressions().forEach((function(t){e.push({expression:t,scope:n})}))})),e}},{key:"getAllNamedExpressionsForScope",value:function(e){var t,n;return void 0===e?this.workbookStore.getAllNamedExpressions():null!==(n=null===(t=this.worksheetStores.get(e))||void 0===t?void 0:t.getAllNamedExpressions())&&void 0!==n?n:[]}},{key:"nextAddress",value:function(){return Object(r.simpleCellAddress)(e.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}},{key:"lookupNextAddress",value:function(t,n){if(void 0===n){var o=this.workbookStore.get(t);if(o)return o.address}return Object(r.simpleCellAddress)(e.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow)}}]),e}();f.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;var h=function e(t){switch(t.type){case o.AstNodeType.EMPTY:case o.AstNodeType.NUMBER:case o.AstNodeType.STRING:case o.AstNodeType.ERROR:case o.AstNodeType.ERROR_WITH_RAW_INPUT:return!1;case o.AstNodeType.CELL_REFERENCE:return!t.reference.isAbsolute();case o.AstNodeType.CELL_RANGE:case o.AstNodeType.COLUMN_RANGE:case o.AstNodeType.ROW_RANGE:return!t.start.isAbsolute();case o.AstNodeType.NAMED_EXPRESSION:return!1;case o.AstNodeType.PERCENT_OP:case o.AstNodeType.PLUS_UNARY_OP:case o.AstNodeType.MINUS_UNARY_OP:return e(t.value);case o.AstNodeType.CONCATENATE_OP:case o.AstNodeType.EQUALS_OP:case o.AstNodeType.NOT_EQUAL_OP:case o.AstNodeType.LESS_THAN_OP:case o.AstNodeType.GREATER_THAN_OP:case o.AstNodeType.LESS_THAN_OR_EQUAL_OP:case o.AstNodeType.GREATER_THAN_OR_EQUAL_OP:case o.AstNodeType.MINUS_OP:case o.AstNodeType.PLUS_OP:case o.AstNodeType.TIMES_OP:case o.AstNodeType.DIV_OP:case o.AstNodeType.POWER_OP:return e(t.left)||e(t.right);case o.AstNodeType.PARENTHESIS:return e(t.expression);case o.AstNodeType.FUNCTION_CALL:return t.args.some((function(t){return e(t)}))}}},function(e,t,n){"use strict";n.r(t),n.d(t,"ExportedCellChange",(function(){return d})),n.d(t,"ExportedNamedExpressionChange",(function(){return p})),n.d(t,"Exporter",(function(){return m}));n(25),n(347);var r=n(22),o=n(257),i=n(39),a=n(50),s=n(98),u=n(199),l=n(102);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(){function e(t,n){c(this,e),this.address=t,this.newValue=n}return h(e,[{key:"col",get:function(){return this.address.col}},{key:"row",get:function(){return this.address.row}},{key:"sheet",get:function(){return this.address.sheet}},{key:"value",get:function(){return this.newValue}}]),e}(),p=function e(t,n){c(this,e),this.name=t,this.newValue=n},m=function(){function e(t,n,r){c(this,e),this.config=t,this.namedExpressions=n,this.sheetIndexMapping=r}return h(e,[{key:"exportChange",value:function(e){if(e.sheet===u.NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS){var t=this.namedExpressions.namedExpressionInAddress(e.row);if(!t)throw"Missing named expression";return new p(t.displayName,this.exportValue(e.value))}return new d(Object(r.simpleCellAddress)(e.sheet,e.col,e.row),this.exportValue(e.value))}},{key:"exportValue",value:function(e){return e instanceof s.SimpleRangeValue?this.detailedError(new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.ScalarExpected)):this.config.smartRounding&&Object(a.isExtendedNumber)(e)?this.cellValueRounding(Object(a.getRawValue)(e)):e instanceof r.CellError?this.detailedError(e):e===a.EmptyValue?null:Object(a.getRawValue)(e)}},{key:"detailedError",value:function(e){var t,n=void 0,r=e.address;return void 0!==r&&(n=r.sheet===u.NamedExpressions.SHEET_FOR_WORKBOOK_EXPRESSIONS?null===(t=this.namedExpressions.namedExpressionInAddress(r.row))||void 0===t?void 0:t.displayName:Object(l.simpleCellAddressToString)(this.sheetIndexMapping,r,-1)),new o.DetailedCellError(e,this.config.translationPackage.getErrorTranslation(e.type),n)}},{key:"cellValueRounding",value:function(e){if(0===e)return e;var t=Math.floor(Math.log10(Math.abs(e))),n=Math.pow(10,this.config.precisionRounding-t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n}}]),e}()},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(535));t.OrderView=o.default;var i=r(n(703));t.SharedOrderView=i.default},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);i(e,t)},t.getRenderer=function(e){if("function"==typeof e)return e;if(!s(e))throw Error('No registered renderer found under "'.concat(e,'" name'));return a(e)},t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=void 0;var o=(0,r(n(105)).default)("renderers"),i=o.register,a=o.getItem,s=o.hasItem,u=o.getNames,l=o.getValues;t.getRegisteredRenderers=l,t.getRegisteredRendererNames=u,t.hasRenderer=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);i(e,t)},t.getValidator=function(e){if("function"==typeof e)return e;if(!s(e))throw Error('No registered validator found under "'.concat(e,'" name'));return a(e)},t.getRegisteredValidators=t.getRegisteredValidatorNames=t.hasValidator=void 0;var o=(0,r(n(105)).default)("validators"),i=o.register,a=o.getItem,s=o.hasItem,u=o.getNames,l=o.getValues;t.getRegisteredValidators=l,t.getRegisteredValidatorNames=u,t.hasValidator=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.IndexMap=void 0,n(19);var o=r(n(5)),i=r(n(6)),a=n(43),s=n(15),u=n(75),l=r(n(91)),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,o.default)(this,e),this.indexedValues=[],this.initValueOrFn=t}return(0,i.default)(e,[{key:"getValues",value:function(){return this.indexedValues}},{key:"getValueAtIndex",value:function(e){var t=this.indexedValues;if(e<t.length)return t[e]}},{key:"setValues",value:function(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}},{key:"setValueAtIndex",value:function(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}},{key:"clear",value:function(){this.setDefaultValues()}},{key:"getLength",value:function(){return this.getValues().length}},{key:"setDefaultValues",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,u.isFunction)(this.initValueOrFn)?(0,a.rangeEach)(t-1,(function(t){return e.indexedValues.push(e.initValueOrFn(t))})):(0,a.rangeEach)(t-1,(function(){return e.indexedValues.push(e.initValueOrFn)})),this.runLocalHooks("change")}},{key:"init",value:function(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}},{key:"insert",value:function(){this.runLocalHooks("change")}},{key:"remove",value:function(){this.runLocalHooks("change")}},{key:"destroy",value:function(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}]),e}();t.IndexMap=c,(0,s.mixin)(c,l.default)},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getListWithInsertedItems=function(e,t,n){return[].concat((0,o.default)(e.slice(0,t)),(0,o.default)(n),(0,o.default)(e.slice(t)))},t.getListWithRemovedItems=function(e,t){return(0,i.arrayFilter)(e,(function(e){return!1===t.includes(e)}))},n(20),n(19),n(37),n(47);var o=r(n(40)),i=n(16)},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t._getRefCount=function(){return u},t._resetState=l,t.isPressed=function(e){return Array.from(s.values()).some((function(t){return(0,i.isKey)(t,e)}))},t.isPressedCtrlKey=function(){return Array.from(s.values()).some((function(e){return(0,i.isCtrlMetaKey)(e)}))},t.startObserving=function(e){0===u&&(a.addEventListener(e,"keydown",(function(e){s.has(e.keyCode)||s.add(e.keyCode)})),a.addEventListener(e,"keyup",(function(e){s.has(e.keyCode)&&s.delete(e.keyCode)})),a.addEventListener(e,"visibilitychange",(function(){e.hidden&&s.clear()})),a.addEventListener(e.defaultView,"blur",(function(){s.clear()})));u+=1},t.stopObserving=function(){u>0&&(u-=1);0===u&&l()},n(3),n(1),n(57),n(2),n(4),n(23);var o=r(n(49)),i=n(88),a=new o.default,s=new Set,u=0;function l(){a.clearEvents(),s.clear(),u=0}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.detectSelectionType=d,t.normalizeSelectionFactory=p,t.transformSelectionToColumnDistance=function(e){var t=d(e);if(0===t||1===t)return[];var n=p(t),r=new Set;(0,s.arrayEach)(e,(function(e){var t=n(e),i=(0,o.default)(t,4),a=i[1],u=i[3],l=Math.max(a,0),c=u-l+1;(0,s.arrayEach)(Array.from(new Array(c),(function(e,t){return l+t})),(function(e){r.has(e)||r.add(e)}))}));var i=Array.from(r).sort((function(e,t){return e-t}));return(0,s.arrayReduce)(i,(function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e}),[])},t.transformSelectionToRowDistance=function(e){var t=d(e);if(0===t||1===t)return[];var n=p(t),r=new Set;(0,s.arrayEach)(e,(function(e){var t=n(e),i=(0,o.default)(t,3),a=i[0],u=i[2],l=Math.max(a,0),c=u-l+1;(0,s.arrayEach)(Array.from(new Array(c),(function(e,t){return l+t})),(function(e){r.has(e)||r.add(e)}))}));var i=Array.from(r).sort((function(e,t){return e-t}));return(0,s.arrayReduce)(i,(function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e}),[])},t.isValidCoord=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&e>=0&&e<t},t.SELECTION_TYPES=t.SELECTION_TYPE_OBJECT=t.SELECTION_TYPE_ARRAY=t.SELECTION_TYPE_EMPTY=t.SELECTION_TYPE_UNRECOGNIZED=void 0;var o=r(n(31)),i=r(n(18));n(8),n(10),n(1),n(37),n(47),n(3),n(57),n(2),n(4),n(23),n(70);var a=n(58),s=n(16),u=n(32);t.SELECTION_TYPE_UNRECOGNIZED=0;t.SELECTION_TYPE_EMPTY=1;t.SELECTION_TYPE_ARRAY=2;t.SELECTION_TYPE_OBJECT=3;var l=[3,2];t.SELECTION_TYPES=l;var c=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],f=Symbol("root"),h=Symbol("child");function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;if(t!==f&&t!==h)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),r=t===f,o=0;if(n){var s=e[0];if(0===e.length)o=1;else if(r&&s instanceof a.CellRange)o=3;else if(r&&Array.isArray(s))o=d(s,h);else if(e.length>=2&&e.length<=4){var u=!e.some((function(e,t){return!c[t].includes((0,i.default)(e))}));u&&(o=2)}}return o}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,r=void 0!==n&&n,o=t.propToCol;if(!l.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=3===e,i=n?t.from.row:t[0],a=n?t.from.col:t[1],s=n?t.to.row:t[2],l=n?t.to.col:t[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof l&&(l=o(l))),(0,u.isUndefined)(s)&&(s=i),(0,u.isUndefined)(l)&&(l=a),!r){var c=i,f=a,h=s,d=l;i=Math.min(c,h),a=Math.min(f,d),s=Math.max(c,h),l=Math.max(f,d)}return[i,a,s,l]}}},function(e,t,n){"use strict";t.__esModule=!0,t.baseRenderer=t.RENDERER_TYPE=void 0;var r=n(774);t.RENDERER_TYPE=r.RENDERER_TYPE,t.baseRenderer=r.baseRenderer},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=r(n(6)),a=n(16),s=n(15),u=r(n(91)),l=n(76),c=function(){function e(t,n){var r=n.id,i=n.stateless,a=void 0===i||i;(0,o.default)(this,e),this.hot=t,this.id=r,this.elements=[],this.hidden=!1,this.stateId="Filters.component.".concat(this.id),this.state=a?null:this.hot.columnIndexMapper.registerMap(this.stateId,new l.LinkedPhysicalIndexToValueMap)}return(0,i.default)(e,[{key:"reset",value:function(){(0,a.arrayEach)(this.elements,(function(e){return e.reset()}))}},{key:"hide",value:function(){this.hidden=!0}},{key:"show",value:function(){this.hidden=!1}},{key:"isHidden",value:function(){return null===this.hot||this.hidden}},{key:"restoreState",value:function(e){this.state&&this.setState(this.state.getValueAtIndex(e))}},{key:"setState",value:function(){throw new Error("The state setting logic is not implemented")}},{key:"saveState",value:function(e){this.state&&this.state.setValueAtIndex(e,this.getState())}},{key:"getState",value:function(){throw new Error("The state gathering logic is not implemented")}},{key:"destroy",value:function(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,a.arrayEach)(this.elements,(function(e){return e.destroy()})),this.state=null,this.elements=null,this.hot=null}}]),e}();(0,s.mixin)(c,u.default);var f=c;t.default=f},function(e,t,n){"use strict";n.r(t);n(24),n(217),n(110),n(7),n(19),n(1),n(25),n(23),n(2),n(8),n(10),n(11),n(3),n(4);var r=n(22);n.d(t,"CellType",(function(){return r.CellType})),n.d(t,"CellValueType",(function(){return r.CellValueType})),n.d(t,"CellValueDetailedType",(function(){return r.CellValueDetailedType})),n.d(t,"ErrorType",(function(){return r.ErrorType}));var o=n(257);n.d(t,"DetailedCellError",(function(){return o.DetailedCellError}));var i=n(339),a=n(36);n.d(t,"ConfigValueTooBigError",(function(){return a.ConfigValueTooBigError})),n.d(t,"ConfigValueTooSmallError",(function(){return a.ConfigValueTooSmallError})),n.d(t,"EvaluationSuspendedError",(function(){return a.EvaluationSuspendedError})),n.d(t,"ExpectedOneOfValuesError",(function(){return a.ExpectedOneOfValuesError})),n.d(t,"ExpectedValueOfTypeError",(function(){return a.ExpectedValueOfTypeError})),n.d(t,"FunctionPluginValidationError",(function(){return a.FunctionPluginValidationError})),n.d(t,"InvalidAddressError",(function(){return a.InvalidAddressError})),n.d(t,"InvalidArgumentsError",(function(){return a.InvalidArgumentsError})),n.d(t,"LanguageAlreadyRegisteredError",(function(){return a.LanguageAlreadyRegisteredError})),n.d(t,"LanguageNotRegisteredError",(function(){return a.LanguageNotRegisteredError})),n.d(t,"MatrixFormulasNotSupportedError",(function(){return a.MatrixFormulasNotSupportedError})),n.d(t,"MissingTranslationError",(function(){return a.MissingTranslationError})),n.d(t,"NamedExpressionDoesNotExistError",(function(){return a.NamedExpressionDoesNotExistError})),n.d(t,"NamedExpressionNameIsAlreadyTakenError",(function(){return a.NamedExpressionNameIsAlreadyTakenError})),n.d(t,"NamedExpressionNameIsInvalidError",(function(){return a.NamedExpressionNameIsInvalidError})),n.d(t,"NoOperationToRedoError",(function(){return a.NoOperationToRedoError})),n.d(t,"NoOperationToUndoError",(function(){return a.NoOperationToUndoError})),n.d(t,"NoRelativeAddressesAllowedError",(function(){return a.NoRelativeAddressesAllowedError})),n.d(t,"NoSheetWithIdError",(function(){return a.NoSheetWithIdError})),n.d(t,"NoSheetWithNameError",(function(){return a.NoSheetWithNameError})),n.d(t,"NotAFormulaError",(function(){return a.NotAFormulaError})),n.d(t,"NothingToPasteError",(function(){return a.NothingToPasteError})),n.d(t,"ProtectedFunctionTranslationError",(function(){return a.ProtectedFunctionTranslationError})),n.d(t,"SheetNameAlreadyTakenError",(function(){return a.SheetNameAlreadyTakenError})),n.d(t,"SheetSizeLimitExceededError",(function(){return a.SheetSizeLimitExceededError})),n.d(t,"SourceLocationHasMatrixError",(function(){return a.SourceLocationHasMatrixError})),n.d(t,"TargetLocationHasMatrixError",(function(){return a.TargetLocationHasMatrixError})),n.d(t,"UnableToParseError",(function(){return a.UnableToParseError}));var s=n(200);n.d(t,"ExportedCellChange",(function(){return s.ExportedCellChange})),n.d(t,"ExportedNamedExpressionChange",(function(){return s.ExportedNamedExpressionChange}));var u=n(170);n.d(t,"HyperFormula",(function(){return u.HyperFormula}));var l=n(672),c=n(267);n.d(t,"FunctionPlugin",(function(){return c.FunctionPlugin}));var f=n(673);function h(e){return(h="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})(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(n,e);var t=v(n);function n(){return p(this,n),t.apply(this,arguments)}return n}(u.HyperFormula);E.HyperFormula=u.HyperFormula,E.ErrorType=r.ErrorType,E.CellType=r.CellType,E.CellValueType=r.CellValueType,E.CellValueDetailedType=r.CellValueDetailedType,E.DetailedCellError=o.DetailedCellError,E.ExportedCellChange=s.ExportedCellChange,E.ExportedNamedExpressionChange=s.ExportedNamedExpressionChange,E.ConfigValueTooBigError=a.ConfigValueTooBigError,E.ConfigValueTooSmallError=a.ConfigValueTooSmallError,E.EvaluationSuspendedError=a.EvaluationSuspendedError,E.ExpectedOneOfValuesError=a.ExpectedOneOfValuesError,E.ExpectedValueOfTypeError=a.ExpectedValueOfTypeError,E.FunctionPlugin=c.FunctionPlugin,E.FunctionPluginValidationError=a.FunctionPluginValidationError,E.InvalidAddressError=a.InvalidAddressError,E.InvalidArgumentsError=a.InvalidArgumentsError,E.LanguageNotRegisteredError=a.LanguageNotRegisteredError,E.LanguageAlreadyRegisteredError=a.LanguageAlreadyRegisteredError,E.MatrixFormulasNotSupportedError=a.MatrixFormulasNotSupportedError,E.MissingTranslationError=a.MissingTranslationError,E.NamedExpressionDoesNotExistError=a.NamedExpressionDoesNotExistError,E.NamedExpressionNameIsAlreadyTakenError=a.NamedExpressionNameIsAlreadyTakenError,E.NamedExpressionNameIsInvalidError=a.NamedExpressionNameIsInvalidError,E.NoOperationToRedoError=a.NoOperationToRedoError,E.NoOperationToUndoError=a.NoOperationToUndoError,E.NoRelativeAddressesAllowedError=a.NoRelativeAddressesAllowedError,E.NoSheetWithIdError=a.NoSheetWithIdError,E.NoSheetWithNameError=a.NoSheetWithNameError,E.NotAFormulaError=a.NotAFormulaError,E.NothingToPasteError=a.NothingToPasteError,E.ProtectedFunctionTranslationError=a.ProtectedFunctionTranslationError,E.SheetNameAlreadyTakenError=a.SheetNameAlreadyTakenError,E.SheetSizeLimitExceededError=a.SheetSizeLimitExceededError,E.SourceLocationHasMatrixError=a.SourceLocationHasMatrixError,E.TargetLocationHasMatrixError=a.TargetLocationHasMatrixError,E.UnableToParseError=a.UnableToParseError;var T=i.Config.defaultConfig.language;u.HyperFormula.registerLanguage(T,l.default),u.HyperFormula.languages[l.default.langCode]=l.default;var C,w=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(Object.getOwnPropertyNames(f));try{for(w.s();!(C=w.n()).done;){var R=C.value;R.startsWith("_")||u.HyperFormula.registerFunctionPlugin(f[R])}}catch(e){w.e(e)}finally{w.f()}t.default=E,window.HyperFormula=n(210).default},function(e,t,n){var r=n(56),o=n(62),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(56),o=n(99);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(56),o=n(212),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(92),o=n(71),i=n(153),a=function(e){return function(t,n,a){var s,u=r(t),l=o(u.length),c=i(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(29),o=n(46),i=n(303).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){var r=n(219);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(62),o=n(116),i=n(59)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(154),o=n(46);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(59)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){var r={};r[n(59)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(118),o=n(85),i=function(e){return function(t,n){var i,a,s=String(o(t)),u=r(n),l=s.length;return u<0||u>=l?e?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){"use strict";var r=n(29),o=n(610),i=n(186),a=n(312),s=n(187),u=n(99),l=n(100),c=n(59),f=n(133),h=n(160),d=n(311),p=d.IteratorPrototype,m=d.BUGGY_SAFARI_ITERATORS,v=c("iterator"),g=function(){return this};e.exports=function(e,t,n,c,d,y,E){o(n,t,c);var T,C,w,R=function(e){if(e===d&&A)return A;if(!m&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},b=t+" Iterator",O=!1,S=e.prototype,N=S[v]||S["@@iterator"]||d&&S[d],A=!m&&N||R(d),M="Array"==t&&S.entries||N;if(M&&(T=i(M.call(new e)),p!==Object.prototype&&T.next&&(f||i(T)===p||(a?a(T,p):"function"!=typeof T[v]&&u(T,v,g)),s(T,b,!0,!0),f&&(h[b]=g))),"values"==d&&N&&"values"!==N.name&&(O=!0,A=function(){return N.call(this)}),f&&!E||S[v]===A||u(S,v,A),h[t]=A,d)if(C={values:R("values"),keys:y?A:R("keys"),entries:R("entries")},E)for(w in C)(m||O||!(w in S))&&l(S,w,C[w]);else r({target:t,proto:!0,forced:m||O},C);return C}},function(e,t,n){var r=n(62),o=n(156),i=n(59)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(67),o=n(308),i=n(71),a=n(159),s=n(309),u=n(307),l=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var c,f,h,d,p,m,v,g=n&&n.that,y=!(!n||!n.AS_ENTRIES),E=!(!n||!n.IS_ITERATOR),T=!(!n||!n.INTERRUPTED),C=a(t,g,1+y+T),w=function(e){return c&&u(c),new l(!0,e)},R=function(e){return y?(r(e),T?C(e[0],e[1],w):C(e[0],e[1])):T?C(e,w):C(e)};if(E)c=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(o(f)){for(h=0,d=i(e.length);d>h;h++)if((p=R(e[h]))&&p instanceof l)return p;return new l(!1)}c=f.call(e)}for(m=c.next;!(v=m.call(c)).done;){try{p=R(v.value)}catch(e){throw u(c),e}if("object"==typeof p&&p&&p instanceof l)return p}return new l(!1)}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(62),o=n(312);e.exports=function(e,t,n){var i,a;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(a=i.prototype)&&a!==n.prototype&&o(e,a),e}},function(e,t,n){var r=n(100);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){n(29)({target:"Number",stat:!0},{isFinite:n(614)})},function(e,t,n){"use strict";var r=n(67);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(46);function o(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var r=n(223).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return r}));var r="6.5.0"},function(e,t,n){"use strict";n.r(t),n.d(t,"RestWalker",(function(){return i}));var r=n(42),o=n(53),i=function(){function e(){}return e.prototype.walk=function(e,t){var n=this;void 0===t&&(t=[]),Object(r.forEach)(e.definition,(function(i,a){var s=Object(r.drop)(e.definition,a+1);if(i instanceof o.NonTerminal)n.walkProdRef(i,s,t);else if(i instanceof o.Terminal)n.walkTerminal(i,s,t);else if(i instanceof o.Flat)n.walkFlat(i,s,t);else if(i instanceof o.Option)n.walkOption(i,s,t);else if(i instanceof o.RepetitionMandatory)n.walkAtLeastOne(i,s,t);else if(i instanceof o.RepetitionMandatoryWithSeparator)n.walkAtLeastOneSep(i,s,t);else if(i instanceof o.RepetitionWithSeparator)n.walkManySep(i,s,t);else if(i instanceof o.Repetition)n.walkMany(i,s,t);else{if(!(i instanceof o.Alternation))throw Error("non exhaustive match");n.walkOr(i,s,t)}}))},e.prototype.walkTerminal=function(e,t,n){},e.prototype.walkProdRef=function(e,t,n){},e.prototype.walkFlat=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkOption=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkAtLeastOne=function(e,t,n){var r=[new o.Option({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkAtLeastOneSep=function(e,t,n){var r=a(e,t,n);this.walk(e,r)},e.prototype.walkMany=function(e,t,n){var r=[new o.Option({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkManySep=function(e,t,n){var r=a(e,t,n);this.walk(e,r)},e.prototype.walkOr=function(e,t,n){var i=this,a=t.concat(n);Object(r.forEach)(e.definition,(function(e){var t=new o.Flat({definition:[e]});i.walk(t,a)}))},e}();function a(e,t,n){return[new o.Option({definition:[new o.Terminal({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}},function(e,t,n){var r,o,i;"undefined"!=typeof self&&self,o=[],void 0===(i="function"==typeof(r=function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");var t=this.disjunction();this.consumeChar("/");for(var n={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":s(n,"global");break;case"i":s(n,"ignoreCase");break;case"m":s(n,"multiLine");break;case"u":s(n,"unicode");break;case"y":s(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t}},e.prototype.disjunction=function(){var e=[];for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){for(var e=[];this.isTerm();)e.push(this.term());return{type:"Alternative",value:e}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}u(e);var t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}!function(){throw Error("Internal Error - Should never get here!")}()},e.prototype.quantifier=function(e){var t;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":t=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;u(t)}if(!0!==e||void 0!==t)return u(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),u(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[i("\n"),i("\r"),i("\u2028"),i("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){return{type:"GroupBackReference",value:this.positiveInteger()}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=l;break;case"D":e=l,t=!0;break;case"s":e=f;break;case"S":e=f,t=!0;break;case"w":e=c;break;case"W":e=c,t=!0}return u(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=i("\f");break;case"n":e=i("\n");break;case"r":e=i("\r");break;case"t":e=i("\t");break;case"v":e=i("\v")}return u(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){return{type:"Character",value:i(this.popChar())}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:i(this.popChar())}}},e.prototype.characterClass=function(){var e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var n=this.classAtom();if("Character"===n.type&&this.isRangeDash()){this.consumeChar("-");var r=this.classAtom();if("Character"===r.type){if(r.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:r.value})}else a(n.value,e),e.push(i("-")),a(r.value,e)}else a(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:i("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++}var t=this.disjunction();this.consumeChar(")");var n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===o.test(e))throw Error("Expecting a positive integer");for(;r.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===r.test(e))throw Error("Expecting an integer");for(;r.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.patternCharacter=function(){var e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:i(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},e.prototype.isDigit=function(){return r.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(void 0===e&&(e=0),this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var t="",r=0;r<e;r++){var o=this.popChar();if(!1===n.test(o))throw Error("Expecting a HexDecimal digits");t+=o}return{type:"Character",value:parseInt(t,16)}},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var t,n=/[0-9a-fA-F]/,r=/[0-9]/,o=/[1-9]/;function i(e){return e.charCodeAt(0)}function a(e,t){void 0!==e.length?e.forEach((function(e){t.push(e)})):t.push(e)}function s(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function u(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}var l=[];for(t=i("0");t<=i("9");t++)l.push(t);var c=[i("_")].concat(l);for(t=i("a");t<=i("z");t++)c.push(t);for(t=i("A");t<=i("Z");t++)c.push(t);var f=[i(" "),i("\f"),i("\n"),i("\r"),i("\t"),i("\v"),i("\t"),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i("\u2028"),i("\u2029"),i(" "),i(" "),i(" "),i("\ufeff")];function h(){}return h.prototype.visitChildren=function(e){for(var t in e){var n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(e){this.visit(e)}),this))}},h.prototype.visit=function(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)},h.prototype.visitPattern=function(e){},h.prototype.visitFlags=function(e){},h.prototype.visitDisjunction=function(e){},h.prototype.visitAlternative=function(e){},h.prototype.visitStartAnchor=function(e){},h.prototype.visitEndAnchor=function(e){},h.prototype.visitWordBoundary=function(e){},h.prototype.visitNonWordBoundary=function(e){},h.prototype.visitLookahead=function(e){},h.prototype.visitNegativeLookahead=function(e){},h.prototype.visitCharacter=function(e){},h.prototype.visitSet=function(e){},h.prototype.visitGroup=function(e){},h.prototype.visitGroupBackReference=function(e){},h.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:h,VERSION:"0.4.0"}})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";n.r(t),n.d(t,"getRegExpAst",(function(){return a})),n.d(t,"clearRegExpParserCache",(function(){return s}));var r=n(236),o={},i=new r.RegExpParser;function a(e){var t=e.toString();if(o.hasOwnProperty(t))return o[t];var n=i.pattern(t);return o[t]=n,n}function s(){o={}}},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultLexerErrorProvider",(function(){return r}));var r={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,n,r,o){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+n+" characters."}}},function(e,t,n){"use strict";n.r(t),n.d(t,"setNodeLocationOnlyOffset",(function(){return l})),n.d(t,"setNodeLocationFull",(function(){return c})),n.d(t,"addTerminalToCst",(function(){return f})),n.d(t,"addNoneTerminalToCst",(function(){return h})),n.d(t,"NamedDSLMethodsCollectorVisitor",(function(){return d})),n.d(t,"expandAllNestedRuleNames",(function(){return p}));var r,o=n(42),i=n(166),a=n(53),s=n(125),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function l(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function c(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function f(e,t,n){void 0===e.children[n]?e.children[n]=[t]:e.children[n].push(t)}function h(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}var d=function(e){function t(t){var n=e.call(this)||this;return n.result=[],n.ruleIdx=t,n}return u(t,e),t.prototype.collectNamedDSLMethod=function(e,t,n){if(!Object(o.isUndefined)(e.name)){var r=void 0;if(e instanceof a.Option||e instanceof a.Repetition||e instanceof a.RepetitionMandatory||e instanceof a.Alternation)r=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof a.RepetitionMandatoryWithSeparator||e instanceof a.RepetitionWithSeparator))throw Error("non exhaustive match");r=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var s=[r],u=Object(i.getKeyForAutomaticLookahead)(this.ruleIdx,n,e.idx);this.result.push({def:s,key:u,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,a.Option,i.OPTION_IDX)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,a.Repetition,i.MANY_IDX)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,a.RepetitionMandatory,i.AT_LEAST_ONE_IDX)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,a.RepetitionMandatoryWithSeparator,i.AT_LEAST_ONE_SEP_IDX)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,a.RepetitionWithSeparator,i.MANY_SEP_IDX)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,a.Alternation,i.OR_IDX);var n=e.definition.length>1;Object(o.forEach)(e.definition,(function(r,s){if(!Object(o.isUndefined)(r.name)){var u=r.definition;u=n?[new a.Option({definition:r.definition})]:r.definition;var l=Object(i.getKeyForAltIndex)(t.ruleIdx,i.OR_IDX,e.idx,s);t.result.push({def:u,key:l,name:r.name,orgProd:r})}}))},t}(s.GAstVisitor);function p(e,t){var n={allRuleNames:[]};return Object(o.forEach)(e,(function(e){var r=t[e.name];n.allRuleNames.push(e.name);var i=new d(r);e.accept(i),Object(o.forEach)(i.result,(function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)}))})),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"generateParserFactory",(function(){return o})),n.d(t,"generateParserModule",(function(){return i}));var r=n(631);function o(e){var t=Object(r.genWrapperFunction)({name:e.name,rules:e.rules}),o=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return o(e.tokenVocabulary,t,n(193))}}function i(e){return Object(r.genUmdModule)({name:e.name,rules:e.rules})}},function(e,t,n){"use strict";n.r(t),n.d(t,"FormulaParser",(function(){return C})),n.d(t,"FormulaLexer",(function(){return w}));n(19),n(34),n(63),n(20),n(61),n(48),n(41),n(66),n(24),n(7),n(333),n(17),n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(25),n(23);var r=n(193),o=n(22),i=n(39),a=n(102),s=n(95),u=n(192),l=n(163);function c(e){return(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})(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=T(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(n,e);var t=y(n);function n(e,i){var u;return d(this,n),(u=t.call(this,e.allTokens,{outputCst:!1,maxLookahead:7})).formula=u.RULE("formula",(function(){return u.CONSUME(l.EqualsOp),u.SUBRULE(u.booleanExpression)})),u.booleanExpression=u.RULE("booleanExpression",(function(){var e=u.SUBRULE(u.concatenateExpression);return u.MANY((function(){var t=u.CONSUME(l.BooleanOp),n=u.SUBRULE2(u.concatenateExpression);Object(r.tokenMatcher)(t,l.EqualsOp)?e=Object(s.buildEqualsOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.NotEqualOp)?e=Object(s.buildNotEqualOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.GreaterThanOp)?e=Object(s.buildGreaterThanOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.LessThanOp)?e=Object(s.buildLessThanOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.GreaterThanOrEqualOp)?e=Object(s.buildGreaterThanOrEqualOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.LessThanOrEqualOp)?e=Object(s.buildLessThanOrEqualOpAst)(e,n,t.leadingWhitespace):u.ACTION((function(){throw Error("Operator not supported")}))})),e})),u.booleanExpressionOrEmpty=u.RULE("booleanExpressionOrEmpty",(function(){return u.OR([{ALT:function(){return u.SUBRULE(u.booleanExpression)}},{ALT:Object(r.EMPTY_ALT)(Object(s.buildEmptyArgAst)())}])})),u.concatenateExpression=u.RULE("concatenateExpression",(function(){var e=u.SUBRULE(u.additionExpression);return u.MANY((function(){var t=u.CONSUME(l.ConcatenateOp),n=u.SUBRULE2(u.additionExpression);e=Object(s.buildConcatenateOpAst)(e,n,t.leadingWhitespace)})),e})),u.additionExpression=u.RULE("additionExpression",(function(){var e=u.SUBRULE(u.multiplicationExpression);return u.MANY((function(){var t=u.CONSUME(l.AdditionOp),n=u.SUBRULE2(u.multiplicationExpression);Object(r.tokenMatcher)(t,l.PlusOp)?e=Object(s.buildPlusOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.MinusOp)?e=Object(s.buildMinusOpAst)(e,n,t.leadingWhitespace):u.ACTION((function(){throw Error("Operator not supported")}))})),e})),u.multiplicationExpression=u.RULE("multiplicationExpression",(function(){var e=u.SUBRULE(u.powerExpression);return u.MANY((function(){var t=u.CONSUME(l.MultiplicationOp),n=u.SUBRULE2(u.powerExpression);Object(r.tokenMatcher)(t,l.TimesOp)?e=Object(s.buildTimesOpAst)(e,n,t.leadingWhitespace):Object(r.tokenMatcher)(t,l.DivOp)?e=Object(s.buildDivOpAst)(e,n,t.leadingWhitespace):u.ACTION((function(){throw Error("Operator not supported")}))})),e})),u.powerExpression=u.RULE("powerExpression",(function(){var e=u.SUBRULE(u.atomicExpression);return u.MANY((function(){var t=u.CONSUME(l.PowerOp),n=u.SUBRULE2(u.atomicExpression);Object(r.tokenMatcher)(t,l.PowerOp)?e=Object(s.buildPowerOpAst)(e,n,t.leadingWhitespace):u.ACTION((function(){throw Error("Operator not supported")}))})),e})),u.atomicExpression=u.RULE("atomicExpression",(function(){return u.OR([{ALT:function(){var e=u.CONSUME(l.AdditionOp),t=u.SUBRULE(u.atomicExpression);return Object(r.tokenMatcher)(e,l.PlusOp)?Object(s.buildPlusUnaryOpAst)(t,e.leadingWhitespace):Object(r.tokenMatcher)(e,l.MinusOp)?Object(s.buildMinusUnaryOpAst)(t,e.leadingWhitespace):(u.customParsingError=Object(s.parsingError)(s.ParsingErrorType.ParserError,"Mismatched token type"),u.customParsingError)}},{ALT:function(){return u.SUBRULE2(u.rightUnaryOpAtomicExpression)}}])})),u.rightUnaryOpAtomicExpression=u.RULE("rightUnaryOpAtomicExpression",(function(){var e=u.SUBRULE(u.positiveAtomicExpression),t=u.OPTION((function(){return u.CONSUME(l.PercentOp)}));return t?Object(s.buildPercentOpAst)(e,t.leadingWhitespace):e})),u.positiveAtomicExpression=u.RULE("positiveAtomicExpression",(function(){return u.OR(u.atomicExpCache||(u.atomicExpCache=[{ALT:function(){return u.SUBRULE(u.parenthesisExpression)}},{ALT:function(){return u.SUBRULE(u.cellRangeExpression)}},{ALT:function(){return u.SUBRULE(u.columnRangeExpression)}},{ALT:function(){return u.SUBRULE(u.rowRangeExpression)}},{ALT:function(){return u.SUBRULE(u.offsetExpression)}},{ALT:function(){return u.SUBRULE(u.cellReference)}},{ALT:function(){return u.SUBRULE(u.procedureExpression)}},{ALT:function(){return u.SUBRULE(u.namedExpressionExpression)}},{ALT:function(){var e=u.CONSUME(u.lexerConfig.NumberLiteral);return Object(s.buildNumberAst)(u.numericStringToNumber(e.image),e.leadingWhitespace)}},{ALT:function(){var e=u.CONSUME(l.StringLiteral);return Object(s.buildStringAst)(e)}},{ALT:function(){var e=u.CONSUME(l.ErrorLiteral),t=e.image.toUpperCase(),n=u.lexerConfig.errorMapping[t];return n?Object(s.buildCellErrorAst)(new o.CellError(n),e.leadingWhitespace):u.parsingError(s.ParsingErrorType.ParserError,"Unknown error literal")}}]))})),u.procedureExpression=u.RULE("procedureExpression",(function(){var e,t=u.CONSUME(l.ProcedureName),n=t.image.toUpperCase().slice(0,-1),r=null!==(e=u.lexerConfig.functionMapping[n])&&void 0!==e?e:n,o=[],i=u.SUBRULE(u.booleanExpressionOrEmpty);u.MANY((function(){var e,t=u.CONSUME(u.lexerConfig.ArgSeparator);i.type===s.AstNodeType.EMPTY&&(i.leadingWhitespace=null===(e=t.leadingWhitespace)||void 0===e?void 0:e.image),o.push(i),i=u.SUBRULE2(u.booleanExpressionOrEmpty)})),o.push(i),1===o.length&&o[0].type===s.AstNodeType.EMPTY&&(o.length=0);var a=u.CONSUME(l.RParen);return Object(s.buildProcedureAst)(r,o,t.leadingWhitespace,a.leadingWhitespace)})),u.namedExpressionExpression=u.RULE("namedExpressionExpression",(function(){var e=u.CONSUME(l.NamedExpression);return Object(s.buildNamedExpressionAst)(e.image,e.leadingWhitespace)})),u.offsetExpression=u.RULE("offsetExpression",(function(){var e,t=u.SUBRULE(u.offsetProcedureExpression);return u.OPTION((function(){u.CONSUME(l.RangeSeparator),e=t.type===s.AstNodeType.CELL_RANGE?u.parsingError(s.ParsingErrorType.RangeOffsetNotAllowed,"Range offset not allowed here"):u.SUBRULE(u.endOfRangeWithOffsetStartExpression,{ARGS:[t]})})),void 0!==e?e:t})),u.offsetProcedureExpression=u.RULE("offsetProcedureExpression",(function(){var e=[];return u.CONSUME(u.lexerConfig.OffsetProcedureName),u.CONSUME(l.LParen),u.MANY_SEP({SEP:u.lexerConfig.ArgSeparator,DEF:function(){e.push(u.SUBRULE(u.booleanExpression))}}),u.CONSUME(l.RParen),u.handleOffsetHeuristic(e)})),u.cellRangeExpression=u.RULE("cellRangeExpression",(function(){var e=u.CONSUME(l.CellReference);return u.CONSUME2(l.RangeSeparator),u.SUBRULE(u.endOfRangeExpression,{ARGS:[e]})})),u.columnRangeExpression=u.RULE("columnRangeExpression",(function(){var e=u.CONSUME(l.ColumnRange),t=f(e.image.split(":"),2),n=t[0],r=t[1],i=u.ACTION((function(){return Object(a.columnAddressFromString)(u.sheetMapping,n,u.formulaAddress)})),c=u.ACTION((function(){return Object(a.columnAddressFromString)(u.sheetMapping,r,u.formulaAddress)}));if(void 0===i||void 0===c)return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF));if(i.exceedsSheetSizeLimits(u.lexerConfig.maxColumns)||c.exceedsSheetSizeLimits(u.lexerConfig.maxColumns))return Object(s.buildErrorWithRawInputAst)(e.image,new o.CellError(o.ErrorType.NAME),e.leadingWhitespace);if(null===i.sheet&&null!==c.sheet)return u.parsingError(s.ParsingErrorType.ParserError,"Malformed range expression");var h=u.rangeSheetReferenceType(i.sheet,c.sheet);return null!==i.sheet&&null===c.sheet&&(c=c.withAbsoluteSheet(i.sheet)),Object(s.buildColumnRangeAst)(i,c,h,e.leadingWhitespace)})),u.rowRangeExpression=u.RULE("rowRangeExpression",(function(){var e=u.CONSUME(l.RowRange),t=f(e.image.split(":"),2),n=t[0],r=t[1],i=u.ACTION((function(){return Object(a.rowAddressFromString)(u.sheetMapping,n,u.formulaAddress)})),c=u.ACTION((function(){return Object(a.rowAddressFromString)(u.sheetMapping,r,u.formulaAddress)}));if(void 0===i||void 0===c)return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF));if(i.exceedsSheetSizeLimits(u.lexerConfig.maxRows)||c.exceedsSheetSizeLimits(u.lexerConfig.maxRows))return Object(s.buildErrorWithRawInputAst)(e.image,new o.CellError(o.ErrorType.NAME),e.leadingWhitespace);if(null===i.sheet&&null!==c.sheet)return u.parsingError(s.ParsingErrorType.ParserError,"Malformed range expression");var h=u.rangeSheetReferenceType(i.sheet,c.sheet);return null!==i.sheet&&null===c.sheet&&(c=c.withAbsoluteSheet(i.sheet)),Object(s.buildRowRangeAst)(i,c,h,e.leadingWhitespace)})),u.cellReference=u.RULE("cellReference",(function(){var e=u.CONSUME(l.CellReference),t=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,e.image,u.formulaAddress)}));return void 0===t?Object(s.buildErrorWithRawInputAst)(e.image,new o.CellError(o.ErrorType.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(u.lexerConfig.maxColumns,u.lexerConfig.maxRows)?Object(s.buildErrorWithRawInputAst)(e.image,new o.CellError(o.ErrorType.NAME),e.leadingWhitespace):Object(s.buildCellReferenceAst)(t,e.leadingWhitespace)})),u.endOfRangeExpression=u.RULE("endOfRangeExpression",(function(e){return u.OR([{ALT:function(){return u.SUBRULE(u.endRangeReference,{ARGS:[e]})}},{ALT:function(){var t,n=u.SUBRULE(u.offsetProcedureExpression),r=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,e.image,u.formulaAddress)}));if(void 0===r)return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF));if(n.type===s.AstNodeType.CELL_REFERENCE){var i=n.reference,l=s.RangeSheetReferenceType.RELATIVE;return null!==r.sheet&&(l=s.RangeSheetReferenceType.START_ABSOLUTE,i=i.withAbsoluteSheet(r.sheet)),Object(s.buildCellRangeAst)(r,i,l,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image)}return u.parsingError(s.ParsingErrorType.RangeOffsetNotAllowed,"Range offset not allowed here")}}])})),u.endOfRangeWithOffsetStartExpression=u.RULE("endOfRangeWithOffsetStartExpression",(function(e){return u.OR([{ALT:function(){return u.SUBRULE(u.endRangeWithOffsetStartReference,{ARGS:[e]})}},{ALT:function(){var t=u.SUBRULE(u.offsetProcedureExpression);if(t.type===s.AstNodeType.CELL_REFERENCE){var n=t.reference,r=s.RangeSheetReferenceType.RELATIVE;return null!==e.reference.sheet&&(r=s.RangeSheetReferenceType.START_ABSOLUTE,n=n.withAbsoluteSheet(e.reference.sheet)),Object(s.buildCellRangeAst)(e.reference,n,r,e.leadingWhitespace)}return u.parsingError(s.ParsingErrorType.RangeOffsetNotAllowed,"Range offset not allowed here")}}])})),u.endRangeReference=u.RULE("endRangeReference",(function(e){var t,n=u.CONSUME(l.CellReference),r=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,e.image,u.formulaAddress)})),i=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,n.image,u.formulaAddress)}));return void 0===r||void 0===i?u.ACTION((function(){return Object(s.buildErrorWithRawInputAst)("".concat(e.image,":").concat(n.image),new o.CellError(o.ErrorType.REF),e.leadingWhitespace)})):r.exceedsSheetSizeLimits(u.lexerConfig.maxColumns,u.lexerConfig.maxRows)||i.exceedsSheetSizeLimits(u.lexerConfig.maxColumns,u.lexerConfig.maxRows)?u.ACTION((function(){return Object(s.buildErrorWithRawInputAst)("".concat(e.image,":").concat(n.image),new o.CellError(o.ErrorType.NAME),e.leadingWhitespace)})):u.buildCellRange(r,i,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image)})),u.endRangeWithOffsetStartReference=u.RULE("endRangeWithOffsetStartReference",(function(e){var t=u.CONSUME(l.CellReference),n=u.ACTION((function(){return Object(a.cellAddressFromString)(u.sheetMapping,t.image,u.formulaAddress)}));return void 0===n?u.ACTION((function(){return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF))})):u.buildCellRange(e.reference,n,e.leadingWhitespace)})),u.parenthesisExpression=u.RULE("parenthesisExpression",(function(){var e=u.CONSUME(l.LParen),t=u.SUBRULE(u.booleanExpression),n=u.CONSUME(l.RParen);return Object(s.buildParenthesisAst)(t,e.leadingWhitespace,n.leadingWhitespace)})),u.numericStringToNumber=function(e){var t=e.replace(u.lexerConfig.decimalSeparator,".");return Number(t)},u.lexerConfig=e,u.sheetMapping=i,u.formulaAddress=Object(o.simpleCellAddress)(0,0,0),u.performSelfAnalysis(),u}return m(n,[{key:"parseFromTokens",value:function(e,t){this.input=e;var n=this.formulaWithContext(t),r=[];return this.customParsingError&&r.push(this.customParsingError),(r=r.concat(this.errors.map((function(e){return{type:s.ParsingErrorType.ParserError,message:e.message}})))).length>0&&(n=Object(s.buildParsingErrorAst)()),{ast:n,errors:r}}},{key:"formulaWithContext",value:function(e){return this.formulaAddress=e,this.formula()}},{key:"reset",value:function(){v(T(n.prototype),"reset",this).call(this),this.customParsingError=void 0}},{key:"buildCellRange",value:function(e,t,n){if(null===e.sheet&&null!==t.sheet)return this.parsingError(s.ParsingErrorType.ParserError,"Malformed range expression");var r=this.rangeSheetReferenceType(e.sheet,t.sheet);return null!==e.sheet&&null===t.sheet&&(t=t.withAbsoluteSheet(e.sheet)),Object(s.buildCellRangeAst)(e,t,r,n)}},{key:"handleOffsetHeuristic",value:function(e){var t=e[0];if(t.type!==s.AstNodeType.CELL_REFERENCE)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"First argument to OFFSET is not a reference");var n,r=e[1];if(r.type===s.AstNodeType.NUMBER&&Number.isInteger(r.value))n=r.value;else if(r.type===s.AstNodeType.PLUS_UNARY_OP&&r.value.type===s.AstNodeType.NUMBER&&Number.isInteger(r.value.value))n=r.value.value;else{if(r.type!==s.AstNodeType.MINUS_UNARY_OP||r.value.type!==s.AstNodeType.NUMBER||!Number.isInteger(r.value.value))return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Second argument to OFFSET is not a static number");n=-r.value.value}var a,l=e[2];if(l.type===s.AstNodeType.NUMBER&&Number.isInteger(l.value))a=l.value;else if(l.type===s.AstNodeType.PLUS_UNARY_OP&&l.value.type===s.AstNodeType.NUMBER&&Number.isInteger(l.value.value))a=l.value.value;else{if(l.type!==s.AstNodeType.MINUS_UNARY_OP||l.value.type!==s.AstNodeType.NUMBER||!Number.isInteger(l.value.value))return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Third argument to OFFSET is not a static number");a=-l.value.value}var c,f=e[3];if(void 0===f)c=1;else{if(f.type!==s.AstNodeType.NUMBER)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if((c=f.value)<1)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(c))return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fourth argument to OFFSET is not integer")}var h,d=e[4];if(void 0===d)h=1;else{if(d.type!==s.AstNodeType.NUMBER)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if((h=d.value)<1)return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(h))return this.parsingError(s.ParsingErrorType.StaticOffsetError,"Fifth argument to OFFSET is not integer")}var p=new u.CellAddress(null,t.reference.col+a,t.reference.row+n,t.reference.type),m=p.col,v=p.row;if(t.reference.type!==u.CellReferenceType.CELL_REFERENCE_RELATIVE&&t.reference.type!==u.CellReferenceType.CELL_REFERENCE_ABSOLUTE_COL||(v+=this.formulaAddress.row),t.reference.type!==u.CellReferenceType.CELL_REFERENCE_RELATIVE&&t.reference.type!==u.CellReferenceType.CELL_REFERENCE_ABSOLUTE_ROW||(m+=this.formulaAddress.col),m<0||v<0)return Object(s.buildCellErrorAst)(new o.CellError(o.ErrorType.REF,i.ErrorMessage.OutOfSheet));if(1===h&&1===c)return Object(s.buildCellReferenceAst)(p);var g=new u.CellAddress(null,p.col+h-1,p.row+c-1,p.type);return Object(s.buildCellRangeAst)(p,g,s.RangeSheetReferenceType.RELATIVE)}},{key:"parsingError",value:function(e,t){return this.customParsingError=Object(s.parsingError)(e,t),Object(s.buildParsingErrorAst)()}},{key:"rangeSheetReferenceType",value:function(e,t){return null===e?s.RangeSheetReferenceType.RELATIVE:null===t?s.RangeSheetReferenceType.START_ABSOLUTE:s.RangeSheetReferenceType.BOTH_ABSOLUTE}}]),n}(r.EmbeddedActionsParser),w=function(){function e(t){d(this,e),this.lexerConfig=t,this.lexer=new r.Lexer(t.allTokens,{ensureOptimizations:!0})}return m(e,[{key:"tokenizeFormula",value:function(e){var t=this.lexer.tokenize(e),n=t.tokens;return n=this.trimTrailingWhitespaces(n),n=this.skipWhitespacesInsideRanges(n),n=this.skipWhitespacesBeforeArgSeparators(n),t.tokens=n,t}},{key:"skipWhitespacesInsideRanges",value:function(e){return this.filterTokensByNeighbors(e,(function(e,t,n){return(Object(r.tokenMatcher)(e,l.CellReference)||Object(r.tokenMatcher)(e,l.RangeSeparator))&&Object(r.tokenMatcher)(t,l.WhiteSpace)&&(Object(r.tokenMatcher)(n,l.CellReference)||Object(r.tokenMatcher)(n,l.RangeSeparator))}))}},{key:"skipWhitespacesBeforeArgSeparators",value:function(e){var t=this;return this.filterTokensByNeighbors(e,(function(e,n,o){return!Object(r.tokenMatcher)(e,t.lexerConfig.ArgSeparator)&&Object(r.tokenMatcher)(n,l.WhiteSpace)&&Object(r.tokenMatcher)(o,t.lexerConfig.ArgSeparator)}))}},{key:"filterTokensByNeighbors",value:function(e,t){if(e.length<3)return e;for(var n=0,r=[e[n++]];n<e.length-1;)t(e[n-1],e[n],e[n+1])||r.push(e[n]),++n;return r.push(e[n]),r}},{key:"trimTrailingWhitespaces",value:function(e){return e.length>0&&Object(r.tokenMatcher)(e[e.length-1],l.WhiteSpace)&&e.pop(),e}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Unparser",(function(){return l})),n.d(t,"formatNumber",(function(){return c}));n(74),n(41),n(20),n(1),n(60),n(34),n(61);var r=n(22),o=n(210),i=n(102),a=n(95),s=n(332);function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.lexerConfig=n,this.sheetMappingFn=r,this.namedExpressions=o}var t,n,l;return t=e,(n=[{key:"unparse",value:function(e,t){return"="+this.unparseAst(e,t)}},{key:"unparseAst",value:function(e,t){var n,o,i=this;switch(e.type){case a.AstNodeType.EMPTY:return Object(a.imageWithWhitespace)("",e.leadingWhitespace);case a.AstNodeType.NUMBER:return Object(a.imageWithWhitespace)(c(e.value,this.config.decimalSeparator),e.leadingWhitespace);case a.AstNodeType.STRING:return Object(a.imageWithWhitespace)('"'+e.value+'"',e.leadingWhitespace);case a.AstNodeType.FUNCTION_CALL:var u=e.args.map((function(e){return void 0!==e?i.unparseAst(e,t):""})).join(this.config.functionArgSeparator),l=(this.config.translationPackage.isFunctionTranslated(e.procedureName)?this.config.translationPackage.getFunctionTranslation(e.procedureName):e.procedureName)+"("+u+Object(a.imageWithWhitespace)(")",e.internalWhitespace);return Object(a.imageWithWhitespace)(l,e.leadingWhitespace);case a.AstNodeType.NAMED_EXPRESSION:var f=null===(n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))||void 0===n?void 0:n.displayName;return Object(a.imageWithWhitespace)(f||e.expressionName,e.leadingWhitespace);case a.AstNodeType.CELL_REFERENCE:var h;return h=null!==e.reference.sheet?this.unparseSheetName(e.reference.sheet)+"!":"",h+=null!==(o=e.reference.unparse(t))&&void 0!==o?o:this.config.translationPackage.getErrorTranslation(r.ErrorType.REF),Object(a.imageWithWhitespace)(h,e.leadingWhitespace);case a.AstNodeType.COLUMN_RANGE:case a.AstNodeType.ROW_RANGE:case a.AstNodeType.CELL_RANGE:return Object(a.imageWithWhitespace)(this.formatRange(e,t),e.leadingWhitespace);case a.AstNodeType.PLUS_UNARY_OP:var d=this.unparseAst(e.value,t);return Object(a.imageWithWhitespace)("+",e.leadingWhitespace)+d;case a.AstNodeType.MINUS_UNARY_OP:var p=this.unparseAst(e.value,t);return Object(a.imageWithWhitespace)("-",e.leadingWhitespace)+p;case a.AstNodeType.PERCENT_OP:return this.unparseAst(e.value,t)+Object(a.imageWithWhitespace)("%",e.leadingWhitespace);case a.AstNodeType.ERROR:var m=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:r.ErrorType.ERROR);return Object(a.imageWithWhitespace)(m,e.leadingWhitespace);case a.AstNodeType.ERROR_WITH_RAW_INPUT:return Object(a.imageWithWhitespace)(e.rawInput,e.leadingWhitespace);case a.AstNodeType.PARENTHESIS:var v="("+this.unparseAst(e.expression,t)+Object(a.imageWithWhitespace)(")",e.internalWhitespace);return Object(a.imageWithWhitespace)(v,e.leadingWhitespace);default:var g=this.unparseAst(e.left,t),y=this.unparseAst(e.right,t);return g+Object(a.imageWithWhitespace)(s.binaryOpTokenMap[e.type],e.leadingWhitespace)+y}}},{key:"unparseSheetName",value:function(e){var t=Object(i.sheetIndexToString)(e,this.sheetMappingFn);if(void 0===t)throw new o.NoSheetWithIdError(e);return t}},{key:"formatRange",value:function(e,t){var n="",o="";null!==e.start.sheet&&e.sheetReferenceType!==a.RangeSheetReferenceType.RELATIVE&&(n=this.unparseSheetName(e.start.sheet)+"!"),null!==e.end.sheet&&e.sheetReferenceType===a.RangeSheetReferenceType.BOTH_ABSOLUTE&&(o=this.unparseSheetName(e.end.sheet)+"!");var i=e.start.unparse(t),s=e.end.unparse(t);return void 0===i||void 0===s?this.config.translationPackage.getErrorTranslation(r.ErrorType.REF):"".concat(n).concat(i,":").concat(o).concat(s)}}])&&u(t.prototype,n),l&&u(t,l),e}();function c(e,t){return e.toString().replace(".",t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"Statistics",(function(){return i}));n(3),n(33),n(1),n(2),n(4);var r=n(244);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stats=new Map([[r.StatType.CRITERION_FUNCTION_FULL_CACHE_USED,0],[r.StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}var t,n,i;return t=e,(n=[{key:"incrementCriterionFunctionFullCacheUsed",value:function(){var e=(this.stats.get(r.StatType.CRITERION_FUNCTION_FULL_CACHE_USED)||0)+1;this.stats.set(r.StatType.CRITERION_FUNCTION_FULL_CACHE_USED,e)}},{key:"incrementCriterionFunctionPartialCacheUsed",value:function(){var e=(this.stats.get(r.StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED)||0)+1;this.stats.set(r.StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED,e)}},{key:"reset",value:function(){this.stats.clear(),this.startTimes.clear(),this.stats.set(r.StatType.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(r.StatType.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0)}},{key:"start",value:function(e){if(this.startTimes.get(e))throw Error("Statistics ".concat(e," already started"));this.startTimes.set(e,Date.now())}},{key:"end",value:function(e){var t=Date.now(),n=this.startTimes.get(e);if(!n)throw Error("Statistics ".concat(e," not started"));var r=this.stats.get(e)||0;r+=t-n,this.stats.set(e,r),this.startTimes.delete(e)}},{key:"measure",value:function(e,t){this.start(e);var n=t();return this.end(e),n}},{key:"snapshot",value:function(){return new Map(this.stats)}},{key:"destroy",value:function(){this.stats.clear(),this.startTimes.clear()}}])&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t,n){"use strict";
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var r;n.r(t),n.d(t,"StatType",(function(){return r})),function(e){e.BUILD_ENGINE_TOTAL="BUILD_ENGINE_TOTAL",e.PARSER="PARSER",e.GRAPH_BUILD="GRAPH_BUILD",e.TOP_SORT="TOP_SORT",e.MATRIX_DETECTION="MATRIX_DETECTION",e.BUILD_COLUMN_INDEX="BUILD_COLUMN_INDEX",e.EVALUATION="EVALUATION",e.VLOOKUP="VLOOKUP",e.TRANSFORM_ASTS="TRANSFORM_ASTS",e.TRANSFORM_ASTS_POSTPONED="TRANSFORM_ASTS_POSTPONED",e.ADJUSTING_ADDRESS_MAPPING="ADJUSTING_ADDRESS_MAPPING",e.ADJUSTING_MATRIX_MAPPING="ADJUSTING_MATRIX_MAPPING",e.ADJUSTING_RANGES="ADJUSTING_RANGES",e.ADJUSTING_GRAPH="ADJUSTING_GRAPH",e.CRITERION_FUNCTION_FULL_CACHE_USED="CRITERION_FUNCTION_FULL_CACHE_USED",e.CRITERION_FUNCTION_PARTIAL_CACHE_USED="CRITERION_FUNCTION_PARTIAL_CACHE_USED"}(r||(r={}))},function(e,t,n){"use strict";n.r(t),n.d(t,"AddressMapping",(function(){return f}));n(72),n(3),n(33),n(1),n(2),n(4),n(140),n(19),n(25),n(23),n(8),n(10),n(11);var r=n(50),o=n(101),i=n(36);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.policy=t,this.mapping=new Map}var t,n,u;return t=e,(n=[{key:"getCell",value:function(e){var t=this.mapping.get(e.sheet);if(!t)throw new i.NoSheetWithIdError(e.sheet);return t.getCell(e)}},{key:"fetchCell",value:function(e){var t=this.mapping.get(e.sheet);if(!t)throw new i.NoSheetWithIdError(e.sheet);var n=t.getCell(e);if(!n)throw Error("Vertex for address missing in AddressMapping");return n}},{key:"strategyFor",value:function(e){var t=this.mapping.get(e);if(!t)throw new i.NoSheetWithIdError(e);return t}},{key:"addSheet",value:function(e,t){if(this.mapping.has(e))throw Error("Sheet already added");this.mapping.set(e,t)}},{key:"autoAddSheet",value:function(e,t,n){var r=n.height,o=n.width,i=n.fill,a=this.policy.call(i);this.addSheet(e,new a(o,r))}},{key:"getCellValue",value:function(e){var t=this.getCell(e);return null===t?r.EmptyValue:t instanceof o.MatrixVertex?t.getMatrixCellValue(e):t.getCellValue()}},{key:"getRawValue",value:function(e){var t=this.getCell(e);return t instanceof o.ValueCellVertex?t.getValues().rawValue:t instanceof o.MatrixVertex?t.getMatrixCellRawValue(e):null}},{key:"setCell",value:function(e,t){var n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized");n.setCell(e,t)}},{key:"removeCell",value:function(e){var t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet not initialized");t.removeCell(e)}},{key:"has",value:function(e){var t=this.mapping.get(e.sheet);return!!t&&t.has(e)}},{key:"getHeight",value:function(e){var t=this.mapping.get(e);if(!t)throw new i.NoSheetWithIdError(e);return t.getHeight()}},{key:"getWidth",value:function(e){var t=this.mapping.get(e);if(!t)throw new i.NoSheetWithIdError(e);return t.getWidth()}},{key:"addRows",value:function(e,t,n){var r=this.mapping.get(e);if(!r)throw Error("Sheet does not exist");r.addRows(t,n)}},{key:"removeRows",value:function(e){var t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet does not exist");t.removeRows(e)}},{key:"removeSheet",value:function(e){this.mapping.delete(e)}},{key:"addColumns",value:function(e,t,n){var r=this.mapping.get(e);if(!r)throw Error("Sheet does not exist");r.addColumns(t,n)}},{key:"removeColumns",value:function(e){var t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet does not exist");t.removeColumns(e)}},{key:"verticesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.mapping.get(t.sheet).verticesFromRowsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.mapping.get(t.sheet).verticesFromColumnsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.mapping.get(t.sheet).entriesFromRowsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.mapping.get(t.sheet).entriesFromColumnsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"entries",value:regeneratorRuntime.mark((function e(){var t,n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=s(this.mapping.entries()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=8;break}return r=a(n.value,2),o=r[0],i=r[1],e.delegateYield(i.getEntries(o),"t0",6);case 6:e.next=3;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),t.e(e.t1);case 13:return e.prev=13,t.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[1,10,13,16]])}))},{key:"sheetEntries",value:regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=this.mapping.get(t))){e.next=5;break}return e.delegateYield(n.getEntries(t),"t0",3);case 3:e.next=6;break;case 5:throw new Error("Sheet does not exists");case 6:case"end":return e.stop()}}),e,this)}))},{key:"destroy",value:function(){this.mapping.clear()}}])&&c(t.prototype,n),u&&c(t,u),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"FormulaCellVertex",(function(){return a}));n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(19),n(25),n(23);function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.formula=t,this.cellAddress=n,this.version=r,this.formula=t,this.cellAddress=n,this.cachedCellValue=null}var t,n,o;return t=e,(n=[{key:"getFormula",value:function(e){return this.ensureRecentData(e),this.formula}},{key:"ensureRecentData",value:function(e){if(this.version!=e.version()){var t=r(e.applyTransformations(this.formula,this.address,this.version),3),n=t[0],o=t[1],i=t[2];this.formula=n,this.cellAddress=o,this.version=i}}},{key:"getAddress",value:function(e){return this.ensureRecentData(e),this.cellAddress}},{key:"address",get:function(){return this.cellAddress}},{key:"setCellValue",value:function(e){this.cachedCellValue=e}},{key:"getCellValue",value:function(){if(null!==this.cachedCellValue)return this.cachedCellValue;throw Error("Value of the formula cell is not computed.")}},{key:"valueOrNull",value:function(){return this.cachedCellValue}},{key:"isComputed",value:function(){return null!==this.cachedCellValue}}])&&i(t.prototype,n),o&&i(t,o),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixVertex",(function(){return u}));var r=n(79),o=n(22),i=n(127),a=n(168);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var u=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cellAddress=t,this.formula=o||null,this.matrix=new i.NotComputedMatrix(new i.MatrixSize(n,r))}var t,n,u;return t=e,u=[{key:"fromRange",value:function(t,n){return new e(t.start,t.width(),t.height(),n)}}],(n=[{key:"width",get:function(){return this.matrix.width()}},{key:"height",get:function(){return this.matrix.height()}},{key:"sheet",get:function(){return this.cellAddress.sheet}},{key:"setCellValue",value:function(e){this.matrix=e}},{key:"setErrorValue",value:function(e){this.matrix=new i.ErroredMatrix(e,this.matrix.size)}},{key:"getCellValue",value:function(){if(this.matrix instanceof i.NotComputedMatrix)throw Error("Matrix not computed yet.");return this.matrix}},{key:"getMatrixCellValue",value:function(e){var t=e.col-this.cellAddress.col,n=e.row-this.cellAddress.row;return this.matrix.get(t,n)}},{key:"getMatrixCellRawValue",value:function(e){var t=this.getMatrixCellValue(e);return t instanceof o.CellError?void 0:t}},{key:"setMatrixCellValue",value:function(e,t){var n=e.col-this.cellAddress.col,r=e.row-this.cellAddress.row;this.matrix instanceof i.Matrix&&this.matrix.set(n,r,t)}},{key:"getRange",value:function(){return r.AbsoluteCellRange.spanFrom(this.cellAddress,this.width,this.height)}},{key:"getAddress",value:function(){return this.cellAddress}},{key:"setAddress",value:function(e){this.cellAddress=e}},{key:"getFormula",value:function(){return this.formula}},{key:"setFormula",value:function(e){this.formula=e}},{key:"isFormula",value:function(){return null!==this.formula}},{key:"isNumeric",value:function(){return null===this.formula}},{key:"spansThroughSheetRows",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return this.cellAddress.sheet===e&&this.cellAddress.row<=n&&t<this.cellAddress.row+this.height}},{key:"spansThroughSheetColumn",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return this.cellAddress.sheet===e&&this.cellAddress.col<=n&&t<this.cellAddress.col+this.width}},{key:"addRows",value:function(e,t,n){this.matrix instanceof i.Matrix&&this.matrix.addRows(t-this.getAddress().row,n)}},{key:"addColumns",value:function(e,t,n){this.matrix instanceof i.Matrix&&this.matrix.addColumns(t-this.getAddress().col,n)}},{key:"removeRows",value:function(e){if(this.matrix instanceof i.Matrix){var t=this.rowsFromMatrix().intersect(e);this.matrix.removeRows(t.rowStart-this.getAddress().row,t.rowEnd-this.getAddress().row)}}},{key:"removeColumns",value:function(e){if(this.matrix instanceof i.Matrix){var t=this.columnsFromMatrix().intersect(e);this.matrix.removeColumns(t.columnStart-this.getAddress().col,t.columnEnd-this.getAddress().col)}}},{key:"isComputed",value:function(){return!(this.matrix instanceof i.NotComputedMatrix)}},{key:"columnsFromMatrix",value:function(){return a.ColumnsSpan.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}},{key:"rowsFromMatrix",value:function(){return a.RowsSpan.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}}])&&s(t.prototype,n),u&&s(t,u),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"RangeVertex",(function(){return o}));n(3),n(33),n(1),n(2),n(4),n(57),n(27);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.range=t,this.functionCache=new Map,this.criterionFunctionCache=new Map,this.dependentCacheRanges=new Set,this.bruteForce=!1}var t,n,o;return t=e,(n=[{key:"start",get:function(){return this.range.start}},{key:"end",get:function(){return this.range.end}},{key:"sheet",get:function(){return this.range.start.sheet}},{key:"getFunctionValue",value:function(e){return this.functionCache.get(e)||null}},{key:"setFunctionValue",value:function(e,t){this.functionCache.set(e,t)}},{key:"getCriterionFunctionValue",value:function(e,t){var n=this.getCriterionFunctionValues(e).get(t);return n?n[0]:null}},{key:"getCriterionFunctionValues",value:function(e){return this.criterionFunctionCache.get(e)||new Map}},{key:"setCriterionFunctionValues",value:function(e,t){this.criterionFunctionCache.set(e,t)}},{key:"addDependentCacheRange",value:function(e){e!==this&&this.dependentCacheRanges.add(e)}},{key:"clearCache",value:function(){this.functionCache.clear(),this.criterionFunctionCache.clear(),this.dependentCacheRanges.forEach((function(e){return e.criterionFunctionCache.clear()})),this.dependentCacheRanges.clear()}},{key:"getStart",value:function(){return this.start}},{key:"getEnd",value:function(){return this.end}}])&&r(t.prototype,n),o&&r(t,o),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Graph",(function(){return s}));var r;n(3),n(1),n(57),n(2),n(4),n(33),n(27),n(23),n(120),n(19),n(25),n(8),n(10),n(11);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e[e.ON_STACK=0]="ON_STACK",e[e.PROCESSED=1]="PROCESSED",e[e.POPPED=2]="POPPED"}(r||(r={}));var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dependencyQuery=t,this.nodes=new Set,this.specialNodes=new Set,this.specialNodesStructuralChanges=new Set,this.specialNodesRecentlyChanged=new Set,this.infiniteRanges=new Set,this.edges=new Map}var t,n,i;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,(n=[{key:"addNode",value:function(e){this.nodes.add(e),this.edges.has(e)||this.edges.set(e,new Set)}},{key:"addEdge",value:function(e,t){if(!this.nodes.has(e))throw new Error("Unknown node ".concat(e));if(!this.nodes.has(t))throw new Error("Unknown node ".concat(t));this.edges.get(e).add(t)}},{key:"removeEdge",value:function(e,t){if(!this.existsEdge(e,t))throw new Error("Edge does not exist");this.edges.get(e).delete(t)}},{key:"softRemoveEdge",value:function(e,t){var n;null===(n=this.edges.get(e))||void 0===n||n.delete(t)}},{key:"removeIncomingEdges",value:function(e){this.edges.forEach((function(t){t.delete(e)}))}},{key:"adjacentNodes",value:function(e){return this.edges.get(e)}},{key:"adjacentNodesCount",value:function(e){return this.adjacentNodes(e).size}},{key:"hasNode",value:function(e){return this.nodes.has(e)}},{key:"nodesCount",value:function(){return this.nodes.size}},{key:"edgesCount",value:function(){var e=0;return this.edges.forEach((function(t){return e+=t.size})),e}},{key:"removeNode",value:function(e){var t,n=o(this.adjacentNodes(e).values());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.markNodeAsSpecialRecentlyChanged(r)}}catch(e){n.e(e)}finally{n.f()}return this.edges.delete(e),this.nodes.delete(e),this.specialNodes.delete(e),this.specialNodesRecentlyChanged.delete(e),this.specialNodesStructuralChanges.delete(e),this.infiniteRanges.delete(e),this.removeDependencies(e)}},{key:"markNodeAsSpecial",value:function(e){this.specialNodes.add(e)}},{key:"markNodeAsSpecialRecentlyChanged",value:function(e){this.nodes.has(e)&&this.specialNodesRecentlyChanged.add(e)}},{key:"markNodeAsChangingWithStructure",value:function(e){this.specialNodesStructuralChanges.add(e)}},{key:"clearSpecialNodesRecentlyChanged",value:function(){this.specialNodesRecentlyChanged.clear()}},{key:"markNodeAsInfiniteRange",value:function(e){this.infiniteRanges.add(e)}},{key:"existsEdge",value:function(e,t){var n,r;return null!==(r=null===(n=this.edges.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r}},{key:"topSortWithScc",value:function(){return this.getTopSortedWithSccSubgraphFrom(Array.from(this.nodes),(function(e){return!0}),(function(e){}))}},{key:"getTopSortedWithSccSubgraphFrom",value:function(e,t,n){var o=this,i=new Map,a=new Map,s=new Map,u=new Set,l=new Map,c=[],f=0,h=new Set;e.reverse(),e.forEach((function(e){if(void 0===l.get(e)){var t=[e],n=[];l.set(e,r.ON_STACK);for(var d=function(){var e=t[t.length-1];switch(l.get(e)){case r.ON_STACK:i.set(e,f),a.set(e,f),n.push(e),f++,o.adjacentNodes(e).forEach((function(n){void 0===i.get(n)&&(t.push(n),s.set(n,e),l.set(n,r.ON_STACK))})),l.set(e,r.PROCESSED);break;case r.PROCESSED:var d;if(d=i.get(e),o.adjacentNodes(e).forEach((function(t){u.has(t)||(d=s.get(t)===e?Math.min(d,a.get(t)):Math.min(d,i.get(t)))})),a.set(e,d),d===i.get(e)){var p=[];do{p.push(n[n.length-1]),n.pop()}while(p[p.length-1]!==e);p.forEach((function(e){u.add(e)})),c.push.apply(c,p),p.length>1&&p.forEach((function(e){h.add(e)}))}t.pop(),l.set(e,r.POPPED);break;case r.POPPED:t.pop()}};t.length>0;)d()}}));var d=new Set(e),p=[],m=[];return c.reverse(),c.forEach((function(e){h.has(e)||o.adjacentNodes(e).has(e)?(m.push(e),n(e),o.adjacentNodes(e).forEach((function(e){return d.add(e)}))):(p.push(e),d.has(e)&&t(e)&&o.adjacentNodes(e).forEach((function(e){return d.add(e)})))})),{sorted:p,cycled:m}}},{key:"getDependencies",value:function(e){var t=[];return this.edges.forEach((function(n,r){n.has(e)&&t.push(r)})),t}},{key:"destroy",value:function(){this.edges.clear(),this.nodes.clear(),this.specialNodes.clear(),this.specialNodesStructuralChanges.clear(),this.clearSpecialNodesRecentlyChanged()}},{key:"removeDependencies",value:function(e){var t=this.dependencyQuery(e);if(!t)return[];var n,r=o(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.softRemoveEdge(i,e)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&a(t.prototype,n),i&&a(t,i),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixMapping",(function(){return u}));n(72),n(3),n(33),n(1),n(2),n(4),n(60),n(19),n(25),n(23),n(8),n(10),n(11);function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.matrixMapping=new Map}var t,n,i;return t=e,(n=[{key:"getMatrix",value:function(e){return this.matrixMapping.get(e.toString())}},{key:"setMatrix",value:function(e,t){this.matrixMapping.set(e.toString(),t)}},{key:"removeMatrix",value:function(e){this.matrixMapping.delete(e.toString())}},{key:"isFormulaMatrixInRow",value:function(e,t){var n,r=o(this.matrixMapping.values());try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.spansThroughSheetRows(e,t)&&i.isFormula())return!0}}catch(e){r.e(e)}finally{r.f()}return!1}},{key:"isFormulaMatrixInRows",value:function(e){var t,n=o(e.rows());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(this.isFormulaMatrixInRow(e.sheet,r))return!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"isFormulaMatrixInColumn",value:function(e,t){var n,r=o(this.matrixMapping.values());try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.spansThroughSheetColumn(e,t)&&i.isFormula())return!0}}catch(e){r.e(e)}finally{r.f()}return!1}},{key:"isFormulaMatrixInColumns",value:function(e){var t,n=o(e.columns());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(this.isFormulaMatrixInColumn(e.sheet,r))return!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"isFormulaMatrixInRange",value:function(e){var t,n=o(this.matrixMapping.values());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.isFormula()&&r.getRange().doesOverlap(e))return!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"isFormulaMatrixAtAddress",value:function(e){var t,n=o(this.matrixMapping.values());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.getRange().addressInRange(e)&&r.isFormula())return!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"numericMatrices",value:regeneratorRuntime.mark((function e(){var t,n,i,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=o(this.matrixMapping.entries()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(i=r(n.value,2),a=i[0],(s=i[1]).isFormula()){e.next=8;break}return e.next=8,[a,s];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"numericMatricesInRows",value:regeneratorRuntime.mark((function e(t){var n,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=o(this.matrixMapping.entries()),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=10;break}if(a=r(i.value,2),s=a[0],!(u=a[1]).spansThroughSheetRows(t.sheet,t.rowStart,t.rowEnd)||u.isFormula()){e.next=8;break}return e.next=8,[s,u];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"numericMatricesInColumns",value:regeneratorRuntime.mark((function e(t){var n,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=o(this.matrixMapping.entries()),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=10;break}if(a=r(i.value,2),s=a[0],!(u=a[1]).spansThroughSheetColumn(t.sheet,t.columnStart,t.columnEnd)||u.isFormula()){e.next=8;break}return e.next=8,[s,u];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"numericMatricesInRange",value:regeneratorRuntime.mark((function e(t){var n,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=o(this.matrixMapping.entries()),e.prev=1,n.s();case 3:if((i=n.n()).done){e.next=10;break}if(a=r(i.value,2),s=a[0],!(u=a[1]).getRange().doesOverlap(t)){e.next=8;break}return e.next=8,[s,u];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"truncateMatricesByRows",value:function(e){var t,n=Array(),i=o(this.numericMatricesInRows(e));try{for(i.s();!(t=i.n()).done;){var a=r(t.value,2),s=a[0],u=a[1];u.removeRows(e),0===u.height&&(this.removeMatrix(s),n.push(u))}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"truncateMatricesByColumns",value:function(e){var t,n=Array(),i=o(this.numericMatricesInColumns(e));try{for(i.s();!(t=i.n()).done;){var a=r(t.value,2),s=a[0],u=a[1];u.removeColumns(e),0===u.width&&(this.removeMatrix(s),n.push(u))}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"destroy",value:function(){this.matrixMapping.clear()}}])&&s(t.prototype,n),i&&s(t,i),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"RangeMapping",(function(){return c}));n(72),n(3),n(33),n(1),n(2),n(4),n(70),n(11),n(8),n(10),n(230),n(48),n(27),n(20),n(19),n(25),n(23);var r=n(79),o=n(22);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.rangeMapping=new Map}var t,n,s;return t=e,(n=[{key:"getMappingSize",value:function(e){var t,n;return null!==(n=null===(t=this.rangeMapping.get(e))||void 0===t?void 0:t.size)&&void 0!==n?n:0}},{key:"setRange",value:function(e){var t=this.rangeMapping.get(e.getStart().sheet);void 0===t&&(t=new Map,this.rangeMapping.set(e.getStart().sheet,t));var n=f(e.getStart(),e.getEnd());t.set(n,e)}},{key:"removeRange",value:function(e){var t=e.getStart().sheet,n=this.rangeMapping.get(t);if(void 0!==n){var r=f(e.getStart(),e.getEnd());n.delete(r),0===n.size&&this.rangeMapping.delete(t)}}},{key:"getRange",value:function(e,t){var n=this.rangeMapping.get(e.sheet),r=f(e,t);return null==n?void 0:n.get(r)}},{key:"fetchRange",value:function(e,t){var n=this.getRange(e,t);if(!n)throw Error("Range does not exist");return n}},{key:"truncateRanges",value:function(e,t){var n,r=Array(),o=Array(),s=e.sheet,u=a(this.entriesFromSheet(e.sheet));try{for(u.s();!(n=u.n()).done;){var l=i(n.value,2),c=l[0],f=l[1],p=f.range;e.start<=t(f.range.end)&&(p.removeSpan(e),p.shouldBeRemoved()?(this.removeByKey(s,c),r.push(f)):o.push([c,f]))}}catch(e){u.e(e)}finally{u.f()}var m=[];o.sort((function(e,n){return d(e[1],n[1],t)}));for(var v=0,g=o;v<g.length;v++){var y=i(g[v],2),E=y[0],T=y[1],C=h(T.range);if(C!==E){var w=this.getByKey(s,C);this.removeByKey(s,E),void 0!==w&&T!=w?m.push([w,T]):this.setRange(T)}}return{verticesToRemove:r,verticesToMerge:m}}},{key:"moveAllRangesInSheetAfterRowByRows",value:function(e,t,n){this.updateVerticesFromSheet(e,(function(e,r){return t<=r.start.row?(r.range.shiftByRows(n),r):t>r.start.row&&t<=r.end.row?(r.range.expandByRows(n),r):void 0}))}},{key:"moveAllRangesInSheetAfterColumnByColumns",value:function(e,t,n){this.updateVerticesFromSheet(e,(function(e,r){return t<=r.start.col?(r.range.shiftByColumns(n),r):t>r.start.col&&t<=r.end.col?(r.range.expandByColumns(n),r):void 0}))}},{key:"moveRangesInsideSourceRange",value:function(e,t,n,r){this.updateVerticesFromSheet(e.sheet,(function(o,i){return e.containsRange(i.range)?(i.range.shiftByColumns(t),i.range.shiftByRows(n),i.range.moveToSheet(r),i):void 0}))}},{key:"removeRangesInSheet",value:function(e){if(this.rangeMapping.has(e)){var t=this.rangeMapping.get(e).values();return this.rangeMapping.delete(e),t}return[][Symbol.iterator]()}},{key:"rangesInSheet",value:regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.rangeMapping.get(t)){e.next=3;break}return e.abrupt("return");case 3:return e.delegateYield(n.values(),"t0",4);case 4:case"end":return e.stop()}}),e,this)}))},{key:"rangeVerticesContainedInRange",value:regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a(this.rangesInSheet(t.sheet)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=10;break}if(o=r.value,!t.containsRange(o.range)){e.next=8;break}return e.next=8,o;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"findSmallerRange",value:function(e){if(e.height()>1&&Number.isFinite(e.height())){var t=Object(o.simpleCellAddress)(e.end.sheet,e.end.col,e.end.row-1),n=this.getRange(e.start,t);if(void 0!==n)return{smallerRangeVertex:n,restRange:new r.AbsoluteCellRange(Object(o.simpleCellAddress)(e.start.sheet,e.start.col,e.end.row),e.end)}}return{smallerRangeVertex:null,restRange:e}}},{key:"destroy",value:function(){this.rangeMapping.clear()}},{key:"entriesFromSheet",value:regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.rangeMapping.get(t)){e.next=3;break}return e.abrupt("return");case 3:return e.delegateYield(n.entries(),"t0",4);case 4:case"end":return e.stop()}}),e,this)}))},{key:"removeByKey",value:function(e,t){this.rangeMapping.get(e).delete(t)}},{key:"getByKey",value:function(e,t){var n;return null===(n=this.rangeMapping.get(e))||void 0===n?void 0:n.get(t)}},{key:"updateVerticesFromSheet",value:function(e,t){var n,r=this,o=Array(),s=a(this.entriesFromSheet(e));try{for(s.s();!(n=s.n()).done;){var u=i(n.value,2),l=u[0],c=t(l,u[1]);void 0!==c&&(this.removeByKey(e,l),o.push(c))}}catch(e){s.e(e)}finally{s.f()}o.forEach((function(e){r.setRange(e)}))}}])&&l(t.prototype,n),s&&l(t,s),e}();function f(e,t){return"".concat(e.col,",").concat(e.row,",").concat(t.col,",").concat(t.row)}function h(e){return f(e.start,e.end)}var d=function(e,t,n){var r=n(e.range.start),o=n(e.range.start);return r===o?n(e.range.end)-n(t.range.end):r-o}},function(e,t,n){"use strict";n.r(t),n.d(t,"SheetMapping",(function(){return h}));n(72),n(3),n(33),n(1),n(2),n(4),n(20),n(41),n(23),n(19),n(25),n(8),n(10),n(11);var r=n(198),o=n(36);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function c(e){return e.toLowerCase()}var f=function(){function e(t,n){s(this,e),this.id=t,this.displayName=n}return l(e,[{key:"canonicalName",get:function(){return c(this.displayName)}}]),e}(),h=function(){function e(t){var n=this;s(this,e),this.languages=t,this.mappingFromCanonicalName=new Map,this.mappingFromId=new Map,this.lastSheetId=-1,this.fetch=function(e){var t=n.mappingFromCanonicalName.get(c(e));if(void 0===t)throw new o.NoSheetWithNameError(e);return t.id},this.get=function(e){var t=n.mappingFromCanonicalName.get(c(e));return t?t.id:void 0},this.fetchDisplayName=function(e){return n.fetchSheetById(e).displayName},this.sheetNamePrefix=t.getUITranslation(r.UIElement.NEW_SHEET_PREFIX)}return l(e,[{key:"addSheet",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"".concat(this.sheetNamePrefix).concat(this.lastSheetId+2),t=c(e);if(this.mappingFromCanonicalName.has(t))throw new o.SheetNameAlreadyTakenError(e);this.lastSheetId++;var n=new f(this.lastSheetId,e);return this.store(n),n.id}},{key:"removeSheet",value:function(e){var t=this.fetchSheetById(e);e==this.lastSheetId&&--this.lastSheetId,this.mappingFromCanonicalName.delete(t.canonicalName),this.mappingFromId.delete(t.id)}},{key:"getDisplayName",value:function(e){var t=this.mappingFromId.get(e);return t?t.displayName:void 0}},{key:"getDisplayNameByName",value:function(e){var t=this.mappingFromCanonicalName.get(c(e));return t?t.displayName:void 0}},{key:"displayNames",value:regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i(this.mappingFromCanonicalName.values()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,r.displayName;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"numberOfSheets",value:function(){return this.mappingFromCanonicalName.size}},{key:"hasSheetWithId",value:function(e){return this.mappingFromId.has(e)}},{key:"hasSheetWithName",value:function(e){return this.mappingFromCanonicalName.has(c(e))}},{key:"renameSheet",value:function(e,t){var n=this.fetchSheetById(e),r=n.displayName;if(r!==t){var i=this.mappingFromCanonicalName.get(c(t));if(i&&i.id!==n.id)throw new o.SheetNameAlreadyTakenError(t);var a=n.canonicalName;return this.mappingFromCanonicalName.delete(a),n.displayName=t,this.store(n),r}}},{key:"destroy",value:function(){this.mappingFromCanonicalName.clear(),this.mappingFromId.clear()}},{key:"sheetNames",value:function(){return Array.from(this.mappingFromId.values()).map((function(e){return e.displayName}))}},{key:"store",value:function(e){this.mappingFromId.set(e.id,e),this.mappingFromCanonicalName.set(e.canonicalName,e)}},{key:"fetchSheetById",value:function(e){var t=this.mappingFromId.get(e);if(void 0===t)throw new o.NoSheetWithIdError(e);return t}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"TranslationPackage",(function(){return l})),n.d(t,"buildTranslationPackage",(function(){return c}));n(83),n(94),n(51),n(254),n(3),n(1),n(57),n(2),n(4),n(217),n(19),n(25),n(23),n(8),n(10),n(11);var r=n(22),o=n(36),i=n(198);function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.functions=t,this.errors=n,this.ui=r,this._protectedTranslations={VERSION:"VERSION"},this.checkUI(),this.checkErrors(),this.checkFunctionTranslations(this.functions),Object.assign(this.functions,this._protectedTranslations)}var t,n,s;return t=e,(n=[{key:"extendFunctions",value:function(e){this.checkFunctionTranslations(e),Object.assign(this.functions,e)}},{key:"buildFunctionMapping",value:function(){var e=this;return Object.keys(this.functions).reduce((function(t,n){return t[e.functions[n]]=n,t}),{})}},{key:"buildErrorMapping",value:function(){var e=this;return Object.keys(this.errors).reduce((function(t,n){return t[e.errors[n]]=n,t}),{})}},{key:"isFunctionTranslated",value:function(e){return void 0!==this.functions[e]}},{key:"getFunctionTranslations",value:function(e){var t,n=[],r=a(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;this.isFunctionTranslated(o)&&n.push(this.functions[o])}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"getFunctionTranslation",value:function(e){var t=this.functions[e];if(void 0===t)throw new o.MissingTranslationError("functions.".concat(e));return t}},{key:"getMaybeFunctionTranslation",value:function(e){return this.functions[e]}},{key:"getErrorTranslation",value:function(e){if(e===r.ErrorType.LIC)return"#".concat(r.ErrorType.LIC,"!");var t=this.errors[e];if(void 0===t)throw new o.MissingTranslationError("errors.".concat(e));return t}},{key:"getUITranslation",value:function(e){var t=this.ui[e];if(void 0===t)throw new o.MissingTranslationError("ui.".concat(e));return t}},{key:"checkUI",value:function(){for(var e=0,t=Object.values(i.UIElement);e<t.length;e++){var n=t[e];if(!(n in this.ui))throw new o.MissingTranslationError("ui.".concat(n))}}},{key:"checkErrors",value:function(){for(var e=0,t=Object.values(r.ErrorType);e<t.length;e++){var n=t[e];if(!(n in this.errors)&&n!==r.ErrorType.LIC)throw new o.MissingTranslationError("errors.".concat(n))}}},{key:"checkFunctionTranslations",value:function(e){var t,n=new Set(Object.getOwnPropertyNames(e)),r=a(Object.getOwnPropertyNames(this._protectedTranslations));try{for(r.s();!(t=r.n()).done;){var i=t.value;if(n.has(i))throw new o.ProtectedFunctionTranslationError(i)}}catch(e){r.e(e)}finally{r.f()}}}])&&u(t.prototype,n),s&&u(t,s),e}();function c(e){return new l(Object.assign({},e.functions),Object.assign({},e.errors),Object.assign({},e.ui))}},function(e,t,n){var r=n(29),o=n(640).values;r({target:"Object",stat:!0},{values:function(e){return o(e)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"SparseStrategy",(function(){return l}));n(72),n(3),n(33),n(1),n(2),n(4),n(27),n(19),n(25),n(23),n(8),n(10),n(11);var r=n(22);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.width=t,this.height=n,this.mapping=new Map}var t,n,a;return t=e,(n=[{key:"getCell",value:function(e){var t=this.mapping.get(e.col);return t&&t.get(e.row)||null}},{key:"setCell",value:function(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);var n=this.mapping.get(e.col);n||(n=new Map,this.mapping.set(e.col,n)),n.set(e.row,t)}},{key:"has",value:function(e){var t=this.mapping.get(e.col);return!!t&&!!t.get(e.row)}},{key:"getHeight",value:function(){return this.height}},{key:"getWidth",value:function(){return this.width}},{key:"removeCell",value:function(e){var t=this.mapping.get(e.col);t&&t.delete(e.row)}},{key:"addRows",value:function(e,t){this.mapping.forEach((function(n){var r=new Map;n.forEach((function(o,i){i>=e&&(r.set(i+t,o),n.delete(i))})),r.forEach((function(e,t){n.set(t,e)}))})),this.height+=t}},{key:"addColumns",value:function(e,t){var n=this,r=new Map;this.mapping.forEach((function(o,i){i>=e&&(r.set(i+t,o),n.mapping.delete(i))})),r.forEach((function(e,t){n.mapping.set(t,e)})),this.width+=t}},{key:"removeRows",value:function(e){this.mapping.forEach((function(t){var n=new Map;t.forEach((function(r,o){o>=e.rowStart&&(t.delete(o),o>e.rowEnd&&n.set(o-e.numberOfRows,r))})),n.forEach((function(e,n){t.set(n,e)}))}));var t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}},{key:"removeColumns",value:function(e){var t=this,n=new Map;this.mapping.forEach((function(r,o){o>=e.columnStart&&(t.mapping.delete(o),o>e.columnEnd&&n.set(o-e.numberOfColumns,r))})),n.forEach((function(e,n){t.mapping.set(n,e)}));var r=Math.min(this.width-1,e.columnEnd),o=Math.max(0,r-e.columnStart+1);this.width=Math.max(0,this.width-o)}},{key:"getEntries",value:regeneratorRuntime.mark((function e(t){var n,a,s,u,l,c,f,h,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.mapping),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=24;break}s=o(a.value,2),u=s[0],l=s[1],c=i(l),e.prev=6,c.s();case 8:if((f=c.n()).done){e.next=14;break}return h=o(f.value,2),d=h[0],p=h[1],e.next=12,[Object(r.simpleCellAddress)(t,u,d),p];case 12:e.next=8;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(6),c.e(e.t0);case 19:return e.prev=19,c.f(),e.finish(19);case 22:e.next=3;break;case 24:e.next=29;break;case 26:e.prev=26,e.t1=e.catch(1),n.e(e.t1);case 29:return e.prev=29,n.f(),e.finish(29);case 32:case"end":return e.stop()}}),e,this,[[1,26,29,32],[6,16,19,22]])}))},{key:"verticesFromColumn",value:regeneratorRuntime.mark((function e(t){var n,r,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.mapping.get(t)){e.next=3;break}return e.abrupt("return");case 3:r=i(n),e.prev=4,r.s();case 6:if((a=r.n()).done){e.next=12;break}return(s=o(a.value,2))[0],u=s[1],e.next=10,u;case 10:e.next=6;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),r.e(e.t0);case 17:return e.prev=17,r.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[4,14,17,20]])}))},{key:"verticesFromRow",value:regeneratorRuntime.mark((function e(t){var n,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.mapping.values()),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=11;break}if(o=r.value,!(a=o.get(t))){e.next=9;break}return e.next=9,a;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),n.e(e.t0);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"verticesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){var n,r,a,s,u,l,c,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(t.columns()),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=27;break}if(a=r.value,s=this.mapping.get(a)){e.next=8;break}return e.abrupt("continue",25);case 8:u=i(s),e.prev=9,u.s();case 11:if((l=u.n()).done){e.next=17;break}return(c=o(l.value,2))[0],f=c[1],e.next=15,f;case 15:e.next=11;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(9),u.e(e.t0);case 22:return e.prev=22,u.f(),e.finish(22);case 25:e.next=3;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(1),n.e(e.t1);case 32:return e.prev=32,n.f(),e.finish(32);case 35:case"end":return e.stop()}}),e,this,[[1,29,32,35],[9,19,22,25]])}))},{key:"verticesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){var n,r,o,a,s,u,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.mapping.values()),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=26;break}o=r.value,a=i(t.rows()),e.prev=6,a.s();case 8:if((s=a.n()).done){e.next=16;break}if(u=s.value,!(l=o.get(u))){e.next=14;break}return e.next=14,l;case 14:e.next=8;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(6),a.e(e.t0);case 21:return e.prev=21,a.f(),e.finish(21);case 24:e.next=3;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(1),n.e(e.t1);case 31:return e.prev=31,n.f(),e.finish(31);case 34:case"end":return e.stop()}}),e,this,[[1,28,31,34],[6,18,21,24]])}))},{key:"entriesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){var n,a,s,u,l,c,f,h,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(this.mapping.entries()),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=26;break}s=o(a.value,2),u=s[0],l=s[1],c=i(t.rows()),e.prev=6,c.s();case 8:if((f=c.n()).done){e.next=16;break}if(h=f.value,!(d=l.get(h))){e.next=14;break}return e.next=14,[Object(r.simpleCellAddress)(t.sheet,u,h),d];case 14:e.next=8;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(6),c.e(e.t0);case 21:return e.prev=21,c.f(),e.finish(21);case 24:e.next=3;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(1),n.e(e.t1);case 31:return e.prev=31,n.f(),e.finish(31);case 34:case"end":return e.stop()}}),e,this,[[1,28,31,34],[6,18,21,24]])}))},{key:"entriesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){var n,a,s,u,l,c,f,h,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i(t.columns()),e.prev=1,n.s();case 3:if((a=n.n()).done){e.next=26;break}if(s=a.value,!(u=this.mapping.get(s))){e.next=24;break}l=i(u.entries()),e.prev=8,l.s();case 10:if((c=l.n()).done){e.next=16;break}return f=o(c.value,2),h=f[0],d=f[1],e.next=14,[Object(r.simpleCellAddress)(t.sheet,s,h),d];case 14:e.next=10;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(8),l.e(e.t0);case 21:return e.prev=21,l.f(),e.finish(21);case 24:e.next=3;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(1),n.e(e.t1);case 31:return e.prev=31,n.f(),e.finish(31);case 34:case"end":return e.stop()}}),e,this,[[1,28,31,34],[8,18,21,24]])}))},{key:"vertices",value:regeneratorRuntime.mark((function e(){var t,n,r,a,s,u,l,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=i(this.mapping),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=25;break}(r=o(n.value,2))[0],a=r[1],s=i(a),e.prev=6,s.s();case 8:if((u=s.n()).done){e.next=15;break}if((l=o(u.value,2))[0],!(c=l[1])){e.next=13;break}return e.next=13,c;case 13:e.next=8;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(6),s.e(e.t0);case 20:return e.prev=20,s.f(),e.finish(20);case 23:e.next=3;break;case 25:e.next=30;break;case 27:e.prev=27,e.t1=e.catch(1),t.e(e.t1);case 30:return e.prev=30,t.f(),e.finish(30);case 33:case"end":return e.stop()}}),e,this,[[1,27,30,33],[6,17,20,23]])}))}])&&u(t.prototype,n),a&&u(t,a),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"DenseStrategy",(function(){return s}));n(72),n(55),n(20),n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(23),n(19),n(25);var r=n(22);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var s=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.width=t,this.height=n,this.mapping=new Array(n);for(var r=0;r<n;r++)this.mapping[r]=new Array(t)}var t,n,i;return t=e,(n=[{key:"getCell",value:function(e){return this.getCellVertex(e.col,e.row)}},{key:"setCell",value:function(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1),this.mapping[e.row]||(this.mapping[e.row]=new Array(this.width)),this.mapping[e.row][e.col]=t}},{key:"has",value:function(e){var t=this.mapping[e.row];return!!t&&!!t[e.col]}},{key:"getHeight",value:function(){return this.height}},{key:"getWidth",value:function(){return this.width}},{key:"removeCell",value:function(e){void 0!==this.mapping[e.row]&&delete this.mapping[e.row][e.col]}},{key:"addRows",value:function(e,t){for(var n,r=[],o=0;o<t;o++)r.push(new Array(this.width));(n=this.mapping).splice.apply(n,[e,0].concat(r)),this.height+=t}},{key:"addColumns",value:function(e,t){for(var n=0;n<this.height;n++){var r;(r=this.mapping[n]).splice.apply(r,[e,0].concat(o(new Array(t))))}this.width+=t}},{key:"removeRows",value:function(e){this.mapping.splice(e.rowStart,e.numberOfRows);var t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}},{key:"removeColumns",value:function(e){for(var t=0;t<this.height;t++)this.mapping[t].splice(e.columnStart,e.numberOfColumns);var n=Math.min(this.width-1,e.columnEnd),r=Math.max(0,n-e.columnStart+1);this.width=Math.max(0,this.width-r)}},{key:"getEntries",value:regeneratorRuntime.mark((function e(t){var n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.height)){e.next=14;break}o=0;case 3:if(!(o<this.width)){e.next=11;break}if(!(i=this.getCellVertex(o,n))){e.next=8;break}return e.next=8,[Object(r.simpleCellAddress)(t,o,n),i];case 8:++o,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromColumn",value:regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.height)){e.next=9;break}if(!(r=this.getCellVertex(t,n))){e.next=6;break}return e.next=6,r;case 6:++n,e.next=1;break;case 9:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromRow",value:regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.width)){e.next=9;break}if(!(r=this.getCellVertex(n,t))){e.next=6;break}return e.next=6,r;case 6:++n,e.next=1;break;case 9:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.columnStart;case 1:if(!(n<=t.columnEnd)){e.next=14;break}r=0;case 3:if(!(r<this.height)){e.next=11;break}if(!(o=this.getCellVertex(n,r))){e.next=8;break}return e.next=8,o;case 8:++r,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"verticesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.width)){e.next=14;break}r=t.rowStart;case 3:if(!(r<=t.rowEnd)){e.next=11;break}if(!(o=this.getCellVertex(n,r))){e.next=8;break}return e.next=8,o;case 8:++r,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){var n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.width)){e.next=14;break}o=t.rowStart;case 3:if(!(o<=t.rowEnd)){e.next=11;break}if(!(i=this.getCellVertex(n,o))){e.next=8;break}return e.next=8,[Object(r.simpleCellAddress)(t.sheet,n,o),i];case 8:++o,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){var n,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<this.height)){e.next=14;break}o=t.columnStart;case 3:if(!(o<=t.columnEnd)){e.next=11;break}if(!(i=this.getCellVertex(o,n))){e.next=8;break}return e.next=8,[Object(r.simpleCellAddress)(t.sheet,o,n),i];case 8:++o,e.next=3;break;case 11:++n,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"vertices",value:regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t<this.height)){e.next=14;break}n=0;case 3:if(!(n<this.width)){e.next=11;break}if(!(r=this.getCellVertex(n,t))){e.next=8;break}return e.next=8,r;case 8:++n,e.next=3;break;case 11:++t,e.next=1;break;case 14:case"end":return e.stop()}}),e,this)}))},{key:"getCellVertex",value:function(e,t){return this.mapping[t]&&this.mapping[t][e]||null}}])&&a(t.prototype,n),i&&a(t,i),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"DetailedCellError",(function(){return r}));
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var r=function e(t,n,r){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=n,this.address=r,this.type=t.type,this.message=null!==(o=t.message)&&void 0!==o?o:""}},function(e,t,n){"use strict";var r,o=n(29),i=n(109).f,a=n(71),s=n(218),u=n(85),l=n(221),c=n(133),f="".endsWith,h=Math.min,d=l("endsWith");o({target:"String",proto:!0,forced:!!(c||d||(r=i(String.prototype,"endsWith"),!r||r.writable))&&!d},{endsWith:function(e){var t=String(u(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=a(t.length),o=void 0===n?r:h(a(n),r),i=String(e);return f?f.call(t,i,o):t.slice(o-i.length,o)===i}})},function(e,t,n){"use strict";n.r(t),n.d(t,"format",(function(){return l})),n.d(t,"padLeft",(function(){return c})),n.d(t,"padRight",(function(){return f})),n.d(t,"defaultStringifyDuration",(function(){return d})),n.d(t,"defaultStringifyDateTime",(function(){return p}));n(34),n(63),n(1),n(60),n(48),n(260),n(110),n(19),n(25),n(23),n(2),n(8),n(10),n(11),n(3),n(4);var r=n(341),o=n(169),i=n(644);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function l(e,t,n,r){var a=n.stringifyDateTime(r.numberToSimpleDateTime(e),t);if(void 0!==a)return a;var s=n.stringifyDuration(Object(o.numberToSimpleTime)(e),t);if(void 0!==s)return s;var u=Object(i.parseForNumberFormat)(t);return void 0!==u?function(e,t){for(var n="",r=0;r<e.length;++r){var o=e[r];if(o.type!==i.TokenType.FREE_TEXT){var a=o.value.split("."),s=a[0],u=a[1]||"",l=a[1]?".":"",d=Number(t.toFixed(u.length)).toString().split("."),p=d[0]||"",m=d[1]||"";if(s.length>p.length){var v=h(s.substr(0,s.length-p.length),"0");p=c(p,v+p.length)}var g=h(u.substr(m.length,u.length-m.length),"0");m=f(m,g+m.length),n+=p+l+m}else n+=o.value}return n}(u.tokens,e):t}function c(e,t){for(var n=e+"";n.length<t;)n="0"+n;return n}function f(e,t){for(var n=e+"";n.length<t;)n+="0";return n}function h(e,t){return e.split(t).length-1}function d(e,t){var n=Object(i.parseForDateTimeFormat)(t);if(void 0!==n){var o,a="",u=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(n.tokens);try{for(u.s();!(o=u.n()).done;){var l=o.value;if(l.type!==i.TokenType.FREE_TEXT)if(r.secondsExtendedRegexp.test(l.value)){var f=l.value.length-3;a+=(e.seconds<10?"0":"")+Math.round(e.seconds*Math.pow(10,f))/Math.pow(10,f)}else switch(l.value.toLowerCase()){case"h":case"hh":a+=c(e.hours,l.value.length),e.hours=0;break;case"[hh]":a+=c(e.hours,l.value.length-2),e.hours=0;break;case"m":case"mm":a+=c(e.minutes,l.value.length),e.minutes=0;break;case"[mm]":a+=c(e.minutes+60*e.hours,l.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":a+=c(e.seconds,l.value.length);break;default:return}else a+=l.value}}catch(e){u.e(e)}finally{u.f()}return a}}function p(e,t){var n=Object(i.parseForDateTimeFormat)(t);if(void 0!==n){for(var o=n.tokens,s="",u=!1,l=o.some((function(e){return e.type===i.TokenType.FORMAT&&("a/p"===e.value||"A/P"===e.value||"am/pm"===e.value||"AM/PM"===e.value)})),f=0;f<o.length;f++){var h=o[f];if(h.type!==i.TokenType.FREE_TEXT)if(r.secondsExtendedRegexp.test(h.value)){var d=h.value.length-3;s+=(e.seconds<10?"0":"")+Math.round(e.seconds*Math.pow(10,d))/Math.pow(10,d)}else switch(h.value.toLowerCase()){case"h":case"hh":u=!0,s+=c(l?(e.hours+11)%12+1:e.hours,h.value.length);break;case"d":case"dd":s+=c(e.day,h.value.length);break;case"s":case"ss":s+=c(Math.round(e.seconds),h.value.length);break;case"m":case"mm":f+1<o.length&&o[f+1].value.startsWith(":")&&(u=!0),s+=c(u?e.minutes:e.month,h.value.length),u=!0;break;case"yy":s+=c(e.year%100,h.value.length);break;case"yyyy":s+=e.year;break;case"am/pm":case"a/p":var p=a(h.value.split("/"),2),m=p[0],v=p[1];s+=e.hours<12?m:v;break;default:return}else s+=h.value}return s}}},function(e,t,n){"use strict";var r=n(29),o=n(118),i=n(643),a=n(261),s=n(46),u=1..toFixed,l=Math.floor,c=function(e,t,n){return 0===t?n:t%2==1?c(e,t-1,n*e):c(e*e,t/2,n)},f=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=l(o/1e7)},h=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=l(r/t),r=r%t*1e7},d=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=String(e[t]);n=""===n?r:n+a.call("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){u.call({})}))},{toFixed:function(e){var t,n,r,s,u=i(this),l=o(e),p=[0,0,0,0,0,0],m="",v="0";if(l<0||l>20)throw RangeError("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(m="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*c(2,69,1))-69)<0?u*c(2,-t,1):u/c(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(p,0,n),r=l;r>=7;)f(p,1e7,0),r-=7;for(f(p,c(10,r,1),0),r=t-1;r>=23;)h(p,1<<23),r-=23;h(p,1<<r),f(p,1,1),h(p,2),v=d(p)}else f(p,0,n),f(p,1<<-t,0),v=d(p)+a.call("0",l);return v=l>0?m+((s=v.length)<=l?"0."+a.call("0",l-s)+v:v.slice(0,s-l)+"."+v.slice(s-l)):m+v}})},function(e,t,n){"use strict";var r=n(118),o=n(85);e.exports=function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"RemoveRowsCommand",(function(){return x})),n.d(t,"AddRowsCommand",(function(){return P})),n.d(t,"AddColumnsCommand",(function(){return L})),n.d(t,"RemoveColumnsCommand",(function(){return D})),n.d(t,"Operations",(function(){return F})),n.d(t,"normalizeRemovedIndexes",(function(){return U})),n.d(t,"normalizeAddedIndexes",(function(){return j}));n(41),n(48),n(3),n(1),n(4),n(20),n(83),n(25),n(70),n(94),n(66),n(19),n(23),n(2),n(8),n(10),n(11);var r=n(50),o=n(342),i=n(22),a=n(79),s=n(197),u=n(141),l=n(343),c=n(101),f=n(647),h=n(344),d=n(648),p=n(649),m=n(345),v=n(650),g=n(36),y=n(346),E=n(199),T=n(69),C=n(263),w=n(168),R=n(119),b=n(652);function O(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=A(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function A(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var x=function(){function e(t,n){k(this,e),this.sheet=t,this.indexes=n}return I(e,[{key:"normalizedIndexes",value:function(){return U(this.indexes)}},{key:"rowsSpans",value:function(){var e=this;return this.normalizedIndexes().map((function(t){return w.RowsSpan.fromNumberOfRows(e.sheet,t[0],t[1])}))}}]),e}(),P=function(){function e(t,n){k(this,e),this.sheet=t,this.indexes=n}return I(e,[{key:"normalizedIndexes",value:function(){return j(this.indexes)}},{key:"rowsSpans",value:function(){var e=this;return this.normalizedIndexes().map((function(t){return w.RowsSpan.fromNumberOfRows(e.sheet,t[0],t[1])}))}}]),e}(),L=function(){function e(t,n){k(this,e),this.sheet=t,this.indexes=n}return I(e,[{key:"normalizedIndexes",value:function(){return j(this.indexes)}},{key:"columnsSpans",value:function(){var e=this;return this.normalizedIndexes().map((function(t){return w.ColumnsSpan.fromNumberOfColumns(e.sheet,t[0],t[1])}))}}]),e}(),D=function(){function e(t,n){k(this,e),this.sheet=t,this.indexes=n}return I(e,[{key:"normalizedIndexes",value:function(){return U(this.indexes)}},{key:"columnsSpans",value:function(){var e=this;return this.normalizedIndexes().map((function(t){return w.ColumnsSpan.fromNumberOfColumns(e.sheet,t[0],t[1])}))}}]),e}(),F=function(){function e(t,n,r,o,i,a,s,u){k(this,e),this.dependencyGraph=t,this.columnSearch=n,this.cellContentParser=r,this.parser=o,this.stats=i,this.lazilyTransformingAstService=a,this.namedExpressions=s,this.config=u,this.changes=l.ContentChanges.empty(),this.allocateNamedExpressionAddressSpace()}return I(e,[{key:"removeRows",value:function(e){var t,n=[],r=N(e.rowsSpans());try{for(r.s();!(t=r.n()).done;){var o=t.value,i=this.doRemoveRows(o);i&&n.push(i)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"addRows",value:function(e){var t,n=N(e.rowsSpans());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.doAddRows(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"addColumns",value:function(e){var t,n=N(e.columnsSpans());try{for(n.s();!(t=n.n()).done;){var r=t.value;this.doAddColumns(r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"removeColumns",value:function(e){var t,n=[],r=N(e.columnsSpans());try{for(r.s();!(t=r.n()).done;){var o=t.value,i=this.doRemoveColumns(o);i&&n.push(i)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"removeSheet",value:function(e){var t,n=this,r=this.sheetMapping.fetch(e);this.dependencyGraph.removeSheet(r),this.stats.measure(R.StatType.TRANSFORM_ASTS,(function(){var e=new v.RemoveSheetTransformer(r);e.performEagerTransformations(n.dependencyGraph,n.parser),t=n.lazilyTransformingAstService.addTransformation(e)})),this.sheetMapping.removeSheet(r),this.columnSearch.removeSheet(r);var o=this.namedExpressions.getAllNamedExpressionsForScope(r).map((function(e){return n.removeNamedExpression(e.normalizeExpressionName(),r)}));return{version:t,scopedNamedExpressions:o}}},{key:"clearSheet",value:function(e){this.dependencyGraph.clearSheet(e),this.columnSearch.removeSheet(e)}},{key:"addSheet",value:function(e){var t=this.sheetMapping.addSheet(e),n=[];return this.dependencyGraph.addressMapping.autoAddSheet(t,n,Object(C.findBoundaries)(n)),this.sheetMapping.fetchDisplayName(t)}},{key:"renameSheet",value:function(e,t){return this.sheetMapping.renameSheet(e,t)}},{key:"moveRows",value:function(e,t,n,r){var o=w.RowsSpan.fromNumberOfRows(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(o),r<t&&(t+=n);var a=Object(i.simpleCellAddress)(e,0,t),s=Object(i.simpleCellAddress)(e,0,r);this.moveCells(a,Number.POSITIVE_INFINITY,n,s);var u=w.RowsSpan.fromNumberOfRows(e,t,n);return this.doRemoveRows(u),this.lazilyTransformingAstService.commitCombinedMode()}},{key:"moveColumns",value:function(e,t,n,r){var o=w.ColumnsSpan.fromNumberOfColumns(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(o),r<t&&(t+=n);var a=Object(i.simpleCellAddress)(e,t,0),s=Object(i.simpleCellAddress)(e,r,0);this.moveCells(a,n,Number.POSITIVE_INFINITY,s);var u=w.ColumnsSpan.fromNumberOfColumns(e,t,n);return this.doRemoveColumns(u),this.lazilyTransformingAstService.commitCombinedMode()}},{key:"moveCells",value:function(e,t,n,r){var o=this;this.ensureItIsPossibleToMoveCells(e,t,n,r);var i=a.AbsoluteCellRange.spanFrom(e,t,n),s=a.AbsoluteCellRange.spanFrom(r,t,n);this.dependencyGraph.breakNumericMatricesInRange(i),this.dependencyGraph.breakNumericMatricesInRange(s);var u=r.col-e.col,l=r.row-e.row,c=r.sheet,f=this.getRangeClipboardCells(s),h=this.dependencyGraph.rawValuesFromRange(s);this.columnSearch.removeValues(h);var p,m=this.dependencyGraph.rawValuesFromRange(i);this.columnSearch.moveValues(m,u,l,c),this.stats.measure(R.StatType.TRANSFORM_ASTS,(function(){var e=new d.MoveCellsTransformer(i,u,l,c);e.performEagerTransformations(o.dependencyGraph,o.parser),p=o.lazilyTransformingAstService.addTransformation(e)})),this.dependencyGraph.moveCells(i,u,l,c);var v=this.updateNamedExpressionsForMovedCells(e,t,n,r);return{version:p,overwrittenCellsData:f,addedGlobalNamedExpressions:v}}},{key:"setRowOrder",value:function(e,t){var n,r=this,o=[],i=[],s=N(t);try{var u=function(){var t=S(n.value,2),s=t[0],u=t[1];if(s!==u){var l=a.AbsoluteCellRange.spanFrom({sheet:e,col:0,row:s},1/0,1);r.dependencyGraph.breakNumericMatricesInRange(l);var c=r.getRangeClipboardCells(l);i=i.concat(c),o.push(c.map((function(e){var t=S(e,2),n=t[0],r=n.sheet,o=n.col,i=t[1];return[{sheet:r,col:o,row:u},i]})))}};for(s.s();!(n=s.n()).done;)u()}catch(e){s.e(e)}finally{s.f()}return o.forEach((function(t){return r.restoreClipboardCells(e,t.values())})),i}},{key:"setColumnOrder",value:function(e,t){var n,r=this,o=[],i=[],s=N(t);try{var u=function(){var t=S(n.value,2),s=t[0],u=t[1];if(s!==u){var l=a.AbsoluteCellRange.spanFrom({sheet:e,col:s,row:0},1,1/0);r.dependencyGraph.breakNumericMatricesInRange(l);var c=r.getRangeClipboardCells(l);i=i.concat(c),o.push(c.map((function(e){var t=S(e,2),n=t[0],r=n.sheet,o=(n.col,n.row),i=t[1];return[{sheet:r,col:u,row:o},i]})))}};for(s.s();!(n=s.n()).done;)u()}catch(e){s.e(e)}finally{s.f()}return o.forEach((function(t){return r.restoreClipboardCells(e,t.values())})),i}},{key:"addNamedExpression",value:function(e,t,n,r){this.storeNamedExpressionInCell(this.namedExpressions.lookupNextAddress(e,n),t);var o=this.namedExpressions.addNamedExpression(e,n,r);this.adjustNamedExpressionEdges(o,e,n)}},{key:"restoreNamedExpression",value:function(e,t,n){var r=e.displayName;this.restoreCell(e.address,t);var o=this.namedExpressions.restoreNamedExpression(e,n);this.adjustNamedExpressionEdges(o,r,n)}},{key:"changeNamedExpressionExpression",value:function(e,t,n,r){var o=this.namedExpressions.namedExpressionForScope(e,n);if(!o)throw new g.NamedExpressionDoesNotExistError(e);var i=o.copy();o.options=r;var a=this.getClipboardCell(o.address);return this.storeNamedExpressionInCell(o.address,t),[i,a]}},{key:"removeNamedExpression",value:function(e,t){var n=this.namedExpressions.namedExpressionForScope(e,t);if(!n)throw new g.NamedExpressionDoesNotExistError(e);this.namedExpressions.remove(n.displayName,t);var r=this.getClipboardCell(n.address);if(void 0!==t){var o=this.namedExpressions.workbookNamedExpressionOrPlaceholder(e);this.dependencyGraph.exchangeNode(n.address,o.address)}else this.dependencyGraph.setCellEmpty(n.address);return[n,r]}},{key:"ensureItIsPossibleToMoveCells",value:function(e,t,n,r){if(Object(i.invalidSimpleCellAddress)(e)||!(H(t)&&H(n)||function(e,t,n){return 0===e.row&&H(t)&&n===Number.POSITIVE_INFINITY||0===e.col&&H(n)&&t===Number.POSITIVE_INFINITY}(e,t,n))||Object(i.invalidSimpleCellAddress)(r)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(r.sheet))throw new g.InvalidArgumentsError("a valid range of cells to move.");var o=a.AbsoluteCellRange.spanFrom(e,t,n),s=a.AbsoluteCellRange.spanFrom(r,t,n);if(s.exceedsSheetSizeLimits(this.config.maxColumns,this.config.maxRows))throw new g.SheetSizeLimitExceededError;if(this.dependencyGraph.matrixMapping.isFormulaMatrixInRange(o))throw new g.SourceLocationHasMatrixError;if(this.dependencyGraph.matrixMapping.isFormulaMatrixInRange(s))throw new g.TargetLocationHasMatrixError}},{key:"restoreClipboardCells",value:function(e,t){var n,r=[],i=N(t);try{for(i.s();!(n=i.n()).done;){var a=S(n.value,2),s=a[0],u=a[1];if(this.restoreCell(s,u),u.type===o.ClipboardCellType.FORMULA){var l=this.parser.fetchCachedResult(u.hash).dependencies;r.push.apply(r,O(this.updateNamedExpressionsForTargetAddress(e,s,l)))}}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"restoreCell",value:function(e,t){switch(t.type){case o.ClipboardCellType.VALUE:this.setValueToCell(t,e);break;case o.ClipboardCellType.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case o.ClipboardCellType.EMPTY:this.setCellEmpty(e);break;case o.ClipboardCellType.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e)}}},{key:"doRemoveRows",value:function(e){var t=this;if(!this.rowEffectivelyNotInSheet(e.rowStart,e.sheet)){var n,r,o=[],i=N(this.dependencyGraph.entriesFromRowsSpan(e));try{for(i.s();!(n=i.n()).done;){var a=S(n.value,1)[0];o.push({address:a,cellType:this.getClipboardCell(a)})}}catch(e){i.e(e)}finally{i.f()}return this.dependencyGraph.removeRows(e),this.stats.measure(R.StatType.TRANSFORM_ASTS,(function(){var n=new m.RemoveRowsTransformer(e);n.performEagerTransformations(t.dependencyGraph,t.parser),r=t.lazilyTransformingAstService.addTransformation(n)})),{version:r,removedCells:o,rowFrom:e.rowStart,rowCount:e.numberOfRows}}}},{key:"doRemoveColumns",value:function(e){var t=this;if(!this.columnEffectivelyNotInSheet(e.columnStart,e.sheet)){var n,r,o=[],i=N(this.dependencyGraph.entriesFromColumnsSpan(e));try{for(i.s();!(n=i.n()).done;){var a=S(n.value,1)[0];o.push({address:a,cellType:this.getClipboardCell(a)})}}catch(e){i.e(e)}finally{i.f()}return this.dependencyGraph.removeColumns(e),this.columnSearch.removeColumns(e),this.stats.measure(R.StatType.TRANSFORM_ASTS,(function(){var n=new p.RemoveColumnsTransformer(e);n.performEagerTransformations(t.dependencyGraph,t.parser),r=t.lazilyTransformingAstService.addTransformation(n)})),{version:r,removedCells:o,columnFrom:e.columnStart,columnCount:e.numberOfColumns}}}},{key:"doAddRows",value:function(e){var t=this;this.rowEffectivelyNotInSheet(e.rowStart,e.sheet)||(this.dependencyGraph.addRows(e),this.stats.measure(R.StatType.TRANSFORM_ASTS,(function(){var n=new h.AddRowsTransformer(e);n.performEagerTransformations(t.dependencyGraph,t.parser),t.lazilyTransformingAstService.addTransformation(n)})))}},{key:"doAddColumns",value:function(e){var t=this;this.columnEffectivelyNotInSheet(e.columnStart,e.sheet)||(this.dependencyGraph.addColumns(e),this.columnSearch.addColumns(e),this.stats.measure(R.StatType.TRANSFORM_ASTS,(function(){var n=new f.AddColumnsTransformer(e);n.performEagerTransformations(t.dependencyGraph,t.parser),t.lazilyTransformingAstService.addTransformation(n)})))}},{key:"getClipboardCell",value:function(e){var t=this.dependencyGraph.getCell(e);if(null===t||t instanceof c.EmptyCellVertex)return{type:o.ClipboardCellType.EMPTY};if(t instanceof c.ValueCellVertex)return Object.assign({type:o.ClipboardCellType.VALUE},t.getValues());if(t instanceof c.MatrixVertex)return{type:o.ClipboardCellType.VALUE,parsedValue:t.getMatrixCellValue(e),rawValue:t.getMatrixCellRawValue(e)};if(t instanceof c.FormulaCellVertex)return{type:o.ClipboardCellType.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof c.ParsingErrorVertex)return{type:o.ClipboardCellType.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors};throw Error("Trying to copy unsupported type")}},{key:"getSheetClipboardCells",value:function(e){for(var t=this.dependencyGraph.getSheetHeight(e),n=this.dependencyGraph.getSheetWidth(e),r=new Array(t),o=0;o<t;o++){r[o]=new Array(n);for(var a=0;a<n;a++){var s=Object(i.simpleCellAddress)(e,a,o);r[o][a]=this.getClipboardCell(s)}}return r}},{key:"getRangeClipboardCells",value:function(e){var t,n=[],r=N(e.addresses(this.dependencyGraph));try{for(r.s();!(t=r.n()).done;){var o=t.value;n.push([o,this.getClipboardCell(o)])}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"setCellContent",value:function(e,t){var n=this.cellContentParser.parse(t),o=this.dependencyGraph.getCell(e);if(!(o instanceof c.MatrixVertex)||o.isFormula()||n instanceof u.CellContent.Number||(this.dependencyGraph.breakNumericMatrix(o),o=this.dependencyGraph.getCell(e)),o instanceof c.MatrixVertex&&!o.isFormula()&&n instanceof u.CellContent.Number){var i=n.value,a=this.dependencyGraph.getCellValue(e);this.dependencyGraph.graph.markNodeAsSpecialRecentlyChanged(o),o.setMatrixCellValue(e,Object(r.getRawValue)(i)),this.columnSearch.change(Object(r.getRawValue)(a),Object(r.getRawValue)(i),e),this.changes.addChange(i,e)}else if(!(o instanceof c.MatrixVertex)&&n instanceof u.CellContent.MatrixFormula){var l=this.parser.parse(n.formula,e),f=l.ast,h=l.errors,d=l.dependencies;if(h.length>0)this.dependencyGraph.setParsingErrorToCell(e,new c.ParsingErrorVertex(h,n.formulaWithBraces()));else{var p=Object(y.buildMatrixVertex)(f,e);if(p instanceof c.ValueCellVertex)throw Error("What if new matrix vertex is not properly constructed?");this.dependencyGraph.addNewMatrixVertex(p),this.dependencyGraph.processCellDependencies(Object(s.absolutizeDependencies)(d,e),p),this.dependencyGraph.graph.markNodeAsSpecialRecentlyChanged(p)}}else{if(o instanceof c.MatrixVertex)throw new Error("Illegal operation");if(n instanceof u.CellContent.Formula){var m=this.parser.parse(n.formula,e),v=m.ast,g=m.errors,E=m.hasVolatileFunction,T=m.hasStructuralChangeFunction,C=m.dependencies;g.length>0?this.dependencyGraph.setParsingErrorToCell(e,new c.ParsingErrorVertex(g,n.formula)):this.dependencyGraph.setFormulaToCell(e,v,Object(s.absolutizeDependencies)(C,e),E,T)}else if(n instanceof u.CellContent.Empty)this.setCellEmpty(e);else{if(n instanceof u.CellContent.MatrixFormula)throw new Error("Cant happen");this.setValueToCell({parsedValue:n.value,rawValue:t},e)}}}},{key:"setSheetContent",value:function(e,t){this.clearSheet(e);for(var n=0;n<t.length;n++)for(var r=0;r<t[n].length;r++){var o=Object(i.simpleCellAddress)(e,r,n);this.setCellContent(o,t[n][r])}}},{key:"setValueToCell",value:function(e,t){var n=this.dependencyGraph.getCellValue(t);this.dependencyGraph.setValueToCell(t,e),this.columnSearch.change(Object(r.getRawValue)(n),Object(r.getRawValue)(e.parsedValue),t),this.changes.addChange(e.parsedValue,t)}},{key:"setCellEmpty",value:function(e){var t=this.dependencyGraph.getCellValue(e);this.columnSearch.remove(Object(r.getRawValue)(t),e),this.changes.addChange(r.EmptyValue,e),this.dependencyGraph.setCellEmpty(e)}},{key:"setFormulaToCellFromCache",value:function(e,t){var n=this.parser.fetchCachedResult(e),r=n.ast,o=n.hasVolatileFunction,i=n.hasStructuralChangeFunction,a=n.dependencies,u=Object(s.absolutizeDependencies)(a,t),l=S(new b.CleanOutOfScopeDependenciesTransformer(t.sheet).transformSingleAst(r,t),1)[0];this.parser.rememberNewAst(l);var c=Object(s.filterDependenciesOutOfScope)(u);this.dependencyGraph.setFormulaToCell(t,l,c,o,i)}},{key:"setParsingErrorToCell",value:function(e,t,n){this.dependencyGraph.setParsingErrorToCell(n,new c.ParsingErrorVertex(t,e))}},{key:"rowEffectivelyNotInSheet",value:function(e,t){return e>=this.dependencyGraph.addressMapping.getHeight(t)}},{key:"getAndClearContentChanges",value:function(){var e=this.changes;return this.changes=l.ContentChanges.empty(),e}},{key:"forceApplyPostponedTransformations",value:function(){this.dependencyGraph.forceApplyPostponedTransformations()}},{key:"sheetMapping",get:function(){return this.dependencyGraph.sheetMapping}},{key:"columnEffectivelyNotInSheet",value:function(e,t){return e>=this.dependencyGraph.addressMapping.getWidth(t)}},{key:"adjustNamedExpressionEdges",value:function(e,t,n){if(void 0!==n){var r,o=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),i=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),a=this.dependencyGraph.fetchCellOrCreateEmpty(i.address),u=N(this.dependencyGraph.graph.adjacentNodes(a));try{for(u.s();!(r=u.n()).done;){var l=r.value;if(l instanceof c.FormulaCellVertex&&l.cellAddress.sheet===n){var f,h=l.getFormula(this.lazilyTransformingAstService),d=l.getAddress(this.lazilyTransformingAstService),p=this.parser.fetchCachedResultForAst(h).dependencies,m=N(Object(s.absolutizeDependencies)(p,d));try{for(m.s();!(f=m.n()).done;){var v=f.value;v instanceof T.NamedExpressionDependency&&v.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdge(a,l),this.dependencyGraph.graph.addEdge(o,l))}}catch(e){m.e(e)}finally{m.f()}}}}catch(e){u.e(e)}finally{u.f()}}}},{key:"storeNamedExpressionInCell",value:function(e,t){var n=this.cellContentParser.parse(t);if(n instanceof u.CellContent.MatrixFormula)throw new Error("Matrix formulas are not supported");if(n instanceof u.CellContent.Formula){var r=this.parser.parse(n.formula,Object(i.simpleCellAddress)(-1,0,0));if(Object(E.doesContainRelativeReferences)(r.ast))throw new g.NoRelativeAddressesAllowedError;var o=r.ast,a=r.hasVolatileFunction,l=r.hasStructuralChangeFunction,c=r.dependencies;this.dependencyGraph.setFormulaToCell(e,o,Object(s.absolutizeDependencies)(c,e),a,l)}else n instanceof u.CellContent.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e)}},{key:"updateNamedExpressionsForMovedCells",value:function(e,t,n,r){if(e.sheet===r.sheet)return[];var o,i=[],s=N(a.AbsoluteCellRange.spanFrom(r,t,n).addresses(this.dependencyGraph));try{for(s.s();!(o=s.n()).done;){var u=o.value,l=this.addressMapping.fetchCell(u);if(l instanceof c.FormulaCellVertex&&u.sheet!==e.sheet){var f=l.getFormula(this.lazilyTransformingAstService),h=this.parser.fetchCachedResultForAst(f).dependencies;i.push.apply(i,O(this.updateNamedExpressionsForTargetAddress(e.sheet,u,h)))}}}catch(e){s.e(e)}finally{s.f()}return i}},{key:"updateNamedExpressionsForTargetAddress",value:function(e,t,n){if(e===t.sheet)return[];var r,o=[],i=this.addressMapping.fetchCell(t),a=N(Object(s.absolutizeDependencies)(n,t));try{for(a.s();!(r=a.n()).done;){var u=r.value;if(u instanceof T.NamedExpressionDependency){var l=u.name,c=this.dependencyGraph.fetchNamedExpressionVertex(l,e),f=this.namedExpressions.isExpressionInScope(l,t.sheet)?this.dependencyGraph.fetchNamedExpressionVertex(l,t.sheet):this.copyOrFetchGlobalNamedExpressionVertex(l,c,o);f!==c&&(this.dependencyGraph.graph.softRemoveEdge(c,i),this.dependencyGraph.graph.addEdge(f,i))}}}catch(e){a.e(e)}finally{a.f()}return o}},{key:"allocateNamedExpressionAddressSpace",value:function(){this.dependencyGraph.addressMapping.addSheet(-1,new c.SparseStrategy(0,0))}},{key:"copyOrFetchGlobalNamedExpressionVertex",value:function(e,t,n){var r=this.namedExpressions.namedExpressionForScope(e);if(void 0===r)if(r=this.namedExpressions.addNamedExpression(e),n.push(r.normalizeExpressionName()),t instanceof c.FormulaCellVertex){var o=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService)),i=o.ast,a=o.hasVolatileFunction,u=o.hasStructuralChangeFunction,l=o.dependencies;this.dependencyGraph.setFormulaToCell(r.address,i,Object(s.absolutizeDependencies)(l,r.address),a,u)}else t instanceof c.EmptyCellVertex?this.setCellEmpty(r.address):t instanceof c.ValueCellVertex&&this.setValueToCell(t.getValues(),r.address);return this.dependencyGraph.fetchCellOrCreateEmpty(r.address)}},{key:"addressMapping",get:function(){return this.dependencyGraph.addressMapping}}]),e}();function U(e){if(e.length<=1)return e;for(var t=O(e).sort((function(e,t){return S(e,1)[0]-S(t,1)[0]})),n=t.reduce((function(e,t){var n=S(t,2),r=n[0],o=n[1],i=e[e.length-1],a=i[0]+i[1];return r<=a?i[1]+=Math.max(0,o-(a-r)):e.push([r,o]),e}),[t[0]]),r=0,o=0;o<n.length;++o)n[o][0]-=r,r+=n[o][1];return n}function j(e){if(e.length<=1)return e;for(var t=O(e).sort((function(e,t){return S(e,1)[0]-S(t,1)[0]})),n=t.reduce((function(e,t){var n=S(t,2),r=n[0],o=n[1],i=e[e.length-1];return r===i[0]?i[1]=Math.max(i[1],o):e.push([r,o]),e}),[t[0]]),r=0,o=0;o<n.length;++o)n[o][0]+=r,r+=n[o][1];return n}function H(e){return Number.isInteger(e)&&e>0}},function(e,t,n){"use strict";n.r(t),n.d(t,"validateAsSheet",(function(){return o})),n.d(t,"findBoundaries",(function(){return i}));var r=n(36);
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function o(e){if(!Array.isArray(e))throw new r.InvalidArgumentsError("an array of arrays.");for(var t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new r.InvalidArgumentsError("an array of arrays.")}function i(e){for(var t=0,n=0,r=0,o=0;o<e.length;o++){for(var i=0,a=0;a<e[o].length;a++){var s=e[o][a];null!=s&&(i=a+1,++r)}t=Math.max(t,i),i>0&&(n=o+1)}var u=t*n;return{height:n,width:t,fill:0===u?0:r/u}}},function(e,t,n){"use strict";n.r(t),n.d(t,"FunctionRegistry",(function(){return d}));n(72),n(25),n(3),n(33),n(1),n(2),n(4),n(57),n(129),n(23),n(20),n(27),n(51),n(19),n(8),n(10),n(11);var r=n(36),o=n(170),i=n(665);function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
function h(e,t){var n,o=t.implementedFunctions[e],i=null===(n=t.aliases)||void 0===n?void 0:n[e];if(void 0!==i){if(void 0!==o)throw new r.AliasAlreadyExisting(e,t.name);o=t.implementedFunctions[i]}if(void 0===o)throw r.FunctionPluginValidationError.functionNotDeclaredInPlugin(e,t.name);return o}var d=function(){function e(t){var n=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.functions=new Map,this.volatileFunctions=new Set,this.structuralChangeFunctions=new Set,this.functionsWhichDoesNotNeedArgumentsToBeComputed=new Set,this.doesFunctionNeedArgumentToBeComputed=function(e){return n.functionsWhichDoesNotNeedArgumentsToBeComputed.has(e)},this.isFunctionVolatile=function(e){return n.volatileFunctions.has(e)},this.isFunctionDependentOnSheetStructureChange=function(e){return n.structuralChangeFunctions.has(e)},t.functionPlugins.length>0){this.instancePlugins=new Map;var r,o=u(t.functionPlugins);try{for(o.s();!(r=o.n()).done;){var i=r.value;e.loadPluginFunctions(i,this.instancePlugins)}}catch(e){o.e(e)}finally{o.f()}}else this.instancePlugins=new Map(e.plugins);var a,l=u(e.protectedFunctions());try{for(l.s();!(a=l.n()).done;){var c=s(a.value,2),f=c[0],d=c[1];e.loadFunctionUnprotected(d,f,this.instancePlugins)}}catch(e){l.e(e)}finally{l.f()}var p,m=u(this.instancePlugins.entries());try{for(m.s();!(p=m.n()).done;){var v=s(p.value,2),g=v[0],y=v[1];this.categorizeFunction(g,h(g,y))}}catch(e){m.e(e)}finally{m.f()}}var t,n,i;return t=e,n=[{key:"initializePlugins",value:function(e){var t,n=this,r=[],o=u(this.instancePlugins.entries());try{var i=function(){var o=s(t.value,2),i=o[0],a=o[1],u=r.find((function(e){return e instanceof a}));void 0===u&&(u=new a(e),r.push(u));var l=h(i,a).method;n.functions.set(i,[l,u])};for(o.s();!(t=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}}},{key:"getFunctionPlugin",value:function(t){if(!e.functionIsProtected(t))return this.instancePlugins.get(t)}},{key:"getFunction",value:function(e){return this.functions.get(e)}},{key:"getPlugins",value:function(){var t,n=new Set,r=u(this.instancePlugins);try{for(r.s();!(t=r.n()).done;){var o=s(t.value,2),i=o[0],a=o[1];e.functionIsProtected(i)||n.add(a)}}catch(e){r.e(e)}finally{r.f()}return Array.from(n)}},{key:"getRegisteredFunctionIds",value:function(){return Array.from(this.functions.keys())}},{key:"categorizeFunction",value:function(e,t){t.isVolatile&&this.volatileFunctions.add(e),t.doesNotNeedArgumentsToBeComputed&&this.functionsWhichDoesNotNeedArgumentsToBeComputed.add(e),t.isDependentOnSheetStructureChange&&this.structuralChangeFunctions.add(e)}}],i=[{key:"registerFunctionPlugin",value:function(e,t){this.loadPluginFunctions(e,this.plugins),void 0!==t&&this.loadTranslations(t)}},{key:"registerFunction",value:function(e,t,n){this.loadPluginFunction(t,e,this.plugins),void 0!==n&&this.loadTranslations(n)}},{key:"unregisterFunction",value:function(e){if(this.functionIsProtected(e))throw r.ProtectedFunctionError.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}},{key:"unregisterFunctionPlugin",value:function(e){var t,n=u(this.protectedPlugins());try{for(n.s();!(t=n.n()).done;)if(t.value===e)throw r.ProtectedFunctionError.cannotUnregisterProtectedPlugin()}catch(e){n.e(e)}finally{n.f()}var o,i=u(this.plugins.entries());try{for(i.s();!(o=i.n()).done;){var a=s(o.value,2),l=a[0];a[1]===e&&this.plugins.delete(l)}}catch(e){i.e(e)}finally{i.f()}}},{key:"unregisterAll",value:function(){this.plugins.clear()}},{key:"getRegisteredFunctionIds",value:function(){return[].concat(a(Array.from(this.plugins.keys())),a(Array.from(this._protectedPlugins.keys())))}},{key:"getPlugins",value:function(){return Array.from(new Set(this.plugins.values()).values())}},{key:"getFunctionPlugin",value:function(e){return this.functionIsProtected(e)?void 0:this.plugins.get(e)}},{key:"loadTranslations",value:function(e){var t=new Set(o.HyperFormula.getRegisteredLanguagesCodes());Object.keys(e).forEach((function(n){t.has(n)&&o.HyperFormula.getLanguage(n).extendFunctions(e[n])}))}},{key:"loadPluginFunctions",value:function(e,t){var n=this;Object.keys(e.implementedFunctions).forEach((function(r){n.loadPluginFunction(e,r,t)})),void 0!==e.aliases&&Object.keys(e.aliases).forEach((function(r){n.loadPluginFunction(e,r,t)}))}},{key:"loadPluginFunction",value:function(e,t,n){if(this.functionIsProtected(t))throw r.ProtectedFunctionError.cannotRegisterFunctionWithId(t);this.loadFunctionUnprotected(e,t,n)}},{key:"loadFunctionUnprotected",value:function(e,t,n){var o=h(t,e).method;if(!Object.prototype.hasOwnProperty.call(e.prototype,o))throw r.FunctionPluginValidationError.functionMethodNotFound(o,e.name);n.set(t,e)}},{key:"functionIsProtected",value:function(e){return this._protectedPlugins.has(e)}},{key:"protectedFunctions",value:regeneratorRuntime.mark((function e(){var t,n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=u(this._protectedPlugins),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(r=s(n.value,2),o=r[0],void 0===(i=r[1])){e.next=8;break}return e.next=8,[o,i];case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"protectedPlugins",value:regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=u(this._protectedPlugins),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(r=s(n.value,2),void 0===(o=r[1])){e.next=8;break}return e.next=8,o;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))}],n&&f(t.prototype,n),i&&f(t,i),e}();d.plugins=new Map,d._protectedPlugins=new Map([["VERSION",i.VersionPlugin],["OFFSET",void 0]])},function(e,t,n){"use strict";var r=n(29),o=n(223).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(29),o=n(670).start;r({target:"String",proto:!0,forced:n(671)},{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n.r(t);var r=n(35);n.d(t,"FunctionPlugin",(function(){return r.FunctionPlugin}))},function(e,t,n){"use strict";n.r(t),n.d(t,"PI",(function(){return f})),n.d(t,"MathConstantsPlugin",(function(){return h}));n(260),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=parseFloat(Math.PI.toFixed(14)),h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"pi",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PI"),(function(){return f}))}},{key:"sqrtpi",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),(function(e){return Math.sqrt(f*e)}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);h.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:r.ArgumentTypes.NUMBER,minValue:0}]}}},function(e,t){var n=Math.expm1,r=Math.exp;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:n},function(e,t,n){var r=n(396);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";t.__esModule=!0,t.PARTIALLY_VISIBLE_TYPE=t.FULLY_VISIBLE_TYPE=t.RENDER_TYPE=void 0;t.RENDER_TYPE=1;t.FULLY_VISIBLE_TYPE=2;t.PARTIALLY_VISIBLE_TYPE=3},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedColumn:function(){var e=this.wot.wtViewport.columnsRenderCalculator.startColumn;return null===e?-1:e},getFirstVisibleColumn:function(){var e=this.wot.wtViewport.columnsVisibleCalculator.startColumn;return null===e?-1:e},getLastRenderedColumn:function(){var e=this.wot.wtViewport.columnsRenderCalculator.endColumn;return null===e?-1:e},getLastVisibleColumn:function(){var e=this.wot.wtViewport.columnsVisibleCalculator.endColumn;return null===e?-1:e},getRenderedColumnsCount:function(){return this.wot.wtViewport.columnsRenderCalculator.count},getVisibleColumnsCount:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}};(0,n(15).defineGetter)(r,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedColumn:function(){return 0===this.wot.getSetting("totalColumns")?-1:0},getFirstVisibleColumn:function(){return this.getFirstRenderedColumn()},getLastRenderedColumn:function(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn:function(){return this.getLastRenderedColumn()},getRenderedColumnsCount:function(){var e=this.wot.getSetting("totalColumns");return Math.min(this.wot.getSetting("fixedColumnsLeft"),e)},getVisibleColumnsCount:function(){return this.getRenderedColumnsCount()}};(0,n(15).defineGetter)(r,"MIXIN_NAME","stickyColumnsLeft",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.instanceToHTML=function(e){for(var t=e.hasColHeaders(),n=e.hasRowHeaders(),r=[t?-1:0,n?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData.apply(e,r),a=o.length,s=a>0?o[0].length:0,u=["<table>","</table>"],l=t?["<thead>","</thead>"]:[],c=["<tbody>","</tbody>"],f=n?1:0,h=t?1:0,d=0;d<a;d+=1){for(var p=t&&0===d,m=[],v=0;v<s;v+=1){var g=!p&&n&&0===v,y="";if(p)y="<th>".concat(e.getColHeader(v-f),"</th>");else if(g)y="<th>".concat(e.getRowHeader(d-h),"</th>");else{var E=o[d][v],T=e.getCellMeta(d-f,v-h),C=T.hidden,w=T.rowspan,R=T.colspan;if(!C){var b=[];if(w&&b.push('rowspan="'.concat(w,'"')),R&&b.push('colspan="'.concat(R,'"')),(0,i.isEmpty)(E))y="<td ".concat(b.join(" "),"></td>");else{var O=E.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");y="<td ".concat(b.join(" "),">").concat(O,"</td>")}}}m.push(y)}var S=["<tr>"].concat(m,["</tr>"]).join("");p?l.splice(1,0,S):c.splice(-1,0,S)}return u.splice(1,0,l.join(""),c.join("")),u.join("")},t._dataToHTML=function(e){for(var t=e.length,n=["<table>"],r=0;r<t;r+=1){var o=e[r],a=o.length,s=[];0===r&&n.push("<tbody>");for(var u=0;u<a;u+=1){var l=o[u],c=(0,i.isEmpty)(l)?"":l.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");s.push("<td>".concat(c,"</td>"))}n.push.apply(n,["<tr>"].concat(s,["</tr>"])),r+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")},t.htmlToGridSettings=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n={},r=t.createDocumentFragment(),i=t.createElement("div");r.appendChild(i);var l=e;if("string"==typeof l){var c=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(function(e){var t=e.match(/<td\b[^>]*?>/g)[0],n=e.substring(t.length,e.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,"");return"".concat(t).concat(n).concat("</td>")}));i.insertAdjacentHTML("afterbegin","".concat(c)),l=i.querySelector("table")}if(!l||!u(l))return;var f=i.querySelector('meta[name$="enerator"]'),h=null!==l.querySelector("tbody th"),d=l.querySelector("tr"),p=d?Array.from(d.cells).reduce((function(e,t){return e+t.colSpan}),0)-(h?1:0):0,m=l.tFoot&&Array.from(l.tFoot.rows)||[],v=[],g=!1,y=0,E=0;if(l.tHead){var T=Array.from(l.tHead.rows).filter((function(e){var t=null!==e.querySelector("td");return t&&v.push(e),!t}));y=T.length,g=y>0,y>1?n.nestedHeaders=Array.from(T).reduce((function(e,t){var n=Array.from(t.cells).reduce((function(e,t,n){if(h&&0===n)return e;var r=t.colSpan,o=t.innerHTML,i=r>1?{label:o,colspan:r}:o;return e.push(i),e}),[]);return e.push(n),e}),[]):g&&(n.colHeaders=Array.from(T[0].children).reduce((function(e,t,n){return h&&0===n||e.push(t.innerHTML),e}),[]))}v.length&&(n.fixedRowsTop=v.length);m.length&&(n.fixedRowsBottom=m.length);var C=[].concat(v,(0,o.default)(Array.from(l.tBodies).reduce((function(e,t){return e.push.apply(e,(0,o.default)(Array.from(t.rows))),e}),[])),(0,o.default)(m));E=C.length;for(var w=new Array(E),R=0;R<E;R++)w[R]=new Array(p);for(var b=[],O=[],S=0;S<E;S++)for(var N=C[S],A=Array.from(N.cells),M=A.length,k=0;k<M;k++){var _=A[k],I=_.nodeName,x=_.innerHTML,P=_.rowSpan,L=_.colSpan,D=w[S].findIndex((function(e){return void 0===e}));if("TD"===I){if(P>1||L>1){for(var F=S;F<S+P;F++)if(F<E)for(var U=D;U<D+L;U++)w[F][U]=null;var j=_.getAttribute("style"),H=j&&j.includes("mso-ignore:colspan");H||b.push({col:D,row:S,rowspan:P,colspan:L})}var V="";V=f&&/excel/gi.test(f.content)?x.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):x.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),w[S][D]=V.replace(s,(function(e){return a[e]}))}else O.push(x)}b.length&&(n.mergeCells=b);O.length&&(n.rowHeaders=O);w.length&&(n.data=w);return n};var o=r(n(40));n(93),n(34),n(60),n(74),n(41),n(51),n(61),n(1),n(20),n(55),n(548),n(729),n(94),n(23),n(2),n(38),n(549),n(37),n(47);var i=n(32),a={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},s=new RegExp(Object.keys(a).map((function(e){return"(".concat(e,")")})).join("|"),"gi");function u(e){return"TABLE"===(e&&e.nodeName||"")}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getPluginsNames=function(){return[].concat((0,i.default)(f.getItems()),(0,i.default)(h.getItems()))},t.getPlugin=p,t.hasPlugin=function(e){return!!p(e)},t.registerPlugin=function(e,t,n){var r=function(e,t,n){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,n=t.PLUGIN_PRIORITY);return[e,t,n]}(e,t,n),i=(0,o.default)(r,3);e=i[0],t=i[1],n=i[2],void 0===p(e)&&function(e,t,n){var r=(0,a.toUpperCaseFirst)(e);if(d.hasItem(r))throw new Error(c(r));void 0===n?h.addItem(r):f.addItem(n,r);d.addItem(r,t)}(e,t,n)},n(20);var o=r(n(31)),i=r(n(40)),a=n(90),s=n(731),u=n(550),l=n(732),c=function(e){return'There is already registered "'.concat(e,'" plugin.')},f=(0,s.createPriorityMap)({errorPriorityExists:function(e){return'There is already registered plugin on priority "'.concat(e,'".')},errorPriorityNaN:function(e){return'The priority "'.concat(e,'" is not a number.')}}),h=(0,l.createUniqueSet)({errorItemExists:c}),d=(0,u.createUniqueMap)({errorIdExists:c});function p(e){var t=(0,a.toUpperCaseFirst)(e);return d.getItem(t)}},function(e,t,n){"use strict";t.__esModule=!0,t.registerAsRootInstance=function(e){r.set(e,!0)},t.hasValidParameter=function(e){return e===o},t.isRootInstance=function(e){return r.has(e)},t.rootInstanceSymbol=t.holder=void 0,n(3),n(1),n(2),n(9),n(4),n(8),n(10);var r=new WeakMap;t.holder=r;var o=Symbol("rootInstance");t.rootInstanceSymbol=o},function(e,t,n){"use strict";n(7);var r=n(0);t.__esModule=!0,t.PhysicalIndexToValueMap=void 0;var o=r(n(5)),i=r(n(6)),a=r(n(28)),s=r(n(13)),u=r(n(14)),l=r(n(12)),c=n(204),f=n(278);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,l.default)(e);if(t){var o=(0,l.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,u.default)(this,n)}}var d=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,o.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"insert",value:function(e,t){this.indexedValues=(0,f.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),(0,a.default)((0,l.default)(n.prototype),"insert",this).call(this,e,t)}},{key:"remove",value:function(e){this.indexedValues=(0,f.getListWithRemovedItems)(this.indexedValues,e),(0,a.default)((0,l.default)(n.prototype),"remove",this).call(this,e)}}]),n}(c.IndexMap);t.PhysicalIndexToValueMap=d},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getListWithInsertedItems=function(e,t,n,r){var a=n.length?n[0]:void 0;return[].concat((0,o.default)(e.slice(0,a)),(0,o.default)(n.map((function(e,t){return(0,i.isFunction)(r)?r(e,t):r}))),(0,o.default)(void 0===a?[]:e.slice(a)))},t.getListWithRemovedItems=function(e,t){return(0,a.arrayFilter)(e,(function(e,n){return!1===t.includes(n)}))},n(20),n(19),n(41),n(37),n(47);var o=r(n(40)),i=n(75),a=n(16)},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return l},t.MapCollection=void 0,n(3),n(33),n(1),n(2),n(4),n(27),n(23);var o=r(n(5)),i=r(n(6)),a=n(32),s=n(15),u=r(n(91)),l=0,c=function(){function e(){(0,o.default)(this,e),this.collection=new Map}return(0,i.default)(e,[{key:"register",value:function(e,t){var n=this;!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(function(){return n.runLocalHooks("change",t)})),l+=1)}},{key:"unregister",value:function(e){var t=this.collection.get(e);(0,a.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}},{key:"unregisterAll",value:function(){var e=this;this.collection.forEach((function(t,n){return e.unregister(n)})),this.collection.clear()}},{key:"get",value:function(e){return(0,a.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}},{key:"getLength",value:function(){return this.collection.size}},{key:"removeFromEvery",value:function(e){this.collection.forEach((function(t){t.remove(e)}))}},{key:"insertToEvery",value:function(e,t){this.collection.forEach((function(n){n.insert(e,t)}))}},{key:"initEvery",value:function(e){this.collection.forEach((function(t){t.init(e)}))}}]),e}();t.MapCollection=c,(0,s.mixin)(c,u.default)},function(e,t,n){"use strict";n(27),n(51);var r=n(0);t.__esModule=!0;var o={Highlight:!0,Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},i=r(n(558));t.Highlight=i.default;var a=r(n(759));t.Selection=a.default;var s=n(551);t.handleMouseEvent=s.handleMouseEvent;var u=n(207);t.detectSelectionType=u.detectSelectionType,t.normalizeSelectionFactory=u.normalizeSelectionFactory;var l=n(108);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0,n(27),n(111);var o=r(n(31)),i=r(n(5)),a=r(n(6)),s=n(21),u=n(16),l=function(){function e(t){(0,i.default)(this,e),this.hot=t,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}return(0,a.default)(e,[{key:"addRow",value:function(e,t){if(this.columns.length)throw new 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){var t=this.hot.getColHeader(0);if(null!=t){var n={row:-1};this.rows.push(n),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.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}}},{key:"addColumn",value:function(e,t){if(this.rows.length)throw new 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,u.arrayEach)(this.rows,(function(t){e(t.row,(0,s.outerHeight)(t.table)-1)}))}},{key:"getWidths",value:function(e){this.injected||this.injectTable(),(0,u.arrayEach)(this.columns,(function(t){e(t.col,(0,s.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=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1)),this.samples.forEach((function(n){(0,u.arrayEach)(n.strings,(function(n){t.appendChild(e.createColElement(n.col))}))})),t}},{key:"createRow",value:function(e){var t=this,n=this.hot.rootDocument,r=n.createDocumentFragment(),o=n.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,o),r.appendChild(o)),this.samples.forEach((function(o){(0,u.arrayEach)(o.strings,(function(o){var i=o.col,a=t.hot.getCellMeta(e,i);a.col=i,a.row=e;var s=t.hot.getCellRenderer(a),u=n.createElement("td");u.setAttribute("ghost-table",1),s(t.hot,u,e,i,t.hot.colToProp(i),o.value,a),r.appendChild(u)}))})),r}},{key:"appendColumnHeadersRow",value:function(){var e=this,t=this.hot.rootDocument,n=t.createDocumentFragment(),r=[];if(this.hot.hasRowHeaders()){var i=t.createElement("th");r.push([-1,i]),n.appendChild(i)}this.samples.forEach((function(e){(0,u.arrayEach)(e.strings,(function(e){var o=e.col,i=t.createElement("th");r.push([o,i]),n.appendChild(i)}))})),this.table.tHead.appendChild(n),(0,u.arrayEach)(r,(function(t){var n=(0,o.default)(t,2),r=n[0],i=n[1];e.hot.view.appendColHeader(r,i)}))}},{key:"createCol",value:function(e){var t=this,n=this.hot.rootDocument,r=n.createDocumentFragment();return this.samples.forEach((function(o){(0,u.arrayEach)(o.strings,(function(o){var i=o.row,a=t.hot.getCellMeta(i,e);a.col=e,a.row=i;var s=t.hot.getCellRenderer(a),u=n.createElement("td"),l=n.createElement("tr");u.setAttribute("ghost-table",1),s(t.hot,u,i,e,t.hot.colToProp(e),o.value,a),l.appendChild(u),r.appendChild(l)}))})),r}},{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=this.hot.rootDocument.createElement("col");return t.style.width="".concat(this.hot.view.wt.wtTable.getStretchedColumnWidth(e),"px"),t}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("table"),o=t.createElement("thead"),i=t.createElement("tbody"),a=t.createElement("colgroup"),u=t.createElement("tr"),l=t.createElement("th");return this.isVertical()&&r.appendChild(a),this.isHorizontal()&&(u.appendChild(l),o.appendChild(u),r.style.tableLayout="auto",r.style.width="auto"),r.appendChild(o),this.isVertical()&&i.appendChild(u),r.appendChild(i),(0,s.addClass)(r,e),n.appendChild(r),{fragment:n,table:r,tHead:o,tBody:i,colGroup:a,tr:u,th:l}}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("div"),o="htGhostTable htAutoSize ".concat(e.trim());return(0,s.addClass)(r,o),n.appendChild(r),{fragment:n,container:r}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}]),e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.AutocompleteEditor=t.EDITOR_TYPE=void 0;var r=n(777);t.EDITOR_TYPE=r.EDITOR_TYPE,t.AutocompleteEditor=r.AutocompleteEditor},function(e,t,n){"use strict";t.__esModule=!0,t.HandsontableEditor=t.EDITOR_TYPE=void 0;var r=n(778);t.EDITOR_TYPE=r.EDITOR_TYPE,t.HandsontableEditor=r.HandsontableEditor},function(e,t,n){"use strict";t.__esModule=!0,t.DateEditor=t.EDITOR_TYPE=void 0;var r=n(780);t.EDITOR_TYPE=r.EDITOR_TYPE,t.DateEditor=r.DateEditor},function(e,t,n){"use strict";t.__esModule=!0,t.autocompleteValidator=t.VALIDATOR_TYPE=void 0;var r=n(797);t.VALIDATOR_TYPE=r.VALIDATOR_TYPE,t.autocompleteValidator=r.autocompleteValidator},function(e,t,n){"use strict";t.__esModule=!0,t.areValidSortStates=function(e){if(e.some((function(e){return!1===function(e){if(!1===(0,r.isObject)(e))return!1;var t=e.column,n=e.sortOrder;return Number.isInteger(t)&&[i,a].includes(n)}(e)})))return!1;var t=e.map((function(e){return e.column}));return new Set(t).size===t.length},t.getNextSortOrder=function(e){if(e===a)return;if(e===i)return a;return i},t.getHeaderSpanElement=function(e){return e.querySelector(".".concat("colHeader"))},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;var n=t.parentNode.parentNode.childNodes;if(Array.from(n).indexOf(t.parentNode)-n.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,n){return-1===e&&t>=0&&!1===(0,o.isRightClick)(n)},t.HEADER_SPAN_CLASS=t.DESC_SORT_STATE=t.ASC_SORT_STATE=void 0,n(66),n(48),n(37),n(41),n(3),n(1),n(57),n(2),n(4),n(30),n(23);var r=n(15),o=n(65),i="asc";t.ASC_SORT_STATE=i;var a="desc";t.DESC_SORT_STATE=a;t.HEADER_SPAN_CLASS="colHeader"},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{name:"---------"}},t.KEY=void 0;t.KEY="---------"},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0,n(25),n(64),n(51),n(93),n(34),n(60),n(1),n(61),n(20);var o=r(n(5)),i=r(n(6)),a=r(n(862)),s=n(115),u=n(97),l=r(n(394)),c=r(n(49)),f=n(16),h=n(104),d=n(21),p=n(65),m=n(75),v=n(32),g=n(15),y=n(88),E=r(n(91)),T=function(){function e(t,n){(0,o.default)(this,e),this.hot=t,this.options=n||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.eventManager=new c.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(0,i.default)(e,[{key:"registerEvents",value:function(){for(var e=this,t=this.hot.rootWindow;t;)this.eventManager.addEventListener(t.document,"mousedown",(function(t){return e.onDocumentMouseDown(t)})),this.eventManager.addEventListener(t.document,"contextmenu",(function(t){return e.onDocumentContextMenu(t)})),t=(0,d.getParentWindow)(t)}},{key:"setMenuItems",value:function(e){this.menuItems=e}},{key:"getSelectedItem",value:function(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}},{key:"hasSelectedItem",value:function(){return Array.isArray(this.hotMenu.getSelectedLast())}},{key:"setOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.offset[e]=t}},{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,m.debounce)((function(t){return e.openSubMenu(t)}),300),n=this.options.minWidth||215,r=!1,o=(0,f.arrayFilter)(this.menuItems,(function(t){return t.key===s.NO_ITEMS&&(r=!0),(0,u.isItemHidden)(t,e.hot)}));if(o.length<1&&!r)o.push((0,s.predefinedItems)()[s.NO_ITEMS]);else if(0===o.length)return;o=(0,u.filterSeparators)(o,s.SEPARATOR);var i=!1,a={data:o,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:function(e){return(0,v.isDefined)(e)&&e<n?n:e},autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,maxCols:1,columns:[{data:"name",renderer:function(t,n,r,o,i,a){return e.menuItemRenderer(t,n,r,o,i,a)}}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",beforeKeyDown:function(t){return e.onBeforeKeyDown(t)},afterOnCellMouseOver:function(n,r){e.isAllSubMenusClosed()?t(r.row):e.openSubMenu(r.row)},rowHeights:function(e){return o[e].name===s.SEPARATOR?1:23},afterOnCellContextMenu:function(t){t.preventDefault(),(0,h.isWindowsOS)()&&i&&e.hasSelectedItem()&&e.close(!0)},beforeOnCellMouseUp:function(t){e.hasSelectedItem()&&(i=!e.isCommandPassive(e.getSelectedItem()),e.executeCommand(t))},afterOnCellMouseUp:function(t){(0,h.isWindowsOS)()&&(0,p.isRightClick)(t)||!i||!e.hasSelectedItem()||((0,h.isMobileBrowser)()||(0,h.isIpadOS)()?setTimeout((function(){return e.close(!0)}),325):e.close(!0))},afterUnlisten:function(){!e.hasSelectedItem()&&e.isOpened()&&e.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new l.default(this.container,a),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,u.hasSubMenu)(n))return!1;var r=this.hotMenu.getSourceDataAtRow(t),o=new e(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return o.setMenuItems(r.submenu.items),o.open(),o.setPosition(n.getBoundingClientRect()),this.hotSubMenus[r.key]=o,o}},{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,f.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(){var e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}},{key:"isOpened",value:function(){return null!==this.hotMenu}},{key:"executeCommand",value:function(e){if(this.isOpened()&&this.hasSelectedItem()){var t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),!this.isCommandPassive(t)){var n=this.hot.getSelectedRange(),r=n?(0,u.normalizeSelection)(n):[];this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e)}}}},{key:"isCommandPassive",value:function(e){var t=e.isCommand,n=e.name,r=e.disabled,o=e.submenu,i=!0===r||"function"==typeof r&&!0===r.call(this.hot);return!1===t||n===s.SEPARATOR||!0===i||o}},{key:"setPosition",value:function(e){var t=new a.default(e,this.container.ownerDocument.defaultView);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="".concat(t,"px")}},{key:"setPositionBelowCursor",value:function(e){var t=this.offset.below+e.top+1;this.isSubMenu()&&(t=e.top-1),this.container.style.top="".concat(t,"px")}},{key:"setPositionOnRightOfCursor",value:function(e){var t;t=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left="".concat(t,"px")}},{key:"setPositionOnLeftOfCursor",value:function(e){var t=(0,d.getScrollbarWidth)(this.hot.rootDocument),n=this.offset.left+e.left-this.container.offsetWidth+t+4;this.container.style.left="".concat(n,"px")}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);(0,u.isSeparator)(e)||(0,u.isDisabled)(e)||(0,u.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,u.isSeparator)(t)||(0,u.isDisabled)(t)||(0,u.isSelectionDisabled)(t)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)}},{key:"selectNextCell",value:function(e,t){var n=e+1,r=n<this.hotMenu.countRows()?this.hotMenu.getCell(n,t):null;r&&((0,u.isSeparator)(r)||(0,u.isDisabled)(r)||(0,u.isSelectionDisabled)(r)?this.selectNextCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"selectPrevCell",value:function(e,t){var n=e-1,r=n>=0?this.hotMenu.getCell(n,t):null;r&&((0,u.isSeparator)(r)||(0,u.isDisabled)(r)||(0,u.isSelectionDisabled)(r)?this.selectPrevCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"menuItemRenderer",value:function(e,t,n,r,o,i){var a,u=this,l=e.getSourceDataAtRow(n),c=this.hot.rootDocument.createElement("div"),f=function(e){return e.disableSelection},h=i;"function"==typeof h&&(h=h.call(this.hot)),(0,d.empty)(t),(0,d.addClass)(c,"htItemWrapper"),t.appendChild(c),a=l,new RegExp(s.SEPARATOR,"i").test(a.name)?(0,d.addClass)(t,"htSeparator"):"function"==typeof l.renderer?((0,d.addClass)(t,"htCustomMenuRenderer"),t.appendChild(l.renderer(e,c,n,r,o,h))):(0,d.fastInnerHTML)(c,h),!function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(u.hot)}(l)?f(l)?((0,d.addClass)(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()}))):!function(e){return(0,g.hasOwnProperty)(e,"submenu")}(l)?((0,d.removeClass)(t,["htSubmenu","htDisabled"]),f(l)?this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(t,"mouseenter",(function(){return e.selectCell(n,r,void 0,void 0,!1,!1)}))):((0,d.addClass)(t,"htSubmenu"),f(l)?this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(t,"mouseenter",(function(){return e.selectCell(n,r,void 0,void 0,!1,!1)}))):((0,d.addClass)(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})))}},{key:"createContainer",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.options.container.ownerDocument,r=t;return r&&((0,m.isFunction)(r)&&(r=null===(r=r.call(this.hot))||(0,v.isUndefined)(r)?"":r.toString()),r=r.replace(/[^A-z0-9]/g,"_"),r="".concat(this.options.className,"Sub_").concat(r),e=n.querySelector(".".concat(this.options.className,".").concat(r))),e||(e=n.createElement("div"),(0,d.addClass)(e,"htMenu ".concat(this.options.className)),r&&(0,d.addClass)(e,r),this.options.container.appendChild(e)),e}},{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){if((0,d.isInput)(e.target)&&this.container.contains(e.target))(0,p.stopImmediatePropagation)(e);else{var t=this.hotMenu.getSelectedLast(),n=!1;switch(this.keyEvent=!0,e.keyCode){case y.KEY_CODES.ESCAPE:this.close(),n=!0;break;case y.KEY_CODES.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?n=!0:(this.executeCommand(e),this.close(!0)));break;case y.KEY_CODES.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),n=!0;break;case y.KEY_CODES.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),n=!0;break;case y.KEY_CODES.ARROW_RIGHT:if(t){var r=this.openSubMenu(t[0]);r&&r.selectFirstCell()}n=!0;break;case y.KEY_CODES.ARROW_LEFT:t&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),n=!0)}n&&(e.preventDefault(),(0,p.stopImmediatePropagation)(e)),this.keyEvent=!1}}},{key:"onAfterInit",value:function(){var e=this.hotMenu.view.wt.wtTable,t=this.hotMenu.getSettings().data,n=e.hider.style,r=e.holder.style,o=parseInt(n.width,10),i=(0,f.arrayReduce)(t,(function(e,t){return e+(t.name===s.SEPARATOR?1:26)}),0);r.width="".concat(o+3,"px"),r.height="".concat(i+3,"px"),n.height=r.height}},{key:"onAfterSelection",value:function(e,t,n,r,o){!1===this.keyEvent&&(o.value=!0)}},{key:"onDocumentMouseDown",value:function(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,d.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,d.isChildOf)(e.target,".htMenu")||!(0,d.isChildOf)(e.target,this.container.ownerDocument)&&!(0,d.isChildOf)(e.target,this.hot.rootDocument)||this.close(!0))}},{key:"onDocumentContextMenu",value:function(e){this.isOpened()&&(0,d.hasClass)(e.target,"htCore")&&(0,d.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}]),e}();(0,g.mixin)(T,E.default);var C=T;t.default=C},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o,i,a,s,u=r(n(80)),l=r(n(5)),c=r(n(6)),f=n(58),h=n(81),d=function(){function e(t,n,r,o){(0,l.default)(this,e),this.row=t,this.col=n,this.rowspan=r,this.colspan=o,this.removed=!1}return(0,c.default)(e,[{key:"normalize",value:function(e){var t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?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&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}},{key:"includesHorizontally",value:function(e){return this.col<=e&&this.col+this.colspan-1>=e}},{key:"includesVertically",value:function(e){return this.row<=e&&this.row+this.rowspan-1>=e}},{key:"shift",value:function(e,t){var n=e[0]||e[1],r=t+Math.abs(e[0]||e[1])-1,o=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",a=Math.min(t,r),s=Math.max(t,r),u=this[i],l=this[i]+this[o]-1;if(u>=t&&(this[i]+=n),n>0)t<=l&&t>u&&(this[o]+=n);else if(n<0){if(a<=u&&s>=l)return this.removed=!0,!1;if(u>=a&&u<=s){var c=s-u+1,f=Math.abs(n)-c;this[i]-=f+n,this[o]-=c}else if(u<=a&&l>=s)this[o]+=n;else if(u<=a&&l>=a&&l<s){var h=l-a+1;this[o]-=h}}return!0}},{key:"isFarther",value:function(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.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 f.CellRange(new f.CellCoords(this.row,this.col),new f.CellCoords(this.row,this.col),new f.CellCoords(this.getLastRow(),this.getLastColumn()))}}],[{key:"NEGATIVE_VALUES_WARNING",value:function(e){return(0,h.toSingleLine)(o||(o=(0,u.default)(["The merged cell declared with {row: ",", col: ",", \n rowspan: ",", colspan: ","} contains negative values, which is \n not supported. It will not be added to the collection."],["The merged cell declared with {row: ",", col: ",",\\x20\n rowspan: ",", colspan: ","} contains negative values, which is\\x20\n not supported. It will not be added to the collection."])),e.row,e.col,e.rowspan,e.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(e){return(0,h.toSingleLine)(i||(i=(0,u.default)(["The merged cell declared at [",", ","] is positioned \n (or positioned partially) outside of the table range. It was not added to the table, please fix your setup."],["The merged cell declared at [",", ","] is positioned\\x20\n (or positioned partially) outside of the table range. It was not added to the table, please fix your setup."])),e.row,e.col)}},{key:"IS_SINGLE_CELL",value:function(e){return(0,h.toSingleLine)(a||(a=(0,u.default)(["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"\\x20\n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.'])),e.row,e.col)}},{key:"ZERO_SPAN_WARNING",value:function(e){return(0,h.toSingleLine)(s||(s=(0,u.default)(["The merged cell declared at [",", ",'] has "rowspan" \n or "colspan" declared as "0", which is not supported. It cannot be added to the collection.'],["The merged cell declared at [",", ",'] has "rowspan"\\x20\n or "colspan" declared as "0", which is not supported. It cannot be added to the collection.'])),e.row,e.col)}},{key:"containsNegativeValues",value:function(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}},{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 e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}}]),e}();t.default=d},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e){var t=[],n=e;D[n]||(n="text");return(0,a.arrayEach)(D[n],(function(e){var n;n=e===s.SEPARATOR?{name:s.SEPARATOR}:(0,i.clone)((0,u.getConditionDescriptor)(e)),t.push(n)})),t},t.TYPES=t.TYPE_DATE=t.TYPE_TEXT=t.TYPE_NUMERIC=void 0;var o=r(n(52)),i=n(15),a=n(16),s=n(115),u=n(54),l=n(940);t.CONDITION_NONE=l.CONDITION_NAME;var c=n(588);t.CONDITION_EMPTY=c.CONDITION_NAME;var f=n(941);t.CONDITION_NOT_EMPTY=f.CONDITION_NAME;var h=n(589);t.CONDITION_EQUAL=h.CONDITION_NAME;var d=n(942);t.CONDITION_NOT_EQUAL=d.CONDITION_NAME;var p=n(943);t.CONDITION_GREATER_THAN=p.CONDITION_NAME;var m=n(944);t.CONDITION_GREATER_THAN_OR_EQUAL=m.CONDITION_NAME;var v=n(945);t.CONDITION_LESS_THAN=v.CONDITION_NAME;var g=n(946);t.CONDITION_LESS_THAN_OR_EQUAL=g.CONDITION_NAME;var y=n(590);t.CONDITION_BETWEEN=y.CONDITION_NAME;var E=n(947);t.CONDITION_NOT_BETWEEN=E.CONDITION_NAME;var T=n(948);t.CONDITION_BEGINS_WITH=T.CONDITION_NAME;var C=n(949);t.CONDITION_ENDS_WITH=C.CONDITION_NAME;var w=n(593);t.CONDITION_CONTAINS=w.CONDITION_NAME;var R=n(950);t.CONDITION_NOT_CONTAINS=R.CONDITION_NAME;var b=n(592);t.CONDITION_DATE_BEFORE=b.CONDITION_NAME;var O=n(591);t.CONDITION_DATE_AFTER=O.CONDITION_NAME;var S=n(951);t.CONDITION_TOMORROW=S.CONDITION_NAME;var N=n(952);t.CONDITION_TODAY=N.CONDITION_NAME;var A=n(953);t.CONDITION_YESTERDAY=A.CONDITION_NAME;var M=n(954);t.CONDITION_BY_VALUE=M.CONDITION_NAME;var k=n(955);t.CONDITION_TRUE=k.CONDITION_NAME;var _=n(956);t.CONDITION_FALSE=_.CONDITION_NAME;var I=n(291);t.OPERATION_AND=I.OPERATION_ID;var x=n(594);t.OPERATION_OR=x.OPERATION_ID;var P,L=n(595);t.OPERATION_OR_THEN_VARIABLE=L.OPERATION_ID;t.TYPE_NUMERIC="numeric";t.TYPE_TEXT="text";t.TYPE_DATE="date";var D=(P={},(0,o.default)(P,"numeric",[l.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,h.CONDITION_NAME,d.CONDITION_NAME,s.SEPARATOR,p.CONDITION_NAME,m.CONDITION_NAME,v.CONDITION_NAME,g.CONDITION_NAME,y.CONDITION_NAME,E.CONDITION_NAME]),(0,o.default)(P,"text",[l.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,h.CONDITION_NAME,d.CONDITION_NAME,s.SEPARATOR,T.CONDITION_NAME,C.CONDITION_NAME,s.SEPARATOR,w.CONDITION_NAME,R.CONDITION_NAME]),(0,o.default)(P,"date",[l.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,h.CONDITION_NAME,d.CONDITION_NAME,s.SEPARATOR,b.CONDITION_NAME,O.CONDITION_NAME,y.CONDITION_NAME,s.SEPARATOR,S.CONDITION_NAME,N.CONDITION_NAME,A.CONDITION_NAME]),P);t.TYPES=D},function(e,t,n){"use strict";n(3),n(1),n(2),n(9),n(4),n(17);var r=n(18);t.__esModule=!0,t.operationResult=u,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var u=i?Object.getOwnPropertyDescriptor(e,s):null;u&&(u.get||u.set)?Object.defineProperty(o,s,u):o[s]=e[s]}o.default=e,n&&n.set(e,o);return o}(n(26)),i=n(179);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}t.OPERATION_ID="conjunction";var s=o.FILTERS_LABELS_CONJUNCTION;function u(e,t){return e.every((function(e){return e.func(t)}))}t.SHORT_NAME_FOR_COMPONENT=s,(0,i.registerOperation)("conjunction",s,u)},function(e,t,n){"use strict";n(7);var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=r(n(6)),a=r(n(44)),s=r(n(28)),u=r(n(13)),l=r(n(14)),c=r(n(12));n(3),n(1),n(2),n(9),n(4);var f=n(21),h=n(15),d=r(n(180));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.default)(e);if(t){var o=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}var m=new WeakMap,v=function(e){(0,u.default)(n,e);var t=p(n);function n(e,r){var i;return(0,o.default)(this,n),i=t.call(this,e,(0,h.extend)(n.DEFAULTS,r)),m.set((0,a.default)(i),{}),i.registerHooks(),i}return(0,i.default)(n,[{key:"registerHooks",value:function(){var e=this;this.addLocalHook("click",(function(){return e.onClick()})),this.addLocalHook("keyup",(function(t){return e.onKeyup(t)}))}},{key:"build",value:function(){(0,s.default)((0,c.default)(n.prototype),"build",this).call(this);var e=m.get(this),t=this.hot.rootDocument.createElement("div");e.input=this._element.firstChild,(0,f.addClass)(this._element,"htUIInput"),(0,f.addClass)(t,"htUIInputIcon"),this._element.appendChild(t),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var e=m.get(this).input;e.type=this.options.type,e.placeholder=this.translateIfPossible(this.options.placeholder),e.value=this.translateIfPossible(this.options.value)}}},{key:"focus",value:function(){this.isBuilt()&&m.get(this).input.focus()}},{key:"onClick",value:function(){}},{key:"onKeyup",value:function(e){this.options.value=e.target.value}}],[{key:"DEFAULTS",get:function(){return(0,h.clone)({placeholder:"",type:"text",tagName:"input"})}}]),n}(d.default);t.default=v},function(e,t,n){"use strict";n(7);var r=n(0);t.__esModule=!0,t.Formulas=t.PLUGIN_PRIORITY=t.PLUGIN_KEY=void 0,n(20),n(27),n(3),n(1),n(57),n(2),n(4),n(41),n(37),n(47),n(120),n(70),n(9);var o=r(n(40)),i=r(n(18)),a=r(n(31)),s=r(n(5)),u=r(n(6)),l=r(n(44)),c=r(n(28)),f=r(n(13)),h=r(n(14)),d=r(n(12)),p=r(n(52)),m=r(n(107)),v=r(n(106)),g=n(45),y=n(970),E=r(n(105)),T=n(87),C=n(32),w=n(971),R=n(972),b=n(598),O=n(145),S=n(90),N=r(n(68));function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.default)(e);if(t){var o=(0,d.default)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,h.default)(this,n)}}t.PLUGIN_KEY="formulas";t.PLUGIN_PRIORITY=260,N.default.getSingleton().register("afterNamedExpressionAdded"),N.default.getSingleton().register("afterNamedExpressionRemoved"),N.default.getSingleton().register("afterSheetAdded"),N.default.getSingleton().register("afterSheetRemoved"),N.default.getSingleton().register("afterSheetRenamed"),N.default.getSingleton().register("afterFormulasValuesUpdate");var M=new WeakMap,k=new WeakMap,_=new WeakMap,I=function(e){(0,f.default)(n,e);var t=A(n);function n(){var e;(0,s.default)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),M.set((0,l.default)(e),{writable:!0,value:!1}),k.set((0,l.default)(e),{writable:!0,value:!1}),_.set((0,l.default)(e),{writable:!0,value:[["valuesUpdated",function(){var t;return(t=e).onEngineValuesUpdated.apply(t,arguments)}],["namedExpressionAdded",function(){var t;return(t=e).onEngineNamedExpressionsAdded.apply(t,arguments)}],["namedExpressionRemoved",function(){var t;return(t=e).onEngineNamedExpressionsRemoved.apply(t,arguments)}],["sheetAdded",function(){var t;return(t=e).onEngineSheetAdded.apply(t,arguments)}],["sheetRenamed",function(){var t;return(t=e).onEngineSheetRenamed.apply(t,arguments)}],["sheetRemoved",function(){var t;return(t=e).onEngineSheetRemoved.apply(t,arguments)}]]}),(0,p.default)((0,l.default)(e),"staticRegister",(0,E.default)("formulas")),(0,p.default)((0,l.default)(e),"engine",null),(0,p.default)((0,l.default)(e),"sheetName",null),e}return(0,u.default)(n,[{key:"sheetId",get:function(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}},{key:"isEnabled",value:function(){return!!this.hot.getSettings().formulas}},{key:"enablePlugin",value:function(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,w.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){null===this.sheetName||this.engine.doesSheetExist(this.sheetName)||(this.sheetName=this.addSheet(this.sheetName,this.hot.getSourceDataArray())),this.addHook("beforeLoadData",(function(){return t.onBeforeLoadData.apply(t,arguments)})),this.addHook("afterLoadData",(function(){return t.onAfterLoadData.apply(t,arguments)})),this.addHook("modifyData",(function(){return t.onModifyData.apply(t,arguments)})),this.addHook("modifySourceData",(function(){return t.onModifySourceData.apply(t,arguments)})),this.addHook("beforeValidate",(function(){return t.onBeforeValidate.apply(t,arguments)})),this.addHook("afterSetSourceDataAtCell",(function(){return t.onAfterSetSourceDataAtCell.apply(t,arguments)})),this.addHook("afterSetDataAtCell",(function(){return t.onAfterSetDataAtCell.apply(t,arguments)})),this.addHook("afterSetDataAtRowProp",(function(){return t.onAfterSetDataAtCell.apply(t,arguments)})),this.addHook("beforeCreateRow",(function(){return t.onBeforeCreateRow.apply(t,arguments)})),this.addHook("beforeCreateCol",(function(){return t.onBeforeCreateCol.apply(t,arguments)})),this.addHook("afterCreateRow",(function(){return t.onAfterCreateRow.apply(t,arguments)})),this.addHook("afterCreateCol",(function(){return t.onAfterCreateCol.apply(t,arguments)})),this.addHook("beforeRemoveRow",(function(){return t.onBeforeRemoveRow.apply(t,arguments)})),this.addHook("beforeRemoveCol",(function(){return t.onBeforeRemoveCol.apply(t,arguments)})),this.addHook("afterRemoveRow",(function(){return t.onAfterRemoveRow.apply(t,arguments)})),this.addHook("afterRemoveCol",(function(){return t.onAfterRemoveCol.apply(t,arguments)}));var r=(0,y.createAutofillHooks)(this);this.addHook("beforeAutofill",r.beforeAutofill),this.addHook("afterAutofill",r.afterAutofill),(0,v.default)(this,_).forEach((function(e){var n=(0,a.default)(e,2),r=n[0],o=n[1];return t.engine.on(r,o)})),(0,c.default)((0,d.default)(n.prototype),"enablePlugin",this).call(this)}else(0,T.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}},{key:"disablePlugin",value:function(){var e=this;(0,v.default)(this,_).forEach((function(t){var n=(0,a.default)(t,2),r=n[0],o=n[1];return e.engine.off(r,o)})),(0,w.unregisterEngine)(this.engine,this.hot),(0,c.default)((0,d.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(e){this.engine.updateConfig((0,b.getEngineSettingsWithOverrides)(this.hot.getSettings()));var t=this.hot.getSettings().formulas;if((0,C.isDefined)(t)&&(0,C.isDefined)(t.sheetName)&&t.sheetName!==this.sheetName&&this.switchSheet(t.sheetName),!e.data&&null===this.sheetName){var r=this.hot.getSettings().formulas.sheetName;r&&this.engine.doesSheetExist(r)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=r?r:void 0,this.hot.getSourceDataArray())}(0,c.default)((0,d.default)(n.prototype),"updatePlugin",this).call(this,e)}},{key:"destroy",value:function(){var e=this;(0,v.default)(this,_).forEach((function(t){var n,r=(0,a.default)(t,2),o=r[0],i=r[1];return null===(n=e.engine)||void 0===n?void 0:n.off(o,i)})),(0,m.default)(this,_,null),(0,w.unregisterEngine)(this.engine,this.hot),(0,c.default)((0,d.default)(n.prototype),"destroy",this).call(this)}},{key:"getPhysicalIndexPosition",value:function(e,t,n,r,o){return!o&&e>=n?r+(e-n):t}},{key:"toPhysicalRowPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPhysicalIndexPosition(e,this.hot.toPhysicalRow(e),this.hot.countRows(),this.hot.countSourceRows(),t)}},{key:"toPhysicalColumnPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPhysicalIndexPosition(e,this.hot.toPhysicalColumn(e),this.hot.countCols(),this.hot.countSourceCols(),t)}},{key:"addSheet",value:function(e,t){if((0,C.isDefined)(t)&&!(0,O.isArrayOfArrays)(t))return(0,T.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,T.warn)("Sheet with the provided name already exists."),!1;try{var n=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(n,t),n}catch(e){return(0,T.warn)(e.message),!1}}},{key:"switchSheet",value:function(e){if(this.engine.doesSheetExist(e)){this.sheetName=e;var t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,"".concat((0,S.toUpperCaseFirst)("formulas"),".switchSheet"))}else(0,T.error)("The sheet named `".concat(e,"` does not exist, switch aborted."))}},{key:"getCellType",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.getCellType({sheet:n,row:this.hot.toPhysicalRow(e),col:this.hot.toPhysicalColumn(t)})}},{key:"isFormulaCellType",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId,r=this.getCellType(e,t,n);return"FORMULA"===r||"MATRIX"===r}},{key:"renderDependentSheets",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Set;e.forEach((function(e){var t,n=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==n&&(r.has(n)||r.add(n))})),(0,w.getRegisteredHotInstances)(this.engine).forEach((function(e,o){var i;(n||o!==t.sheetId)&&r.has(o)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())}))}},{key:"validateDependentCells",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function(e){var t,n=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{},r=n.row,o=n.col,i=n.sheet;return(0,C.isDefined)(i)?"".concat(i,":").concat(r,"x").concat(o):""},o=new Set(n.map((function(e){return r(e)})));e.forEach((function(e){var n,i,a=null!==(n=e.address)&&void 0!==n?n:{},s=a.row,u=a.col,l=(0,C.isDefined)(s)?t.hot.toVisualRow(s):null,c=(0,C.isDefined)(u)?t.hot.toVisualColumn(u):null;if(null!==l&&null!==c){var f=null==e||null===(i=e.address)||void 0===i?void 0:i.sheet,h=r(e);if(void 0!==f&&!o.has(h)){var d=(0,w.getRegisteredHotInstances)(t.engine).get(f);d.validateCell(d.getDataAtCell(l,c),d.getCellMeta(l,c),(function(){}))}}}))}},{key:"syncChangeWithEngine",value:function(e,t,n){var r={row:this.toPhysicalRowPosition(e),col:this.toPhysicalColumnPosition(t),sheet:this.sheetId};if(this.engine.isItPossibleToSetCellContents(r))return this.engine.setCellContents(r,n);(0,T.warn)("Not possible to set cell data at ".concat(JSON.stringify(r)))}},{key:"onBeforeValidate",value:function(e,t,n){var r=this.hot.propToCol(n);if(this.isFormulaCellType(t,r)){var o={row:this.hot.toPhysicalRow(t),col:this.hot.toPhysicalColumn(r),sheet:this.sheetId},a=this.engine.getCellValue(o);return"object"===(0,i.default)(a)&&null!==a?a.value:a}return e}},{key:"onBeforeLoadData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";n.includes((0,S.toUpperCaseFirst)("formulas"))||(0,m.default)(this,k,(0,C.isUndefined)(this.hot.getSettings().data))}},{key:"onAfterLoadData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!n.includes((0,S.toUpperCaseFirst)("formulas")))if(this.sheetName=(0,w.setupSheet)(this.engine,this.hot.getSettings().formulas.sheetName),(0,v.default)(this,k))this.switchSheet(this.sheetName);else{var r=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetName,r)){(0,m.default)(this,M,!0);var o=this.engine.setSheetContent(this.sheetName,this.hot.getSourceDataArray());this.renderDependentSheets(o),(0,m.default)(this,M,!1)}}}},{key:"onModifyData",value:function(e,t,n,r){if("get"===r&&!(0,v.default)(this,M)&&null!==this.sheetName&&this.engine.doesSheetExist(this.sheetName))if(this.isFormulaCellType(this.hot.toVisualRow(e),t)){var o={row:e,col:this.toPhysicalColumnPosition(t),sheet:this.sheetId},a=this.engine.getCellValue(o),s="object"===(0,i.default)(a)&&null!==a?a.value:a;n.value=s}else(0,R.isEscapedFormulaExpression)(n.value)&&(n.value=(0,R.unescapeFormulaExpression)(n.value))}},{key:"onModifySourceData",value:function(e,t,n,r){if("get"===r&&!(0,v.default)(this,M)&&null!==this.sheetName&&this.engine.doesSheetExist(this.sheetName)){var o=this.hot.propToCol(t);if(this.isFormulaCellType(this.hot.toVisualRow(e),o)){var i=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0!==i.width||0!==i.height){var a={row:e,col:this.toPhysicalColumnPosition(o),sheet:this.sheetId};n.value=this.engine.getCellSerialized(a)}}}}},{key:"onAfterSetDataAtCell",value:function(e){var t=this,n=[],r=[],i=[];e.forEach((function(e){var s=(0,a.default)(e,4),u=s[0],l=s[1],c=s[3],f=t.hot.propToCol(l),h=t.hot.toPhysicalRow(u),d=t.hot.toPhysicalColumn(f),p={row:h,col:d,sheet:t.sheetId};null!==h&&null!==d?n.push.apply(n,(0,o.default)(t.syncChangeWithEngine(u,f,c))):r.push([u,f,c]),i.push({address:p})})),r.length&&this.hot.addHookOnce("afterChange",(function(){var e=[];r.forEach((function(n){var r=(0,a.default)(n,3),i=r[0],s=r[1],u=r[2];e.push.apply(e,(0,o.default)(t.syncChangeWithEngine(i,s,u)))})),t.renderDependentSheets(e,!0)})),this.renderDependentSheets(n),this.validateDependentCells(n,i)}},{key:"onAfterSetSourceDataAtCell",value:function(e){var t=this,n=[],r=[];e.forEach((function(e){var i=(0,a.default)(e,4),s=i[0],u=i[1],l=i[3],c={row:s,col:t.toPhysicalColumnPosition(u),sheet:t.sheetId};t.engine.isItPossibleToSetCellContents(c)?(r.push({address:c}),n.push.apply(n,(0,o.default)(t.engine.setCellContents(c,l)))):(0,T.warn)("Not possible to set source cell data at ".concat(JSON.stringify(c)))})),this.renderDependentSheets(n),this.validateDependentCells(n,r)}},{key:"onBeforeCreateRow",value:function(e,t){if(!this.engine.isItPossibleToAddRows(this.sheetId,[this.toPhysicalRowPosition(e),t]))return!1}},{key:"onBeforeCreateCol",value:function(e,t){if(!this.engine.isItPossibleToAddColumns(this.sheetId,[this.toPhysicalColumnPosition(e),t]))return!1}},{key:"onBeforeRemoveRow",value:function(e,t,n){var r=this;return!1!==n.every((function(e){return r.engine.isItPossibleToRemoveRows(r.sheetId,[e,1])}))&&void 0}},{key:"onBeforeRemoveCol",value:function(e,t,n){var r=this;return!1!==n.every((function(e){return r.engine.isItPossibleToRemoveColumns(r.sheetId,[e,1])}))&&void 0}},{key:"onAfterCreateRow",value:function(e,t){var n=this.engine.addRows(this.sheetId,[this.toPhysicalRowPosition(e),t]);this.renderDependentSheets(n)}},{key:"onAfterCreateCol",value:function(e,t){var n=this.engine.addColumns(this.sheetId,[this.toPhysicalColumnPosition(e),t]);this.renderDependentSheets(n)}},{key:"onAfterRemoveRow",value:function(e,t,n){var r=this,o=n.sort().reverse(),i=this.engine.batch((function(){o.forEach((function(e){r.engine.removeRows(r.sheetId,[e,1])}))}));this.renderDependentSheets(i)}},{key:"onAfterRemoveCol",value:function(e,t,n){var r=this,o=n.sort().reverse(),i=this.engine.batch((function(){o.forEach((function(e){r.engine.removeColumns(r.sheetId,[e,1])}))}));this.renderDependentSheets(i)}},{key:"onEngineValuesUpdated",value:function(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}},{key:"onEngineNamedExpressionsAdded",value:function(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}},{key:"onEngineNamedExpressionsRemoved",value:function(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}},{key:"onEngineSheetAdded",value:function(e){this.hot.runHooks("afterSheetAdded",e)}},{key:"onEngineSheetRenamed",value:function(e,t){this.hot.runHooks("afterSheetRenamed",e,t)}},{key:"onEngineSheetRemoved",value:function(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}}],[{key:"PLUGIN_KEY",get:function(){return"formulas"}},{key:"PLUGIN_PRIORITY",get:function(){return 260}}]),n}(g.BasePlugin);t.Formulas=I},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(5)),i=function e(t,n){(0,o.default)(this,e),this.hot=n,this.plugin=t};t.default=i},function(e,t,n){var r=n(77),o=n(46),i=n(211);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(213),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(56),o=n(296),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(78),o=n(299),i=n(109),a=n(82);e.exports=function(e,t){for(var n=o(t),s=a.f,u=i.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||s(e,c,u(t,c))}}},function(e,t,n){var r=n(134),o=n(152),i=n(216),a=n(67);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(56);e.exports=r},function(e,t,n){var r=n(78),o=n(92),i=n(214).indexOf,a=n(151);e.exports=function(e,t){var n,s=o(e),u=0,l=[];for(n in s)!r(a,n)&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~i(l,n)||l.push(n));return l}},function(e,t,n){var r=n(46);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(92),o=n(152).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},function(e,t,n){var r=n(220);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(134);e.exports=r("document","documentElement")},function(e,t,n){var r=n(222),o=n(116),i=n(59)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r=n(67);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},function(e,t,n){var r=n(59),o=n(160),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){var r=n(306),o=n(160),i=n(59)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(59)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r,o,i,a=n(46),s=n(186),u=n(99),l=n(78),c=n(59),f=n(133),h=c("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):d=!0);var p=null==r||a((function(){var e={};return r[h].call(e)!==e}));p&&(r={}),f&&!p||l(r,h)||u(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){var r=n(67),o=n(611);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},function(e,t,n){var r=n(59);t.f=r},function(e,t,n){var r=n(300),o=n(78),i=n(313),a=n(82).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";n.r(t),n.d(t,"DependencyGraph",(function(){return O}));n(72),n(41),n(25),n(3),n(1),n(57),n(2),n(4),n(20),n(27),n(23),n(8),n(10),n(11),n(19);var r=n(79),o=n(197),i=n(22),a=n(39),s=n(98),u=n(69),l=n(168),c=n(119),f=n(101),h=n(245),d=n(635),p=n(249),m=n(250),v=n(251),g=n(252),y=n(50);function E(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=w(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var O=function(){function e(t,n,i,a,s,l,c,h){var d=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.addressMapping=t,this.rangeMapping=n,this.sheetMapping=i,this.matrixMapping=a,this.stats=s,this.lazilyTransformingAstService=l,this.functionRegistry=c,this.namedExpressions=h,this.dependencyQueryAddresses=function(e){if(e instanceof f.RangeVertex)return d.rangeDependencyQuery(e).map((function(e){var t=C(e,2),n=t[0];t[1];return n}));var t=d.formulaDependencyQuery(e);if(void 0!==t){var n=C(t,2),r=n[0];return n[1].map((function(e){return e instanceof u.NamedExpressionDependency?d.namedExpressions.namedExpressionOrPlaceholder(e.name,r.sheet).address:e}))}},this.dependencyQueryVertices=function(e){if(e instanceof f.RangeVertex)return d.rangeDependencyQuery(e).map((function(e){var t=C(e,2);t[0];return t[1]}));var t=d.formulaDependencyQuery(e);if(void 0!==t){var n=C(t,2),o=n[0];return n[1].map((function(e){if(e instanceof r.AbsoluteCellRange)return d.rangeMapping.fetchRange(e.start,e.end);if(e instanceof u.NamedExpressionDependency){var t=d.namedExpressions.namedExpressionOrPlaceholder(e.name,o.sheet);return d.addressMapping.fetchCell(t.address)}return d.addressMapping.fetchCell(e)}))}},this.rangeDependencyQuery=function(e){var t,n=[],o=d.rangeMapping.findSmallerRange(e.range),i=o.smallerRangeVertex,a=o.restRange;null!==i&&d.graph.adjacentNodes(i).has(e)?(t=a,n.push([new r.AbsoluteCellRange(i.start,i.end),i])):t=e.range;var s,u=T(t.addresses(d));try{for(u.s();!(s=u.n()).done;){var l=s.value,c=d.addressMapping.getCell(l);c instanceof f.EmptyCellVertex&&(c.address=l),null!==c&&n.push([l,c])}}catch(e){u.e(e)}finally{u.f()}return n},this.formulaDependencyQuery=function(e){var t,n;if(e instanceof f.FormulaCellVertex)n=e.getAddress(d.lazilyTransformingAstService),t=e.getFormula(d.lazilyTransformingAstService);else{if(!(e instanceof f.MatrixVertex&&e.isFormula()))return;n=e.getAddress(),t=e.getFormula()}var r=Object(u.collectDependencies)(t,d.functionRegistry);return[n,Object(o.absolutizeDependencies)(r,n)]},this.graph=new p.Graph(this.dependencyQueryVertices)}var t,n,w;return t=e,w=[{key:"buildEmpty",value:function(t,n,r,o,i){return new e(new h.AddressMapping(n.chooseAddressMappingPolicy),new v.RangeMapping,new g.SheetMapping(n.translationPackage),new m.MatrixMapping,i,t,r,o)}}],(n=[{key:"setFormulaToCell",value:function(e,t,n,r,o){var i=this.addressMapping.getCell(e);this.ensureThatVertexIsNonMatrixCellVertex(i);var a=new f.FormulaCellVertex(t,e,this.lazilyTransformingAstService.version());this.exchangeOrAddGraphNode(i,a),this.addressMapping.setCell(e,a),this.processCellDependencies(n,a),this.graph.markNodeAsSpecialRecentlyChanged(a),r&&this.markAsVolatile(a),o&&this.markAsDependentOnStructureChange(a),this.correctInfiniteRangesDependency(e)}},{key:"setParsingErrorToCell",value:function(e,t){var n=this.addressMapping.getCell(e);this.ensureThatVertexIsNonMatrixCellVertex(n),this.exchangeOrAddGraphNode(n,t),this.addressMapping.setCell(e,t),this.graph.markNodeAsSpecialRecentlyChanged(t),this.correctInfiniteRangesDependency(e)}},{key:"setValueToCell",value:function(e,t){var n=this.addressMapping.getCell(e);if(this.ensureThatVertexIsNonMatrixCellVertex(n),n instanceof f.ValueCellVertex)n.getValues().rawValue!==t.rawValue&&(n.setValues(t),this.graph.markNodeAsSpecialRecentlyChanged(n));else{var r=new f.ValueCellVertex(t.parsedValue,t.rawValue);this.exchangeOrAddGraphNode(n,r),this.addressMapping.setCell(e,r),this.graph.markNodeAsSpecialRecentlyChanged(r)}this.correctInfiniteRangesDependency(e)}},{key:"setCellEmpty",value:function(e){var t=this.addressMapping.getCell(e);if(null!==t)if(this.ensureThatVertexIsNonMatrixCellVertex(t),this.graph.adjacentNodes(t).size>0){var n=new f.EmptyCellVertex(e);this.exchangeGraphNode(t,n),0===this.graph.adjacentNodesCount(n)?(this.removeVertex(n),this.addressMapping.removeCell(e)):(this.graph.markNodeAsSpecialRecentlyChanged(n),this.addressMapping.setCell(e,n))}else this.removeVertex(t),this.addressMapping.removeCell(e)}},{key:"ensureThatVertexIsNonMatrixCellVertex",value:function(e){if(e instanceof f.MatrixVertex)throw new Error("Illegal operation")}},{key:"clearRecentlyChangedVertices",value:function(){this.graph.clearSpecialNodesRecentlyChanged()}},{key:"verticesToRecompute",value:function(){return new Set([].concat(E(this.graph.specialNodesRecentlyChanged),E(this.volatileVertices())))}},{key:"processCellDependencies",value:function(e,t){var n=this;e.forEach((function(e){if(e instanceof r.AbsoluteCellRange){var o=e,i=n.getRange(o.start,o.end);void 0===i&&(i=new f.RangeVertex(o),n.rangeMapping.setRange(i)),n.graph.addNode(i),o.isFinite()||n.graph.markNodeAsInfiniteRange(i);var a=n.rangeMapping.findSmallerRange(o),s=a.smallerRangeVertex,l=a.restRange;if(s){if(n.graph.addEdge(s,i),i.bruteForce){i.bruteForce=!1;var c,h=T(o.addresses(n));try{for(h.s();!(c=h.n()).done;){var d=c.value;n.graph.removeEdge(n.fetchCell(d),i)}}catch(e){h.e(e)}finally{h.f()}}}else i.bruteForce=!0;var p=n.matrixMapping.getMatrix(l);if(void 0!==p)n.graph.addEdge(p,i);else{var m,v=T(l.addresses(n));try{for(v.s();!(m=v.n()).done;){var g=m.value;n.graph.addEdge(n.fetchCellOrCreateEmpty(g),i)}}catch(e){v.e(e)}finally{v.f()}}n.graph.addEdge(i,t),o.isFinite()&&n.correctInfiniteRangesDependenciesByRangeVertex(i)}else if(e instanceof u.NamedExpressionDependency){var y=t.getAddress(n.lazilyTransformingAstService).sheet,E=n.fetchNamedExpressionVertex(e.name,y);n.graph.addEdge(E,t)}else n.graph.addEdge(n.fetchCellOrCreateEmpty(e),t)}))}},{key:"fetchNamedExpressionVertex",value:function(e,t){var n=this.namedExpressions.namedExpressionOrPlaceholder(e,t);return this.fetchCellOrCreateEmpty(n.address)}},{key:"exchangeNode",value:function(e,t){var n=this.fetchCellOrCreateEmpty(e),r=this.fetchCellOrCreateEmpty(t);this.addressMapping.removeCell(e),this.exchangeGraphNode(n,r)}},{key:"correctInfiniteRangesDependenciesByRangeVertex",value:function(e){var t,n=T(this.graph.infiniteRanges);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=r,i=e.range.intersectionWith(o.range);if(null!==i){var a,s=T(i.addresses(this));try{for(s.s();!(a=s.n()).done;){var u=a.value;this.graph.addEdge(this.fetchCellOrCreateEmpty(u),r)}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){n.e(e)}finally{n.f()}}},{key:"correctInfiniteRangesDependency",value:function(e){var t,n=null,r=T(this.graph.infiniteRanges);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.range.addressInRange(e)&&(n=n||this.fetchCellOrCreateEmpty(e),this.graph.addEdge(n,o))}}catch(e){r.e(e)}finally{r.f()}}},{key:"fetchCellOrCreateEmpty",value:function(e){var t=this.addressMapping.getCell(e);return t||(t=new f.EmptyCellVertex(e),this.graph.addNode(t),this.addressMapping.setCell(e,t)),t}},{key:"removeRows",value:function(e){var t=this;if(this.matrixMapping.isFormulaMatrixInRows(e))throw Error("It is not possible to remove row with matrix");this.stats.measure(c.StatType.ADJUSTING_GRAPH,(function(){var n,r=T(t.addressMapping.verticesFromRowsSpan(e));try{for(r.s();!(n=r.n()).done;){var o,i=n.value,a=T(t.graph.adjacentNodes(i));try{for(a.s();!(o=a.n()).done;){var s=o.value;t.graph.markNodeAsSpecialRecentlyChanged(s)}}catch(e){a.e(e)}finally{a.f()}i instanceof f.MatrixVertex||t.removeVertex(i)}}catch(e){r.e(e)}finally{r.f()}})),this.stats.measure(c.StatType.ADJUSTING_MATRIX_MAPPING,(function(){t.truncateMatricesAfterRemovingRows(e)})),this.stats.measure(c.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){t.addressMapping.removeRows(e)})),this.stats.measure(c.StatType.ADJUSTING_RANGES,(function(){t.truncateRanges(e,(function(e){return e.row}))})),this.addStructuralNodesToChangeSet()}},{key:"removeSheet",value:function(e){var t,n=this,r=new Set,o=T(this.addressMapping.sheetEntries(e));try{for(o.s();!(t=o.n()).done;){var i=C(t.value,2),a=i[0],s=i[1];if(s instanceof f.MatrixVertex){if(r.has(s))continue;r.add(s)}var u,l=T(this.graph.adjacentNodes(s));try{for(l.s();!(u=l.n()).done;){var h=u.value;this.graph.markNodeAsSpecialRecentlyChanged(h)}}catch(e){l.e(e)}finally{l.f()}this.removeVertex(s),this.addressMapping.removeCell(a)}}catch(e){o.e(e)}finally{o.f()}this.stats.measure(c.StatType.ADJUSTING_MATRIX_MAPPING,(function(){var e,t=T(r.values());try{for(t.s();!(e=t.n()).done;){var o=e.value;n.matrixMapping.removeMatrix(o.getRange())}}catch(e){t.e(e)}finally{t.f()}})),this.stats.measure(c.StatType.ADJUSTING_RANGES,(function(){var t,r=T(n.rangeMapping.removeRangesInSheet(e));try{for(r.s();!(t=r.n()).done;){var o=t.value;n.removeVertex(o)}}catch(e){r.e(e)}finally{r.f()}n.stats.measure(c.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){n.addressMapping.removeSheet(e)}))})),this.addStructuralNodesToChangeSet()}},{key:"clearSheet",value:function(e){var t,n=new Set,r=T(this.addressMapping.sheetEntries(e));try{for(r.s();!(t=r.n()).done;){var o=C(t.value,2),i=o[0],a=o[1];a instanceof f.MatrixVertex?n.add(a):this.setCellEmpty(i)}}catch(e){r.e(e)}finally{r.f()}var s,u=T(n.values());try{for(u.s();!(s=u.n()).done;){var l=s.value;this.setMatrixEmpty(l)}}catch(e){u.e(e)}finally{u.f()}this.addStructuralNodesToChangeSet()}},{key:"removeColumns",value:function(e){var t=this;if(this.matrixMapping.isFormulaMatrixInColumns(e))throw Error("It is not possible to remove column within matrix");this.stats.measure(c.StatType.ADJUSTING_GRAPH,(function(){var n,r=T(t.addressMapping.verticesFromColumnsSpan(e));try{for(r.s();!(n=r.n()).done;){var o,i=n.value,a=T(t.graph.adjacentNodes(i));try{for(a.s();!(o=a.n()).done;){var s=o.value;t.graph.markNodeAsSpecialRecentlyChanged(s)}}catch(e){a.e(e)}finally{a.f()}i instanceof f.MatrixVertex||t.removeVertex(i)}}catch(e){r.e(e)}finally{r.f()}})),this.stats.measure(c.StatType.ADJUSTING_MATRIX_MAPPING,(function(){t.truncateMatricesAfterRemovingColumns(e)})),this.stats.measure(c.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){t.addressMapping.removeColumns(e)})),this.stats.measure(c.StatType.ADJUSTING_RANGES,(function(){t.truncateRanges(e,(function(e){return e.col}))})),this.addStructuralNodesToChangeSet()}},{key:"addRows",value:function(e){var t=this;this.stats.measure(c.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){t.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)})),this.stats.measure(c.StatType.ADJUSTING_MATRIX_MAPPING,(function(){t.expandMatricesAfterAddingRows(e.sheet,e.rowStart,e.numberOfRows)})),this.stats.measure(c.StatType.ADJUSTING_RANGES,(function(){t.rangeMapping.moveAllRangesInSheetAfterRowByRows(e.sheet,e.rowStart,e.numberOfRows),t.fixRangesWhenAddingRows(e.sheet,e.rowStart,e.numberOfRows)}));var n,r=T(this.addressMapping.verticesFromRowsSpan(e));try{for(r.s();!(n=r.n()).done;){var o=n.value;this.graph.markNodeAsSpecialRecentlyChanged(o)}}catch(e){r.e(e)}finally{r.f()}this.addStructuralNodesToChangeSet()}},{key:"addColumns",value:function(e){var t=this;this.stats.measure(c.StatType.ADJUSTING_ADDRESS_MAPPING,(function(){t.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)})),this.stats.measure(c.StatType.ADJUSTING_MATRIX_MAPPING,(function(){t.expandMatricesAfterAddingColumns(e.sheet,e.columnStart,e.numberOfColumns)})),this.stats.measure(c.StatType.ADJUSTING_RANGES,(function(){t.rangeMapping.moveAllRangesInSheetAfterColumnByColumns(e.sheet,e.columnStart,e.numberOfColumns),t.fixRangesWhenAddingColumns(e.sheet,e.columnStart,e.numberOfColumns)}));var n,r=T(this.addressMapping.verticesFromColumnsSpan(e));try{for(r.s();!(n=r.n()).done;){var o=n.value;this.graph.markNodeAsSpecialRecentlyChanged(o)}}catch(e){r.e(e)}finally{r.f()}this.addStructuralNodesToChangeSet()}},{key:"ensureNoMatrixInRange",value:function(e){if(this.matrixMapping.isFormulaMatrixInRange(e))throw Error("It is not possible to move / replace cells with matrix")}},{key:"moveCells",value:function(e,t,n,r){var o,a=T(e.addressesWithDirection(t,n,this));try{for(a.s();!(o=a.n()).done;){var s=o.value,u=Object(i.simpleCellAddress)(r,s.col+t,s.row+n),l=this.addressMapping.getCell(s),c=this.addressMapping.getCell(u);if(this.addressMapping.removeCell(s),null!==l){this.graph.markNodeAsSpecialRecentlyChanged(l),this.addressMapping.setCell(u,l);var h,d=null,p=T(this.graph.adjacentNodes(l));try{for(p.s();!(h=p.n()).done;){var m=h.value;m instanceof f.RangeVertex&&!e.containsRange(m.range)&&(d=d||this.fetchCellOrCreateEmpty(s),this.graph.addEdge(d,m),this.graph.removeEdge(l,m))}}catch(e){p.e(e)}finally{p.f()}d&&(this.graph.markNodeAsSpecialRecentlyChanged(d),this.addressMapping.setCell(s,d))}if(null!==c){null===l&&this.addressMapping.removeCell(u);var v,g=T(this.graph.adjacentNodes(c));try{for(g.s();!(v=g.n()).done;){var y=v.value;l=null!=l?l:this.fetchCellOrCreateEmpty(u),this.graph.addEdge(l,y),this.graph.markNodeAsSpecialRecentlyChanged(l)}}catch(e){g.e(e)}finally{g.f()}this.removeVertex(c)}}}catch(e){a.e(e)}finally{a.f()}var E,C=T(this.rangeMapping.rangeVerticesContainedInRange(e));try{for(C.s();!(E=C.n()).done;){var w,R=E.value,b=T(this.graph.adjacentNodes(R));try{for(b.s();!(w=b.n()).done;){var O=w.value;if(O instanceof f.RangeVertex&&!e.containsRange(O.range)){this.graph.removeEdge(R,O);var S,N=T(R.range.addresses(this));try{for(N.s();!(S=N.n()).done;){var A=S.value,M=this.fetchCellOrCreateEmpty(A);this.graph.addEdge(M,O),this.addressMapping.setCell(A,M),this.graph.markNodeAsSpecialRecentlyChanged(M)}}catch(e){N.e(e)}finally{N.f()}}}}catch(e){b.e(e)}finally{b.f()}}}catch(e){C.e(e)}finally{C.f()}this.rangeMapping.moveRangesInsideSourceRange(e,t,n,r)}},{key:"disableNumericMatrices",value:function(){var e,t=T(this.matrixMapping.numericMatrices());try{for(t.s();!(e=t.n()).done;){var n=C(e.value,2),r=(n[0],n[1]);this.breakNumericMatrix(r)}}catch(e){t.e(e)}finally{t.f()}}},{key:"breakNumericMatricesInRange",value:function(e){var t,n=T(this.matrixMapping.numericMatricesInRange(e));try{for(n.s();!(t=n.n()).done;){var r=C(t.value,2),o=(r[0],r[1]);this.breakNumericMatrix(o)}}catch(e){n.e(e)}finally{n.f()}}},{key:"breakNumericMatrix",value:function(e){var t,n=r.AbsoluteCellRange.spanFrom(e.getAddress(),e.width,e.height),o=this.graph.adjacentNodes(e),i=T(n.addresses(this));try{for(i.s();!(t=i.n()).done;){var a=t.value,s=new f.ValueCellVertex(this.getCellValue(a),this.getRawValue(a));this.addVertex(a,s)}}catch(e){i.e(e)}finally{i.f()}var u,l=T(o.values());try{for(l.s();!(u=l.n()).done;){var c,h=u.value,p=T(Object(d.collectAddressesDependentToMatrix)(this.functionRegistry,h,e,this.lazilyTransformingAstService,this));try{for(p.s();!(c=p.n()).done;){var m=c.value,v=this.fetchCell(m);this.graph.addEdge(v,h)}}catch(e){p.e(e)}finally{p.f()}}}catch(e){l.e(e)}finally{l.f()}this.removeVertex(e),this.matrixMapping.removeMatrix(e.getRange())}},{key:"setMatrixEmpty",value:function(e){var t,n=r.AbsoluteCellRange.spanFrom(e.getAddress(),e.width,e.height),o=this.graph.adjacentNodes(e),i=T(n.addresses(this));try{for(i.s();!(t=i.n()).done;){var a=t.value;this.addressMapping.removeCell(a)}}catch(e){i.e(e)}finally{i.f()}var s,u=T(o.values());try{for(u.s();!(s=u.n()).done;){var l,c=s.value,f=Object(d.collectAddressesDependentToMatrix)(this.functionRegistry,c,e,this.lazilyTransformingAstService,this),h=T(f);try{for(h.s();!(l=h.n()).done;){var p=l.value,m=this.fetchCellOrCreateEmpty(p);this.graph.addEdge(m,c)}}catch(e){h.e(e)}finally{h.f()}f.length>0&&this.graph.markNodeAsSpecialRecentlyChanged(c)}}catch(e){u.e(e)}finally{u.f()}this.removeVertex(e),this.matrixMapping.removeMatrix(e.getRange())}},{key:"addVertex",value:function(e,t){this.graph.addNode(t),this.setVertexAddress(e,t)}},{key:"addMatrixVertex",value:function(e,t){this.graph.addNode(t),this.setAddressMappingForMatrixVertex(t,e)}},{key:"addNewMatrixVertex",value:function(e){var t,n=r.AbsoluteCellRange.spanFrom(e.getAddress(),e.width,e.height),o=T(this.verticesFromRange(n));try{for(o.s();!(t=o.n()).done;)if(t.value instanceof f.MatrixVertex)throw Error("You cannot modify only part of an array")}catch(e){o.e(e)}finally{o.f()}this.setMatrix(n,e);var i,a=T(this.entriesFromRange(n));try{for(a.s();!(i=a.n()).done;){var s=C(i.value,2),u=s[0],l=s[1];l&&this.exchangeGraphNode(l,e),this.setVertexAddress(u,e)}}catch(e){a.e(e)}finally{a.f()}}},{key:"matrixFormulaNodes",value:regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=T(this.graph.nodes),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=10;break}if(!((r=n.value)instanceof f.MatrixVertex&&r.isFormula())){e.next=8;break}return e.next=8,r;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[1,12,15,18]])}))},{key:"entriesFromRowsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.addressMapping.entriesFromRowsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"entriesFromColumnsSpan",value:regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.addressMapping.entriesFromColumnsSpan(t),"t0",1);case 1:case"end":return e.stop()}}),e,this)}))},{key:"existsVertex",value:function(e){return this.addressMapping.has(e)}},{key:"fetchCell",value:function(e){return this.addressMapping.fetchCell(e)}},{key:"getCell",value:function(e){return this.addressMapping.getCell(e)}},{key:"getCellValue",value:function(e){return this.addressMapping.getCellValue(e)}},{key:"getRawValue",value:function(e){return this.addressMapping.getRawValue(e)}},{key:"getScalarValue",value:function(e){var t=this.addressMapping.getCellValue(e);return t instanceof s.SimpleRangeValue?new i.CellError(i.ErrorType.VALUE,a.ErrorMessage.ScalarExpected):t}},{key:"setVertexAddress",value:function(e,t){this.addressMapping.setCell(e,t)}},{key:"existsEdge",value:function(e,t){return this.graph.existsEdge(e,t)}},{key:"getSheetId",value:function(e){return this.sheetMapping.fetch(e)}},{key:"getSheetName",value:function(e){return this.sheetMapping.fetchDisplayName(e)}},{key:"getSheetHeight",value:function(e){return this.addressMapping.getHeight(e)}},{key:"getSheetWidth",value:function(e){return this.addressMapping.getWidth(e)}},{key:"getMatrix",value:function(e){return this.matrixMapping.getMatrix(e)}},{key:"setMatrix",value:function(e,t){this.matrixMapping.setMatrix(e,t)}},{key:"getRange",value:function(e,t){return this.rangeMapping.getRange(e,t)}},{key:"topSortWithScc",value:function(){return this.graph.topSortWithScc()}},{key:"markAsVolatile",value:function(e){this.graph.markNodeAsSpecial(e)}},{key:"markAsDependentOnStructureChange",value:function(e){this.graph.markNodeAsChangingWithStructure(e)}},{key:"forceApplyPostponedTransformations",value:function(){var e,t=T(this.graph.nodes.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n instanceof f.FormulaCellVertex&&n.ensureRecentData(this.lazilyTransformingAstService)}}catch(e){t.e(e)}finally{t.f()}}},{key:"volatileVertices",value:function(){return this.graph.specialNodes}},{key:"destroy",value:function(){this.graph.destroy(),this.addressMapping.destroy(),this.rangeMapping.destroy(),this.sheetMapping.destroy(),this.matrixMapping.destroy()}},{key:"verticesFromRange",value:regeneratorRuntime.mark((function e(t){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=T(t.addresses(this)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=11;break}if(o=r.value,!(i=this.getCell(o))){e.next=9;break}return e.next=9,i;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),n.e(e.t0);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"rawValuesFromRange",value:regeneratorRuntime.mark((function e(t){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=T(t.addresses(this)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=11;break}if(o=r.value,(i=this.getScalarValue(o))===y.EmptyValue){e.next=9;break}return e.next=9,[Object(y.getRawValue)(i),o];case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),n.e(e.t0);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,this,[[1,13,16,19]])}))},{key:"entriesFromRange",value:regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=T(t.addresses(this)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,[o,this.getCell(o)];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"exchangeGraphNode",value:function(e,t){var n=this;this.graph.addNode(t);var r=this.graph.adjacentNodes(e);this.removeVertex(e),r.forEach((function(e){n.graph.hasNode(e)&&n.graph.addEdge(t,e)}))}},{key:"exchangeOrAddGraphNode",value:function(e,t){e?this.exchangeGraphNode(e,t):this.graph.addNode(t)}},{key:"computeListOfValuesInRange",value:function(e){var t,n=[],r=T(e.addresses(this));try{for(r.s();!(t=r.n()).done;){var o=t.value,i=this.getScalarValue(o);n.push(i)}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"addStructuralNodesToChangeSet",value:function(){var e,t=T(this.graph.specialNodesStructuralChanges);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.graph.markNodeAsSpecialRecentlyChanged(n)}}catch(e){t.e(e)}finally{t.f()}}},{key:"fixRangesWhenAddingRows",value:function(e,t,n){for(var o=0,a=Array.from(this.rangeMapping.rangesInSheet(e));o<a.length;o++){var s=a[o];if(s.range.includesRow(t+n))if(s.bruteForce){var u,l=T(s.range.rangeWithSameWidth(t,n).addresses(this));try{for(l.s();!(u=l.n()).done;){var c=u.value;this.graph.addEdge(this.fetchCellOrCreateEmpty(c),s)}}catch(e){l.e(e)}finally{l.f()}}else{var h=s,d=this.rangeMapping.findSmallerRange(h.range);if(null!==d.smallerRangeVertex)continue;for(;null===d.smallerRangeVertex;){var p=new f.RangeVertex(r.AbsoluteCellRange.spanFrom(h.range.start,h.range.width(),h.range.height()-1));this.rangeMapping.setRange(p),this.graph.addNode(p);var m=new r.AbsoluteCellRange(Object(i.simpleCellAddress)(h.range.start.sheet,h.range.start.col,h.range.end.row),h.range.end);this.addAllFromRange(m,h),this.graph.addEdge(p,h),h=p,d=this.rangeMapping.findSmallerRange(h.range)}this.graph.addEdge(d.smallerRangeVertex,h),this.addAllFromRange(d.restRange,h),this.graph.removeEdge(d.smallerRangeVertex,s)}}}},{key:"addAllFromRange",value:function(e,t){var n,r=T(e.addresses(this));try{for(r.s();!(n=r.n()).done;){var o=n.value;this.graph.addEdge(this.fetchCellOrCreateEmpty(o),t)}}catch(e){r.e(e)}finally{r.f()}}},{key:"fixRangesWhenAddingColumns",value:function(e,t,n){var o,a=T(this.rangeMapping.rangesInSheet(e));try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s.range.includesColumn(t+n)){var u,l=T((s.bruteForce?s.range.rangeWithSameHeight(t,n):r.AbsoluteCellRange.spanFrom(Object(i.simpleCellAddress)(e,t,s.range.end.row),n,1)).addresses(this));try{for(l.s();!(u=l.n()).done;){var c=u.value;this.graph.addEdge(this.fetchCellOrCreateEmpty(c),s)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){a.e(e)}finally{a.f()}}},{key:"setAddressMappingForMatrixVertex",value:function(e,t){if(this.setVertexAddress(t,e),e instanceof f.MatrixVertex){var n=r.AbsoluteCellRange.spanFrom(t,e.width,e.height);this.setMatrix(n,e);var o,i=T(n.addresses(this));try{for(i.s();!(o=i.n()).done;){var a=o.value;this.setVertexAddress(a,e)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"truncateMatricesAfterRemovingRows",value:function(e){var t=this;this.matrixMapping.truncateMatricesByRows(e).forEach((function(e){t.removeVertex(e)}))}},{key:"truncateRanges",value:function(e,t){var n,r=this.rangeMapping.truncateRanges(e,t),o=r.verticesToRemove,i=T(r.verticesToMerge);try{for(i.s();!(n=i.n()).done;){var a=C(n.value,2),s=a[0],u=a[1];this.mergeRangeVertices(s,u)}}catch(e){i.e(e)}finally{i.f()}var l,c=T(o);try{for(c.s();!(l=c.n()).done;){var f=l.value;this.removeVertexAndCleanupDependencies(f)}}catch(e){c.e(e)}finally{c.f()}}},{key:"truncateMatricesAfterRemovingColumns",value:function(e){var t=this;this.matrixMapping.truncateMatricesByColumns(e).forEach((function(e){t.removeVertex(e)}))}},{key:"expandMatricesAfterAddingRows",value:function(e,t,n){var o,a=T(this.matrixMapping.numericMatricesInRows(l.RowsSpan.fromRowStartAndEnd(e,t,t)));try{for(a.s();!(o=a.n()).done;){var s=C(o.value,2)[1];s.addRows(e,t,n);var u,c=T(r.AbsoluteCellRange.spanFrom(Object(i.simpleCellAddress)(e,s.getAddress().col,t),s.width,n).addresses(this));try{for(c.s();!(u=c.n()).done;){var f=u.value;this.addressMapping.setCell(f,s)}}catch(e){c.e(e)}finally{c.f()}}}catch(e){a.e(e)}finally{a.f()}}},{key:"expandMatricesAfterAddingColumns",value:function(e,t,n){var o,a=T(this.matrixMapping.numericMatricesInColumns(l.ColumnsSpan.fromColumnStartAndEnd(e,t,t)));try{for(a.s();!(o=a.n()).done;){var s=C(o.value,2)[1];s.addColumns(e,t,n);var u,c=T(r.AbsoluteCellRange.spanFrom(Object(i.simpleCellAddress)(e,t,s.getAddress().row),n,s.height).addresses(this));try{for(c.s();!(u=c.n()).done;){var f=u.value;this.addressMapping.setCell(f,s)}}catch(e){c.e(e)}finally{c.f()}}}catch(e){a.e(e)}finally{a.f()}}},{key:"removeVertex",value:function(e){this.removeVertexAndCleanupDependencies(e),e instanceof f.RangeVertex&&this.rangeMapping.removeRange(e)}},{key:"mergeRangeVertices",value:function(e,t){var n=this,r=this.graph.adjacentNodes(t);this.removeVertexAndCleanupDependencies(t),this.graph.softRemoveEdge(e,t),r.forEach((function(t){n.graph.hasNode(t)&&n.graph.addEdge(e,t)}))}},{key:"removeVertexAndCleanupDependencies",value:function(e){for(var t=new Set(this.graph.removeNode(e));t.size>0;){var n=t.values().next().value;t.delete(n),this.graph.hasNode(n)&&0===this.graph.adjacentNodesCount(n)&&((n instanceof f.RangeVertex||n instanceof f.EmptyCellVertex)&&this.graph.removeNode(n).forEach((function(e){return t.add(e)})),n instanceof f.RangeVertex?this.rangeMapping.removeRange(n):n instanceof f.EmptyCellVertex&&this.addressMapping.removeCell(n.address))}}},{key:"getAdjacentNodesAddresses",value:function(e){var t=this,n=this.graph.adjacentNodes(e),o=[];return n.forEach((function(e){var n=e;n instanceof f.RangeVertex?o.push(new r.AbsoluteCellRange(n.start,n.end)):n instanceof f.FormulaCellVertex?o.push(n.getAddress(t.lazilyTransformingAstService)):o.push(n.getAddress())})),o}}])&&b(t.prototype,n),w&&b(t,w),e}()},function(e,t,n){var r=n(46);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(82).f,o=n(136),i=n(229),a=n(159),s=n(227),u=n(226),l=n(224),c=n(319),f=n(77),h=n(162).fastKey,d=n(117),p=d.set,m=d.getterFor;e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,c,t),p(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=r&&u(r,e[l],{that:e,AS_ENTRIES:n})})),d=m(t),v=function(e,t,n){var r,o,i=d(e),a=g(e,t);return a?a.value=n:(i.last=a={index:o=h(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),f?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},g=function(e,t){var n,r=d(e),o=h(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(c.prototype,{clear:function(){for(var e=d(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=d(this),n=g(this,e);if(n){var r=n.next,o=n.previous;delete t.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),t.first==n&&(t.first=r),t.last==n&&(t.last=o),f?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=d(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),i(c.prototype,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),f&&r(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",o=m(t),i=m(r);l(e,t,(function(e,t){p(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){"use strict";var r=n(134),o=n(82),i=n(59),a=n(77),s=i("species");e.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(85),o="["+n(321)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var r=n(116),o=n(56);e.exports="process"==r(o.process)},function(e,t,n){"use strict";n.r(t),n.d(t,"ReferenceType",(function(){return r})),n.d(t,"ColumnAddress",(function(){return s}));n(20);var r,o=n(22),i=n(102);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.RELATIVE="RELATIVE",e.ABSOLUTE="ABSOLUTE"}(r||(r={}));var s=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sheet=t,this.col=n,this.type=r}var t,n,s;
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/return t=e,s=[{key:"absolute",value:function(t,n){return new e(t,n,r.ABSOLUTE)}},{key:"relative",value:function(t,n){return new e(t,n,r.RELATIVE)}}],(n=[{key:"isColumnAbsolute",value:function(){return this.type===r.ABSOLUTE}},{key:"isColumnRelative",value:function(){return this.type===r.RELATIVE}},{key:"isAbsolute",value:function(){return this.type===r.ABSOLUTE&&null!==this.sheet}},{key:"moved",value:function(t,n,r){return new e(null===this.sheet?null:t,this.col+n,this.type)}},{key:"shiftedByColumns",value:function(t){return new e(this.sheet,this.col+t,this.type)}},{key:"toSimpleColumnAddress",value:function(e){var t=Object(o.absoluteSheetReference)(this,e),n=this.col;return this.isColumnRelative()&&(n=e.col+this.col),Object(o.simpleColumnAddress)(t,n)}},{key:"shiftRelativeDimensions",value:function(t,n){var r=this.isColumnRelative()?this.col+t:this.col;return new e(this.sheet,r,this.type)}},{key:"shiftAbsoluteDimensions",value:function(t,n){var r=this.isColumnAbsolute()?this.col+t:this.col;return new e(this.sheet,r,this.type)}},{key:"withAbsoluteSheet",value:function(t){return new e(t,this.col,this.type)}},{key:"isInvalid",value:function(e){return this.toSimpleColumnAddress(e).col<0}},{key:"hash",value:function(e){var t=e&&null!==this.sheet?"#".concat(this.sheet):"";switch(this.type){case r.RELATIVE:return"".concat(t,"#COLR").concat(this.col);case r.ABSOLUTE:return"".concat(t,"#COLA").concat(this.col)}}},{key:"unparse",value:function(e){var t=this.toSimpleColumnAddress(e);if(!Object(o.invalidSimpleColumnAddress)(t)){var n=Object(i.columnIndexToLabel)(t.col),a=this.type===r.ABSOLUTE?"$":"";return"".concat(a).concat(n)}}},{key:"exceedsSheetSizeLimits",value:function(e){return this.col>=e}}])&&a(t.prototype,n),s&&a(t,s),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"DEFAULT_MODE",(function(){return f})),n.d(t,"MODES",(function(){return h})),n.d(t,"SUPPORT_STICKY",(function(){return d})),n.d(t,"disableSticky",(function(){return p})),n.d(t,"enableSticky",(function(){return m})),n.d(t,"analyzeTokenTypes",(function(){return v})),n.d(t,"validatePatterns",(function(){return g})),n.d(t,"findMissingPatterns",(function(){return y})),n.d(t,"findInvalidPatterns",(function(){return E})),n.d(t,"findEndOfInputAnchor",(function(){return C})),n.d(t,"findEmptyMatchRegExps",(function(){return w})),n.d(t,"findStartOfInputAnchor",(function(){return b})),n.d(t,"findUnsupportedFlags",(function(){return O})),n.d(t,"findDuplicatePatterns",(function(){return S})),n.d(t,"findInvalidGroupType",(function(){return N})),n.d(t,"findModesThatDoNotExist",(function(){return A})),n.d(t,"findUnreachablePatterns",(function(){return M})),n.d(t,"addStartOfInput",(function(){return k})),n.d(t,"addStickyFlag",(function(){return _})),n.d(t,"performRuntimeChecks",(function(){return I})),n.d(t,"performWarningRuntimeChecks",(function(){return x})),n.d(t,"cloneEmptyGroups",(function(){return P})),n.d(t,"isCustomPattern",(function(){return L})),n.d(t,"isShortPattern",(function(){return D})),n.d(t,"LineTerminatorOptimizedTester",(function(){return F})),n.d(t,"buildLineBreakIssueMessage",(function(){return j})),n.d(t,"minOptimizationVal",(function(){return B})),n.d(t,"charCodeToOptimizedIndex",(function(){return W}));var r,o=n(236),i=n(138),a=n(42),s=n(619),u=n(237),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c="PATTERN",f="defaultMode",h="modes",d="boolean"==typeof new RegExp("(?:)").sticky;function p(){d=!1}function m(){d=!0}function v(e,t){var n,r=(t=Object(a.defaults)(t,{useSticky:d,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if(Object(a.isEmpty)(Y)){Y=new Array(65536);for(var e=0;e<65536;e++)Y[e]=e>255?255+~~(e/255):e}}()})),r("Reject Lexer.NA",(function(){n=Object(a.reject)(e,(function(e){return e[c]===i.Lexer.NA}))}));var o,u,l,f,h,p,m,v,g,y,E,T=!1;r("Transform Patterns",(function(){T=!1,o=Object(a.map)(n,(function(e){var n=e[c];if(Object(a.isRegExp)(n)){var r=n.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||Object(a.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?t.useSticky?_(n):k(n):r[1]}if(Object(a.isFunction)(n))return T=!0,{exec:n};if(Object(a.has)(n,"exec"))return T=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=new RegExp(o);return t.useSticky?_(i):k(i)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){u=Object(a.map)(n,(function(e){return e.tokenTypeIdx})),l=Object(a.map)(n,(function(e){var t=e.GROUP;if(t!==i.Lexer.SKIPPED){if(Object(a.isString)(t))return t;if(Object(a.isUndefined)(t))return!1;throw Error("non exhaustive match")}})),f=Object(a.map)(n,(function(e){var t=e.LONGER_ALT;if(t)return Object(a.indexOf)(n,t)})),h=Object(a.map)(n,(function(e){return e.PUSH_MODE})),p=Object(a.map)(n,(function(e){return Object(a.has)(e,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var e=H(t.lineTerminatorCharacters);m=Object(a.map)(n,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(m=Object(a.map)(n,(function(t){return Object(a.has)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===U(t,e)?Object(s.canMatchCharCode)(e,t.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){v=Object(a.map)(n,L),g=Object(a.map)(o,D),y=Object(a.reduce)(n,(function(e,t){var n=t.GROUP;return Object(a.isString)(n)&&n!==i.Lexer.SKIPPED&&(e[n]=[]),e}),{}),E=Object(a.map)(o,(function(e,t){return{pattern:o[t],longerAlt:f[t],canLineTerminator:m[t],isCustom:v[t],short:g[t],group:l[t],push:h[t],pop:p[t],tokenTypeIdx:u[t],tokenType:n[t]}}))}));var C=!0,w=[];return t.safeMode||r("First Char Optimization",(function(){w=Object(a.reduce)(n,(function(e,n,r){if("string"==typeof n.PATTERN){var o=W(n.PATTERN.charCodeAt(0));V(e,o,E[r])}else if(Object(a.isArray)(n.START_CHARS_HINT)){var i;Object(a.forEach)(n.START_CHARS_HINT,(function(t){var n=W("string"==typeof t?t.charCodeAt(0):t);i!==n&&(i=n,V(e,n,E[r]))}))}else if(Object(a.isRegExp)(n.PATTERN))if(n.PATTERN.unicode)C=!1,t.ensureOptimizations&&Object(a.PRINT_ERROR)(s.failedOptimizationPrefixMsg+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var u=Object(s.getOptimizedStartCodesIndices)(n.PATTERN,t.ensureOptimizations);Object(a.isEmpty)(u)&&(C=!1),Object(a.forEach)(u,(function(t){V(e,t,E[r])}))}else t.ensureOptimizations&&Object(a.PRINT_ERROR)(s.failedOptimizationPrefixMsg+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),C=!1;return e}),[])})),r("ArrayPacking",(function(){w=Object(a.packArray)(w)})),{emptyGroups:y,patternIdxToConfig:E,charCodeToPatternIdxToConfig:w,hasCustom:T,canBeOptimized:C}}function g(e,t){var n=[],r=y(e);n=n.concat(r.errors);var o=E(r.valid),i=o.valid;return n=(n=(n=(n=(n=n.concat(o.errors)).concat(function(e){var t=[],n=Object(a.filter)(e,(function(e){return Object(a.isRegExp)(e[c])}));return t=(t=(t=(t=(t=t.concat(C(n))).concat(b(n))).concat(O(n))).concat(S(n))).concat(w(n))}(i))).concat(N(i))).concat(A(i,t))).concat(M(i))}function y(e){var t=Object(a.filter)(e,(function(e){return!Object(a.has)(e,c)}));return{errors:Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:i.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[e]}})),valid:Object(a.difference)(e,t)}}function E(e){var t=Object(a.filter)(e,(function(e){var t=e[c];return!(Object(a.isRegExp)(t)||Object(a.isFunction)(t)||Object(a.has)(t,"exec")||Object(a.isString)(t))}));return{errors:Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:i.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[e]}})),valid:Object(a.difference)(e,t)}}var T=/[^\\][\$]/;function C(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return l(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(o.BaseRegExpVisitor),n=Object(a.filter)(e,(function(e){var n=e[c];try{var r=Object(u.getRegExpAst)(n),o=new t;return o.visit(r),o.found}catch(e){return T.test(n.source)}}));return Object(a.map)(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:i.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[e]}}))}function w(e){var t=Object(a.filter)(e,(function(e){return e[c].test("")}));return Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:i.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}))}var R=/[^\\[][\^]|^\^/;function b(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return l(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(o.BaseRegExpVisitor),n=Object(a.filter)(e,(function(e){var n=e[c];try{var r=Object(u.getRegExpAst)(n),o=new t;return o.visit(r),o.found}catch(e){return R.test(n.source)}}));return Object(a.map)(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:i.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[e]}}))}function O(e){var t=Object(a.filter)(e,(function(e){var t=e[c];return t instanceof RegExp&&(t.multiline||t.global)}));return Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:i.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}))}function S(e){var t=[],n=Object(a.map)(e,(function(n){return Object(a.reduce)(e,(function(e,r){return n.PATTERN.source!==r.PATTERN.source||Object(a.contains)(t,r)||r.PATTERN===i.Lexer.NA||(t.push(r),e.push(r)),e}),[])}));n=Object(a.compact)(n);var r=Object(a.filter)(n,(function(e){return e.length>1}));return Object(a.map)(r,(function(e){var t=Object(a.map)(e,(function(e){return e.name}));return{message:"The same RegExp pattern ->"+Object(a.first)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:i.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}))}function N(e){var t=Object(a.filter)(e,(function(e){if(!Object(a.has)(e,"GROUP"))return!1;var t=e.GROUP;return t!==i.Lexer.SKIPPED&&t!==i.Lexer.NA&&!Object(a.isString)(t)}));return Object(a.map)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:i.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}))}function A(e,t){var n=Object(a.filter)(e,(function(e){return void 0!==e.PUSH_MODE&&!Object(a.contains)(t,e.PUSH_MODE)}));return Object(a.map)(n,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist",type:i.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}))}function M(e){var t=[],n=Object(a.reduce)(e,(function(e,t,n){var r,o=t.PATTERN;return o===i.Lexer.NA||(Object(a.isString)(o)?e.push({str:o,idx:n,tokenType:t}):Object(a.isRegExp)(o)&&(r=o,void 0===Object(a.find)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(function(e){return-1!==r.source.indexOf(e)})))&&e.push({str:o.source,idx:n,tokenType:t})),e}),[]);return Object(a.forEach)(e,(function(e,r){Object(a.forEach)(n,(function(n){var o=n.str,s=n.idx,u=n.tokenType;if(r<s&&function(e,t){if(Object(a.isRegExp)(t)){var n=t.exec(e);return null!==n&&0===n.index}if(Object(a.isFunction)(t))return t(e,0,[],{});if(Object(a.has)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(o,e.PATTERN)){var l="Token: ->"+u.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";t.push({message:l,type:i.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[e,u]})}}))})),t}function k(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function _(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function I(e,t,n){var r=[];return Object(a.has)(e,f)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+f+"> property in its definition\n",type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(a.has)(e,h)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+h+"> property in its definition\n",type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(a.has)(e,h)&&Object(a.has)(e,f)&&!Object(a.has)(e.modes,e.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a "+f+": <"+e.defaultMode+">which does not exist\n",type:i.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(a.has)(e,h)&&Object(a.forEach)(e.modes,(function(e,t){Object(a.forEach)(e,(function(e,n){Object(a.isUndefined)(e)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+t+"> at index: <"+n+">\n",type:i.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}function x(e,t,n){var r=[],o=!1,u=Object(a.compact)(Object(a.flatten)(Object(a.mapValues)(e.modes,(function(e){return e})))),l=Object(a.reject)(u,(function(e){return e[c]===i.Lexer.NA})),f=H(n);return t&&Object(a.forEach)(l,(function(e){var t=U(e,f);if(!1!==t){var n={message:j(e,t),type:t.issue,tokenType:e};r.push(n)}else Object(a.has)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(o=!0):Object(s.canMatchCharCode)(f,e.PATTERN)&&(o=!0)})),t&&!o&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:i.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),r}function P(e){var t={},n=Object(a.keys)(e);return Object(a.forEach)(n,(function(n){var r=e[n];if(!Object(a.isArray)(r))throw Error("non exhaustive match");t[n]=[]})),t}function L(e){var t=e.PATTERN;if(Object(a.isRegExp)(t))return!1;if(Object(a.isFunction)(t))return!0;if(Object(a.has)(t,"exec"))return!0;if(Object(a.isString)(t))return!1;throw Error("non exhaustive match")}function D(e){return!(!Object(a.isString)(e)||1!==e.length)&&e.charCodeAt(0)}var F={test:function(e){for(var t=e.length,n=this.lastIndex;n<t;n++){var r=e.charCodeAt(n);if(10===r)return this.lastIndex=n+1,!0;if(13===r)return 10===e.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function U(e,t){if(Object(a.has)(e,"LINE_BREAKS"))return!1;if(Object(a.isRegExp)(e.PATTERN)){try{Object(s.canMatchCharCode)(t,e.PATTERN)}catch(e){return{issue:i.LexerDefinitionErrorType.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(Object(a.isString)(e.PATTERN))return!1;if(L(e))return{issue:i.LexerDefinitionErrorType.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function j(e,t){if(t.issue===i.LexerDefinitionErrorType.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+e.name+"> Token Type\n\t Root cause: "+t.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===i.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+e.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}function H(e){return Object(a.map)(e,(function(e){return Object(a.isString)(e)&&e.length>0?e.charCodeAt(0):e}))}function V(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var B=256;function W(e){return e<B?e:Y[e]}var Y=[]},function(e,t,n){"use strict";n.r(t),n.d(t,"first",(function(){return a})),n.d(t,"firstForSequence",(function(){return s})),n.d(t,"firstForBranching",(function(){return u})),n.d(t,"firstForTerminal",(function(){return l}));var r=n(42),o=n(53),i=n(165);function a(e){if(e instanceof o.NonTerminal)return a(e.referencedRule);if(e instanceof o.Terminal)return l(e);if(Object(i.isSequenceProd)(e))return s(e);if(Object(i.isBranchingProd)(e))return u(e);throw Error("non exhaustive match")}function s(e){for(var t,n=[],o=e.definition,s=0,u=o.length>s,l=!0;u&&l;)t=o[s],l=Object(i.isOptionalProd)(t),n=n.concat(a(t)),s+=1,u=o.length>s;return Object(r.uniq)(n)}function u(e){var t=Object(r.map)(e.definition,(function(e){return a(e)}));return Object(r.uniq)(Object(r.flatten)(t))}function l(e){return[e.terminalType]}},function(e,t,n){"use strict";n.r(t),n.d(t,"IN",(function(){return r}));var r="_~IN~_"},function(e,t,n){"use strict";n.r(t),n.d(t,"EOF_FOLLOW_KEY",(function(){return u})),n.d(t,"IN_RULE_RECOVERY_EXCEPTION",(function(){return l})),n.d(t,"InRuleRecoveryException",(function(){return c})),n.d(t,"Recoverable",(function(){return f})),n.d(t,"attemptInRepetitionRecovery",(function(){return h}));var r=n(89),o=n(42),i=n(103),a=n(326),s=n(73),u={},l="InRuleRecoveryException";function c(e){this.name=l,this.message=e}c.prototype=Error.prototype;var f=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(o.has)(e,"recoveryEnabled")?e.recoveryEnabled:s.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=h)},e.prototype.getTokenToInsert=function(e){var t=Object(r.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},e.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},e.prototype.tryInRepetitionRecovery=function(e,t,n,r){for(var a=this,s=this.findReSyncTokenType(),u=this.exportLexerState(),l=[],c=!1,f=this.LA(1),h=this.LA(1),d=function(){var e=a.LA(0),t=a.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:f,previous:e,ruleName:a.getCurrRuleFullName()}),n=new i.MismatchedTokenException(t,f,a.LA(0));n.resyncedTokens=Object(o.dropRight)(l),a.SAVE_ERROR(n)};!c;){if(this.tokenMatcher(h,r))return void d();if(n.call(this))return d(),void e.apply(this,t);this.tokenMatcher(h,s)?c=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,l))}this.importLexerState(u)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,n){return!1!==n&&(void 0!==e&&void 0!==t&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))))},e.prototype.getFollowsForInRuleRecovery=function(e,t){var n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new c("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Object(o.isEmpty)(t))return!1;var r=this.LA(1);return void 0!==Object(o.find)(t,(function(e){return n.tokenMatcher(r,e)}))},e.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return Object(o.contains)(n,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),n=2;;){var r=t.tokenType;if(Object(o.contains)(e,r))return r;t=this.LA(n),n++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return u;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(o.isEmpty)(this.LAST_EXPLICIT_RULE_STACK)||(t=Object(o.map)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),n=Object(o.map)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),Object(o.map)(t,(function(r,o){return 0===o?u:{ruleName:e.shortRuleNameToFullName(r),idxInCallingRule:n[o],inRule:e.shortRuleNameToFullName(t[o-1])}}))},e.prototype.flattenFollowSet=function(){var e=this,t=Object(o.map)(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)}));return Object(o.flatten)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===u)return[r.EOF];var t=e.ruleName+e.idxInCallingRule+a.IN+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,r.EOF)||t.push(e),t},e.prototype.reSyncTo=function(e){for(var t=[],n=this.LA(1);!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return Object(o.dropRight)(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,n,r,o,i,a){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Object(o.cloneArr)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return Object(o.isEmpty)(this.LAST_EXPLICIT_RULE_STACK)?Object(o.map)(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):Object(o.map)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function h(e,t,n,o,i,a,s){var u=this.getKeyForAutomaticLookahead(o,i),l=this.firstAfterRepMap[u];if(void 0===l){var c=this.getCurrRuleFullName();l=new a(this.getGAstProductions()[c],i).startWalking(),this.firstAfterRepMap[u]=l}var f=l.token,h=l.occurrence,d=l.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===f&&(f=r.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,s)&&this.tryInRepetitionRecovery(e,t,n,f)}},function(e,t,n){"use strict";n.r(t),n.d(t,"classNameFromInstance",(function(){return o})),n.d(t,"functionName",(function(){return a})),n.d(t,"defineNameProp",(function(){return s}));var r=n(42);function o(e){return a(e.constructor)}var i=/^\s*function\s*(\S*)\s*\(/;function a(e){var t=e.name;return t||e.toString().match(i)[1]}function s(e,t){var n=Object.getOwnPropertyDescriptor(e,"name");return!(!Object(r.isUndefined)(n)&&!n.configurable)&&(Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}},function(e,t,n){"use strict";n.r(t),n.d(t,"createSyntaxDiagramsCode",(function(){return o}));var r=n(234);function o(e,t){var n=void 0===t?{}:t,o=n.resourceBase,i=void 0===o?"https://unpkg.com/chevrotain@"+r.VERSION+"/diagrams/":o,a=n.css;return'\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset="utf-8">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n'+("\n<link rel='stylesheet' href='"+(void 0===a?"https://unpkg.com/chevrotain@"+r.VERSION+"/diagrams/diagrams.css":a)+"'>\n")+("\n<script src='"+i+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+i+"src/diagrams_builder.js'><\/script>\n<script src='"+i+"src/diagrams_behavior.js'><\/script>\n<script src='"+i+"src/main.js'><\/script>\n")+'\n<div id="diagrams" align="center"></div> \n'+("\n<script>\n window.serializedGrammar = "+JSON.stringify(e,null," ")+";\n<\/script>\n")+'\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n'}},function(e,t,n){"use strict";n.r(t),n.d(t,"RowAddress",(function(){return a}));n(20);var r=n(22),o=n(323);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sheet=t,this.row=n,this.type=r}var t,n,a;return t=e,a=[{key:"absolute",value:function(t,n){return new e(t,n,o.ReferenceType.ABSOLUTE)}},{key:"relative",value:function(t,n){return new e(t,n,o.ReferenceType.RELATIVE)}}],(n=[{key:"isRowAbsolute",value:function(){return this.type===o.ReferenceType.ABSOLUTE}},{key:"isRowRelative",value:function(){return this.type===o.ReferenceType.RELATIVE}},{key:"isAbsolute",value:function(){return this.type===o.ReferenceType.ABSOLUTE&&null!==this.sheet}},{key:"moved",value:function(t,n,r){return new e(null===this.sheet?null:t,this.row+r,this.type)}},{key:"shiftedByRows",value:function(t){return new e(this.sheet,this.row+t,this.type)}},{key:"toSimpleRowAddress",value:function(e){var t=Object(r.absoluteSheetReference)(this,e),n=this.row;return this.isRowRelative()&&(n=e.row+this.row),Object(r.simpleRowAddress)(t,n)}},{key:"shiftRelativeDimensions",value:function(t,n){var r=this.isRowRelative()?this.row+n:this.row;return new e(this.sheet,r,this.type)}},{key:"shiftAbsoluteDimensions",value:function(t,n){var r=this.isRowAbsolute()?this.row+n:this.row;return new e(this.sheet,r,this.type)}},{key:"withAbsoluteSheet",value:function(t){return new e(t,this.row,this.type)}},{key:"isInvalid",value:function(e){return this.toSimpleRowAddress(e).row<0}},{key:"hash",value:function(e){var t=e&&null!==this.sheet?"#".concat(this.sheet):"";switch(this.type){case o.ReferenceType.RELATIVE:return"".concat(t,"#ROWR").concat(this.row);case o.ReferenceType.ABSOLUTE:return"".concat(t,"#ROWA").concat(this.row)}}},{key:"unparse",value:function(e){var t=this.toSimpleRowAddress(e);if(!Object(r.invalidSimpleRowAddress)(t)){var n=this.type===o.ReferenceType.ABSOLUTE?"$":"";return"".concat(n).concat(t.row+1)}}},{key:"exceedsSheetSizeLimits",value:function(e){return this.row>=e}}])&&i(t.prototype,n),a&&i(t,a),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ParserWithCaching",(function(){return v})),n.d(t,"bindWhitespacesToTokens",(function(){return g}));n(41),n(83),n(20),n(19),n(34),n(63),n(74),n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(25),n(23);var r=n(193),o=n(22),i=n(69),a=n(102),s=n(95),u=n(332),l=n(632),c=n(241),f=n(163),h=n(242);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var v=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.functionRegistry=n,this.sheetMapping=r,this.statsCacheUsed=0,this.lexerConfig=Object(f.buildLexerConfig)(t),this.lexer=new c.FormulaLexer(this.lexerConfig),this.formulaParser=new c.FormulaParser(this.lexerConfig,this.sheetMapping),this.cache=new l.Cache(this.functionRegistry)}var t,n,p;return t=e,(n=[{key:"parse",value:function(e,t){var n=this.lexer.tokenizeFormula(e);if(n.errors.length>0){var r=n.errors.map((function(e){return{type:s.ParsingErrorType.LexingError,message:e.message}}));return{ast:Object(i.buildParsingErrorAst)(),errors:r,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}var o=this.computeHashFromTokens(n.tokens,t),a=this.cache.get(o);if(a)++this.statsCacheUsed;else{var u=g(n.tokens),l=this.formulaParser.parseFromTokens(u,t);if(l.errors.length>0)return Object.assign(Object.assign({},l),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});a=this.cache.set(o,l.ast)}var c=a;return{ast:c.ast,errors:[],hasVolatileFunction:c.hasVolatileFunction,hasStructuralChangeFunction:c.hasStructuralChangeFunction,dependencies:c.relativeDependencies}}},{key:"fetchCachedResultForAst",value:function(e){var t=this.computeHashFromAst(e);return this.fetchCachedResult(t)}},{key:"fetchCachedResult",value:function(e){var t=this.cache.get(e);if(null===t)throw new Error("There is no AST with such key in the cache");return{ast:t.ast,errors:[],hasVolatileFunction:t.hasVolatileFunction,hasStructuralChangeFunction:t.hasStructuralChangeFunction,dependencies:t.relativeDependencies}}},{key:"computeHashFromTokens",value:function(e,t){for(var n,o="",i=0;i<e.length;){var s=e[i];if(Object(r.tokenMatcher)(s,f.CellReference)){var u=Object(a.cellAddressFromString)(this.sheetMapping,s.image,t);o=void 0===u?o.concat(s.image):o.concat(u.hash(!0))}else if(Object(r.tokenMatcher)(s,f.ProcedureName)){var l=s.image.toUpperCase().slice(0,-1),c=null!==(n=this.lexerConfig.functionMapping[l])&&void 0!==n?n:l;o=o.concat(c,"(")}else if(Object(r.tokenMatcher)(s,f.ColumnRange)){var h=d(s.image.split(":"),2),p=h[0],m=h[1],v=Object(a.columnAddressFromString)(this.sheetMapping,p,t),g=Object(a.columnAddressFromString)(this.sheetMapping,m,t);o=void 0===v||void 0===g?o.concat("!REF"):o.concat(v.hash(!0),":",g.hash(!0))}else if(Object(r.tokenMatcher)(s,f.RowRange)){var y=d(s.image.split(":"),2),E=y[0],T=y[1],C=Object(a.rowAddressFromString)(this.sheetMapping,E,t),w=Object(a.rowAddressFromString)(this.sheetMapping,T,t);o=void 0===C||void 0===w?o.concat("!REF"):o.concat(C.hash(!0),":",w.hash(!0))}else o=o.concat(s.image);i++}return o}},{key:"rememberNewAst",value:function(e){var t=this.computeHashFromAst(e);return this.cache.maybeSetAndThenGet(t,e)}},{key:"computeHashFromAst",value:function(e){return"="+this.computeHashOfAstNode(e)}},{key:"destroy",value:function(){this.cache.destroy()}},{key:"computeHashOfAstNode",value:function(e){var t=this;switch(e.type){case i.AstNodeType.EMPTY:return e.leadingWhitespace||"";case i.AstNodeType.NUMBER:return Object(s.imageWithWhitespace)(Object(h.formatNumber)(e.value,this.config.decimalSeparator),e.leadingWhitespace);case i.AstNodeType.STRING:return Object(s.imageWithWhitespace)('"'+e.value+'"',e.leadingWhitespace);case i.AstNodeType.NAMED_EXPRESSION:return Object(s.imageWithWhitespace)(e.expressionName,e.leadingWhitespace);case i.AstNodeType.FUNCTION_CALL:var n=e.args.map((function(e){return t.computeHashOfAstNode(e)})).join(this.config.functionArgSeparator),r=e.procedureName+"("+n+Object(s.imageWithWhitespace)(")",e.internalWhitespace);return Object(s.imageWithWhitespace)(r,e.leadingWhitespace);case i.AstNodeType.CELL_REFERENCE:return Object(s.imageWithWhitespace)(e.reference.hash(!0),e.leadingWhitespace);case i.AstNodeType.COLUMN_RANGE:case i.AstNodeType.ROW_RANGE:case i.AstNodeType.CELL_RANGE:var a=e.start.hash(e.sheetReferenceType!==s.RangeSheetReferenceType.RELATIVE),l=e.end.hash(e.sheetReferenceType===s.RangeSheetReferenceType.BOTH_ABSOLUTE);return Object(s.imageWithWhitespace)(a+":"+l,e.leadingWhitespace);case i.AstNodeType.MINUS_UNARY_OP:return Object(s.imageWithWhitespace)("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case i.AstNodeType.PLUS_UNARY_OP:return Object(s.imageWithWhitespace)("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case i.AstNodeType.PERCENT_OP:return this.computeHashOfAstNode(e.value)+Object(s.imageWithWhitespace)("%",e.leadingWhitespace);case i.AstNodeType.ERROR:var c=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:o.ErrorType.ERROR);return Object(s.imageWithWhitespace)(c,e.leadingWhitespace);case i.AstNodeType.ERROR_WITH_RAW_INPUT:return Object(s.imageWithWhitespace)(e.rawInput,e.leadingWhitespace);case i.AstNodeType.PARENTHESIS:var f="("+this.computeHashOfAstNode(e.expression)+Object(s.imageWithWhitespace)(")",e.internalWhitespace);return Object(s.imageWithWhitespace)(f,e.leadingWhitespace);default:return this.computeHashOfAstNode(e.left)+Object(s.imageWithWhitespace)(u.binaryOpTokenMap[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}}])&&m(t.prototype,n),p&&m(t,p),e}();function g(e){var t=[],n=e[0];Object(r.tokenMatcher)(n,f.WhiteSpace)||t.push(n);for(var o=1;o<e.length;++o){var i=e[o];if(!Object(r.tokenMatcher)(i,f.WhiteSpace)){var a=e[o-1];Object(r.tokenMatcher)(a,f.WhiteSpace)&&(i.leadingWhitespace=a),t.push(i)}}return t}},function(e,t,n){"use strict";n.r(t),n.d(t,"binaryOpTokenMap",(function(){return a}));var r,o=n(95);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var a=(i(r={},o.AstNodeType.PLUS_OP,"+"),i(r,o.AstNodeType.MINUS_OP,"-"),i(r,o.AstNodeType.TIMES_OP,"*"),i(r,o.AstNodeType.DIV_OP,"/"),i(r,o.AstNodeType.CONCATENATE_OP,"&"),i(r,o.AstNodeType.POWER_OP,"^"),i(r,o.AstNodeType.EQUALS_OP,"="),i(r,o.AstNodeType.NOT_EQUAL_OP,"<>"),i(r,o.AstNodeType.GREATER_THAN_OP,">"),i(r,o.AstNodeType.GREATER_THAN_OR_EQUAL_OP,">="),i(r,o.AstNodeType.LESS_THAN_OP,"<"),i(r,o.AstNodeType.LESS_THAN_OR_EQUAL_OP,"<="),r)},function(e,t,n){var r=n(29),o=n(62),i=n(67),a=n(78),s=n(109),u=n(186);r({target:"Reflect",stat:!0},{get:function e(t,n){var r,l,c=arguments.length<3?t:arguments[2];return i(t)===c?t[n]:(r=s.f(t,n))?a(r,"value")?r.value:void 0===r.get?void 0:r.get.call(c):o(l=u(t))?e(l,n,c):void 0}})},function(e,t,n){"use strict";n.r(t),n.d(t,"collectDependencies",(function(){return o}));n(27);var r=n(69),o=function(e,t){var n=new Array;return function e(t,n,o,i){switch(t.type){case r.AstNodeType.EMPTY:case r.AstNodeType.NUMBER:case r.AstNodeType.STRING:case r.AstNodeType.ERROR:return;case r.AstNodeType.NAMED_EXPRESSION:return void(i&&o.push(new r.NamedExpressionDependency(t.expressionName)));case r.AstNodeType.CELL_REFERENCE:return void(i&&o.push(new r.AddressDependency(t.reference)));case r.AstNodeType.CELL_RANGE:return void(i&&t.start.sheet===t.end.sheet&&o.push(new r.CellRangeDependency(t.start,t.end)));case r.AstNodeType.COLUMN_RANGE:return void(i&&t.start.sheet===t.end.sheet&&o.push(new r.ColumnRangeDependency(t.start,t.end)));case r.AstNodeType.ROW_RANGE:return void(i&&t.start.sheet===t.end.sheet&&o.push(new r.RowRangeDependency(t.start,t.end)));case r.AstNodeType.PERCENT_OP:case r.AstNodeType.PLUS_UNARY_OP:case r.AstNodeType.MINUS_UNARY_OP:return void e(t.value,n,o,!0);case r.AstNodeType.CONCATENATE_OP:case r.AstNodeType.EQUALS_OP:case r.AstNodeType.NOT_EQUAL_OP:case r.AstNodeType.LESS_THAN_OP:case r.AstNodeType.GREATER_THAN_OP:case r.AstNodeType.LESS_THAN_OR_EQUAL_OP:case r.AstNodeType.GREATER_THAN_OR_EQUAL_OP:case r.AstNodeType.MINUS_OP:case r.AstNodeType.PLUS_OP:case r.AstNodeType.TIMES_OP:case r.AstNodeType.DIV_OP:case r.AstNodeType.POWER_OP:return e(t.left,n,o,!0),void e(t.right,n,o,!0);case r.AstNodeType.PARENTHESIS:return void e(t.expression,n,o,i);case r.AstNodeType.FUNCTION_CALL:var a=!n.doesFunctionNeedArgumentToBeComputed(t.procedureName);return void t.args.forEach((function(t){return e(t,n,o,a)}))}}(e,t,n,!0),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"EmptyStatistics",(function(){return c}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);function r(e){return(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})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,r,u=s(l);function l(){return o(this,l),u.apply(this,arguments)}return t=l,(n=[{key:"incrementCriterionFunctionFullCacheUsed",value:function(){}},{key:"incrementCriterionFunctionPartialCacheUsed",value:function(){}},{key:"start",value:function(e){}},{key:"end",value:function(e){}}])&&i(t.prototype,n),r&&i(t,r),l}(n(243).Statistics)},function(e,t,n){"use strict";n.r(t),n.d(t,"EmptyCellVertex",(function(){return i}));var r=n(50);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=t}var t,n,i;return t=e,(n=[{key:"getCellValue",value:function(){return r.EmptyValue}}])&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(t),n.d(t,"ValueCellVertex",(function(){return o}));
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var o=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parsedValue=t,this.rawValue=n}var t,n,o;return t=e,(n=[{key:"getValues",value:function(){return{parsedValue:this.parsedValue,rawValue:this.rawValue}}},{key:"setValues",value:function(e){this.parsedValue=e.parsedValue,this.rawValue=e.rawValue}},{key:"getCellValue",value:function(){return this.parsedValue}},{key:"setCellValue",value:function(e){throw"SetCellValue is deprecated for ValueCellVertex"}}])&&r(t.prototype,n),o&&r(t,o),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ParsingErrorVertex",(function(){return i}));var r=n(22);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errors=t,this.rawInput=n}var t,n,i;return t=e,(n=[{key:"getCellValue",value:function(){return r.CellError.parsingError()}},{key:"getFormula",value:function(){return this.rawInput}}])&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"Config",(function(){return g}));n(3),n(1),n(2),n(9),n(4),n(27),n(83),n(20),n(37),n(47),n(74),n(41),n(33),n(25),n(70),n(8),n(10),n(11),n(19),n(23);var r=n(341),o=n(169),i=n(642),a=n(36),s=n(259),u=n(170),l=n(668);function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e){return(h="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})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var m=["gpu","cpu","dev"],v=new WeakMap,g=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.accentSensitive,r=t.caseSensitive,i=t.caseFirst,s=t.chooseAddressMappingPolicy,c=t.dateFormats,f=t.timeFormats,h=t.functionArgSeparator,p=t.decimalSeparator,g=t.thousandSeparator,y=t.language,E=t.licenseKey,T=t.functionPlugins,C=t.gpujs,w=t.gpuMode,R=t.ignorePunctuation,b=t.leapYear1900,O=t.localeLang,S=t.smartRounding,N=t.matrixDetection,A=t.matrixDetectionThreshold,M=t.evaluateNullToZero,k=t.nullYear,_=t.parseDateTime,I=t.stringifyDateTime,x=t.stringifyDuration,P=t.precisionEpsilon,L=t.precisionRounding,D=t.useColumnIndex,F=t.binarySearchThreshold,U=t.nullDate,j=t.useStats,H=t.undoLimit,V=t.useRegularExpressions,B=t.useWildcards,W=t.matchWholeCell,Y=t.maxRows,G=t.maxColumns,z=t.currencySymbol;d(this,e),this.accentSensitive=this.valueFromParam(n,"boolean","accentSensitive"),this.caseSensitive=this.valueFromParam(r,"boolean","caseSensitive"),this.caseFirst=this.valueFromParam(i,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=this.valueFromParam(R,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!=s?s:e.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=this.valueFromParamCheck(c,Array.isArray,"array","dateFormats"),this.timeFormats=this.valueFromParamCheck(f,Array.isArray,"array","timeFormats"),this.functionArgSeparator=this.valueFromParam(h,"string","functionArgSeparator"),this.decimalSeparator=this.valueFromParam(p,[".",","],"decimalSeparator"),this.language=this.valueFromParam(y,"string","language"),this.licenseKey=this.valueFromParam(E,"string","licenseKey"),this.thousandSeparator=this.valueFromParam(g,["",","," ","."],"thousandSeparator"),this.localeLang=this.valueFromParam(O,"string","localeLang"),this.functionPlugins=null!=T?T:e.defaultConfig.functionPlugins,this.gpujs=null!=C?C:e.defaultConfig.gpujs,this.gpuMode=this.valueFromParam(w,m,"gpuMode"),this.smartRounding=this.valueFromParam(S,"boolean","smartRounding"),this.matrixDetection=this.valueFromParam(N,"boolean","matrixDetection"),this.matrixDetectionThreshold=this.valueFromParam(A,"number","matrixDetectionThreshold"),this.validateNumberToBeAtLeast(this.matrixDetectionThreshold,"matrixDetectionThreshold",1),this.evaluateNullToZero=this.valueFromParam(M,"boolean","evaluateNullToZero"),this.nullYear=this.valueFromParam(k,"number","nullYear"),this.validateNumberToBeAtLeast(this.nullYear,"nullYear",0),this.validateNumberToBeAtMost(this.nullYear,"nullYear",100),this.precisionRounding=this.valueFromParam(L,"number","precisionRounding"),this.validateNumberToBeAtLeast(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=this.valueFromParam(P,"number","precisionEpsilon"),this.validateNumberToBeAtLeast(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=this.valueFromParam(D,"boolean","useColumnIndex"),this.useStats=this.valueFromParam(j,"boolean","useStats"),this.binarySearchThreshold=this.valueFromParam(F,"number","binarySearchThreshold"),this.validateNumberToBeAtLeast(this.binarySearchThreshold,"binarySearchThreshold",1),this.parseDateTime=this.valueFromParam(_,"function","parseDateTime"),this.stringifyDateTime=this.valueFromParam(I,"function","stringifyDateTime"),this.stringifyDuration=this.valueFromParam(x,"function","stringifyDuration"),this.translationPackage=u.HyperFormula.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=this.valueFromParamCheck(U,o.instanceOfSimpleDate,"IDate","nullDate"),this.leapYear1900=this.valueFromParam(b,"boolean","leapYear1900"),this.undoLimit=this.valueFromParam(H,"number","undoLimit"),this.useRegularExpressions=this.valueFromParam(V,"boolean","useRegularExpressions"),this.useWildcards=this.valueFromParam(B,"boolean","useWildcards"),this.matchWholeCell=this.valueFromParam(W,"boolean","matchWholeCell"),this.validateNumberToBeAtLeast(this.undoLimit,"undoLimit",0),this.maxRows=this.valueFromParam(Y,"number","maxRows"),this.validateNumberToBeAtLeast(this.maxRows,"maxRows",1),this.maxColumns=this.valueFromParam(G,"number","maxColumns"),this.currencySymbol=this.valueFromParamCheck(z,Array.isArray,"array","currencySymbol"),this.currencySymbol.forEach((function(e){if("string"!=typeof e)throw new a.ExpectedValueOfTypeError("string[]","currencySymbol");if(""===e)throw new a.ConfigValueEmpty("currencySymbol")})),this.validateNumberToBeAtLeast(this.maxColumns,"maxColumns",1),v.set(this,{licenseKeyValidityState:Object(l.checkLicenseKeyValidity)(this.licenseKey)}),this.checkIfParametersNotInConflict({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"})}var t,n,r;return t=e,(n=[{key:"licenseKeyValidityState",get:function(){return v.get(this).licenseKeyValidityState}},{key:"getConfig",value:function(){return this}},{key:"mergeConfig",value:function(t){return new e(Object.assign({},this.getConfig(),t))}},{key:"warnDeprecatedIfUsed",value:function(e,t,n,r){void 0!==e&&console.warn("".concat(t," option is deprecated since ").concat(n,", please use ").concat(r))}},{key:"valueFromParam",value:function(t,n,r){if(void 0===t)return e.defaultConfig[r];if("string"==typeof n){if(h(t)===n)return t;throw new a.ExpectedValueOfTypeError(n,r)}if(n.includes(t))return t;throw new a.ExpectedOneOfValuesError(n.map((function(e){return"'"+e+"'"})).join(" "),r)}},{key:"valueFromParamCheck",value:function(t,n,r,o){if(n(t))return t;if(void 0===t)return e.defaultConfig[o];throw new a.ExpectedValueOfTypeError(r,o)}},{key:"checkIfParametersNotInConflict",value:function(){for(var e=new Map,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){var n=e.get(t.value)||[];n.push(t.name),e.set(t.value,n)}));var o,i=[],a=c(e.values());try{for(a.s();!(o=a.n()).done;){var s=o.value;s.length>1&&i.push(s)}}catch(e){a.e(e)}finally{a.f()}if(i.length>0){i.forEach((function(e){return e.sort()}));var u=i.map((function(e){return"[".concat(e,"]")})).join("; ");throw new Error("Config initialization failed. Parameters in conflict: ".concat(u))}}},{key:"validateNumberToBeAtLeast",value:function(e,t,n){if(e<n)throw new a.ConfigValueTooSmallError(t,n)}},{key:"validateNumberToBeAtMost",value:function(e,t,n){if(e>n)throw new a.ConfigValueTooBigError(t,n)}}])&&p(t.prototype,n),r&&p(t,r),e}();g.defaultConfig={accentSensitive:!1,caseSensitive:!1,caseFirst:"lower",ignorePunctuation:!1,chooseAddressMappingPolicy:new i.AlwaysDense,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],functionArgSeparator:",",decimalSeparator:".",thousandSeparator:"",language:"enGB",licenseKey:"",functionPlugins:[],gpujs:void 0,gpuMode:"gpu",leapYear1900:!1,smartRounding:!0,localeLang:"en",matrixDetection:!0,matrixDetectionThreshold:100,evaluateNullToZero:!1,nullYear:30,parseDateTime:r.defaultParseToDateTime,stringifyDateTime:s.defaultStringifyDateTime,stringifyDuration:s.defaultStringifyDuration,precisionEpsilon:1e-13,precisionRounding:14,useColumnIndex:!1,useStats:!1,binarySearchThreshold:20,nullDate:{year:1899,month:12,day:30},undoLimit:20,useRegularExpressions:!1,useWildcards:!0,matchWholeCell:!0,maxRows:4e4,maxColumns:18278,currencySymbol:["$"]}},function(e,t,n){"use strict";var r=n(229),o=n(162).getWeakData,i=n(67),a=n(62),s=n(227),u=n(226),l=n(124),c=n(78),f=n(117),h=f.set,d=f.getterFor,p=l.find,m=l.findIndex,v=0,g=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},E=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=E(this,e);if(t)return t[1]},has:function(e){return!!E(this,e)},set:function(e,t){var n=E(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=m(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var f=e((function(e,r){s(e,f,t),h(e,{type:t,id:v++,frozen:void 0}),null!=r&&u(r,e[l],{that:e,AS_ENTRIES:n})})),p=d(t),m=function(e,t,n){var r=p(e),a=o(i(t),!0);return!0===a?g(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=p(this);if(!a(e))return!1;var n=o(e);return!0===n?g(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!a(e))return!1;var n=o(e);return!0===n?g(t).has(e):n&&c(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=p(this);if(a(e)){var n=o(e);return!0===n?g(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return m(this,e,t)}}:{add:function(e){return m(this,e,!0)}}),f}}},function(e,t,n){"use strict";n.r(t),n.d(t,"defaultParseToDateTime",(function(){return r})),n.d(t,"secondsExtendedRegexp",(function(){return o}));n(111),n(34),n(61),n(63),n(37),n(47),n(19),n(83),n(258),n(48);
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
function r(e,t,n){var r=(e=e.replace(/\s\s+/g," ").trim().toLowerCase()).substring(e.length-2);"am"===r||"pm"===r?e=e.substring(0,e.length-2).trim():"a"===(r=e.substring(e.length-1))||"p"===r?e=e.substring(0,e.length-1).trim():r=void 0;var o=e.split(/[ /.-]/g);o.length>=2&&o[o.length-2].includes(":")&&(o[o.length-2]=o[o.length-2]+"."+o[o.length-1],o.pop());var s=o[o.length-1].split(":");if(void 0!==r&&s.push(r),1===o.length)return i(s,n);if(1===s.length)return a(o,t);var u=a(o.slice(0,o.length-1),t),l=i(s,n);return void 0===u||void 0===l?void 0:Object.assign(Object.assign({},u),l)}var o=/^ss\.(s+|0+)$/;function i(e,t){if(void 0!==t){(t=t.toLowerCase()).endsWith("am/pm")?t=t.substring(0,t.length-5).trim():t.endsWith("a/p")&&(t=t.substring(0,t.length-3).trim());var n=t.split(":"),r=void 0;"am"===e[e.length-1]||"a"===e[e.length-1]?(r=!1,e.pop()):"pm"!==e[e.length-1]&&"p"!==e[e.length-1]||(r=!0,e.pop());var i=0;if(n.length>=1&&o.test(n[n.length-1])&&(i=n[n.length-1].length-3,n[n.length-1]="ss"),e.length===n.length){var a=n.indexOf("hh"),s=n.indexOf("mm"),u=n.indexOf("ss"),l=-1!==a?e[a]:"0";if(/^\d+$/.test(l)){var c=Number(l);if(void 0!==r){if(c<0||c>12)return;c%=12,r&&(c+=12)}var f=-1!==s?e[s]:"0";if(/^\d+$/.test(f)){var h=Number(f),d=-1!==u?e[u]:"0";if(/^\d+(\.\d+)?$/.test(d)){var p=Number(d);return{hours:c,minutes:h,seconds:p=Math.round(p*Math.pow(10,i))/Math.pow(10,i)}}}}}}}function a(e,t){if(void 0!==t){var n=t.toLowerCase().split(/[ /.-]/g);if(e.length===n.length){var r=n.indexOf("mm"),o=n.indexOf("dd"),i=n.indexOf("yyyy"),a=n.indexOf("yy");if(r in e&&o in e&&(i in e||a in e)&&(!(i in e)||!(a in e))){var s;if(i in e){var u=e[i];if(!/^\d+$/.test(u))return;if((s=Number(u))<1e3||s>9999)return}else{var l=e[a];if(!/^\d+$/.test(l))return;if((s=Number(l))<0||s>99)return}var c=e[r];if(/^\d+$/.test(c)){var f=Number(c),h=e[o];if(/^\d+$/.test(h))return{year:s,month:f,day:Number(h)}}}}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"ClipboardCellType",(function(){return o})),n.d(t,"ClipboardOperations",(function(){return h}));n(72);var r,o,i=n(79),a=n(22),s=n(36);function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/!function(e){e[e.COPY=0]="COPY",e[e.CUT=1]="CUT"}(r||(r={})),function(e){e[e.VALUE=0]="VALUE",e[e.EMPTY=1]="EMPTY",e[e.FORMULA=2]="FORMULA",e[e.PARSING_ERROR=3]="PARSING_ERROR"}(o||(o={}));var f=function(){function e(t,n,r,o,i){u(this,e),this.sourceLeftCorner=t,this.width=n,this.height=r,this.type=o,this.content=i}return c(e,[{key:"getContent",value:regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==this.content){e.next=4;break}return e.abrupt("return");case 4:n=0;case 5:if(!(n<this.height)){e.next=16;break}r=0;case 7:if(!(r<this.width)){e.next=13;break}return e.next=10,[Object(a.simpleCellAddress)(t.sheet,t.col+r,t.row+n),this.content[n][r]];case 10:++r,e.next=7;break;case 13:++n,e.next=5;break;case 16:case"end":return e.stop()}}),e,this)}))}]),e}(),h=function(){function e(t,n,r,o,i){u(this,e),this.dependencyGraph=t,this.operations=n,this.parser=r,this.lazilyTransformingAstService=o,this.config=i}return c(e,[{key:"cut",value:function(e,t,n){this.clipboard=new f(e,t,n,r.CUT)}},{key:"copy",value:function(e,t,n){for(var o=[],i=0;i<n;++i){o[i]=[];for(var s=0;s<t;++s){var u=this.operations.getClipboardCell(Object(a.simpleCellAddress)(e.sheet,e.col+s,e.row+i));o[i].push(u)}}this.clipboard=new f(e,t,n,r.COPY,o)}},{key:"abortCut",value:function(){this.clipboard&&this.clipboard.type===r.CUT&&this.clear()}},{key:"clear",value:function(){this.clipboard=void 0}},{key:"ensureItIsPossibleToCopyPaste",value:function(e){if(void 0!==this.clipboard){if(Object(a.invalidSimpleCellAddress)(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new s.InvalidArgumentsError("a valid target address.");var t=i.AbsoluteCellRange.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.config.maxColumns,this.config.maxRows))throw new s.SheetSizeLimitExceededError;if(this.dependencyGraph.matrixMapping.isFormulaMatrixInRange(t))throw new Error("It is not possible to paste onto matrix")}}},{key:"isCutClipboard",value:function(){return void 0!==this.clipboard&&this.clipboard.type===r.CUT}},{key:"isCopyClipboard",value:function(){return void 0!==this.clipboard&&this.clipboard.type===r.COPY}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ContentChanges",(function(){return u}));n(27),n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(23),n(19),n(25);function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.changes=[]}var t,n,a;return t=e,a=[{key:"empty",value:function(){return new e}}],(n=[{key:"addAll",value:function(e){var t;return(t=this.changes).push.apply(t,o(e.changes)),this}},{key:"addMatrixChange",value:function(e,t){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}(e.generateValues(t));try{for(o.s();!(n=o.n()).done;){var a=r(n.value,2),s=a[0],u=a[1];this.addSingleCellValue(s,u)}}catch(e){o.e(e)}finally{o.f()}}},{key:"addChange",value:function(e,t){this.addSingleCellValue(e,t)}},{key:"add",value:function(){var e;(e=this.changes).push.apply(e,arguments)}},{key:"exportChanges",value:function(e){var t=this,n=[];return this.changes.forEach((function(r,o){n[o]=e.exportChange(t.changes[o])})),n}},{key:"getChanges",value:function(){return this.changes}},{key:"isEmpty",value:function(){return this.changes===[]}},{key:"addSingleCellValue",value:function(e,t){this.add({sheet:t.sheet,col:t.col,row:t.row,value:e})}}])&&s(t.prototype,n),a&&s(t,a),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"AddRowsTransformer",(function(){return c}));n(83),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22);function o(e){return(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})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,o,u=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this)).rowsSpan=e,t}return t=l,(n=[{key:"sheet",get:function(){return this.rowsSpan.sheet}},{key:"isIrreversible",value:function(){return!1}},{key:"transformColumnRangeAst",value:function(e,t){return e}},{key:"transformCellRange",value:function(e,t,n){return this.transformRange(e,t,n)}},{key:"transformRowRange",value:function(e,t,n){return this.transformRange(e,t,n)}},{key:"transformColumnRange",value:function(e,t,n){throw Error("Not implemented")}},{key:"transformCellAddress",value:function(e,t){var n=Object(r.absoluteSheetReference)(e,t);if(n!==this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)return!1;var o=e.toSimpleRowAddress(t);return n===this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet?this.rowsSpan.rowStart<=o.row&&e.shiftedByRows(this.rowsSpan.numberOfRows):t.sheet===this.rowsSpan.sheet&&n!==this.rowsSpan.sheet?!e.isRowAbsolute()&&!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows):e.isRowAbsolute()?!(e.row<this.rowsSpan.rowStart)&&e.shiftedByRows(this.rowsSpan.numberOfRows):o.row<this.rowsSpan.rowStart?!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows):t.row<this.rowsSpan.rowStart&&e.shiftedByRows(this.rowsSpan.numberOfRows)}},{key:"fixNodeAddress",value:function(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row+this.rowsSpan.numberOfRows}):e}},{key:"transformRange",value:function(e,t,n){var o=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return o===r.ErrorType.REF||i===r.ErrorType.REF?r.ErrorType.REF:!(!o&&!i)&&[o||e,i||t]}}])&&i(t.prototype,n),o&&i(t,o),l}(n(128).Transformer)},function(e,t,n){"use strict";n.r(t),n.d(t,"RemoveRowsTransformer",(function(){return c}));n(83),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22);function o(e){return(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})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,o,u=s(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this)).rowsSpan=e,t}return t=l,(n=[{key:"sheet",get:function(){return this.rowsSpan.sheet}},{key:"isIrreversible",value:function(){return!0}},{key:"transformColumnRangeAst",value:function(e,t){return e}},{key:"transformCellAddress",value:function(e,t){var n=Object(r.absoluteSheetReference)(e,t);if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet!==n)return!1;if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet===n){var o=e.toSimpleRowAddress(t);if(o.row<this.rowsSpan.rowStart)return!1;if(o.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet!==n){if(e.isRowAbsolute())return!1;if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet===n)if(e.isRowAbsolute()){if(e.row<this.rowsSpan.rowStart)return!1;if(e.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}else{var i=e.toSimpleRowAddress(t);if(i.row<this.rowsSpan.rowStart){if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}else if(i.row>this.rowsSpan.rowEnd){if(t.row<this.rowsSpan.rowStart)return e.shiftedByRows(-this.rowsSpan.numberOfRows);if(t.row>this.rowsSpan.rowEnd)return!1}}return r.ErrorType.REF}},{key:"transformCellRange",value:function(e,t,n){return this.transformRange(e,t,n)}},{key:"transformRowRange",value:function(e,t,n){return this.transformRange(e,t,n)}},{key:"transformColumnRange",value:function(e,t,n){throw Error("Not implemented")}},{key:"fixNodeAddress",value:function(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row-this.rowsSpan.numberOfRows}):e}},{key:"transformRange",value:function(e,t,n){var o=Object(r.absoluteSheetReference)(e,n),i=e,a=t;if(this.rowsSpan.sheet===o){var s=e.toSimpleRowAddress(n),u=t.toSimpleRowAddress(n);if(this.rowsSpan.rowStart<=s.row&&this.rowsSpan.rowEnd>=u.row)return r.ErrorType.REF;s.row>=this.rowsSpan.rowStart&&s.row<=this.rowsSpan.rowEnd&&(i=e.shiftedByRows(this.rowsSpan.rowEnd-s.row+1)),u.row>=this.rowsSpan.rowStart&&u.row<=this.rowsSpan.rowEnd&&(a=t.shiftedByRows(-(u.row-this.rowsSpan.rowStart+1)))}var l=this.transformCellAddress(i,n),c=this.transformCellAddress(a,n);if(!1===l&&!1===c)return[i,a];if(l===r.ErrorType.REF||c===r.ErrorType.REF)throw Error("Cannot happen");return[l||i,c||a]}}])&&i(t.prototype,n),o&&i(t,o),l}(n(128).Transformer)},function(e,t,n){"use strict";n.r(t),n.d(t,"GraphBuilder",(function(){return v})),n.d(t,"SimpleStrategy",(function(){return g})),n.d(t,"MatrixDetectionStrategy",(function(){return y})),n.d(t,"buildMatrixVertex",(function(){return E}));n(27),n(3),n(33),n(1),n(2),n(4),n(120),n(48),n(19),n(25),n(23),n(8),n(10),n(11);var r=n(197),o=n(22),i=n(141),a=n(50),s=n(101),u=n(651),l=n(127),c=n(119);function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var v=function(){function e(t,n,r,o,i,a){d(this,e),this.dependencyGraph=t,this.columnSearch=n,this.parser=r,this.cellContentParser=o,this.config=i,this.stats=a,this.config.matrixDetection?this.buildStrategy=new y(this.dependencyGraph,this.columnSearch,this.parser,this.stats,i.matrixDetectionThreshold,this.cellContentParser):this.buildStrategy=new g(this.dependencyGraph,this.columnSearch,this.parser,this.stats,this.cellContentParser)}return m(e,[{key:"buildGraph",value:function(e){var t=this.buildStrategy.run(e);this.processDependencies(t)}},{key:"processDependencies",value:function(e){var t=this;e.forEach((function(e,n){t.dependencyGraph.processCellDependencies(e,n)}))}}]),e}(),g=function(){function e(t,n,r,o,i){d(this,e),this.dependencyGraph=t,this.columnIndex=n,this.parser=r,this.stats=o,this.cellContentParser=i}return m(e,[{key:"run",value:function(e){var t=this,n=new Map;for(var u in e)for(var l=this.dependencyGraph.getSheetId(u),f=e[u],h=0;h<f.length;++h)for(var d=f[h],p=function(e){var u=d[e],f=Object(o.simpleCellAddress)(l,e,h),p=t.cellContentParser.parse(u);if(p instanceof i.CellContent.MatrixFormula){if(t.dependencyGraph.existsVertex(f))return"continue";var m=t.stats.measure(c.StatType.PARSER,(function(){return t.parser.parse(p.formula,f)}));if(m.errors.length>0){var v=new s.ParsingErrorVertex(m.errors,p.formulaWithBraces());t.dependencyGraph.addVertex(f,v)}else{var g=E(m.ast,f);n.set(g,Object(r.absolutizeDependencies)(m.dependencies,f)),t.dependencyGraph.addMatrixVertex(f,g)}}else if(p instanceof i.CellContent.Formula){var y=t.stats.measure(c.StatType.PARSER,(function(){return t.parser.parse(p.formula,f)}));if(y.errors.length>0){var T=new s.ParsingErrorVertex(y.errors,p.formula);t.dependencyGraph.addVertex(f,T)}else{var C=new s.FormulaCellVertex(y.ast,f,0);n.set(C,Object(r.absolutizeDependencies)(y.dependencies,f)),t.dependencyGraph.addVertex(f,C),y.hasVolatileFunction&&t.dependencyGraph.markAsVolatile(C),y.hasStructuralChangeFunction&&t.dependencyGraph.markAsDependentOnStructureChange(C)}}else if(p instanceof i.CellContent.Empty);else{var w=new s.ValueCellVertex(p.value,u);t.columnIndex.add(Object(a.getRawValue)(p.value),f),t.dependencyGraph.addVertex(f,w)}},m=0;m<d.length;++m)p(m);return n}}]),e}(),y=function(){function e(t,n,r,o,i,a){d(this,e),this.dependencyGraph=t,this.columnSearch=n,this.parser=r,this.stats=o,this.threshold=i,this.cellContentParser=a}return m(e,[{key:"run",value:function(e){var t=this,n=new Map,a=new u.GraphBuilderMatrixHeuristic(this.dependencyGraph,this.columnSearch,this.threshold,this.cellContentParser);for(var l in e){var h=this.dependencyGraph.getSheetId(l),d=e[l];a.addSheet(h,{width:this.dependencyGraph.getSheetWidth(h),height:this.dependencyGraph.getSheetHeight(h)});for(var p=0;p<d.length;++p)for(var m=d[p],v=function(e){var u=m[e],l=Object(o.simpleCellAddress)(h,e,p),f=t.cellContentParser.parse(u);if(f instanceof i.CellContent.MatrixFormula){if(t.dependencyGraph.existsVertex(l))return"continue";var d=t.stats.measure(c.StatType.PARSER,(function(){return t.parser.parse(f.formula,l)}));if(d.errors.length>0){var v=new s.ParsingErrorVertex(d.errors,f.formulaWithBraces());t.dependencyGraph.addVertex(l,v)}else{var g=E(d.ast,l);n.set(g,Object(r.absolutizeDependencies)(d.dependencies,l)),t.dependencyGraph.addMatrixVertex(l,g)}}else if(f instanceof i.CellContent.Formula){var y=t.stats.measure(c.StatType.PARSER,(function(){return t.parser.parse(f.formula,l)}));if(y.errors.length>0){var T=new s.ParsingErrorVertex(y.errors,f.formula);t.dependencyGraph.addVertex(l,T)}else{var C=new s.FormulaCellVertex(y.ast,l,0);n.set(C,Object(r.absolutizeDependencies)(y.dependencies,l)),t.dependencyGraph.addVertex(l,C)}}else if(f instanceof i.CellContent.Empty);else if(f instanceof i.CellContent.Number)a.add(l);else{var w=new s.ValueCellVertex(f.value,u);t.columnSearch.add(f.value,l),t.dependencyGraph.addVertex(l,w)}},g=0;g<m.length;++g)v(g)}this.stats.start(c.StatType.MATRIX_DETECTION);for(var y=a.run(e),T=y.length-1;T>=0;--T){var C=y[T];C.cells.reverse();var w,R=f(C.cells);try{for(R.s();!(w=R.n()).done;){var b=w.value,O=e[this.dependencyGraph.getSheetName(b.sheet)][b.row][b.col],S=new s.ValueCellVertex(Number(O),O);this.columnSearch.add(Number(O),b),this.dependencyGraph.addVertex(b,S)}}catch(e){R.e(e)}finally{R.f()}}return this.stats.end(c.StatType.MATRIX_DETECTION),n}}]),e}();function E(e,t){var n=Object(l.checkMatrixSize)(e,t);return n instanceof o.CellError?new s.ValueCellVertex(n,void 0):new s.MatrixVertex(t,n.width,n.height,e)}},function(e,t,n){var r=n(29),o=Math.log,i=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(e){return o(e)*i}})},function(e,t,n){"use strict";n.r(t),n.d(t,"ColumnBinarySearch",(function(){return h}));n(41),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(112),o=n(349),i=n(50);function a(e){return(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})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(f,e);var t,n,a,c=l(f);function f(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(n=c.call(this,e)).dependencyGraph=e,n.config=t,n}return t=f,(n=[{key:"add",value:function(e,t){}},{key:"remove",value:function(e,t){}},{key:"change",value:function(e,t,n){}},{key:"addColumns",value:function(e){}},{key:"removeColumns",value:function(e){}},{key:"removeSheet",value:function(e){}},{key:"moveValues",value:function(e,t,n,r){}},{key:"removeValues",value:function(e){}},{key:"destroy",value:function(){}},{key:"find",value:function(e,t,n){if("string"==typeof e&&(e=Object(r.forceNormalizeString)(e)),t.height()<this.config.binarySearchThreshold||!n){var a=this.dependencyGraph.computeListOfValuesInRange(t).map(i.getRawValue).map((function(e){return"string"==typeof e?Object(r.forceNormalizeString)(e):e})).indexOf(e);return a<0?a:a+t.start.row}return Object(o.rangeLowerBound)(t,e,this.dependencyGraph,"row")}}])&&s(t.prototype,n),a&&s(t,a),f}(n(350).AdvancedFind)},function(e,t,n){"use strict";n.r(t),n.d(t,"rangeLowerBound",(function(){return a})),n.d(t,"lowerBound",(function(){return s})),n.d(t,"compare",(function(){return u}));n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(50);function i(e){return(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})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function a(e,t,n,i){var a;return a="col"===i?e.effectiveEndColumn(n):e.effectiveEndRow(n),s("row"===i?function(t){return Object(o.getRawValue)(n.getCellValue(Object(r.simpleCellAddress)(e.sheet,e.start.col,t)))}:function(t){return Object(o.getRawValue)(n.getCellValue(Object(r.simpleCellAddress)(e.sheet,t,e.start.row)))},t,e.start[i],a)}function s(e,t,n,r){for(;n<=r;){var o=Math.floor((n+r)/2),i=u(t,e(o));if(i>0)n=o+1;else if(i<0)r=o-1;else{if(n==o)return o;r=o}}return r}function u(e,t){return i(e)===i(t)?e===o.EmptyValue?0:e<t?-1:e>t?1:0:e===o.EmptyValue?-1:t===o.EmptyValue?1:t instanceof r.CellError||"number"==typeof e&&"string"==typeof t||"number"==typeof e&&"boolean"==typeof t?-1:"string"==typeof e&&"number"==typeof t?1:"string"==typeof e&&"boolean"==typeof t?-1:1}},function(e,t,n){"use strict";n.r(t),n.d(t,"AdvancedFind",(function(){return i}));var r=n(50);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/
var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dependencyGraph=t}var t,n,i;return t=e,(n=[{key:"advancedFind",value:function(e,t){for(var n=this.dependencyGraph.computeListOfValuesInRange(t),o=0;o<n.length;o++)if(e(Object(r.getRawValue)(n[o])))return o+t.start.col;return-1}}])&&o(t.prototype,n),i&&o(t,i),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"AbsPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"abs",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"BitShiftPlugin",(function(){return d}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35);function a(e){return(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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(i,e);var t,n,r,o=c(i);function i(){return s(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"bitlshift",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),p)}},{key:"bitrshift",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),m)}}])&&u(t.prototype,n),r&&u(t,r),i}(i.FunctionPlugin);function p(e,t){return t<0?m(e,-t):v(e*Math.pow(2,t))}function m(e,t){return t<0?p(e,-t):v(Math.floor(e/Math.pow(2,t)))}function v(e){return e>0xffffffffffff?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.BitshiftLong):e}d.implementedFunctions={BITLSHIFT:{method:"bitlshift",parameters:[{argumentType:i.ArgumentTypes.INTEGER,minValue:0},{argumentType:i.ArgumentTypes.INTEGER,minValue:-53,maxValue:53}]},BITRSHIFT:{method:"bitrshift",parameters:[{argumentType:i.ArgumentTypes.INTEGER,minValue:0},{argumentType:i.ArgumentTypes.INTEGER,minValue:-53,maxValue:53}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"BitwiseLogicOperationsPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"bitand",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITAND"),(function(e,t){return e&t}))}},{key:"bitor",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITOR"),(function(e,t){return e|t}))}},{key:"bitxor",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BITXOR"),(function(e,t){return e^t}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={BITAND:{method:"bitand",parameters:[{argumentType:r.ArgumentTypes.INTEGER,minValue:0},{argumentType:r.ArgumentTypes.INTEGER,minValue:0}]},BITOR:{method:"bitor",parameters:[{argumentType:r.ArgumentTypes.INTEGER,minValue:0},{argumentType:r.ArgumentTypes.INTEGER,minValue:0}]},BITXOR:{method:"bitxor",parameters:[{argumentType:r.ArgumentTypes.INTEGER,minValue:0},{argumentType:r.ArgumentTypes.INTEGER,minValue:0}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"BooleanPlugin",(function(){return d}));n(27),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35);function a(e){return(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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"literalTrue",value:function(e,t){return this.runFunction(e.args,t,this.metadata("TRUE"),(function(){return!0}))}},{key:"literalFalse",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FALSE"),(function(){return!1}))}},{key:"conditionalIf",value:function(e,t){return this.runFunction(e.args,t,this.metadata("IF"),(function(e,t,n){return e?t:n}))}},{key:"and",value:function(e,t){return this.runFunction(e.args,t,this.metadata("AND"),(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!e}))}))}},{key:"or",value:function(e,t){return this.runFunction(e.args,t,this.metadata("OR"),(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.some((function(e){return e}))}))}},{key:"not",value:function(e,t){return this.runFunction(e.args,t,this.metadata("NOT"),(function(e){return!e}))}},{key:"xor",value:function(e,t){return this.runFunction(e.args,t,this.metadata("XOR"),(function(){for(var e=0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&e++})),e%2==1}))}},{key:"switch",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("SWITCH"),(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),a=1;a<t;a++)i[a-1]=arguments[a];for(var s=i.length,u=0;u+1<s;u+=2)if(!(i[u]instanceof r.CellError)&&n.interpreter.arithmeticHelper.eq(e,i[u]))return i[u+1];return u<s?i[u]:new r.CellError(r.ErrorType.NA,o.ErrorMessage.NoDefault)}))}},{key:"iferror",value:function(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(function(e,t){return e instanceof r.CellError?t:e}))}},{key:"ifna",value:function(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(function(e,t){return e instanceof r.CellError&&e.type===r.ErrorType.NA?t:e}))}},{key:"choose",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(function(e){return e>(arguments.length<=1?0:arguments.length-1)?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.Selector):e-1+1<1||arguments.length<=e-1+1?void 0:arguments[e-1+1]}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);d.implementedFunctions={TRUE:{method:"literalTrue",parameters:[]},FALSE:{method:"literalFalse",parameters:[]},IF:{method:"conditionalIf",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,defaultValue:!1,passSubtype:!0}]},AND:{method:"and",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},OR:{method:"or",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},XOR:{method:"xor",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},NOT:{method:"not",parameters:[{argumentType:i.ArgumentTypes.BOOLEAN}]},SWITCH:{method:"switch",parameters:[{argumentType:i.ArgumentTypes.NOERROR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0}],repeatLastArgs:1},IFERROR:{method:"iferror",parameters:[{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0}]},IFNA:{method:"ifna",parameters:[{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0}]},CHOOSE:{method:"choose",parameters:[{argumentType:i.ArgumentTypes.INTEGER,minValue:1},{argumentType:i.ArgumentTypes.SCALAR,passSubtype:!0}],repeatLastArgs:1}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CharPlugin",(function(){return d}));n(130),n(674),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35);function a(e){return(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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"char",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),(function(e){return e<1||e>=256?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.CharacterCodeBounds):String.fromCharCode(Math.trunc(e))}))}},{key:"unichar",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),(function(e){return e<1||e>=1114112?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e))}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);d.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CodePlugin",(function(){return d}));n(265),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35);function a(e){return(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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"code",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),(function(e){return 0===e.length?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.EmptyString):e.charCodeAt(0)}))}},{key:"unicode",value:function(e,t){return this.runFunction(e.args,t,this.metadata("UNICODE"),(function(e){var t;return null!==(t=e.codePointAt(0))&&void 0!==t?t:new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.EmptyString)}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);d.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:i.ArgumentTypes.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:i.ArgumentTypes.STRING}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CountBlankPlugin",(function(){return h}));n(27),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(50),o=n(35);function i(e){return(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})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,o,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"countblank",value:function(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(function(){for(var e=0,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return n.forEach((function(t){t===r.EmptyValue&&e++})),e}))}}])&&s(t.prototype,n),o&&s(t,o),c}(o.FunctionPlugin);h.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:o.ArgumentTypes.SCALAR}],repeatLastArgs:1,expandRanges:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CountUniquePlugin",(function(){return h}));n(3),n(1),n(57),n(2),n(4),n(24),n(7),n(8),n(10),n(11);var r=n(22),o=n(35);function i(e){return(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})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,o,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"countunique",value:function(e,t){return this.runFunction(e.args,t,this.metadata("COUNTUNIQUE"),(function(){for(var e=new Set,t=new Set,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];for(var a=0,s=o;a<s.length;a++){var u=s[a];u instanceof r.CellError?t.add(u.type):""!==u&&e.add(u)}return e.size+t.size}))}}])&&s(t.prototype,n),o&&s(t,o),c}(o.FunctionPlugin);h.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:o.ArgumentTypes.SCALAR}],repeatLastArgs:1,expandRanges:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"DateTimePlugin",(function(){return C}));n(130),n(38),n(70),n(3),n(1),n(57),n(2),n(4),n(33),n(24),n(7),n(8),n(10),n(11),n(19),n(25),n(23);var r=n(22),o=n(169),i=n(39),a=n(259),s=n(50),u=n(35);function l(e){return(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})(e)}function c(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=d(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(d,e);var t,n,u,l=y(d);function d(){var e;return m(this,d),(e=l.apply(this,arguments)).isoweeknumCore=function(t){var n=Math.floor(e.interpreter.dateHelper.relativeNumberToAbsoluteNumber(t)),r=e.interpreter.dateHelper.numberToSimpleDate(t),o=e.interpreter.dateHelper.dateToNumber({year:r.year,month:1,day:1}),i=e.interpreter.dateHelper.relativeNumberToAbsoluteNumber(o),a=i+((4-i)%7+7)%7,s=Math.floor((n-1)/7)-Math.floor((a-1)/7)+1;return 0===s?e.isoweeknumCore(t-7)+1:s},e.days360Core=function(t,n,r){var i,a,s=e.interpreter.dateHelper.numberToSimpleDate(t),u=e.interpreter.dateHelper.numberToSimpleDate(n);if(r)i=Object(o.toBasisEU)(s),a=Object(o.toBasisEU)(u);else{var l=h(e.interpreter.dateHelper.toBasisUS(s,u),2);i=l[0],a=l[1]}return 360*(a.year-i.year)+30*(a.month-i.month)+a.day-i.day},e}return t=d,(n=[{key:"date",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("DATE"),(function(e,t,o){var a=Math.trunc(o),s=Math.trunc(t),u=Math.trunc(e);u<n.interpreter.dateHelper.getEpochYearZero()&&(u+=n.interpreter.dateHelper.getEpochYearZero());var l=Math.floor((s-1)/12),c={year:u+=l,month:s-=12*l,day:1};if(n.interpreter.dateHelper.isValidDate(c)){var f=n.interpreter.dateHelper.dateToNumber(c)+(a-1);return void 0===(f=n.interpreter.dateHelper.getWithinBounds(f))?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.DateBounds):f}return new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.InvalidDate)}))}},{key:"time",value:function(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(function(e,t,n){var a=Object(o.timeToNumber)({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(n)});return a<0?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.NegativeTime):a%1}))}},{key:"eomonth",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("EOMONTH"),(function(e,t){var a=n.interpreter.dateHelper.numberToSimpleDate(e),s=n.interpreter.dateHelper.dateToNumber(n.interpreter.dateHelper.endOfMonth(Object(o.offsetMonth)(a,t)));return void 0===(s=n.interpreter.dateHelper.getWithinBounds(s))?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.DateBounds):s}))}},{key:"day",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("DAY"),(function(e){return n.interpreter.dateHelper.numberToSimpleDate(e).day}))}},{key:"days",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DAYS"),(function(e,t){return Math.trunc(e)-Math.trunc(t)}))}},{key:"month",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MONTH"),(function(e){return n.interpreter.dateHelper.numberToSimpleDate(e).month}))}},{key:"year",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("YEAR"),(function(e){return n.interpreter.dateHelper.numberToSimpleDate(e).year}))}},{key:"hour",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HOUR"),(function(e){return Object(o.numberToSimpleTime)(Object(o.roundToNearestSecond)(e)%1).hours}))}},{key:"minute",value:function(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),(function(e){return Object(o.numberToSimpleTime)(Object(o.roundToNearestSecond)(e)%1).minutes}))}},{key:"second",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),(function(e){return Object(o.numberToSimpleTime)(Object(o.roundToNearestSecond)(e)%1).seconds}))}},{key:"text",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TEXT"),(function(e,t){return Object(a.format)(e,t,n.config,n.interpreter.dateHelper)}))}},{key:"weekday",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("WEEKDAY"),(function(e,t){var o=Math.floor(n.interpreter.dateHelper.relativeNumberToAbsoluteNumber(e));if(3===t)return(o-1)%7;var a=b.get(t);return void 0===a?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.BadMode):(o-a)%7+1}))}},{key:"weeknum",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("WEEKNUM"),(function(e,t){var o=Math.floor(n.interpreter.dateHelper.relativeNumberToAbsoluteNumber(e)),a=n.interpreter.dateHelper.numberToSimpleDate(e),s=n.interpreter.dateHelper.dateToNumber({year:a.year,month:1,day:1}),u=n.interpreter.dateHelper.relativeNumberToAbsoluteNumber(s);if(21===t)return n.isoweeknumCore(e);var l=b.get(t);return void 0===l?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.BadMode):Math.floor((o-l)/7)-Math.floor((u-l)/7)+1}))}},{key:"isoweeknum",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISOWEEKNUM"),this.isoweeknumCore)}},{key:"datevalue",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("DATEVALUE"),(function(e){var t=n.interpreter.dateHelper.parseDateTimeFromConfigFormats(e).dateTime;return void 0===t?new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.IncorrectDateTime):Object(o.instanceOfSimpleDate)(t)?(Object(o.instanceOfSimpleTime)(t)?Math.trunc(Object(o.timeToNumber)(t)):0)+n.interpreter.dateHelper.dateToNumber(t):0}))}},{key:"timevalue",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TIMEVALUE"),(function(e){var t=n.interpreter.dateHelper.dateStringToDateNumber(e);return void 0===t?new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.IncorrectDateTime):Object(s.getRawValue)(t)%1}))}},{key:"now",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("NOW"),(function(){var e=new Date;return Object(o.timeToNumber)({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()})+n.interpreter.dateHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDay()})}))}},{key:"today",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TODAY"),(function(){var e=new Date;return n.interpreter.dateHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDay()})}))}},{key:"edate",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("EDATE"),(function(e,t){var a=n.interpreter.dateHelper.numberToSimpleDate(e),s=Object(o.truncateDayInMonth)(Object(o.offsetMonth)(a,t)),u=n.interpreter.dateHelper.dateToNumber(s);return void 0===(u=n.interpreter.dateHelper.getWithinBounds(u))?new r.CellError(r.ErrorType.NUM,i.ErrorMessage.DateBounds):u}))}},{key:"datedif",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("DATEDIF"),(function(e,t,o){if(e>t)return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.StartEndDate);if("D"===o)return Math.floor(t)-Math.floor(e);var a=n.interpreter.dateHelper.numberToSimpleDate(e),s=n.interpreter.dateHelper.numberToSimpleDate(t);switch(o){case"M":return 12*(s.year-a.year)+(s.month-a.month)-(s.day<a.day?1:0);case"YM":return(s.month-a.month+12-(s.day<a.day?1:0))%12;case"Y":return s.month>a.month||s.month===a.month&&s.day>=a.day?s.year-a.year:s.year-a.year-1;case"MD":if(s.day>=a.day)return s.day-a.day;var u=1===s.month?12:s.month-1,l=1===s.month?s.year-1:s.year;return n.interpreter.dateHelper.daysInMonth(l,u)+s.day-a.day;case"YD":return s.month>a.month||s.month===a.month&&s.day>=a.day?Math.floor(t)-n.interpreter.dateHelper.dateToNumber({year:s.year,month:a.month,day:a.day}):Math.floor(t)-Math.floor(e)-365*(s.year-a.year-1)-n.interpreter.dateHelper.leapYearsCount(s.year-1)+n.interpreter.dateHelper.leapYearsCount(a.year);default:return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.BadMode)}}))}},{key:"days360",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DAYS360"),this.days360Core)}},{key:"yearfrac",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("YEARFRAC"),(function(e,t,r){if((e=Math.trunc(e))>(t=Math.trunc(t))){var o=[t,e];e=o[0],t=o[1]}switch(r){case 0:return n.days360Core(e,t,!1)/360;case 1:return(t-e)/n.interpreter.dateHelper.yearLengthForBasis(n.interpreter.dateHelper.numberToSimpleDate(e),n.interpreter.dateHelper.numberToSimpleDate(t));case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return n.days360Core(e,t,!0)/360}throw new Error("Should not be reachable.")}))}},{key:"interval",value:function(e,t){return this.runFunction(e.args,t,this.metadata("INTERVAL"),(function(e){var t=(e=Math.trunc(e))%60,n=(e=Math.trunc(e/60))%60,r=(e=Math.trunc(e/60))%24,o=(e=Math.trunc(e/24))%30,i=(e=Math.trunc(e/30))%12,a=Math.trunc(e/12);return"P"+(a>0?a+"Y":"")+(i>0?i+"M":"")+(o>0?o+"D":"")+"T"+(r>0?r+"H":"")+(n>0?n+"M":"")+(t>0?t+"S":"")}))}},{key:"networkdays",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("NETWORKDAYS"),(function(e,t,r){return n.networkdayscore(e,t,1,r)}))}},{key:"networkdaysintl",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("NETWORKDAYS.INTL"),(function(e,t,r,o){return n.networkdayscore(e,t,r,o)}))}},{key:"workday",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("WORKDAY"),(function(e,t,r){return n.workdaycore(e,t,1,r)}))}},{key:"workdayintl",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("WORKDAY.INTL"),(function(e,t,r,o){return n.workdaycore(e,t,r,o)}))}},{key:"networkdayscore",value:function(e,t,n,o){var i=1;if((e=Math.trunc(e))>(t=Math.trunc(t))){var a=[t,e];e=a[0],t=a[1],i=-1}var s=R(n);if(s instanceof r.CellError)return s;var u=this.simpleRangeToFilteredHolidays(o,s);return u instanceof r.CellError?u:i*this.countWorkdays(e,t,s,u)}},{key:"workdaycore",value:function(e,t,n,o){e=Math.trunc(e),t=Math.trunc(t);var i=R(n);if(i instanceof r.CellError)return i;var a=this.simpleRangeToFilteredHolidays(o,i);if(a instanceof r.CellError)return a;if(t>0){for(var s=1;this.countWorkdays(e+1,e+s,i,a)<t;)s*=2;for(var u=1;u+1<s;){var l=Math.trunc((u+s)/2);this.countWorkdays(e+1,e+l,i,a)<t?u=l:s=l}return e+s}if(t<0){t*=-1;for(var c=1;this.countWorkdays(e-c,e-1,i,a)<t;)c*=2;for(var f=1;f+1<c;){var h=Math.trunc((f+c)/2);this.countWorkdays(e-h,e-1,i,a)<t?f=h:c=h}return e-c}return e}},{key:"countWorkdays",value:function(e,t,n,r){for(var o=Math.floor(this.interpreter.dateHelper.relativeNumberToAbsoluteNumber(t)),i=Math.floor(this.interpreter.dateHelper.relativeNumberToAbsoluteNumber(e)),a=0,s=0;s<7;s++)"0"===n.charAt(s)&&(a+=Math.floor((o+6-s)/7),a-=Math.floor((i-1+6-s)/7));return a-=w(t+1,r)-w(e,r)}},{key:"simpleRangeToFilteredHolidays",value:function(e,t){var n,o,a=this,u=null!==(n=null==e?void 0:e.valuesFromTopLeftCorner())&&void 0!==n?n:[],l=f(u);try{for(l.s();!(o=l.n()).done;){var h=o.value;if(h instanceof r.CellError)return h}}catch(e){l.e(e)}finally{l.f()}var d,p=[],m=f(u);try{for(m.s();!(d=m.n()).done;){var v=d.value;if(v!==s.EmptyValue){if(!Object(s.isExtendedNumber)(v))return new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.WrongType);p.push(Math.trunc(Object(s.getRawValue)(v)))}}}catch(e){m.e(e)}finally{m.f()}return c(new Set(p)).sort((function(e,t){return e-t})).filter((function(e){var n=(a.interpreter.dateHelper.relativeNumberToAbsoluteNumber(e)-1)%7;return"0"===t.charAt(n)}))}}])&&v(t.prototype,n),u&&v(t,u),d}(u.FunctionPlugin);function w(e,t){if(0===t.length)return 0;if(e<=t[0])return 0;if(t[t.length-1]<e)return t.length;for(var n=0,r=t.length-1;n+1<r;){var o=Math.floor((r+n)/2);t[o]>=e?r=o:n=o}return r}function R(e){var t;return"number"!=typeof e&&"string"!=typeof e?new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.WrongType):"string"==typeof e?7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new r.CellError(r.ErrorType.NUM,i.ErrorMessage.WeekendString):null!==(t=O.get(e))&&void 0!==t?t:new r.CellError(r.ErrorType.NUM,i.ErrorMessage.BadMode)}C.implementedFunctions={DATE:{method:"date",parameters:[{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER}],returnNumberType:s.NumberType.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER}],returnNumberType:s.NumberType.NUMBER_TIME},MONTH:{method:"month",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},YEAR:{method:"year",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},HOUR:{method:"hour",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},MINUTE:{method:"minute",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},SECOND:{method:"second",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},TEXT:{method:"text",parameters:[{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.STRING}]},EOMONTH:{method:"eomonth",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER}],returnNumberType:s.NumberType.NUMBER_DATE},DAY:{method:"day",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},DAYS:{method:"days",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},WEEKDAY:{method:"weekday",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,defaultValue:1}]},WEEKNUM:{method:"weeknum",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,defaultValue:1}]},ISOWEEKNUM:{method:"isoweeknum",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},DATEVALUE:{method:"datevalue",parameters:[{argumentType:u.ArgumentTypes.STRING}],returnNumberType:s.NumberType.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:u.ArgumentTypes.STRING}],returnNumberType:s.NumberType.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:s.NumberType.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:s.NumberType.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER}],returnNumberType:s.NumberType.NUMBER_DATE},DAYS360:{method:"days360",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.BOOLEAN,defaultValue:!1}]},DATEDIF:{method:"datedif",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.STRING}]},YEARFRAC:{method:"yearfrac",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.INTEGER,defaultValue:0,minValue:0,maxValue:4}]},INTERVAL:{method:"interval",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0}]},NETWORKDAYS:{method:"networkdays",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.RANGE,optionalArg:!0}]},"NETWORKDAYS.INTL":{method:"networkdaysintl",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NOERROR,defaultValue:1},{argumentType:u.ArgumentTypes.RANGE,optionalArg:!0}]},WORKDAY:{method:"workday",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.RANGE,optionalArg:!0}]},"WORKDAY.INTL":{method:"workdayintl",parameters:[{argumentType:u.ArgumentTypes.NUMBER,minValue:0},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NOERROR,defaultValue:1},{argumentType:u.ArgumentTypes.RANGE,optionalArg:!0}]}};var b=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),O=new Map([[1,"0000011"],[2,"1000001"],[3,"1100000"],[4,"0110000"],[5,"0011000"],[6,"0001100"],[7,"0000110"],[11,"0000001"],[12,"1000000"],[13,"0100000"],[14,"0010000"],[15,"0001000"],[16,"0000100"],[17,"0000010"]])},function(e,t,n){"use strict";n.r(t),n.d(t,"DegreesPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"degrees",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),(function(e){return e*(180/Math.PI)}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"DeltaPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"delta",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(function(e,t){return e===t?1:0}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:r.ArgumentTypes.NUMBER},{argumentType:r.ArgumentTypes.NUMBER,defaultValue:0}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"ExpPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"exp",value:function(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"FinancialPlugin",(function(){return v}));n(130),n(24),n(7),n(19),n(1),n(25),n(23),n(2),n(8),n(10),n(11),n(3),n(4);var r=n(22),o=n(39),i=n(50),a=n(35);function s(e){return(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})(e)}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(l,e);var t,n,a,s=d(l);function l(){return c(this,l),s.apply(this,arguments)}return t=l,(n=[{key:"pmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),g)}},{key:"ipmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),y)}},{key:"ppmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),T)}},{key:"fv",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FV"),E)}},{key:"cumipmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(function(e,t,n,i,a,s){if(i>a)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.EndStartPeriod);for(var u=0,l=i;l<=a;l++)u+=y(e,l,t,n,0,s);return u}))}},{key:"cumprinc",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),(function(e,t,n,i,a,s){if(i>a)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.EndStartPeriod);for(var u=0,l=i;l<=a;l++)u+=T(e,l,t,n,0,s);return u}))}},{key:"db",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DB"),(function(e,t,n,i,a){if(12===a&&i>n||i>n+1)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.PeriodLong);if(t>=e)return 0;var s=Math.round(1e3*(1-Math.pow(t/e,1/n)))/1e3,u=e*s*a/12;if(1===i)return u;for(var l=u,c=0;c<i-2;c++)l+=(e-l)*s;return i===n+1?(e-l)*s*(12-a)/12:(e-l)*s}))}},{key:"ddb",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),(function(e,t,n,o,i){if(o>n)return new r.CellError(r.ErrorType.NUM);var a,s=i/n;s>=1?(s=1,a=1===o?e:0):a=e*Math.pow(1-s,o-1);var u=e*Math.pow(1-s,o);return Math.max(a-Math.max(t,u),0)}))}},{key:"dollarde",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),(function(e,t){if(t<1)return new r.CellError(r.ErrorType.DIV_BY_ZERO);for(t=Math.trunc(t);t>10;)t/=10;return Math.trunc(e)+10*(e-Math.trunc(e))/t}))}},{key:"dollarfr",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARFR"),(function(e,t){if(t<1)return new r.CellError(r.ErrorType.DIV_BY_ZERO);for(t=Math.trunc(t);t>10;)t/=10;return Math.trunc(e)+(e-Math.trunc(e))*t/10}))}},{key:"effect",value:function(e,t){return this.runFunction(e.args,t,this.metadata("EFFECT"),(function(e,t){return t=Math.trunc(t),Math.pow(1+e/t,t)-1}))}},{key:"ispmt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISPMT"),(function(e,t,n,o){return 0===n?new r.CellError(r.ErrorType.DIV_BY_ZERO):o*e*(t/n-1)}))}},{key:"nominal",value:function(e,t){return this.runFunction(e.args,t,this.metadata("NOMINAL"),(function(e,t){return t=Math.trunc(t),(Math.pow(e+1,1/t)-1)*t}))}},{key:"nper",value:function(e,t){return this.runFunction(e.args,t,this.metadata("NPER"),(function(e,t,n,o,i){return 0===e?0===t?new r.CellError(r.ErrorType.DIV_BY_ZERO):(-n-o)/t:(i&&(t*=1+e),Math.log((t-o*e)/(n*e+t))/Math.log(1+e))}))}},{key:"rate",value:function(e,t){return this.runFunction(e.args,t,this.metadata("RATE"),(function(e,t,n,o,i,a){if(a<=-1)return new r.CellError(r.ErrorType.VALUE);var s=a;i=i?1:0;for(var u=0;u<20;u++){if(s<=-1)return new r.CellError(r.ErrorType.NUM);var l=void 0;if(Math.abs(s)<1e-10)l=n*(1+e*s)+t*(1+s*i)*e+o;else{var c=Math.pow(1+s,e);l=n*c+t*(1/s+i)*(c-1)+o}if(Math.abs(l)<1e-10)return s;var f=void 0;if(Math.abs(s)<1e-10)f=n*e+t*i*e;else{var h=Math.pow(1+s,e),d=e*Math.pow(1+s,e-1);f=n*d+t*(1/s+i)*d+t*(-1/(s*s))*(h-1)}s-=l/f}return new r.CellError(r.ErrorType.NUM)}))}},{key:"pv",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PV"),(function(e,t,n,o,i){return i=i?1:0,-1===e?0===t?new r.CellError(r.ErrorType.NUM):new r.CellError(r.ErrorType.DIV_BY_ZERO):0===e?-n*t-o:((1-Math.pow(1+e,t))*n*(1+e*i)/e-o)/Math.pow(1+e,t)}))}},{key:"rri",value:function(e,t){return this.runFunction(e.args,t,this.metadata("RRI"),(function(e,t,n){return 0===t||n<0&&t>0||n>0&&t<0?new r.CellError(r.ErrorType.NUM):Math.pow(n/t,1/e)-1}))}},{key:"sln",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SLN"),(function(e,t,n){return 0===n?new r.CellError(r.ErrorType.DIV_BY_ZERO):(e-t)/n}))}},{key:"syd",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SYD"),(function(e,t,n,o){return o>n?new r.CellError(r.ErrorType.NUM):(e-t)*(n-o+1)*2/(n*(n+1))}))}},{key:"tbilleq",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TBILLEQ"),(function(e,t,o){if((e=Math.round(e))>=(t=Math.round(t)))return new r.CellError(r.ErrorType.NUM);var i=n.interpreter.dateHelper.numberToSimpleDate(e),a=n.interpreter.dateHelper.numberToSimpleDate(t);if(a.year>i.year+1||a.year===i.year+1&&(a.month>i.month||a.month===i.month&&a.day>i.day))return new r.CellError(r.ErrorType.NUM);var s=360-o*(t-e);return 0===s?0:s<0?new r.CellError(r.ErrorType.NUM):365*o/s}))}},{key:"tbillprice",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TBILLPRICE"),(function(e,t,o){if((e=Math.round(e))>=(t=Math.round(t)))return new r.CellError(r.ErrorType.NUM);var i=n.interpreter.dateHelper.numberToSimpleDate(e),a=n.interpreter.dateHelper.numberToSimpleDate(t);if(a.year>i.year+1||a.year===i.year+1&&(a.month>i.month||a.month===i.month&&a.day>i.day))return new r.CellError(r.ErrorType.NUM);var s=360-o*(t-e);return 0===s?0:s<0?new r.CellError(r.ErrorType.NUM):100*(1-o*(t-e)/360)}))}},{key:"tbillyield",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("TBILLYIELD"),(function(e,t,o){if((e=Math.round(e))>=(t=Math.round(t)))return new r.CellError(r.ErrorType.NUM);var i=n.interpreter.dateHelper.numberToSimpleDate(e),a=n.interpreter.dateHelper.numberToSimpleDate(t);return a.year>i.year+1||a.year===i.year+1&&(a.month>i.month||a.month===i.month&&a.day>i.day)?new r.CellError(r.ErrorType.NUM):360*(100-o)/(o*(t-e))}))}},{key:"fvschedule",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FVSCHEDULE"),(function(e,t){var n,a=t.valuesFromTopLeftCorner(),s=u(a);try{for(s.s();!(n=s.n()).done;){var l=n.value;if(l instanceof r.CellError)return l}}catch(e){s.e(e)}finally{s.f()}var c,f=u(a);try{for(f.s();!(c=f.n()).done;){var h=c.value;if(Object(i.isExtendedNumber)(h))e*=1+Object(i.getRawValue)(h);else if(h!==i.EmptyValue)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberExpected)}}catch(e){f.e(e)}finally{f.f()}return e}))}},{key:"npv",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("NPV"),(function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];var a=n.interpreter.arithmeticHelper.coerceNumbersExactRanges(o);return a instanceof r.CellError?a:C(e,a)}))}},{key:"mirr",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MIRR"),(function(e,t,o){var i=n.interpreter.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(i instanceof r.CellError)return i;var a,s=!1,l=!1,c=[],f=[],h=u(i);try{for(h.s();!(a=h.n()).done;){var d=a.value;d>0?(s=!0,c.push(d),f.push(0)):d<0?(l=!0,f.push(d),c.push(0)):(f.push(0),c.push(0))}}catch(e){h.e(e)}finally{h.f()}if(!s||!l)return new r.CellError(r.ErrorType.DIV_BY_ZERO);var p=i.length,m=C(o,c);if(m instanceof r.CellError)return m;var v=C(t,f);return v instanceof r.CellError?v:Math.pow(-m*Math.pow(1+o,p)/v/(1+t),1/(p-1))-1}))}},{key:"pduration",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PDURATION"),(function(e,t,n){return(Math.log(n)-Math.log(t))/Math.log(1+e)}))}},{key:"xnpv",value:function(e,t){return this.runFunction(e.args,t,this.metadata("XNPV"),(function(e,t,n){var i,a=t.valuesFromTopLeftCorner(),s=u(a);try{for(s.s();!(i=s.n()).done;)if("number"!=typeof i.value)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberExpected)}catch(e){s.e(e)}finally{s.f()}var l,c=a,f=n.valuesFromTopLeftCorner(),h=u(f);try{for(h.s();!(l=h.n()).done;)if("number"!=typeof l.value)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberExpected)}catch(e){h.e(e)}finally{h.f()}var d=f;if(d.length!==c.length)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.EqualLength);var p=d.length,m=0;if(d[0]<0)return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueSmall);for(var v=0;v<p;v++){if(d[v]=Math.floor(d[v]),d[v]<d[0])return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueSmall);m+=c[v]/Math.pow(1+e,(d[v]-d[0])/365)}return m}))}}])&&f(t.prototype,n),a&&f(t,a),l}(a.FunctionPlugin);function g(e,t,n,r,o){if(0===e)return(-n-r)/t;var i=Math.pow(1+e,t);return(r*e+n*e*i)*(o?1/(1+e):1)/(1-i)}function y(e,t,n,r,o,i){var a=g(e,n,r,o,i);return 1===t?e*(i?0:-r):e*(i?E(e,t-2,a,r,i)-a:E(e,t-1,a,r,i))}function E(e,t,n,r,o){if(0===e)return-r-n*t;var i=Math.pow(1+e,t);return n*(o?1+e:1)*(1-i)/e-r*i}function T(e,t,n,r,o,i){return g(e,n,r,o,i)-y(e,t,n,r,o,i)}function C(e,t){for(var n=0,o=t.length-1;o>=0;o--){if(n+=t[o],-1===e){if(0===n)continue;return new r.CellError(r.ErrorType.DIV_BY_ZERO)}n/=1+e}return n}v.implementedFunctions={PMT:{method:"pmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},IPMT:{method:"ipmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},PPMT:{method:"ppmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},FV:{method:"fv",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},CUMIPMT:{method:"cumipmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:1},{argumentType:a.ArgumentTypes.INTEGER,minValue:1},{argumentType:a.ArgumentTypes.INTEGER,minValue:0,maxValue:1}],returnNumberType:i.NumberType.NUMBER_CURRENCY},CUMPRINC:{method:"cumprinc",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:1},{argumentType:a.ArgumentTypes.INTEGER,minValue:1},{argumentType:a.ArgumentTypes.INTEGER,minValue:0,maxValue:1}],returnNumberType:i.NumberType.NUMBER_CURRENCY},DB:{method:"db",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:1,maxValue:12,defaultValue:12}],returnNumberType:i.NumberType.NUMBER_CURRENCY},DDB:{method:"ddb",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.INTEGER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0,defaultValue:2}],returnNumberType:i.NumberType.NUMBER_CURRENCY},DOLLARDE:{method:"dollarde",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,minValue:0}]},DOLLARFR:{method:"dollarfr",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,minValue:0}]},EFFECT:{method:"effect",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:1}],returnNumberType:i.NumberType.NUMBER_PERCENT},ISPMT:{method:"ispmt",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER}]},NOMINAL:{method:"nominal",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:1}],returnNumberType:i.NumberType.NUMBER_PERCENT},NPER:{method:"nper",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}]},PV:{method:"pv",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},RATE:{method:"rate",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:0},{argumentType:a.ArgumentTypes.NUMBER,defaultValue:.1}],returnNumberType:i.NumberType.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER}],returnNumberType:i.NumberType.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER}],returnNumberType:i.NumberType.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}],returnNumberType:i.NumberType.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}],returnNumberType:i.NumberType.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}],returnNumberType:i.NumberType.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.RANGE}],returnNumberType:i.NumberType.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.ANY}],repeatLastArgs:1,returnNumberType:i.NumberType.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:a.ArgumentTypes.RANGE},{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER}],returnNumberType:i.NumberType.NUMBER_PERCENT},PDURATION:{method:"pduration",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:a.ArgumentTypes.NUMBER,greaterThan:0}]},XNPV:{method:"xnpv",parameters:[{argumentType:a.ArgumentTypes.NUMBER,greaterThan:-1},{argumentType:a.ArgumentTypes.RANGE},{argumentType:a.ArgumentTypes.RANGE}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"FormulaTextPlugin",(function(){return p}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(267),a=n(35);function s(e){return(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})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(s,e);var t,n,i,a=f(s);function s(){return u(this,s),a.apply(this,arguments)}return t=s,(n=[{key:"formulatext",value:function(e,t){var n=this;return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),(function(){return new r.CellError(r.ErrorType.NA,o.ErrorMessage.WrongArgNumber)}),(function(e){var t;return null!==(t=n.serialization.getCellFormula(e))&&void 0!==t?t:new r.CellError(r.ErrorType.NA,o.ErrorMessage.Formula)}))}}])&&l(t.prototype,n),i&&l(t,i),s}(i.FunctionPlugin);p.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:a.ArgumentTypes.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"InformationPlugin",(function(){return v}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(101),i=n(39),a=n(69),s=n(50),u=n(35);function l(e){return(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})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(m,e);var t,n,l,p=d(m);function m(){return c(this,m),p.apply(this,arguments)}return t=m,(n=[{key:"isbinary",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISBINARY"),(function(e){return/^[01]{1,10}$/.test(e)}))}},{key:"iserr",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISERR"),(function(e){return e instanceof r.CellError&&e.type!==r.ErrorType.NA}))}},{key:"iserror",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),(function(e){return e instanceof r.CellError}))}},{key:"isformula",value:function(e,t){var n=this;return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),(function(){return new r.CellError(r.ErrorType.NA,i.ErrorMessage.WrongArgNumber)}),(function(e){var t=n.dependencyGraph.addressMapping.getCell(e);return t instanceof o.FormulaCellVertex||t instanceof o.MatrixVertex&&t.isFormula()}))}},{key:"isblank",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),(function(e){return e===s.EmptyValue}))}},{key:"isna",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),(function(e){return e instanceof r.CellError&&e.type==r.ErrorType.NA}))}},{key:"isnumber",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),s.isExtendedNumber)}},{key:"islogical",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISLOGICAL"),(function(e){return"boolean"==typeof e}))}},{key:"isref",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISREF"),(function(e){return e instanceof r.CellError&&(e.type==r.ErrorType.REF||e.type==r.ErrorType.CYCLE)}))}},{key:"istext",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISTEXT"),(function(e){return"string"==typeof e}))}},{key:"isnontext",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISNONTEXT"),(function(e){return!("string"==typeof e)}))}},{key:"column",value:function(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("COLUMN"),(function(){return t.col+1}),(function(e){return e.col+1}))}},{key:"columns",value:function(e,t){if(1!==e.args.length)return new r.CellError(r.ErrorType.NA,i.ErrorMessage.WrongArgNumber);if(e.args.some((function(e){return e.type===a.AstNodeType.EMPTY})))return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.EmptyArg);var n=e.args[0];return n.type===a.AstNodeType.CELL_RANGE?n.end.col-n.start.col+1:new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.CellRangeExpected)}},{key:"row",value:function(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ROW"),(function(){return t.row+1}),(function(e){return e.row+1}))}},{key:"rows",value:function(e,t){if(1!==e.args.length)return new r.CellError(r.ErrorType.NA,i.ErrorMessage.WrongArgNumber);if(e.args.some((function(e){return e.type===a.AstNodeType.EMPTY})))return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.EmptyArg);var n=e.args[0];return n.type===a.AstNodeType.CELL_RANGE?n.end.row-n.start.row+1:new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.CellRangeExpected)}},{key:"index",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("INDEX"),(function(e,t,o){var a;if(o<1||t<1)return new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.LessThanOne);if(o>e.width()||t>e.height())return new r.CellError(r.ErrorType.NUM,i.ErrorMessage.ValueLarge);var s=e.range();if(void 0===s)return null!==(a=e.topLeftCornerValue())&&void 0!==a?a:new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.CellRangeExpected);var u=s.getAddress(o-1,t-1);return n.dependencyGraph.getScalarValue(u)}))}},{key:"na",value:function(e,t){return new r.CellError(r.ErrorType.NA)}},{key:"sheet",value:function(e,t){var n=this;return this.runFunctionWithReferenceArgument(e.args,t,{parameters:[{argumentType:u.ArgumentTypes.STRING}]},(function(){return t.sheet+1}),(function(e){return e.sheet+1}),(function(e){var t=n.dependencyGraph.sheetMapping.get(e);return void 0!==t?t+1:new r.CellError(r.ErrorType.NA,i.ErrorMessage.SheetRef)}))}},{key:"sheets",value:function(e,t){var n=this;return this.runFunctionWithReferenceArgument(e.args,t,{parameters:[{argumentType:u.ArgumentTypes.STRING}]},(function(){return n.dependencyGraph.sheetMapping.numberOfSheets()}),(function(){return 1}),(function(){return new r.CellError(r.ErrorType.VALUE,i.ErrorMessage.CellRefExpected)}))}}])&&f(t.prototype,n),l&&f(t,l),m}(u.FunctionPlugin);v.implementedFunctions={COLUMN:{method:"column",parameters:[{argumentType:u.ArgumentTypes.NOERROR,optional:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0},COLUMNS:{method:"columns",isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0},ISBINARY:{method:"isbinary",parameters:[{argumentType:u.ArgumentTypes.STRING}]},ISERR:{method:"iserr",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},ISFORMULA:{method:"isformula",parameters:[{argumentType:u.ArgumentTypes.NOERROR}],doesNotNeedArgumentsToBeComputed:!0},ISNA:{method:"isna",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},ISREF:{method:"isref",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},ISERROR:{method:"iserror",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},ISBLANK:{method:"isblank",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},ISNUMBER:{method:"isnumber",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},ISLOGICAL:{method:"islogical",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},ISTEXT:{method:"istext",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},ISNONTEXT:{method:"isnontext",parameters:[{argumentType:u.ArgumentTypes.SCALAR}]},INDEX:{method:"index",parameters:[{argumentType:u.ArgumentTypes.RANGE},{argumentType:u.ArgumentTypes.NUMBER},{argumentType:u.ArgumentTypes.NUMBER,defaultValue:1}]},NA:{method:"na"},ROW:{method:"row",parameters:[{argumentType:u.ArgumentTypes.NOERROR,optional:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0},ROWS:{method:"rows",isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0},SHEET:{method:"sheet",parameters:[{argumentType:u.ArgumentTypes.NOERROR}],doesNotNeedArgumentsToBeComputed:!0},SHEETS:{method:"sheets",parameters:[{argumentType:u.ArgumentTypes.NOERROR}],doesNotNeedArgumentsToBeComputed:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"IsEvenPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"iseven",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),(function(e){return e%2==0}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"IsOddPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"isodd",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),(function(e){return e%2==1}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"LogarithmPlugin",(function(){return f}));n(347),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"log10",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LOG10"),Math.log10)}},{key:"log",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LOG"),(function(e,t){return Math.log(e)/Math.log(t)}))}},{key:"ln",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LN"),Math.log)}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={LOG10:{method:"log10",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]},LOG:{method:"log",parameters:[{argumentType:r.ArgumentTypes.NUMBER,greaterThan:0},{argumentType:r.ArgumentTypes.NUMBER,defaultValue:10,greaterThan:0}]},LN:{method:"ln",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"MatrixPlugin",(function(){return p}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(127),a=n(98),s=n(35);function u(e){return(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})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,s,u=f(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(t=u.call(this,e)).createCpuKernel=function(e,t){return function(){for(var n=[],r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];for(var a=0;a<t.height;++a){n.push([]);for(var s=0;s<t.width;++s)n[a][s]=e.apply({thread:{x:s,y:a}},o)}return n}},t.createGpuJsKernel=function(e,n){return t.interpreter.getGpuInstance().createKernel(e).setPrecision("unsigned").setOutput([n.width,n.height])},void 0===t.config.gpujs?t.createKernel=t.createCpuKernel:t.createKernel=t.createGpuJsKernel,t}return t=h,(n=[{key:"mmult",value:function(e,t){var n=this;return this.runMatrixFunction(e.args,t,this.metadata("MMULT"),(function(e,t){if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberRange);var s=Object(i.matrixSizeForMultiplication)(e.size,t.size),u=n.createKernel((function(e,t,n){for(var r=0,o=0;o<n;++o)r+=e[this.thread.y][o]*t[o][this.thread.x];return r}),s)(e.rawNumbers(),t.rawNumbers(),e.width());return a.SimpleRangeValue.onlyNumbersDataWithoutRange(u,s)}))}},{key:"maxpool",value:function(e,t){var n=this;return this.runMatrixFunction(e.args,t,this.metadata("MAXPOOL"),(function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e.hasOnlyNumbers())return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberRange);var u=Object(i.matrixSizeForPoolFunction)(e.size,t,s),l=n.createKernel((function(e,t,n){for(var r=this.thread.x*n,o=this.thread.y*n,i=e[o][r],a=0;a<t;a++)for(var s=0;s<t;s++)i=Math.max(i,e[o+a][r+s]);return i}),u)(e.rawNumbers(),t,s);return a.SimpleRangeValue.onlyNumbersDataWithoutRange(l,u)}))}},{key:"medianpool",value:function(e,t){var n=this;return this.runMatrixFunction(e.args,t,this.metadata("MEDIANPOOL"),(function(e,t){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e.hasOnlyNumbers())return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberRange);var u=Object(i.matrixSizeForPoolFunction)(e.size,t,s),l=n.createKernel((function(e,t,n){for(var r=this.thread.x*n,o=this.thread.y*n,i=e[o][r],a=0;a<t;a++)for(var s=0;s<t;s++)i=Math.max(i,e[o+a][r+s]);for(var u=e[o][r],l=0;l<t;l++)for(var c=0;c<t;c++)u=Math.min(u,e[o+l][r+c]);for(var f=t*t,h=u,d=i,p=42,m=0;m<32;m++){for(var v=(h+d)/2,g=0,y=0;y<t;y++)for(var E=0;E<t;E++)e[o+y][r+E]>v&&g++;if(t%2==0){if(g===f/2){p=v;break}g>f/2?h=v:d=v}else{if(g===(f-1)/2){p=v;break}g>(f-1)/2?h=v:d=v}}return p}),u)(e.rawNumbers(),t,s);return a.SimpleRangeValue.onlyNumbersDataWithoutRange(l,u)}))}},{key:"transpose",value:function(e,t){return this.runMatrixFunction(e.args,t,this.metadata("TRANSPOSE"),(function(e){if(!e.hasOnlyNumbers())return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NumberRange);for(var t=e.rawNumbers(),n=e.size,s=[],u=0;u<n.width;++u){s[u]=[];for(var l=0;l<n.height;++l)s[u][l]=t[l][u]}return a.SimpleRangeValue.onlyNumbersDataWithoutRange(s,Object(i.matrixSizeForTranspose)(n))}))}}])&&l(t.prototype,n),s&&l(t,s),h}(s.FunctionPlugin);p.implementedFunctions={MMULT:{method:"mmult",parameters:[{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.RANGE}]},TRANSPOSE:{method:"transpose",parameters:[{argumentType:s.ArgumentTypes.RANGE}]},MAXPOOL:{method:"maxpool",parameters:[{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.NUMBER},{argumentType:s.ArgumentTypes.NUMBER,optionalArg:!0}]},MEDIANPOOL:{method:"medianpool",parameters:[{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.NUMBER},{argumentType:s.ArgumentTypes.NUMBER,optionalArg:!0}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"MedianPlugin",(function(){return d}));n(70),n(130),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35);function a(e){return(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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"median",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MEDIAN"),(function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var a=n.interpreter.arithmeticHelper.coerceNumbersExactRanges(t);return a instanceof r.CellError?a:0===a.length?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.OneValue):(a.sort((function(e,t){return e-t})),a.length%2==0?(a[a.length/2-1]+a[a.length/2])/2:a[Math.floor(a.length/2)])}))}},{key:"large",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("LARGE"),(function(e,t){var i=n.interpreter.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return i instanceof r.CellError?i:(i.sort((function(e,t){return e-t})),(t=Math.trunc(t))>i.length?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueLarge):i[i.length-t])}))}},{key:"small",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("SMALL"),(function(e,t){var i=n.interpreter.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return i instanceof r.CellError?i:(i.sort((function(e,t){return e-t})),(t=Math.trunc(t))>i.length?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueLarge):i[t-1])}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);d.implementedFunctions={MEDIAN:{method:"median",parameters:[{argumentType:i.ArgumentTypes.ANY}],repeatLastArgs:1},LARGE:{method:"large",parameters:[{argumentType:i.ArgumentTypes.RANGE},{argumentType:i.ArgumentTypes.NUMBER,minValue:1}]},SMALL:{method:"small",parameters:[{argumentType:i.ArgumentTypes.RANGE},{argumentType:i.ArgumentTypes.NUMBER,minValue:1}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"ModuloPlugin",(function(){return h}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(35);function i(e){return(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})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,o,i=l(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"mod",value:function(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(function(e,t){return 0===t?new r.CellError(r.ErrorType.DIV_BY_ZERO):e%t}))}}])&&s(t.prototype,n),o&&s(t,o),c}(o.FunctionPlugin);h.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:o.ArgumentTypes.NUMBER},{argumentType:o.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"NumericAggregationPlugin",(function(){return R}));n(230),n(48),n(94),n(19),n(38),n(41),n(23),n(2),n(24),n(7),n(1),n(25),n(8),n(10),n(11),n(3),n(4);var r=n(79),o=n(22),i=n(39),a=n(69),s=n(112),u=n(50),l=n(98),c=n(35);function f(e){return(f="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})(e)}function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function C(e){return Object(u.isExtendedNumber)(e)&&!Number.isFinite(Object(u.getRawValue)(e))?0:e}var w=function(){function e(t,n,r){y(this,e),this.sumsq=t,this.sum=n,this.count=r}return T(e,[{key:"compose",value:function(t){return new e(this.sumsq+t.sumsq,this.sum+t.sum,this.count+t.count)}},{key:"averageValue",value:function(){return this.count>0?this.sum/this.count:void 0}},{key:"varSValue",value:function(){return this.count>1?(this.sumsq-this.sum*this.sum/this.count)/(this.count-1):void 0}},{key:"varPValue",value:function(){return this.count>0?(this.sumsq-this.sum*this.sum/this.count)/this.count:void 0}}],[{key:"single",value:function(t){return new e(t*t,t,1)}}]),e}();w.empty=new w(0,0,0);var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(n,e);var t=m(n);function n(){var e;return y(this,n),(e=t.apply(this,arguments)).addWithEpsilonRaw=function(t,n){return e.interpreter.arithmeticHelper.addWithEpsilonRaw(t,n)},e}return T(n,[{key:"sum",value:function(e,t){return this.doSum(e.args,t)}},{key:"sumsq",value:function(e,t){return this.reduce(e.args,t,0,"SUMSQ",this.addWithEpsilonRaw,(function(e){return Math.pow(Object(u.getRawValue)(e),2)}),b)}},{key:"max",value:function(e,t){return this.doMax(e.args,t)}},{key:"maxa",value:function(e,t){return C(this.reduce(e.args,t,Number.NEGATIVE_INFINITY,"MAXA",(function(e,t){return Math.max(e,t)}),u.getRawValue,O))}},{key:"min",value:function(e,t){return this.doMin(e.args,t)}},{key:"mina",value:function(e,t){return C(this.reduce(e.args,t,Number.POSITIVE_INFINITY,"MINA",(function(e,t){return Math.min(e,t)}),u.getRawValue,O))}},{key:"count",value:function(e,t){return this.doCount(e.args,t)}},{key:"counta",value:function(e,t){return this.doCounta(e.args,t)}},{key:"average",value:function(e,t){return this.doAverage(e.args,t)}},{key:"averagea",value:function(e,t){var n,r=this.reduce(e.args,t,w.empty,"_AGGREGATE_A",(function(e,t){return e.compose(t)}),(function(e){return w.single(Object(u.getRawValue)(e))}),O);return r instanceof o.CellError?r:null!==(n=r.averageValue())&&void 0!==n?n:new o.CellError(o.ErrorType.DIV_BY_ZERO)}},{key:"vars",value:function(e,t){return this.doVarS(e.args,t)}},{key:"varp",value:function(e,t){return this.doVarP(e.args,t)}},{key:"vara",value:function(e,t){var n,r=this.reduceAggregateA(e.args,t);return r instanceof o.CellError?r:null!==(n=r.varSValue())&&void 0!==n?n:new o.CellError(o.ErrorType.DIV_BY_ZERO)}},{key:"varpa",value:function(e,t){var n,r=this.reduceAggregateA(e.args,t);return r instanceof o.CellError?r:null!==(n=r.varPValue())&&void 0!==n?n:new o.CellError(o.ErrorType.DIV_BY_ZERO)}},{key:"stdevs",value:function(e,t){return this.doStdevS(e.args,t)}},{key:"stdevp",value:function(e,t){return this.doStdevP(e.args,t)}},{key:"stdeva",value:function(e,t){var n=this.reduceAggregateA(e.args,t);if(n instanceof o.CellError)return n;var r=n.varSValue();return void 0===r?new o.CellError(o.ErrorType.DIV_BY_ZERO):Math.sqrt(r)}},{key:"stdevpa",value:function(e,t){var n=this.reduceAggregateA(e.args,t);if(n instanceof o.CellError)return n;var r=n.varPValue();return void 0===r?new o.CellError(o.ErrorType.DIV_BY_ZERO):Math.sqrt(r)}},{key:"product",value:function(e,t){return this.doProduct(e.args,t)}},{key:"subtotal",value:function(e,t){if(e.args.length<1)return new o.CellError(o.ErrorType.NA,i.ErrorMessage.WrongArgNumber);var n=this.coerceToType(this.evaluateAst(e.args[0],t),{argumentType:c.ArgumentTypes.NUMBER}),r=e.args.slice(1);switch(n){case 1:case 101:return this.doAverage(r,t);case 2:case 102:return this.doCount(r,t);case 3:case 103:return this.doCounta(r,t);case 4:case 104:return this.doMax(r,t);case 5:case 105:return this.doMin(r,t);case 6:case 106:return this.doProduct(r,t);case 7:case 107:return this.doStdevS(r,t);case 8:case 108:return this.doStdevP(r,t);case 9:case 109:return this.doSum(r,t);case 10:case 110:return this.doVarS(r,t);case 11:case 111:return this.doVarP(r,t);default:return new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.BadMode)}}},{key:"reduceAggregate",value:function(e,t){return this.reduce(e,t,w.empty,"_AGGREGATE",(function(e,t){return e.compose(t)}),(function(e){return w.single(Object(u.getRawValue)(e))}),b)}},{key:"reduceAggregateA",value:function(e,t){return this.reduce(e,t,w.empty,"_AGGREGATE_A",(function(e,t){return e.compose(t)}),(function(e){return w.single(Object(u.getRawValue)(e))}),O)}},{key:"doAverage",value:function(e,t){var n,r=this.reduceAggregate(e,t);return r instanceof o.CellError?r:null!==(n=r.averageValue())&&void 0!==n?n:new o.CellError(o.ErrorType.DIV_BY_ZERO)}},{key:"doVarS",value:function(e,t){var n,r=this.reduceAggregate(e,t);return r instanceof o.CellError?r:null!==(n=r.varSValue())&&void 0!==n?n:new o.CellError(o.ErrorType.DIV_BY_ZERO)}},{key:"doVarP",value:function(e,t){var n,r=this.reduceAggregate(e,t);return r instanceof o.CellError?r:null!==(n=r.varPValue())&&void 0!==n?n:new o.CellError(o.ErrorType.DIV_BY_ZERO)}},{key:"doStdevS",value:function(e,t){var n=this.reduceAggregate(e,t);if(n instanceof o.CellError)return n;var r=n.varSValue();return void 0===r?new o.CellError(o.ErrorType.DIV_BY_ZERO):Math.sqrt(r)}},{key:"doStdevP",value:function(e,t){var n=this.reduceAggregate(e,t);if(n instanceof o.CellError)return n;var r=n.varPValue();return void 0===r?new o.CellError(o.ErrorType.DIV_BY_ZERO):Math.sqrt(r)}},{key:"doCount",value:function(e,t){return this.reduce(e,t,0,"COUNT",(function(e,t){return e+t}),u.getRawValue,(function(e){return Object(u.isExtendedNumber)(e)?1:0}))}},{key:"doCounta",value:function(e,t){return this.reduce(e,t,0,"COUNTA",(function(e,t){return e+t}),u.getRawValue,(function(e){return e===u.EmptyValue?0:1}))}},{key:"doMax",value:function(e,t){return C(this.reduce(e,t,Number.NEGATIVE_INFINITY,"MAX",(function(e,t){return Math.max(e,t)}),u.getRawValue,b))}},{key:"doMin",value:function(e,t){return C(this.reduce(e,t,Number.POSITIVE_INFINITY,"MAX",(function(e,t){return Math.min(e,t)}),u.getRawValue,b))}},{key:"doSum",value:function(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,u.getRawValue,b)}},{key:"doProduct",value:function(e,t){return this.reduce(e,t,1,"PRODUCT",(function(e,t){return e*t}),u.getRawValue,b)}},{key:"reduce",value:function(e,t,n,r,s,u,c){var f=this;return e.length<1?new o.CellError(o.ErrorType.NA,i.ErrorMessage.WrongArgNumber):e.reduce((function(e,n){if(e instanceof o.CellError)return e;if(n.type===a.AstNodeType.CELL_RANGE||n.type===a.AstNodeType.COLUMN_RANGE||n.type===a.AstNodeType.ROW_RANGE)return f.evaluateRange(n,t,e,r,s,u,c);var i;if((i=f.evaluateAst(n,t))instanceof l.SimpleRangeValue)return Array.from(i.valuesFromTopLeftCorner()).map(c).filter((function(e){return void 0!==e})).map((function(e){return e instanceof o.CellError?e:u(e)})).reduce((function(e,t){return e instanceof o.CellError?e:t instanceof o.CellError?t:s(e,t)}),e);if(n.type===a.AstNodeType.CELL_REFERENCE){if(void 0===(i=c(i)))return e}else if(i=f.coerceScalarToNumberOrError(i),void 0===(i=c(i)))return e;return i instanceof o.CellError?i:s(e,u(i))}),n)}},{key:"evaluateRange",value:function(e,t,n,a,s,u,l){var c;try{c=r.AbsoluteCellRange.fromAst(e,t)}catch(e){if(e.message===r.DIFFERENT_SHEETS_ERROR)return new o.CellError(o.ErrorType.REF,i.ErrorMessage.RangeManySheets);throw e}var f=c.start,h=c.end,d=this.dependencyGraph.getRange(f,h);if(!d)throw new Error("Range does not exists in graph");var p=d.getFunctionValue(a);p||(p=this.getRangeValues(a,c,u,l).reduce((function(e,t){return e instanceof o.CellError?e:t instanceof o.CellError?t:s(e,t)}),n),d.setFunctionValue(a,p));return p}},{key:"getRangeValues",value:function(e,t,n,r){var i,a=[],s=this.dependencyGraph.rangeMapping.findSmallerRange(t),u=s.smallerRangeVertex,l=s.restRange,c=this.dependencyGraph.getRange(t.start,t.end);if(u&&this.dependencyGraph.existsEdge(u,c)){var f=u.getFunctionValue(e);if(f)a.push(f);else{var d,p=h(u.range.addresses(this.dependencyGraph));try{for(p.s();!(d=p.n()).done;){var m=d.value,v=r(this.dependencyGraph.getScalarValue(m));v instanceof o.CellError?a.push(v):void 0!==v&&a.push(n(v))}}catch(e){p.e(e)}finally{p.f()}}i=l}else i=t;var g,y=h(i.addresses(this.dependencyGraph));try{for(y.s();!(g=y.n()).done;){var E=g.value,T=r(this.dependencyGraph.getScalarValue(E));T instanceof o.CellError?a.push(T):void 0!==T&&a.push(n(T))}}catch(e){y.e(e)}finally{y.f()}return a}}]),n}(c.FunctionPlugin);function b(e){return Object(u.isExtendedNumber)(e)||e instanceof o.CellError?e:void 0}function O(e){return"boolean"==typeof e?Object(s.coerceBooleanToNumber)(e):Object(u.isExtendedNumber)(e)||e instanceof o.CellError?e:"string"==typeof e?0:void 0}R.implementedFunctions={SUM:{method:"sum"},SUMSQ:{method:"sumsq"},MAX:{method:"max"},MIN:{method:"min"},MAXA:{method:"maxa"},MINA:{method:"mina"},COUNT:{method:"count"},COUNTA:{method:"counta"},AVERAGE:{method:"average"},AVERAGEA:{method:"averagea"},PRODUCT:{method:"product"},"VAR.S":{method:"vars"},"VAR.P":{method:"varp"},VARA:{method:"vara"},VARPA:{method:"varpa"},"STDEV.S":{method:"stdevs"},"STDEV.P":{method:"stdevp"},STDEVA:{method:"stdeva"},STDEVPA:{method:"stdevpa"},SUBTOTAL:{method:"subtotal"}},R.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"}},function(e,t,n){"use strict";n.r(t),n.d(t,"PowerPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"power",value:function(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:r.ArgumentTypes.NUMBER},{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"RadiansPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"radians",value:function(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),(function(e){return e*(Math.PI/180)}))}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"RadixConversionPlugin",(function(){return p}));n(93),n(34),n(60),n(1),n(24),n(7),n(8),n(10),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(259),a=n(35);function s(e){return(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})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(s,e);var t,n,i,a=f(s);function s(){return u(this,s),a.apply(this,arguments)}return t=s,(n=[{key:"dec2bin",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),(function(e,t){return v(e,2,t)}))}},{key:"dec2oct",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),(function(e,t){return v(e,8,t)}))}},{key:"dec2hex",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),(function(e,t){return v(e,16,t)}))}},{key:"bin2dec",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),(function(e){var t=m(e,2,10);return void 0===t?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotBinary):T(t,2)}))}},{key:"bin2oct",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),(function(e,t){var n=m(e,2,10);return void 0===n?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotBinary):v(T(n,2),8,t)}))}},{key:"bin2hex",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),(function(e,t){var n=m(e,2,10);return void 0===n?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotBinary):v(T(n,2),16,t)}))}},{key:"oct2dec",value:function(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),(function(e){var t=m(e,8,10);return void 0===t?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotOctal):T(t,8)}))}},{key:"oct2bin",value:function(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),(function(e,t){var n=m(e,8,10);return void 0===n?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotOctal):v(T(n,8),2,t)}))}},{key:"oct2hex",value:function(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),(function(e,t){var n=m(e,8,10);return void 0===n?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotOctal):v(T(n,8),16,t)}))}},{key:"hex2dec",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),(function(e){var t=m(e,16,10);return void 0===t?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotHex):T(t,16)}))}},{key:"hex2bin",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),(function(e,t){var n=m(e,16,10);return void 0===n?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotHex):v(T(n,16),2,t)}))}},{key:"hex2oct",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),(function(e,t){var n=m(e,16,10);return void 0===n?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotHex):v(T(n,16),8,t)}))}},{key:"base",value:function(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),y)}},{key:"decimal",value:function(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),(function(e,t){var n=m(e,t,255);return void 0===n?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NotHex):parseInt(n,t)}))}}])&&l(t.prototype,n),i&&l(t,i),s}(a.FunctionPlugin);function m(e,t,n){var r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".substr(0,t),o=new RegExp("^[".concat(r,"]+$"));if(!(e.length>n)&&o.test(e))return e}function v(e,t,n){if(e>function(e){return-g(e)-1}(t))return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueBaseLarge);if(e<g(t))return new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueBaseSmall);var a=E(e,t);return void 0===n||e<0?a:a.length>n?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.ValueBaseLong):Object(i.padLeft)(a,n)}function g(e){return-Math.pow(e,10)/2}function y(e,t,n){var r=E(e,t);return void 0!==n&&n>r.length?Object(i.padLeft)(r,n):r}function E(e,t){return(e+(e<0?Math.pow(t,10):0)).toString(t).toUpperCase()}function T(e,t){var n=parseInt(e,t),r=Math.pow(t,10);return n>=r/2?n-r:n}p.implementedFunctions={DEC2BIN:{method:"dec2bin",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2OCT:{method:"dec2oct",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2HEX:{method:"dec2hex",parameters:[{argumentType:a.ArgumentTypes.NUMBER},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},BIN2DEC:{method:"bin2dec",parameters:[{argumentType:a.ArgumentTypes.STRING}]},BIN2OCT:{method:"bin2oct",parameters:[{argumentType:a.ArgumentTypes.STRING},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},BIN2HEX:{method:"bin2hex",parameters:[{argumentType:a.ArgumentTypes.STRING},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},OCT2DEC:{method:"oct2dec",parameters:[{argumentType:a.ArgumentTypes.STRING}]},OCT2BIN:{method:"oct2bin",parameters:[{argumentType:a.ArgumentTypes.STRING},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},OCT2HEX:{method:"oct2hex",parameters:[{argumentType:a.ArgumentTypes.STRING},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},HEX2DEC:{method:"hex2dec",parameters:[{argumentType:a.ArgumentTypes.STRING}]},HEX2BIN:{method:"hex2bin",parameters:[{argumentType:a.ArgumentTypes.STRING},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},HEX2OCT:{method:"hex2oct",parameters:[{argumentType:a.ArgumentTypes.STRING},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:0,maxValue:10}]},DECIMAL:{method:"decimal",parameters:[{argumentType:a.ArgumentTypes.STRING},{argumentType:a.ArgumentTypes.NUMBER,minValue:2,maxValue:36}]},BASE:{method:"base",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:0},{argumentType:a.ArgumentTypes.NUMBER,minValue:2,maxValue:36},{argumentType:a.ArgumentTypes.NUMBER,optionalArg:!0,minValue:0,maxValue:255}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"RandomPlugin",(function(){return d}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35);function a(e){return(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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"rand",value:function(e,t){return this.runFunction(e.args,t,this.metadata("RAND"),Math.random)}},{key:"randbetween",value:function(e,t){return this.runFunction(e.args,t,this.metadata("RANDBETWEEN"),(function(e,t){return t<e?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.WrongOrder):((e=Math.ceil(e))===(t=Math.floor(t)+1)&&(t+=1),e+Math.floor(Math.random()*(t-e)))}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);d.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER}],isVolatile:!0}}},function(e,t,n){"use strict";n.r(t),n.d(t,"findNextOddNumber",(function(){return d})),n.d(t,"findNextEvenNumber",(function(){return p})),n.d(t,"RoundingPlugin",(function(){return m}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35);function a(e){return(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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/function d(e){var t=Math.ceil(e);return t%2==1?t:t+1}function p(e){var t=Math.ceil(e);return t%2==0?t:t+1}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"roundup",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(function(e,t){var n=Math.pow(10,t);return e<0?-Math.ceil(-e*n)/n:Math.ceil(e*n)/n}))}},{key:"rounddown",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(function(e,t){var n=Math.pow(10,t);return e<0?-Math.floor(-e*n)/n:Math.floor(e*n)/n}))}},{key:"round",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ROUND"),(function(e,t){var n=Math.pow(10,t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n}))}},{key:"trunc",value:function(e,t){return this.rounddown(e,t)}},{key:"intFunc",value:function(e,t){return this.runFunction(e.args,t,this.metadata("INT"),(function(e){return e<0?-Math.floor(-e):Math.floor(e)}))}},{key:"even",value:function(e,t){return this.runFunction(e.args,t,this.metadata("EVEN"),(function(e){return e<0?-p(-e):p(e)}))}},{key:"odd",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),(function(e){return e<0?-d(-e):d(e)}))}},{key:"ceilingmath",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.MATH"),(function(e,t,n){return 0===t||0===e?0:(t=Math.abs(t),1===n&&e<0&&(t=-t),Math.ceil(e/t)*t)}))}},{key:"ceiling",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CEILING"),(function(e,t){return 0===e?0:0===t?new r.CellError(r.ErrorType.DIV_BY_ZERO):e>0&&t<0?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.DistinctSigns):Math.ceil(e/t)*t}))}},{key:"ceilingprecise",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.PRECISE"),(function(e,t){return 0===t||0===e?0:(t=Math.abs(t),Math.ceil(e/t)*t)}))}},{key:"floormath",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.MATH"),(function(e,t,n){return 0===t||0===e?0:(t=Math.abs(t),1===n&&e<0&&(t*=-1),Math.floor(e/t)*t)}))}},{key:"floor",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR"),(function(e,t){return 0===e?0:0===t?new r.CellError(r.ErrorType.DIV_BY_ZERO):e>0&&t<0?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.DistinctSigns):Math.floor(e/t)*t}))}},{key:"floorprecise",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.PRECISE"),(function(e,t){return 0===t||0===e?0:(t=Math.abs(t),Math.floor(e/t)*t)}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);m.implementedFunctions={ROUNDUP:{method:"roundup",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:0}]},ROUNDDOWN:{method:"rounddown",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:0}]},ROUND:{method:"round",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:0}]},TRUNC:{method:"trunc",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:0}]},INT:{method:"intFunc",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},EVEN:{method:"even",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ODD:{method:"odd",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},"CEILING.MATH":{method:"ceilingmath",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:1},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:0}]},CEILING:{method:"ceiling",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER}]},"CEILING.PRECISE":{method:"ceilingprecise",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:1}]},"FLOOR.MATH":{method:"floormath",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:1},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:0}]},FLOOR:{method:"floor",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER}]},"FLOOR.PRECISE":{method:"floorprecise",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:1}]}},m.aliases={"ISO.CEILING":"CEILING.PRECISE"}},function(e,t,n){"use strict";n.r(t),n.d(t,"SqrtPlugin",(function(){return f}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"sqrt",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}])&&a(t.prototype,n),r&&a(t,r),l}(r.FunctionPlugin);f.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:r.ArgumentTypes.NUMBER}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"SumifPlugin",(function(){return w}));n(41),n(20),n(74),n(8),n(10),n(1),n(11),n(3),n(2),n(4),n(23),n(19),n(25),n(24),n(7);var r=n(22),o=n(39),i=n(675),a=n(50),s=n(35);function u(e){return(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})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),e}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var y=function(){function e(t,n){m(this,e),this.sum=t,this.count=n}return g(e,[{key:"compose",value:function(t){return new e(this.sum+t.sum,this.count+t.count)}},{key:"averageValue",value:function(){return this.count>0?this.sum/this.count:void 0}}],[{key:"single",value:function(t){return new e(t,1)}}]),e}();function E(e){var t=e.map((function(e){return"".concat(e.conditionRange.range().sheet,",").concat(e.conditionRange.range().start.col,",").concat(e.conditionRange.range().start.row)}));return["SUMIF"].concat(d(t)).join(",")}function T(e){var t=e.map((function(e){return"".concat(e.conditionRange.range().sheet,",").concat(e.conditionRange.range().start.col,",").concat(e.conditionRange.range().start.row)}));return["AVERAGEIF"].concat(d(t)).join(",")}function C(e){var t=e.map((function(e){return"".concat(e.conditionRange.range().sheet,",").concat(e.conditionRange.range().start.col,",").concat(e.conditionRange.range().start.row)}));return["COUNTIFS"].concat(d(t)).join(",")}y.empty=new y(0,0);var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(n,e);var t=c(n);function n(){return m(this,n),t.apply(this,arguments)}return g(n,[{key:"sumif",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("SUMIF"),(function(e,t,s){var u=n.interpreter.criterionBuilder.fromCellValue(t,n.interpreter.arithmeticHelper);return void 0===u?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.BadCriterion):(s=null!=s?s:e,new i.CriterionFunctionCompute(n.interpreter,E,0,(function(e,t){return n.interpreter.arithmeticHelper.nonstrictadd(e,t)}),(function(e){return Object(a.getRawValue)(e)})).compute(s,[new i.Condition(e,u)]))}))}},{key:"sumifs",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("SUMIFS"),(function(e){for(var t=[],s=0;s<(arguments.length<=1?0:arguments.length-1);s+=2){var u=s+1<1||arguments.length<=s+1?void 0:arguments[s+1],l=n.interpreter.criterionBuilder.fromCellValue(s+1+1<1||arguments.length<=s+1+1?void 0:arguments[s+1+1],n.interpreter.arithmeticHelper);if(void 0===l)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.BadCriterion);t.push(new i.Condition(u,l))}return new i.CriterionFunctionCompute(n.interpreter,E,0,(function(e,t){return n.interpreter.arithmeticHelper.nonstrictadd(e,t)}),(function(e){return Object(a.getRawValue)(e)})).compute(e,t)}))}},{key:"averageif",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("AVERAGEIF"),(function(e,t,s){var u=n.interpreter.criterionBuilder.fromCellValue(t,n.interpreter.arithmeticHelper);if(void 0===u)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.BadCriterion);s=null!=s?s:e;var l=new i.CriterionFunctionCompute(n.interpreter,T,y.empty,(function(e,t){return e.compose(t)}),(function(e){return Object(a.isExtendedNumber)(e)?y.single(Object(a.getRawValue)(e)):y.empty})).compute(s,[new i.Condition(e,u)]);return l instanceof r.CellError?l:l.averageValue()||new r.CellError(r.ErrorType.DIV_BY_ZERO)}))}},{key:"countif",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("COUNTIF"),(function(e,t){var a=n.interpreter.criterionBuilder.fromCellValue(t,n.interpreter.arithmeticHelper);return void 0===a?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.BadCriterion):new i.CriterionFunctionCompute(n.interpreter,(function(){return"COUNTIF"}),0,(function(e,t){return e+t}),(function(){return 1})).compute(e,[new i.Condition(e,a)])}))}},{key:"countifs",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("COUNTIFS"),(function(){for(var e=[],t=0;t<arguments.length;t+=2){var a=t<0||arguments.length<=t?void 0:arguments[t],s=n.interpreter.criterionBuilder.fromCellValue(t+1<0||arguments.length<=t+1?void 0:arguments[t+1],n.interpreter.arithmeticHelper);if(void 0===s)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.BadCriterion);e.push(new i.Condition(a,s))}return new i.CriterionFunctionCompute(n.interpreter,C,0,(function(e,t){return e+t}),(function(){return 1})).compute(e[0].conditionRange,e)}))}}]),n}(s.FunctionPlugin);w.implementedFunctions={SUMIF:{method:"sumif",parameters:[{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.NOERROR},{argumentType:s.ArgumentTypes.RANGE,optionalArg:!0}]},COUNTIF:{method:"countif",parameters:[{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.NOERROR}]},AVERAGEIF:{method:"averageif",parameters:[{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.NOERROR},{argumentType:s.ArgumentTypes.RANGE,optionalArg:!0}]},SUMIFS:{method:"sumifs",parameters:[{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.NOERROR}],repeatLastArgs:2},COUNTIFS:{method:"countifs",parameters:[{argumentType:s.ArgumentTypes.RANGE},{argumentType:s.ArgumentTypes.NOERROR}],repeatLastArgs:2}}},function(e,t,n){"use strict";n.r(t),n.d(t,"SumprodPlugin",(function(){return p}));n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(50),a=n(35);function s(e){return(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})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,a,s=f(h);function h(){return u(this,h),s.apply(this,arguments)}return t=h,(n=[{key:"sumproduct",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("SUMPRODUCT"),(function(e,t){if(e.numberOfElements()!==t.numberOfElements())return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.EqualLength);for(var a,s,u=0,l=e.iterateValuesFromTopLeftCorner(),c=t.iterateValuesFromTopLeftCorner();a=l.next(),s=c.next(),!a.done&&!s.done;){if(a.value instanceof r.CellError)return a.value;if(s.value instanceof r.CellError)return s.value;var f=n.coerceScalarToNumberOrError(a.value),h=n.coerceScalarToNumberOrError(s.value);Object(i.isExtendedNumber)(f)&&Object(i.isExtendedNumber)(h)&&(u+=Object(i.getRawValue)(f)*Object(i.getRawValue)(h))}return u}))}}])&&l(t.prototype,n),a&&l(t,a),h}(a.FunctionPlugin);p.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:a.ArgumentTypes.RANGE},{argumentType:a.ArgumentTypes.RANGE}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"TextPlugin",(function(){return d}));n(20),n(34),n(63),n(61),n(382),n(19),n(93),n(60),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35);function a(e){return(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})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,i,a=c(f);function f(){return s(this,f),a.apply(this,arguments)}return t=f,(n=[{key:"concatenate",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CONCATENATE"),(function(){var e;return(e="").concat.apply(e,arguments)}))}},{key:"split",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SPLIT"),(function(e,t){var n=e.split(" ");return t>=n.length||t<0?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.IndexBounds):n[t]}))}},{key:"len",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LEN"),(function(e){return e.length}))}},{key:"lower",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LOWER"),(function(e){return e.toLowerCase()}))}},{key:"trim",value:function(e,t){return this.runFunction(e.args,t,this.metadata("TRIM"),(function(e){return e.replace(/^ +| +$/g,"").replace(/ +/g," ")}))}},{key:"proper",value:function(e,t){return this.runFunction(e.args,t,this.metadata("PROPER"),(function(e){return e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()}))}))}},{key:"clean",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CLEAN"),(function(e){return e.replace(/[\u0000-\u001F]/g,"")}))}},{key:"exact",value:function(e,t){return this.runFunction(e.args,t,this.metadata("EXACT"),(function(e,t){return e===t}))}},{key:"rept",value:function(e,t){return this.runFunction(e.args,t,this.metadata("REPT"),(function(e,t){return t<0?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NegativeCount):e.repeat(t)}))}},{key:"right",value:function(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),(function(e,t){return t<0?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NegativeLength):0===t?"":e.slice(-t)}))}},{key:"left",value:function(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),(function(e,t){return t<0?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NegativeLength):e.slice(0,t)}))}},{key:"mid",value:function(e,t){return this.runFunction(e.args,t,this.metadata("MID"),(function(e,t,n){return t<1?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.LessThanOne):n<0?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NegativeLength):e.substring(t-1,t+n-1)}))}},{key:"replace",value:function(e,t){return this.runFunction(e.args,t,this.metadata("REPLACE"),(function(e,t,n,i){return t<1?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.LessThanOne):n<0?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.NegativeLength):e.substring(0,t-1)+i+e.substring(t+n-1)}))}},{key:"search",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("SEARCH"),(function(e,t,i){if(i<1||i>t.length)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.LengthBounds);var a,s=t.substring(i-1).toLowerCase();return a=n.interpreter.arithmeticHelper.requiresRegex(e)?n.interpreter.arithmeticHelper.searchString(e,s):s.indexOf(e.toLowerCase()),(a+=i)>0?a:new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.PatternNotFound)}))}},{key:"substitute",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SUBSTITUTE"),(function(e,t,n,i){var a,s=new RegExp(t,"g");if(void 0===i)return e.replace(s,n);if(i<1)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.LessThanOne);for(var u=0;null!==(a=s.exec(e));)if(i===++u)return e.substring(0,a.index)+n+e.substring(s.lastIndex);return e}))}},{key:"find",value:function(e,t){return this.runFunction(e.args,t,this.metadata("FIND"),(function(e,t,n){if(n<1||n>t.length)return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.IndexBounds);var i=t.substring(n-1).indexOf(e)+n;return i>0?i:new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.PatternNotFound)}))}},{key:"t",value:function(e,t){return this.runFunction(e.args,t,this.metadata("T"),(function(e){return e instanceof r.CellError||"string"==typeof e?e:""}))}},{key:"upper",value:function(e,t){return this.runFunction(e.args,t,this.metadata("UPPER"),(function(e){return e.toUpperCase()}))}}])&&u(t.prototype,n),i&&u(t,i),f}(i.FunctionPlugin);d.implementedFunctions={CONCATENATE:{method:"concatenate",parameters:[{argumentType:i.ArgumentTypes.STRING}],repeatLastArgs:1,expandRanges:!0},EXACT:{method:"exact",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.STRING}]},SPLIT:{method:"split",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER}]},LEN:{method:"len",parameters:[{argumentType:i.ArgumentTypes.STRING}]},LOWER:{method:"lower",parameters:[{argumentType:i.ArgumentTypes.STRING}]},MID:{method:"mid",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER}]},TRIM:{method:"trim",parameters:[{argumentType:i.ArgumentTypes.STRING}]},T:{method:"t",parameters:[{argumentType:i.ArgumentTypes.SCALAR}]},PROPER:{method:"proper",parameters:[{argumentType:i.ArgumentTypes.STRING}]},CLEAN:{method:"clean",parameters:[{argumentType:i.ArgumentTypes.STRING}]},REPT:{method:"rept",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER}]},RIGHT:{method:"right",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:1}]},LEFT:{method:"left",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:1}]},REPLACE:{method:"replace",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.STRING}]},SEARCH:{method:"search",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:1}]},SUBSTITUTE:{method:"substitute",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER,optionalArg:!0}]},FIND:{method:"find",parameters:[{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.STRING},{argumentType:i.ArgumentTypes.NUMBER,defaultValue:1}]},UPPER:{method:"upper",parameters:[{argumentType:i.ArgumentTypes.STRING}]}}},function(e,t,n){n(29)({target:"String",proto:!0},{repeat:n(261)})},function(e,t,n){"use strict";n.r(t),n.d(t,"TrigonometryPlugin",(function(){return p}));n(384),n(677),n(385),n(678),n(680),n(681),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(35),a=n(268);function s(e){return(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})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,i,s=f(h);function h(){return u(this,h),s.apply(this,arguments)}return t=h,(n=[{key:"acos",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ACOS"),Math.acos)}},{key:"asin",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ASIN"),Math.asin)}},{key:"cos",value:function(e,t){return this.runFunction(e.args,t,this.metadata("COS"),Math.cos)}},{key:"sin",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SIN"),Math.sin)}},{key:"tan",value:function(e,t){return this.runFunction(e.args,t,this.metadata("TAN"),Math.tan)}},{key:"atan",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ATAN"),Math.atan)}},{key:"atan2",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ATAN2"),(function(e,t){return 0===e&&0===t?new r.CellError(r.ErrorType.DIV_BY_ZERO):Math.atan2(t,e)}))}},{key:"cot",value:function(e,t){return this.runFunction(e.args,t,this.metadata("COT"),(function(e){return 0===e?new r.CellError(r.ErrorType.DIV_BY_ZERO):1/Math.tan(e)}))}},{key:"acot",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),(function(e){return 0===e?a.PI/2:Math.atan(1/e)}))}},{key:"sec",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SEC"),(function(e){return 1/Math.cos(e)}))}},{key:"csc",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CSC"),(function(e){return 0===e?new r.CellError(r.ErrorType.DIV_BY_ZERO):1/Math.sin(e)}))}},{key:"sinh",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SINH"),Math.sinh)}},{key:"asinh",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ASINH"),Math.asinh)}},{key:"cosh",value:function(e,t){return this.runFunction(e.args,t,this.metadata("COSH"),Math.cosh)}},{key:"acosh",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ACOSH"),Math.acosh)}},{key:"tanh",value:function(e,t){return this.runFunction(e.args,t,this.metadata("TANH"),Math.tanh)}},{key:"atanh",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ATANH"),Math.atanh)}},{key:"coth",value:function(e,t){return this.runFunction(e.args,t,this.metadata("COTH"),(function(e){return 0===e?new r.CellError(r.ErrorType.DIV_BY_ZERO):1/Math.tanh(e)}))}},{key:"acoth",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),(function(e){return 0===e?new r.CellError(r.ErrorType.NUM,o.ErrorMessage.NonZero):Math.atanh(1/e)}))}},{key:"sech",value:function(e,t){return this.runFunction(e.args,t,this.metadata("SECH"),(function(e){return 1/Math.cosh(e)}))}},{key:"csch",value:function(e,t){return this.runFunction(e.args,t,this.metadata("CSCH"),(function(e){return 0===e?new r.CellError(r.ErrorType.DIV_BY_ZERO):1/Math.sinh(e)}))}}])&&l(t.prototype,n),i&&l(t,i),h}(i.FunctionPlugin);p.implementedFunctions={ACOS:{method:"acos",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ASIN:{method:"asin",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},COS:{method:"cos",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},SIN:{method:"sin",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},TAN:{method:"tan",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ATAN:{method:"atan",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ATAN2:{method:"atan2",parameters:[{argumentType:i.ArgumentTypes.NUMBER},{argumentType:i.ArgumentTypes.NUMBER}]},COT:{method:"cot",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},SEC:{method:"sec",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},CSC:{method:"csc",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},SINH:{method:"sinh",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},COSH:{method:"cosh",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},TANH:{method:"tanh",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},COTH:{method:"coth",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},SECH:{method:"sech",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},CSCH:{method:"csch",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ACOT:{method:"acot",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ASINH:{method:"asinh",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ACOSH:{method:"acosh",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ATANH:{method:"atanh",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]},ACOTH:{method:"acoth",parameters:[{argumentType:i.ArgumentTypes.NUMBER}]}}},function(e,t,n){var r=n(29),o=n(46),i=n(269),a=Math.abs,s=Math.exp,u=Math.E;r({target:"Math",stat:!0,forced:o((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return a(e=+e)<1?(i(e)-i(-e))/2:(s(e-1)-s(-e-1))*(u/2)}})},function(e,t,n){var r=n(29),o=n(269),i=Math.cosh,a=Math.abs,s=Math.E;r({target:"Math",stat:!0,forced:!i||i(710)===1/0},{cosh:function(e){var t=o(a(e)-1)+1;return(t+1/(t*s*s))*(s/2)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"LookupPlugin",(function(){return y}));n(129),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(79),o=n(22),i=n(39),a=n(682),s=n(119),u=n(112),l=n(98),c=n(35);function f(e){return(f="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})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(v,e);var t,n,c,f=m(v);function v(){var e;return h(this,v),(e=f.apply(this,arguments)).rowSearch=new a.RowSearchStrategy(e.config,e.dependencyGraph),e}return t=v,(n=[{key:"vlookup",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("VLOOKUP"),(function(e,t,r,a){var s=t.range();return void 0===s?new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.WrongType):r<1?new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.LessThanOne):r>s.width()?new o.CellError(o.ErrorType.REF,i.ErrorMessage.IndexLarge):n.doVlookup(Object(u.zeroIfEmpty)(e),s,r-1,a)}))}},{key:"hlookup",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("HLOOKUP"),(function(e,t,r,a){var s=t.range();return void 0===s?new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.WrongType):r<1?new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.LessThanOne):r>s.height()?new o.CellError(o.ErrorType.REF,i.ErrorMessage.IndexLarge):n.doHlookup(Object(u.zeroIfEmpty)(e),s,r-1,a)}))}},{key:"match",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("MATCH"),(function(e,t,r){var a=t.range();return void 0===a?new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.WrongType):n.doMatch(Object(u.zeroIfEmpty)(e),a,r)}))}},{key:"doVlookup",value:function(e,t,n,a){this.dependencyGraph.stats.start(s.StatType.VLOOKUP);var u=r.AbsoluteCellRange.spanFrom(t.start,1,t.height()),c=this.searchInRange(e,u,a,this.columnSearch);if(this.dependencyGraph.stats.end(s.StatType.VLOOKUP),-1===c)return new o.CellError(o.ErrorType.NA,i.ErrorMessage.ValueNotFound);var f=Object(o.simpleCellAddress)(t.sheet,t.start.col+n,c),h=this.dependencyGraph.getCellValue(f);return h instanceof l.SimpleRangeValue?new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.WrongType):h}},{key:"doHlookup",value:function(e,t,n,a){var s=r.AbsoluteCellRange.spanFrom(t.start,t.width(),1),u=this.searchInRange(e,s,a,this.rowSearch);if(-1===u)return new o.CellError(o.ErrorType.NA,i.ErrorMessage.ValueNotFound);var c=Object(o.simpleCellAddress)(t.sheet,u,t.start.row+n),f=this.dependencyGraph.getCellValue(c);return f instanceof l.SimpleRangeValue?new o.CellError(o.ErrorType.VALUE,i.ErrorMessage.WrongType):f}},{key:"doMatch",value:function(e,t,n){if(t.width()>1&&t.height()>1)return new o.CellError(o.ErrorType.NA);if(1===t.width()){var r=this.columnSearch.find(e,t,0!==n);return-1===r?new o.CellError(o.ErrorType.NA,i.ErrorMessage.ValueNotFound):r-t.start.row+1}var a=this.rowSearch.find(e,t,0!==n);return-1===a?new o.CellError(o.ErrorType.NA,i.ErrorMessage.ValueNotFound):a-t.start.col+1}},{key:"searchInRange",value:function(e,t,n,r){return!n&&"string"==typeof e&&this.interpreter.arithmeticHelper.requiresRegex(e)?r.advancedFind(this.interpreter.arithmeticHelper.eqMatcherFunction(e),t):r.find(e,t,n)}}])&&d(t.prototype,n),c&&d(t,c),v}(c.FunctionPlugin);y.implementedFunctions={VLOOKUP:{method:"vlookup",parameters:[{argumentType:c.ArgumentTypes.NOERROR},{argumentType:c.ArgumentTypes.RANGE},{argumentType:c.ArgumentTypes.NUMBER},{argumentType:c.ArgumentTypes.BOOLEAN,defaultValue:!0}]},HLOOKUP:{method:"hlookup",parameters:[{argumentType:c.ArgumentTypes.NOERROR},{argumentType:c.ArgumentTypes.RANGE},{argumentType:c.ArgumentTypes.NUMBER},{argumentType:c.ArgumentTypes.BOOLEAN,defaultValue:!0}]},MATCH:{method:"match",parameters:[{argumentType:c.ArgumentTypes.NOERROR},{argumentType:c.ArgumentTypes.RANGE},{argumentType:c.ArgumentTypes.NUMBER,defaultValue:1}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"RomanPlugin",(function(){return p}));n(130),n(111),n(110),n(19),n(382),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(22),o=n(39),i=n(50),a=n(35);function s(e){return(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})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,a,s=f(h);function h(){return u(this,h),s.apply(this,arguments)}return t=h,(n=[{key:"roman",value:function(e,t){var n=this;return this.runFunction(e.args,t,this.metadata("ROMAN"),(function(e,t){return e=Math.trunc(e),!1===t?t=4:!0===t&&(t=0),(t=Object(i.getRawValue)(n.coerceScalarToNumberOrError(t)))instanceof r.CellError?t:(t=Math.trunc(t))<0?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.ValueSmall):t>4?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.ValueLarge):function(e,t){var n={val:e%1e3,acc:"M".repeat(Math.floor(e/1e3))};return 4===t&&(v(n,"IM",999,1e3),v(n,"ID",499,500)),t>=3&&(v(n,"VM",995,1e3),v(n,"VD",495,500)),t>=2&&(v(n,"XM",990,1e3),v(n,"XD",490,500)),t>=1&&(v(n,"LM",950,1e3),v(n,"LD",450,500)),v(n,"CM",900,1e3),v(n,"CD",400,500),v(n,"D",500,900),n.acc+="C".repeat(Math.floor(n.val/100)),n.val%=100,t>=2&&(v(n,"IC",99,100),v(n,"IL",49,50)),t>=1&&(v(n,"VC",95,100),v(n,"VL",45,50)),v(n,"XC",90,100),v(n,"XL",40,50),v(n,"L",50,90),n.acc+="X".repeat(Math.floor(n.val/10)),n.val%=10,v(n,"IX",9,10),v(n,"IV",4,5),v(n,"V",5,9),n.acc+="I".repeat(n.val),n.acc}(e,t)}))}},{key:"arabic",value:function(e,t){return this.runFunction(e.args,t,this.metadata("ARABIC"),(function(e){var t=!1;if((e=e.trim().toUpperCase()).startsWith("-")&&(t=!0,""===(e=e.slice(1))))return new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.InvalidRoman);var n={input:e,acc:0};return m(n,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),m(n,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),m(n,{token:"D",val:500},{token:"ID",val:499},{token:"VD",val:495},{token:"XD",val:490},{token:"LD",val:450},{token:"CD",val:400}),m(n,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),m(n,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),m(n,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),m(n,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),m(n,{token:"IX",val:9}),m(n,{token:"V",val:5},{token:"IV",val:4}),m(n,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==n.input?new r.CellError(r.ErrorType.VALUE,o.ErrorMessage.InvalidRoman):t?-n.acc:n.acc}))}}])&&l(t.prototype,n),a&&l(t,a),h}(a.FunctionPlugin);function m(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var a=i[o];if(e.input.startsWith(a.token)){e.input=e.input.slice(a.token.length),e.acc+=a.val;break}}}function v(e,t,n,r){e.val>=n&&e.val<r&&(e.val-=n,e.acc+=t)}p.implementedFunctions={ROMAN:{method:"roman",parameters:[{argumentType:a.ArgumentTypes.NUMBER,minValue:1,lessThan:4e3},{argumentType:a.ArgumentTypes.NOERROR,optionalArg:!0,defaultValue:0}]},ARABIC:{method:"arabic",parameters:[{argumentType:a.ArgumentTypes.STRING}]}}},function(e,t,n){"use strict";n.r(t),n.d(t,"SimpleArithmerticPlugin",(function(){return f}));n(20),n(24),n(7),n(8),n(10),n(1),n(11),n(3),n(2),n(4);var r=n(35);function o(e){return(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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
/**
* @license
* Copyright (c) 2021 Handsoncode. All rights reserved.
*/var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,o=u(l);function l(){return i(this,l),o.apply(this,arguments)}return t=l,(n=[{key:"add",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HF.ADD"),this.interpreter.arithmeticHelper.addWithEpsilon)}},{key:"concat",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HF.CONCAT"),this.interpreter.arithmeticHelper.concat)}},{key:"divide",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HF.DIVIDE"),this.interpreter.arithmeticHelper.divide)}},{key:"eq",value:function(e,t){return this.runFunction(e.args,t,this.metadata("HF.EQ"),this.interpreter.arithmeticHelper.eq)}},{key:"gt",value:function(e,t){return this.runFunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment