@dhtmlx/grid 9.3.7 → 9.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
3
 
4
- This edition of DHTMLX dhtmlxGrid v.9.3.7 is licensed under the GNU General Public License v2.0 (GPL v2).
4
+ This edition of DHTMLX dhtmlxGrid v.9.3.8 is licensed under the GNU General Public License v2.0 (GPL v2).
5
5
  You can redistribute this package and/or modify it under the terms of the GPL v2.
6
6
  GPL v2 requires that any project using this package also be open source under a GPL-compatible license.
7
7
  You may NOT use this package in closed-source, proprietary, or commercial applications without a separate commercial license.
@@ -18,4 +18,4 @@ if(window.dhx&&(window.dhx_legacy=dhx,delete window.dhx),function(t,e){"object"=
18
18
  * A thin, fast, dependency-free vdom view layer
19
19
  * @preserve https://github.com/leeoniya/domvm (v3.2.6, micro build)
20
20
  */
21
- t.exports=function(){"use strict";var t=1,e=2,i=3,n=4,o=5,r="undefined"!=typeof window,a=(r?window:{}).requestAnimationFrame,l={};function s(){}var c=Array.isArray;function d(t){return null!=t}function u(t){return null!=t&&t.constructor===Object}function h(t,e,i,n){t.splice.apply(t,[i,n].concat(e))}function f(t){var e=typeof t;return"string"===e||"number"===e}function p(t){return"function"==typeof t}function g(t){return"object"==typeof t&&p(t.then)}function v(t){for(var e=arguments,i=1;i<e.length;i++)for(var n in e[i])t[n]=e[i][n];return t}function _(t,e,i){for(var n;n=e.shift();)0===e.length?t[n]=i:t[n]=t=t[n]||{}}function m(t,e){for(var i=[],n=e;n<t.length;n++)i.push(t[n]);return i}function y(t,e){for(var i in t)if(t[i]!==e[i])return!1;return!0}function b(t,e){var i=t.length;if(e.length!==i)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function x(t){if(!a)return t;var e,i,n;function o(){e=0,t.apply(i,n)}return function(){i=this,n=arguments,e||(e=a(o))}}function w(t,e,i){return function(){return t.apply(i,e)}}function C(t){var e,i,n=t.slice(),o=[];o.push(0);for(var r=0,a=t.length;r<a;++r){var l=o[o.length-1];if(t[l]<t[r])n[r]=l,o.push(r);else{for(e=0,i=o.length-1;e<i;){var s=(e+i)/2|0;t[o[s]]<t[r]?e=s+1:i=s}t[r]<t[o[e]]&&(e>0&&(n[r]=o[e-1]),o[e]=r)}}for(i=o[(e=o.length)-1];e-- >0;)o[e]=i,i=n[i];return o}function S(t,e){var i,n=0,o=e.length-1;if(o<=2147483647)for(;n<=o;){if(e[i=n+o>>1]===t)return i;e[i]<t?n=i+1:o=i-1}else for(;n<=o;){if(e[i=Math.floor((n+o)/2)]===t)return i;e[i]<t?n=i+1:o=i-1}return n==e.length?null:n}function E(t){return"o"===t[0]&&"n"===t[1]}function D(t){return"_"===t[0]}function O(t){return"style"===t}function k(t){t&&t.el&&t.el.offsetHeight}function R(t){return null!=t.node&&null!=t.node.el}function T(t,e){switch(e){case"value":case"checked":case"selected":return!0}return!1}function M(t){for(t=t||l;null==t.vm&&t.parent;)t=t.parent;return t.vm}function I(){}var H=I.prototype={constructor:I,type:null,vm:null,key:null,ref:null,data:null,hooks:null,ns:null,el:null,tag:null,attrs:null,body:null,flags:0,_class:null,_diff:null,_dead:!1,_lis:!1,idx:null,parent:null};function P(t){var i=new I;return i.type=e,i.body=t,i}var F={},A=/\[(\w+)(?:=(\w+))?\]/g;function $(t){var e,i,n,o,r=F[t];if(null==r)for(F[t]=r={tag:(e=t.match(/^[-\w]+/))?e[0]:"div",id:(i=t.match(/#([-\w]+)/))?i[1]:null,class:(n=t.match(/\.([-\w.]+)/))?n[1].replace(/\./g," "):null,attrs:null};o=A.exec(t);)null==r.attrs&&(r.attrs={}),r.attrs[o[1]]=o[2]||"";return r}var j=1,L=2,N=4,V=8;function W(e,i,n,o){var r=new I;r.type=t,d(o)&&(r.flags=o),r.attrs=i;var a=$(e);if(r.tag=a.tag,a.id||a.class||a.attrs){var l=r.attrs||{};if(a.id&&!d(l.id)&&(l.id=a.id),a.class&&(r._class=a.class,l.class=a.class+(d(l.class)?" "+l.class:"")),a.attrs)for(var s in a.attrs)d(l[s])||(l[s]=a.attrs[s]);r.attrs=l}var c=r.attrs;return d(c)&&(d(c._key)&&(r.key=c._key),d(c._ref)&&(r.ref=c._ref),d(c._hooks)&&(r.hooks=c._hooks),d(c._data)&&(r.data=c._data),d(c._flags)&&(r.flags=c._flags),d(r.key)||(d(r.ref)?r.key=r.ref:d(c.id)?r.key=c.id:d(c.name)&&(r.key=c.name+("radio"===c.type||"checkbox"===c.type?c.value:"")))),null!=n&&(r.body=n),r}function z(t,e,i){_(t,["refs"].concat(e.split(".")),i)}function B(t){for(;t=t.parent;)t.flags|=j}function G(t,e,i,r){if(t.type!==o&&t.type!==n){t.parent=e,t.idx=i,t.vm=r,null!=t.ref&&z(M(t),t.ref,t);var a=t.hooks,l=r&&r.hooks;(a&&(a.willRemove||a.didRemove)||l&&(l.willUnmount||l.didUnmount))&&B(t),c(t.body)&&Y(t)}}function Y(t){for(var i=t.body,n=0;n<i.length;n++){var o=i[n];!1===o||null==o?i.splice(n--,1):c(o)?h(i,o,n--,1):(null==o.type&&(i[n]=o=P(""+o)),o.type===e?null==o.body||""===o.body?i.splice(n--,1):n>0&&i[n-1].type===e?(i[n-1].body+=o.body,i.splice(n--,1)):G(o,t,n,null):G(o,t,n,null))}}var U={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,order:!0,lineClamp:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function X(t,e){return isNaN(e)||U[t]?e:e+"px"}function q(t,e){var i=(t.attrs||l).style,n=e?(e.attrs||l).style:null;if(null==i||f(i))t.el.style.cssText=i;else{for(var o in i){var r=i[o];(null==n||null!=r&&r!==n[o])&&(t.el.style[o]=X(o,r))}if(n)for(var a in n)null==i[a]&&(t.el.style[a]="")}}var K=[];function Z(t,e,i,n,o){if(null!=t){var r=i.hooks[e];if(r){if("d"!==e[0]||"i"!==e[1]||"d"!==e[2])return r(i,n);o?k(i.parent)&&r(i,n):K.push([r,i,n])}}}function J(t){var e;if(K.length)for(k(t.node);e=K.shift();)e[0](e[1],e[2])}var Q=r?document:null;function tt(t){for(;null==t._node;)t=t.parentNode;return t._node}function et(t,e){return null!=e?Q.createElementNS(e,t):Q.createElement(t)}function it(t){return Q.createTextNode(t)}function nt(t){return Q.createComment(t)}function ot(t){return t.nextSibling}function rt(t){return t.previousSibling}function at(t){var e=t.vm,i=null!=e&&Z(e.hooks,"willUnmount",e,e.data),n=Z(t.hooks,"willRemove",t);if((t.flags&j)===j&&c(t.body))for(var o=0;o<t.body.length;o++)at(t.body[o]);return i||n}function lt(t,e,i){var n=e._node,o=n.vm;if(c(n.body))if((n.flags&j)===j)for(var r=0;r<n.body.length;r++)lt(e,n.body[r].el);else ct(n);delete e._node,t.removeChild(e),Z(n.hooks,"didRemove",n,null,i),null!=o&&(Z(o.hooks,"didUnmount",o,o.data,i),o.node=null)}function st(t,e){var i=e._node;if(!i._dead){var n=at(i);null!=n&&g(n)?(i._dead=!0,n.then(w(lt,[t,e,!0]))):lt(t,e)}}function ct(t){for(var e=t.body,i=0;i<e.length;i++){var n=e[i];delete n.el._node,null!=n.vm&&(n.vm.node=null),c(n.body)&&ct(n)}}function dt(t){var e=t.el;if(0==(t.flags&j))c(t.body)&&ct(t),e.textContent=null;else{var i=e.firstChild;do{var n=ot(i);st(e,i)}while(i=n)}}function ut(t,e,i){var n=e._node,o=null!=e.parentNode,r=e!==i&&o?null:n.vm;null!=r&&Z(r.hooks,"willMount",r,r.data),Z(n.hooks,o?"willReinsert":"willInsert",n),t.insertBefore(e,i),Z(n.hooks,o?"didReinsert":"didInsert",n),null!=r&&Z(r.hooks,"didMount",r,r.data)}function ht(t,e,i){ut(t,e,i?ot(i):null)}var ft={};function pt(t){v(ft,t)}function gt(t){var e=this,i=e,n=m(arguments,1).concat(i,i.data);do{var o=e.onemit,r=o?o[t]:null;if(r){r.apply(e,n);break}}while(e=e.parent());ft[t]&&ft[t].apply(e,n)}var vt=s;function _t(t){vt=t.onevent||vt,t.onemit&&pt(t.onemit)}function mt(t,e,i){t[e]=i}function yt(t,e,i,n,o){var r=t.apply(o,e.concat([i,n,o,o.data]));o.onevent(i,n,o,o.data,e),vt.call(null,i,n,o,o.data,e),!1===r&&(i.preventDefault(),i.stopPropagation())}function bt(t){var e,i,n=tt(t.target),o=M(n),r=t.currentTarget._node.attrs["on"+t.type];if(c(r))yt(e=r[0],i=r.slice(1),t,n,o);else for(var a in r)if(t.target.matches(a)){var l=r[a];c(l)?(e=l[0],i=l.slice(1)):(e=l,i=[]),yt(e,i,t,n,o)}}function xt(t,e,i,n){if(i!==n){var o=t.el;null==i||p(i)?mt(o,e,i):null==n&&mt(o,e,bt)}}function wt(t,e,i){"."===e[0]&&(e=e.substr(1),i=!0),i?t.el[e]="":t.el.removeAttribute(e)}function Ct(t,e,i,n,o){var r=t.el;null==i?!o&&wt(t,e,!1):null!=t.ns?r.setAttribute(e,i):"class"===e?r.className=i:"id"===e||"boolean"==typeof i||n?r[e]=i:"."===e[0]?r[e.substr(1)]=i:r.setAttribute(e,i)}function St(t,e,i){var n=t.attrs||l,o=e.attrs||l;if(n===o);else{for(var r in n){var a=n[r],s=T(t.tag,r),c=s?t.el[r]:o[r];a===c||(O(r)?q(t,e):D(r)||(E(r)?xt(t,r,a,c):Ct(t,r,a,s,i)))}for(var r in o)!(r in n)&&!D(r)&&wt(t,r,T(t.tag,r)||E(r))}}function Et(t,e,i,o){return t.type===n&&(e=t.data,i=t.key,o=t.opts,t=t.view),new Gt(t,e,i,o)}function Dt(t){for(var e=0;e<t.body.length;e++){var r=t.body[e],a=r.type;if(a<=i)ut(t.el,Ot(r));else if(a===n)a=(l=Et(r.view,r.data,r.key,r.opts)._redraw(t,e,!1)).node.type,ut(t.el,Ot(l.node));else if(a===o){var l;(l=r.vm)._redraw(t,e),a=l.node.type,ut(t.el,l.node.el)}}}function Ot(n,o){return null==n.el&&(n.type===t?(n.el=o||et(n.tag,n.ns),null!=n.attrs&&St(n,l,!0),(n.flags&V)===V&&n.body.body(n),c(n.body)?Dt(n):null!=n.body&&""!==n.body&&(n.el.textContent=n.body)):n.type===e?n.el=o||it(n.body):n.type===i&&(n.el=o||nt(n.body))),n.el._node=n,n.el}function kt(t,e){return e[t.idx+1]}function Rt(t,e){return e[t.idx-1]}function Tt(t){return t.parent}window.lisMove=Pt;var Mt=1,It=2;function Ht(t,e,i,n,o,r,a,l){return function(s,c,d,u,h,f){var p,g;if(null!=u[n]){if(null==(p=u[n]._node))return void(u[n]=t(u[n]));if(Tt(p)!==s)return g=t(u[n]),null!=p.vm?p.vm.unmount(!0):st(c,u[n]),void(u[n]=g)}if(u[o]==h)return It;if(null==u[o].el)i(c,Ot(u[o]),u[n]),u[o]=e(u[o],d);else if(u[o].el===u[n])u[o]=e(u[o],d),u[n]=t(u[n]);else{if(f||p!==u[a])return f&&null!=u[n]?Pt(t,e,i,n,o,c,d,p,u):Mt;g=u[n],u[n]=t(g),l(c,g,u[r]),u[r]=g}}}function Pt(t,e,i,n,o,r,a,l,s){if(l._lis)i(r,s[o].el,s[n]),s[o]=e(s[o],a);else{var c=S(l.idx,s.tombs);l._lis=!0;var d=t(s[n]);i(r,s[n],null!=c?a[s.tombs[c]].el:c),null==c?s.tombs.push(l.idx):s.tombs.splice(c,0,l.idx),s[n]=d}}var Ft=Ht(ot,kt,ut,"lftSib","lftNode","rgtSib","rgtNode",ht),At=Ht(rt,Rt,ht,"rgtSib","rgtNode","lftSib","lftNode",ut);function $t(t,e){var i=e.body,n=t.el,o=t.body,r={lftNode:o[0],rgtNode:o[o.length-1],lftSib:(i[0]||l).el,rgtSib:(i[i.length-1]||l).el};t:for(;;){for(;;){var a=Ft(t,n,o,r,null,!1);if(a===Mt)break;if(a===It)break t}for(;;){var s=At(t,n,o,r,r.lftNode,!1);if(s===Mt)break;if(s===It)break t}jt(t,n,o,r);break}}function jt(t,e,i,n){for(var o=Array.prototype.slice.call(e.childNodes),r=[],a=0;a<o.length;a++){var l=o[a]._node;l.parent===t&&r.push(l.idx)}for(var s=C(r).map((function(t){return r[t]})),c=0;c<s.length;c++)i[s[c]]._lis=!0;for(n.tombs=s;Ft(t,e,i,n,null,!0)!==It;);}function Lt(t){return t.el._node.parent!==t.parent}function Nt(t,e,i){return e[i]}function Vt(t,e,i){for(;i<e.length;i++){var r=e[i];if(null!=r.vm){if(t.type===n&&r.vm.view===t.view&&r.vm.key===t.key||t.type===o&&r.vm===t.vm)return r}else if(!Lt(r)&&t.tag===r.tag&&t.type===r.type&&t.key===r.key&&(t.flags&~j)==(r.flags&~j))return r}return null}function Wt(t,e,i){return e[e._keys[t.key]]}function zt(t,i){Z(i.hooks,"willRecycle",i,t);var n=t.el=i.el,o=i.body,r=t.body;if(n._node=t,t.type!==e||r===o){null==t.attrs&&null==i.attrs||St(t,i,!1);var a=c(o),l=c(r),s=(t.flags&V)===V;a?l||s?Bt(t,i):r!==o&&(null!=r?n.textContent=r:dt(i)):l?(dt(i),Dt(t)):r!==o&&(n.firstChild?n.firstChild.nodeValue=r:n.textContent=r),Z(i.hooks,"didRecycle",i,t)}else n.nodeValue=r}function Bt(e,r){var a=e.body,l=a.length,s=r.body,c=s.length,d=(e.flags&V)===V,u=(e.flags&L)===L,h=(e.flags&N)===N,f=!u&&e.type===t,p=!0,g=h?Wt:u||d?Nt:Vt;if(h){for(var v={},_=0;_<s.length;_++)v[s[_].key]=_;s._keys=v}if(f&&0===l)return dt(r),void(d&&(e.body=[]));var m,y,b=0,x=!1,w=0;if(d)var C={key:null},S=Array(l);for(_=0;_<l;_++){if(d){var E=!1,D=null;p&&(h&&(C.key=a.key(_)),m=g(C,s,w)),null!=m?(y=m.idx,!0===(D=a.diff(_,m))?((O=m).parent=e,O.idx=_,O._lis=!1):E=!0):E=!0,E&&(G(O=a.tpl(_),e,_),O._diff=null!=D?D:a.diff(_),null!=m&&zt(O,m)),S[_]=O}else{var O,k=(O=a[_]).type;if(k<=i)(m=p&&g(O,s,w))&&(zt(O,m),y=m.idx);else if(k===n){if(m=p&&g(O,s,w)){y=m.idx;var T=m.vm._update(O.data,e,_)}else T=Et(O.view,O.data,O.key,O.opts)._redraw(e,_,!1);k=T.node.type}else if(k===o){var M=R(O.vm);k=(T=O.vm._update(O.data,e,_,M)).node.type}}if(!h&&null!=m&&(y===w?++w===c&&l>c&&(m=null,p=!1):x=!0,c>100&&x&&++b%10==0))for(;w<c&&Lt(s[w]);)w++}d&&(e.body=S),f&&$t(e,r)}function Gt(t,e,i,n){var o=this;o.view=t,o.data=e,o.key=i,n&&(o.opts=n,o.config(n));var r=u(t)?t:t.call(o,o,e,i,n);p(r)?o.render=r:(o.render=r.render,o.config(r)),o._redrawAsync=x((function(t){return o.redraw(!0)})),o._updateAsync=x((function(t){return o.update(t,!0)})),o.init&&o.init.call(o,o,o.data,o.key,n)}var Yt=Gt.prototype={constructor:Gt,_diff:null,init:null,view:null,key:null,data:null,state:null,api:null,opts:null,node:null,hooks:null,onevent:s,refs:null,render:null,mount:Ut,unmount:Xt,config:function(t){var e=this;t.init&&(e.init=t.init),t.diff&&(e.diff=t.diff),t.onevent&&(e.onevent=t.onevent),t.hooks&&(e.hooks=v(e.hooks||{},t.hooks)),t.onemit&&(e.onemit=v(e.onemit||{},t.onemit))},parent:function(){return M(this.node.parent)},root:function(){for(var t=this.node;t.parent;)t=t.parent;return t.vm},redraw:function(t){var e=this;return t?e._redraw(null,null,R(e)):e._redrawAsync(),e},update:function(t,e){var i=this;return e?i._update(t,null,null,R(i)):i._updateAsync(t),i},_update:Zt,_redraw:Kt,_redrawAsync:null,_updateAsync:null};function Ut(t,e){var i=this;return e?(dt({el:t,flags:0}),i._redraw(null,null,!1),t.nodeName.toLowerCase()!==i.node.tag?(Ot(i.node),ut(t.parentNode,i.node.el,t),t.parentNode.removeChild(t)):ut(t.parentNode,Ot(i.node,t),t)):(i._redraw(null,null),t&&ut(t,i.node.el)),t&&J(i),i}function Xt(t){var e=this,i=e.node;st(i.el.parentNode,i.el),t||J(e)}function qt(t,e,i,n){return null!=i&&(i.body[n]=e,e.idx=n,e.parent=i,e._lis=!1),t}function Kt(t,e,i){var n,o,r=null==t,a=this,l=a.node&&a.node.el&&a.node.el.parentNode,s=a.node;if(null!=a.diff&&(n=a._diff,a._diff=o=a.diff(a,a.data),null!=s)){var d=c(n)?b:y;if(n===o||d(n,o))return qt(a,s,t,e)}l&&Z(a.hooks,"willRedraw",a,a.data);var u=a.render.call(a,a,a.data,n,o);if(u===s)return qt(a,s,t,e);if(a.refs=null,null!=a.key&&u.key!==a.key&&(u.key=a.key),a.node=u,t?(G(u,t,e,a),t.body[e]=u):s&&s.parent?(G(u,s.parent,s.idx,a),s.parent.body[s.idx]=u):G(u,null,null,a),!1!==i)if(s)if(s.tag!==u.tag||s.key!==u.key){s.vm=u.vm=null;var h=s.el.parentNode,f=ot(s.el);st(h,s.el),ut(h,Ot(u),f),s.el=u.el,u.vm=a}else zt(u,s);else Ot(u);return l&&Z(a.hooks,"didRedraw",a,a.data),r&&l&&J(a),a}function Zt(t,e,i,n){var o=this;return null!=t&&o.data!==t&&(Z(o.hooks,"willUpdate",o,t),o.data=t),o._redraw(e,i,n)}function Jt(t,e,i,n){var o,r;return null==i?u(e)?o=e:r=e:(o=e,r=i),W(t,o,r,n)}var Qt="http://www.w3.org/2000/svg";function te(t,e,i,n){var o=Jt(t,e,i,n);return o.ns=Qt,o}function ee(t){var e=new I;return e.type=i,e.body=t,e}function ie(t,e,i,n){this.view=t,this.data=e,this.key=i,this.opts=n}function ne(t,e,i,n){return new ie(t,e,i,n)}function oe(t){this.vm=t}function re(t){return new oe(t)}function ae(e){var i=new I;return i.type=t,i.el=i.key=e,i}function le(t,e){var i=t.length,n={items:t,length:i,key:function(i){return e.key(t[i],i)},diff:function(i,n){var o=e.diff(t[i],i);if(null==n)return o;var r=n._diff;return(o===r||c(r)?b(o,r):y(o,r))||o},tpl:function(i){return e.tpl(t[i],i)},map:function(t){return e.tpl=t,n},body:function(t){for(var e=Array(i),o=0;o<i;o++){var r=n.tpl(o);r._diff=n.diff(o),e[o]=r,G(r,t,o)}t.body=e}};return n}ie.prototype={constructor:ie,type:n,view:null,data:null,key:null,opts:null},oe.prototype={constructor:oe,type:o,vm:null};var se={config:_t,ViewModel:Gt,VNode:I,createView:Et,defineElement:Jt,defineSvgElement:te,defineText:P,defineComment:ee,defineView:ne,injectView:re,injectElement:ae,lazyList:le,FIXED_BODY:L,DEEP_REMOVE:j,KEYED_LIST:N,LAZY_LIST:V};function ce(t,e){de(this,t,e)}function de(t,e,i){if(null!=e.type){if(null!=t.vm)return;G(e,t.parent,t.idx,null),t.parent.body[t.idx]=e,zt(e,t),i&&k(e),J(M(e))}else{var n=Object.create(t);n.attrs=v({},t.attrs);var o=v(t.attrs,e);if(null!=t._class){var r=o.class;o.class=null!=r&&""!==r?t._class+" "+r:t._class}St(t,n),i&&k(t)}}function ue(t,e){var i=t.body;if(c(i))for(var n=0;n<i.length;n++){var o=i[n];null!=o.vm?e.push(o.vm):ue(o,e)}return e}function he(t){var e,i,n=arguments,o=n.length;if(o>1){var r=1;u(n[1])&&(i=n[1],r=2),e=o===r+1&&(f(n[r])||c(n[r])||i&&(i._flags&V)===V)?n[r]:m(n,r)}return W(t,i,e)}function fe(){var t=he.apply(null,arguments);return t.ns=Qt,t}return H.patch=ce,Yt.emit=gt,Yt.onemit=null,Yt.body=function(){return ue(this.node,[])},se.defineElementSpread=he,se.defineSvgElementSpread=fe,se}()},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var o=i(0),r=i(10),a=i(12),l=i(0),s=function(){function e(t,e){this._parent=t,this._changes=e}return e.prototype.load=function(t,e){var i=this;if(!t.config||this._parent.events.fire(a.DataEvents.beforeLazyLoad,[]))return this._parent.loadData=t.load().then((function(t){return t?i.parse(t,e):[]})).catch((function(t){i._parent.events.fire(a.DataEvents.loadError,[t])}))},e.prototype.parse=function(t,e){var i=this;if(void 0===e&&(e=a.DataDriver.json),"json"!==e||(0,r.hasJsonOrArrayStructure)(t)||this._parent.events.fire(a.DataEvents.loadError,["Uncaught SyntaxError: Unexpected end of input"]),!((t=(e=(0,r.toDataDriver)(e)).toJsonArray(t))instanceof Array)){var s=t.total_count-1,c=t.from;if(t=t.data,0!==this._parent.getLength())return t.forEach((function(t,e){var a=c+e,s=i._parent.getId(a);if((0,o.isId)(s)){var d=i._parent.getItem(s);if(d&&d.$empty){var u=t.id||d.id;(0,l.isDefined)(t.id)&&i._parent.changeId(s,u,!0),i._parent.update(u,n(n({},t),{$empty:void 0}),!0)}}else(0,r.dhxWarning)("item not found")})),this._parent.events.fire(a.DataEvents.afterLazyLoad,[c,t.length]),this._parent.events.fire(a.DataEvents.change),t;for(var d=[],u=0,h=0;u<=s;u++)u>=c&&u<=c+t.length-1?(d.push(t[h]),h++):d.push({$empty:!0});t=d}return this._parent.getInitialData()&&this._parent.removeAll(),this._parent.$parse(t),t},e.prototype.save=function(e){for(var i=this,n=this._getUniqueOrder(),o=function(n){if(n.saving||n.pending)(0,r.dhxWarning)("item is saving");else{var o=a._findPrevState(n.id);if(o&&o.saving){var l=new t((function(t,a){o.promise.then((function(){n.pending=!1,t(i._setPromise(n,e))})).catch((function(t){i._removeFromOrder(o),i._setPromise(n,e),(0,r.dhxWarning)(t),a(t)}))}));a._addToChain(l),n.pending=!0}else a._setPromise(n,e)}},a=this,l=0,s=n;l<s.length;l++){o(s[l])}n.length&&this._parent.saveData.then((function(){i._saving=!1}))},e.prototype.updateChanges=function(t){this._changes=t},e.prototype._setPromise=function(t,e){var i,n=this;switch(t.status){case"remove":i="delete";break;case"add":i="insert";break;default:i=t.status}return t.promise=e.save(t.obj,i),t.promise.then((function(){n._removeFromOrder(t)})).catch((function(e){t.saving=!1,t.error=!0,(0,r.dhxError)(e)})),t.saving=!0,this._saving=!0,this._addToChain(t.promise),t.promise},e.prototype._addToChain=function(t){this._parent.saveData&&this._saving?this._parent.saveData=this._parent.saveData.then((function(){return t})):this._parent.saveData=t},e.prototype._findPrevState=function(t){for(var e=0,i=this._changes.order;e<i.length;e++){var n=i[e];if(n.id===t)return n}return null},e.prototype._removeFromOrder=function(t){this._changes.order=this._changes.order.filter((function(e){return!(0,r.isEqualObj)(e,t)}))},e.prototype._getUniqueOrder=function(){return this._changes.order.reduce((function(t,e){var i=t.findIndex((function(t){return t.id===e.id})),n=i>-1?t[i]:null;return n&&!1===n.saving&&"add"===n.status?"remove"===e.status?t.splice(i,1):n.obj=e.obj:n&&!1===n.saving&&"update"===n.status?t.splice(i,1,e):t.push(e),t}),[])},e}();e.Loader=s}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.jsonToXML=void 0;var n=4;function o(t){return" ".repeat(t)}function r(t,e){void 0===e&&(e=n);var i=o(e)+"<item>\n";for(var a in t)Array.isArray(t[a])?(i+=o(e+n)+"<".concat(a,">\n"),i+=t[a].map((function(t){return r(t,e+2*n)})).join("\n")+"\n",i+=o(e+n)+"</".concat(a,">\n")):i+=o(e+n)+"<".concat(a,">").concat(t[a],"</").concat(a,">\n");return i+=o(e)+"</item>"}e.jsonToXML=function(t,e){void 0===e&&(e="root");for(var i='<?xml version="1.0" encoding="iso-8859-1"?>\n<'.concat(e,">"),n=0;n<t.length;n++)i+="\n"+r(t[n]);return i+"\n</".concat(e,">")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sort=void 0;var n=i(10),o=function(){function t(){}return t.prototype.sort=function(t,e){return this._sort(t,e)},t.prototype._createSorter=function(t){var e=this;t&&!t.rule&&(t.rule=function(i,o){var r,a,l=null!==(r=e._checkVal(t.as,i[t.by]))&&void 0!==r?r:"",s=null!==(a=e._checkVal(t.as,o[t.by]))&&void 0!==a?a:"";return(0,n.naturalCompare)(l.toString(),s.toString())})},t.prototype._checkVal=function(t,e){return t?t.call(this,e):e},t.prototype._sort=function(t,e){var i=this;e.forEach((function(t){return i._createSorter(t)}));var n={asc:1,desc:-1},o=t.sort((function(t,o){for(var r=0,a=e;r<a.length;r++){var l=a[r],s=l.rule.call(i,t,o)*(n[l.dir]||n.asc);if(0!==s)return s}return 0})),r=o.findIndex((function(t){return t.$groupSummary}));if(-1!==r){var a=o[r];switch(o.splice(r,1),a.$groupSummary){case"top":o.unshift(a);break;case"bottom":o.push(a)}}return o},t}();e.Sort=o},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var r=i(0),a=i(37),l=function(){function t(){this._init=[],this._groupSet=new Set,this._groupOrderFields=[]}return t.prototype.group=function(t,e,i){return void 0===i&&(i={}),(null==t?void 0:t.length)&&(null==e?void 0:e.length)&&Array.isArray(t)?(this._init=o([],e,!0),this._groupSet.clear(),this._config=this.getGroupConfig(i),this._groupOrderFields=t.map((function(t){return"string"==typeof t?t:"function"==typeof t?"":"by"in t&&"string"==typeof t.by?t.by:""})),this._group(t,e)):e||[]},t.prototype.ungroup=function(t){var e=this._init;if(this._init=[],this._groupSet.clear(),t){for(var i={},o=function(e){var n=t[e];if(n.$group)return"continue";Object.keys(n).forEach((function(t){t.startsWith("$")&&delete n[t]})),delete n.parent,i[n.id]=n},r=0;r<t.length;r++)o(r);return e.map((function(t){return n(n({},t),i[t.id])}))}return e||[]},t.prototype.isGrouped=function(){return!!this._init.length},t.prototype.getGroupedFields=function(){return this._groupOrderFields},t.prototype.getGroupConfig=function(t){var e;return t?{displayMode:t.displayMode||"column",field:t.field||"group",showMissed:null===(e=t.showMissed)||void 0===e||e}:this._config},t.prototype._group=function(t,e,i,o){var a=this;if(void 0===o&&(o=0),!(o>=t.length)){for(var l=[],s={},c=[],d="",u={},h=0;h<e.length;h++){var f=e[h],p=t[o],g="function"==typeof p||"function"==typeof(null==p?void 0:p.by),v=f[(u=this._getOrderConfig(p,f)).by],_=g?u.by:v;g||v||0===v?(this._groupSet.add(u.by),s[_]||(s[_]=[]),s[_].push(f)):(this._config.showMissed&&(delete f.parent,c.push(f)),"string"==typeof this._config.showMissed&&(d=this._config.showMissed))}var m=Object.keys(s);return d&&m.push(d),m.forEach((function(e){var d,h=s[e]||c,f=i?"".concat(i,":").concat(e):"$".concat((0,r.uid)(),":").concat(e),p={};u.map&&Object.keys(u.map).forEach((function(t){p[t]=a._toAggregate(h,u.map[t])}));var g=n(((d={id:f,$by:u.by,$group:!0,$row:"row"===a._config.displayMode,$count:h.length})[u.by]=e,d),p);"column"===a._config.displayMode&&(g[a._config.field]=e),i&&(g.parent=i),l.push(g),o<t.length-1&&l.push.apply(l,a._group(t,h,f,o+1)),o===t.length-1&&h.forEach((function(t){l.push(n(n({},t),{parent:f}))})),u.summary&&a._addSummaryRow(l,f,u.summary,p)})),d||l.push.apply(l,c),l}},t.prototype._addSummaryRow=function(t,e,i,o){var r=n({id:"".concat(e,":summary"),parent:e,$groupSummary:i},o);if("top"===i){var a=t.findIndex((function(t){return t.id===e}));t.splice(a+1,0,r)}else t.push(r)},t.prototype._toAggregate=function(t,e){if("function"==typeof e)return e(t);var i=e[0],n=e[1];return a.methods[n]?a.methods[n](t,i):""},t.prototype._getOrderConfig=function(t,e){var i={by:"string"==typeof t&&t||"string"==typeof t.by&&t.by||"function"==typeof t&&t(e)||"function"==typeof t.by&&t.by(e)};return t.map&&(i.map=t.map),t.summary&&(i.summary=t.summary),i},t}();e.Group=l},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.TreeCollection=e.addToOrder=void 0;var l=i(0),s=i(33),c=i(15),d=i(10),u=i(12);function h(t,e,i,n){void 0!==n&&-1!==n&&t[i]&&t[i][n]?t[i].splice(n,0,e):(t[i]||(t[i]=[]),t[i].push(e))}e.addToOrder=h;var f=function(t){function e(e,i){var n,o=t.call(this,e,i)||this;o._children={};var r=o._root=e&&e.rootId||"_ROOT_"+(0,l.uid)();return o._children=((n={})[r]=[],n),o._initChildren=null,o}return o(e,t),e.prototype.add=function(t,e,i){var n,o=this;return void 0===e&&(e=-1),void 0===i&&(i=this._root),n=Array.isArray(t)?t.map((function(n,r){return o._add({newItem:n,batch:t,index:e,parent:i,order:r})})):this._add({newItem:t,batch:[t],index:e,parent:i}),this._reapplyFilters(),n},e.prototype.getRoot=function(){return this._root},e.prototype.getParent=function(t,e){if(void 0===e&&(e=!1),!this._pull[t])return null;var i=this._pull[t].parent;return e?this._pull[i]:i},e.prototype.getItems=function(t){return this._children&&this._children[t]?this._children[t]:[]},e.prototype.getLength=function(t){return void 0===t&&(t=this._root),this._children[t]?this._children[t].length:null},e.prototype.removeAll=function(e){var i;if((0,l.isId)(e)){if(this._children[e])for(var n=0,o=a([],this._children[e],!0);n<o.length;n++){var r=o[n];this.remove(r.id)}}else{t.prototype.removeAll.call(this);var s=this._root;this._initChildren=null,this._children=((i={})[s]=[],i)}},e.prototype.update=function(e,i,n){var o=i.parent;!(0,l.isDefined)(o)||this.exists(o)||o===this._root?t.prototype.update.call(this,e,i,n):(0,d.dhxWarning)("Item parent doesn't exist")},e.prototype.getIndex=function(t){var e=this.getParent(t);return e&&this._children[e]?this._children[e].findIndex((function(e){return(null==e?void 0:e.id)==t})):-1},e.prototype.sort=function(t,e,i){var n,o,l=this;if(void 0===i&&(i=!1),(null==e?void 0:e.smartSorting)&&(this._sorter=t),i||this._sortingStates.length&&!(null==e?void 0:e.smartSorting)&&((null===(n=this._sortingStates[0])||void 0===n?void 0:n.smartSorting)||(null==e?void 0:e.smartSorting))||(this._sortingStates=[r(r({},t),e)]),t){if(!i&&(this._initSortOrder=this._initSortOrder||a([],this._initFilterOrder||this._order,!0),!(null==e?void 0:e.smartSorting)&&(null===(o=this._sortingStates[0])||void 0===o?void 0:o.smartSorting))){var s=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==s?this._sortingStates[s].dir=t.dir:this._sortingStates.push(t)}this._applySorters()}else this._initSortOrder&&(this._children={},this._order=[],this._sortingStates=[],this._initSortOrder.forEach((function(t){return l._parseItem(t)})),this._sorter=this._initSortOrder=this._initChildren=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)));i||(this._reapplyFilters(),this.events.fire(u.DataEvents.change,[void 0,"sort",t]))},e.prototype.filter=function(t,e,i){if((null==e?void 0:e.$restore)&&(t=this._normalizeFilters(t||this._filters)),!(t&&(null==e?void 0:e.add)||(this._initChildren&&(this._children=this._initChildren,this._initChildren=null),null==e?void 0:e.$restore)))for(var n in this._filters){var o=this._filters[n],r=o.rule,a=o.config;(null==a?void 0:a.permanent)?this._applyFilter(r,a):delete this._filters[n]}var s;if(t&&!(null==e?void 0:e.$restore))s=(null==e?void 0:e.id)||(0,l.uid)(),e||(e={}),e.type=e.type||u.TreeFilterType.all,this._filters[s]={rule:t,config:e},this._applyFilter(t,e);else for(var n in t)this._applyFilter(t[n],this._filters[n].config);if(!i){var c=this._getPureFilters(this._filters);this.events.fire(u.DataEvents.filter,[(0,l.isEmptyObj)(c)?null:c])}return s},e.prototype.restoreOrder=function(){this.resetFilter({permanent:!0},!0),this.sort()},e.prototype.copy=function(t,e,i,n){var o=this;return void 0===i&&(i=this),void 0===n&&(n=this._root),t instanceof Array?t.map((function(t,r){return o._copy(t,e,i,n,r)})):this._copy(t,e,i,n)},e.prototype.move=function(t,e,i,n){var o,r=this;if(void 0===n&&(n=this._root),i=i||this,t instanceof Array){var a=[];return t.forEach((function(t,o){(0,l.isId)(r._move(t,e,i,n,o))?a.push(t):(0,d.throwMoveWarning)(t,r.exists(t))})),a}return null!==(o=this._move(t,e,i,n))&&void 0!==o?o:(0,d.throwMoveWarning)(t,this.exists(t))},e.prototype.forEach=function(t,e,i){if(void 0===e&&(e=this._root),void 0===i&&(i=1/0),this.haveItems(e)&&!(i<1))for(var n=this._children[e],o=0;o<n.length;o++)t.call(this,n[o],o,n),this.haveItems(n[o].id)&&this.forEach(t,n[o].id,--i)},e.prototype.eachChild=function(t,e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=function(){return!0}),this.haveItems(t))for(var o=0;o<this._children[t].length;o++)e.call(this,this._children[t][o],o),i&&n(this._children[t][o])&&this.eachChild(this._children[t][o].id,e,i,n)},e.prototype.getNearId=function(t){return t},e.prototype.loadItems=function(t,e){var i=this;if(void 0===e&&(e=u.DataDriver.json),this.events.fire(u.DataEvents.beforeItemLoad,[t])){var n=this.config.autoload.toString(),o=n+(n.includes("?")?"&id=".concat(t):"?id=".concat(t));new c.DataProxy(o).load().then((function(n){n=(e=(0,d.toDataDriver)(e)).toJsonArray(n),i._parse_data(n,t),i.events.fire(u.DataEvents.change),i.events.fire(u.DataEvents.afterItemLoad,[t])})).catch((function(t){i.events.fire(u.DataEvents.loadError,[t])}))}},e.prototype.refreshItems=function(t,e){void 0===e&&(e=u.DataDriver.json),this.removeAll(t),this.loadItems(t,e)},e.prototype.eachParent=function(t,e,i){void 0===i&&(i=!1);var n=this.getItem(t);if(n&&(i&&e.call(this,n),n.parent!==this._root)){var o=this.getItem(n.parent);e.call(this,o),this.eachParent(n.parent,e)}},e.prototype.haveItems=function(t){return t in this._children},e.prototype.canCopy=function(t,e){if(t===e)return!1;var i=!0;return this.eachParent(e,(function(e){return e.id===t?i=!1:null})),i},e.prototype.serialize=function(t,e){void 0===t&&(t=u.DataDriver.json);var i=this._serialize(this._root,e),n=(0,d.toDataDriver)(t);if(n)return n.serialize(i)},e.prototype.getId=function(t,e){if(void 0===e&&(e=this._root),this._children[e]&&this._children[e][t])return this._children[e][t].id},e.prototype.map=function(t,e,i){void 0===e&&(e=this._root),void 0===i&&(i=!0);var n=[];if(!this.haveItems(e))return n;for(var o=0;o<this._children[e].length;o++)if(n.push(t.call(this,this._children[e][o],o,this._children)),i){var r=this.map(t,this._children[e][o].id,i);n=n.concat(r)}return n},e.prototype.getRawData=function(e,i,n,o,r){var a;return r=null!=r?r:this._root,this._children[r]?(a=r===this._root?t.prototype.getRawData.call(this,e,i,this._children[r]):this._children[r],2===o?this.flatten(a):a):[]},e.prototype.flatten=function(t){var e=this,i=[];return t.forEach((function(t){i.push(t);var n=e._children[t.id];n&&t.$opened&&(i=i.concat(e.flatten(n)))})),i},e.prototype._add=function(t){var e=t.newItem,i=t.index,n=void 0===i?-1:i,o=t.parent,r=void 0===o?this._root:o,a=t.order,l=void 0===a?0:a,s=t.batch;if(l>0&&-1!==n&&(n+=1),this.events.fire(u.DataEvents.beforeAdd,[e,s,l])){this._setParent(e,r);var c=this._addCore(e,n);if(this._onChange("add",e.id,e),this.events.fire(u.DataEvents.afterAdd,[e,s,l]),Array.isArray(e.items))for(var d=0,h=e.items;d<h.length;d++){var f=h[d];this.add(f,-1,e.id)}return c}},e.prototype._setParent=function(t,e){t.parent=t.parent?t.parent.toString():e;var i=this._pull[t.parent];i&&!i.items&&(i.items=[])},e.prototype._copy=function(t,e,i,n,o){if(void 0===i&&(i=this),void 0===n&&(n=this._root),!this.exists(t))return null;var r=this._children[t];if(o&&(e=-1===e?-1:e+o),i===this&&!this.canCopy(t,n))return null;var a=(0,d.copyWithoutInner)(this.getItem(t),{items:!0});if(i.exists(t)&&(a.id=(0,l.uid)()),(0,d.isTreeCollection)(i)){if(this.exists(t)&&(a.parent=n,i!==this&&n===this._root&&(a.parent=i.getRoot()),i.add(a,e),t=a.id),r)for(var s=0,c=r;s<c.length;s++){var u=c[s].id,h=this.getIndex(u);this.copy(u,h,i,t)}return t}i.add(a,e)},e.prototype._move=function(t,e,i,n,o){if(void 0===i&&(i=this),void 0===n&&(n=this._root),!this.exists(t))return null;if(o&&e<this.getIndex(t)&&(e=-1===e?-1:e+o),i!==this){if(!(0,d.isTreeCollection)(i))return i.add((0,d.copyWithoutInner)(this.getItem(t)),e),void this.remove(t);var r=this.copy(t,e,i,n);return this.remove(t),r}return this.canCopy(t,n)?(this._moveItem(t,n,e),this.events.fire(u.DataEvents.change,[t,"update",this.getItem(t)]),t):null},e.prototype._moveItem=function(t,e,i){var n=this.getParent(t),o=this._initChildren||this._children;if([this._children,this._initChildren].forEach((function(o){if(o&&o[n]){var r=o[n].findIndex((function(e){return e.id===t}));if(-1!==r){var a=o[n].splice(r,1)[0];a.parent=e,h(o,a,e,i),o[n].length||delete o[n]}}})),n!==this._root&&n!==e){var r=this.getItem(n);o[n]?r.items=a([],o[n],!0):delete r.items}e!==this._root&&(this.getItem(e).items=a([],o[e]||[],!0))},e.prototype._reset=function(e){var i;if((0,l.isId)(null==e?void 0:e.id))for(var n=0,o=a([],this._children[null==e?void 0:e.id],!0);n<o.length;n++){var r=o[n];this.remove(r.id)}else{t.prototype._reset.call(this,e);var s=this._root;this._initChildren=null,this._children=((i={})[s]=[],i)}},e.prototype._removeCore=function(t){var e;if(this._pull[t]){var i=this.getParent(t);if(this._removeFromParentList(this._children,i,t),this._initChildren&&this._removeFromParentList(this._initChildren,i,t),Array.isArray(null===(e=this._pull[i])||void 0===e?void 0:e.items)){var n=this._pull[i];n.items=n.items.filter((function(e){return e.id!==t}))}var o=new Set;this._removeChildren(this._children,t,o),this._initChildren&&this._removeChildren(this._initChildren,t,o),this._removeFromOrders(o)}},e.prototype._removeFromParentList=function(t,e,i){t[e]&&(t[e]=t[e].filter((function(t){return t.id!==i})),e!==this._root&&0===t[e].length&&delete t[e])},e.prototype._removeChildren=function(t,e,i){this._pull[e]&&(i.add(e),delete this._pull[e]);var n=t[e];if(n){for(var o=0;o<n.length;o++)this._removeChildren(t,n[o].id,i);delete t[e]}},e.prototype._removeFromOrders=function(t){var e,i;if(0!==t.size){var n=function(e){return!t.has(e.id)};this._order&&(this._order=this._order.filter(n)),(null===(e=this._initFilterOrder)||void 0===e?void 0:e.length)&&(this._initFilterOrder=this._initFilterOrder.filter(n)),(null===(i=this._initSortOrder)||void 0===i?void 0:i.length)&&(this._initSortOrder=this._initSortOrder.filter(n))}},e.prototype._addToOrder=function(e,i,n){var o=this._children,r=this._initChildren,a=i.parent;this._pull[i.id]=i,i.parent&&this._pull[i.parent]&&Array.isArray(this._pull[i.parent].items)&&!this._pull[i.parent].items.find((function(t){return t.id===i.id}))&&this._pull[i.parent].items.push(i),t.prototype._addToOrder.call(this,e,i,n),h(o,i,a,n),r&&h(r,i,a,n)},e.prototype._parse_data=function(t,e){var i,n,o;void 0===e&&(e=this._root);for(var r=0,a=t;r<a.length;r++){var s=a[r];this.config.init&&(s=this.config.init(s)),s&&"object"!=typeof s&&(s={value:s}),s.id=null!==(i=s.id)&&void 0!==i?i:(0,l.uid)(),s.parent=s.parent&&!(null===(o=null===(n=s.parent)||void 0===n?void 0:n.toString())||void 0===o?void 0:o.includes("_ROOT_"))?s.parent:e,this._pull[s.id]&&(0,d.dhxError)("Item ".concat(s.id," already exist")),this._parseItem(s),s.items&&s.items instanceof Object&&this._parse_data(s.items,s.id)}},e.prototype._parseItem=function(t){this._pull[t.id]=t,this._order[this._order.length]=t,this._children[t.parent]||(this._children[t.parent]=[]),this._children[t.parent].push(t)},e.prototype._recursiveFilter=function(t,e,i,n,o){var r=this,a=this._children[i];if(a){var l=function(t){switch(e.type){case u.TreeFilterType.all:return!0;case u.TreeFilterType.level:return n===e.level;case u.TreeFilterType.leafs:return!r.haveItems(t.id)}};if("function"==typeof t){var s=function(e){return l(e)&&t(e)};(c=a.filter(s)).length?o[i]=c:i===this._root&&(o[i]=[])}else{var c;s=function(e){var i,n=!0;for(var o in t)if(t[o].by&&""!==t[o].match&&(n=t[o].compare?t[o].compare(e[t[o].by],t[o].match,e):-1!==(null===(i=e[t[o].by])||void 0===i?void 0:i.toString().toLocaleLowerCase().indexOf(t[o].match.toString().toLowerCase()))),!n)break;return l(e)&&n};(c=a.filter(s)).length?o[i]=c:i===this._root&&(o[i]=[])}for(var d=0,h=a;d<h.length;d++){var f=h[d];this._recursiveFilter(t,e,f.id,n+1,o)}}},e.prototype._serialize=function(t,e){var i=this;return void 0===t&&(t=this._root),this.map((function(t){var n={};for(var o in t)"parent"===o||"items"===o||o.startsWith("$")||(n[o]=t[o]);return e&&(n=e(n)),i.haveItems(t.id)&&(n.items=i._serialize(t.id,e)),n}),t,!1)},e.prototype._applyFilter=function(t,e){var i=this;if(t&&("function"==typeof t||!(0,l.isEmptyObj)(t))){if(!this._checkFilterRule(t))throw new Error("Invalid filter rule");var n;this._initFilterOrder||(this._initFilterOrder=this._order),this._initChildren||(this._initChildren=this._children);var o={};if("function"!=typeof t)if(n={},(0,l.isDefined)(t.by))n[t.by]=t;else for(var r in t)n[r]=t[r];else n=t;this._recursiveFilter(n,e,this._root,0,o),Object.keys(o).forEach((function(t){for(var e=i.getParent(t),n=i.getItem(t);e;)o[e]||(o[e]=[]),n&&!o[e].find((function(t){return t.id===n.id}))&&o[e].push(n),n=i.getItem(e),e=i.getParent(e)})),this._children=o}},e.prototype._normalizeFilters=function(t){var e={};for(var i in t)e[i]=t[i].rule;return e},e.prototype._checkFilterRule=function(e){var i=this;return t.prototype._checkFilterRule.call(this,e)||Object.values(e).every((function(e){return"function"!=typeof e&&t.prototype._checkFilterRule.call(i,e)}))},e.prototype._applySorters=function(){for(var t in this._children)this._sort.sort(this._children[t],this._sortingStates);if(this._initChildren&&Object.keys(this._initChildren).length)for(var t in this._initChildren)this._sort.sort(this._initChildren[t],this._sortingStates)},e}(s.DataCollection);e.TreeCollection=f},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.dragManager=void 0;var r=i(2),a=i(78),l=i(12),s=i(10),c=i(0);var d=function(t){var e;return null===(e=t.name)||void 0===e?void 0:e.includes("grid")},u=function(t){return d(t)&&t.hasOwnProperty("scrollView")},h=function(){function t(){var t=this;this._transferData={},this._canMove=!0,this._isDrag=!1,this._lastTargetItemState=null,this._lastOverItemId=null,this._onMouseMove=function(e){var i,n;if(t._transferData.start){var o=(0,r.getElementFromPoint)(e),a=(0,r.locate)(o,"data-dhx-drop-area"),l="common"===a,s=e.targetTouches?e.targetTouches[0].pageX:e.pageX,c=e.targetTouches?e.targetTouches[0].pageY:e.pageY;"column"===t._transferData.type&&"group"===a&&(t._transferData.type="group",t._transferData.isWasColumn=!0),"group"===t._transferData.type&&"column"===a&&t._transferData.isWasColumn&&!t._transferData.groupOnly&&(t._transferData.type="column");var d=(0,r.locate)(o),u=null!==(n=null===(i=t._transferData.component.data.getItem(d))||void 0===i?void 0:i.id)&&void 0!==n?n:d;if(a===t._transferData.type||l){var h=t._transferData,f=h.x,p=h.y,g=h.start,v=h.componentId;if(!t._transferData.ghost){if(Math.abs(f-s)<3&&Math.abs(p-c)<3)return;var _=t._onDragStart(g,e);if(!_)return void t._endDrop(e);t._transferData.ghost=_,document.body.appendChild(t._transferData.ghost)}var m=(0,r.locate)(o,"data-dhx-widget-id");"column"!==a&&"group"!==a||m!==v?t._onDrag(e):u!==t._lastOverItemId&&(t._lastOverItemId=u,t._onDrag(e))}else t._canMove&&t.cancelCanDrop(e);t._notAllowedDropArea(a!==t._transferData.type&&!l||!t._transferData.groupable&&"group"===a||t._transferData.groupOnly&&"group"!==a&&!l&&t._transferData.start!=u),t._moveGhost(s,c)}},this._onMouseUp=function(e){t._transferData.x&&(t._transferData.ghost?(t._removeGhost(),t._onDrop(e)):t._endDrop(e),e.targetTouches?(document.removeEventListener("touchmove",t._onMouseMove),document.removeEventListener("touchend",t._onMouseUp)):(document.removeEventListener("mousemove",t._onMouseMove),document.removeEventListener("mouseup",t._onMouseUp)))}}return t.prototype.setItem=function(t,e){a.collectionStore.setItem(t,e)},t.prototype.onMouseDown=function(t){var e,i,n=t.event,l=t.itemsForGhost,s=t.ghost,c=t.source,u=t.type,h=t.groupable,f=t.groupOnly;if(1===n.which||n.targetTouches){n.targetTouches?(document.addEventListener("touchmove",this._onMouseMove,!1),document.addEventListener("touchend",this._onMouseUp,!1)):(document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp));var p=(0,r.getElementFromPoint)(n),g=(0,r.locateNode)(p,"data-dhx-id"),v=(0,r.locateNode)(p,"data-dhx-widget-id"),_=null==v?void 0:v.getAttribute("data-dhx-widget-id"),m=a.collectionStore.getItem(_),y=g&&g.getAttribute("data-dhx-id"),b=g&&(null!==(i=null===(e=m.data.getItem(y))||void 0===e?void 0:e.id)&&void 0!==i?i:y);if(s&&(this._ghost=s),Array.isArray(c)&&c.includes(b)?(this._transferData.source=o([],c,!0),this._itemsForGhost=l):(this._transferData.source=[b],this._itemsForGhost=null),b&&_){var x=(0,r.getBox)(g),w=d(m)?(0,r.getBox)(v).left:x.left,C=n.targetTouches?n.targetTouches[0].pageX:n.pageX,S=n.targetTouches?n.targetTouches[0].pageY:n.pageY;this._transferData.initXOffset="row"===u?C-w:0,this._transferData.initYOffset="row"===u?S-x.top:0,this._transferData.x=C,this._transferData.y=S,this._transferData.componentId=_,this._transferData.component=m,this._transferData.start=b,this._transferData.item=g,this._transferData.type=u,this._transferData.groupable=h,this._transferData.groupOnly=f}}},t.prototype.isDrag=function(){return this._isDrag},t.prototype.cancelCanDrop=function(t){this._canMove=!1;var e=this._transferData,i=e.start,n=e.source,o=e.target,r=e.dropComponentId,s={start:i,source:n,target:o,dragItem:e.type},c=a.collectionStore.getItem(r);c&&o&&c.events.fire(l.DragEvents.cancelDrop,[s,t,this._transferData.type]),this._transferData.dropComponentId=null,this._transferData.target=null},t.prototype._moveGhost=function(t,e){this._transferData.ghost&&(this._transferData.ghost.style.left=t-this._transferData.initXOffset+"px",this._transferData.ghost.style.top=e-this._transferData.initYOffset+"px")},t.prototype._removeGhost=function(){this._ghost=null,document.body.removeChild(this._transferData.ghost)},t.prototype._onDrop=function(t){if(this._canMove){var e=this._transferData,i=e.start,n=e.source,o=e.target,s=e.dropComponentId,c=e.dropPosition,d={start:i,source:n,target:o,dropPosition:c},u=a.collectionStore.getItem(s),h=u&&u.config,f=this._transferData.componentId==(0,r.locate)((0,r.getElementFromPoint)(t),"data-dhx-widget-id");if(!u||"source"===h.dragMode||f&&n.find((function(t){return t==o})))this._endDrop(t);else{if(u.events.fire(l.DragEvents.beforeDrop,[d,t,this._transferData.type])){var p={id:o,component:u},g={id:i,component:this._transferData.component,newId:null};"group"!==this._transferData.type&&this._move(g,p),g.newId&&g.component!==p.component&&(d.start=g.newId),p.component.events.fire(l.DragEvents.afterDrop,[d,t,this._transferData.type])}this._endDrop(t)}}else this._endDrop(t)},t.prototype._onDragStart=function(t,e){var i=this._transferData.component.config,n=this._transferData,o={start:n.start,source:n.source,target:n.target};if("target"===i.dragMode||this._transferData.component._pregroupData)return null;var r="row"===this._transferData.type?function(t,e,i){void 0===i&&(i=!1);var n=t.getBoundingClientRect(),o=document.createElement("div"),r=t.cloneNode(!0),a=window.getComputedStyle(t.parentElement).fontSize;return r.style.width=n.width+"px",r.style.height=n.height+"px",r.style.maxHeight=n.height+"px",r.style.opacity="0.8",r.style.fontSize=a,i&&e&&e.length||o.appendChild(r),e&&e.length&&e.forEach((function(t,e){var r=t.cloneNode(!0);r.style.getPropertyPriority("width")||(r.style.width=n.width+"px"),r.style.height=n.height+"px",r.style.maxHeight=n.height+"px",r.style.top=12*(e+1)-n.height-n.height*e+"px",r.style.left=12*(e+1)+"px",r.style.opacity="0.6",r.style.zIndex="".concat(-e-1),i||(r.style.fontSize=a,r.style.overflow="hidden"),o.appendChild(r)})),o.className="dhx_drag-ghost",o}(this._transferData.item,this._itemsForGhost,d(this._transferData.component)):this._ghost;return this._transferData.component.events.fire(l.DragEvents.beforeDrag,[o,e,r,this._transferData.type])&&(0,c.isId)(t)?(this._transferData.component.events.fire(l.DragEvents.dragStart,[o,e,this._transferData.type]),this._isDrag=!0,this._toggleTextSelection(!0),this._transferData.dragConfig=i,r):null},t.prototype._onDrag=function(t){var e,i,n=(0,r.getElementFromPoint)(t),o=(0,r.locate)(n,"data-dhx-widget-id"),c=a.collectionStore.getItem(o);if(c){var d=!!(0,r.locateNodeByClassName)(n,"dhx_grid-header")||!!(0,r.locateNodeByClassName)(n,"dhx_grid-footer"),u=c.config.columns?c.config:void 0,h=u&&("both"===u.dragItem||"column"===u.dragItem);if(!d||h){var f=(0,r.locate)(n,"data-dhx-id"),p=(0,r.locate)(n,"data-dhx-root-id"),g=this._transferData,v=g.dropComponentId,_=g.start,m=g.source,y=g.target,b=g.componentId,x=function(t){var e=t.targetTouches?t.targetTouches[0].clientY:t.clientY,i=(0,r.locateNode)((0,r.getElementFromPoint)(t));if(!i)return null;var n=i.childNodes[0];if(1===(null==n?void 0:n.nodeType)){var o=n.getBoundingClientRect();return(e-o.top)/o.height}}(t);if("group"!==this._transferData.type){if(!f&&!p)return this.cancelCanDrop(t),this._transferData.dropComponentId=o,this._transferData.target=null,void this._canDrop(t);if(!c.config.group)switch(c.config.dropBehaviour){case"complex":this._transferData.dropPosition=x<=.25?"top":x>=.75?"bottom":"in";break;case"child":this._transferData.dropPosition="in";break;default:this._transferData.dropPosition=x<=.5?"top":"bottom"}if(((null===(e=this._lastTargetItemState)||void 0===e?void 0:e.id)===f&&(null===(i=this._lastTargetItemState)||void 0===i?void 0:i.dropPosition)===this._transferData.dropPosition||!f&&y===p)&&v===o)return}var w={id:_,component:this._transferData.component};if("source"!==c.config.dragMode)if(w.component.events.fire(l.DragEvents.dragOut,[{start:_,source:m,target:y},t,this._transferData.type]),o!==b||!(0,s.isTreeCollection)(w.component.data)||(0,s.isTreeCollection)(w.component.data)&&w.component.data.canCopy(w.id,f)){this.cancelCanDrop(t);var C=this._transferData.target=f||p;this._transferData.dropComponentId=o,this._lastTargetItemState={id:f,dropPosition:this._transferData.dropPosition},w.component.events.fire(l.DragEvents.dragIn,[{start:_,source:m,target:C,dropPosition:this._transferData.dropPosition},t,this._transferData.type])&&this._canDrop(t)}else this.cancelCanDrop(t)}else this._canMove&&this.cancelCanDrop(t)}else this._canMove&&this.cancelCanDrop(t)},t.prototype._move=function(t,e){var i,r=t.component,a=e.component,l=t.component.data,h=e.component.data,f=0,p=e.id,g=(0,s.isTreeCollection)(h),v=g&&e.component.config.dropBehaviour||null,_=r._uid===a._uid,m=t.component.config.columns?t.component.config:void 0,y="column"===this._transferData.type&&(null===(i=null==m?void 0:m.columns)||void 0===i?void 0:i.map((function(t){return t.id})).filter((function(i){return i===t.id||i===e.id})).length);if(y&&t.component===e.component){if(t.id===e.id)return;var b=(x=r.config.columns.map((function(t){return n({},t)}))).findIndex((function(e){return e.id===t.id}));if(-1===(S=x.findIndex((function(t){return t.id===e.id}))))return;return x.splice(S,0,x.splice(b,1)[0]),r.setColumns(x),void r.paint()}if(y&&t.component&&u(t.component)&&e.component&&u(e.component)){b=(x=r.config.columns.map((function(t){return n({},t)}))).findIndex((function(e){return e.id===t.id}));var x,w=a.config.columns.map((function(t){return n({},t)})),C=a.data.getLength(),S=w.findIndex((function(t){return t.id===e.id})),E=[],D=t.id;r.data.forEach((function(e){var i;E.push(((i={id:e.id})[D]=e[t.id],i))})),C?r.data.forEach((function(t,e){var i=a.data.getItem(t.id);i?a.data.update(i.id,n(n({},i),E[e])):a.data.add(E[e])})):a.data.parse(E);var O=x.splice(b,1)[0];return w.find((function(t){return t.id===D}))||w.splice(S,0,O),a.setColumns(w),a.paint(),r.setColumns(x),void r.paint()}var k=e.id===a.config.rootParent,R=this._transferData.dropPosition;switch(v){case"child":break;case"sibling":if(!h.getItem(e.id))return;var T=h.getIndex(t.id),M=h.getIndex(e.id),I=h.getParent(t.id),H=h.getParent(e.id);p=h.getParent(p),"top"===R?f=M-(-1===T||T>M||I!==H?0:1):"bottom"===R&&(f=M+(-1===T||T>M||I!==H?1:0));break;case"complex":if(k)p=e.id,f=h.getLength();else{var P=h.getItem(t.id),F=h.getItem(e.id);if(!F)return;T=h.getIndex(t.id),M=h.getIndex(e.id);var A=(null==P?void 0:P.$level)||0,$=(null==F?void 0:F.$level)||0;"top"===R?(p=h.getParent(p),f=A===$?M-(-1===T||T>M?0:1):M):"bottom"===R&&(p=h.getParent(p),f=A===$?M+(-1===T||T>M?1:0):M+1)}break;default:if((0,c.isId)(e.id)){h.getIndex(t.id)>-1&&(t.newId=(0,c.uid)());T=h.getIndex(t.id),M=h.getIndex(e.id);f="top"===R?M-(-1===T||T>M?0:1):"bottom"===R?M+(-1===T||T>M?1:0):h.getIndex(e.id)}else f=-1}if(this._transferData.dragConfig.dragCopy)this._transferData.source instanceof Array&&this._transferData.source.length>1?this._transferData.source.map((function(t){l.copy(t,f,h,p),f>-1&&f++})):l.copy(t.id,f,h,p);else if(this._transferData.source instanceof Array&&this._transferData.source.length>1)l.move(this._transferData.source,f,h,p);else if(d(a)&&!a.config.columns.length){var j=r.data.getItem(t.id);a.data.parse([n({},j)]),a.setColumns(o([],r.config.columns,!0)),a.paint(),r.data.remove(t.id),r.paint()}else l.move(t.id,f,h,p,t.newId);_||this._transferData.source.forEach((function(t){var e;null===(e=h.getItem(t))||void 0===e||delete e.$draggable,g&&(null==h?void 0:h.haveItems(t))&&h.eachChild(t,(function(t){delete t.$draggable}))}))},t.prototype._endDrop=function(t){if(this._toggleTextSelection(!1),this._notAllowedDropArea(!1),this._transferData.component){var e=this._transferData,i={start:e.start,source:e.source,target:e.target};this._transferData.component.events.fire(l.DragEvents.afterDrag,[i,t,this._transferData.type])}this.cancelCanDrop(t),this._canMove=!0,this._isDrag=!1,this._lastOverItemId=null,this._transferData={},this._transferData.target=null,this._transferData.dropComponentId=null,this._lastTargetItemState=null},t.prototype._canDrop=function(t){this._canMove=!0;var e=this._transferData,i={start:e.start,source:e.source,target:e.target,dropPosition:e.dropPosition},n=a.collectionStore.getItem(this._transferData.dropComponentId);n&&this._transferData.target&&n.events.fire(l.DragEvents.canDrop,[i,t,this._transferData.type])},t.prototype._toggleTextSelection=function(t){t?document.body.classList.add("dhx_no-select"):document.body.classList.remove("dhx_no-select")},t.prototype._notAllowedDropArea=function(t){t?document.body.classList.contains("dhx_drop-area--not-allowed")||document.body.classList.add("dhx_drop-area--not-allowed"):document.body.classList.remove("dhx_drop-area--not-allowed")},t}(),f=window.dhxHelpers=window.dhxHelpers||{};f.dragManager=f.dragManager||new h,e.dragManager=f.dragManager},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.collectionStore=e.CollectionStore=void 0;var n=i(0),o=function(){function t(){this._store={}}return t.prototype.setItem=function(t,e){this._store[t]=e},t.prototype.getItem=function(t){return(0,n.isId)(t)&&this._store[t]?this._store[t]:null},t}();e.CollectionStore=o;var r=window.dhxHelpers=window.dhxHelpers||{};r.collectionStore=r.collectionStore||new o,e.collectionStore=r.collectionStore},function(t,e,i){"use strict";(function(t){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.LazyDataProxy=void 0;var r=i(15),a=i(0),l=i(23),s=function(e){function i(t,i){var n=e.call(this,t)||this;return n.config=(0,a.extend)({from:0,limit:50,delay:50,prepare:0},i),n.updateUrl(t,{from:n.config.from,limit:n.config.limit}),n}return o(i,e),i.prototype.load=function(){var e=this;return new t((function(t,i){e._timeout?(clearTimeout(e._timeout),e._timeout=setTimeout((function(){l.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0}),e.config.delay),e._cooling&&(t(null),e._cooling=!1)):(l.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0,e._timeout=setTimeout((function(){})))}))},i}(r.DataProxy);e.LazyDataProxy=s}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;var n=i(6),o=i(16),r=i(12),a=i(0),l=function(){function t(t,e,i){var o=this;this.events=i||new n.EventSystem(this),this.config=t,this._data=e,this._selected=null,this._data.events.on(r.DataEvents.removeAll,(function(){o._selected=null})),this._data.events.on(r.DataEvents.change,(function(){if((0,a.isId)(o._selected)){var t=o._data.getNearId(o._selected);t!==o._selected&&(o._selected=null,t&&o.add(t))}}))}return t.prototype.getId=function(){return this._selected},t.prototype.getItem=function(){return(0,a.isId)(this._selected)?this._data.getItem(this._selected):null},t.prototype.remove=function(t){return t=null!=t?t:this._selected,!(0,a.isDefined)(t)||!!this.events.fire(o.SelectionEvents.beforeUnSelect,[t])&&(this._data.update(t,{$selected:!1},!0),this._selected=null,this.events.fire(o.SelectionEvents.afterUnSelect,[t]),!0)},t.prototype.add=function(t){this._selected!==t&&!this.config.disabled&&this._data.exists(t)&&(this.remove(),this._addSingle(t))},t.prototype.enable=function(){this.config.disabled=!1},t.prototype.disable=function(){this.remove(),this.config.disabled=!0},t.prototype._addSingle=function(t){this.events.fire(o.SelectionEvents.beforeSelect,[t])&&(this._selected=t,this._data.update(t,{$selected:!0},!0),this.events.fire(o.SelectionEvents.afterSelect,[t]))},t}();e.Selection=l},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Grid=void 0;var l=i(1),s=i(6),c=i(2),d=i(0),u=i(25),h=i(11),f=i(8),p=i(82),g=i(4),v=i(14),_=i(5),m=i(88),y=i(89),b=i(3),x=i(90),w=i(7),C=i(21),S=i(122),E=i(123),D=i(19),O=i(127),k=i(128),R=i(20),T=function(t){function e(e,i){void 0===i&&(i={});var n,o=this;if((o=t.call(this,e,i)||this)._touch={duration:350,dblDuration:300,timer:null,start:!1},o._destructed=!1,o._sortingStates=[],o._dropManager=null,o._cachedSizes=null,o._resizeObserver=null,o._rowHeights=new m.PrefixSums,o._colWidths=new m.PrefixSums,o._rowHeightsRebuild=!0,o._observedEl=null,o._commonSummary={},o._colSummary={},o.version="9.3.7",o.name="grid",o.config=(0,d.extend)({rowHeight:40,headerRowHeight:40,footerRowHeight:40,keyNavigation:!0,sortable:!0,columns:[],data:[],tooltip:!0,rootParent:"string"==typeof e&&e||o._uid},o._normalizeConfig(i)),o.content=(0,C.getContent)(o),o._scroll={top:0,left:0},o.config.autoWidth=o.config.autoWidth||o.config.fitToContainer,o.config.adjust=o.config.adjust||o.config.columnsAutoWidth,o.config.editable=o.config.editable||o.config.editing,o.config.leftSplit=o.config.leftSplit||o.config.splitAt,o.config.columns.forEach((function(t){"date"===t.type&&t.format&&(t.dateFormat=t.format)})),o._setHTMLEventHandlers(),o.config.eventHandlers)for(var r=0,a=Object.entries(o.config.eventHandlers);r<a.length;r++){var l=a[r],s=l[0],u=l[1];o._htmlEvents[s]=(0,c.eventHandler)((function(t){return{col:o.getColumn((0,c.locate)(t,"data-dhx-col-id")||(0,c.locate)(t,"data-dhx-id"))||{},row:o.data.getItem((0,c.locate)(t,"data-dhx-id"))||{}}}),u,o._htmlEvents[s])}return o._init(),o._dragInit(),o.config.columns&&o._parseColumns(!0),o._canDataParse()&&o.data.parse(o.config.data),o.selection=new y.Selection(o,{type:"string"==typeof o.config.selection&&o.config.selection||"complex",disabled:!o.config.selection,multiSelection:o.config.multiselection},o.events,o._uid),o.mount(e,o._createView()),(null===(n=o._container)||void 0===n?void 0:n.tagName)&&o._observeResize(o._container),i.autoEmptyRow&&0===o.data.getLength()&&(o._addEmptyRow(),o.paint()),o}return o(e,t),e.prototype.destructor=function(){var t;this._destructed=!0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._cachedSizes=null,this._observedEl=null,this._rowHeights=null,this._colWidths=null,this._destroyContent(),null===(t=this.config.$subRowCells)||void 0===t||t.forEach((function(t){var e;null===(e=t.cell)||void 0===e||e.destructor()})),this.keyManager&&this.keyManager.destructor(),this.events&&this.events.clear(),this._events&&this._events.clear(),this.export=this.content=this.selection=null,this._activeFilters=this._filterData=this._scroll=this._touch=this._htmlEvents=this._hiddenFilters=this.config.$subRowCells=null,this.unmount()},e.prototype.setColumns=function(t){var e=this;this._destroyContent(),this.config.columns=t,this._parseColumns(!0),(0,_.isAutoWidth)(this.config)&&this._applyAutoWidth(),this._setSummary(),this._adjustColumns(),this._checkFilters(),this._checkMarks(),this._normalizeSpans(),this.paint(),this.config.keyNavigation&&(0,l.awaitRedraw)().then((function(){e._initHotKey(!0),e.paint()}))},e.prototype._rebuildRowHeights=function(t){t||(t=this.data.getRawData(0,-1,null,2));for(var e=this._rowHeights.ensureCapacity(t.length),i=0,n=0;n<t.length;n++){var o=t[n];o.hidden||(e[i+1]=e[i]+(0,g.getTotalRowHeight)(o),i++)}this._rowHeights.setLength(i),this.config.$totalHeight=this._rowHeights.totalSize(),this.config.$rowHeights=this._rowHeights,this._rowHeightsRebuild=!1},e.prototype._rebuildColWidths=function(){for(var t=this.config.columns,e=this._colWidths.ensureCapacity(t.length),i=0,n=0;n<t.length;n++)t[n].hidden||(e[i+1]=e[i]+(t[n].$width||0),i++);this._colWidths.setLength(i),this.config.$totalWidth=this._colWidths.totalSize(),this.config.$colWidths=this._colWidths},e.prototype.addRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css||"";n.match(new RegExp(e,"g"))||(i.$css=n+" ".concat(e),this.paint())}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.removeRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css?i.$css.replace(e,""):"";i.$css=n,this.paint()}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.addCellCss=function(t,e,i){var n=this.getColumn(e);if(n){n.$cellCss=n.$cellCss||{};var o=n.$cellCss[t];if(o){var r=o.match(new RegExp(i,"g"))?"":" ".concat(i);n.$cellCss[t]+=r}else this.data.getItem(t)&&(n.$cellCss[t]="".concat(i," "));this.paint()}},e.prototype.removeCellCss=function(t,e,i){var n=this.getColumn(e);n&&(n.$cellCss[t]?(n.$cellCss[t]=n.$cellCss[t].replace(i,""),this.paint()):this.data.getItem(t)&&(n.$cellCss[t]=""))},e.prototype.showColumn=function(t){var e=this.getColumn(t);e&&e.hidden&&this.events.fire(b.GridEvents.beforeColumnShow,[e])&&(this._showColumn(e),this.events.fire(b.GridEvents.afterColumnShow,[e]))},e.prototype.hideColumn=function(t){var e=this.getColumn(t);e&&!e.hidden&&this.events.fire(b.GridEvents.beforeColumnHide,[e])&&(this._hideColumn(e),this.events.fire(b.GridEvents.afterColumnHide,[e]))},e.prototype.isColumnHidden=function(t){var e=this.getColumn(t);if(e)return!!e.hidden},e.prototype.showRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&i.hidden&&this.events.fire(b.GridEvents.beforeRowShow,[i])&&(this.data.update(e,{hidden:!1}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this.paint(),this.events.fire(b.GridEvents.afterRowShow,[i]))}},e.prototype.hideRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&this.events.fire(b.GridEvents.beforeRowHide,[i])&&(this.data.update(e,{hidden:!0}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this._checkSelectFilterValue(),this.paint(),this.events.fire(b.GridEvents.afterRowHide,[i]))}},e.prototype.isRowHidden=function(t){if((0,d.isDefined)(t)){var e=this.data.getItem(t.toString());return e?!!e.hidden:void 0}},e.prototype.getScrollState=function(){return{x:this._scroll.left,y:this._scroll.top}},e.prototype.scroll=function(t,e){var i=this.getRootView().refs.grid_body.el.querySelector(".scroll-view")||this.getRootView().refs.grid_body.el;i.scrollLeft=!t&&0!==t||"number"!=typeof t?i.scrollLeft:t,i.scrollTop=!e&&0!==e||"number"!=typeof e?i.scrollTop:e,this.paint()},e.prototype.scrollTo=function(t,e){var i=this.config,n=i.topSplit,o=i.bottomSplit,r=i.columns,a=i.$width,l=i.$height,s=i.$headerHeight,c=r.filter((function(t){return!t.hidden})),u=this.data.getRawData(0,-1,null,2),h=c.findIndex((function(t){return t.id==e})),f=u.findIndex((function(e){return e.id==t}));if((0,d.isDefined)(h)&&(0,d.isDefined)(f)){var p=this.getScrollState(),v=this.selection.getCell(),_=v&&r.findIndex((function(t){return t.id==v.column.id})),m=v&&u.findIndex((function(t){return t.id==v.row.id})),y=(0,w.getCurrFixedCols)(this.config,b.Split.left).length,x=(0,w.getCurrFixedCols)(this.config,b.Split.right).length,C=y&&_<y,S=x&&_>=r.length-x,E=n&&m<n,D=o&&m>=u.length-o,O=(0,g.colsWidth)(this.config,c,0,h),k=(0,g.rowsHeight)(this.config,u,0,f),R=(0,g.getTotalRowHeight)(u[f]);if(y){var T=(0,g.colsWidth)(this.config,c,0,y);(!C&&!S&&h<_||O-p.x-T<0)&&(O-=T)}if(x){var M=(0,g.colsWidth)(this.config,c,c.length-x,c.length);(!C&&!S&&h>_||a+p.x-O-c[h].$width-M<0)&&(O+=M)}if(n){var I=(0,g.rowsHeight)(this.config,u,0,n);(!E&&!D&&f<m||k-p.y-I<0)&&(k-=I)}if(o){var H=(0,g.rowsHeight)(this.config,u,u.length-o,u.length);(!E&&!D&&f>m||l+p.y-s-k-R-H<0)&&(k+=H)}var P=a+p.x,F=l+p.y-s,A=k-p.y-R,$=O-p.x-r[h].$width,j=k+2*R+18-F,L=O+2*r[h].$width+18-P,N=A>0&&j<0?0:A<0?A:j,V=$>0&&L<0?0:$<0?$:L;this.scroll(V+p.x,N+p.y)}},e.prototype.adjustColumnWidth=function(t,e){void 0===e&&(e=!0);var i=this.config.columns.filter((function(t){return!t.hidden})),n=i.filter((function(e){return e.id===t})),o=this._adjustColumnsWidth({rows:this.config.data,cols:n,totalCols:i,adjust:e});this.config.$totalWidth=i.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0),this.paint()},e.prototype.getCellRect=function(t,e){var i,n,o=this.config.columns.filter((function(t){return!t.hidden}));(0,d.isDefined)(e)||(e=this.config.columns[0].id);var r=this.data.getRawData(0,-1),a=this.getSpan(t,e),l=o.findIndex((function(t){return t.id==(a?a.column:e)})),s=r.findIndex((function(e){return e.id==(a?a.row:t)})),c=(0,g.colsWidth)(this.config,o,0,l),u=(0,g.rowsHeight)(this.config,r,0,s);if("bottom"===this.config.footerPosition&&"auto"!==this.config.height&&this.config.$height>=this.config.$totalHeight&&this.config.bottomSplit){var h=r.slice(-this.config.bottomSplit)||[],f=h.findIndex((function(e){return e.id===t}));if(h.length&&-1!==f){var p=(0,w.calcScrollBarWidth)(this.config,!!(null===(i=this.scrollView)||void 0===i?void 0:i.config.enable));u=this.config.$height-this.config.$footerHeight-this.config.$headerHeight-(0,g.rowsHeight)(this.config,r,r.length-this.config.bottomSplit+f,r.length)-p.x-w.BORDERS}}return{x:c,y:u,height:(null==a?void 0:a.rowspan)>1?(0,v.getSpanHeight)(r,a):(0,g.getTotalRowHeight)(r[s])||0,width:(null==a?void 0:a.colspan)>1?(0,v.getWidth)(this.config.columns,a.colspan,this.config.columns.findIndex((function(t){return t.id===a.column}))):(null===(n=o[l])||void 0===n?void 0:n.$width)||0}},e.prototype.getColumn=function(t){for(var e,i=0,n=null===(e=this.config)||void 0===e?void 0:e.columns;i<n.length;i++){var o=n[i];if(o.id==t)return o}},e.prototype.addSpan=function(t){this.config.spans=this.config.spans||[];var e=(0,d.findIndex)(this.config.spans,(function(e){return"".concat(e.row)==="".concat(t.row)&&"".concat(e.column)==="".concat(t.column)}));e>=0?this.config.spans[e]=t:(this.config.spans.push((0,D.normalizeSpan)(t,this.config,this.data)),this._checkMarks(),this.paint())},e.prototype.getSpan=function(t,e){var i,n=this;if(this.config.spans){var o=this.data.getIndex(t.toString()),r=this.config.columns.findIndex((function(t){return t.id===e})),a=(0,d.findIndex)(this.config.spans,(function(t){var e=n.data.getIndex(t.row.toString()),i=n.config.columns.findIndex((function(e){return e.id===t.column})),a=e,l=t.rowspan?e+t.rowspan:e+1,s=i,c=t.colspan?i+t.colspan:i+1;return o>=a&&o<l&&r>=s&&r<c}));return null===(i=this.config)||void 0===i?void 0:i.spans[a]}},e.prototype.removeSpan=function(t,e){if(this.config.spans){var i=(0,d.findIndex)(this.config.spans,(function(i){return"".concat(i.row)=="".concat(t)&&"".concat(i.column)=="".concat(e)}));this.config.spans.splice(i,1),this.paint()}},e.prototype.editCell=function(t,e,i){var n,o=this.data.getItem(t),r=this.getColumn(e);if(o&&r){var a=r.editorType,l=this.getSpan(o.id,r.id);if(!l||"function"!=typeof l.text){if(i||(i=this.config.autoHeight&&"number"!==r.type?"textarea":"input","date"===r.type&&(i="datePicker"),"boolean"===r.type&&(i="checkbox"),a&&(i=a),(0,d.isDefined)(null==l?void 0:l.text)&&(i=this.config.autoHeight?"textarea":"input")),"number"===r.type)if(!((0,d.isDefined)(null==l?void 0:l.text)&&["input","textarea"].includes(i))&&!["input","select","combobox"].includes(i))return;this.events.fire(b.GridEvents.beforeEditStart,[o,r,i])&&((null===(n=this.config.$editable)||void 0===n?void 0:n.editor)||this.config.$editable&&this.config.$editable.row===t&&this.config.$editable.col===e&&this.config.$editable.editorType===i||(this.config.$editable={row:o.id,col:r.id,isSpan:!!l,editorType:i},this.selection.config.disabled||this.selection.setCell(t.toString(),e.toString()),this.paint(),this.events.fire(b.GridEvents.afterEditStart,[o,r,i])))}}else(0,f.dhxWarning)("item not found")},e.prototype.editEnd=function(t){this.config.$editable&&this.config.$editable.editor&&this.config.$editable.editor.endEdit(t)},e.prototype.getHeaderFilter=function(t){var e=this,i=this.getColumn(t);if(i){var n=null;return i.header.forEach((function(o){if(o.content){var r=e.content[o.content];r&&(r.element[t]||r.toHtml(i,e.config),n=r.element[t])}})),n}},e.prototype.getSummary=function(t){return r(r({},this._commonSummary),t?this._colSummary[t]:{})},e.prototype.getSortingState=function(){var t,e=null===(t=this._sortingStates)||void 0===t?void 0:t[0];return{dir:e.dir,by:e.by}},e.prototype._createView=function(){var t=this;return(0,l.create)({render:function(e,i){return t._destructed?(0,l.el)("div"):(0,x.render)(e,i,t._htmlEvents,t.selection,t._uid)},hooks:this._initHooks()},this)},e.prototype._dragInit=function(){(this.config.dragMode||this.config.dragItem)&&(f.dragManager.setItem(this._uid,this),this._dropManager=new O.DropManager({view:this}),this.config.dragItem||(this.config.dragItem="row"),this.config.dragMode||(this.config.dragMode="both"))},e.prototype._parseColumns=function(t){void 0===t&&(t=!1);var e=this.config.columns.filter((function(t){return!t.hidden}));this.config.$filteredColumns=e,this.normalizeColumns({config:this.config,columns:e,configChanged:t}),(0,g.countColumns)(this.config,e)},e.prototype.normalizeColumns=function(t){var e,i,n,o=this,r=t.config,a=t.columns,l=t.configChanged;r.$headerHeightMap=[],r.$footerHeightMap=[],r.$headerHeight=r.$footerHeight=0;for(var s=0,c=a;s<c.length;s++){(p=c[s]).htmlEnable=null!==(e=p.htmlEnable)&&void 0!==e?e:r.htmlEnable,p.$cellCss=p.$cellCss||{},(0,g.normalizeArray)(p,"header"),(0,g.normalizeArray)(p,"footer"),p.minWidth&&p.minWidth<20&&(p.minWidth=20),p.maxWidth&&p.maxWidth<20&&(p.maxWidth=20);var d=p.minWidth||100;p.width&&(d=(d=p.maxWidth&&p.minWidth?p.width>=p.minWidth&&p.width<=p.maxWidth?p.width:p.width>=p.maxWidth?p.maxWidth:p.minWidth:p.maxWidth?p.width<=p.maxWidth?p.width:p.maxWidth>100?p.maxWidth:100:p.minWidth?p.width>=p.minWidth?p.width:p.minWidth:p.width)<20?20:d),p.$width=p.$width&&!l?p.$width:d,p.$width>p.maxWidth&&(p.$width=p.maxWidth),p.$width<p.minWidth&&(p.$width=p.minWidth)}for(var u=function(t){if(null===(i=t.header)||void 0===i?void 0:i.length){var e=0;t.header.forEach((function(i,n){(e=r.headerAutoHeight?o.getNormalizeContentHeight(i,t,r):r.headerRowHeight)>(r.$headerHeightMap[n]||0)&&(r.$headerHeightMap[n]=Math.max(e,r.headerRowHeight))}))}if(null===(n=t.footer)||void 0===n?void 0:n.length){var a=0;t.footer.forEach((function(e,i){(a=r.footerAutoHeight?o.getNormalizeContentHeight(e,t,r):r.footerRowHeight)>(r.$footerHeightMap[i]||0)&&(r.$footerHeightMap[i]=Math.max(a,r.footerRowHeight))}))}},h=0,f=a;h<f.length;h++){var p;u(p=f[h])}r.$headerHeight=r.$headerHeightMap.reduce((function(t,e){return t+e}),0),r.$footerHeight=r.$footerHeightMap.reduce((function(t,e){return t+e}),0)},e.prototype.getNormalizeContentHeight=function(t,e,i){return this.config.footerRowHeight},e.prototype._parseData=function(){this._rowHeightsRebuild=!0,this._detectColsTypes(),this.config.data=this.data.map((function(t){return t})),this.config.data=this._prepareData(this.data),this._checkMarks(),this._applyLocalFilter(),this._checkFilters()},e.prototype._createCollection=function(){this.data=new f.DataCollection(null,this.events)},e.prototype._getRowIndex=function(t){return this.data.getIndex(t)},e.prototype._setHTMLEventHandlers=function(){var t=this,e=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id"));if(o&&n&&(0,_.isTooltip)(t.config,n)){var a=void 0;if("combobox"===n.editorType||"select"===n.editorType){var l=(0,g.getEditorOptions)(n,o).find((function(t){var e;return(t instanceof Object?t.id.toString():t)===(null===(e=o[n.id])||void 0===e?void 0:e.toString())}));a=l instanceof Object?l.value:l}else if("multiselect"===n.editorType){var s=null===(i=o[n.id])||void 0===i?void 0:i.toString().split(", ");if(null==s?void 0:s.length)a=(0,g.getEditorOptions)(n,o).filter((function(t){return s.includes(t instanceof Object?t.id.toString():t)})).map((function(t){return t instanceof Object?t.value:t})).join(", ")}var d=(0,g.applyPattern)(a||o[n.id],n),u=function(){return!!d||"boolean"==typeof d};n.tooltipTemplate?d=n.tooltipTemplate(d,o,n)||null:u()&&n.template&&(d=n.template(d,o,n)),u()&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,n)))}},i=function(e,i){var n;void 0===i&&(i="header");var o=(0,c.locate)(e,"data-dhx-text-id"),a=(0,c.locate)(e,"data-dhx-id"),l=t.getColumn(a);if(o&&l){var s=null===(n=l[i])||void 0===n?void 0:n.find((function(t){return t.id===o}));if((0,_.isContentTooltip)(t.config,l,s,i)){var d=null==s?void 0:s.text,u=t.getSummary(l.id);"function"==typeof d&&(d=d(u)),"function"==typeof(null==s?void 0:s.tooltipTemplate)&&(d=s.tooltipTemplate(r({value:d},u),s,l)||null),(null==d?void 0:d.toString().length)&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,l,s)},(0,_.getTooltipConfig)(t.config,l,s,i)))}}},n=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id")),a=t.getSpan(o.id,n.id);if(o&&a&&(0,_.isTooltip)(t.config,a)){var l=t.getSummary(n.id),s=null===(i=("function"==typeof a.text?a.text(l):a.text)||(0,g.applyPattern)(o[n.id],n))||void 0===i?void 0:i.toString();a.tooltipTemplate?s=a.tooltipTemplate(r({value:s},l),a)||null:n.template&&(s=n.template(s,o,n)),s&&(0,_.showTooltip)(s,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,null,a)))}};this._htmlEvents={onclick:(0,c.eventHandler)((function(t){return(0,c.locate)(t)}),{"dhx_grid-header-cell--sortable":function(e,i){var n=e.target.getAttribute("dhx_resized"),o=t.getColumn(i);if(o&&(0,_.isSortable)(t.config,o)&&!n){var r=(0,c.locate)(e,"data-dhx-text-id"),a=o.header.find((function(t){return t.id===r}));t._sort(i,a.sortAs)}},"dhx_grid-expand-cell":function(e,i){e.target.classList.contains("dhx_grid-expand-cell-icon")&&t.events.fire(b.GridEvents.expand,[i])},"dhx_span-expand-cell":function(e,i){e.target.classList.contains("dhx_span-expand-cell-icon")&&t.events.fire(b.GridEvents.expand,[i])}}),onscroll:function(e){t.events.fire(b.GridEvents.scroll,[{y:e.target.scrollTop,x:e.target.scrollLeft}])},onmouseover:function(t){for(var o=[{className:"dhx_grid-header-cell",action:function(t){return i(t,"header")}},{className:"dhx_grid-footer-cell",action:function(t){return i(t,"footer")}},{className:"dhx_grid-cell",action:e},{className:"dhx_span-cell",action:n}],r=0,a=o;r<a.length;r++){var l=a[r],s=l.className,d=l.action,u=(0,c.locateNodeByClassName)(t,s);if(u){d(u);break}}}}},e.prototype._setEventHandlers=function(){var t=this;this.data.events.on(f.DataEvents.load,(function(){if(t._applyLocalFilter(!0),t._parseData(),t._parseColumns(),t.config.autoEmptyRow){var e=t.data.find({by:"$emptyRow",match:!0});e?t.data.move(e.id,t.data.getLength()-1):t._addEmptyRow()}t.config.data instanceof f.DataCollection?(0,l.awaitRedraw)().then((function(){return t._normalizeSpans()})):t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.change,(function(e,i,n){if("load"!==i&&"add"!==i&&"remove"!==i)if(t._rowHeightsRebuild=!0,"setPage"!==i){if("sort"===i?t._setSort():"update"===i?t.config.data=t._prepareData(t.data):((0,f.isTreeCollection)(t.data)?t.config.data=t._prepareData(t.data):t._setSummary(),t._adjustColumns()),(0,d.isId)(e)&&(t._checkFilters(),t._checkSelectFilterValue()),t._detectColsTypes(),t._removeMarks(),t._checkMarks(),t.config.autoEmptyRow&&(!t._activeFilters||(0,d.isEmptyObj)(t._activeFilters))){var o=t.data.find({by:"$emptyRow",match:!0});if(o){if(o.id===e)return;t.data.move(o.id,t.data.getLength()-1)}else t._addEmptyRow()}if("sort"===i)t._normalizeSpans();t._render()}else(0,l.awaitRedraw)().then((function(){var e=t.config.columns.find((function(t){return!0!==t.hidden}));t.scrollTo(t.data.getId(n[0]).toString(),e.id.toString()),t._render()}))})),this.data.events.on(f.DataEvents.filter,(function(e){t._rowHeightsRebuild=!0,e||t.data.getRawFilters({permanent:!0})||t._applyLocalFilter(),!e||(0,f.isOnlyPermanentFilters)(e)?(t._filterData=t.data.map((function(t){return t}))||[],t._setUniqueData(),t._clearFilterValue()):t._checkFilters(),t._setSummary(),t._removeMarks(),t._checkMarks(),t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.removeAll,(function(){t._hiddenFilters={},t.config.columns.map((function(t){t.header.map((function(e){!e.content||"selectFilter"!==e.content&&"comboFilter"!==e.content||(t.$uniqueData=[])}))})),(0,d.isEmptyObj)(t._activeFilters)||t.data.resetFilter(),t._clearFilterValue(!0)})),this.data.events.on(f.DataEvents.afterAdd,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"add")})),this.data.events.on(f.DataEvents.afterRemove,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"remove")})),this.events.on(f.DragEvents.beforeDrag,(function(e,i,n,o){if("row"===o)return!t.data.isGrouped()&&t.events.fire(b.GridEvents.beforeRowDrag,[e,i])})),this.events.on(f.DragEvents.dragStart,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowStart,[e,i]),t._autoScroll("vertical")})),this.events.on(f.DragEvents.dragIn,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowIn,[e,i])})),this.events.on(f.DragEvents.dragOut,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowOut,[e,i])})),this.events.on(f.DragEvents.canDrop,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.canRowDrop,[e,i])})),this.events.on(f.DragEvents.cancelDrop,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.cancelRowDrop,[e,i])})),this.events.on(f.DragEvents.beforeDrop,(function(e,i,n){if("row"===n)return t.events.fire(b.GridEvents.beforeRowDrop,[e,i])})),this.events.on(f.DragEvents.afterDrop,(function(e,i,n){var o,r=e.source,l=e.target,s=e.start;if("row"===n){var c=t.data.getItem(e.start);if(!c||r.some((function(t){return t==l})))return;for(var d=0,u=t.config.columns;d<u.length;d++){var h=u[d];void 0===c[h.id]&&t.data.update(c.id,((o={})[h.id]=null,o),!0)}var f=t.data.getInitialData(),p=null==f?void 0:f.findIndex((function(t){return t.id==s})),g=null==f?void 0:f.findIndex((function(t){return t.id==l}));if(p>-1&&g>-1)if((null==r?void 0:r.length)>1){for(var v=[],_=function(t){var e=null==f?void 0:f.findIndex((function(e){return e.id==t})),i=null==f?void 0:f.splice(e,1)[0];v.push(i)},m=0,y=r;m<y.length;m++){_(y[m])}g=null==f?void 0:f.findIndex((function(t){return t.id==l})),g>0&&++g,null==f||f.splice.apply(f,a([g,0],v,!1))}else null==f||f.splice(g,0,null==f?void 0:f.splice(p,1)[0]);t._rowHeightsRebuild=!0,t._adjustColumns(),t._checkFilters(),t.paint(),t.events.fire(b.GridEvents.afterRowDrop,[e,i])}})),this.events.on(f.DragEvents.afterDrag,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.afterRowDrag,[e,i]),t._normalizeSpans()})),this.events.on(b.GridEvents.dragPanelItemMouseDown,(function(e,i){t._dragProcess(i,t.data.getItem(e))})),this.events.on(b.GridEvents.cellMouseDown,(function(e,i,n){!t.config.dragPanel&&t._dragProcess(n,e,i)})),this._events.on(b.GridSystemEvents.cellTouchMove,(function(e,i,n){t._touch.start&&n.preventDefault(),t._clearTouchTimer()})),this._events.on(b.GridSystemEvents.cellTouchEnd,(function(){t._touch.start=!1,t._clearTouchTimer()})),this.events.on(b.GridEvents.filterChange,(function(e,i,n,o){var r,a,l;if(t.events.fire(b.GridEvents.beforeFilter,[e,i])){if(t.config.autoEmptyRow){var s=t.data.find({by:"$emptyRow",match:!0});s&&t.data.remove(s.id)}t._activeFilters||(t._activeFilters={});var c=t.getColumn(i),d=c.header.filter((function(t){return t.content===n&&void 0!==t.customFilter}))[0];if("comboFilter"===n&&void 0!==e||"comboFilter"!==n&&""!==e){var u=(0,g.getEditorOptions)(c);"combobox"!==c.editorType&&"select"!==c.editorType&&"multiselect"!==c.editorType||!u||(e=Array.isArray(e)?e.map((function(t){var e;return(null===(e=u.find((function(e){return"string"==typeof e?e===t:e.value===t})))||void 0===e?void 0:e.id)||t})):null!==(a=null===(r=u.find((function(t){return"string"==typeof t?t===e:t.value===e})))||void 0===r?void 0:r.id)&&void 0!==a?a:e);t._activeFilters[i]={by:i,match:e,compare:null!==(l=null==d?void 0:d.customFilter)&&void 0!==l?l:function(e){var i=t.getColumn(e);return function(e,o,r,a){return t.content[n].match({val:e,match:o,obj:r,multi:a,col:i})}}(i),multi:"multiselect"===(null==c?void 0:c.editorType)}}else delete t._activeFilters[i];o||t.data.filter(t._activeFilters)}})),this.events.on(b.GridEvents.scroll,(function(e){t._scroll={top:e.y,left:e.x},t.paint()})),this.events.on(b.GridEvents.cellDblClick,(function(e,i,n){e&&((0,c.locateNodeByClassName)(n,"dhx_boolean-cell")||e.hasOwnProperty("$group")||(!1!==i.editable&&t.config.editable||i.editable)&&t.editCell(e.id,i.id,i.editorType))})),this.events.on(b.GridEvents.afterEditEnd,(function(e,i,n){t._afterEditEndProcess(e,i,n)})),this.events.on(b.GridEvents.headerCellMouseDown,(function(e,i,n){var o=n.target.getAttribute("dhx_resized");if(o&&t.events.fire(b.GridEvents.beforeResizeStart,[i,n])&&(0,S.startResize)(t,o.toString(),n,(function(){t.paint(),t.config.$resizing=null,t.events.fire(b.GridEvents.afterResizeEnd,[i,n])})),n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(b.GridEvents.headerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(b.GridEvents.footerCellDblClick,(function(e,i,n){if(n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(b.GridEvents.footerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(b.GridEvents.resize,(function(){return t._parseColumns()})),this.events.on(b.GridEvents.afterResizeEnd,(function(e){var i;t.config.columns=null===(i=t.config.columns)||void 0===i?void 0:i.map((function(t){return t.id==e.id&&(t.width=e.$width),t})),t._parseColumns()}))},e.prototype._afterEditEndProcess=function(t,e,i){var n,o,a=this;if(!(null===(o=this.config.$editable)||void 0===o?void 0:o.editor)||this.config.$editable.col===i.id&&this.config.$editable.row===e.id){var s,c;this.config.$editable?(s=this.config.$editable.row,c=this.config.$editable.col):(s=e.id,c=i.id);var u=this.getSpan(s,c);if((0,d.isDefined)(null==u?void 0:u.text)&&(0,d.isDefined)(t))u.text=t.toString();else{var h=this.data.getItem(s);delete h.$emptyRow,(0,d.isDefined)(t)&&this.data.update(s,r(r({},h),((n={})[c]=t,n)))}this.config.$editable=null,this.paint(),(0,l.awaitRedraw)().then((function(){var t;null===(t=a.selection)||void 0===t||t.restoreFocus()}))}},e.prototype._addEmptyRow=function(){var t=this.data.getId(this.data.getLength()-1),e=this.data.getItem(t),i=this.config.columns.filter((function(t){return!t.hidden}));(0,_.isRowEmpty)(e)||this.data.add(i.reduce((function(t,e){return t[e.id]="",t}),{$emptyRow:!0}))},e.prototype._sort=function(t,e,i){void 0===i&&(i=this.config.multiSort);var n=this.getColumn(t),o=this._sortingStates.find((function(e){return e.by==t}));if(this.events.fire(b.GridEvents.beforeSort,[n,"asc"===(null==o?void 0:o.dir)?"desc":"asc"])){var r="asc";(null==o?void 0:o.by)===t&&(r="asc"===o.dir?"desc":"asc");this.data.sort({by:t,dir:r,as:null!=e?e:function(t){return t&&"date"===n.type?(0,w.getNormalizeDateObject)(t,n.dateFormat).getTime():t?"".concat(t):""}},{smartSorting:i}),this.events.fire(b.GridEvents.afterSort,[n,r])}},e.prototype._setSort=function(){var t,e=null===(t=this.data.getSortingStates())||void 0===t?void 0:t[0];this._sortingStates=e&&[e]||[]},e.prototype._clearTouchTimer=function(){this._touch.timer&&(clearTimeout(this._touch.timer),this._touch.timer=null)},e.prototype._checkFilters=function(t){if(void 0===t&&(t=!1),(0,d.isEmptyObj)(this._activeFilters))t&&this.data.resetFilter(),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData();else{var e=this.data.getRawFilters({permanent:!0});this.data.filter(e,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(),this.data.filter(null,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(!0)}},e.prototype._setUniqueData=function(t){var e=this;void 0===t&&(t=!1),this._filterData&&this.config.columns.forEach((function(i){i.header.forEach((function(n){var o;if(!(null===(o=e._activeFilters)||void 0===o?void 0:o[i.id])&&n.content&&("selectFilter"===n.content||"comboFilter"===n.content)){var r=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.multiselection})),a=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}));if(!t||t&&!a){var l=(0,g.getNormalizeFilterData)(e._filterData,i.id,r,i.editorType),s=(0,g.getEditorOptions)(i);"combobox"!==i.editorType&&"select"!==i.editorType&&"multiselect"!==i.editorType||!s||(l=l.map((function(t){var e=s.find((function(e){return"string"==typeof e?t===e:t===e.id}));return e&&"string"!=typeof e?e.value:t}))),l="string"!==i.type?Array.from(new Set(l.map((function(t){return(0,g.applyPattern)(t,i)})))):l,t?i.$activeFilterData=l:(i.$uniqueData=l,i.$activeFilterData&&delete i.$activeFilterData)}}}))}))},e.prototype._checkSelectFilterValue=function(){var t,e=null===(t=this.content)||void 0===t?void 0:t.selectFilter;if(e)for(var i in e.value){var n=this.getColumn(i),o=e.value[i];n.hidden||!o||n.$uniqueData.includes(o)||e.element[i].clear()}},e.prototype._clearFilterValue=function(t){var e=this;void 0===t&&(t=!1),["selectFilter","inputFilter","dateFilter"].map((function(t){var i;return null===(i=e.content)||void 0===i?void 0:i[t]})).filter((function(t){return t})).forEach((function(i){for(var n in i.value)!i.value[n]||!t&&e.getColumn(n).hidden||i.element[n].clear(!0)}))},e.prototype._adjustColumns=function(){var t=this,e=this.config.columns.filter((function(t){return!t.hidden})),i=[],n=[],o={};if(e.forEach((function(t){(0,d.isDefined)(t.adjust)?t.adjust&&i.push(t):n.push(t)})),i.length||n.length){var a=this.config.data&&this.config.data.length?this.config.data:this.data.map((function(t){return t}));i.forEach((function(i){o=r(r({},o),t._adjustColumnsWidth({rows:a,cols:[i],totalCols:e,adjust:i.adjust}))})),n.length&&(o=r(r({},o),this._adjustColumnsWidth({rows:a,cols:n,totalCols:e})))}this.config.$totalWidth=e.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0)},e.prototype._prepareData=function(t){var e=this;return(this.config.autoHeight||this.config.headerAutoHeight||this.config.footerAutoHeight)&&(this.config.autoHeight=this.config.headerAutoHeight=this.config.footerAutoHeight=!1),this._normalizeDataType(),this._setSummary(),this._adjustColumns(),t.map((function(t){return t.$height=Number(t.height)||e.config.rowHeight,t}))},e.prototype._adjustColumnsWidth=function(t){var e,i,n,o,r=this,a=t.rows,l=t.cols,s=t.adjust,c=void 0===s?this.config.adjust:s,d={};if("header"===c||!0===c){var u=l.filter((function(t){return t.header}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"header"),u,{font:"normal 14.4px Arial"},"header"))for(var h=0,f=Object.entries(y);h<f.length;h++){var p=f[h],v=p[0],m=p[1];d=Object.assign(d,((e={})[v]=+m+24+(o=this.getColumn(v),(0,_.isSortable)(r.config,o)?16:0),e))}}if("footer"===c||!0===c){var y;u=l.filter((function(t){return t.footer}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"footer"),u,{font:"normal 14.4px Arial"},"footer"))for(var b=0,x=Object.entries(y);b<x.length;b++){var w=x[b];v=w[0],m=w[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((i={})[v]=+m+24,i)))}}if(("data"===c||!0===c)&&(y=(0,g.getMaxColsWidth)(a,l,{font:"normal 14.4px Arial"},"data")))for(var C=0,S=Object.entries(y);C<S.length;C++){var E=S[C];v=E[0],m=E[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((n={})[v]=+m+24,n)))}return d},e.prototype._prepareColumnData=function(t,e){for(var i,n,o,a=[],l=0;l<t.length;l++){for(var s=[],c=t[l],d=0;d<(null==c?void 0:c[e].length);d++){var u={},h=null===(n=null==c?void 0:c[e][d])||void 0===n?void 0:n.text;if(h){"function"==typeof h&&(h=h(this.getSummary(c.id)));var f=null===(o=null==c?void 0:c[e][d])||void 0===o?void 0:o.htmlEnable;u[c.id]=h||"",f&&(u[c.id]=(0,_.removeHTMLTags)(u[c.id]))}else u[c.id]="";s.push(u)}for(var p=0;p<s.length;p++)for(var g=0,v=Object.entries(s[p]);g<v.length;g++){var m=v[g],y=m[0],b=m[1];a[p]=r({},a[p])||{},a[p]=Object.assign(a[p],((i={})[y]=b,i))}}return a},e.prototype._dragStart=function(t){if(this.config.dragMode&&("row"===this.config.dragItem||"both"===this.config.dragItem)&&!this.config.$editable){var e=this.data.getItem((0,c.locate)(t,"data-dhx-id")).id;t.targetTouches&&(this._touch.start=!0),f.dragManager.onMouseDown({event:t,source:[e],itemsForGhost:[this._getRowGhost([e])],type:"row"})}},e.prototype._dragProcess=function(t,e,i){var n=this;if(t.targetTouches){if(this._touch.timer=setTimeout((function(){n._dragStart(t)}),this._touch.duration),this._touch.timeStamp)this._touch.dblDuration>=this._touch.timeStamp-+t.timeStamp.toFixed()&&((!1!==i.editable&&this.config.editable||i.editable)&&this.editCell(e.id,i.id,i.editorType),t.preventDefault(),this.events.fire(b.GridEvents.cellDblClick,[e,i,t])),this._touch.timeStamp=null;else this._touch.timeStamp=+t.timeStamp.toFixed();setTimeout((function(){n._touch.timeStamp=null}),this._touch.dblDuration)}else this._dragStart(t)},e.prototype._getRowGhost=function(t){for(var e,i=this.config,n=i.$totalWidth,o=i.$width,r=this.getRootNode(),a=(0,w.getCurrFixedCols)(this.config,b.Split.left),l=(0,w.getCurrFixedCols)(this.config,b.Split.right),s=(0,w.calcScrollBarWidth)(this.config,!!(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)),d=[],u=function(e){var i=t[e],u=(0,k.getRowNode)(i,r);if(!u)return"continue";var h=n>o-s.y?o-s.y-w.BORDERS:n;if(a.length||l.length){var f=new Array(3);if(f[1]=u,a.length){var p=(0,k.getRowNode)(i,r,"left");h-=p.offsetWidth,f[0]=p}if(l.length){var g=(0,k.getRowNode)(i,r,"right");h-=g.offsetWidth,f[2]=g}var v=document.createElement("div");return v.style.display="flex",f.forEach((function(t){if(t){var e=t.cloneNode(!0);if(t===u){var i=(0,c.getNodeOffset)(t,r).left-(0,_.getTotalWidth)(a)-w.BORDERS/2;v.appendChild((0,k.getVisibleRowNode)(e,h,i))}else e.removeAttribute("aria-rowindex"),e.style.width=t.offsetWidth+"px",v.appendChild(e)}})),{value:v}}var m=u.cloneNode(!0);d.push((0,k.getVisibleRowNode)(m,h,(0,c.getNodeOffset)(u,r).left-w.BORDERS/2))},h=0;h<t.length;h++){var f=u(h);if("object"==typeof f)return f.value}var p=document.createElement("div");return p.style.setProperty("width","initial","important"),d.forEach((function(t){return p.appendChild(t)})),p},e.prototype._initHooks=function(){var t=this;return{didMount:function(){t._canDataParse(!0)&&(t._container||t._applyAutoWidth(),t.data.parse(t.config.data)),t.config.autoWidth&&t._parseColumns(),t.config.keyNavigation&&(t.keyManager&&t.keyManager.destructor(),t.keyManager=new u.KeyManager((function(e,i){return!(i!==t._uid||!t.events.fire(b.GridEvents.beforeKeyDown,[e]))&&(t.events.fire(b.GridEvents.afterKeyDown,[e]),!0)})),t._initHotKey())}}},e.prototype._normalizeDataType=function(){var t=this,e=this.config.columns.reduce((function(t,e){return"number"===e.type&&t.push(e),t}),[]);e.length&&this.data.forEach((function(i){for(var n,o=0,r=e;o<r.length;o++){var a=r[o],l=(0,g.getValueForNumberColumn)(a,i[a.id]);if(Number.isNaN(l)&&!i.$group)throw new Error("Incorrect data in column with type 'number', see docs: https://docs.dhtmlx.com/suite/grid/api/api_gridcolumn_properties/");i[a.id]!==l&&t.data.update(i.id,((n={})[a.id]=l,n),!0)}}))},e.prototype._applyLocalFilter=function(t){void 0===t&&(t=!1);var e={add:!0,permanent:!0,$local:!0},i=this.data.getRawFilters(),n=Object.keys(i||{}).find((function(t){return i[t].config.$local}));n&&(e.id=n),t?this.data.filter((function(t){return t}),e,!0):this.data.filter((function(t){return t&&!t.hidden}),e,!0)},e.prototype._normalizeSpans=function(){var t,e=this;this.config.spans=null===(t=this.config.spans)||void 0===t?void 0:t.map((function(t){return(0,D.normalizeSpan)(t,e.config,e.data)}))},e.prototype._hideColumn=function(t){t.hidden=!0,this.config.$totalWidth-=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._activeFilters&&this._activeFilters[t.id];e&&(this._hiddenFilters||(this._hiddenFilters={}),this._hiddenFilters[t.id]=e,delete this._activeFilters[t.id],this._checkFilters()),this._normalizeSpans(),this.paint()},e.prototype._showColumn=function(t){t.hidden=!1,this.config.$totalWidth+=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._hiddenFilters&&this._hiddenFilters[t.id];e&&(this._activeFilters[t.id]=e,delete this._hiddenFilters[t.id],this._checkFilters(),this._checkSelectFilterValue()),this._normalizeSpans(),this.paint()},e.prototype._setSummary=function(){var t=this,e=this.data.map((function(t){return t})).filter((function(t){return t!=t.$group&&t!=t.$groupSummary}));"tree"===this.config.type&&(e=e.filter((function(e){return!t.data.haveItems(e.id)}))),this.config.summary&&Object.entries(this.config.summary).forEach((function(i){var n=i[0],o=i[1];t._commonSummary[n]=t._applyMethod(o,e)})),this.config.columns.forEach((function(i){var n;if(i.summary){var o=i.id,r=i.summary;t._colSummary[o]||(t._colSummary[o]={}),"string"==typeof r?t._colSummary[o][r]=null===(n=f.methods[r])||void 0===n?void 0:n.call(f.methods,e,o):Object.entries(r).forEach((function(i){var n=i[0],r=i[1];t._colSummary[o][n]=t._applyMethod(r,e,o)}))}}))},e.prototype._init=function(){this.events=new s.EventSystem(this),this._events=new s.EventSystem(this),this._attachDataCollection(),this.export=new p.Exporter({name:"grid",version:this.version,view:this,export:null}),this._setEventHandlers()},e.prototype._observeResize=function(t){var e=this;t&&t!==this._observedEl&&(this._resizeObserver||"undefined"==typeof ResizeObserver||(this._resizeObserver=new ResizeObserver((function(t){var i,n=null===(i=t[0])||void 0===i?void 0:i.target;if(n&&n.clientWidth){var o=getComputedStyle(n),r=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight)||0,a=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)||0,l=n.clientWidth-r,s=n.clientHeight-a;if(!e._cachedSizes||e._cachedSizes.width!==l||e._cachedSizes.height!==s){var c=!!e._cachedSizes;e._cachedSizes={width:l,height:s},c&&!e._destructed&&e.paint()}}}))),this._resizeObserver&&(this._observedEl&&this._resizeObserver.unobserve(this._observedEl),this._resizeObserver.observe(t),this._observedEl=t,this._cachedSizes=null))},e.prototype._applyMethod=function(t,e,i){var n;return"function"==typeof t?t(e):"string"==typeof t&&(null===f.methods||void 0===f.methods?void 0:f.methods[t])?null===f.methods||void 0===f.methods?void 0:f.methods[t](e,i):Array.isArray(t)&&(null===f.methods||void 0===f.methods?void 0:f.methods[null==t?void 0:t[1]])?null===(n=f.methods[t[1]])||void 0===n?void 0:n.call(f.methods,e,t[0]):null},e.prototype._canDataParse=function(t){var e;return void 0===t&&(t=!1),!!((null===(e=this.config.data)||void 0===e?void 0:e.length)&&this.config.data instanceof Array&&this.config.columns)&&(this.config.autoWidth&&this.config.autoHeight?t:!t)},e.prototype._attachDataCollection=function(){if(this.config.data instanceof f.DataCollection)return this.data=this.config.data,this.data.config.collapsed=this.config.collapsed,void(this.config.data=this.data.serialize());this._createCollection()},e.prototype._setMarks=function(t,e){for(var i=[],n=0,o=this.data.map((function(e){return i.push(e[t.id]),{id:e.id,data:e[t.id],row:e}}));n<o.length;n++){var r=o[n],a=e(r.data,i,r.row,t);a&&(t.$cellCss=t.$cellCss||{},t.$cellCss[r.id]+=" "+a)}},e.prototype._checkMarks=function(){var t=this;this.config.columns.map((function(e){var i=e.mark;i&&("function"==typeof i?t._setMarks(e,i):t._setMarks(e,(function(t,e){var n=[];e.forEach((function(t){null!=t&&""!==t&&n.push(parseFloat(t))}));var o=(0,d.getMinArrayNumber)(n),r=(0,d.getMaxArrayNumber)(n);return i.max&&r===parseFloat(t)?i.max:!(!i.min||o!==parseFloat(t))&&i.min})))}))},e.prototype._removeMarks=function(){this.config.columns.forEach((function(t){t.mark&&(t.$cellCss={})}))},e.prototype._detectColsTypes=function(){this.config.columns.forEach((function(t){return t.type?t:t.numberMask?(t.type="number",t):void(t.type||(t.type="string"))}))},e.prototype._destroyContent=function(){for(var t in this.content)"function"==typeof this.content[t].destructor&&this.content[t].destructor()},e.prototype._render=function(){this.paint()},e.prototype._initHotKey=function(t){void 0===t&&(t=!1);var e=(0,E.getKeysHandlers)(this);for(var i in e)this.keyManager.exist(i)||this.keyManager.addHotKey(i,e[i]);if(!t)for(var i in this.config.hotkeys)this.keyManager.addHotKey(i,this.config.hotkeys[i])},e.prototype._normalizeConfig=function(t){return Object.keys(t).forEach((function(e){e.startsWith("$")&&delete t[e]})),t},e.prototype._autoScroll=function(t){var e,i,n,o,r=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):null===(n=this.getRootNode())||void 0===n?void 0:n.querySelector(".dhx_grid-body");if(r){var a=null,l=r.getBoundingClientRect(),s=l.top,c=l.bottom,d=l.left,u=l.right,h=l.height,f=l.width,p=30,g=this.config.dragPanel?(null===(o=this.config.dragPanel)||void 0===o?void 0:o.width)||R.defaultDragPanelConfig.width:0,v=function(t,e){t&&r.scrollBy("left"===t?-40:40,0),e&&r.scrollBy(0,"up"===e?-40:40),(t||e)&&(a=setTimeout((function(){v(t,e)}),100))},_=function(e){var i=e.clientX,n=e.clientY,o=null,r=null;switch(t){case"horizontal":i>u-p&&i<u&&n>s&&n<c?o="right":i>d&&i<d+p&&n>s&&n<c&&(o="left");break;case"vertical":n>c-p&&n<c&&i>d-g&&i<u?r="down":n>s&&n<s+p&&i>d-g&&i<u&&(r="up");break;case"auto":i>u-p&&i<u&&n>s&&n<c?o="right":i>d&&i<d+p&&n>s&&n<c&&(o="left"),n>c-p&&n<c&&i>d-g&&i<u?r="down":n>s&&n<s+p&&i>d-g&&i<u&&(r="up")}o||r?a||v(o,r):a&&(clearTimeout(a),a=null)};(f<r.scrollWidth||h<r.scrollHeight)&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",(function(){document.removeEventListener("pointermove",_),a&&clearTimeout(a)}),{once:!0}))}},e.prototype._applyAutoWidth=function(){var t,e,i=this._container||(null===(t=this.getRootView().node.parent)||void 0===t?void 0:t.el);if(i){var n=(0,x.getElementSizes)(i),o=null===(e=this.scrollView)||void 0===e?void 0:e.config.enable;(0,x.applyAutoWidth)(this.config,n,o)}},e.prototype._handleRow=function(t,e){if(this._rowHeightsRebuild=!0,(0,d.isId)(t)&&"remove"===e){var i=this.selection.getCells().find((function(e){return e.row.id===t}));i&&this.selection.removeCell(i.row.id,i.column.id)}if(this.config.data=this._prepareData(this.data),(0,d.isId)(t)&&(this._checkFilters(),this._checkSelectFilterValue()),this._detectColsTypes(),this._removeMarks(),this._checkMarks(),this.config.autoEmptyRow&&(!this._activeFilters||(0,d.isEmptyObj)(this._activeFilters))){var n=this.data.find({by:"$emptyRow",match:!0});if(n){if(n.id===t)return;this.data.move(n.id,this.data.getLength()-1)}else this._addEmptyRow()}this._normalizeSpans(),this._render()},e}(h.View);e.Grid=T},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,i,n,o){return new(n||(n=t))((function(t,r){function a(t){try{s(o.next(t))}catch(t){r(t)}}function l(t){try{s(o.throw(t))}catch(t){r(t)}}function s(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(t){t(i)}))).then(a,l)}s((o=o.apply(e,i||[])).next())}))},r=this&&this.__generator||function(t,e){var i,n,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(l){return function(s){return function(l){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(a=0)),a;)try{if(i=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t],n=0}finally{i=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Exporter=void 0;var l=i(5),s=i(8),c=i(0),d=i(13),u=i(2),h=i(1),f=i(18),p=i(4),g=function(){function e(t){this._xlsxWorker=null,this._name=t.name,this._version=t.version,this._grid=t.view,this._exportConfigCallback=t.export}return e.prototype.pdf=function(t){return this._rawExport(t,"pdf")},e.prototype.png=function(t){return this._rawExport(t,"png")},e.prototype.xlsx=function(t){void 0===t&&(t={});var e=this._getExportConfig("xlsx");return this._xlsxExport(n({url:"https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx",name:"grid",tableName:"data"},t),e)},e.prototype.csv=function(e){var i=this;return void 0===e&&(e={}),new t((function(t){var o,r=i._getExportConfig("csv"),a=(e=n(n({asFile:!0,rowDelimiter:"\n",columnDelimiter:",",skipHeader:0},e),r.typeConfig||{})).name||"grid";o="getRoot"in i._grid.data&&e.flat?i.getFlatCSV(e,r):i._getCSV(e,r),e.asFile&&(0,c.downloadFile)(o,"".concat(a,".csv"),"text/csv"),t(o)}))},e.prototype._getExportData=function(t,e){var i,o=this;if(void 0===t&&(t={}),!(0,l.isWasmSupported)())throw new Error("WebAssembly is not supported by your browser");var r={number:"#,##0.00",percent:"#,##0.00%",date:t.dateFormatMask||"dd/mm/yy",string:"@"},a=this._getExportWidget(null,e),s=a.config.columns.filter((function(t){return!t.hidden})),u=a._colSummary;if(!s.length)return{data:[{name:t.tableName||"data",cols:[],rows:[],merged:[],cells:[]}],styles:[]};var h={},g={},_=(0,l.transpose)(s.map((function(t){return(t.header||[]).map((function(e){var i=e.text;return i?(0,l.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):""}))}))),y=(0,l.transpose)(s.map((function(t){return(t.footer||[]).map((function(e){var i=e.text;return{text:i?(0,l.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):"",content:t.summary,col_id:t.id}}))}))),b=[],x=[],w=new Map;w.set("default",{css:{color:"#000000",background:"#FFFFFF",fontSize:14},index:w.size});var C=new Map,S={},E={},D=a.config.$headerHeightMap.map((function(t){return{height:t}})),O=e.data.map((function(t,i){D.push({height:t.$height});var n="function"==typeof e.rowCss?e.rowCss(t):"";(t.$css||n)&&(E[t.id]="".concat(t.$css||""," ").concat(n||"").trim()),h[t.id]=i;var r=s.map((function(i,n){var r=i.id,a=i.editorType,s=i.type,c=i.options,u=i.patternMask,h=i.numberMask;S[r]=n;var g=e.spans.find((function(e){return e.column===r&&e.row===t.id})),v=(null==g?void 0:g.text)||t[r],_=t.$group&&o._grid.config.columns.find((function(e){return t.$by==e.id}));if((i.options||_)&&(v=(0,p.getOptionValue)(v,_||i)),"multiselect"===a&&c instanceof Array)return(v||"").split(",").map((function(t){var e=t.trim(),i=c.find((function(t){return"string"==typeof t?t===e:t.id==e}));return i?"object"==typeof i?i.value:i:e})).join(", ");if("date"===s){var m=i.dateFormat||"%M %d %Y";if("string"==typeof v){var y=(0,d.stringToDate)(v,m,!0)?(0,d.stringToDate)(v,m):new Date(v);y instanceof Date&&!isNaN(y.valueOf())&&(v=(0,d.getExcelDate)(y))}else v instanceof Date&&(v=(0,d.getExcelDate)(v))}else"number"===s?("string"==typeof v&&u&&(v=(0,f.removePatternMask)(v,u)),"string"==typeof v&&"object"==typeof h&&(v=(0,f.removeNumberMask)(v,h))):v=(0,p.applyPattern)(v,i);return v||n||!t.$groupName?(0,l.removeHTMLTags)(v):"^ ".concat(t.$groupName)}));return r}));a.config.$footerHeightMap.forEach((function(t){return D.push({height:t})}));for(var k=function(t){var i=t.type,o=t.align,a=t.numberMask,d=t.patternMask,f=t.footer,p=t.header,m=n({},t.$cellCss);(e.spans.filter((function(e){return e.column===t.id}))||[]).forEach((function(t){(null==t?void 0:t.css)&&(m[t.row]="".concat(m[t.row]||""," ").concat(t.css).trim())}));var S="number"===i?"right":o;b.push({width:t.$width});var D=s.indexOf(t);g[t.id]=D;var k="";S&&(k+=" align:".concat(S));var R="";R="number"===i?a?"boolean"==typeof a?r.number:function(t){var e=t.prefix,i=t.suffix,n=t.maxIntLength,o=t.maxDecLength,r=void 0===o?2:o,a="";e&&(a+='"'.concat(e,'"'));if(n)for(var l=0;l<n;l++)a+=l===n-1?"0":"#";else a+="#";if(r){a+=".";for(l=0;l<r;l++)a+="#"}i&&(a+="%"===i?i:'"'.concat(i,'"'));return a}(a):"string"==typeof d&&d.includes("0")&&!["#","a","*"].find((function(t){return d.includes(t)}))?function(t){if(!t.includes("0")&&!t.includes("#"))return"";var e=t.split(""),i="",n=!0;return e.forEach((function(t){"0"===t||"#"===t?(n||(i+='"',n=!0),i+=t):(n&&(i+='"',n=!1),i+=t)})),i}(d):r.number:i&&r[i]||"";var T=v(k+=" format:".concat(R));if(w.has(T))C.set("col_".concat(D),T);else{if($=(0,l.getStyleByClass)("dhx_grid-cell","dhx_grid-cell",w.get("default"))){var M=n(n({},$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(T,{css:n(n({},w.get("default").css),M),index:w.size})}C.has("col_".concat(D))||C.set("col_".concat(D),T)}for(var I in f&&f.forEach((function(e,i){var o=e.rowspan,r=void 0===o?0:o,a=e.colspan,s=void 0===a?0:a;if(s||r){var d=O.length+_.length+i;x.push({from:{row:d,column:D},to:{row:d+(r?r-1:0),column:D+(s?s-1:0)}})}var h=e.text?"function"==typeof e.text?e.text(u[t.id]):e.text:"";y[i][D]=n(n({},y[i][D]),{text:(0,l.removeHTMLTags)(h)});var f=R||(0,c.isNumeric)(h)&&"0.00",p="dhx_grid-footer-cell ".concat(e.css||""," ").concat(f," ").concat(e.align),g=v(p);if(!w.has(g)){var m=(0,l.getStyleByClass)(p,"dhx_grid-footer-cell",w.get("default"));if(m){var b=n(n({},m),{f_format:f});e.align&&(b.align=e.align),b["font-weight"]=b.bold?"bold":"normal",b.fontSize&&(b.fontSize="".concat(b.fontSize,"px")),w.set(g,{css:n(n({},w.get("default").css),b),index:w.size})}}C.set("footer_".concat(D,"_").concat(i),g)})),p&&p.forEach((function(t,e){var i=t.rowspan,o=void 0===i?0:i,r=t.colspan,a=void 0===r?0:r;if(a||o){var s=e;x.push({from:{row:s,column:D},to:{row:s+(o?o-1:0),column:D+(a?a-1:0)}})}var c="dhx_grid-header-cell ".concat(t.css||""," ").concat(t.align||""," ").concat(S||""),d=v(c);if(!w.has(d)){var u=(0,l.getStyleByClass)(c,"dhx_grid-header-cell",w.get("default"));if(u){var h=n(n({},u),{format:R});(t.align||S)&&(h.align=t.align||S),w.set(d,{css:n(n({},w.get("default").css),h),index:w.size})}}C.set("header_".concat(D,"_").concat(e),d)})),m){var H="dhx_grid-cell ".concat(m[I].trim()," ").concat(k),P=v(H),F="dhx_grid-row";if(E[I]&&(F+=" ".concat(E[I].trim())),!w.has(P))if($=(0,l.getStyleByClass)(H,F,w.get("default"))){M=n(n(n({},w.get("default").css),$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(P,{css:n({},M),index:w.size})}w.has(P)&&C.set("".concat(h[I],"_").concat(D),P)}for(var I in E)if(!(m||{})[I]){var A="".concat(E[I]," format:").concat(R);S&&(A+=" align:".concat(S));var $,j=v(A);F="dhx_grid-row ".concat(E[I].trim());if(!w.has(j))if($=(0,l.getStyleByClass)("dhx_grid-cell",F,w.get("default"))){M=n(n(n({},w.get("default").css),$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(j,{css:n({},M),index:w.size})}w.has(j)&&C.set("".concat(h[I],"_").concat(D),j)}},R=0,T=s;R<T.length;R++){k(T[R])}var M=[];w.forEach((function(t){var e={};Object.keys(t.css).forEach((function(i){if(t.css[i])return"bold"===i?e.fontWeight="bold":void(e[i]="".concat(t.css[i]))})),e.verticalAlign="center",M.push(n(n({},e),{id:t.index.toString()}))})),M[0].format="#";var I=[];if(_.length){var H=_.map((function(t,e){return t.map((function(t,i){var n=C.get("header_".concat(i,"_").concat(e))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));I.push.apply(I,H)}var P=O.map((function(t,e){return t.map((function(t,i){var n=C.get("".concat(e,"_").concat(i))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));if(I.push.apply(I,P),y.length){var F=y.map((function(e,i){return e.map((function(e,n){var o,r=e.text,a=e.content,l=e.col_id,s="string"==typeof a,c=a&&(o=u[l],Object.values(o)[0]==r),d=C.get("footer_".concat(n,"_").concat(i))||C.get("col_".concat(n))||"default";return{v:a&&s&&c?m({func:a,startRow:_.length+1,col:n,rowsCount:P.length,functionsMap:t.mapToExcelFormulas}):""===r?null:r,s:w.get(d).index}}))}));I.push.apply(I,F)}if(null===(i=e.spans)||void 0===i?void 0:i.length){var A=e.spans.map((function(t){var e=h[t.row]+_.length,i=g[t.column],n=t.rowspan,o=void 0===n?1:n,r=t.colspan;return{from:{row:e,column:i},to:{row:e+o-1,column:i+(void 0===r?1:r)-1}}}));x.push.apply(x,A)}return a.destructor(),{data:[{name:t.tableName||"data",cells:I,cols:b,rows:D,merged:x}],styles:M}},e.prototype._xlsxExport=function(e,i){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,a;return r(this,(function(r){switch(r.label){case 0:return e=n(n({},e),i.typeConfig||{}),o=this._getExportData(e,i),e.url?[4,this._getXlsxWorker(e.url)]:[3,2];case 1:return a=r.sent(),[2,new t((function(t,i){var n=function(r){if("ready"===r.data.type){a.removeEventListener("message",n);var l=r.data.blob;(0,c.downloadFile)(l,"".concat(e.name||"dhtmlx_grid",".xlsx")),t(o)}else"error"===r.data.type&&(a.removeEventListener("message",n),i(r.data))};a.addEventListener("message",n),a.postMessage({type:"convert",data:o})}))];case 2:return[2,o]}}))}))},e.prototype.getFlatCSV=function(t,e){var i=this._grid.data,n=i.getRoot(),o=e.columns,r=o[0],c=i.getMaxLevel(),d="";i.eachChild(n,(function(e){var n=function(t,e){for(var i=[],n=0;n<=c;n++)if(t&&t[r.id]){i[t.$level]=t[r.id];var o=e.getParent(t.id,!0);t=o&&o.id?o:null}else i[n]="";return i}(e,i).join(t.columnDelimiter);d+=n+Object.keys(e).reduce((function(i,n,o){return"id"===n||"parent"===n||n.startsWith("$")||0===o?i:i+t.columnDelimiter+(null===e[n]?"":e[n])}),""),d+=t.rowDelimiter}));var u=function(t,e){for(var i=0;i<t.length;i++)t[i]=e;return t}(new Array(c+1),""),h=(0,l.transpose)(o.map((function(t){return(t.header||[]).map((function(t){return(0,l.removeHTMLTags)("".concat(t.text||" "))}))})));return h=h.map((function(t){return t.splice.apply(t,a([0,1],u,!1)),t})),new s.CsvDriver(t).serialize(h,!0)+t.rowDelimiter+d},e.prototype._getCSV=function(t,e){var i=this._getExportData(t,e),n=new s.CsvDriver(t),o=i.data[0].cells.map((function(t){return t.map((function(t){return t.v}))}));return n.serialize(o,!0)},e.prototype._rawExport=function(e,i){void 0===e&&(e={});var o=document.createElement("div");o.setAttribute("style","display: none;");var r=this._getExportConfig(i),a=this._getExportWidget(o,r);(e=n(n({},r.typeConfig||{}),e)).url=e.url||"https://export.dhtmlx.com/"+this._name+"/"+i+"/"+this._version;var l="boolean"==typeof e.exportStyles||Array.isArray(e.exportStyles)?e.exportStyles:a.config.exportStyles;if("pdf"===i){var c=e.pdf;e.pdf=n({printBackground:!1,format:"A4"},c)}return new t((function(t,n){(0,h.awaitRedraw)().then((function(){var r="";!0===l?r="".concat((0,u.getPageLinksCss)(),"<style>").concat((0,u.getPageInlineCss)(),"</style>"):Array.isArray(l)&&l.length&&(r="".concat((0,u.getPageLinksCss)(l)));var c=o.children[0];null==c||c.setAttribute("data-dhx-theme",e.theme||"light"),"png"===i&&(null==c||c.setAttribute("style","width: ".concat(a.config.width,"px;")));var d="\n\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t").concat(o.innerHTML,"\n\t\t\t\t\t");fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({raw:d,config:e})}).then((function(t){return t.ok||(0,s.dhxError)("HTTP error, status: ".concat(t.status)),t.blob()})).then((function(n){var r,l=document.createElement("a");l.href=URL.createObjectURL(n),l.download="".concat(e.name||"grid",".").concat(i),l.click(),URL.revokeObjectURL(l.href),a.destructor(),null===(r=o.parentNode)||void 0===r||r.removeChild(o),t()})).catch((function(t){var e;a.destructor(),null===(e=o.parentNode)||void 0===e||e.removeChild(o),n(t)}))})).catch((function(t){var e;a.destructor(),null===(e=o.parentNode)||void 0===e||e.removeChild(o),n(t)}))}))},e.prototype._getExportWidget=function(t,e){var i,o,r=n(n({},e),{keyNavigation:!1,selection:!1,rangeSelection:!1,blockSelection:!1,clipboard:!1,history:!1,resizable:!1,editable:!1});(null===(i=r.data)||void 0===i?void 0:i.length)||(0,s.dhxWarning)("There is no data to export"),(null===(o=r.columns)||void 0===o?void 0:o.length)||(0,s.dhxWarning)("There is no column for export");var a=new this._grid.constructor(t,(0,c.getCloneObject)(r)),l=a.config.$totalWidth,d=a.config.$totalHeight+a.config.$headerHeight+(a.config.$footer?a.config.$footerHeight:0);return a.config.height=d,a.config.width=l,a.paint(),a},e.prototype._getExportConfig=function(t){var e=n({},this._grid.config);if("function"!=typeof this._exportConfigCallback)return n(n({},e),{spans:e.spans||[]});var i=this._exportConfigCallback(e,t),o=this._grid.data.getRawData(0,-1,null,2)||[];return n(n(n({},e),i),{columns:(i.columns?this._getCallbackData(e.columns,i.columns):e.columns)||[],spans:(i.spans?this._getCallbackData(e.spans,i.spans):e.spans)||[],data:(i.data?this._getCallbackData(o,i.data):o)||[]})},e.prototype._getCallbackData=function(t,e){var i=this;return"function"!=typeof e?null:t.map((function(t,n,o){return e((0,c.getCloneObject)(t),n,o,i._grid)})).filter(Boolean)},e.prototype._getXlsxWorker=function(e){return o(this,void 0,void 0,(function(){var i;return r(this,(function(n){return null===this._xlsxWorker&&(i=window.URL.createObjectURL(new Blob(["importScripts('".concat(e,"');")],{type:"text/javascript"})),this._xlsxWorker=new t((function(t){var e=new Worker(i);e.addEventListener("message",(function(i){"init"===i.data.type&&t(e)}))}))),[2,this._xlsxWorker]}))}))},e}();function v(t){return t.split("").reduce((function(t,e){var i=(t<<5)-t+e.charCodeAt(0);return Math.abs(i&i)}),0).toString()}function _(t){for(var e="";t>=0;)e=String.fromCharCode(t%26+65)+e,t=Math.floor(t/26)-1;return e}function m(t){var e=t.func,i=t.startRow,n=t.col,o=t.rowsCount,r=t.functionsMap,a=void 0===r?{}:r,l="".concat(_(n)).concat(i,":").concat(_(n)).concat(o+i-1),s={sum:"=SUM(".concat(l,")"),avg:"=AVERAGE(".concat(l,")"),count:"=COUNT(".concat(l,")"),max:"=MAX(".concat(l,")"),min:"=MIN(".concat(l,")")};return Object.entries(a).forEach((function(t){var e=t[0],i=t[1];s[e]="=".concat(i,"(").concat(l,")")})),s[e]}e.Exporter=g}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(84),e),o(i(85),e),o(i(86),e),o(i(87),e),o(i(26),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.message=void 0;var n=i(0),o=i(2),r=i(26),a=new WeakMap,l=new Map;function s(t,e){var i=document.createElement("div");return i.setAttribute("data-position",e),i.className="dhx_message-container dhx_message-container--"+e+(t===document.body?" dhx_message-container--in-body":""),i}e.message=function(t){var e;"string"==typeof t&&(t={text:t}),t.position=t.position||r.MessageContainerPosition.topRight;var i=document.createElement("div");i.className="dhx_widget dhx_message "+(t.css||""),i.setAttribute("role","alert");var c=t.text&&(0,n.uid)();c&&i.setAttribute("aria-describedby",c),t.html?i.innerHTML=t.html:(i.innerHTML='<span class="dhx_message__text" id='.concat(c,"></span>\n\t\t").concat(t.icon?'<span class="dhx_message__icon dxi '.concat(t.icon,'"></span>'):""),i.querySelector("#".concat(c)).textContent=t.text);var d=t.node?(0,o.toNode)(t.node):document.body;"static"===getComputedStyle(d).position&&(d.style.position="relative");var u=l.get(d);u?u[t.position]||(u[t.position]={stack:[],container:s(d,t.position)}):l.set(d,((e={})[t.position]={stack:[],container:s(d,t.position)},e));var h=l.get(d)[t.position],f=h.stack,p=h.container;function g(t){void 0===t&&(t=!0),i&&(!function(t,e){e&&clearTimeout(a.get(t));var i=t.parentNode,n=i.getAttribute("data-position"),o=i.parentNode,r=l.get(o);if(r){var s=r[n];if(s){var c=s.stack,d=c.indexOf(t);-1!==d&&(i.removeChild(t),c.splice(d,1),0===c.length&&o.removeChild(i))}}}(i,t),i=null)}if(0===f.length&&d.appendChild(p),f.push(i),p.appendChild(i),t.expire){var v=setTimeout((function(){return g(!1)}),t.expire);a.set(i,v)}return i.onclick=function(){return g()},{close:function(){return g()}}}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.alert=void 0;var n=i(38),o=i(39),r=i(0);e.alert=function(e){var i=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.apply,a=(0,o.blockScreen)(e.blockerCss);return new t((function(t){var n="dhx_alert__".concat((0,r.uid)(),"_content"),o="dhx_alert__".concat((0,r.uid)(),"_header"),l=document.createElement("div");l.setAttribute("role","alert"),l.setAttribute("aria-modal","true"),e.text&&l.setAttribute("aria-describedby",n),e.header&&l.setAttribute("aria-labelledby",o),l.className="dhx_widget dhx_alert "+(e.css||"");var s=function(e){"Escape"!==e.key&&"Esc"!==e.key||(c(e),t(!1))};function c(t){t.preventDefault(),a(),document.body.removeChild(l),document.removeEventListener("keydown",s)}l.innerHTML="\n\t\t\t".concat(e.header?"<div id=".concat(o,' class="dhx_alert__header"> ').concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t\t").concat(e.text?"<div id=".concat(n,' class="dhx_alert__content">').concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="confirm" class="dhx_alert__apply-button dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(l.querySelector("#".concat(o)).textContent=e.header),e.text&&(l.querySelector("#".concat(n)).textContent=e.text)),document.body.appendChild(l),l.querySelector(".dhx_alert__apply-button").focus(),l.querySelector("button").addEventListener("click",(function(e){c(e),t(!0)})),document.addEventListener("keydown",s)}))}}).call(this,i(9))},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.confirm=void 0;var n=i(38),o=i(39),r=i(0);e.confirm=function(e){e.buttonsAlignment=e.buttonsAlignment||"right";var i=e.buttons&&e.buttons[1]?e.buttons[1]:n.default.apply,a=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.reject,l=(0,o.blockScreen)("dhx_alert__overlay-confirm "+(e.blockerCss||""));return new t((function(t){var n=document.createElement("div");n.setAttribute("role","alertdialog"),n.setAttribute("aria-modal","true");var o,s=e.header&&(0,r.uid)(),c=e.header&&(0,r.uid)();c&&n.setAttribute("aria-describedby",c),s&&n.setAttribute("aria-labelledby",s);var d=function(e){l(),n.removeEventListener("click",u),document.removeEventListener("keydown",h),document.body.removeChild(n),t(e)},u=function(t){"BUTTON"===t.target.tagName&&d(t.target.classList.contains("dhx_alert__confirm-aply"))},h=function(t){"Escape"===t.key||"Esc"===t.key?(n.querySelector(".dhx_alert__confirm-aply").focus(),d(t.target.classList.contains("dhx_alert__confirm-reject"))):"Tab"===t.key&&("aply"===o?(o="reject",n.querySelector(".dhx_alert__confirm-reject").focus()):(o="aply",n.querySelector(".dhx_alert__confirm-aply").focus()),t.preventDefault())};n.className="dhx_widget dhx_alert dhx_alert--confirm"+(e.css?" "+e.css:""),n.innerHTML="\n\t\t".concat(e.header?'<div class="dhx_alert__header" id='.concat(s,"> ").concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t").concat(e.text?'<div class="dhx_alert__content" id='.concat(c,">").concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="reject" class="dhx_alert__confirm-reject dhx_button dhx_button--view_link dhx_button--color_primary dhx_button--size_medium">').concat(a,'</button>\n\t\t\t\t<button type="button" aria-label="aply"class="dhx_alert__confirm-aply dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(n.querySelector("#".concat(s)).textContent=e.header),e.text&&(n.querySelector("#".concat(c)).textContent=e.text)),document.body.appendChild(n),o="aply",n.querySelector(".dhx_alert__confirm-aply").focus(),n.addEventListener("click",u),document.addEventListener("keydown",h)}))}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.disableTooltip=e.enableTooltip=e.tooltip=e.getZIndex=e.findPosition=void 0;var o=i(2),r=i(26),a=750,l=200;function s(t,e,i,n,o,a){var l,c,d;if(void 0===o&&(o=8),void 0===a&&(a=0),a>1&&(e=r.Position.center),"top"!==e&&"bottom"!==e){var u=t.top+(t.height-n)/2,h=u<0&&window.pageYOffset+u+n<scrollY+window.innerHeight;d=window.pageYOffset+(h?0:u)}switch(e){case r.Position.center:return(c=t.left+window.pageXOffset+(t.width-i)/2)+o<window.pageXOffset&&(c=t.left+window.pageXOffset),{left:c,top:d,pos:l=r.RealPosition.center};case r.Position.right:return l=r.RealPosition.right,(c=t.right+window.pageXOffset+o)+i>window.innerWidth+window.pageXOffset?s(t,r.Position.left,i,n,o,++a):{left:c,top:d,pos:l};case r.Position.left:return l=r.RealPosition.left,(c=window.pageXOffset+t.left-i-o)<0?s(t,r.Position.right,i,n,o,++a):{left:c,top:d,pos:l};case r.Position.top:return l=r.RealPosition.top,(c=window.pageXOffset+t.left+(t.width-i)/2)+i>window.innerWidth+window.pageXOffset?c=window.innerWidth+window.pageXOffset-i:c<0&&(c=0),t.top<n?s(t,r.Position.bottom,i,n,o,++a):{left:c,top:d=window.pageYOffset+t.top-n-o,pos:l};case r.Position.bottom:default:return(c=window.pageXOffset+t.left+(t.width-i)/2)+i>window.innerWidth+window.pageXOffset?c=window.innerWidth+window.pageXOffset-i:c<0&&(c=0),l=r.RealPosition.bottom,(d=window.pageYOffset+t.bottom+o)+n>window.innerHeight+window.pageYOffset?s(t,r.Position.top,i,n,o,++a):{left:c,top:d,pos:l}}}e.findPosition=s;var c=document.createElement("div"),d=document.createElement("span");d.className="dhx_tooltip__text",c.appendChild(d),c.setAttribute("role","tooltip"),c.style.position="absolute";var u,h=null,f=!1,p=null,g=null;function v(t){return t&&(t.classList.contains("dhx_popup--window")&&t.classList.contains("dhx_popup--window_active")||t.classList.contains("dhx_popup--window_modal")||t.classList.contains("dhx_popup"))?1e7:(null==t?void 0:t.classList.contains("dhx_popup--window"))?9999999:t&&t.offsetParent?v(t.offsetParent):null}function _(t,e,i,n,o,a,l){void 0===n&&(n=""),void 0===o&&(o=!1),void 0===a&&(a=8);var u=t.getBoundingClientRect();l?d.innerHTML=e:d.textContent=e,c.style.left=null,c.style.top=null,document.body.appendChild(c),c.className="dhx_widget dhx_tooltip ".concat(o?" dhx_tooltip--forced":""," ").concat(n);var h=c.getBoundingClientRect(),p=s(u,i,h.width,h.height,a),g=p.left,_=p.top,m=p.pos,y=v(t);switch(y&&(c.style.zIndex=y.toString()),m){case r.RealPosition.bottom:case r.RealPosition.top:case r.RealPosition.left:case r.RealPosition.right:case r.RealPosition.center:c.style.left=g+"px",c.style.top=_+"px"}c.className+=" dhx_tooltip--".concat(m),f=!0,o||setTimeout((function(){c.className+=" dhx_tooltip--animate"}))}function m(t,e,i){var n=i.force,o=i.showDelay,s=i.hideDelay,d=i.position,v=i.css,m=i.htmlEnable,y=i.margin;n||(g=setTimeout((function(){_(t,e,d||r.Position.bottom,v,!1,y,m)}),o||a));var b=function(){var e;f&&(e=s,h&&(p=setTimeout((function(){document.body.removeChild(c),f=!1,p=null}),e||l))),clearTimeout(g),t.removeEventListener("mouseleave",b),t.removeEventListener("blur",b),document.removeEventListener("mousedown",b),h=null,u=null};n&&_(t,e,d,v,n,y,m),t.addEventListener("mouseleave",b),t.addEventListener("blur",b),document.addEventListener("mousedown",b),u=b}function y(t,e){var i=(0,o.toNode)(e.node);i!==h&&(u&&(u(),u=null),h=i,p?(clearTimeout(p),p=null,m(i,t,n(n({},e),{force:!0}))):m(i,t,e))}function b(t){var e=(0,o.locateNode)(t,"dhx_tooltip_text");e&&y(e.getAttribute("dhx_tooltip_text"),{position:e.getAttribute("dhx_tooltip_position")||r.Position.bottom,node:e})}e.getZIndex=v,e.tooltip=y,e.enableTooltip=function(){document.addEventListener("mousemove",b)},e.disableTooltip=function(){document.removeEventListener("mousemove",b)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSums=void 0;var n=function(){function t(){this._prefix=new Float64Array(1),this._length=0}return t.prototype.ensureCapacity=function(t){return this._prefix.length<t+1&&(this._prefix=new Float64Array(t+1)),this._prefix[0]=0,this._prefix},t.prototype.setLength=function(t){this._length=t},t.prototype.totalSize=function(){return this._prefix[this._length]},t.prototype.rangeSize=function(t,e){var i=t<0?0:t,n=e>this._length?this._length:e;return n<=i?0:this._prefix[n]-this._prefix[i]},t.prototype.itemSize=function(t){return t<0||t>=this._length?0:this._prefix[t+1]-this._prefix[t]},t.prototype.findIndex=function(t){if(0===this._length)return 0;if(t<=0)return 0;if(t>=this._prefix[this._length])return this._length-1;for(var e=0,i=this._length;e<i;){var n=e+i>>1;this._prefix[n+1]>t?i=n:e=n+1}return e},Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this._length=0,this._prefix=new Float64Array(1)},t}();e.PrefixSums=n},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.GridSelectionEvents=void 0;var r,a=i(1),l=i(8),s=i(0),c=i(6),d=i(3),u=i(17),h=i(7),f=i(5),p=i(14),g=i(4);!function(t){t.beforeUnSelect="beforeUnSelect",t.afterUnSelect="afterUnSelect",t.beforeSelect="beforeSelect",t.afterSelect="afterSelect"}(r||(e.GridSelectionEvents=r={}));var v=function(){function t(t,e,i,o){this._grid=t,this._gridId=o,this._selectedCell=null,this._selectedCells=[],this._selectedSet=new Set,this.config=n({type:"complex",disabled:!1,multiSelection:!1},e),this.events=i||new c.EventSystem(this),this._init()}return t.prototype.setCell=function(t,e,i,n){var r,l,s,c,d,h,f,p,g,v,_,m,y,b=this;void 0===i&&(i=!1),void 0===n&&(n=!1);var x="tree"===this._grid.config.type;if(this._gridId&&u.focusManager.getFocusId()!==this._gridId&&u.focusManager.setFocusId(this._gridId),"row"===this.config.type&&(null===(s=this._selectedCells[0])||void 0===s?void 0:s.row.id)===((null==t?void 0:t.id)||t)||"row"!==this.config.type&&(null===(c=this._selectedCells[0])||void 0===c?void 0:c.row.id)===((null==t?void 0:t.id)||t)&&(null===(d=this._selectedCells[0])||void 0===d?void 0:d.column.id)===((null==e?void 0:e.id)||e)){if(i)return this._removeCell(null===(h=this._selectedCells[0])||void 0===h?void 0:h.row,null===(f=this._selectedCells[0])||void 0===f?void 0:f.column),void(0,a.awaitRedraw)().then((function(){b._grid.paint(),b._setBrowserFocus()}));if("row"===this.config.type&&e&&this._selectedCell){var w=this._grid.getColumn(e.id||e);if(w&&w.id!==(null===(p=this._selectedCell.column)||void 0===p?void 0:p.id))return this._selectedCell={row:this._selectedCell.row,column:w},void(0,a.awaitRedraw)().then((function(){return b._setBrowserFocus()}))}if(!this.config.multiSelection||this.config.multiSelection&&1===this._selectedCells.length)return}if(!(this.config.disabled||this._grid.config.$editable||!this.config.multiSelection&&this._selectedCells.length&&!this._removeCell(null===(g=this._selectedCell)||void 0===g?void 0:g.row,null===(v=this._selectedCell)||void 0===v?void 0:v.column))){if(this.config.multiSelection){if(i||n||this._removeCells(),this.isSelectedCell(t,e))return void this.removeCell((null==t?void 0:t.id)||t,(null==e?void 0:e.id)||e);n&&this._selectedCells.length>1&&!x&&o([],this._selectedCells,!0).forEach((function(t,e){var i=t.row,n=t.column;e>0&&b.removeCell(i.id,n.id)}))}t=this._grid.data.getItem(t&&t.id||t);var C=null===(m=null===(_=this._grid.config)||void 0===_?void 0:_.columns)||void 0===m?void 0:m.filter((function(t){return!t.hidden}));if(e||(e=null==C?void 0:C[0]),(e=this._grid.getColumn(e.id||e))&&t){if(this.config.multiSelection&&n&&this._selectedCells.length&&!x){var S=null===(y=this._selectedCells)||void 0===y?void 0:y[0],E=this._grid.data.getIndex(S.row.id),D=this._grid.data.getIndex(t.id);if(E>D&&(E=(r=[D,E])[0],D=r[1]),"cell"===this.config.type||"complex"===this.config.type){var O=C.map((function(t){return t.id})),k=O.indexOf(S.column.id),R=O.indexOf(e.id);if(-1!==k&&-1!==R){k>R&&(k=(l=[R,k])[0],R=l[1]);var T=C.slice(k,R+1);this._grid.data.mapRange(E,D,(function(t){T.forEach((function(e){-1===b._findIndex({row:t,column:e})&&b._setCell(t,e)}))}))}}else this._grid.data.mapRange(E,D,(function(t){-1===b._findIndex({row:t,column:e})&&b._setCell(t,e)}))}else this._setCell(t,e);(0,a.awaitRedraw)().then((function(){b._grid.paint(),b._setBrowserFocus()}))}}},t.prototype.removeCell=function(t,e){var i=this;if(t&&e&&("cell"===this.config.type||"complex"===this.config.type)){var n=this._selectedCells.find((function(i){var n=i.row,o=i.column;return n.id==t&&o.id==e}));n&&this._removeCell(n.row,n.column)}else if(t){this._selectedCells.filter((function(e){return e.row.id==t})).forEach((function(t){var e=t.row,n=t.column;i._removeCell(e,n)}))}else this._removeCells();(0,a.awaitRedraw)().then((function(){i._grid.paint()}))},t.prototype.getCell=function(){return this._selectedCell},t.prototype.getCells=function(){return this._selectedCells},t.prototype.disable=function(){this.removeCell(),this.config.disabled=!0,this._grid.paint()},t.prototype.enable=function(){this.config.disabled=!1,this._grid.paint()},t.prototype.isSelectedCell=function(t,e){var i=(null==t?void 0:t.id)||t,n=(null==e?void 0:e.id)||e;return this._selectedSet.has(this._cellKey(i,n))},t.prototype.restoreFocus=function(){this._setBrowserFocus()},t.prototype.toHTML=function(){var t=this;if(!this._isUnselected()){if(this.config.multiSelection){var e=[],i={};return this._selectedCells.forEach((function(n,o,r){var a=(0,p.normalizeCell)(n,t._grid);e.push(t._toHTML(a.row,a.column,o===r.length-1||"cell"===t.config.type||"complex"===t.config.type,i[n.row.id])),i[n.row.id]=!0})),e}var n=(0,p.normalizeCell)(this._selectedCell,this._grid);return this._toHTML(n.row,n.column,!0)}},t.prototype._setCell=function(t,e){t&&e&&(0,s.isDefined)(t.id)&&(0,s.isDefined)(e.id)&&this.events.fire(r.beforeSelect,[t,e])&&(this._selectedCell={row:t,column:e},this.config.multiSelection?this._selectedCells.push(this._selectedCell):(this._selectedSet.clear(),this._selectedCells=[this._selectedCell]),this._selectedSet.add(this._cellKey(t.id,e.id)),this.events.fire(r.afterSelect,[t,e]))},t.prototype._removeCell=function(t,e,i){var n,o;if(void 0===i&&(i=!1),!(t&&e&&(0,s.isDefined)(t.id)&&(0,s.isDefined)(e.id)))return!1;if(!i&&!this.events.fire(r.beforeUnSelect,[t,e]))return!1;var a=this._selectedCells.findIndex((function(i){return i.row.id===t.id&&i.column.id===e.id}));return this._selectedCells.splice(a,1),this._selectedSet.delete(this._cellKey(t.id,e.id)),this._selectedCell&&e.id===this._selectedCell.column.id&&t.id===this._selectedCell.row.id&&(this._selectedCell=(null===(n=this._selectedCells)||void 0===n?void 0:n[(null===(o=this._selectedCells)||void 0===o?void 0:o.length)-1])||null),!i&&this.events.fire(r.afterUnSelect,[t,e]),!0},t.prototype._removeCells=function(t){var e=this;void 0===t&&(t=!1),this._selectedSet.clear(),o([],this._selectedCells,!0).forEach((function(i){e._removeCell(null==i?void 0:i.row,null==i?void 0:i.column,t)}))},t.prototype._init=function(){var t=this;this._grid.events.on(d.GridEvents.cellClick,(function(e,i,n){t.setCell(e,i,n.ctrlKey||n.metaKey,n.shiftKey)})),this._grid.data.events.on(l.DataEvents.beforeRemove,(function(e){var i,n;if(e&&t._selectedCell&&t._selectedCell.row&&t._selectedCell.row.id===e.id){var o=void 0,r=t._grid.data.getIndex(e.id);if(t._grid.data instanceof l.TreeCollection){var a=t._grid.data.getItems(e.parent);o=(null===(i=a[r+1])||void 0===i?void 0:i.id)||(null===(n=a[r-1])||void 0===n?void 0:n.id)||e.parent}else o=t._grid.data.getId(r+1)||t._grid.data.getId(r-1);(0,s.isId)(o)&&(t.setCell(o),t._grid.paint())}})),this._grid.data.events.on(l.DataEvents.removeAll,(function(){t._removeCells()})),this._grid.data.events.on(l.DataEvents.load,(function(){t._removeCells(!0)}))},t.prototype._toHTML=function(t,e,i,n){var o,r,l,c,u,p,v,_,m,y,b,x,w;void 0===i&&(i=!1),void 0===n&&(n=!1);var C=this._grid.data.getRawData(0,-1,null,2);if(-1===(0,s.findIndex)(C,(function(e){return e.id==t.id})))return null;var S=this._grid.config,E=S.topSplit,D=S.bottomSplit,O=S.$totalWidth,k=S.$totalHeight,R=S.columns,T=null==R?void 0:R.filter((function(t){return!t.hidden})),M={left:(0,h.getCurrFixedCols)(this._grid.config,d.Split.left),right:(0,h.getCurrFixedCols)(this._grid.config,d.Split.right)},I=this._grid.data.getLength(),H={top:E?this._grid.data.getRawData(0,E):[],bottom:D?this._grid.data.getRawData(I-D,I):[]},P={left:null===(o=null==M?void 0:M.left)||void 0===o?void 0:o.map((function(t){return t.id})),right:null===(r=null==M?void 0:M.right)||void 0===r?void 0:r.map((function(t){return t.id}))},F={top:H.top.map((function(t){return t.id})),bottom:H.bottom.map((function(t){return t.id}))},A=null===(l=null==M?void 0:M.left)||void 0===l?void 0:l.reduce((function(t,e){return t+(e.$width||0)}),0),$=null===(c=null==M?void 0:M.right)||void 0===c?void 0:c.reduce((function(t,e){return t+(e.$width||0)}),0),j=H.top.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),L=H.bottom.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),N=this._grid.getCellRect(t.id,e.id);t.$subRowHeight&&t.$opened&&(N.height=N.height-t.$subRowHeight);var V,W,z,B,G=this._grid.getScrollState(),Y=N.y,U=null===(u=F.top)||void 0===u?void 0:u.includes(t.id),X=null===(p=P.left)||void 0===p?void 0:p.includes(e.id),q=M.left.length&&A>N.x-G.x,K=H.top.length&&j>N.y-G.y,Z=N.width,J=N.height,Q=null,tt=null,et=q?A+G.x:N.x;if(q&&(Z-=(X?(0,f.getTotalWidth)(M.left.slice(0,T.indexOf(e))):A)-(N.x-G.x)),K&&(J-=(U?(0,f.getTotalHeight)(H.top.slice(0,C.indexOf(t))):j)-(N.y-G.y)-1,Y+=N.height-J),U)if(Y=N.y+G.y,(nt=this._grid.getSpan(t.id,e.id))&&nt.rowspan>1){var it=C.indexOf(t);Q=(0,f.getTotalHeight)(H.top.slice(it,it+nt.rowspan))}else J=E===F.top.indexOf(t.id)+1?N.height-1:N.height;if(X)if(et=N.x+G.x,(nt=this._grid.getSpan(t.id,e.id))&&nt.colspan>1){it=null==T?void 0:T.indexOf(e);tt=(0,f.getTotalWidth)(M.left.slice(it,it+nt.colspan))}else Z=M.left.length===P.left.indexOf(e.id)+1?N.width-1:N.width;if((null===(v=M.right)||void 0===v?void 0:v.length)||D){var nt=this._grid.getSpan(t.id,e.id),ot=(0,g.getReverseScrollState)(this._grid);if((null===(_=M.right)||void 0===_?void 0:_.length)&&(V=(null===(m=P.right)||void 0===m?void 0:m.includes(e.id))||nt&&T.indexOf(e)+(nt.colspan||1)>T.length-M.right.length,(W=O-$<ot.x+N.x+N.width)&&!V&&(Z-=ot.x+N.x+N.width-O+$),V))if(nt&&!(null===(y=P.right)||void 0===y?void 0:y.includes(nt.column))){it=T.length-T.indexOf(e)-(nt.colspan||1);var rt=O-$;et=N.x+ot.x<rt+1?N.x:rt-ot.x+1,tt=(0,f.getTotalWidth)(it?M.right.slice(0,-it):M.right)-1,Z=N.width-ot.x}else{var at=(null===(b=P.right)||void 0===b?void 0:b.indexOf(e.id))?0:1;et=N.x-ot.x+at,Z=N.width-at}if(D&&(z=F.bottom.includes(t.id)||nt&&C.indexOf(t)+(nt.rowspan||1)>C.length-D,(B=k-L<ot.y+N.y+N.height)&&!z&&(J-=ot.y+N.y+N.height-k+L),z))if(nt&&!F.bottom.includes(nt.row)){var lt=k-L;at=(it=C.length-C.indexOf(t)-(nt.rowspan||1))?0:1;Y=N.y+ot.y<lt?N.y:lt-ot.y,Q=(0,f.getTotalHeight)(it?H.bottom.slice(0,-it):H.bottom)-at,J=N.height-ot.y-at}else Y=N.y,J=N.height-(D===F.bottom.indexOf(t.id)+1?1:0)}var st=null;"row"!==this.config.type&&"complex"!==this.config.type||n||(st=(0,a.el)(".dhx_grid-selected-row",{style:{width:(null===(x=M.left)||void 0===x?void 0:x.length)?O-G.x:O,height:J,minHeight:Q,minWidth:tt,display:J<0&&!Q?"none":"flex",top:Y,left:(null===(w=M.left)||void 0===w?void 0:w.length)?G.x:0,position:"absolute"}}));var ct=null;return"cell"!==this.config.type&&"complex"!==this.config.type||!i||(ct=(0,a.el)(".dhx_grid-selected-cell",{style:{width:Z,height:J,top:Y,minHeight:Q,minWidth:tt,left:et,position:"absolute",display:Z<0&&!tt||J<0&&!Q?"none":"flex",borderLeft:q&&!X?"none":null,borderRight:W&&!V?"none":null,borderTop:K&&!U?"none":null,borderBottom:B&&!z?"none":null}})),(0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[st,ct])},t.prototype._isUnselected=function(){return!this._selectedCell||!this._selectedCell.row||!this._selectedCell.column||0===this._selectedCells.length},t.prototype._findIndex=function(t){var e=this;void 0===t&&(t=this._selectedCell);var i=-1;return this._selectedCells.some((function(n,o){if("cell"===e.config.type||"complex"===e.config.type){if((0,s.compare)(n.row,t.row)&&(0,s.compare)(n.column,t.column))return i=o,!0}else if("row"===e.config.type&&(0,s.compare)(n.row,t.row))return i=o,!0})),i},t.prototype._cellKey=function(t,e){return"row"===this.config.type?""+t:t+"_"+e},t.prototype._setBrowserFocus=function(){var t=this._grid.getRootView().data.getRootNode();if(t){var e=t.querySelector(".dhx_grid_data");if(e&&this._selectedCell&&this._selectedCell.row&&this._selectedCell.column){var i=e.querySelector('[data-dhx-id="'.concat(this._selectedCell.row.id,'"]')),n=this._grid.getSpan(this._selectedCell.row.id,this._selectedCell.column.id);if(i){var o=n?t.querySelector(".dhx_span-spans"):null,r=o?o.querySelector('[data-dhx-col-id="'.concat(n.column,'"][data-dhx-id="').concat(n.row,'"]')):i.querySelector('[data-dhx-col-id="'.concat(this._selectedCell.column.id,'"]'));r&&(r.tabIndex=0,r.focus({preventScroll:!0}))}}}},t}();e.Selection=v},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.proRender=e.render=e.applyAutoWidth=e.getElementSizes=e.getRenderConfig=void 0;var o=i(1),r=i(2),a=i(4),l=i(5),s=i(8),c=i(3),d=i(19),u=i(54),h=i(55),f=i(0),p=i(7),g=i(116),v=i(117),_=i(118),m=i(20);function y(t,e,i,n){var o=void 0===i?[0,0]:i,r=o[0],a=o[1],l=t[0],s=t[1],c=e[0],d=e[1];return c<=l&&l<=d||c<=s&&s<=d||l<=c&&d<=s||l<r||a&&s>=n-a}function b(t,e,i){var o=t.config,r=o.spans,l=void 0===r?[]:r,d=o.columns,u=o.leftSplit,h=void 0===u?0:u,f=o.topSplit,g=void 0===f?0:f,_=o.rightSplit,m=void 0===_?0:_,b=o.bottomSplit,x=void 0===b?0:b,w=o.$filteredColumns||d.filter((function(t){return!t.hidden})),C=(0,a.calculateVisibleRange)(i,t._scroll,o,e),S=w.slice(C.xStart,C.xEnd),E=e.slice(C.yStart,C.yEnd),D=l.filter((function(t){var i;if(!(null===(i=t.$renderFrom)||void 0===i?void 0:i.length))return!1;var n=y(t.$rowsVisibility,[C.yStart,C.yEnd],[g,x],e.length),o=y(t.$colsVisibility,[C.xStart,C.xEnd],[h,m],d.length);return n&&o})),O={left:(0,p.getCurrFixedCols)(o,c.Split.left),right:(0,p.getCurrFixedCols)(o,c.Split.right)},k={top:e.slice(0,o.topSplit||0),bottom:o.bottomSplit?e.slice(-o.bottomSplit):[]};return t.config.$subRowCells&&(0,v.setSubRowCell)(t,E),n(n({},o),{data:e,columns:o.columns,scroll:t._scroll,$positions:C,headerHeight:o.$headerHeight,footerHeight:o.$footerHeight,firstColId:w[0]&&w[0].id,events:t.events,_events:t._events,filteredColumns:w,currentColumns:S,currentRows:E,currentSpans:D,fixedColumns:O,fixedRows:k,sort:t._sortingStates,content:t.content,gridId:t._uid,commonSummary:t._commonSummary,colSummary:t._colSummary,dropManager:t._dropManager,blockSelection:t.block,$renderFrom:"render",$isDragging:s.dragManager.isDrag()})}function x(t){if(t&&(t.tagName||(t=t._parent._container),t)){var e=t.currentStyle||window.getComputedStyle(t),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)||0,n=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)||0;return{width:t.clientWidth-i,height:t.clientHeight-n}}}function w(t,e,i){void 0===i&&(i=!1);var r,a=(0,d.getCells)(t),s=t.filteredColumns,c=t.$resizing,u=t.$totalHeight,h=t.$totalWidth,g=t.leftSplit,_=t.$positions,m=t.$scrollBarWidth,y=(0,d.getSpans)(t);if(c){var b=(0,f.findIndex)(s,(function(t){return t.id===c})),x=(0,l.getTotalWidth)(s.slice(0,b))+s[b].$width;r=(0,o.el)(".dhx_grid-resize-line",{style:{top:0,left:x,height:u}})}var w=t.dropManager?t.dropManager.toHTML():null,C=t.blockSelection?t.blockSelection.toHTML():null,S=t.selection?t.selection.toHTML():null;S="string"==typeof S?(0,o.el)("div.dhx_selection",{".innerHTML":S}):S;var E=_,D=i?t.$height-t.$footerHeight-t.$headerHeight-m.x-(t.$footer?1:0)-p.BORDERS:u;return(0,o.el)(".dhx_data-wrap",{style:{height:D,width:h,"padding-left":e.x,"padding-top":e.y},role:"presentation","data-dhx-drop-area":"row"},[(0,o.el)(".dhx_grid_data".concat(g?".dhx_grid_fixed_left":""),n(n({_flags:o.KEYED_LIST},(0,d.getHandlers)(E.yStart,E.xStart,t)),{role:"rowgroup"}),a),(0,v.getSubRowContent)(t),(0,o.el)(".dhx_span-spans",n({role:"presentation"},(0,d.getHandlers)(E.yStart,E.xStart,t)),y),(0,o.el)(".dhx_grid_selection",{_ref:"selection","aria-hidden":"true"},[].concat(S,r)),w,C])}function C(t,e,i){var n=i.height-p.BORDERS;return n=e?n:n-t.headerHeight,t.$footer?e?n:n-t.footerHeight:n}function S(t,e,i){void 0===i&&(i=!1);var n=!i&&t.$totalHeight>=e.height-(t.$headerHeight||0)?(0,r.getScrollbarWidth)():0,o=e.width-p.BORDERS-n;if(!(o<0)){var a=t.$filteredColumns||(t.columns||[]).filter((function(t){return!t.hidden})),s=[],c=[],d=!1;a.forEach((function(e){e.width||e.$fixedWidth||!(0,l.isAutoWidth)(t,e)?s.push(e):c.push(e)}));do{d=!1;for(var u=c.reduce((function(t,e){return t+(e.gravity||1)}),0),h=(0,l.getTotalWidth)(s),f=function(t){var e=o>h?(o-h)*((t.gravity||1)/u):0,i=t.minWidth&&e<t.minWidth,n=t.maxWidth&&e>t.maxWidth;if(i||n)return d=!0,t.$width=i?t.minWidth:t.maxWidth,c=c.filter((function(e){return e.id!=t.id})),s.push(t),"break";t.$width=e},g=0,v=c;g<v.length;g++){if("break"===f(v[g]))break}}while(d)}}e.getRenderConfig=b,e.getElementSizes=x,e.applyAutoWidth=S,e.render=function(t,e,i,r,a){var s,f,g,v,_,m,y=(null===(f=null===(s=null==t?void 0:t.node)||void 0===s?void 0:s.parent)||void 0===f?void 0:f.el)||e._container;(null==y?void 0:y.tagName)&&e._observeResize&&e._observeResize(y);var E=e._cachedSizes||x(y),D=e.config;if(!D)return(0,o.el)("div");if(!D.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":D.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var O=e.data.getRawData(0,-1,null,2);D.columns.every((function(t){return t.hidden}))?D.$totalHeight=0:e._rowHeightsRebuild&&(null===(v=(g=e)._rebuildRowHeights)||void 0===v||v.call(g,O));var k={width:(D.width&&"number"==typeof D.width?D.width:null==E?void 0:E.width)||0,height:(D.height&&"number"==typeof D.height?D.height:null==E?void 0:E.height)||0};(0,l.isAutoWidth)(D)&&S(D,k),null===(m=(_=e)._rebuildColWidths)||void 0===m||m.call(_),D.$width=k.width,D.$height=k.height;var R=b(e,O,k);R.selection=r,R.datacollection=e.data;var T=(0,d.getShifts)(R);R.$scrollBarWidth=(0,p.calcScrollBarWidth)(R);var M,I,H,P,F=(0,l.isCssSupport)("position","sticky"),A=C(R,F,k),$={wrapper:k,sticky:F,shifts:T,gridBodyHeight:A,footerAtBottom:!1},j=(0,h.getFixedRows)(R,n(n({},$),{name:"header",position:"top"})),L=R.$footer?(0,h.getFixedRows)(R,n(n({},$),{name:"footer",position:"bottom"})):null,N=R.$totalWidth+p.BORDERS<k.width?"dhx_grid-less-width":"",V=R.$totalHeight+p.BORDERS<k.height?"dhx_grid-less-height":"",W=R.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",z=D.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"";if(!t.node){var B=e.getScrollState(),G=B.x,Y=B.y;(0,o.awaitRedraw)().then((function(){e.scroll(G,Y)}))}return(0,o.el)(".dhx_grid.dhx_widget",n({class:(R.css||"")+(F?"":" dhx_grid_border")+(D.multiselection?" dhx_no-select--pointer":""),"data-dhx-widget-id":a,"data-dhx-root-id":D.rootParent,"data-dhx-drop-area":"common"},(M=R.data,I=D.columns,H=R.editable,P=R.multiselection,{role:"tree"===R.type?"treegrid":"grid","aria-rowcount":M.length,"aria-colcount":I.filter((function(t){return!t.hidden})).length,"aria-readonly":H?"false":"true","aria-multiselectable":P?"true":"false"})),[(0,o.resizer)((function(){return e.paint()})),(0,o.el)(".dhx_grid-content",n(n({style:n({},k)},i),{class:"".concat(N," ").concat(V," ").concat(W," ").concat(z).trim(),role:"presentation"}),[(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0,role:"button","aria-label":"Enter grid"}),F?null:j,(0,o.el)(".dhx_grid-body",{style:{height:A,width:k.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[(0,o.el)("div",{},[F?j:null,w(R,T),F?L:null])]),(0,u.getFixedColsHeader)(R,$,c.Split.left),(0,u.getFixedColsHeader)(R,$,c.Split.right),(0,u.getFixedCols)(R,$,c.Split.left),(0,u.getFixedCols)(R,$,c.Split.right),(0,h.getFixedDataRows)(R,$,c.Split.top),(0,h.getFixedDataRows)(R,$,c.Split.bottom),F?null:L,(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0,role:"button","aria-label":"Exit grid"})])])},e.proRender=function(t,e,i,r,a){var s,f,v,y,E,D,O,k=(null===(f=null===(s=null==t?void 0:t.node)||void 0===s?void 0:s.parent)||void 0===f?void 0:f.el)||e._container;(null==k?void 0:k.tagName)&&e._observeResize&&e._observeResize(k);var R=e._cachedSizes||x(k),T=e.config;if(!T)return(0,o.el)("div");if(!T.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":T.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var M,I=e.data.getRawData(0,-1,null,2),H=T.topSplit||0,P=T.bottomSplit||0,F=T.columns.every((function(t){return t.hidden}));if(e._rowHeightsRebuild){for(var A=0,$=0,j=0;j<I.length;j++){var L=I[j];H&&j<H+A&&(T.subRow&&(L.$subRowHeight=0,L.$opened=!1),L.hidden&&A++),P&&j>=I.length-P-$&&(T.subRow&&(L.$subRowHeight=0,L.$opened=!1),L.hidden&&$++),L.$index=j}F?(T.$totalHeight=0,e._rowHeightsRebuild=!1):null===(y=(v=e)._rebuildRowHeights)||void 0===y||y.call(v,I)}var N="auto"===e.config.height;N&&(M=function(t,e,i){var n,o,r=t._container,a=e.$headerHeight+(e.$footerHeight&&e.$footerHeight+1)+e.$totalHeight+p.BORDERS;if(r){var l=window.getComputedStyle(r),s=l.minHeight,c=l.maxHeight;return a<=parseFloat(s)?parseFloat(s):a>=parseFloat(c)?parseFloat(c):a+(0,p.calcScrollBarWidth)(e,!!(null===(n=t.scrollView)||void 0===n?void 0:n.config.enable),i).x}return a+(i?(0,p.calcScrollBarWidth)(e,!!(null===(o=t.scrollView)||void 0===o?void 0:o.config.enable),i).x:0)}(e,T,R));var V=T.width&&"number"==typeof T.width?T.width:null==R?void 0:R.width,W=T.height&&"number"==typeof T.height?T.height:null==R?void 0:R.height,z={width:V||0,height:(N?M:W)||0},B=null==T?void 0:T.group,G=null==T?void 0:T.dragPanel,Y=null==B?void 0:B.panel,U=!!T.dragPanel;Y&&(z.height-=B.panelHeight||40),U&&(z.width-=(null==G?void 0:G.width)||m.defaultDragPanelConfig.width),(0,l.isAutoWidth)(T)&&S(T,z,e.scrollView&&e.scrollView.config.enable),null===(D=(E=e)._rebuildColWidths)||void 0===D||D.call(E),T.$width=z.width,T.$height=z.height;var X=b(e,I,z);X.selection=r,X.datacollection=e.data;var q=(0,d.getShifts)(X);X.$scrollBarWidth=(0,p.calcScrollBarWidth)(X,!!(null===(O=e.scrollView)||void 0===O?void 0:O.config.enable));var K=(0,l.isCssSupport)("position","sticky"),Z=C(X,K,z),J={wrapper:z,sticky:K,shifts:q,gridBodyHeight:Z,footerAtBottom:!1},Q=X.$totalWidth+p.BORDERS<z.width?"dhx_grid-less-width":"",tt=X.$totalWidth+p.BORDERS===z.width?"dhx_grid-full-width":"",et=X.$totalHeight+p.BORDERS<z.height-X.$footerHeight-X.$headerHeight?"dhx_grid-less-height":"",it=X.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",nt=T.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"",ot="bottom"===T.footerPosition&&!!et&&!N;J.footerAtBottom=ot;var rt=(0,h.getFixedRows)(X,n(n({},J),{name:"header",position:"top"})),at=X.$footer?(0,h.getFixedRows)(X,n(n({},J),{name:"footer",position:"bottom"})):null;if(!t.node){var lt=e.getScrollState(),st=lt.x,ct=lt.y;(0,o.awaitRedraw)().then((function(){e.scroll(st,ct)}))}var dt=(0,o.el)("div",{},[K?rt:null,w(X,q,ot),K?at:null]);return(0,o.el)(".dhx_grid.dhx_widget",{class:(X.css||"")+(K?"":" dhx_grid_border")+(T.multiselection?" dhx_no-select--pointer":""),style:{height:null!=M?M:null},"data-dhx-widget-id":a,"data-dhx-root-id":T.rootParent,role:"tree"===T.type?"treegrid":"grid","aria-rowcount":X.data.length,"aria-colcount":X.filteredColumns.length,"aria-readonly":X.editable?"false":"true","aria-multiselectable":X.multiselection?"true":"false","data-dhx-drop-area":"common"},[(0,o.resizer)((function(){return e.paint()})),Y&&(0,g.getGroupPanel)(T.$grouped,e)||null,U&&(0,_.getDragPanelNode)(e,X,J,!!et)||null,(0,o.el)(".dhx_grid-content",n(n({style:n({},z)},i),{class:"".concat(Q," ").concat(et," ").concat(tt," ").concat(it," ").concat(nt).trim(),role:"presentation"}),[(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0,role:"button","aria-label":"Enter grid"}),K?null:rt,(0,o.el)(".dhx_grid-body",{style:{height:Z,width:z.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[e.scrollView&&e.scrollView.config.enable?e.scrollView.render([dt]):dt]),(0,u.getFixedColsHeader)(X,J,c.Split.left),(0,u.getFixedColsHeader)(X,J,c.Split.right),(0,u.getFixedCols)(X,J,c.Split.left),(0,u.getFixedCols)(X,J,c.Split.right),(0,h.getFixedDataRows)(X,J,c.Split.top),(0,h.getFixedDataRows)(X,J,c.Split.bottom),K?null:at,(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0,role:"button","aria-label":"Exit grid"})])])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n,o=i(3),r=i(92),a=i(93),l=i(94),s=i(107),c=i(108),d=i(115),u={cell:{row:null,col:null},editor:null,gridId:null};e.getEditor=function(t,e,i,h){var f="boolean"===e.type?"checkbox":i.$editable.editorType;if(void 0===f&&(f=i.autoHeight?"textarea":"input"),u.cell.row===t.id&&u.cell.col===e.id&&u.gridId===i.gridId&&i.$editable.editor)return u.editor;switch("checkbox"!==f&&(u={cell:{row:t.id,col:e.id},editor:u.editor,gridId:i.gridId}),n||(n=function(){u={cell:{row:null,col:null},editor:null,gridId:null}},i.events.on(o.GridEvents.afterEditEnd,n)),f){case"input":default:return u.editor=new r.InputEditor(t,e,i);case"textarea":return u.editor=new d.TextAreaEditor(t,e,i,h);case"select":return u.editor=new a.SelectEditor(t,e,i);case"datePicker":return u.editor=new l.DateEditor(t,e,i);case"checkbox":return new s.CheckboxEditor(t,e,i);case"multiselect":case"combobox":return u.editor=new c.ComboboxEditor(t,e,i)}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var o=i(1),r=i(3),a=i(0),l=i(4),s=i(18),c=function(){function t(t,e,i){this.prevValue="",this._config=i,this._cell={row:t,col:e},this.type=e.type,this._initHandlers()}return t.prototype.endEdit=function(t){if(this._config.$editable){var e;if(!t&&(e=this._removeValuePattern(this._input.value,!0),"number"===this.type||this._cell.col.numberMask))if(e=parseFloat(e),Number.isNaN(e))e="";else{var i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);(0,a.isDefined)(null==i?void 0:i.min)&&e<n&&(e=n),(0,a.isDefined)(null==i?void 0:i.max)&&e>o&&(e=o)}this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;return(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this,(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,l.getColumnHeaderText)(this._cell.col),onblur:this._handlers.onBlur,oninput:this._handlers.onInput,value:t})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(){var e=t._removeValuePattern(t._input.value);"number"===t.type&&(t._isValidWord(e)?t.prevValue=e:e=t.prevValue,!t.prevValue.length||"-"===t.prevValue||t._isCorrectRange(parseFloat(t.prevValue))?t._input.classList.remove("dhx_cell-editor__input--not-valid"):t._input.classList.add("dhx_cell-editor__input--not-valid")),t._input.value=t._applyValuePattern(e,t._input)},didInsert:function(e){t._input=e.el,t._input.focus()}}},t.prototype._isValidWord=function(t){var e,i=null===(e=t[t.length-1])||void 0===e?void 0:e.toLocaleLowerCase(),n=function(t,e){return t.toLocaleLowerCase().split(e.toLocaleLowerCase()).length-1};return!t.length||"-"===t||"."===t||"-."===t&&this._cell.col.numberMask||!isNaN(Number(t))&&t.trim().length===t.length||t.replace("-","").length>1&&"e"===i&&!n(this.prevValue,"e")||t.replace("-","").length>1&&"e"===i&&1===n(t,"e")},t.prototype._isCorrectRange=function(t){var e=!0,i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);return(0,a.isDefined)(null==i?void 0:i.min)&&(0,a.isDefined)(null==i?void 0:i.max)?e=t>=n&&t<=o:(0,a.isDefined)(null==i?void 0:i.min)?e=t>n:(0,a.isDefined)(null==i?void 0:i.max)&&(e=t<o),e},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,s.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,s.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,s.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,s.removePatternMask)(t,this._cell.col.patternMask):t},t}();e.InputEditor=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectEditor=void 0;var n=i(1),o=i(3),r=i(4),a=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(t){var e;this._config.$editable&&(t||(e=this._input.value),this._config.events.fire(o.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("keydown",this._handlers.onkeydown),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(o.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus())},t.prototype.toHTML=function(){var t=(0,r.getEditorOptions)(this._cell.col,this._cell.row).map((function(t){return"string"==typeof t?{id:"".concat(t),value:t}:t}))||[],e=this._cell.row[this._cell.col.id];this._input&&(e=this._input.options[this._input.selectedIndex].value);var i=t.map((function(t){return(0,n.el)("option",{selected:t.id.toString()===(null==e?void 0:e.toString()),value:t.id},t.value)}));return this._config.$editable.editor=this,(0,n.el)("select.dhx_cell-editor.dhx_cell-editor__select",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,r.getColumnHeaderText)(this._cell.col)},i)},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onkeydown:function(e){"Escape"===e.key&&t.endEdit()},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onkeydown)}}},t}();e.SelectEditor=a},function(t,e,i){"use strict";var n=this&&this.__rest||function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i};Object.defineProperty(e,"__esModule",{value:!0}),e.DateEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(95),s=i(13),c=i(30),d=function(){function t(t,e,i){var n=this;this._config=i,this._cell={row:t,col:e},this._editorConfig=this._cleanConfig(e),this._calendar=new l.Calendar(null,this._editorConfig),this._calendar.setValue(this._getValue(this._cell.row[this._cell.col.id])),this._value=this._calendar.getValue(),this._cell.row[this._cell.col.id]=this._value,this._popup=new c.Popup,this._popup.attach(this._calendar),this._calendar.events.on(l.CalendarEvents.change,(function(){n.endEdit(!1,!0)})),this._popup.events.on(c.PopupEvents.afterHide,(function(){n.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(t,e){var i=this;if(this._handlers&&this._config.$editable){var n=this._calendar.config.dateFormat,a=this._cell.row[this._cell.col.id],l=this._input.value;if(!t){if(a instanceof Date||e)return this._value=this._calendar.getValue(),this._input.value=this._value,void this._popup.hide();!(0,s.stringToDate)(l,n,!0)&&l||(!a||l.length!==a.length)&&a&&l||(this._value=l,this._value?this._calendar.setValue(this._value):this._calendar.clear())}var c=this._calendar.getValue(this._editorConfig.asDateObject);this._config.events.fire(r.GridEvents.beforeEditEnd,[c,this._cell.row,this._cell.col])?(this._input.removeEventListener("focus",this._handlers.onFocus),this._input.removeEventListener("change",this._handlers.onChange),document.removeEventListener("mousedown",this._handlers.onOuterClick),(0,o.awaitRedraw)().then((function(){i._popup.destructor(),i._calendar.destructor()})),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[c,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(){var t=this._getValue(this._cell.row[this._cell.col.id]);return this._config.$editable.editor=this,document.addEventListener("mousedown",this._handlers.onOuterClick),(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input.dhx_cell-editor__datepicker",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,a.getColumnHeaderText)(this._cell.col),value:t})},t.prototype._cleanConfig=function(t){var e=t.editorConfig||{},i=(e.value,e.range,e.dateFormat,n(e,["value","range","dateFormat"]));return i.dateFormat=t.dateFormat,i},t.prototype._initHandlers=function(){var t=this;this._handlers={onFocus:function(){(0,o.awaitRedraw)().then((function(){t._popup.show(t._input,{centering:!0,mode:"bottom",theme:t._input})}))},onChange:function(){t.endEdit()},onOuterClick:function(e){if(e.target instanceof Node){var i=t._input&&t._input.contains(e.target),n=t._popup&&t._popup.getRootNode()&&t._popup.getRootNode().contains(e.target);i||n||t._popup.hide()}},didInsert:function(e){var i=e.el;t._input=i,t._input.addEventListener("focus",t._handlers.onFocus),t._input.addEventListener("change",t._handlers.onChange),i.focus(),i.setSelectionRange(i.value.length,i.value.length)}}},t.prototype._getValue=function(t){var e=this._calendar.config.dateFormat||"%M %d %Y";if("string"==typeof t&&!(0,s.stringToDate)(t,e,!0)){var i=new Date(t);if(!(null==i?void 0:i.valueOf()))return"";t=i}return t},t}();e.DateEditor=d},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(96),e),o(i(46),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Calendar=void 0;var l=i(0),s=i(1),c=i(6),d=i(11),u=i(97),h=i(106),f=i(13),p=i(46),g=i(2),v=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,l.extend)({weekStart:"sunday",thisMonthOnly:!1,dateFormat:window&&window.dhx&&window.dhx.dateFormat,width:"250px"},i))||this;switch(n._selected=[],n.events=new c.EventSystem,n.config.disabledDates=n.config.disabledDates||n.config.block,n.config.mode=n.config.mode||n.config.view,n.config.dateFormat||(n.config.timePicker?12===n.config.timeFormat?n.config.dateFormat="%d/%m/%y %h:%i %A":n.config.dateFormat="%d/%m/%y %H:%i":n.config.dateFormat="%d/%m/%y"),n.config.value&&n._setSelected(n.config.value),n.config.date?n._currentDate=f.DateHelper.toDateObject(n.config.date,n.config.dateFormat):n._getSelected()?n._currentDate=f.DateHelper.copy(n._getSelected()):n._currentDate=new Date,n.config.mode){case"month":n._currentViewMode="month";break;case"year":n._currentViewMode="year";break;case"timepicker":n._currentViewMode=n.config.timePicker?"timepicker":"calendar";break;default:n._currentViewMode="calendar"}if(n._initHandlers(),n.config.timePicker){n._timepicker=new u.Timepicker(null,{timeFormat:n.config.timeFormat,controls:!0});var o=n._getSelected()||new Date;n._timepicker.setValue(o),n._time=n._timepicker.getValue(),n._timepicker.events.on(u.TimepickerEvents.afterClose,(function(){n._timepicker.setValue(n._time),n.showDate(null,"calendar")})),n._timepicker.events.on(u.TimepickerEvents.afterApply,(function(){var t=n._timepicker.getValue(!0),e=t.hour,i=t.minute,o=t.AM,r=n._getSelected(),a=f.DateHelper.withHoursAndMinutes(n._getSelected()||new Date,e,i,o);n.events.fire(p.CalendarEvents.beforeChange,[a,r,!0])&&(n._selected[n._selected.length-1]=a,n.events.fire(p.CalendarEvents.change,[a,r,!0])),n._time=n._timepicker.getValue(),n.showDate(null,"calendar")}))}return n.mount(e,(0,s.create)({render:function(){return n._draw()}})),n}return o(e,t),e.prototype.setValue=function(t){if(!t||t instanceof Array&&0===t.length)return!1;var e=t instanceof Array?t[0]:t,i=f.DateHelper.toDateObject(e,this.config.dateFormat),n=f.DateHelper.copy(this._getSelected());return!!this.events.fire(p.CalendarEvents.beforeChange,[i,n,!1])&&(this._selected=[],this._setSelected(t),this._timepicker&&(this._timepicker.setValue(i),this._time=this._timepicker.getValue()),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!1]),this.paint(),!0)},e.prototype.getValue=function(t){var e=this;return void 0===t&&(t=!1),this._selected[0]?this.config.range?t?this._selected.map((function(t){return f.DateHelper.copy(t)})):this._selected.map((function(t){return(0,f.getFormattedDate)(e.config.dateFormat,t)})):t?f.DateHelper.copy(this._selected[0]):(0,f.getFormattedDate)(this.config.dateFormat,this._selected[0]):""},e.prototype.getCurrentMode=function(){return this._currentViewMode},e.prototype.showDate=function(t,e){t&&(this._currentDate=f.DateHelper.copy(t)),e&&(this._currentViewMode=e),this.paint()},e.prototype.destructor=function(){this._linkedCalendar&&this._unlink(),this._timepicker&&this._timepicker.destructor(),this.events&&this.events.clear(),this.config=this.events=null,this._uid=this._selected=this._currentDate=this._currentViewMode=this._handlers=this._timepicker=this._time=null,this.unmount()},e.prototype.clear=function(){var t=this.getValue(!0);this.events.fire(p.CalendarEvents.beforeChange,["",t,!1])&&(this.config.timePicker&&(this._timepicker.clear(),this._time=this._timepicker.getValue()),this._selected=[],this.showDate(null,this.config.mode),this.events.fire(p.CalendarEvents.change,[this.getValue(!0),t,!1,"clear"]))},e.prototype.link=function(t){var e=this;this._linkedCalendar&&this._unlink(),this._linkedCalendar=t;var i=this.getValue(!0),n=t.getValue(!0),o=i&&f.DateHelper.dayStart(i),r=n&&f.DateHelper.dayStart(n);this.config.$rangeMark&&this._linkedCalendar.config.$rangeMark||(this.config.$rangeMark=this._linkedCalendar.config.$rangeMark=function(t){if(o&&r)return t>=o&&t<=r&&function(t){if(f.DateHelper.isSameDay(r,o))return null;var e="dhx_calendar-day--in-range";return f.DateHelper.isSameDay(t,o)&&(e+=" dhx_calendar-day--first-date"),f.DateHelper.isSameDay(t,r)&&(e+=" dhx_calendar-day--last-date"),e}(t)}),this.config.disabledDates&&this._linkedCalendar.config.disabledDates||(this.config.disabledDates=function(t){if(r)return t>r},this._linkedCalendar.config.disabledDates=function(t){if(o)return t<o}),this.config.thisMonthOnly=!0,t.config.thisMonthOnly=!0,this.events.on(p.CalendarEvents.change,(function(t){o=t?f.DateHelper.dayStart(t):null,e._linkedCalendar.paint()}),"link"),this._linkedCalendar.events.on(p.CalendarEvents.change,(function(t){r=t?f.DateHelper.dayStart(t):null,e.paint()}),"link"),this._linkedCalendar.paint(),this.paint()},e.prototype._unlink=function(){this._linkedCalendar&&(this.config.$rangeMark=this._linkedCalendar.config.$rangeMark=null,this.config.disabledDates=this._linkedCalendar.config.disabledDates=null,this.events.detach(p.CalendarEvents.change,"link"),this._linkedCalendar.events.detach(p.CalendarEvents.change,"link"),this._linkedCalendar.paint(),this._linkedCalendar=null)},e.prototype._setSelected=function(t){var e=this,i=t instanceof Array?t[0]:t,n=f.DateHelper.toDateObject(i,this.config.dateFormat);if(t instanceof Array&&this.config.range){var o=[];t.forEach((function(t,i){i<2&&o.push(f.DateHelper.toDateObject(t,e.config.dateFormat))})),2===o.length&&o[0]<=o[1]?o.forEach((function(t){return e._selected.push(t)})):this._selected[0]=o[0]}else this._selected[0]=n},e.prototype._getSelected=function(){return this._selected[this._selected.length-1]},e.prototype._draw=function(){switch(this._currentViewMode){case"calendar":return this.events.fire(p.CalendarEvents.modeChange,["calendar"]),this._drawCalendar();case"month":return this.events.fire(p.CalendarEvents.modeChange,["month"]),this._drawMonthSelector();case"year":return this.events.fire(p.CalendarEvents.modeChange,["year"]),this._drawYearSelector();case"timepicker":return this.events.fire(p.CalendarEvents.modeChange,["timepicker"]),this._drawTimepicker()}},e.prototype._initHandlers=function(){var t=this,e={Up:"ArrowUp",Down:"ArrowDown",Right:"ArrowRight",Left:"ArrowLeft",Esc:"Escape",Spacebar:"Space"},i=function(e){void 0===e&&(e=!1);var i=0;switch(t._currentViewMode){case"calendar":i=e?-7:7;break;case"month":case"year":i=e?-4:4}return i};this._handlers={onkeydown:{".dhx_calendar-year, .dhx_calendar-month, .dhx_calendar-day":function(n,o){switch(function(t){var i;if(t.which>=48&&t.which<=57||t.which>=65&&t.which<=90)i=String.fromCharCode(t.which);else{var n=32===t.which?t.code:t.key;i=(0,g.isIE)()&&e[n]||n}return i}(n)){case"Enter":t._selectDate(n,o);break;case"ArrowLeft":t._moveBrowseFocus(n,o,-1);break;case"ArrowRight":t._moveBrowseFocus(n,o,1);break;case"ArrowUp":t._moveBrowseFocus(n,o,i(!0));break;case"ArrowDown":t._moveBrowseFocus(n,o,i())}}},onclick:{".dhx_calendar-year, .dhx_calendar-month, .dhx_calendar-day":function(e,i){t._selectDate(e,i)},".dhx_calendar-action__cancel":function(){t.showDate(t._getSelected(),"calendar"),t.events.fire(p.CalendarEvents.cancelClick,[])},".dhx_calendar-action__show-month":function(){return t.showDate(null,"month")},".dhx_calendar-action__show-year":function(){return t.showDate(null,"year")},".dhx_calendar-action__next":function(){var e;switch(t._currentViewMode){case"calendar":e=f.DateHelper.addMonth(t._currentDate,1);break;case"month":e=f.DateHelper.addYear(t._currentDate,1);break;case"year":e=f.DateHelper.addYear(t._currentDate,12)}t.showDate(e)},".dhx_calendar-action__prev":function(){var e;switch(t._currentViewMode){case"calendar":e=f.DateHelper.addMonth(t._currentDate,-1);break;case"month":e=f.DateHelper.addYear(t._currentDate,-1);break;case"year":e=f.DateHelper.addYear(t._currentDate,-12)}t.showDate(e)},".dhx_calendar-action__show-timepicker":function(){t._currentViewMode="timepicker",t.paint()}},onmouseover:{".dhx_calendar-day":function(e,i){t.events.fire(p.CalendarEvents.dateMouseOver,[new Date(i.attrs._date),e]),t.events.fire(p.CalendarEvents.dateHover,[new Date(i.attrs._date),e])}}}},e.prototype._getData=function(t){var e,i=this;switch(this._isSelectedInCurrentRange=!1,this.config.weekStart){case"saturday":e=-1;break;case"monday":e=1;break;default:e=0}for(var n=[],o=6,r=f.DateHelper.weekStart(f.DateHelper.monthStart(t),e);o--;){for(var a=f.DateHelper.getWeekNumber(r),l=0,s=7,c=[],d=function(){var e=f.DateHelper.isWeekEnd(r),n=t.getMonth()===r.getMonth(),o=u.config.disabledDates&&u.config.disabledDates(r),a=[];if(u.config.range&&u._selected[0]&&u._selected[1]){var s=function(){if(i._selected[0]&&i._selected[1]){var t=f.DateHelper.dayStart(i._selected[0]),e=f.DateHelper.dayStart(i._selected[1]);return r>=t&&r<=e&&(f.DateHelper.isSameDay(i._selected[0],i._selected[1])?null:"dhx_calendar-day--in-range")}};u.config.$rangeMark=s}if(e&&a.push("dhx_calendar-day--weekend"),n||(u.config.thisMonthOnly?(l++,a.push("dhx_calendar-day--hidden")):a.push("dhx_calendar-day--muffled")),u.config.mark){var d=u.config.mark(r);d&&a.push(d)}u.config.$rangeMark&&((s=u.config.$rangeMark(r))&&a.push(s));o&&(e?a.push("dhx_calendar-day--weekend-disabled"):a.push("dhx_calendar-day--disabled")),u._selected.forEach((function(t,e){if(t&&f.DateHelper.isSameDay(t,r)){i._isSelectedInCurrentRange=!0;var n="dhx_calendar-day--selected";i.config.range&&(n+=" dhx_calendar-day--selected-".concat(0===e?"first ":"last")),a.push(n)}})),c.push({date:r,day:r.getDate(),css:a.join(" ")}),r=f.DateHelper.addDay(r)},u=this;s--;)d();n.push({weekNumber:a,days:c,disabledWeekNumber:7===l})}return n},e.prototype._drawCalendar=function(){var t,e=this,i=this._currentDate,n=this.config,o=n.weekStart,l=n.thisMonthOnly,c=n.css,d=n.timePicker,u=n.width;switch(o){case"saturday":t=a([f.locale.daysShort[6]],f.locale.daysShort.slice(0,-1),!0);break;case"monday":t=a(a([],f.locale.daysShort.slice(1),!0),[f.locale.daysShort[0]],!1);break;default:t=f.locale.daysShort}for(var h,p=t.map((function(t){return(0,s.el)(".dhx_calendar-weekday",t)})),g=this._getData(i),v=!0,_=this._getSelected(),m=function(t){var i={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(e._isSelectedInCurrentRange?function(t){return t&&_&&t.getTime()===_.getTime()}(t.date)&&(i.tabindex=0,i["aria-pressed"]="true"):v&&(i.tabindex=0),v=!1),i},y=[],b=[],x=0,w=g;x<w.length;x++){var C=w[x],S=C.days.map((function(t){return(0,s.el)("div.dhx_calendar-day",r({class:t.css,_date:t.date},m(t)),t.day)}));!this.config.weekNumbers||C.disabledWeekNumber&&l||b.push((0,s.el)("div",{class:"dhx_calendar-week-number"},C.weekNumber)),y=y.concat(S)}this.config.weekNumbers&&(h=(0,s.el)(".dhx_calendar__week-numbers",b));var E="dhx_calendar dhx_widget"+(c?" "+c:"")+(d?" dhx_calendar--with_timepicker":"")+(this.config.weekNumbers?" dhx_calendar--with_week-numbers":"");return(0,s.el)("div",r({class:E,style:{width:this.config.weekNumbers?parseInt(u.toString())+48+"px":u}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_calendar-action__show-month.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},f.locale.months[i.getMonth()]+" "+i.getFullYear())),this.config.weekNumbers&&(0,s.el)(".dhx_calendar__dates-wrapper",[(0,s.el)(".dhx_calendar__weekdays",p),(0,s.el)(".dhx_calendar__days",y),h]),!this.config.weekNumbers&&(0,s.el)(".dhx_calendar__weekdays",p),!this.config.weekNumbers&&(0,s.el)(".dhx_calendar__days",y),d?(0,s.el)(".dhx_timepicker__actions",[(0,s.el)("button.dhx_calendar__timepicker-button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__show-timepicker",{type:"button"},[(0,s.el)("span.dhx_button__icon.dxi.dxi-clock-outline"),(0,s.el)("span.dhx_button__text",this._time)])]):null])])},e.prototype._drawMonthSelector=function(){var t=this._currentDate,e=t.getMonth(),i=this._getSelected()?this._getSelected().getFullYear():null,n=this.config,o=n.css,a=n.timePicker,l=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(l?" dhx_calendar--with_week-numbers":""),h=!0,p=i===t.getFullYear(),g=function(t){return p&&e===t};return(0,s.el)("div",r({class:u,style:{width:l?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_calendar-action__show-year.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},t.getFullYear())),(0,s.el)(".dhx_calendar__months",f.locale.monthsShort.map((function(t,e){return(0,s.el)("div",r(r({class:"dhx_calendar-month"+(g(e)?" dhx_calendar-month--selected":"")},function(t,e){var i={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(p?g(e)&&(i.tabindex=0,i["aria-pressed"]="true"):h&&(i.tabindex=0),h=!1),i}(t,e)),{_date:e}),t)}))),"month"!==d?(0,s.el)(".dhx_calendar__actions",[(0,s.el)("button.dhx_button.dhx_button--color_primary.dhx_button--view_link.dhx_button--size_small.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__cancel",{type:"button"},f.locale.cancel)]):null])])},e.prototype._drawYearSelector=function(){var t=this,e=this._currentDate,i=f.DateHelper.getTwelweYears(e),n=this.config,o=n.css,a=n.timePicker,l=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(l?" dhx_calendar--with_week-numbers":""),h=!0,p=this._getSelected()&&i.includes(this._getSelected().getFullYear()),g=function(e){return t._getSelected()&&e===t._getSelected().getFullYear()};return(0,s.el)("div",r({class:u,style:{width:l?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},i[0]+"-"+i[i.length-1])),(0,s.el)(".dhx_calendar__years",i.map((function(t){return(0,s.el)("div",r({class:"dhx_calendar-year"+(g(t)?" dhx_calendar-year--selected":""),_date:t},function(t){var e={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(p?g(t)&&(e.tabindex=0,e["aria-pressed"]="true"):h&&(e.tabindex=0),h=!1),e}(t)),t)}))),"year"!==d&&"month"!==d?(0,s.el)(".dhx_calendar__actions",[(0,s.el)("button.dhx_button.dhx_button--color_primary.dhx_button--view_link.dhx_button--size_small.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__cancel",{type:"button"},f.locale.cancel)]):null])])},e.prototype._drawHeader=function(t){return(0,s.el)(".dhx_calendar__navigation",[(0,s.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__prev"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"prev",type:"button"},[(0,s.el)(".dhx_button__icon.dxi.dxi-chevron-left")]),t,(0,s.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__next"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"next",type:"button"},[(0,s.el)(".dhx_button__icon.dxi.dxi-chevron-right")])])},e.prototype._drawTimepicker=function(){var t=this.config,e=t.css,i=t.weekNumbers,n=t.width;return(0,s.el)(".dhx_widget.dhx-calendar",{class:e?" "+e:"",style:{width:i?parseInt(n.toString())+48+"px":n}},[(0,s.inject)(this._timepicker.getRootView())])},e.prototype._selectDate=function(t,e){var i=e.attrs._date,n=f.DateHelper.copy(this._getSelected());switch(this._currentViewMode){case"calendar":var o=this.config.timePicker?f.DateHelper.mergeHoursAndMinutes(i,this._getSelected()||this._currentDate):i;if(!this.events.fire(p.CalendarEvents.beforeChange,[o,n,!0]))return;this.config.range&&1===this._selected.length&&this._selected[0]<=o?this._selected.push(o):(this._selected=[],this._selected[0]=o),e.el.blur(),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!0]);break;case"month":if("month"!==this.config.mode)f.DateHelper.setMonth(this._currentDate,i),this.showDate(null,"calendar"),this.events.fire(p.CalendarEvents.monthSelected,[i]);else{var r=f.DateHelper.fromYearAndMonth(this._currentDate.getFullYear()||this._getSelected().getFullYear(),i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.monthSelected,[i]),this.paint()}break;case"year":if("year"!==this.config.mode)f.DateHelper.setYear(this._currentDate,i),this.showDate(null,"month"),this.events.fire(p.CalendarEvents.yearSelected,[i]);else{r=f.DateHelper.fromYear(i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.yearSelected,[i]),this.paint()}}},e.prototype._moveBrowseFocus=function(t,e,i){if(e){var n=e.parent.body[e.idx+i];if(n){var o=n.el;o&&(t.target.tabIndex=-1,o.tabIndex=0,o.focus({preventScroll:!0}))}}},e}(d.View);e.Calendar=v},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(98),e),o(i(45),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Timepicker=void 0;var a=i(0),l=i(1),s=i(6),c=i(11),d=i(27),u=i(101),h=i(104),f=i(105),p=i(45),g=i(2);function v(t,e){return isNaN(t)?0:Math.min(e,Math.max(0,t))}var _=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,a.extend)({timeFormat:24,controls:!1,valueFormat:"string",actions:!1},i))||this;return n.events=new s.EventSystem(n),n._time={hour:0,minute:0,AM:!0},12===n.config.timeFormat&&(n._time.hour=12),n.config.controls=n.config.controls||n.config.actions,n.config.value&&n._setValue(n.config.value),n._initUI(e),n._initHandlers(),n._initEvents(),n}return o(e,t),e.prototype.getValue=function(t){return 12===this.config.timeFormat&&(this._time.hour=this._time.hour%12||12),this._getValue(this._time,t)},e.prototype.setValue=function(t){this._setValue(t),this._hoursSlider.setValue(this._time.hour),this._minutesSlider.setValue(this._time.minute),this._inputsView.paint()},e.prototype.clear=function(){24===this.config.timeFormat?this.setValue("00:00"):this.setValue("12:00AM")},e.prototype.destructor=function(){this._minutesSlider&&this._minutesSlider.destructor(),this._hoursSlider&&this._hoursSlider.destructor(),this.events&&this.events.clear(),this.layout&&this.layout.destructor(),this.config=this.events=null,this._handlers=this._time=this._inputsView=this._minutesSlider=this._hoursSlider=null,this.unmount()},e.prototype.getRootView=function(){return this.layout.getRootView()},e.prototype._getValue=function(t,e){var i=t.hour,n=t.minute,o=t.AM;if(e){var r={hour:i,minute:n};return 12===this.config.timeFormat&&(r.AM=o),r}return(i<10?"0"+i:i)+":"+(n<10?"0"+n:n)+(12===this.config.timeFormat?o?"AM":"PM":"")},e.prototype._setValue=function(t){var e,i=0,n=0;if("number"==typeof t&&(t=new Date(t)),t instanceof Date)i=t.getMinutes(),n=t.getHours();else if(Array.isArray(t))n=v(t[0],23),i=v(t[1],59),t[2]&&"pm"===t[2].toLowerCase()&&(e=!0);else if("string"==typeof t){var o=t.match(/\d+/g);n=v(+o[0],23),i=v(+o[1],59),t.toLowerCase().includes("pm")&&(e=!0)}else"object"==typeof t&&t.hasOwnProperty("hour")&&t.hasOwnProperty("minute")&&(n=t.hour,i=t.minute,e=!t.AM);return e&&n<12&&(n+=12),12===this.config.timeFormat&&!(0,f.isTimeCheck)(t)&&n>=12&&(e=!0),this._time={hour:n,minute:i,AM:!e}},e.prototype._initUI=function(t){var e=this,i={gravity:!1,css:"dhx_widget dhx_timepicker "+(this.config.css?this.config.css:"")+(this.config.controls?" dhx_timepicker--with-controls":""),rows:[{id:"timepicker",css:"dhx_timepicker__inputs"},{id:"hour-slider",css:"dhx_timepicker__hour"},{id:"minute-slider",css:"dhx_timepicker__minute"}]};this.config.controls&&(i.rows.unshift({id:"close-action",css:"dhx_timepicker__close"}),i.rows.push({id:"save-action",css:"dhx_timepicker__save"}));var n=this.layout=new d.Layout(t,i),o=(0,l.create)({render:function(){return e._draw()}}),r=this._inputsView=(0,c.toViewLike)(o),a=this._minutesSlider=new u.Slider(null,{min:0,max:59,step:1,tooltip:!1,labelPosition:"top",label:h.default.minutes,value:this.config.value?this._time.minute:0}),s=this._hoursSlider=new u.Slider(null,{min:0,max:23,step:1,tooltip:!1,labelPosition:"top",label:h.default.hours,value:this.config.value?12===this._time.hour&&this._time.AM?0:this._time.hour:0});if(n.getCell("timepicker").attach(r),n.getCell("hour-slider").attach(s),n.getCell("minute-slider").attach(a),this.config.controls){n.getCell("save-action").attach((function(){return(0,l.el)("button.dhx_timepicker__button-save.dhx_button.dhx_button--view_flat.dhx_button--color_primary.dhx_button--size_small.dhx_button--circle.dhx_button--width_full",{onclick:e._outerHandlers.save,type:"button"},h.default.save)})),n.getCell("close-action").attach((function(){return(0,l.el)("button.dhx_timepicker__button-close.dhx_button.dhx_button--view_link.dhx_button--size_medium.dhx_button--view_link.dhx_button--color_secondary.dhx_button--icon.dhx_button--circle",{_ref:"close",onclick:e._outerHandlers.close,type:"button","aria-label":"close timepicker"},[(0,l.el)("span.dhx_button__icon.dxi.dxi-close")])}))}},e.prototype._initHandlers=function(){var t=this,e=function(e){var i=v(parseInt(e.value,10),59);e.value=i.toString(),t._minutesSlider.setValue(i)},i=function(e){var i=v(parseInt(e.value,10),23);e.value=i.toString(),t._hoursSlider.setValue(i)};this._handlers={onchange:{".dhx_timepicker-input--hour":function(t){return i(t.target)},".dhx_timepicker-input--minutes":function(t){return e(t.target)}},oninput:{".dhx_timepicker-input--hour":function(t){((0,g.isSafari)()||(0,g.isFirefox)())&&i(t.target)},".dhx_timepicker-input--minutes":function(t){((0,g.isSafari)()||(0,g.isFirefox)())&&e(t.target)}}},this._outerHandlers={close:function(){t.events.fire(p.TimepickerEvents.beforeClose,[t.getValue(t._isTimeObj())])&&(t.events.fire(p.TimepickerEvents.afterClose,[t.getValue(t._isTimeObj())]),t.events.fire(p.TimepickerEvents.close,[]))},save:function(){t.events.fire(p.TimepickerEvents.beforeApply,[t.getValue(t._isTimeObj())])&&(t.events.fire(p.TimepickerEvents.afterApply,[t.getValue(t._isTimeObj())]),t.events.fire(p.TimepickerEvents.apply,[t.getValue()]),t.events.fire(p.TimepickerEvents.save,[t._time]))}}},e.prototype._initEvents=function(){var t=this;this._hoursSlider.events.on(u.SliderEvents.beforeChange,(function(e){if(!(e<t._hoursSlider.config.min||e>t._hoursSlider.config.max)){var i=r({},t._time);12===t.config.timeFormat?(i.AM=e<12,i.hour=e%12||12):i.hour=e;var n=t._isTimeObj();return t.events.fire(p.TimepickerEvents.beforeChange,[t._getValue(i,n)])}})),this._hoursSlider.events.on(u.SliderEvents.change,(function(e){if(!(e<t._hoursSlider.config.min||e>t._hoursSlider.config.max)){12===t.config.timeFormat?(t._time.AM=e<12,t._time.hour=e%12||12):t._time.hour=e;var i=t._isTimeObj();t.events.fire(p.TimepickerEvents.change,[t.getValue(i)]),t._inputsView.paint()}})),this._minutesSlider.events.on(u.SliderEvents.beforeChange,(function(e){if(!(e<t._minutesSlider.config.min||e>t._minutesSlider.config.max)){var i=r(r({},t._time),{minute:e}),n=t._isTimeObj();return t.events.fire(p.TimepickerEvents.beforeChange,[t._getValue(i,n)])}})),this._minutesSlider.events.on(u.SliderEvents.change,(function(e){if(!(e<t._minutesSlider.config.min||e>t._minutesSlider.config.max)){t._time.minute=e;var i=t._isTimeObj();t.events.fire(p.TimepickerEvents.change,[t.getValue(i)]),t._inputsView.paint()}}))},e.prototype._draw=function(){return this._minutesSlider.config.label=h.default.minutes,this._hoursSlider.config.label=h.default.hours,(0,l.el)(".dhx_timepicker-inputs",r({},this._handlers),[(0,l.el)("input.dhx_timepicker-input.dhx_timepicker-input--hour",{_key:"hour",_ref:"hour",value:this.getValue(!0).hour.toString().length>1?this.getValue(!0).hour:"0"+this.getValue(!0).hour,"aria-label":"hours"}),(0,l.el)("span.dhx_timepicker-delimer",":"),(0,l.el)("input.dhx_timepicker-input.dhx_timepicker-input--minutes",{_key:"minute",value:this.getValue(!0).minute.toString().length>1?this.getValue(!0).minute:"0"+this.getValue(!0).minute,"aria-label":"minutes"}),12===this.config.timeFormat?(0,l.el)(".dhx_timepicker-ampm",this._time.AM?"AM":"PM"):null])},e.prototype._isTimeObj=function(){var t;return"timeobject"===(null===(t=this.config.valueFormat)||void 0===t?void 0:t.toLowerCase())},e}(c.View);e.Timepicker=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMarginSize=e.getBlockRange=void 0,e.getBlockRange=function(t,e,i){return void 0===i&&(i=!0),i?{min:t.left+window.pageXOffset,max:e.right+window.pageXOffset}:{min:t.top+window.pageYOffset,max:e.bottom+window.pageYOffset}},e.getMarginSize=function(t){return t&&("space"===t.type||"wide"===t.type)?12:0}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProLayout=void 0;var r=i(28),a=i(41),l=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createCell=function(t){var i;return t.rows||t.cols||t.views?(t.parent=this._root,i=new e(this,t)):i=new a.ProCell(this,t),this._root._all[i.id]=i,t.init&&t.init(i,t),i},e}(r.Layout);e.ProLayout=l},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(102),e),o(i(44),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var a=i(0),l=i(1),s=i(6),c=i(25),d=i(11),u=i(30),h=i(44),f=i(2);function p(t,e,i){return t<e?e:t>i?i:t}var g=function(t){function e(e,i){var n=t.call(this,e,(0,a.extend)({mode:"horizontal",min:0,max:100,step:1,tooltip:!0},i))||this;n._disabled=!1,n.config.helpMessage=n.config.helpMessage||n.config.help,void 0!==n.config.thumbLabel&&(n.config.tooltip=n.config.thumbLabel),n.config.labelInline&&(n.config.labelPosition="left"),n.events=new s.EventSystem(n),n._axis="horizontal"===n.config.mode?"clientX":"clientY",n._initStartPosition(),n._keyManager=new c.KeyManager((function(){var t,e;return document.activeElement===(null===(e=null===(t=n.getRootView().refs)||void 0===t?void 0:t[n._isExtraActive?"extraRunner":"runner"])||void 0===e?void 0:e.el)})),n._initHotkeys();var o=(0,l.create)({render:function(){return n._draw()},hooks:{didMount:function(){return n._calcSliderPosition()},didRedraw:function(){return n._calcSliderPosition()}}});return n._initHandlers(),n.mount(e,o),n}return o(e,t),e.prototype.disable=function(){this._disabled=!0,this.paint()},e.prototype.enable=function(){this._disabled=!1,this.paint()},e.prototype.isDisabled=function(){return this._disabled},e.prototype.focus=function(t){this.getRootView().refs[t?"extraRunner":"runner"].el.focus()},e.prototype.blur=function(){this.getRootView().refs[this._isExtraActive?"extraRunner":"runner"].el.blur()},e.prototype.getValue=function(){var t;if(this.config.range){var e=this._getValue(this._currentPosition),i=this._getValue(this._extraCurrentPosition);t=e<i?[e,i]:[i,e]}else t=[this._getValue(this._currentPosition)];return t},e.prototype.setValue=function(t){var e=this._getValue(this._currentPosition);if(Array.isArray(t)&&t.length>1){var i=this._getValue(this._extraCurrentPosition);this.events.fire(h.SliderEvents.beforeChange,[t[0],e,!1])&&(this._setValue(t[0],!1),this.events.fire(h.SliderEvents.change,[t[0],e,!1])),this.events.fire(h.SliderEvents.beforeChange,[t[1],i,!0])&&(this._setValue(t[1],!0),this.events.fire(h.SliderEvents.change,[t[1],i,!0]))}else{if(t=parseFloat(t),isNaN(t))throw new Error("Wrong value type, for more info check documentation https://docs.dhtmlx.com/suite/slider__api__slider_setvalue_method.html");this.events.fire(h.SliderEvents.beforeChange,[t,e,!1])&&(this._setValue(t),this.events.fire(h.SliderEvents.change,[t,e,!1]))}this.paint()},e.prototype.destructor=function(){this._keyManager&&this._keyManager.destructor(),document.body.contains(this._tooltip)&&document.body.removeChild(this._tooltip),this._tooltip=null,this.unmount()},e.prototype._calcSliderPosition=function(){var t=this.getRootView();if(t){var e=t.refs.track.el.getBoundingClientRect();this._offsets={left:e.left+window.pageXOffset,top:e.top+window.pageYOffset},this._length="horizontal"===this.config.mode?e.width:e.height}},e.prototype._initHotkeys=function(){var t=this,e={arrowLeft:function(e){e.preventDefault(),t._move(-t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowRight:function(e){e.preventDefault(),t._move(t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowUp:function(e){e.preventDefault(),t._move(t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowDown:function(e){e.preventDefault(),t._move(-t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))}};for(var i in e)this._keyManager.addHotKey(i,e[i])},e.prototype._move=function(t,e){void 0===e&&(e=!1),this.config.inverse&&(t=-t);var i=this.config,n=i.max,o=i.min,r=e?this._getValue(this._extraCurrentPosition):this._getValue(this._currentPosition),a=r+t;(a>n||a<o)&&(a=r),this.events.fire(h.SliderEvents.beforeChange,[a,r,e])&&(this._setValue(r+t,e),this.events.fire(h.SliderEvents.change,[a,r,e]),this.paint())},e.prototype._initStartPosition=function(){var t=this.config,e=t.max,i=t.min,n=t.range,o=function(t,e,i){var n;return(n=void 0===t?[]:Array.isArray(t)?t:"string"==typeof t?t.split(",").map((function(t){return parseInt(t,10)})):[t])[0]=void 0===n[0]?e:p(n[0],e,i),n[1]=void 0===n[1]?i:p(n[1],e,i),n}(this.config.value,this.config.min,this.config.max),r=o[0],a=o[1];this._currentPosition=(r-i)/(e-i)*100,n&&(this._extraCurrentPosition=(e-a)/(e-i)*100),this._currentPosition=(r-i)/(e-i)*100,n&&(this._extraCurrentPosition=(a-i)/(e-i)*100),this._isInverse()&&(this._currentPosition=100-this._currentPosition,n&&(this._extraCurrentPosition=100-this._extraCurrentPosition))},e.prototype._getValue=function(t){this._isInverse()&&(t=100-t);var e=this.config,i=e.min,n=e.max,o=e.step;if(100===t)return n;if(0===t)return i;var r=t*(n-i)/100,a=r%o,l=a>=o/2?o:0;return+(Number(i)+Number(r)-a+l).toFixed(5)},e.prototype._setValue=function(t,e){void 0===e&&(e=!1);var i=this.config,n=i.max,o=i.min;if(t>n||t<o)return!1;var r=(t-o)/(n-o)*100,a=this._isInverse()?100-r:r;e?this._extraCurrentPosition=a:this._currentPosition=a},e.prototype._initHandlers=function(){var t=this,e=function(e){e.cancelable&&e.preventDefault();var i=((e.targetTouches?e.targetTouches[0][t._axis]:e[t._axis])-t._getBegining())/t._length*100;if(t._findNewDirection){if(Math.abs(t._currentPosition-i)<1)return;i>t._currentPosition?t._possibleRange=[t._currentPosition,100]:t._possibleRange=[0,t._currentPosition],t._findNewDirection=null}t._inSide(i)&&t._updatePosition(i,t._isExtraActive),t.paint()},i=function(n){t.events.fire(h.SliderEvents.mouseup,[n]),setTimeout((function(){t._isMouseMoving=!1,t.paint()}),4),n.targetTouches?(document.removeEventListener("touchend",i),document.removeEventListener("touchmove",e)):(document.removeEventListener("mouseup",i),document.removeEventListener("mousemove",e))},n=function(e){var i;if(!t._disabled&&3!==e.which)if(t.events.fire(h.SliderEvents.mousedown,[e]),t._isMouseMoving=!0,e.target.classList.contains("dhx_slider__thumb--extra")?(t._isExtraActive=!0,i=t._extraCurrentPosition):(t._isExtraActive=!1,i=t._currentPosition),t._findNewDirection=null,t.config.range){var n=t._currentPosition>t._extraCurrentPosition?[t._currentPosition,t._extraCurrentPosition]:[t._extraCurrentPosition,t._currentPosition],o=n[0],r=n[1];t._currentPosition===t._extraCurrentPosition?(t._findNewDirection=i,t._possibleRange=[0,100]):t._possibleRange=i<o?[0,o]:[r,100]}else t._possibleRange=[0,100]};this.config.helpMessage&&(this._helper=new u.Popup({css:"dhx_tooltip dhx_tooltip--forced dhx_tooltip--light"}),this._helper.attachHTML(this.config.helpMessage)),this._handlers={showHelper:function(e){e.preventDefault(),e.stopPropagation(),t._helper.show(e.target,{theme:e.target})},onmousedown:function(t){n(t),document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)},ontouchstart:function(o){t._setTooltip(o),t._mouseIn=!1,n(o),document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",i),t.paint()},ontouchend:function(e){t._setTooltip(e),t._mouseIn=!1,t.paint()},onlabelClick:function(){t.getRootView().refs.runner.el.focus()},onclick:function(e){if(!t._disabled&&!t._isMouseMoving&&3!==e.which){var i=(e[t._axis]-t._getBegining())/t._length*100,n=t.getRootView().refs;if(t.config.range)Math.abs(t._currentPosition-i)<Math.abs(t._extraCurrentPosition-i)?(t._updatePosition(i,!1),n.runner.el.focus()):(t._updatePosition(i,!0),n.extraRunner.el.focus());else t._updatePosition(i,!1),n.runner.el.focus();t.paint()}},onmouseover:function(e){t._setTooltip(e),t._mouseIn=!0,t.paint()},onmouseout:function(e){t._setTooltip(e),t._mouseIn=!1,t.paint()},onfocus:function(e){t._setTooltip(e),t._focusIn=!0,t.events.fire(h.SliderEvents.focus,[]),t.paint()},onblur:function(e){t._setTooltip(e),t._focusIn=!1,t.events.fire(h.SliderEvents.blur,[]),t.paint()},onkeydown:function(e){t.events.fire(h.SliderEvents.keydown,[e])}}},e.prototype._getBegining=function(){return"horizontal"===this.config.mode?this._offsets.left-window.pageXOffset:this._offsets.top-window.pageYOffset},e.prototype._inSide=function(t){var e=this._possibleRange;return t<e[0]?(this._updatePosition(e[0],this._isExtraActive),!1):!(t>e[1])||(this._updatePosition(e[1],this._isExtraActive),!1)},e.prototype._updatePosition=function(t,e){void 0===e&&(e=!1),t>100&&(t=100),t<0&&(t=0);var i=this.config,n=i.max,o=i.min,r=e?this._extraCurrentPosition:this._currentPosition,a=this._getValue(r),l=this._getValue(t);if(a!==l&&this.events.fire(h.SliderEvents.beforeChange,[l,a,e])){var s=(l-o)/(n-o)*100,c=this._isInverse()?100-s:s;e?this._extraCurrentPosition=c:this._currentPosition=c,this.events.fire(h.SliderEvents.change,[l,a,e])}},e.prototype._getRunnerStyle=function(t){var e;void 0===t&&(t=!1);var i="horizontal"===this.config.mode?"left":"top",n=t?this._extraCurrentPosition:this._currentPosition;return(e={})[i]=n+"%",e},e.prototype._isInverse=function(){return this.config.inverse&&"horizontal"===this.config.mode||!this.config.inverse&&"vertical"===this.config.mode},e.prototype._getRunnerCss=function(t){return void 0===t&&(t=!1),"dhx_slider__thumb"+(t?" dhx_slider__thumb--extra":"")+(this._isMouseMoving&&(t&&this._isExtraActive||!t&&!this._isExtraActive)?" dhx_slider__thumb--active":"")+(this._disabled?" dhx_slider__thumb--disabled":"")+(this._isNullable(t?this._extraCurrentPosition:this._currentPosition)&&!this.config.range?" dhx_slider__thumb--nullable":"")},e.prototype._draw=function(){var t=this.config,e=t.labelPosition,i=t.mode,n=t.hiddenLabel,o=t.tick,a=t.majorTick,s=t.css,c=t.helpMessage,d=(0,f.getLabelStyle)(r(r({},this.config),{required:!1}));return!this._tooltip||this._mouseIn&&this._focusIn&&this._isMouseMoving||document.body.contains(this._tooltip)&&document.body.removeChild(this._tooltip),(0,l.el)("div",{class:"dhx_slider dhx_slider--mode_"+i+("left"===e?" dhx_slider--label-inline":"")+(n?" dhx_slider--label_sr":"")+(o?" dhx_slider--ticks":"")+(a?" dhx_slider--major-ticks":"")+(s?" "+s:"")+(this._disabled?" dhx_slider--disabled":""),style:{paddingBottom:this.config.tick?"16px":null}},[d?(0,l.el)("label.dhx_label.dhx_slider__label",{style:d.style,class:c?"dhx_label--with-help":"",onclick:this._handlers.onlabelClick},c?[d.label&&(0,l.el)("span.dhx_label__holder",d.label),(0,l.el)("span.dhx_label-help.dxi.dxi-help-circle-outline",{tabindex:"0",role:"button",onclick:this._handlers.showHelper})]:d.label):null,this._drawSlider()])},e.prototype._drawSlider=function(){return(0,l.el)(".dhx_widget.dhx_slider__track-holder",{"data-dhx-widget-id":this._uid},[(0,l.el)(".dhx_slider__track",{_ref:"track",onmouseover:this._handlers.onmouseover,onmouseout:this._handlers.onmouseout,onclick:this._handlers.onclick},[this._getDetector(),(0,l.el)("div",{_ref:"runner",class:this._getRunnerCss(),ontouchstart:this._handlers.ontouchstart,ontouchend:this._handlers.ontouchend,onmousedown:this._handlers.onmousedown,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,onkeydown:this._handlers.onkeydown,style:this._getRunnerStyle(),tabindex:0}),this.config.tooltip&&(this._mouseIn||this._focusIn||this._isMouseMoving)?this._drawTooltip():null,this.config.tooltip&&this.config.range&&(this._mouseIn||this._focusIn||this._isMouseMoving)?this._drawTooltip(!0):null,this.config.range?(0,l.el)("div",{_ref:"extraRunner",class:this._getRunnerCss(!0),ontouchstart:this._handlers.ontouchstart,ontouchend:this._handlers.ontouchend,onmousedown:this._handlers.onmousedown,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,onkeydown:this._handlers.onkeydown,style:this._getRunnerStyle(!0),tabindex:0}):null]),this.config.tick?this._drawTicks():null])},e.prototype._getDetector=function(){var t,e,i;if(this._disabled)return(0,l.el)(".dhx_slider__range");var n="horizontal"===this.config.mode?"left":"top",o="horizontal"===this.config.mode?"width":"height";if(this.config.range){var r=this._currentPosition>this._extraCurrentPosition?[this._currentPosition,this._extraCurrentPosition]:[this._extraCurrentPosition,this._currentPosition],a=r[0],s=r[1];return(0,l.el)(".dhx_slider__range",{style:(t={},t[n]=s+"%",t[o]=a-s+"%",t)})}return this._isInverse()?(0,l.el)(".dhx_slider__range",{style:(e={},e[n]=this._currentPosition+"%",e[o]=100-this._currentPosition+"%",e)}):(0,l.el)(".dhx_slider__range",{style:(i={},i[n]=0,i[o]=this._currentPosition+"%",i)})},e.prototype._drawTooltip=function(t){if(void 0===t&&(t=!1),"none"!==this._activeTooltip&&this.getRootView()){var e="extraTooltip"===this._activeTooltip?this._extraCurrentPosition:this._currentPosition,i="horizontal"===this.config.mode?"left":"top",n="";(t&&this._isExtraActive||!t&&!this._isExtraActive)&&(n+=" dhx_slider__thumb-label--active"),this._tooltip||(this._tooltip=document.createElement("div"));var o="tooltip"===this._activeTooltip?this.getRootView().refs.runner.el.getBoundingClientRect():this.getRootView().refs.extraRunner.el.getBoundingClientRect();this._tooltip.className="dhx_slider__thumb-label"+n,this._tooltip.style.left=o.x+("left"===i?6:-30)+window.pageXOffset+"px",this._tooltip.style.top=o.y+("left"===i?-30:6)+window.pageYOffset+"px",this._tooltip.innerText=this._getValue(e).toString(),document.body.appendChild(this._tooltip)}},e.prototype._getTicks=function(){for(var t=this.config,e=t.max,i=t.min,n=t.step,o=t.tick,r=t.majorTick,a=e-i,l=n*o/a,s=[],c=0,d=0;c<1;){var u=+(Number(i)+c*a).toFixed(5),h=d%r==0;s.push({position:(this._isInverse()?100*(1-c):100*c)+"%",isMultiple:h,label:h&&"function"==typeof this.config.tickTemplate?this.config.tickTemplate(u):null}),c+=l,d++}return s.push({position:(this._isInverse()?0:100)+"%",isMultiple:!0,label:"function"==typeof this.config.tickTemplate?this.config.tickTemplate(e):null}),s},e.prototype._drawTicks=function(){var t="horizontal"===this.config.mode?"left":"top";return(0,l.el)(".dhx_slider__ticks-holder",this._getTicks().map((function(e){var i;return(0,l.el)("div",{class:"dhx_slider__tick"+(e.isMultiple?" dhx_slider__tick--major":""),style:(i={},i[t]=e.position,i)},void 0!==e.label?[(0,l.el)(".dhx_slider__tick-label",e.label)]:null)})))},e.prototype._isNullable=function(t){return this._isInverse()?100===t:0===t},e.prototype._setTooltip=function(t){t.target.classList.contains("dhx_slider__thumb--extra")?this._activeTooltip="extraTooltip":t.target.classList.contains("dhx_slider__thumb")?this._activeTooltip="tooltip":this._activeTooltip="none"},e}(d.View);e.Slider=g},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Popup=void 0;var a=i(0),l=i(1),s=i(6),c=i(2),d=i(11),u=i(43),h=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,null,(0,a.extend)({},e))||this,n=i._popup=document.createElement("div");return n.className="dhx_widget dhx_popup"+(i.config.css?" "+i.config.css:""),n.style.position="absolute",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-live","polite"),i.config.theme&&i._setTheme(i.config.theme),i.mount(n,(0,l.create)({render:function(){return i.toVDOM()}})),i._clickEvent=function(t){return i.events.fire(u.PopupEvents.click,[t])},i.events=e.events||new s.EventSystem(i),i._isActive=!1,i}return o(e,t),e.prototype.show=function(t,e,i){var n=this;void 0===e&&(e={}),this.events.fire(u.PopupEvents.beforeShow,[t])&&(t=(0,c.toNode)(t),this._isActive?this._setPopupSize(t,e):(i&&this.attach(i),e.theme&&this._setTheme(e.theme),this._popup.style.left="0",this._popup.style.top="0",(0,l.awaitRedraw)().then((function(){n._setPopupSize(t,e),n._popup.style.position="fixed",document.body.appendChild(n._popup),n._isActive=!0})).then((function(){n._popup.style.position="absolute",n.events.fire(u.PopupEvents.afterShow,[t]),n._outerClickDestructor=n._detectOuterClick(t)}))))},e.prototype.hide=function(){this._hide(!1,null)},e.prototype.isVisible=function(){return this._isActive},e.prototype.attach=function(t,e){return this._html=null,"object"==typeof t?this._ui=t:"string"==typeof t?this._ui=new window.dhx[t](null,e):"function"==typeof t&&(t.prototype instanceof d.View?this._ui=new t(null,e):this._ui={getRootView:function(){return t(e)}}),this.paint(),this._ui},e.prototype.attachHTML=function(t){this._html=t,this.paint()},e.prototype.getWidget=function(){return this._ui},e.prototype.getContainer=function(){return this.getRootView().refs.content.el},e.prototype.toVDOM=function(){var t;return this._html?t=(0,l.el)(".dhx_popup__inner-html-content",{".innerHTML":this._html}):(t=this._ui?this._ui.getRootView():null)&&t.render&&(t=(0,l.inject)(t)),(0,l.el)("div",{class:"dhx_popup-content",tabindex:0,onclick:this._clickEvent,_key:this._uid,_ref:"content"},[t])},e.prototype.destructor=function(){this.events&&this.events.clear(),this.hide(),this._outerClickDestructor&&this._outerClickDestructor(),this._popup=null},e.prototype._setTheme=function(t){var e;if("string"==typeof t)this._popup.setAttribute("data-dhx-theme",t);else{var i=null===(e=null==t?void 0:t.closest("[data-dhx-theme]"))||void 0===e?void 0:e.getAttribute("data-dhx-theme");i&&this._popup.setAttribute("data-dhx-theme",i)}},e.prototype._setPopupSize=function(t,e,i){var n=this;void 0===i&&(i=3);var o=this._popup.getBoundingClientRect(),a=o.width,l=o.height;if(this._timeout&&(clearTimeout(this._timeout),this._timeout=null),!i||0!==a&&0!==l){var s=(0,c.fitPosition)(t,r(r({centering:!0,mode:"bottom"},e),{width:a,height:l})),d=s.left,u=s.top;if(this._popup.style.left=d,this._popup.style.top=u,e.indent&&0!==e.indent)switch(e.mode){case"top":this._popup.style.top=parseInt(this._popup.style.top.slice(0,-2),null)-parseInt(e.indent.toString(),null)+"px";break;case"bottom":default:this._popup.style.top=parseInt(this._popup.style.top.slice(0,-2),null)+parseInt(e.indent.toString(),null)+"px";break;case"left":this._popup.style.left=parseInt(this._popup.style.left.slice(0,-2),null)-parseInt(e.indent.toString(),null)+"px";break;case"right":this._popup.style.left=parseInt(this._popup.style.left.slice(0,-2),null)+parseInt(e.indent.toString(),null)+"px"}}else this._timeout=setTimeout((function(){n._isActive&&(n._setPopupSize(t,e,i-1),n._timeout=null)}))},e.prototype._detectOuterClick=function(t){var e=this,i=!1,n=new WeakMap,o=function(r){var a=r.target,l=document.querySelectorAll(".dhx_popup");for(i?l.forEach((function(t){return n.has(t)||n.set(t,e._popup)})):(i=Boolean(l.length))&&l.forEach((function(t){return n.set(t,!0)}));a;){if(a===t||a===e._popup||n.get(a)===e._popup)return;a=a.parentNode}e._hide(!0,r)&&document.removeEventListener("mousedown",o)};return document.addEventListener("mousedown",o),function(){return document.removeEventListener("mousedown",o)}},e.prototype._hide=function(t,e){if(this._isActive)return!!this.events.fire(u.PopupEvents.beforeHide,[t,e])&&(document.body.removeChild(this._popup),this._isActive=!1,this._outerClickDestructor&&(this._outerClickDestructor(),this._outerClickDestructor=null),this.events.fire(u.PopupEvents.afterHide,[e]),!0)},e}(d.View);e.Popup=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={hours:"Hours",minutes:"Minutes",save:"Save"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeCheck=void 0,e.isTimeCheck=function(t){return/(^12:[0-5][0-9]?AM$)/i.test(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linkButtonClasses=void 0,e.linkButtonClasses=".dhx_button.dhx_button--view_link.dhx_button--icon.dhx_button--size_medium.dhx_button--color_secondary"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxEditor=void 0;var n=i(0),o=i(1),r=i(3),a=i(4),l=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(){var t=this._checked;this._config.events.fire(r.GridEvents.beforeEditEnd,[t,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.events.fire(r.GridEvents.afterEditEnd,[t,this._cell.row,this._cell.col])):this._input.checked=!t},t.prototype.toHTML=function(){void 0===this._checked&&(this._checked=this._cell.row[this._cell.col.id]);var t=(0,n.uid)();return(0,o.el)("div.dhx_checkbox.dhx_cell-editor__checkbox",[(0,o.el)("label",{style:{display:"none"},for:t},(0,a.getColumnHeaderText)(this._cell.col)),(0,o.el)("input.dhx_checkbox__input",{type:"checkbox",_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","data-dhx-checked":(!!this._checked).toString(),checked:this._checked,id:t,style:{userSelect:"none"}}),(0,o.el)("span.dhx_checkbox__visual-input")])},t.prototype._initHandlers=function(){var t=this;this._handlers={onClick:function(){var e=!t._input.checked;t._config.events.fire(r.GridEvents.beforeEditStart,[t._cell.row,t._cell.col,"checkbox"])?(t._checked=e,t._config.events.fire(r.GridEvents.afterEditStart,[t._cell.row,t._cell.col,"checkbox"]),t.endEdit()):t._input.checked=!e},didInsert:function(e){t._checkbox=e.el.parentNode.lastChild,t._input=e.el.parentNode.querySelector("input"),e.el.parentNode.addEventListener("click",t._handlers.onClick)}}},t}();e.CheckboxEditor=l},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ComboboxEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(47),s=i(17),c=i(4),d=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(t){var e=this;if(this._config.$editable){var i;if(!t){var n=this._input.getValue();i="multiselect"===this._cell.col.editorType?n.split(",").join(", "):n}if(this._config.events.fire(r.GridEvents.beforeEditEnd,[i,this._cell.row,this._cell.col])){var o=(0,c.getEditorOptions)(this._cell.col,this._cell.row);this._input.popup.hide(),document.removeEventListener("mousedown",this._handlers.onOuterClick),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),s.focusManager.setFocusId(this._config.gridId),"multiselect"===this._cell.col.editorType?null==i||i.toString().split(", ").forEach((function(t){return e._setCustomOptions(t,o)})):this._setCustomOptions(null==i?void 0:i.toString(),o),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[i,this._cell.row,this._cell.col])}else this._input.focus()}},t.prototype.toHTML=function(){var t=this,e=(0,c.getEditorOptions)(this._cell.col,this._cell.row).map((function(t){return"string"==typeof t?{id:"".concat(t),value:t}:t}))||[];if(!this._input){this._input=new l.ProCombobox(null,n({itemHeight:37,css:"dhx_cell-editor__combobox",multiselection:"multiselect"===this._cell.col.editorType,htmlEnable:this._cell.col.htmlEnable},this._cell.col.editorConfig)),this._input.data.parse(e);var i=this._cell.row[this._cell.col.id],r="multiselect"===this._cell.col.editorType?((null==i?void 0:i.toString())||"").split(", "):i;this._input.setValue(r),this._input.events.on("keydown",this._handlers.onkeydown),this._input.data.events.on("beforeAdd",(function(e){if(e.id!==e.value)return t._input.addOption({id:e.value,value:e.value},!0),!1}))}return document.addEventListener("mousedown",this._handlers.onOuterClick),this._config.$editable.editor=this,(0,o.awaitRedraw)().then((function(){var e=t._input.getRootView().refs.holder.el,i=e.querySelector("input");i&&i.setAttribute("aria-label",(0,a.getColumnHeaderText)(t._cell.col)),t._input.popup.getContainer().style.width=e.offsetWidth+"px",t._input._filter(),t._input.popup.show(e)})),s.focusManager.setFocusId(this._input._uid),(0,o.inject)(this._input.getRootView())},t.prototype._initHandlers=function(){var t=this;this._handlers={onOuterClick:function(e){if(e.target instanceof Node){var i=t._input&&t._input.getRootNode()&&t._input.getRootNode().contains(e.target),n=t._input.popup&&t._input.popup.getRootNode()&&t._input.popup.getRootNode().contains(e.target);i||n||t.endEdit()}},onkeydown:function(e){if("Escape"!==e.key&&"Tab"!==e.key||t.endEdit(),"Enter"===e.key){if(!t._config.events.fire(r.GridEvents.beforeKeyDown,[e]))return;e.stopPropagation(),t.endEdit(),t._config.events.fire(r.GridEvents.afterKeyDown,[e])}}}},t.prototype._setCustomOptions=function(t,e){var i=e.find((function(e){return"string"==typeof e?e===t:e.id.toString()===t}));t&&!i&&(this._cell.col.$customOptions||(this._cell.col.$customOptions=[]),this._cell.col.$customOptions.push(this._input.data.getItem(t)))},t}();e.ComboboxEditor=d},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEY_CODES=void 0,e.KEY_CODES={BACKSPACE:8,ENTER:13,ESC:27,DOWN_ARROW:40,UP_ARROW:38,LEFT_ARROW:37,RIGHT_ARROW:39}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n=i(111);e.getEditor=function(t,e){return new n.InputEditor(t,e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var n=i(1),o=i(31),r=function(){function t(t,e){var i=this;this._list=e,this._config=e.config,this._item=t,this._list.events.on(o.ListEvents.focusChange,(function(t,e){i._mode&&e!==i._item.id&&i.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(){if(this._input){var t=this._input.value;this._list.events.fire(o.ListEvents.beforeEditEnd,[t,this._item.id])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("change",this._handlers.onChange),this._input.removeEventListener("keydown",this._handlers.onKeyDown),this._handlers={},this._mode=!1,this._list.events.fire(o.ListEvents.afterEditEnd,[t,this._item.id])):this._input.focus()}},t.prototype.toHTML=function(){this._mode=!0;var t=this._config.itemHeight;return(0,n.el)(".dhx_input__wrapper",{role:"presentation"},[(0,n.el)("div.dhx_input__container",{role:"presentation"},[(0,n.el)("input.dhx_input",{class:this._item.css?" "+this._item.css:"",style:{height:t,width:"100%",padding:"8px 12px"},_hooks:{didInsert:this._handlers.didInsert},_key:this._item.id,"data-dhx-id":this._item.id})])])},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onChange:function(){t.endEdit()},onKeyDown:function(e){"Enter"===e.key&&t._item.value===t._input.value&&t.endEdit(),"Escape"===e.key&&(t._input.value=t._item.value,t.endEdit())},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.value=t._item.value,i.setSelectionRange(0,i.value.length),i.addEventListener("change",t._handlers.onChange),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onKeyDown)}}},t}();e.InputEditor=r},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.ProList=void 0;var l=i(1),s=i(42),c=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.scrollView=new s.ScrollView((function(){return n.getRootView()})),n.paint(),n}return o(e,t),e.prototype.destructor=function(){t.prototype.destructor.call(this),this.scrollView=null},e.prototype.scrollTo=function(t){var e,i,n=this.getRootView();if(n&&n.node&&n.node.el&&void 0!==t){var o=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):this.getRootNode();this._scrollTo(t,o)}},e.prototype._renderList=function(){var t=this,e=this._getRange(),i=this.data.getRawData(e[0],e[1]).map((function(e,i){return t._renderItem(e,i)}));this.config.virtual&&(i=a(a([(0,l.el)(".div",{style:{height:e[2]+"px",_key:"start-key"}})],i,!0),[(0,l.el)(".div",{style:{height:e[3]+"px",_key:"end-key"}})],!1));var n=this.scrollView&&this.scrollView.config.enable,o=(this.config.css?this.config.css:"")+(this.config.multiselection&&this.selection.getItem()?" dhx_no-select--pointer":"")+(n?" dhx_list--scroll-view":"");return(0,l.el)("ul.dhx_widget.dhx_list",r(r({style:{"max-height":this.config.height,position:"relative"},id:this._uid,class:o,"data-dhx-widget-id":this._uid,"data-dhx-drop-area":"row"},this._handlers),this._getListAriaAttrs(this.config,this.data.getLength())),n?[].concat(this.scrollView.render(i)):i)},e}(i(50).List);e.ProList=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyListener=void 0;var n=function(){function t(){var t=this;this._handler=function(e){if(t._isActive){var i=e.key;"Backspace"===i&&t._sequence.length>0&&(t._sequence=t._sequence.slice(0,t._sequence.length-1),t._change()),i.length<2&&(t._sequence+=i,t._change())}},this._sequence="",document.addEventListener("keydown",this._handler)}return t.prototype.startNewListen=function(t){this._isActive=!0,this._sequence="",this._currentAction=t},t.prototype.endListen=function(){this._currentAction=null,this.reset(),this._isActive=!1},t.prototype.reset=function(){this._sequence=""},t.prototype.destructor=function(){document.removeEventListener("keydown",this._handler)},t.prototype._change=function(){this._currentAction(this._sequence),this._addClearTimeout()},t.prototype._addClearTimeout=function(){var t=this;this._clearTimeout&&clearTimeout(this._clearTimeout),this._clearTimeout=setTimeout((function(){t.reset(),t._clearTimeout=null}),2e3)},t}();e.KeyListener=n},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProCombobox=void 0;var r=i(48),a=i(49),l=i(27),s=i(52),c=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createLayout=function(){var t=this.list=new a.ProList(null,{$template:r.$template,template:this.config.template,htmlEnable:this.config.htmlEnable,virtual:this.config.virtual,keyNavigation:!0,multiselection:this.config.multiselection,itemHeight:this.config.itemHeight,height:this.config.listHeight,data:this.data,eventHandlers:this.config.eventHandlers}),e=this._layout=new l.ProLayout(this.popup.getContainer(),{css:"dhx_combobox-options dhx_combobox__options",rows:[{id:"select-unselect-all",hidden:!this.config.multiselection||!this.config.selectAllButton},{id:"list",height:"content"},{id:"not-found",hidden:!0}],on:{click:{".dhx_combobox__action-select-all":this._handlers.selectAll,".dhx_combobox-options__action-create-option":this._handlers.addOption}}});e.getCell("list").attach(t),this.config.multiselection&&this.config.selectAllButton&&e.getCell("select-unselect-all").attach(s.selectAllView)},e}(r.Combobox);e.ProCombobox=c},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaEditor=void 0;var o=i(1),r=i(3),a=i(0),l=i(4),s=i(4),c=i(18),d=function(){function t(t,e,i,n){this._config=i,this._cell={row:t,col:e},this.type=this._cell.col.type,this._width=this._getCellWidth(n),this._config.firstColId===this._cell.col.id&&this._cell.row.hasOwnProperty("$level")&&(this._width-=(0,s.getTreeCellWidthOffset)(this._cell.row)-12),this._initHandlers()}return t.prototype.endEdit=function(t){var e;this._config.$editable&&(t||(e=this._removeValuePattern(this._input.value,!0),("number"===this.type||this._cell.col.numberMask)&&(e=parseFloat(e),Number.isNaN(e)&&(e=""))),this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus())},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this;var r=void 0!==this._cell.row.height||this._cell.col.htmlEnable?"dhx_cell-editor dhx_cell-editor__textarea_constant-height":"dhx_cell-editor dhx_cell-editor__textarea";return(0,o.el)("textarea",{_hooks:{didInsert:this._handlers.didInsert},_ref:"textarea",_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,l.getColumnHeaderText)(this._cell.col),value:t,onblur:this._handlers.onBlur,oninput:this._handlers.onInput,onkeydown:this._handlers.onKeydown,class:r,style:{width:this._width}})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(e){var i=t._removeValuePattern(t._input.value);t._input.value=t._applyValuePattern(i,t._input),t._updateHeight(e,t._input.value)},onKeydown:function(e){"Escape"===e.key&&t._updateHeight(e,t._initialValue),"Enter"!==e.key||e.shiftKey||e.preventDefault()},didInsert:function(e){t._input=e.el,t._initialValue=e.el.value,t._input.focus()}}},t.prototype._getCurrentHeight=function(t,e){e=n({width:100,maxHeight:40,lineHeight:20},e);var i=document.createElement("textarea");i.className="dhx_cell-editor dhx_cell-editor__textarea",i.value=t,i.style.width="".concat(e.width,"px"),i.style.lineHeight="".concat(e.lineHeight,"px"),i.style.maxHeight="".concat(e.maxHeight,"px"),i.style.boxSizing="border-box",document.body.appendChild(i);var o=this._getElementHeight(i),r=i.value.split("\n").length,a=Math.round(o/e.lineHeight),l=o<e.maxHeight?e.maxHeight:o;return document.body.removeChild(i),1===r&&r===a?e.maxHeight:l},t.prototype._getElementHeight=function(t){return t.scrollHeight},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,c.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,c.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,c.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,c.removePatternMask)(t,this._cell.col.patternMask):t},t.prototype._getCellWidth=function(t){return t?this._config.columns.slice(t.$colsVisibility[0],t.$colsVisibility[1]+1).reduce((function(t,e){return t+e.$width}),0):this._cell.col.$width},t.prototype._updateHeight=function(t,e){var i,o;if(void 0===this._cell.row.height&&!this._cell.col.htmlEnable){var a=this._getCurrentHeight(e,{width:this._width-2,maxHeight:this._config.rowHeight}),l=n(n({},this._cell.row),((i={})[this._cell.col.id]=e,i)),c=(0,s.getCalculatedRowHeight)((0,s.getMaxRowHeight)({row:l,cols:this._config.columns})),d=(0,s.getCalculatedRowHeight)((0,s.getMaxRowHeight)({row:(o={},o[this._cell.col.id]=l[this._cell.col.id],o),cols:this._config.columns}));if(this._minHeight=c===d?this._config.rowHeight:c,a>=this._minHeight&&a!==this._prevHeight){if(!this._config.events.fire(r.GridEvents.beforeRowResize,[this._cell.row,t,a]))return;this._config.events.fire(r.GridEvents.afterRowResize,[this._cell.row,t,a])}this._prevHeight=a}},t}();e.TextAreaEditor=d},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupPanel=e.getGroupItem=void 0;var r=i(1),a=i(3),l=i(2),s=i(56);var c={onclick:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchstart:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchmove:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemTouchMove,[i,e])},ontouchend:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemItemTouchEnd,[i,e])}};function d(t){var e=t.id,i=t.label,n=t.sortDir,o=t.sortOrder,a=t.mode,l=void 0===a?"basic":a,s=t.sortable,c=void 0===s||s,d=t.closable,u=void 0===d||d;return(0,r.el)("div",{role:"option",class:"dhx_grid-group_item dhx_grid-group_item--".concat(l),"data-dhx-group-item-id":e,"data-dhx-id":e,_key:e},[c&&(n&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("i.dxi.dxi-arrow-up.dhx_grid-group_item-sort.dhx_grid-group_item-sort--".concat(n),{"aria-hidden":"true"}),o&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[o])||null])||(0,r.el)("i.dxi.dxi-sort.dhx_grid-group_item-sort.dhx_grid-group_item-unsorted"))||null,(0,r.el)("span.dhx_grid-group_item-label",i),u&&(0,r.el)("i.dxi.dxi-close-circle.dhx_grid-group_item-remove",{"data-dhx-group-item-remove":"true"})||null])}e.getGroupItem=d,e.getGroupPanel=function(t,e){var i,a;void 0===t&&(t=[]);var l=[];t.forEach((function(e,i){l.push(d(e)),i!==t.length-1&&l.push(function(t){var e=t.id;return(0,r.el)("div.dhx_grid-group_chain",{"aria-hidden":"true","data-dhx-id":e,_key:"chain_".concat(e)},[(0,r.el)("i.dxi.dxi-chevron-right")])}(e))}));var u=Object.entries(c).reduce((function(t,i){var o,r=i[0],a=i[1];return n(n({},t),((o={})[r]=[a,e],o))}),{});return(0,r.el)("section",n({class:"dhx_grid-group_panel","data-dhx-drop-area":"group",role:"presentation",style:{height:(null===(a=null===(i=e.config)||void 0===i?void 0:i.group)||void 0===a?void 0:a.panelHeight)||40}},u),[(0,r.el)("div",{class:"dhx_grid-group_title"},s.default.dropAreaTitle),(0,r.el)("div",{class:"dhx_grid-group_drop-area",role:"listbox"},o([],l.length?l:[(0,r.el)("span",{class:"dhx_grid-group_drop-area-placeholder"},s.default.dropAreaPlaceholder)],!0))])}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.setSubRowCell=e.getSubRowContent=void 0;var o=i(1),r=i(5),a=i(20),l=i(41),s=i(7);function c(t,e,i,o){var r=e(t),s=new l.ProCell(null,{id:"cell"+t.id,css:"dhx_grid_subrow "+(i.css||""),html:"string"==typeof r&&r||null,height:t.$subRowHeight,padding:i.padding});o.set(t.id,n(n(n({},a.defaultSubRowConfig),i),{cell:s})),"function"==typeof(null==r?void 0:r.paint)&&s.attach(r)}e.getSubRowContent=function(t){var e,i=[],n=null===(e=t.subRowConfig)||void 0===e?void 0:e.fullWidth;return t.$subRowCells&&t.currentRows.forEach((function(e){var a;if(e.$opened){var l=t.$subRowCells.get(e.id),c=null===(a=null==l?void 0:l.cell)||void 0===a?void 0:a.getRootView();if(c){var d=(0,r.getTotalHeight)(t.data.slice(0,e.$index))+e.$height;i.push((0,o.el)(".dhx_grid_subrow__container",{_key:"sub"+e.id,role:"region","aria-labelledby":"row-".concat(e.id),"data-dhx-id":e.id,"data-dhx-root-widget-id":t.gridId,tabindex:0,style:{position:"absolute",top:d,width:n?t.$totalWidth:t.$width-t.$scrollBarWidth.y-s.BORDERS}},[(0,o.inject)(c)]))}}})),i.length?(0,o.el)(".dhx_grid_subrow__data",{_flags:o.KEYED_LIST,style:{left:n?0:t.scroll.left},role:"presentation"},i):[]},e.setSubRowCell=function(t,e){for(var i=t.config,o=i.subRowConfig,r=i.$subRowCells,l=i.subRow,s=new Map,d=0;d<e.length;d++){var u=e[d];if(!u.$group){if(!r.has(u.id)||!r.get(u.id).cell){var h=n(n({},a.defaultSubRowConfig),("function"==typeof o?o(u):o)||{});r.set(u.id,h),(u.$opened||h.preserve)&&u.$subRowHeight&&c(u,l,h,r)}s.set(u.id,u.$opened)}}r.forEach((function(t,e){var i;t.preserve||(s.has(e)||r.delete(e),s.get(e)||((null==t?void 0:t.cell)&&(null===(i=t.cell)||void 0===i||i.destructor()),delete t.cell))}))}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getDragPanelNode=void 0;var r=i(1),a=i(3),l=i(20),s=i(7),c=i(2),d=i(5),u={onclick:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemMouseDown,[i,e])}};function h(t){return(0,r.el)(".dhx_grid-drag-panel_header",{style:{height:t.$headerHeight},role:"banner","aria-label":"Panel header"})}function f(t,e,i){var n=t.$footer,o=((!i||e.footerAtBottom)&&t.$scrollBarWidth.x||0)+(n&&t.$footerHeight||0);if(!o||!n&&t.$totalHeight<t.$height-t.$headerHeight-t.$footerHeight)return null;var a=s.BORDERS/2,c=t.dragPanel,d={height:o+a};return e.footerAtBottom&&(d.width=c.width||l.defaultDragPanelConfig.width,d.height=d.height+a),(0,r.el)(".dhx_grid-drag-panel_footer".concat(e.footerAtBottom?".dhx_grid-drag-panel_footer--at-bottom":""),{style:d,role:"contentinfo","aria-label":"Panel footer"})}function p(t,e,i){var n=t.$height-t.$headerHeight-s.BORDERS;return(0,r.el)(".dhx_grid-drag-panel_main",{style:{height:n},role:"main","aria-label":"Panel content"},[g(t,e),f(t,e,i),v(t,e,a.Split.top,i),v(t,e,a.Split.bottom,i)])}function g(t,e){var i=t.dragPanel,n=t.currentRows.map((function(t){return _(t,i.icon)}));return(0,r.el)(".dhx_grid-drag-panel_content",{style:{height:t.$totalHeight,paddingTop:e.shifts.y,top:-t.scroll.top},_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],n,!0))}function v(t,e,i,n){var c=t.dragPanel,u=(i===a.Split.bottom?t.fixedRows.bottom:t.fixedRows.top)||[];if(!u.length)return null;var h=u.map((function(t){return _(t,c.icon)})),f={width:c.width||l.defaultDragPanelConfig.width};if(i===a.Split.bottom&&e.footerAtBottom)f.bottom=t.footerHeight+s.BORDERS/2+(t.$scrollBarWidth.x||-1);else{var p=(0,d.getTotalHeight)(t.fixedRows.bottom),g=t.group?(0,l.getGroupDefaultConfig)(t.group).panelHeight:0;f.top=i===a.Split.bottom?n?t.$totalHeight+t.$headerHeight-p+s.BORDERS/2+g:t.$height-p-t.$footerHeight-s.BORDERS/2-t.$scrollBarWidth.x+g:t.$headerHeight+g}return(0,r.el)(".dhx_grid-drag-panel_content.dhx_grid-drag-panel_content--fixed",{style:f,_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],h,!0))}function _(t,e){return(0,r.el)(".dhx_grid-drag-panel_item",{"data-dhx-id":t.id,style:{height:t.$height},_key:t.id+"_panel",role:"listitem","aria-label":"Row id ".concat(t.id)},[(0,r.el)("i.dhx_grid-drag-panel_item-icon",{class:e,"aria-hidden":"true"})])}e.getDragPanelNode=function(t,e,i,o){var a;void 0===o&&(o=!1);var s=e.dragPanel,c=Object.entries(u).reduce((function(e,i){var o,r=i[0],a=i[1];return n(n({},e),((o={})[r]=[a,t],o))}),{}),d="dhx_grid-drag-panel ";return o&&(d+="dhx_grid-drag-panel--less-height "),(null===(a=t.config.$grouped)||void 0===a?void 0:a.length)&&(d+="dhx_grid-drag-panel--drag-not-allowed "),s.css&&(d+=s.css),(0,r.el)("section",n({class:d,style:{width:s.width||l.defaultDragPanelConfig.width},role:"region","aria-label":"Drag panel"},c),[h(e),p(e,i,o)])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComboFilter=void 0;var n=i(47),o=i(6),r=i(8),a=i(0),l=i(3),s=i(21),c=function(){function t(t){var e,i=t.column,n=t.config,r=t.headerConfig,l=t.uniqueData,s=t.value,c=t.grid;this.events=new o.EventSystem,this._silentMode=!1,this.column=i,this.config=n,this.data=l,this.value=s,this.filterConfig={},this._grid=c,Object.assign(this.filterConfig,(null==r?void 0:r.filterConfig)||{}),(this.column.htmlEnable||(null===(e=this.config)||void 0===e?void 0:e.htmlEnable)&&!1!==this.column.htmlEnable)&&(this.column.template||!1===this.filterConfig.readonly||(this.filterConfig.readonly=!0),this.filterConfig.template||(this.filterConfig.template=function(t){return t.value})),this.filterConfig.filter||(this.filterConfig.filter=function(t,e){return(0,a.isExistValue)(t.value,e)}),this.initFilter(),this.config&&this.initHandlers()}return t.prototype.initFilter=function(){this._filter=new n.ProCombobox(null,Object.assign({virtual:!0},this.filterConfig)),this.data&&this._filter.data&&this._setData()},t.prototype.initHandlers=function(){var t=this,e=this.column.id.toString();[r.DataEvents.load,r.DataEvents.afterLazyLoad].forEach((function(e){t._grid.events.on(e,(function(){return t._setData()}),!0)})),this._filter.events.on("change",(function(i){var n;i&&((Array.isArray(i)?i.find((function(e){return t._filter.data.getItem(e)})):t._filter.data.getItem(i))&&(n=t._filter.config.multiselection?t._filter.list.selection.getItem().map((function(e){if(e&&t._filter.data.getItem(e.id))return e.value})):t._filter.list.selection.getItem().value));t.value=n,t._grid.events.fire(l.GridEvents.filterChange,[t.value,e,"comboFilter",t._silentMode]),t._silentMode&&void 0===t.value&&(t._silentMode=!1)})),this._grid.events.on(l.GridEvents.filterChange,(function(e){return t.events.fire(s.HeaderFilterEvent.change,[e])}),this),this._filter.popup.events.on("afterHide",(function(){t.filterConfig.multiselection||t._filter.list.selection.getItem()||t.clear()})),this._filter.popup.events.on("afterShow",(function(){!t.filterConfig.multiselection&&(""===t.value||t.filterConfig.readonly&&void 0!==t.value)&&t.clear()})),this._grid.events.on(l.GridEvents.scroll,(function(){var e;t._isFocused&&(null===(e=t._filter.getRootView().refs)||void 0===e?void 0:e.input)&&t._filter.focus()}),this),this._grid.events.on(l.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()}),this),this._grid.events.on(l.GridEvents.cellMouseDown,(function(){return t.blur()}),this),this._grid.events.on(r.DataEvents.change,(function(e,i){t.column.hidden||"update"!==i||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(r.DataEvents.afterAdd,(function(){t.column.hidden||t._setData(!0)})),this._grid.events.on(r.DataEvents.afterRemove,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))})),this._grid.events.on(r.DataEvents.removeAll,(function(){t.clear(!0),t._setData()}),this),this._grid.events.on(l.GridEvents.afterRowShow,(function(){return t._setData(!0)}),this),this._grid.events.on(l.GridEvents.afterRowHide,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(r.DataEvents.filter,(function(e){t.column.hidden||(!e||(0,r.isOnlyPermanentFilters)(e)?t.clear(!0):t._checkValue(),t.filterConfig.multiselection&&t._filter.popup.isVisible()||t._setData(!0))}),this),this._grid.events.on(l.GridEvents.afterColumnShow,(function(){t.filterConfig.multiselection||(t._checkValue(),t._setData())}),this),this._grid.events.on(l.GridEvents.afterColumnHide,(function(){t.filterConfig.multiselection||t._setData()}),this)},t.prototype.getFilter=function(){return this._filter},t.prototype.setValue=function(t,e){var i,n=this;if(this.filterConfig.multiselection||!Array.isArray(t))if((0,a.isDefined)(t)){if((null==t?void 0:t.length)||""===t){var o=this.filterConfig.multiselection&&Array.isArray(t)?t.map((function(t){var e;return null===(e=n._filter.data.find((function(e){return e.value===t})))||void 0===e?void 0:e.id})):null===(i=this._filter.data.find((function(e){return e.value===t})))||void 0===i?void 0:i.id;this._filter.setValue(o,e)}}else e&&(this._silentMode=!0),this._filter.clear(),this.filterConfig.multiselection||void 0===this.value||(this.value=void 0,this._grid.events.fire(l.GridEvents.filterChange,[this.value,this.column.id,"comboFilter"]))},t.prototype.clear=function(t){void 0!==this.value&&this.setValue(null,t)},t.prototype.focus=function(){var t;this._isFocused=!0,(null===(t=this._filter.getRootView().refs)||void 0===t?void 0:t.input)&&this._filter.focus()},t.prototype.blur=function(){var t;this._isFocused=!1,(null===(t=this._filter.getRootView().refs)||void 0===t?void 0:t.input)&&this._filter.blur()},t.prototype.destructor=function(){var t=this._grid.events;if(t)for(var e in t.events)this._grid.events.detach(e,this);this.events.clear(),this._filter&&this._filter.destructor(),this.config=this.filterConfig=this.data=this.column=this.value=this.events=null},t.prototype._setData=function(t){var e=this;void 0===t&&(t=!1);var i=function(){var t=e.column.$activeFilterData||e.column.$uniqueData;if(e.column.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}))){var i=e._filter.data.reduce((function(t,e){return t[e.value]=e.id,t}),{}),n=t.map((function(t){return i[t]?{id:i[t],value:t}:{value:t}}));e._filter.data.parse(n)}else e._filter.data.parse(t.map((function(t){return{value:t}})))};void 0===this.value?i():t&&this.filterConfig.multiselection&&(i(),this.setValue(this.value,!0))},t.prototype._checkValue=function(){if(void 0!==this.value)for(var t=Array.isArray(this.value)?this.value:[this.value],e=function(e){if(i.column.$uniqueData.includes(e))return"continue";if(t.length>1){var n=i._filter.data.find((function(t){return t.value===e}));i._filter.list.selection.remove(n.id)}else i.clear();return"break"},i=this,n=0,o=t;n<o.length;n++){if("break"===e(o[n]))break}},t}();e.ComboFilter=c},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.SelectFilter=void 0;var o=i(1),r=i(6),a=i(3),l=i(21),s=i(4),c=function(){function t(t){var e=t.column,i=t.config,n=t.uniqueData,o=void 0===n?[]:n,a=t.value,l=t.grid;this.events=new r.EventSystem,this.column=e,this.config=i,this.data=o,this.value=a||"",this._grid=l,this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){var t,e=this;return(0,o.el)("label.dhx_grid-filter__label.dxi.dxi-menu-down",{_ref:"".concat(this.column.id,"_filter")},[(0,o.el)("select.dxi.dxi-menu-down",{type:"text",class:"dhx_input dhx_grid-filter dhx_grid-filter--select","aria-label":"Filter ".concat((0,s.getColumnHeaderText)(this.column)),tabindex:-1,onchange:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id},n([(0,o.el)("option",{value:"",_key:0},"")],null===(t=(this.value?[this.value]:this.data)||[])||void 0===t?void 0:t.map((function(t){return""!==(t=null!=t?t:"")&&(0,o.el)("option",{_key:t,value:t,selected:e.value===t.toString()},t)})),!0))])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){this.value=t||"",this.events.fire(l.HeaderFilterEvent.change,[t]),this._grid.events.fire(a.GridEvents.filterChange,[this.value,this.column.id,"selectFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e;this._isFocused=!0;var i=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;i&&i.focus()},t.prototype.blur=function(){var t,e;this._isFocused=!1;var i=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;i&&i.blur()},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t.setValue(a)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(a.GridEvents.scroll,(function(){var e,i,n=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&n&&(0,o.awaitRedraw)().then((function(){n.focus()}))})),this._grid.events.on(a.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(a.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.SelectFilter=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFilter=void 0;var n=i(1),o=i(6),r=i(3),a=i(21),l=i(4),s=function(){function t(t){var e=t.column,i=t.config,n=t.id,r=t.value,a=t.headerConfig,l=t.grid;this.events=new o.EventSystem,this.column=e,this.config=i,this.id=n,this.value=r||"",this.filterConfig={},this._grid=l,Object.assign(this.filterConfig,(null==a?void 0:a.filterConfig)||{}),this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){var t="Filter ".concat((0,l.getColumnHeaderText)(this.column));return(0,n.el)("div.dhx_grid-filter__label",{"aria-label":t,_ref:"".concat(this.column.id,"_filter")},[(0,n.el)(".dhx_grid-filter__icon.dhx_input__icon",{class:"dxi "+(this.filterConfig.icon||" dxi-magnify")}),(0,n.el)("label",{style:{display:"none"},for:this.id},t),(0,n.el)("input",{type:"text",class:"dhx_input dhx_grid-filter","aria-label":t,tabindex:-1,oninput:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id,id:this.id,value:this.value,placeholder:this.filterConfig.placeholder})])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){var i;this.value=t||"",this.events.fire(a.HeaderFilterEvent.change,[this.value]),null===(i=this._grid.events)||void 0===i||i.fire(r.GridEvents.filterChange,[this.value,this.column.id,"inputFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e,i;this._isFocused=!0;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.focus())},t.prototype.blur=function(){var t,e,i;this._isFocused=!1;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.blur())},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t._inputDelay&&clearTimeout(t._inputDelay),t._inputDelay=setTimeout((function(){return t.setValue(a)}),500)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(r.GridEvents.scroll,(function(){var e,i,o=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&o&&(0,n.awaitRedraw)().then((function(){var t;null===(t=o.querySelector("input"))||void 0===t||t.focus()}))})),this._grid.events.on(r.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(r.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.InputFilter=s},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.startResize=void 0;var o=i(0),r=i(3),a=i(7);e.startResize=function(t,e,i,l){var s,c=t.config.rightSplit;i.targetTouches&&i.preventDefault();var d=i.targetTouches?i.targetTouches[0].clientX:i.clientX,u=t.config.columns.filter((function(t){return!t.hidden})),h=c?u.slice(-c).map((function(t){return t.id})):[],f=!!(null===(s=t.scrollView)||void 0===s?void 0:s.config.enable),p=c?(0,a.calcScrollBarWidth)(t.config,f).xState:null,g=0;t.config.$resizing=e;var v=function(i){var l,s=(0,o.findIndex)(u,(function(t){return t.id===e})),v=i.targetTouches?i.targetTouches[0].clientX:i.clientX,_=v-t.getRootNode().getBoundingClientRect().left,m=(0,a.calcScrollBarWidth)(t.config,f);if(!(t.config.leftSplit===s+1&&_>=t.config.$width-m.y-2||c&&h.includes(e)&&m.xState!==p)){g=g||u[s].$width;var y=40;"function"==typeof t.data.getMaxLevel&&0===s&&(y*=t.data.getMaxLevel());var b,x=u[s].minWidth||y,w=u[s].maxWidth,C=v-d,S=n([],u,!0),E=g+(p&&h.includes(e)?-C:C);w&&E>=w||E<=x?(E<=x&&(b=x),E>=w&&(b=w)):b=E,S[s].$width=b;for(var D=0;D<S.length;D++){(null!==(l=S[D].adjust)&&void 0!==l?l:t.config.adjust)||(S[D].$fixedWidth=D<=s)}t.events.fire(r.GridEvents.resize,[u[s],i]),t.paint()}},_=function(){i.targetTouches?(document.removeEventListener("touchmove",v),document.removeEventListener("touchend",_)):(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",_)),l()};i.targetTouches?(document.addEventListener("touchmove",v),document.addEventListener("touchend",_)):(document.addEventListener("mousemove",v),document.addEventListener("mouseup",_)),t.paint()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getKeysHandlers=void 0;var n=i(2),o=i(14),r=i(17),a=i(5),l=i(124),s=i(125),c=i(126);e.getKeysHandlers=function(t){var e,i,d,u="cell"===t.config.selection||"complex"===t.config.selection||!0===t.config.selection,h=null===(d=null===(i=null===(e=t.getRootView())||void 0===e?void 0:e.refs)||void 0===i?void 0:i.grid_body)||void 0===d?void 0:d.el;if(!t.getRootView()||h){(0,c.initFocusSentinel)(t),(0,c.initEndSentinel)(t),(0,c.restoreZoneTabindex)(t,"header");var f=function(e,i,o){var r,a,s;if(void 0===o&&(o=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var c=null===(r=t.selection)||void 0===r?void 0:r.getCell(),d=t,u=null===(a=d.range)||void 0===a?void 0:a.getRange();if((c||u)&&h){e.preventDefault();var f,p=i*Math.max(1,Math.floor(h.clientHeight/t.config.rowHeight)),g=t.config.multiselection&&o;if(c)(f=(0,l.walkVisibleRows)(t,c.row.id,p))!==c.row.id&&(t.scrollTo(f.toString(),c.column.id.toString()),t.selection.setCell(f,c.column.id,!1,g));if(u&&"range"===(null===(s=d.block)||void 0===s?void 0:s.config.mode))(f=(0,l.walkVisibleRows)(t,u.yEnd,p))!==u.yEnd&&(0,l.applyRangeMove)(d,t.data.getItem(f),u,"vertical",o)}else h&&(e.preventDefault(),h.scrollTop+=i*h.clientHeight)}},p=function(e,i,n){var o,r;void 0===n&&(n=!1);var a=null===(o=t.selection)||void 0===o?void 0:o.getCell(),s=null===(r=t.range)||void 0===r?void 0:r.getRange();a||s?(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:i,toEnd:!0,shiftUp:n}):h&&(e.preventDefault(),h.scrollTop=i>0?h.scrollHeight:0)},g=function(e,i,o){var r,l,s,c;if(void 0===o&&(o=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var d=null===(r=t.selection)||void 0===r?void 0:r.getCell(),u=t,h=null===(l=u.range)||void 0===l?void 0:l.getRange();if(d||h){e.preventDefault();var f,p,g=t.config.columns.filter((function(t){return!t.hidden})),v=t.config.multiselection&&o;if(i<0)f=t.data.getId(0),p=g[0].id;else{var _=t.data.getId(t.data.getLength()-1);"tree"===t.config.type&&(_=(0,a.getLastChild)(_,t.data)),f=_,p=g[g.length-1].id}d&&(t.scrollTo(f.toString(),p.toString()),t.selection.setCell(f,p,!1,v)),h&&"range"===(null===(s=u.block)||void 0===s?void 0:s.config.mode)&&(u.scrollTo(f,p),o?u.range.setRange({yEnd:f,xEnd:p},!0):u.range.setRange({yStart:f,yEnd:f,xStart:p,xEnd:p}),null===(c=u.block)||void 0===c||c.restoreFocus())}}};return{enter:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"===n||"footer"===n){var r=e.target;return(0,c.isContentCell)(r)?(e.preventDefault(),void(0,c.activateContentCell)(r)):void(0,c.triggerHeaderSort)(t,e)}u?(i=(0,o.normalizeCell)(t.selection.getCell(),t))&&(0,s.isColumnEditable)(i.column,t.config)&&(t.config.$editable?t.editEnd():"boolean"===i.column.type?(0,s.toggleBooleanCell)(t,i.row,i.column):(0,s.startCellEdit)(t,i)):t.config.$editable?t.editEnd():(i=(0,l.getActiveCell)(t,!1))&&(0,s.isColumnEditable)(i.column,t.config)&&("boolean"===i.column.type?(0,s.toggleBooleanCell)(t,i.row,i.column):(0,s.startCellEdit)(t,i))},f2:function(){if(!t.config.$editable){var e=(0,l.getActiveCell)(t,u);e&&(0,s.isColumnEditable)(e.column,t.config)&&"boolean"!==e.column.type&&(0,s.startCellEdit)(t,e)}},space:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if(!t.config.$editable){var n=(0,l.getActiveCell)(t,u);n&&(0,s.isColumnEditable)(n.column,t.config)&&"boolean"===n.column.type&&(e.preventDefault(),(0,s.toggleBooleanCell)(t,n.row,n.column))}}else(0,c.triggerHeaderSort)(t,e)},escape:function(e){var i,n,o,r,a,l=(0,c.detectFocusZone)(e);if("header"!==l&&"footer"!==l)t.config.$editable&&t.editEnd(!0);else{e.preventDefault();var s=e.target,d=s.closest(".dhx_grid-".concat(l,"-cell, .dhx_span-cell"));if(d&&s!==d&&(0,c.isContentCell)(d))return void(0,c.deactivateContentCell)(d);(0,c.restoreZoneTabindex)(t,l);var u=(0,c.getActiveColumnId)(t)||(0,c.getColIdFromTarget)(s)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id);if(t.config.blockSelection&&(null===(n=t.range)||void 0===n?void 0:n.getRange())){var h=t.range.getRange();t.scrollTo(h.yStart,h.xStart),t.block.restoreFocus(),(null===(o=document.activeElement)||void 0===o?void 0:o.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,h.xStart,"first")}else if(null===(r=t.selection)||void 0===r?void 0:r.getCell()){var f=t.selection.getCell();t.scrollTo(f.row.id,f.column.id),t.selection.restoreFocus(),(null===(a=document.activeElement)||void 0===a?void 0:a.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,f.column.id,"first")}else u&&(0,c.transitionToBody)(t,u,"first")}},tab:function(e){var i,n,o,a,s,d,u=(0,c.detectFocusZone)(e);if("header"!==u&&"footer"!==u){t.config.$editable&&t.editEnd();var h=null===(s=t.selection)||void 0===s?void 0:s.getCell(),f=t.config.columns.filter((function(t){return!t.hidden}));if(h){if(h.row.$opened&&h.row.$subRowHeight){var p=t.getSubRow(h.row.id),g=p.view,v=p.element;return void((null==g?void 0:g.name.includes("grid"))?(g.selection.setCell(g.data.getId(0)),r.focusManager.setFocusId(g._uid)):v.focus())}var _=f.indexOf(h.column)+(0,l.getRangedIndex)(t,"right");if(_>=0&&_<f.length)e&&e.preventDefault(),t.scrollTo(h.row.id.toString(),f[_].id.toString()),t.selection.setCell(h.row.id,f[_].id);else if(_>=0){(y=(0,l.getNextVisibleRowId)(t,h.row.id,1))?(e&&e.preventDefault(),t.scrollTo(y.toString(),f[0].id.toString()),t.selection.setCell(y,f[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",f[0].id,0))}}else{var m=null===(d=t.range)||void 0===d?void 0:d.getRange();if(m){var y,b=f.findIndex((function(t){return t.id===m.xEnd}))+1;if(b<f.length)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,m.yEnd,f[b].id);else(y=(0,l.getNextVisibleRowId)(t,m.yEnd,1))?(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,y,f[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",f[0].id,0))}}}else{var x=e.target,w=x.closest(".dhx_grid-".concat(u,"-cell, .dhx_span-cell"));if(w&&x!==w&&(0,c.isContentCell)(w))return e.preventDefault(),void(0,c.deactivateContentCell)(w);if("exit-end"===(0,c.moveZoneFocusTab)(t,e,u,"forward"))if("header"===u){e.preventDefault(),(0,c.restoreZoneTabindex)(t,u);var C=(0,c.getVisibleColumns)(t);(0,c.transitionToBody)(t,null===(i=C[0])||void 0===i?void 0:i.id,"first")}else{(0,c.restoreZoneTabindex)(t,u);var S=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||(null===(a=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===a?void 0:a.getRootNode()),E=null==S?void 0:S.querySelector(".dhx_grid-focus-sentinel--end");E&&(E.setAttribute("tabindex","-1"),setTimeout((function(){return E.setAttribute("tabindex","0")}),0))}}},delete:function(){var e,i;"range"===(null===(e=t.block)||void 0===e?void 0:e.config.mode)&&t.config.editable&&!t.config.$editable&&(0,o.clearCells)(t,null===(i=t.range)||void 0===i?void 0:i.getRangedCells())},"shift+tab":function(e){var i,o,a,s,d,u,h,f,p=(0,c.detectFocusZone)(e);if("header"!==p&&"footer"!==p)if("body"===p&&(0,c.isAtFirstRow)(t)&&(0,c.isAtFirstColumn)(t)){e.preventDefault();var g=(0,c.getVisibleColumns)(t),v=g[g.length-1].id,_=(0,c.getZoneRowCount)(t,"header")-1;(0,c.transitionFromBodyToZone)(t,"header",v,_)}else{t.config.$editable&&t.editEnd();var m=null===(s=t.selection)||void 0===s?void 0:s.getCell(),y=t.config.columns.filter((function(t){return!t.hidden}));if(m){var b=(0,n.locate)(null===(h=null===(u=null===(d=t.getRootView().node)||void 0===d?void 0:d.parent)||void 0===u?void 0:u.parent)||void 0===h?void 0:h.el,"data-dhx-root-widget-id");if(b)return void r.focusManager.setFocusId(b);var x=y.indexOf(m.column)+(0,l.getRangedIndex)(t,"left");if(x>=0&&x<y.length)e&&e.preventDefault(),t.scrollTo(m.row.id.toString(),y[x].id.toString()),t.selection.setCell(m.row.id,y[x].id);else(C=(0,l.getNextVisibleRowId)(t,m.row.id,-1))&&(e&&e.preventDefault(),t.scrollTo(C.toString(),y[y.length-1].id.toString()),t.selection.setCell(C,y[y.length-1].id))}else{var w=null===(f=t.range)||void 0===f?void 0:f.getRange();if(w){var C,S=y.findIndex((function(t){return t.id===w.xEnd}))-1;if(S>=0)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,w.yEnd,y[S].id);else(C=(0,l.getNextVisibleRowId)(t,w.yEnd,-1))&&(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,C,y[y.length-1].id))}}}else{var E=e.target,D=E.closest(".dhx_grid-".concat(p,"-cell, .dhx_span-cell"));if(D&&E!==D&&(0,c.isContentCell)(D))return e.preventDefault(),void(0,c.deactivateContentCell)(D);if("exit-start"===(0,c.moveZoneFocusTab)(t,e,p,"backward")){(0,c.restoreZoneTabindex)(t,p);var O=(null===(i=t.getRootNode)||void 0===i?void 0:i.call(t))||(null===(a=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===a?void 0:a.getRootNode()),k=null==O?void 0:O.querySelector(".dhx_grid-focus-sentinel");k&&(k.setAttribute("tabindex","-1"),setTimeout((function(){return k.setAttribute("tabindex","0")}),0))}}},arrowUp:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"!==n&&"footer"!==n){if("body"===n){if((0,c.isAtFirstRow)(t))return e.preventDefault(),void((r=(0,c.getActiveColumnId)(t)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id))&&(0,c.transitionFromBodyToZone)(t,"header",r));(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:(0,l.getRangedIndex)(t,"up")})}}else if(!(0,c.moveZoneFocusVertical)(t,e,n,"up")&&"footer"===n){var o=e.target,r=(0,c.getColIdFromTarget)(o);(0,c.restoreZoneTabindex)(t,"footer"),r&&(0,c.transitionToBody)(t,r,"last")}},"shift+enter":function(e){var i=(0,c.detectFocusZone)(e);"header"!==i&&"footer"!==i||(0,c.triggerHeaderSort)(t,e,!0)},"ctrl+z":function(){var e;(null===(e=t.history)||void 0===e?void 0:e.canUndo())&&t.history.undo()},"ctrl+shift+z":function(){var e;(null===(e=t.history)||void 0===e?void 0:e.canRedo())&&t.history.redo()},"ctrl+enter":function(){var e=(0,l.getActiveCell)(t,u);e&&(e.row.$opened?t.collapse(e.row.id):t.expand(e.row.id))},"ctrl+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0})},"shift+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0,shiftUp:!0})},arrowDown:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"!==n&&"footer"!==n){if("body"===n){if((0,c.hasFooter)(t)&&(0,c.isAtLastRow)(t))return e.preventDefault(),void((r=(0,c.getActiveColumnId)(t)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id))&&(0,c.transitionFromBodyToZone)(t,"footer",r,0));(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:(0,l.getRangedIndex)(t,"down")})}}else if(!(0,c.moveZoneFocusVertical)(t,e,n,"down")){var o=e.target,r=(0,c.getColIdFromTarget)(o);(0,c.restoreZoneTabindex)(t,n),r&&(0,c.transitionToBody)(t,r,"footer"===n?"last":"first")}},"ctrl+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0})},"shift+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowRight:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if("body"===i){if("tree"===t.config.type&&!t.config.$editable){var n=(0,l.getActiveCell)(t,u);if(n&&((0,l.isTreeColumn)(t,n.column.id)||"row"===t.config.selection)){var o=n.row,r=t.data.haveItems(o.id);if(r&&!o.$opened)return e.preventDefault(),void t.expand(o.id);if(r&&o.$opened){var a=t.data.getItems(o.id);if(null==a?void 0:a.length)return e.preventDefault(),void(0,l.navigateToCell)(t,u,a[0].id,n.column.id)}}}(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:(0,l.getRangedIndex)(t,"right")})}}else(0,c.moveZoneFocus)(t,e,i,"right")},"ctrl+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0})},"shift+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowLeft:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if("body"===i){if("tree"===t.config.type&&!t.config.$editable){var n=(0,l.getActiveCell)(t,u);if(n&&((0,l.isTreeColumn)(t,n.column.id)||"row"===t.config.selection)){var o=n.row;if(t.data.haveItems(o.id)&&o.$opened)return e.preventDefault(),void t.collapse(o.id);var r=t.data.getParent(o.id);if(r&&r!==t.data.getRoot())return e.preventDefault(),void(0,l.navigateToCell)(t,u,r,n.column.id)}}(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:(0,l.getRangedIndex)(t,"left")})}}else(0,c.moveZoneFocus)(t,e,i,"left")},"ctrl+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0})},"shift+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0,shiftUp:!0})},pageDown:function(t){return f(t,1)},pageUp:function(t){return f(t,-1)},"shift+pageDown":function(t){return f(t,1,!0)},"shift+pageUp":function(t){return f(t,-1,!0)},home:function(t){return p(t,-1)},end:function(t){return p(t,1)},"shift+home":function(t){return p(t,-1,!0)},"shift+end":function(t){return p(t,1,!0)},"ctrl+home":function(t){return g(t,-1)},"ctrl+end":function(t){return g(t,1)},"ctrl+shift+home":function(t){return g(t,-1,!0)},"ctrl+shift+end":function(t){return g(t,1,!0)}}}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.navigateToCell=e.isTreeColumn=e.getNextVisibleRowId=e.walkVisibleRows=e.getActiveCell=e.getRangedIndex=e.applyRangeMove=e.move=void 0;var o=i(2),r=i(14),a=i(5);function l(t,e,i,n,o){var r,a="vertical"===n,l=a?e.id:i.yEnd,s=a?i.xEnd:e.id;if(t.scrollTo(l,s),o){var c=a?{yEnd:e.id,xEnd:i.xEnd}:{yEnd:i.yEnd,xEnd:e.id};t.range.setRange(c,!0)}else{c=a?{yStart:e.id,yEnd:e.id,xStart:i.xStart,xEnd:i.xStart}:{yStart:i.yStart,yEnd:i.yStart,xStart:e.id,xEnd:e.id};t.range.setRange(c)}null===(r=t.block)||void 0===r||r.restoreFocus()}e.move=function(t){var e=t.grid,i=t.event;if(!(e.config.$editable||(0,o.locateNodeByClassName)(i,"dhx_grid-header-cell")||(0,o.locateNodeByClassName)(i,"dhx_grid-footer-cell"))){i&&i.preventDefault();var r=e.config.columns.filter((function(t){return!t.hidden}));!function(t){var e=t.grid,i=t.columns,n=t.dir,o=t.rangedIndex,r=t.toEnd,l=t.shiftUp,s=e.selection.getCell(),c=e.config.multiselection&&l;if(!s)return;if("vertical"===n)if(r){var d=e.data.getItem(e.data.getId(0));if(1===o){var u=e.data.getId(e.data.getLength()-1);"tree"===e.config.type&&(u=(0,a.getLastChild)(u,e.data)),d=e.data.getItem(u)}e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c)}else{d=null;if("tree"===e.config.type){var h=o<0?(0,a.getClosestTop)(s.row.id,e.data):(0,a.getClosestBottom)(s.row.id,e.data);h&&(d=e.data.getItem(h))}else{(f=e.data.getIndex(s.row.id.toString()))+o>=0&&f+o<e.data.getLength()&&(d=e.data.getItem(e.data.getId(f+o)))}d&&(e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c))}else if(r){d=1===o?i[i.length-1]:i[0];e.scrollTo(s.row.id.toString(),d.id.toString()),e.selection.setCell(s.row.id,d.id,!1,c)}else{var f;(f=i.findIndex((function(t){return t.id==s.column.id})))+o>=0&&f+o<i.length&&(e.scrollTo(s.row.id.toString(),i[f+o].id.toString()),e.selection.setCell(s.row.id,i[f+o].id,!1,c))}}(n(n({},t),{columns:r})),function(t){var e,i=t.grid,o=t.dir,r=i,s=null===(e=r.range)||void 0===e?void 0:e.getRange();if(!s)return;var c="vertical"===o?function(t){var e=t.grid,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex,l=e,s=l.data,c=l.config;if(n){if(r>0){var d=s.getId(s.getLength()-1);return"tree"===c.type&&(d=(0,a.getLastChild)(d,s)),s.getItem(d)}return s.getItem(s.getId(0))}var u=r<0;if("tree"===c.type){var h=o?i.yEnd:u?i.yStart:i.yEnd,f=u?(0,a.getClosestTop)(h,s):(0,a.getClosestBottom)(h,s);return f?s.getItem(f):null}var p=s.getIndex(i.yStart),g=s.getIndex(i.yEnd),v=o?i.yEnd:s.getId(u?Math.min(p,g):Math.max(p,g)),_=s.getIndex(v)+r;if(_>=0&&_<s.getLength())return s.getItem(s.getId(_));return null}(n(n({},t),{rangedCell:s})):function(t){var e=t.columns,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex;if(n)return r>0?e[e.length-1]:e[0];var a=e.findIndex((function(t){return t.id===i.xStart})),l=e.findIndex((function(t){return t.id===i.xEnd})),s=r<0,c=(o?l:s?Math.min(a,l):Math.max(a,l))+r;if(c>=0&&c<e.length)return e[c];return null}(n(n({},t),{rangedCell:s}));c&&l(r,c,s,o,t.shiftUp)}(n(n({},t),{columns:r}))}},e.applyRangeMove=l,e.getRangedIndex=function(t,e){var i,n,o=t.selection.getCell(),r=o&&t.getSpan(o.row.id,o.column.id);if(r){if("up"===e||"down"===e){var a=null===(i=t.config.data)||void 0===i?void 0:i.findIndex((function(t){return t.id===r.row})),l=null===(n=t.config.data)||void 0===n?void 0:n.findIndex((function(t){return t.id===o.row.id}));return"up"===e?a-l-1:a+(r.rowspan||1)-l}var s=t.config.columns.filter((function(t){return!t.hidden}));a=s.findIndex((function(t){return t.id===r.column})),l=s.findIndex((function(t){return t.id===o.column.id}));return"left"===e?a-l-1:a+(r.colspan||1)-l}return"down"===e||"right"===e?1:-1},e.getActiveCell=function(t,e){var i;if(e||"row"===t.config.selection)return(0,r.normalizeCell)(t.selection.getCell(),t);var n=null===(i=t.range)||void 0===i?void 0:i.getRange();if((null==n?void 0:n.yEnd)&&(null==n?void 0:n.xEnd)){var o=t.data.getItem(n.yEnd),a=t.config.columns.find((function(t){return t.id===n.xEnd}));if(o&&a)return{row:o,column:a}}return null},e.walkVisibleRows=function(t,e,i){for(var n="tree"===t.config.type,o=i<0,r=Math.abs(i),l=e,s=0;s<r;s++){var c=void 0;if(n)c=o?(0,a.getClosestTop)(l,t.data):(0,a.getClosestBottom)(l,t.data);else{var d=t.data.getIndex(l),u=o?d-1:d+1;if(u<0||u>=t.data.getLength())break;c=t.data.getId(u)}if(!c)break;l=c}return l},e.getNextVisibleRowId=function(t,e,i){if("tree"===t.config.type)return i>0?(0,a.getClosestBottom)(e,t.data):(0,a.getClosestTop)(e,t.data);var n=t.data.getIndex(e)+i;return n>=0&&n<t.data.getLength()?t.data.getId(n):null},e.isTreeColumn=function(t,e){var i;return(null===(i=t.config.columns.filter((function(t){return!t.hidden}))[0])||void 0===i?void 0:i.id)==e},e.navigateToCell=function(t,e,i,n){var o;if(t.scrollTo(i.toString(),n.toString()),e||"row"===t.config.selection)t.selection.setCell(i,n);else{var r=t;r.range&&(r.range.setRange({yStart:i,yEnd:i,xStart:n,xEnd:n}),null===(o=r.block)||void 0===o||o.restoreFocus())}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.startCellEdit=e.toggleBooleanCell=e.isColumnEditable=void 0;var n=i(3);e.isColumnEditable=function(t,e){return!!(!1!==t.editable&&e.editable||t.editable)},e.toggleBooleanCell=function(t,e,i){t.events.fire(n.GridEvents.beforeEditStart,[e,i,"checkbox"])&&(t.events.fire(n.GridEvents.afterEditStart,[e,i,"checkbox"]),t.events.fire(n.GridEvents.beforeEditEnd,[!e[i.id],e,i])&&t.events.fire(n.GridEvents.afterEditEnd,[!e[i.id],e,i]))},e.startCellEdit=function(t,e){t.editCell(e.row.id,e.column.id,e.column.editorType)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initEndSentinel=e.initFocusSentinel=e.restoreZoneTabindex=e.getColIdFromTarget=e.getActiveColumnId=e.hasFooter=e.isAtLastRow=e.isAtFirstRow=e.transitionFromBodyToZone=e.transitionToBody=e.setZoneCellFocus=e.triggerHeaderSort=e.deactivateContentCell=e.activateContentCell=e.isContentCell=e.isAtFirstColumn=e.moveZoneFocusTab=e.moveZoneFocusVertical=e.moveZoneFocus=e.resolveSpanTarget=e.ensureZoneCellVisible=e.findZoneCell=e.getZoneRowCount=e.getColumnSplitSection=e.getVisibleColumns=e.detectFocusZone=void 0;var n=i(2),o=i(5),r=new WeakMap;function a(t){return t.config.columns.filter((function(t){return!t.hidden}))}function l(t,e){var i=a(t),n=i.find((function(t){return t.id===e}));if(!n)return"center";var o=n.$index,r=t.config.leftSplit||0,l=t.config.rightSplit||0;return r>0&&o<r?"left":l>0&&o>=i.length-l?"right":"center"}function s(t,e){var i,n;return"header"===e?(null===(i=t.config.$headerHeightMap)||void 0===i?void 0:i.length)||0:"footer"===e&&(null===(n=t.config.$footerHeightMap)||void 0===n?void 0:n.length)||0}function c(t,e,i,n){var o,r,a,s=(null===(o=t.getRootNode)||void 0===o?void 0:o.call(t))||(null===(a=null===(r=t.getRootView())||void 0===r?void 0:r.data)||void 0===a?void 0:a.getRootNode());if(!s)return null;for(var c=function(t,e,i){var n=[];if("left"===i){(o=t.querySelector(".dhx_".concat(e,"-fixed-cols.dhx_grid__cols_left--fixed")))&&n.push(o)}else if("right"===i){var o;(o=t.querySelector(".dhx_".concat(e,"-fixed-cols.dhx_grid__cols_right--fixed")))&&n.push(o)}else{var r=t.querySelector(".dhx_".concat(e,"-wrapper"));r&&n.push(r)}if(0===n.length){t.querySelectorAll(".dhx_".concat(e,"-wrapper, .dhx_").concat(e,"-fixed-cols")).forEach((function(t){return n.push(t)}))}return n}(s,e,l(t,i)),d=0,u=c;d<u.length;d++){var h=u[d],f=h.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));if(f)return f;var p=h.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'));if(p)return p}var g=s.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));return g||(s.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'))||null)}function d(t,e){var i,n,r;if("center"===l(t,e)){var s=a(t),c=t.config.leftSplit||0,d=s.findIndex((function(t){return t.id===e}));if(!(d<0)){var u=t.getScrollState(),h=(0,o.getTotalWidth)(s.slice(c,d)),f=h+(s[d].$width||0),p=null===(r=null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.refs)||void 0===n?void 0:n.grid_body)||void 0===r?void 0:r.el,g=p?p.clientWidth:t.config.$width,v=c>0?(0,o.getTotalWidth)(s.slice(0,c)):0,_=t.config.rightSplit||0,m=g-v-(_>0?(0,o.getTotalWidth)(s.slice(-_)):0),y=u.x;h<y?t.scroll(h,null):f>y+m&&t.scroll(f-m,null)}}}function u(t,e,i,n){var o,r="footer"===t?"footer":"header",a=n.findIndex((function(t){return t.id===e}));if(a<0)return{colId:e,rowIndex:i};for(var l=0;l<=i;l++)for(var s=0;s<=a;s++){var c=null===(o=n[s][r])||void 0===o?void 0:o[l];if(c){var d=s+(c.colspan||1),u=l+(c.rowspan||1);if(d>a&&u>i&&(l<i||s<a))return{colId:n[s].id,rowIndex:l}}}return{colId:e,rowIndex:i}}e.detectFocusZone=function(t){var e=t.target;if((0,n.locateNodeByClassName)(e,"dhx_grid-header-cell"))return"header";if((0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))return"footer";if((0,n.locateNodeByClassName)(e,"dhx_span-cell"))for(var i=e;i;){if(i.classList){if(i.classList.contains("dhx_header-spans"))return"header";if(i.classList.contains("dhx_footer-spans"))return"footer";if(i.classList.contains("dhx_span-spans"))return"body"}i=i.parentNode}return(0,n.locateNodeByClassName)(e,"dhx_grid-group_item")?"groupPanel":"body"},e.getVisibleColumns=a,e.getColumnSplitSection=l,e.getZoneRowCount=s,e.findZoneCell=c,e.ensureZoneCellVisible=d,e.resolveSpanTarget=u,e.moveZoneFocus=function(t,e,i,n){var o,l;e.preventDefault();var s=e.target,c=s.getAttribute("data-dhx-id"),d=parseInt(s.getAttribute("data-dhx-row-index")||"0",10);if(c){var h=r.get(t),f=null!==(o=null==h?void 0:h.navRowIndex)&&void 0!==o?o:d,g=a(t),v=g.findIndex((function(t){return t.id===c}));if(!(v<0)){var _="footer"===i?"footer":"header",m="right"===n?1:-1,y=v;if("right"===n){var b=null===(l=g[v][_])||void 0===l?void 0:l[d];(null==b?void 0:b.colspan)>1&&(y=v+b.colspan-1)}var x=y+m;if(!(x<0||x>=g.length)){var w=u(i,g[x].id,f,g);p(t,i,w.colId,w.rowIndex,s,f)}}}},e.moveZoneFocusVertical=function(t,e,i,n){var o;e.preventDefault();var r=e.target,l=r.getAttribute("data-dhx-id"),c=parseInt(r.getAttribute("data-dhx-row-index")||"0",10);if(!l)return!1;var d=a(t),h="footer"===i?"footer":"header",f="down"===n?1:-1,g=c;if("down"===n){var v=d.findIndex((function(t){return t.id===l}));if(v>=0){var _=null===(o=d[v][h])||void 0===o?void 0:o[c];(null==_?void 0:_.rowspan)>1&&(g=c+_.rowspan-1)}}var m=g+f,y=s(t,i);if(m<0||m>=y)return!1;var b=u(i,l,m,d);return p(t,i,b.colId,b.rowIndex,r,m),!0},e.moveZoneFocusTab=function(t,e,i,n){var o,l,c=e.target,d=c.getAttribute("data-dhx-id")?c:c.closest("[data-dhx-id]");if(!d)return"forward"===n?"exit-end":"exit-start";var h=d.getAttribute("data-dhx-id"),f=parseInt(d.getAttribute("data-dhx-row-index")||"0",10),g=a(t),v=g.findIndex((function(t){return t.id===h}));if(v<0)return"forward"===n?"exit-end":"exit-start";var _="footer"===i?"footer":"header",m=s(t,i),y="forward"===n?1:-1,b=r.get(t),x=null!==(o=null==b?void 0:b.navRowIndex)&&void 0!==o?o:f,w=v;if("forward"===n){var C=null===(l=g[v][_])||void 0===l?void 0:l[f];(null==C?void 0:C.colspan)>1&&(w=v+C.colspan-1)}for(var S=w+y,E=x,D=g.length*m,O=0;O<D;O++){if("forward"===n&&S>=g.length){if(++E>=m)return"exit-end";S=0}else if("backward"===n&&S<0){if(--E<0)return"exit-start";S=g.length-1}var k=u(i,g[S].id,E,g);if(k.colId!==h||k.rowIndex!==f){if(p(t,i,k.colId,k.rowIndex,c,E))return e.preventDefault(),"moved";S+=y}else S+=y}return"forward"===n?"exit-end":"exit-start"},e.isAtFirstColumn=function(t){var e,i,n=a(t);if(0===n.length)return!0;var o=n[0].id;if(t.config.blockSelection){var r=null===(e=t.range)||void 0===e?void 0:e.getRange();if(r)return r.xStart==o}else{var l=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(l)return l.column.id==o}return!0},e.isContentCell=function(t){return t.classList.contains("dhx_grid-custom-content-cell")};var h=new WeakMap;function f(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","-1");var i=h.get(e);i&&(e.removeEventListener("keydown",i),h.delete(e))}t.setAttribute("tabindex","0"),t.focus()}function p(t,e,i,n,o,a){o&&o.setAttribute("tabindex","-1"),d(t,i);var l=c(t,e,i,n);if(!l)return!1;l.setAttribute("tabindex","0"),l.focus();var s=r.get(t);return s&&(s.colId=i,s.rowIndex=n,s.navRowIndex=null!=a?a:n),!0}e.activateContentCell=function(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","0"),e.focus();var i=h.get(e);i&&e.removeEventListener("keydown",i);var n=function(i){"Escape"===i.key&&(i.preventDefault(),e.removeEventListener("keydown",n),h.delete(e),f(t))};e.addEventListener("keydown",n),h.set(e,n)}},e.deactivateContentCell=f,e.triggerHeaderSort=function(t,e,i){var n,r,a=e.target,l=a.getAttribute("data-dhx-id"),s=parseInt(a.getAttribute("data-dhx-row-index")||"0",10);if(l){var c=t.getColumn(l);if(c&&(0,o.isSortable)(t.config,c)){var d=a.getAttribute("data-dhx-text-id"),u=null===(n=c.header)||void 0===n?void 0:n.find((function(t){return t.id===d}));if(!((null==u?void 0:u.content)||(null==u?void 0:u.colspan)>1)){e.preventDefault();var h=t.config.multiSort&&(!i||i&&!(null===(r=t._sortingStates)||void 0===r?void 0:r.length));t._sort(l,null==u?void 0:u.sortAs,h),p(t,"header",l,s)}}}},e.setZoneCellFocus=p,e.transitionToBody=function(t,e,i){var n;0!==t.data.getLength()&&("first"===i?n=t.data.getId(0):(n=t.data.getId(t.data.getLength()-1),"tree"===t.config.type&&(n=(0,o.getLastChild)(n,t.data)||n)),t.config.blockSelection&&t.range?(t.range.setRange({xStart:e,yStart:n,xEnd:e,yEnd:n}),t.scrollTo(n,e),t.block.restoreFocus()):t.selection&&(t.selection.setCell(n,e),t.scrollTo(n,e),t.selection.restoreFocus()),function(t){var e,i,n,o=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(!o)return!1;var r=document.activeElement;return r&&o.contains(r)&&!!r.getAttribute("data-dhx-col-id")}(t)||function(t,e,i){var n,o,r,a=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||(null===(r=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===r?void 0:r.getRootNode());if(a){var l=a.querySelector('[data-dhx-id="'.concat(e,'"] [data-dhx-col-id="').concat(i,'"]'));l&&(l.tabIndex=0,l.focus({preventScroll:!0}))}}(t,n,e))},e.transitionFromBodyToZone=function(t,e,i,n){var o=a(t);if(0!==o.length){void 0===n&&(n=s(t,e)-1);var r=u(e,i,n,o);p(t,e,r.colId,r.rowIndex,void 0,n)}},e.isAtFirstRow=function(t){var e,i;if(t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.yStart==t.data.getId(0)}else{var o=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(o)return o.row.id==t.data.getId(0)}return!0},e.isAtLastRow=function(t){var e,i;if(0===t.data.getLength())return!0;var n=t.data.getId(t.data.getLength()-1);if("tree"===t.config.type&&(n=(0,o.getLastChild)(n,t.data)||n),t.config.blockSelection){var r=null===(e=t.range)||void 0===e?void 0:e.getRange();if(r)return r.yEnd==n}else{var a=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(a)return a.row.id==n}return!0},e.hasFooter=function(t){return s(t,"footer")>0},e.getActiveColumnId=function(t){var e,i;if(t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.xStart}else{var o=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(o)return o.column.id}return null},e.getColIdFromTarget=function(t){return(null==t?void 0:t.getAttribute("data-dhx-id"))||null},e.restoreZoneTabindex=function(t,e){var i,n,o,r=(null===(i=t.getRootNode)||void 0===i?void 0:i.call(t))||(null===(o=null===(n=t.getRootView())||void 0===n?void 0:n.data)||void 0===o?void 0:o.getRootNode());if(r){var a=".dhx_grid-".concat(e,"-cell[tabindex], .dhx_").concat(e,"-spans .dhx_span-cell[tabindex]");r.querySelectorAll(a).forEach((function(t){t.setAttribute("tabindex","-1")}));r.querySelectorAll(".dhx_grid-custom-content-cell input, .dhx_grid-custom-content-cell select").forEach((function(t){t.setAttribute("tabindex","-1")}))}},e.initFocusSentinel=function(t){var e,i,n,o=r.get(t);if(!(null==o?void 0:o.initialized)){var l=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(l){var c=l.querySelector(".dhx_grid-focus-sentinel");c&&(o||(o={colId:null,rowIndex:null,navRowIndex:null,initialized:!1},r.set(t,o)),c.addEventListener("focus",(function(){var e=a(t);if(0!==e.length){var i=s(t,"header");if(0!==i){var n=o.colId,r=o.rowIndex;null!==n&&null!==r||(n=e[0].id,r=0),e.some((function(t){return t.id===n}))||(n=e[0].id,r=0),r>=i&&(r=0),p(t,"header",n,r)}}})),o.initialized=!0)}}},e.initEndSentinel=function(t){var e,i,n,o=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(o){var r=o.querySelector(".dhx_grid-focus-sentinel--end");r&&!r.getAttribute("data-dhx-initialized")&&(r.addEventListener("focus",(function(){var e=a(t);if(0!==e.length){var i=s(t,"footer");if(i>0){var n=e[e.length-1].id;p(t,"footer",n,i-1)}else{s(t,"header")>0&&p(t,"header",e[0].id,0)}}})),r.setAttribute("data-dhx-initialized","true"))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropManager=void 0;var n=i(1),o=i(3),r=i(8),a=i(7),l=i(5),s=i(0),c=i(4),d=i(5),u=i(2),h=function(){function t(t){var e=t.view;this._isTreeMode=!1,this._grid=null,this._dragState=null,this._dragType=null,this._grid=e,this._isTreeMode="tree"===this._grid.config.type,this._init()}return t.prototype.toHTML=function(t){var e,i,o=(null===(e=this._grid.config.$grouped)||void 0===e?void 0:e.length)&&this._grid.config.$grouped.some((function(t){return t.notGrouped})),r=(0,s.isDefined)(null===(i=this._dragState)||void 0===i?void 0:i.target)&&!this._grid.config.$resizing&&!o;return(0,n.el)(".dhx_grid-drop",{"aria-hidden":"true"},[r&&this._getDropLineNode(t)])},t.prototype._getDropLineNode=function(t){return!this._dragType||(null==t?void 0:t.header)&&"horizontal"===this._dragType?null:"horizontal"===this._dragType?this._getHorizontalDropLine():this._getVerticalDropLine(t)},t.prototype._getVerticalDropLine=function(t){var e=this,i=void 0===t?{}:t,r=i.header,d=void 0!==r&&r,u=i.mode,h=void 0===u?null:u,f=this._grid.config.columns.filter((function(t){return!t.hidden})),p=f.findIndex((function(t){return t.id==e._dragState.target})),g=f[p];if(!(0,s.isDefined)(g))return null;var v,_,m=this._grid.config,y=m.leftSplit,b=m.rightSplit,x=f.findIndex((function(t){return t.id==e._dragState.start})),w=this._grid.getScrollState(),C=d?this._grid.config.$headerHeight:this._grid.config.$height,S=a.BORDERS,E=d?0:w.y;if(y&&(v=this._isColumnFixed(g,o.Split.left)),b&&(_=this._isColumnFixed(g,o.Split.right)),v&&h===o.Split.right||_&&h===o.Split.left||h&&!_&&!v)return null;var D=0;if(x===p||-1==p)return null;if(D=(0,l.getTotalWidth)(f.slice(0,p+1)),x>p&&(D-=g.$width),f.length-(!_&&b||0)===p+1&&(D-=a.BORDERS),v&&!h&&(D+=w.x),_)if(h){var O=(0,a.getCurrFixedCols)(this._grid.config,o.Split.right),k=O.findIndex((function(t){return t.id==e._dragState.target})),R=O.findIndex((function(t){return t.id==e._dragState.start}));D=(0,l.getTotalWidth)(O.slice(0,k+1)),R>k&&(D-=g.$width),O.length===k+1&&(D-=a.BORDERS)}else D-=(0,c.getReverseScrollState)(this._grid).x;return(0,n.el)(".dhx_grid-drop-line",{style:{height:C,width:S,top:E,left:D}})},t.prototype._getHorizontalDropLine=function(){var t=this._grid.data.getItem(this._dragState.target);if(!(0,s.isDefined)(t)||this._dragState.source.find((function(e){return e==t.id})))return null;var e,i,o=this._grid.config,r=o.topSplit,l=o.bottomSplit,d=this._grid.config.$width,u="in"===this._dragState.dropPosition?t.$height:a.BORDERS,h=this._grid.getScrollState(),f=a.BORDERS/2;r&&(e=this._grid.data.getRawData(0,r).map((function(t){return t.id})).includes(t.id));if(l){var p=this._grid.data.getLength();i=this._grid.data.getRawData(p-l,p).map((function(t){return t.id})).includes(t.id)}var g=this._getTopPosition(t);"bottom"===this._dragState.dropPosition&&(g=this._getBottomPosition(t),t.$index===this._grid.data._order.length-1&&(g-=f)),"in"!==this._dragState.dropPosition&&(g-=f,"top"===this._dragState.dropPosition&&0===t.$index&&(g+=f)),e&&(g+=h.y),i&&(g-=(0,c.getReverseScrollState)(this._grid).y);var v=t.$level&&"in"!==this._dragState.dropPosition?(0,c.getTreeCellWidthOffset)(t,t.$items):0;return(0,n.el)(".dhx_grid-drop-line",{style:{marginLeft:v,height:u,width:d,left:h.x,top:g}})},t.prototype._init=function(){var t=this;this._grid.events.on(r.DragEvents.dragStart,(function(e,i,n){"group"!==n&&"row"===n&&t._toggleRowDraggable(e.source,!0)})),this._grid.events.on(r.DragEvents.dragIn,(function(e,i,n){"group"===n||t._isSameComponent(i)||(t._dragState=e,t._dragType="row"===n?"horizontal":"vertical")})),this._grid.events.on(r.DragEvents.cancelDrop,(function(e,i,n){"group"!==n&&(t._dragState=t._dragType=null)})),this._grid.events.on(r.DragEvents.afterDrag,(function(e,i,n){t._dragState=t._dragType=null,"group"!==n&&"row"===n&&t._toggleRowDraggable(e.source,!1)}))},t.prototype._getNextRow=function(t){var e=this._grid.data.getIndex(t.id)+1,i=this._grid.data.getItem(this._grid.data.getId(e));return i||(i=this._grid.data.getItem((0,d.getLastChild)(t.id,this._grid.data,!0))),i},t.prototype._isColumnFixed=function(t,e){var i=(0,a.getCurrFixedCols)(this._grid.config,e),n=null==i?void 0:i.map((function(t){return t.id}));return null==n?void 0:n.includes(t.id)},t.prototype._getTopPosition=function(t){return this._grid.getCellRect(t.id).y},t.prototype._getBottomPosition=function(t){if(this._isTreeMode&&t.$items){var e=this._getNextRow(t);if(!(0,s.isDefined)(e))return 0;var i=this._getTopPosition(e);return e.$level&&(i+=e.$height-a.BORDERS/2),i}return this._getTopPosition(t)+t.$height},t.prototype._toggleRowDraggable=function(t,e){var i=this;t.forEach((function(t){i._grid.data.update(t,{$draggable:e},!0),i._isTreeMode&&i._grid.data.haveItems(t)&&i._grid.data.eachChild(t,(function(t){i._grid.data.update(t.id,{$draggable:e},!0)}))}))},t.prototype._isSameComponent=function(t){return(0,u.locate)(t.target,"data-dhx-widget-id")!=this._grid._uid},t}();e.DropManager=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisibleRowNode=e.getRowNode=void 0,e.getRowNode=function(t,e,i){var n=i?".dhx_grid__cols_".concat(i,"--fixed"):":not(.dhx_grid-fixed-cols-wrap)";return e.querySelector("".concat(n,' .dhx_grid-row[data-dhx-id="').concat(t,'"]'))},e.getVisibleRowNode=function(t,e,i){var n=document.createElement("div");return n.style.width=e+"px",n.style.overflow="hidden",t.style.width=e-i+"px",t.style.marginLeft=i+"px",n.appendChild(t),n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLocale=void 0,e.setLocale=function(t,e){var i=this[t];if(i)for(var n in e)i[n]=e[n]}}])})),window.dhx_legacy){if(window.dhx)for(var key in dhx)if("i18n"===key)for(var lang in dhx[key])window.dhx_legacy[key][lang]=dhx[key][lang];else dhx_legacy[key]=dhx[key];window.dhx=dhx_legacy,delete window.dhx_legacy}
21
+ t.exports=function(){"use strict";var t=1,e=2,i=3,n=4,o=5,r="undefined"!=typeof window,a=(r?window:{}).requestAnimationFrame,l={};function s(){}var c=Array.isArray;function d(t){return null!=t}function u(t){return null!=t&&t.constructor===Object}function h(t,e,i,n){t.splice.apply(t,[i,n].concat(e))}function f(t){var e=typeof t;return"string"===e||"number"===e}function p(t){return"function"==typeof t}function g(t){return"object"==typeof t&&p(t.then)}function v(t){for(var e=arguments,i=1;i<e.length;i++)for(var n in e[i])t[n]=e[i][n];return t}function _(t,e,i){for(var n;n=e.shift();)0===e.length?t[n]=i:t[n]=t=t[n]||{}}function m(t,e){for(var i=[],n=e;n<t.length;n++)i.push(t[n]);return i}function y(t,e){for(var i in t)if(t[i]!==e[i])return!1;return!0}function b(t,e){var i=t.length;if(e.length!==i)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function x(t){if(!a)return t;var e,i,n;function o(){e=0,t.apply(i,n)}return function(){i=this,n=arguments,e||(e=a(o))}}function w(t,e,i){return function(){return t.apply(i,e)}}function C(t){var e,i,n=t.slice(),o=[];o.push(0);for(var r=0,a=t.length;r<a;++r){var l=o[o.length-1];if(t[l]<t[r])n[r]=l,o.push(r);else{for(e=0,i=o.length-1;e<i;){var s=(e+i)/2|0;t[o[s]]<t[r]?e=s+1:i=s}t[r]<t[o[e]]&&(e>0&&(n[r]=o[e-1]),o[e]=r)}}for(i=o[(e=o.length)-1];e-- >0;)o[e]=i,i=n[i];return o}function S(t,e){var i,n=0,o=e.length-1;if(o<=2147483647)for(;n<=o;){if(e[i=n+o>>1]===t)return i;e[i]<t?n=i+1:o=i-1}else for(;n<=o;){if(e[i=Math.floor((n+o)/2)]===t)return i;e[i]<t?n=i+1:o=i-1}return n==e.length?null:n}function E(t){return"o"===t[0]&&"n"===t[1]}function D(t){return"_"===t[0]}function O(t){return"style"===t}function k(t){t&&t.el&&t.el.offsetHeight}function R(t){return null!=t.node&&null!=t.node.el}function T(t,e){switch(e){case"value":case"checked":case"selected":return!0}return!1}function M(t){for(t=t||l;null==t.vm&&t.parent;)t=t.parent;return t.vm}function I(){}var H=I.prototype={constructor:I,type:null,vm:null,key:null,ref:null,data:null,hooks:null,ns:null,el:null,tag:null,attrs:null,body:null,flags:0,_class:null,_diff:null,_dead:!1,_lis:!1,idx:null,parent:null};function P(t){var i=new I;return i.type=e,i.body=t,i}var F={},A=/\[(\w+)(?:=(\w+))?\]/g;function $(t){var e,i,n,o,r=F[t];if(null==r)for(F[t]=r={tag:(e=t.match(/^[-\w]+/))?e[0]:"div",id:(i=t.match(/#([-\w]+)/))?i[1]:null,class:(n=t.match(/\.([-\w.]+)/))?n[1].replace(/\./g," "):null,attrs:null};o=A.exec(t);)null==r.attrs&&(r.attrs={}),r.attrs[o[1]]=o[2]||"";return r}var j=1,L=2,N=4,V=8;function W(e,i,n,o){var r=new I;r.type=t,d(o)&&(r.flags=o),r.attrs=i;var a=$(e);if(r.tag=a.tag,a.id||a.class||a.attrs){var l=r.attrs||{};if(a.id&&!d(l.id)&&(l.id=a.id),a.class&&(r._class=a.class,l.class=a.class+(d(l.class)?" "+l.class:"")),a.attrs)for(var s in a.attrs)d(l[s])||(l[s]=a.attrs[s]);r.attrs=l}var c=r.attrs;return d(c)&&(d(c._key)&&(r.key=c._key),d(c._ref)&&(r.ref=c._ref),d(c._hooks)&&(r.hooks=c._hooks),d(c._data)&&(r.data=c._data),d(c._flags)&&(r.flags=c._flags),d(r.key)||(d(r.ref)?r.key=r.ref:d(c.id)?r.key=c.id:d(c.name)&&(r.key=c.name+("radio"===c.type||"checkbox"===c.type?c.value:"")))),null!=n&&(r.body=n),r}function z(t,e,i){_(t,["refs"].concat(e.split(".")),i)}function B(t){for(;t=t.parent;)t.flags|=j}function G(t,e,i,r){if(t.type!==o&&t.type!==n){t.parent=e,t.idx=i,t.vm=r,null!=t.ref&&z(M(t),t.ref,t);var a=t.hooks,l=r&&r.hooks;(a&&(a.willRemove||a.didRemove)||l&&(l.willUnmount||l.didUnmount))&&B(t),c(t.body)&&Y(t)}}function Y(t){for(var i=t.body,n=0;n<i.length;n++){var o=i[n];!1===o||null==o?i.splice(n--,1):c(o)?h(i,o,n--,1):(null==o.type&&(i[n]=o=P(""+o)),o.type===e?null==o.body||""===o.body?i.splice(n--,1):n>0&&i[n-1].type===e?(i[n-1].body+=o.body,i.splice(n--,1)):G(o,t,n,null):G(o,t,n,null))}}var U={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,order:!0,lineClamp:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function X(t,e){return isNaN(e)||U[t]?e:e+"px"}function q(t,e){var i=(t.attrs||l).style,n=e?(e.attrs||l).style:null;if(null==i||f(i))t.el.style.cssText=i;else{for(var o in i){var r=i[o];(null==n||null!=r&&r!==n[o])&&(t.el.style[o]=X(o,r))}if(n)for(var a in n)null==i[a]&&(t.el.style[a]="")}}var K=[];function Z(t,e,i,n,o){if(null!=t){var r=i.hooks[e];if(r){if("d"!==e[0]||"i"!==e[1]||"d"!==e[2])return r(i,n);o?k(i.parent)&&r(i,n):K.push([r,i,n])}}}function J(t){var e;if(K.length)for(k(t.node);e=K.shift();)e[0](e[1],e[2])}var Q=r?document:null;function tt(t){for(;null==t._node;)t=t.parentNode;return t._node}function et(t,e){return null!=e?Q.createElementNS(e,t):Q.createElement(t)}function it(t){return Q.createTextNode(t)}function nt(t){return Q.createComment(t)}function ot(t){return t.nextSibling}function rt(t){return t.previousSibling}function at(t){var e=t.vm,i=null!=e&&Z(e.hooks,"willUnmount",e,e.data),n=Z(t.hooks,"willRemove",t);if((t.flags&j)===j&&c(t.body))for(var o=0;o<t.body.length;o++)at(t.body[o]);return i||n}function lt(t,e,i){var n=e._node,o=n.vm;if(c(n.body))if((n.flags&j)===j)for(var r=0;r<n.body.length;r++)lt(e,n.body[r].el);else ct(n);delete e._node,t.removeChild(e),Z(n.hooks,"didRemove",n,null,i),null!=o&&(Z(o.hooks,"didUnmount",o,o.data,i),o.node=null)}function st(t,e){var i=e._node;if(!i._dead){var n=at(i);null!=n&&g(n)?(i._dead=!0,n.then(w(lt,[t,e,!0]))):lt(t,e)}}function ct(t){for(var e=t.body,i=0;i<e.length;i++){var n=e[i];delete n.el._node,null!=n.vm&&(n.vm.node=null),c(n.body)&&ct(n)}}function dt(t){var e=t.el;if(0==(t.flags&j))c(t.body)&&ct(t),e.textContent=null;else{var i=e.firstChild;do{var n=ot(i);st(e,i)}while(i=n)}}function ut(t,e,i){var n=e._node,o=null!=e.parentNode,r=e!==i&&o?null:n.vm;null!=r&&Z(r.hooks,"willMount",r,r.data),Z(n.hooks,o?"willReinsert":"willInsert",n),t.insertBefore(e,i),Z(n.hooks,o?"didReinsert":"didInsert",n),null!=r&&Z(r.hooks,"didMount",r,r.data)}function ht(t,e,i){ut(t,e,i?ot(i):null)}var ft={};function pt(t){v(ft,t)}function gt(t){var e=this,i=e,n=m(arguments,1).concat(i,i.data);do{var o=e.onemit,r=o?o[t]:null;if(r){r.apply(e,n);break}}while(e=e.parent());ft[t]&&ft[t].apply(e,n)}var vt=s;function _t(t){vt=t.onevent||vt,t.onemit&&pt(t.onemit)}function mt(t,e,i){t[e]=i}function yt(t,e,i,n,o){var r=t.apply(o,e.concat([i,n,o,o.data]));o.onevent(i,n,o,o.data,e),vt.call(null,i,n,o,o.data,e),!1===r&&(i.preventDefault(),i.stopPropagation())}function bt(t){var e,i,n=tt(t.target),o=M(n),r=t.currentTarget._node.attrs["on"+t.type];if(c(r))yt(e=r[0],i=r.slice(1),t,n,o);else for(var a in r)if(t.target.matches(a)){var l=r[a];c(l)?(e=l[0],i=l.slice(1)):(e=l,i=[]),yt(e,i,t,n,o)}}function xt(t,e,i,n){if(i!==n){var o=t.el;null==i||p(i)?mt(o,e,i):null==n&&mt(o,e,bt)}}function wt(t,e,i){"."===e[0]&&(e=e.substr(1),i=!0),i?t.el[e]="":t.el.removeAttribute(e)}function Ct(t,e,i,n,o){var r=t.el;null==i?!o&&wt(t,e,!1):null!=t.ns?r.setAttribute(e,i):"class"===e?r.className=i:"id"===e||"boolean"==typeof i||n?r[e]=i:"."===e[0]?r[e.substr(1)]=i:r.setAttribute(e,i)}function St(t,e,i){var n=t.attrs||l,o=e.attrs||l;if(n===o);else{for(var r in n){var a=n[r],s=T(t.tag,r),c=s?t.el[r]:o[r];a===c||(O(r)?q(t,e):D(r)||(E(r)?xt(t,r,a,c):Ct(t,r,a,s,i)))}for(var r in o)!(r in n)&&!D(r)&&wt(t,r,T(t.tag,r)||E(r))}}function Et(t,e,i,o){return t.type===n&&(e=t.data,i=t.key,o=t.opts,t=t.view),new Gt(t,e,i,o)}function Dt(t){for(var e=0;e<t.body.length;e++){var r=t.body[e],a=r.type;if(a<=i)ut(t.el,Ot(r));else if(a===n)a=(l=Et(r.view,r.data,r.key,r.opts)._redraw(t,e,!1)).node.type,ut(t.el,Ot(l.node));else if(a===o){var l;(l=r.vm)._redraw(t,e),a=l.node.type,ut(t.el,l.node.el)}}}function Ot(n,o){return null==n.el&&(n.type===t?(n.el=o||et(n.tag,n.ns),null!=n.attrs&&St(n,l,!0),(n.flags&V)===V&&n.body.body(n),c(n.body)?Dt(n):null!=n.body&&""!==n.body&&(n.el.textContent=n.body)):n.type===e?n.el=o||it(n.body):n.type===i&&(n.el=o||nt(n.body))),n.el._node=n,n.el}function kt(t,e){return e[t.idx+1]}function Rt(t,e){return e[t.idx-1]}function Tt(t){return t.parent}window.lisMove=Pt;var Mt=1,It=2;function Ht(t,e,i,n,o,r,a,l){return function(s,c,d,u,h,f){var p,g;if(null!=u[n]){if(null==(p=u[n]._node))return void(u[n]=t(u[n]));if(Tt(p)!==s)return g=t(u[n]),null!=p.vm?p.vm.unmount(!0):st(c,u[n]),void(u[n]=g)}if(u[o]==h)return It;if(null==u[o].el)i(c,Ot(u[o]),u[n]),u[o]=e(u[o],d);else if(u[o].el===u[n])u[o]=e(u[o],d),u[n]=t(u[n]);else{if(f||p!==u[a])return f&&null!=u[n]?Pt(t,e,i,n,o,c,d,p,u):Mt;g=u[n],u[n]=t(g),l(c,g,u[r]),u[r]=g}}}function Pt(t,e,i,n,o,r,a,l,s){if(l._lis)i(r,s[o].el,s[n]),s[o]=e(s[o],a);else{var c=S(l.idx,s.tombs);l._lis=!0;var d=t(s[n]);i(r,s[n],null!=c?a[s.tombs[c]].el:c),null==c?s.tombs.push(l.idx):s.tombs.splice(c,0,l.idx),s[n]=d}}var Ft=Ht(ot,kt,ut,"lftSib","lftNode","rgtSib","rgtNode",ht),At=Ht(rt,Rt,ht,"rgtSib","rgtNode","lftSib","lftNode",ut);function $t(t,e){var i=e.body,n=t.el,o=t.body,r={lftNode:o[0],rgtNode:o[o.length-1],lftSib:(i[0]||l).el,rgtSib:(i[i.length-1]||l).el};t:for(;;){for(;;){var a=Ft(t,n,o,r,null,!1);if(a===Mt)break;if(a===It)break t}for(;;){var s=At(t,n,o,r,r.lftNode,!1);if(s===Mt)break;if(s===It)break t}jt(t,n,o,r);break}}function jt(t,e,i,n){for(var o=Array.prototype.slice.call(e.childNodes),r=[],a=0;a<o.length;a++){var l=o[a]._node;l.parent===t&&r.push(l.idx)}for(var s=C(r).map((function(t){return r[t]})),c=0;c<s.length;c++)i[s[c]]._lis=!0;for(n.tombs=s;Ft(t,e,i,n,null,!0)!==It;);}function Lt(t){return t.el._node.parent!==t.parent}function Nt(t,e,i){return e[i]}function Vt(t,e,i){for(;i<e.length;i++){var r=e[i];if(null!=r.vm){if(t.type===n&&r.vm.view===t.view&&r.vm.key===t.key||t.type===o&&r.vm===t.vm)return r}else if(!Lt(r)&&t.tag===r.tag&&t.type===r.type&&t.key===r.key&&(t.flags&~j)==(r.flags&~j))return r}return null}function Wt(t,e,i){return e[e._keys[t.key]]}function zt(t,i){Z(i.hooks,"willRecycle",i,t);var n=t.el=i.el,o=i.body,r=t.body;if(n._node=t,t.type!==e||r===o){null==t.attrs&&null==i.attrs||St(t,i,!1);var a=c(o),l=c(r),s=(t.flags&V)===V;a?l||s?Bt(t,i):r!==o&&(null!=r?n.textContent=r:dt(i)):l?(dt(i),Dt(t)):r!==o&&(n.firstChild?n.firstChild.nodeValue=r:n.textContent=r),Z(i.hooks,"didRecycle",i,t)}else n.nodeValue=r}function Bt(e,r){var a=e.body,l=a.length,s=r.body,c=s.length,d=(e.flags&V)===V,u=(e.flags&L)===L,h=(e.flags&N)===N,f=!u&&e.type===t,p=!0,g=h?Wt:u||d?Nt:Vt;if(h){for(var v={},_=0;_<s.length;_++)v[s[_].key]=_;s._keys=v}if(f&&0===l)return dt(r),void(d&&(e.body=[]));var m,y,b=0,x=!1,w=0;if(d)var C={key:null},S=Array(l);for(_=0;_<l;_++){if(d){var E=!1,D=null;p&&(h&&(C.key=a.key(_)),m=g(C,s,w)),null!=m?(y=m.idx,!0===(D=a.diff(_,m))?((O=m).parent=e,O.idx=_,O._lis=!1):E=!0):E=!0,E&&(G(O=a.tpl(_),e,_),O._diff=null!=D?D:a.diff(_),null!=m&&zt(O,m)),S[_]=O}else{var O,k=(O=a[_]).type;if(k<=i)(m=p&&g(O,s,w))&&(zt(O,m),y=m.idx);else if(k===n){if(m=p&&g(O,s,w)){y=m.idx;var T=m.vm._update(O.data,e,_)}else T=Et(O.view,O.data,O.key,O.opts)._redraw(e,_,!1);k=T.node.type}else if(k===o){var M=R(O.vm);k=(T=O.vm._update(O.data,e,_,M)).node.type}}if(!h&&null!=m&&(y===w?++w===c&&l>c&&(m=null,p=!1):x=!0,c>100&&x&&++b%10==0))for(;w<c&&Lt(s[w]);)w++}d&&(e.body=S),f&&$t(e,r)}function Gt(t,e,i,n){var o=this;o.view=t,o.data=e,o.key=i,n&&(o.opts=n,o.config(n));var r=u(t)?t:t.call(o,o,e,i,n);p(r)?o.render=r:(o.render=r.render,o.config(r)),o._redrawAsync=x((function(t){return o.redraw(!0)})),o._updateAsync=x((function(t){return o.update(t,!0)})),o.init&&o.init.call(o,o,o.data,o.key,n)}var Yt=Gt.prototype={constructor:Gt,_diff:null,init:null,view:null,key:null,data:null,state:null,api:null,opts:null,node:null,hooks:null,onevent:s,refs:null,render:null,mount:Ut,unmount:Xt,config:function(t){var e=this;t.init&&(e.init=t.init),t.diff&&(e.diff=t.diff),t.onevent&&(e.onevent=t.onevent),t.hooks&&(e.hooks=v(e.hooks||{},t.hooks)),t.onemit&&(e.onemit=v(e.onemit||{},t.onemit))},parent:function(){return M(this.node.parent)},root:function(){for(var t=this.node;t.parent;)t=t.parent;return t.vm},redraw:function(t){var e=this;return t?e._redraw(null,null,R(e)):e._redrawAsync(),e},update:function(t,e){var i=this;return e?i._update(t,null,null,R(i)):i._updateAsync(t),i},_update:Zt,_redraw:Kt,_redrawAsync:null,_updateAsync:null};function Ut(t,e){var i=this;return e?(dt({el:t,flags:0}),i._redraw(null,null,!1),t.nodeName.toLowerCase()!==i.node.tag?(Ot(i.node),ut(t.parentNode,i.node.el,t),t.parentNode.removeChild(t)):ut(t.parentNode,Ot(i.node,t),t)):(i._redraw(null,null),t&&ut(t,i.node.el)),t&&J(i),i}function Xt(t){var e=this,i=e.node;st(i.el.parentNode,i.el),t||J(e)}function qt(t,e,i,n){return null!=i&&(i.body[n]=e,e.idx=n,e.parent=i,e._lis=!1),t}function Kt(t,e,i){var n,o,r=null==t,a=this,l=a.node&&a.node.el&&a.node.el.parentNode,s=a.node;if(null!=a.diff&&(n=a._diff,a._diff=o=a.diff(a,a.data),null!=s)){var d=c(n)?b:y;if(n===o||d(n,o))return qt(a,s,t,e)}l&&Z(a.hooks,"willRedraw",a,a.data);var u=a.render.call(a,a,a.data,n,o);if(u===s)return qt(a,s,t,e);if(a.refs=null,null!=a.key&&u.key!==a.key&&(u.key=a.key),a.node=u,t?(G(u,t,e,a),t.body[e]=u):s&&s.parent?(G(u,s.parent,s.idx,a),s.parent.body[s.idx]=u):G(u,null,null,a),!1!==i)if(s)if(s.tag!==u.tag||s.key!==u.key){s.vm=u.vm=null;var h=s.el.parentNode,f=ot(s.el);st(h,s.el),ut(h,Ot(u),f),s.el=u.el,u.vm=a}else zt(u,s);else Ot(u);return l&&Z(a.hooks,"didRedraw",a,a.data),r&&l&&J(a),a}function Zt(t,e,i,n){var o=this;return null!=t&&o.data!==t&&(Z(o.hooks,"willUpdate",o,t),o.data=t),o._redraw(e,i,n)}function Jt(t,e,i,n){var o,r;return null==i?u(e)?o=e:r=e:(o=e,r=i),W(t,o,r,n)}var Qt="http://www.w3.org/2000/svg";function te(t,e,i,n){var o=Jt(t,e,i,n);return o.ns=Qt,o}function ee(t){var e=new I;return e.type=i,e.body=t,e}function ie(t,e,i,n){this.view=t,this.data=e,this.key=i,this.opts=n}function ne(t,e,i,n){return new ie(t,e,i,n)}function oe(t){this.vm=t}function re(t){return new oe(t)}function ae(e){var i=new I;return i.type=t,i.el=i.key=e,i}function le(t,e){var i=t.length,n={items:t,length:i,key:function(i){return e.key(t[i],i)},diff:function(i,n){var o=e.diff(t[i],i);if(null==n)return o;var r=n._diff;return(o===r||c(r)?b(o,r):y(o,r))||o},tpl:function(i){return e.tpl(t[i],i)},map:function(t){return e.tpl=t,n},body:function(t){for(var e=Array(i),o=0;o<i;o++){var r=n.tpl(o);r._diff=n.diff(o),e[o]=r,G(r,t,o)}t.body=e}};return n}ie.prototype={constructor:ie,type:n,view:null,data:null,key:null,opts:null},oe.prototype={constructor:oe,type:o,vm:null};var se={config:_t,ViewModel:Gt,VNode:I,createView:Et,defineElement:Jt,defineSvgElement:te,defineText:P,defineComment:ee,defineView:ne,injectView:re,injectElement:ae,lazyList:le,FIXED_BODY:L,DEEP_REMOVE:j,KEYED_LIST:N,LAZY_LIST:V};function ce(t,e){de(this,t,e)}function de(t,e,i){if(null!=e.type){if(null!=t.vm)return;G(e,t.parent,t.idx,null),t.parent.body[t.idx]=e,zt(e,t),i&&k(e),J(M(e))}else{var n=Object.create(t);n.attrs=v({},t.attrs);var o=v(t.attrs,e);if(null!=t._class){var r=o.class;o.class=null!=r&&""!==r?t._class+" "+r:t._class}St(t,n),i&&k(t)}}function ue(t,e){var i=t.body;if(c(i))for(var n=0;n<i.length;n++){var o=i[n];null!=o.vm?e.push(o.vm):ue(o,e)}return e}function he(t){var e,i,n=arguments,o=n.length;if(o>1){var r=1;u(n[1])&&(i=n[1],r=2),e=o===r+1&&(f(n[r])||c(n[r])||i&&(i._flags&V)===V)?n[r]:m(n,r)}return W(t,i,e)}function fe(){var t=he.apply(null,arguments);return t.ns=Qt,t}return H.patch=ce,Yt.emit=gt,Yt.onemit=null,Yt.body=function(){return ue(this.node,[])},se.defineElementSpread=he,se.defineSvgElementSpread=fe,se}()},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var o=i(0),r=i(10),a=i(12),l=i(0),s=function(){function e(t,e){this._parent=t,this._changes=e}return e.prototype.load=function(t,e){var i=this;if(!t.config||this._parent.events.fire(a.DataEvents.beforeLazyLoad,[]))return this._parent.loadData=t.load().then((function(t){return t?i.parse(t,e):[]})).catch((function(t){i._parent.events.fire(a.DataEvents.loadError,[t])}))},e.prototype.parse=function(t,e){var i=this;if(void 0===e&&(e=a.DataDriver.json),"json"!==e||(0,r.hasJsonOrArrayStructure)(t)||this._parent.events.fire(a.DataEvents.loadError,["Uncaught SyntaxError: Unexpected end of input"]),!((t=(e=(0,r.toDataDriver)(e)).toJsonArray(t))instanceof Array)){var s=t.total_count-1,c=t.from;if(t=t.data,0!==this._parent.getLength())return t.forEach((function(t,e){var a=c+e,s=i._parent.getId(a);if((0,o.isId)(s)){var d=i._parent.getItem(s);if(d&&d.$empty){var u=t.id||d.id;(0,l.isDefined)(t.id)&&i._parent.changeId(s,u,!0),i._parent.update(u,n(n({},t),{$empty:void 0}),!0)}}else(0,r.dhxWarning)("item not found")})),this._parent.events.fire(a.DataEvents.afterLazyLoad,[c,t.length]),this._parent.events.fire(a.DataEvents.change),t;for(var d=[],u=0,h=0;u<=s;u++)u>=c&&u<=c+t.length-1?(d.push(t[h]),h++):d.push({$empty:!0});t=d}return this._parent.getInitialData()&&this._parent.removeAll(),this._parent.$parse(t),t},e.prototype.save=function(e){for(var i=this,n=this._getUniqueOrder(),o=function(n){if(n.saving||n.pending)(0,r.dhxWarning)("item is saving");else{var o=a._findPrevState(n.id);if(o&&o.saving){var l=new t((function(t,a){o.promise.then((function(){n.pending=!1,t(i._setPromise(n,e))})).catch((function(t){i._removeFromOrder(o),i._setPromise(n,e),(0,r.dhxWarning)(t),a(t)}))}));a._addToChain(l),n.pending=!0}else a._setPromise(n,e)}},a=this,l=0,s=n;l<s.length;l++){o(s[l])}n.length&&this._parent.saveData.then((function(){i._saving=!1}))},e.prototype.updateChanges=function(t){this._changes=t},e.prototype._setPromise=function(t,e){var i,n=this;switch(t.status){case"remove":i="delete";break;case"add":i="insert";break;default:i=t.status}return t.promise=e.save(t.obj,i),t.promise.then((function(){n._removeFromOrder(t)})).catch((function(e){t.saving=!1,t.error=!0,(0,r.dhxError)(e)})),t.saving=!0,this._saving=!0,this._addToChain(t.promise),t.promise},e.prototype._addToChain=function(t){this._parent.saveData&&this._saving?this._parent.saveData=this._parent.saveData.then((function(){return t})):this._parent.saveData=t},e.prototype._findPrevState=function(t){for(var e=0,i=this._changes.order;e<i.length;e++){var n=i[e];if(n.id===t)return n}return null},e.prototype._removeFromOrder=function(t){this._changes.order=this._changes.order.filter((function(e){return!(0,r.isEqualObj)(e,t)}))},e.prototype._getUniqueOrder=function(){return this._changes.order.reduce((function(t,e){var i=t.findIndex((function(t){return t.id===e.id})),n=i>-1?t[i]:null;return n&&!1===n.saving&&"add"===n.status?"remove"===e.status?t.splice(i,1):n.obj=e.obj:n&&!1===n.saving&&"update"===n.status?t.splice(i,1,e):t.push(e),t}),[])},e}();e.Loader=s}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.jsonToXML=void 0;var n=4;function o(t){return" ".repeat(t)}function r(t,e){void 0===e&&(e=n);var i=o(e)+"<item>\n";for(var a in t)Array.isArray(t[a])?(i+=o(e+n)+"<".concat(a,">\n"),i+=t[a].map((function(t){return r(t,e+2*n)})).join("\n")+"\n",i+=o(e+n)+"</".concat(a,">\n")):i+=o(e+n)+"<".concat(a,">").concat(t[a],"</").concat(a,">\n");return i+=o(e)+"</item>"}e.jsonToXML=function(t,e){void 0===e&&(e="root");for(var i='<?xml version="1.0" encoding="iso-8859-1"?>\n<'.concat(e,">"),n=0;n<t.length;n++)i+="\n"+r(t[n]);return i+"\n</".concat(e,">")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sort=void 0;var n=i(10),o=function(){function t(){}return t.prototype.sort=function(t,e){return this._sort(t,e)},t.prototype._createSorter=function(t){var e=this;t&&!t.rule&&(t.rule=function(i,o){var r,a,l=null!==(r=e._checkVal(t.as,i[t.by]))&&void 0!==r?r:"",s=null!==(a=e._checkVal(t.as,o[t.by]))&&void 0!==a?a:"";return(0,n.naturalCompare)(l.toString(),s.toString())})},t.prototype._checkVal=function(t,e){return t?t.call(this,e):e},t.prototype._sort=function(t,e){var i=this;e.forEach((function(t){return i._createSorter(t)}));var n={asc:1,desc:-1},o=t.sort((function(t,o){for(var r=0,a=e;r<a.length;r++){var l=a[r],s=l.rule.call(i,t,o)*(n[l.dir]||n.asc);if(0!==s)return s}return 0})),r=o.findIndex((function(t){return t.$groupSummary}));if(-1!==r){var a=o[r];switch(o.splice(r,1),a.$groupSummary){case"top":o.unshift(a);break;case"bottom":o.push(a)}}return o},t}();e.Sort=o},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var r=i(0),a=i(37),l=function(){function t(){this._init=[],this._groupSet=new Set,this._groupOrderFields=[]}return t.prototype.group=function(t,e,i){return void 0===i&&(i={}),(null==t?void 0:t.length)&&(null==e?void 0:e.length)&&Array.isArray(t)?(this._init=o([],e,!0),this._groupSet.clear(),this._config=this.getGroupConfig(i),this._groupOrderFields=t.map((function(t){return"string"==typeof t?t:"function"==typeof t?"":"by"in t&&"string"==typeof t.by?t.by:""})),this._group(t,e)):e||[]},t.prototype.ungroup=function(t){var e=this._init;if(this._init=[],this._groupSet.clear(),t){for(var i={},o=function(e){var n=t[e];if(n.$group)return"continue";Object.keys(n).forEach((function(t){t.startsWith("$")&&delete n[t]})),delete n.parent,i[n.id]=n},r=0;r<t.length;r++)o(r);return e.map((function(t){return n(n({},t),i[t.id])}))}return e||[]},t.prototype.isGrouped=function(){return!!this._init.length},t.prototype.getGroupedFields=function(){return this._groupOrderFields},t.prototype.getGroupConfig=function(t){var e;return t?{displayMode:t.displayMode||"column",field:t.field||"group",showMissed:null===(e=t.showMissed)||void 0===e||e}:this._config},t.prototype._group=function(t,e,i,o){var a=this;if(void 0===o&&(o=0),!(o>=t.length)){for(var l=[],s={},c=[],d="",u={},h=0;h<e.length;h++){var f=e[h],p=t[o],g="function"==typeof p||"function"==typeof(null==p?void 0:p.by),v=f[(u=this._getOrderConfig(p,f)).by],_=g?u.by:v;g||v||0===v?(this._groupSet.add(u.by),s[_]||(s[_]=[]),s[_].push(f)):(this._config.showMissed&&(delete f.parent,c.push(f)),"string"==typeof this._config.showMissed&&(d=this._config.showMissed))}var m=Object.keys(s);return d&&m.push(d),m.forEach((function(e){var d,h=s[e]||c,f=i?"".concat(i,":").concat(e):"$".concat((0,r.uid)(),":").concat(e),p={};u.map&&Object.keys(u.map).forEach((function(t){p[t]=a._toAggregate(h,u.map[t])}));var g=n(((d={id:f,$by:u.by,$group:!0,$row:"row"===a._config.displayMode,$count:h.length})[u.by]=e,d),p);"column"===a._config.displayMode&&(g[a._config.field]=e),i&&(g.parent=i),l.push(g),o<t.length-1&&l.push.apply(l,a._group(t,h,f,o+1)),o===t.length-1&&h.forEach((function(t){l.push(n(n({},t),{parent:f}))})),u.summary&&a._addSummaryRow(l,f,u.summary,p)})),d||l.push.apply(l,c),l}},t.prototype._addSummaryRow=function(t,e,i,o){var r=n({id:"".concat(e,":summary"),parent:e,$groupSummary:i},o);if("top"===i){var a=t.findIndex((function(t){return t.id===e}));t.splice(a+1,0,r)}else t.push(r)},t.prototype._toAggregate=function(t,e){if("function"==typeof e)return e(t);var i=e[0],n=e[1];return a.methods[n]?a.methods[n](t,i):""},t.prototype._getOrderConfig=function(t,e){var i={by:"string"==typeof t&&t||"string"==typeof t.by&&t.by||"function"==typeof t&&t(e)||"function"==typeof t.by&&t.by(e)};return t.map&&(i.map=t.map),t.summary&&(i.summary=t.summary),i},t}();e.Group=l},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.TreeCollection=e.addToOrder=void 0;var l=i(0),s=i(33),c=i(15),d=i(10),u=i(12);function h(t,e,i,n){void 0!==n&&-1!==n&&t[i]&&t[i][n]?t[i].splice(n,0,e):(t[i]||(t[i]=[]),t[i].push(e))}e.addToOrder=h;var f=function(t){function e(e,i){var n,o=t.call(this,e,i)||this;o._children={};var r=o._root=e&&e.rootId||"_ROOT_"+(0,l.uid)();return o._children=((n={})[r]=[],n),o._initChildren=null,o}return o(e,t),e.prototype.add=function(t,e,i){var n,o=this;return void 0===e&&(e=-1),void 0===i&&(i=this._root),n=Array.isArray(t)?t.map((function(n,r){return o._add({newItem:n,batch:t,index:e,parent:i,order:r})})):this._add({newItem:t,batch:[t],index:e,parent:i}),this._reapplyFilters(),n},e.prototype.getRoot=function(){return this._root},e.prototype.getParent=function(t,e){if(void 0===e&&(e=!1),!this._pull[t])return null;var i=this._pull[t].parent;return e?this._pull[i]:i},e.prototype.getItems=function(t){return this._children&&this._children[t]?this._children[t]:[]},e.prototype.getLength=function(t){return void 0===t&&(t=this._root),this._children[t]?this._children[t].length:null},e.prototype.removeAll=function(e){var i;if((0,l.isId)(e)){if(this._children[e])for(var n=0,o=a([],this._children[e],!0);n<o.length;n++){var r=o[n];this.remove(r.id)}}else{t.prototype.removeAll.call(this);var s=this._root;this._initChildren=null,this._children=((i={})[s]=[],i)}},e.prototype.update=function(e,i,n){var o=i.parent;!(0,l.isDefined)(o)||this.exists(o)||o===this._root?t.prototype.update.call(this,e,i,n):(0,d.dhxWarning)("Item parent doesn't exist")},e.prototype.getIndex=function(t){var e=this.getParent(t);return e&&this._children[e]?this._children[e].findIndex((function(e){return(null==e?void 0:e.id)==t})):-1},e.prototype.sort=function(t,e,i){var n,o,l=this;if(void 0===i&&(i=!1),(null==e?void 0:e.smartSorting)&&(this._sorter=t),i||this._sortingStates.length&&!(null==e?void 0:e.smartSorting)&&((null===(n=this._sortingStates[0])||void 0===n?void 0:n.smartSorting)||(null==e?void 0:e.smartSorting))||(this._sortingStates=[r(r({},t),e)]),t){if(!i&&(this._initSortOrder=this._initSortOrder||a([],this._initFilterOrder||this._order,!0),!(null==e?void 0:e.smartSorting)&&(null===(o=this._sortingStates[0])||void 0===o?void 0:o.smartSorting))){var s=this._sortingStates.findIndex((function(e){return e.by==t.by}));-1!==s?this._sortingStates[s].dir=t.dir:this._sortingStates.push(t)}this._applySorters()}else this._initSortOrder&&(this._children={},this._order=[],this._sortingStates=[],this._initSortOrder.forEach((function(t){return l._parseItem(t)})),this._sorter=this._initSortOrder=this._initChildren=null,this._initFilterOrder&&(this._initFilterOrder=null,this.filter(null,{$restore:!0},!0)));i||(this._reapplyFilters(),this.events.fire(u.DataEvents.change,[void 0,"sort",t]))},e.prototype.filter=function(t,e,i){if((null==e?void 0:e.$restore)&&(t=this._normalizeFilters(t||this._filters)),!(t&&(null==e?void 0:e.add)||(this._initChildren&&(this._children=this._initChildren,this._initChildren=null),null==e?void 0:e.$restore)))for(var n in this._filters){var o=this._filters[n],r=o.rule,a=o.config;(null==a?void 0:a.permanent)?this._applyFilter(r,a):delete this._filters[n]}var s;if(t&&!(null==e?void 0:e.$restore))s=(null==e?void 0:e.id)||(0,l.uid)(),e||(e={}),e.type=e.type||u.TreeFilterType.all,this._filters[s]={rule:t,config:e},this._applyFilter(t,e);else for(var n in t)this._applyFilter(t[n],this._filters[n].config);if(!i){var c=this._getPureFilters(this._filters);this.events.fire(u.DataEvents.filter,[(0,l.isEmptyObj)(c)?null:c])}return s},e.prototype.restoreOrder=function(){this.resetFilter({permanent:!0},!0),this.sort()},e.prototype.copy=function(t,e,i,n){var o=this;return void 0===i&&(i=this),void 0===n&&(n=this._root),t instanceof Array?t.map((function(t,r){return o._copy(t,e,i,n,r)})):this._copy(t,e,i,n)},e.prototype.move=function(t,e,i,n){var o,r=this;if(void 0===n&&(n=this._root),i=i||this,t instanceof Array){var a=[];return t.forEach((function(t,o){(0,l.isId)(r._move(t,e,i,n,o))?a.push(t):(0,d.throwMoveWarning)(t,r.exists(t))})),a}return null!==(o=this._move(t,e,i,n))&&void 0!==o?o:(0,d.throwMoveWarning)(t,this.exists(t))},e.prototype.forEach=function(t,e,i){if(void 0===e&&(e=this._root),void 0===i&&(i=1/0),this.haveItems(e)&&!(i<1))for(var n=this._children[e],o=0;o<n.length;o++)t.call(this,n[o],o,n),this.haveItems(n[o].id)&&this.forEach(t,n[o].id,--i)},e.prototype.eachChild=function(t,e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=function(){return!0}),this.haveItems(t))for(var o=0;o<this._children[t].length;o++)e.call(this,this._children[t][o],o),i&&n(this._children[t][o])&&this.eachChild(this._children[t][o].id,e,i,n)},e.prototype.getNearId=function(t){return t},e.prototype.loadItems=function(t,e){var i=this;if(void 0===e&&(e=u.DataDriver.json),this.events.fire(u.DataEvents.beforeItemLoad,[t])){var n=this.config.autoload.toString(),o=n+(n.includes("?")?"&id=".concat(t):"?id=".concat(t));new c.DataProxy(o).load().then((function(n){n=(e=(0,d.toDataDriver)(e)).toJsonArray(n),i._parse_data(n,t),i.events.fire(u.DataEvents.change),i.events.fire(u.DataEvents.afterItemLoad,[t])})).catch((function(t){i.events.fire(u.DataEvents.loadError,[t])}))}},e.prototype.refreshItems=function(t,e){void 0===e&&(e=u.DataDriver.json),this.removeAll(t),this.loadItems(t,e)},e.prototype.eachParent=function(t,e,i){void 0===i&&(i=!1);var n=this.getItem(t);if(n&&(i&&e.call(this,n),n.parent!==this._root)){var o=this.getItem(n.parent);e.call(this,o),this.eachParent(n.parent,e)}},e.prototype.haveItems=function(t){return t in this._children},e.prototype.canCopy=function(t,e){if(t===e)return!1;var i=!0;return this.eachParent(e,(function(e){return e.id===t?i=!1:null})),i},e.prototype.serialize=function(t,e){void 0===t&&(t=u.DataDriver.json);var i=this._serialize(this._root,e),n=(0,d.toDataDriver)(t);if(n)return n.serialize(i)},e.prototype.getId=function(t,e){if(void 0===e&&(e=this._root),this._children[e]&&this._children[e][t])return this._children[e][t].id},e.prototype.map=function(t,e,i){void 0===e&&(e=this._root),void 0===i&&(i=!0);var n=[];if(!this.haveItems(e))return n;for(var o=0;o<this._children[e].length;o++)if(n.push(t.call(this,this._children[e][o],o,this._children)),i){var r=this.map(t,this._children[e][o].id,i);n=n.concat(r)}return n},e.prototype.getRawData=function(e,i,n,o,r){var a;return r=null!=r?r:this._root,this._children[r]?(a=r===this._root?t.prototype.getRawData.call(this,e,i,this._children[r]):this._children[r],2===o?this.flatten(a):a):[]},e.prototype.flatten=function(t){var e=this,i=[];return t.forEach((function(t){i.push(t);var n=e._children[t.id];n&&t.$opened&&(i=i.concat(e.flatten(n)))})),i},e.prototype._add=function(t){var e=t.newItem,i=t.index,n=void 0===i?-1:i,o=t.parent,r=void 0===o?this._root:o,a=t.order,l=void 0===a?0:a,s=t.batch;if(l>0&&-1!==n&&(n+=1),this.events.fire(u.DataEvents.beforeAdd,[e,s,l])){this._setParent(e,r);var c=this._addCore(e,n);if(this._onChange("add",e.id,e),this.events.fire(u.DataEvents.afterAdd,[e,s,l]),Array.isArray(e.items))for(var d=0,h=e.items;d<h.length;d++){var f=h[d];this.add(f,-1,e.id)}return c}},e.prototype._setParent=function(t,e){t.parent=t.parent?t.parent.toString():e;var i=this._pull[t.parent];i&&!i.items&&(i.items=[])},e.prototype._copy=function(t,e,i,n,o){if(void 0===i&&(i=this),void 0===n&&(n=this._root),!this.exists(t))return null;var r=this._children[t];if(o&&(e=-1===e?-1:e+o),i===this&&!this.canCopy(t,n))return null;var a=(0,d.copyWithoutInner)(this.getItem(t),{items:!0});if(i.exists(t)&&(a.id=(0,l.uid)()),(0,d.isTreeCollection)(i)){if(this.exists(t)&&(a.parent=n,i!==this&&n===this._root&&(a.parent=i.getRoot()),i.add(a,e),t=a.id),r)for(var s=0,c=r;s<c.length;s++){var u=c[s].id,h=this.getIndex(u);this.copy(u,h,i,t)}return t}i.add(a,e)},e.prototype._move=function(t,e,i,n,o){if(void 0===i&&(i=this),void 0===n&&(n=this._root),!this.exists(t))return null;if(o&&e<this.getIndex(t)&&(e=-1===e?-1:e+o),i!==this){if(!(0,d.isTreeCollection)(i))return i.add((0,d.copyWithoutInner)(this.getItem(t)),e),void this.remove(t);var r=this.copy(t,e,i,n);return this.remove(t),r}return this.canCopy(t,n)?(this._moveItem(t,n,e),this.events.fire(u.DataEvents.change,[t,"update",this.getItem(t)]),t):null},e.prototype._moveItem=function(t,e,i){var n=this.getParent(t),o=this._initChildren||this._children;if([this._children,this._initChildren].forEach((function(o){if(o&&o[n]){var r=o[n].findIndex((function(e){return e.id===t}));if(-1!==r){var a=o[n].splice(r,1)[0];a.parent=e,h(o,a,e,i),o[n].length||delete o[n]}}})),n!==this._root&&n!==e){var r=this.getItem(n);o[n]?r.items=a([],o[n],!0):delete r.items}e!==this._root&&(this.getItem(e).items=a([],o[e]||[],!0))},e.prototype._reset=function(e){var i;if((0,l.isId)(null==e?void 0:e.id))for(var n=0,o=a([],this._children[null==e?void 0:e.id],!0);n<o.length;n++){var r=o[n];this.remove(r.id)}else{t.prototype._reset.call(this,e);var s=this._root;this._initChildren=null,this._children=((i={})[s]=[],i)}},e.prototype._removeCore=function(t){var e;if(this._pull[t]){var i=this.getParent(t);if(this._removeFromParentList(this._children,i,t),this._initChildren&&this._removeFromParentList(this._initChildren,i,t),Array.isArray(null===(e=this._pull[i])||void 0===e?void 0:e.items)){var n=this._pull[i];n.items=n.items.filter((function(e){return e.id!==t}))}var o=new Set;this._removeChildren(this._children,t,o),this._initChildren&&this._removeChildren(this._initChildren,t,o),this._removeFromOrders(o)}},e.prototype._removeFromParentList=function(t,e,i){t[e]&&(t[e]=t[e].filter((function(t){return t.id!==i})),e!==this._root&&0===t[e].length&&delete t[e])},e.prototype._removeChildren=function(t,e,i){this._pull[e]&&(i.add(e),delete this._pull[e]);var n=t[e];if(n){for(var o=0;o<n.length;o++)this._removeChildren(t,n[o].id,i);delete t[e]}},e.prototype._removeFromOrders=function(t){var e,i;if(0!==t.size){var n=function(e){return!t.has(e.id)};this._order&&(this._order=this._order.filter(n)),(null===(e=this._initFilterOrder)||void 0===e?void 0:e.length)&&(this._initFilterOrder=this._initFilterOrder.filter(n)),(null===(i=this._initSortOrder)||void 0===i?void 0:i.length)&&(this._initSortOrder=this._initSortOrder.filter(n))}},e.prototype._addToOrder=function(e,i,n){var o=this._children,r=this._initChildren,a=i.parent;this._pull[i.id]=i,i.parent&&this._pull[i.parent]&&Array.isArray(this._pull[i.parent].items)&&!this._pull[i.parent].items.find((function(t){return t.id===i.id}))&&this._pull[i.parent].items.push(i),t.prototype._addToOrder.call(this,e,i,n),h(o,i,a,n),r&&h(r,i,a,n)},e.prototype._parse_data=function(t,e){var i,n,o;void 0===e&&(e=this._root);for(var r=0,a=t;r<a.length;r++){var s=a[r];this.config.init&&(s=this.config.init(s)),s&&"object"!=typeof s&&(s={value:s}),s.id=null!==(i=s.id)&&void 0!==i?i:(0,l.uid)(),s.parent=s.parent&&!(null===(o=null===(n=s.parent)||void 0===n?void 0:n.toString())||void 0===o?void 0:o.includes("_ROOT_"))?s.parent:e,this._pull[s.id]&&(0,d.dhxError)("Item ".concat(s.id," already exist")),this._parseItem(s),s.items&&s.items instanceof Object&&this._parse_data(s.items,s.id)}},e.prototype._parseItem=function(t){this._pull[t.id]=t,this._order[this._order.length]=t,this._children[t.parent]||(this._children[t.parent]=[]),this._children[t.parent].push(t)},e.prototype._recursiveFilter=function(t,e,i,n,o){var r=this,a=this._children[i];if(a){var l=function(t){switch(e.type){case u.TreeFilterType.all:return!0;case u.TreeFilterType.level:return n===e.level;case u.TreeFilterType.leafs:return!r.haveItems(t.id)}};if("function"==typeof t){var s=function(e){return l(e)&&t(e)};(c=a.filter(s)).length?o[i]=c:i===this._root&&(o[i]=[])}else{var c;s=function(e){var i,n=!0;for(var o in t)if(t[o].by&&""!==t[o].match&&(n=t[o].compare?t[o].compare(e[t[o].by],t[o].match,e):-1!==(null===(i=e[t[o].by])||void 0===i?void 0:i.toString().toLocaleLowerCase().indexOf(t[o].match.toString().toLowerCase()))),!n)break;return l(e)&&n};(c=a.filter(s)).length?o[i]=c:i===this._root&&(o[i]=[])}for(var d=0,h=a;d<h.length;d++){var f=h[d];this._recursiveFilter(t,e,f.id,n+1,o)}}},e.prototype._serialize=function(t,e){var i=this;return void 0===t&&(t=this._root),this.map((function(t){var n={};for(var o in t)"parent"===o||"items"===o||o.startsWith("$")||(n[o]=t[o]);return e&&(n=e(n)),i.haveItems(t.id)&&(n.items=i._serialize(t.id,e)),n}),t,!1)},e.prototype._applyFilter=function(t,e){var i=this;if(t&&("function"==typeof t||!(0,l.isEmptyObj)(t))){if(!this._checkFilterRule(t))throw new Error("Invalid filter rule");var n;this._initFilterOrder||(this._initFilterOrder=this._order),this._initChildren||(this._initChildren=this._children);var o={};if("function"!=typeof t)if(n={},(0,l.isDefined)(t.by))n[t.by]=t;else for(var r in t)n[r]=t[r];else n=t;this._recursiveFilter(n,e,this._root,0,o),Object.keys(o).forEach((function(t){for(var e=i.getParent(t),n=i.getItem(t);e;)o[e]||(o[e]=[]),n&&!o[e].find((function(t){return t.id===n.id}))&&o[e].push(n),n=i.getItem(e),e=i.getParent(e)})),this._children=o}},e.prototype._normalizeFilters=function(t){var e={};for(var i in t)e[i]=t[i].rule;return e},e.prototype._checkFilterRule=function(e){var i=this;return t.prototype._checkFilterRule.call(this,e)||Object.values(e).every((function(e){return"function"!=typeof e&&t.prototype._checkFilterRule.call(i,e)}))},e.prototype._applySorters=function(){for(var t in this._children)this._sort.sort(this._children[t],this._sortingStates);if(this._initChildren&&Object.keys(this._initChildren).length)for(var t in this._initChildren)this._sort.sort(this._initChildren[t],this._sortingStates)},e}(s.DataCollection);e.TreeCollection=f},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.dragManager=void 0;var r=i(2),a=i(78),l=i(12),s=i(10),c=i(0);var d=function(t){var e;return null===(e=t.name)||void 0===e?void 0:e.includes("grid")},u=function(t){return d(t)&&t.hasOwnProperty("scrollView")},h=function(){function t(){var t=this;this._transferData={},this._canMove=!0,this._isDrag=!1,this._lastTargetItemState=null,this._lastOverItemId=null,this._onMouseMove=function(e){var i,n;if(t._transferData.start){var o=(0,r.getElementFromPoint)(e),a=(0,r.locate)(o,"data-dhx-drop-area"),l="common"===a,s=e.targetTouches?e.targetTouches[0].pageX:e.pageX,c=e.targetTouches?e.targetTouches[0].pageY:e.pageY;"column"===t._transferData.type&&"group"===a&&(t._transferData.type="group",t._transferData.isWasColumn=!0),"group"===t._transferData.type&&"column"===a&&t._transferData.isWasColumn&&!t._transferData.groupOnly&&(t._transferData.type="column");var d=(0,r.locate)(o),u=null!==(n=null===(i=t._transferData.component.data.getItem(d))||void 0===i?void 0:i.id)&&void 0!==n?n:d;if(a===t._transferData.type||l){var h=t._transferData,f=h.x,p=h.y,g=h.start,v=h.componentId;if(!t._transferData.ghost){if(Math.abs(f-s)<3&&Math.abs(p-c)<3)return;var _=t._onDragStart(g,e);if(!_)return void t._endDrop(e);t._transferData.ghost=_,document.body.appendChild(t._transferData.ghost)}var m=(0,r.locate)(o,"data-dhx-widget-id");"column"!==a&&"group"!==a||m!==v?t._onDrag(e):u!==t._lastOverItemId&&(t._lastOverItemId=u,t._onDrag(e))}else t._canMove&&t.cancelCanDrop(e);t._notAllowedDropArea(a!==t._transferData.type&&!l||!t._transferData.groupable&&"group"===a||t._transferData.groupOnly&&"group"!==a&&!l&&t._transferData.start!=u),t._moveGhost(s,c)}},this._onMouseUp=function(e){t._transferData.x&&(t._transferData.ghost?(t._removeGhost(),t._onDrop(e)):t._endDrop(e),e.targetTouches?(document.removeEventListener("touchmove",t._onMouseMove),document.removeEventListener("touchend",t._onMouseUp)):(document.removeEventListener("mousemove",t._onMouseMove),document.removeEventListener("mouseup",t._onMouseUp)))}}return t.prototype.setItem=function(t,e){a.collectionStore.setItem(t,e)},t.prototype.onMouseDown=function(t){var e,i,n=t.event,l=t.itemsForGhost,s=t.ghost,c=t.source,u=t.type,h=t.groupable,f=t.groupOnly;if(1===n.which||n.targetTouches){n.targetTouches?(document.addEventListener("touchmove",this._onMouseMove,!1),document.addEventListener("touchend",this._onMouseUp,!1)):(document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp));var p=(0,r.getElementFromPoint)(n),g=(0,r.locateNode)(p,"data-dhx-id"),v=(0,r.locateNode)(p,"data-dhx-widget-id"),_=null==v?void 0:v.getAttribute("data-dhx-widget-id"),m=a.collectionStore.getItem(_),y=g&&g.getAttribute("data-dhx-id"),b=g&&(null!==(i=null===(e=m.data.getItem(y))||void 0===e?void 0:e.id)&&void 0!==i?i:y);if(s&&(this._ghost=s),Array.isArray(c)&&c.includes(b)?(this._transferData.source=o([],c,!0),this._itemsForGhost=l):(this._transferData.source=[b],this._itemsForGhost=null),b&&_){var x=(0,r.getBox)(g),w=d(m)?(0,r.getBox)(v).left:x.left,C=n.targetTouches?n.targetTouches[0].pageX:n.pageX,S=n.targetTouches?n.targetTouches[0].pageY:n.pageY;this._transferData.initXOffset="row"===u?C-w:0,this._transferData.initYOffset="row"===u?S-x.top:0,this._transferData.x=C,this._transferData.y=S,this._transferData.componentId=_,this._transferData.component=m,this._transferData.start=b,this._transferData.item=g,this._transferData.type=u,this._transferData.groupable=h,this._transferData.groupOnly=f}}},t.prototype.isDrag=function(){return this._isDrag},t.prototype.cancelCanDrop=function(t){this._canMove=!1;var e=this._transferData,i=e.start,n=e.source,o=e.target,r=e.dropComponentId,s={start:i,source:n,target:o,dragItem:e.type},c=a.collectionStore.getItem(r);c&&o&&c.events.fire(l.DragEvents.cancelDrop,[s,t,this._transferData.type]),this._transferData.dropComponentId=null,this._transferData.target=null},t.prototype._moveGhost=function(t,e){this._transferData.ghost&&(this._transferData.ghost.style.left=t-this._transferData.initXOffset+"px",this._transferData.ghost.style.top=e-this._transferData.initYOffset+"px")},t.prototype._removeGhost=function(){this._ghost=null,document.body.removeChild(this._transferData.ghost)},t.prototype._onDrop=function(t){if(this._canMove){var e=this._transferData,i=e.start,n=e.source,o=e.target,s=e.dropComponentId,c=e.dropPosition,d={start:i,source:n,target:o,dropPosition:c},u=a.collectionStore.getItem(s),h=u&&u.config,f=this._transferData.componentId==(0,r.locate)((0,r.getElementFromPoint)(t),"data-dhx-widget-id");if(!u||"source"===h.dragMode||f&&n.find((function(t){return t==o})))this._endDrop(t);else{if(u.events.fire(l.DragEvents.beforeDrop,[d,t,this._transferData.type])){var p={id:o,component:u},g={id:i,component:this._transferData.component,newId:null};"group"!==this._transferData.type&&this._move(g,p),g.newId&&g.component!==p.component&&(d.start=g.newId),p.component.events.fire(l.DragEvents.afterDrop,[d,t,this._transferData.type])}this._endDrop(t)}}else this._endDrop(t)},t.prototype._onDragStart=function(t,e){var i=this._transferData.component.config,n=this._transferData,o={start:n.start,source:n.source,target:n.target};if("target"===i.dragMode||this._transferData.component._pregroupData)return null;var r="row"===this._transferData.type?function(t,e,i){void 0===i&&(i=!1);var n=t.getBoundingClientRect(),o=document.createElement("div"),r=t.cloneNode(!0),a=window.getComputedStyle(t.parentElement).fontSize;return r.style.width=n.width+"px",r.style.height=n.height+"px",r.style.maxHeight=n.height+"px",r.style.opacity="0.8",r.style.fontSize=a,i&&e&&e.length||o.appendChild(r),e&&e.length&&e.forEach((function(t,e){var r=t.cloneNode(!0);r.style.getPropertyPriority("width")||(r.style.width=n.width+"px"),r.style.height=n.height+"px",r.style.maxHeight=n.height+"px",r.style.top=12*(e+1)-n.height-n.height*e+"px",r.style.left=12*(e+1)+"px",r.style.opacity="0.6",r.style.zIndex="".concat(-e-1),i||(r.style.fontSize=a,r.style.overflow="hidden"),o.appendChild(r)})),o.className="dhx_drag-ghost",o}(this._transferData.item,this._itemsForGhost,d(this._transferData.component)):this._ghost;return this._transferData.component.events.fire(l.DragEvents.beforeDrag,[o,e,r,this._transferData.type])&&(0,c.isId)(t)?(this._transferData.component.events.fire(l.DragEvents.dragStart,[o,e,this._transferData.type]),this._isDrag=!0,this._toggleTextSelection(!0),this._transferData.dragConfig=i,r):null},t.prototype._onDrag=function(t){var e,i,n=(0,r.getElementFromPoint)(t),o=(0,r.locate)(n,"data-dhx-widget-id"),c=a.collectionStore.getItem(o);if(c){var d=!!(0,r.locateNodeByClassName)(n,"dhx_grid-header")||!!(0,r.locateNodeByClassName)(n,"dhx_grid-footer"),u=c.config.columns?c.config:void 0,h=u&&("both"===u.dragItem||"column"===u.dragItem);if(!d||h){var f=(0,r.locate)(n,"data-dhx-id"),p=(0,r.locate)(n,"data-dhx-root-id"),g=this._transferData,v=g.dropComponentId,_=g.start,m=g.source,y=g.target,b=g.componentId,x=function(t){var e=t.targetTouches?t.targetTouches[0].clientY:t.clientY,i=(0,r.locateNode)((0,r.getElementFromPoint)(t));if(!i)return null;var n=i.childNodes[0];if(1===(null==n?void 0:n.nodeType)){var o=n.getBoundingClientRect();return(e-o.top)/o.height}}(t);if("group"!==this._transferData.type){if(!f&&!p)return this.cancelCanDrop(t),this._transferData.dropComponentId=o,this._transferData.target=null,void this._canDrop(t);if(!c.config.group)switch(c.config.dropBehaviour){case"complex":this._transferData.dropPosition=x<=.25?"top":x>=.75?"bottom":"in";break;case"child":this._transferData.dropPosition="in";break;default:this._transferData.dropPosition=x<=.5?"top":"bottom"}if(((null===(e=this._lastTargetItemState)||void 0===e?void 0:e.id)===f&&(null===(i=this._lastTargetItemState)||void 0===i?void 0:i.dropPosition)===this._transferData.dropPosition||!f&&y===p)&&v===o)return}var w={id:_,component:this._transferData.component};if("source"!==c.config.dragMode)if(w.component.events.fire(l.DragEvents.dragOut,[{start:_,source:m,target:y},t,this._transferData.type]),o!==b||!(0,s.isTreeCollection)(w.component.data)||(0,s.isTreeCollection)(w.component.data)&&w.component.data.canCopy(w.id,f)){this.cancelCanDrop(t);var C=this._transferData.target=f||p;this._transferData.dropComponentId=o,this._lastTargetItemState={id:f,dropPosition:this._transferData.dropPosition},w.component.events.fire(l.DragEvents.dragIn,[{start:_,source:m,target:C,dropPosition:this._transferData.dropPosition},t,this._transferData.type])&&this._canDrop(t)}else this.cancelCanDrop(t)}else this._canMove&&this.cancelCanDrop(t)}else this._canMove&&this.cancelCanDrop(t)},t.prototype._move=function(t,e){var i,r=t.component,a=e.component,l=t.component.data,h=e.component.data,f=0,p=e.id,g=(0,s.isTreeCollection)(h),v=g&&e.component.config.dropBehaviour||null,_=r._uid===a._uid,m=t.component.config.columns?t.component.config:void 0,y="column"===this._transferData.type&&(null===(i=null==m?void 0:m.columns)||void 0===i?void 0:i.map((function(t){return t.id})).filter((function(i){return i===t.id||i===e.id})).length);if(y&&t.component===e.component){if(t.id===e.id)return;var b=(x=r.config.columns.map((function(t){return n({},t)}))).findIndex((function(e){return e.id===t.id}));if(-1===(S=x.findIndex((function(t){return t.id===e.id}))))return;return x.splice(S,0,x.splice(b,1)[0]),r.setColumns(x),void r.paint()}if(y&&t.component&&u(t.component)&&e.component&&u(e.component)){b=(x=r.config.columns.map((function(t){return n({},t)}))).findIndex((function(e){return e.id===t.id}));var x,w=a.config.columns.map((function(t){return n({},t)})),C=a.data.getLength(),S=w.findIndex((function(t){return t.id===e.id})),E=[],D=t.id;r.data.forEach((function(e){var i;E.push(((i={id:e.id})[D]=e[t.id],i))})),C?r.data.forEach((function(t,e){var i=a.data.getItem(t.id);i?a.data.update(i.id,n(n({},i),E[e])):a.data.add(E[e])})):a.data.parse(E);var O=x.splice(b,1)[0];return w.find((function(t){return t.id===D}))||w.splice(S,0,O),a.setColumns(w),a.paint(),r.setColumns(x),void r.paint()}var k=e.id===a.config.rootParent,R=this._transferData.dropPosition;switch(v){case"child":break;case"sibling":if(!h.getItem(e.id))return;var T=h.getIndex(t.id),M=h.getIndex(e.id),I=h.getParent(t.id),H=h.getParent(e.id);p=h.getParent(p),"top"===R?f=M-(-1===T||T>M||I!==H?0:1):"bottom"===R&&(f=M+(-1===T||T>M||I!==H?1:0));break;case"complex":if(k)p=e.id,f=h.getLength();else{var P=h.getItem(t.id),F=h.getItem(e.id);if(!F)return;T=h.getIndex(t.id),M=h.getIndex(e.id);var A=(null==P?void 0:P.$level)||0,$=(null==F?void 0:F.$level)||0;"top"===R?(p=h.getParent(p),f=A===$?M-(-1===T||T>M?0:1):M):"bottom"===R&&(p=h.getParent(p),f=A===$?M+(-1===T||T>M?1:0):M+1)}break;default:if((0,c.isId)(e.id)){h.getIndex(t.id)>-1&&(t.newId=(0,c.uid)());T=h.getIndex(t.id),M=h.getIndex(e.id);f="top"===R?M-(-1===T||T>M?0:1):"bottom"===R?M+(-1===T||T>M?1:0):h.getIndex(e.id)}else f=-1}if(this._transferData.dragConfig.dragCopy)this._transferData.source instanceof Array&&this._transferData.source.length>1?this._transferData.source.map((function(t){l.copy(t,f,h,p),f>-1&&f++})):l.copy(t.id,f,h,p);else if(this._transferData.source instanceof Array&&this._transferData.source.length>1)l.move(this._transferData.source,f,h,p);else if(d(a)&&!a.config.columns.length){var j=r.data.getItem(t.id);a.data.parse([n({},j)]),a.setColumns(o([],r.config.columns,!0)),a.paint(),r.data.remove(t.id),r.paint()}else l.move(t.id,f,h,p,t.newId);_||this._transferData.source.forEach((function(t){var e;null===(e=h.getItem(t))||void 0===e||delete e.$draggable,g&&(null==h?void 0:h.haveItems(t))&&h.eachChild(t,(function(t){delete t.$draggable}))}))},t.prototype._endDrop=function(t){if(this._toggleTextSelection(!1),this._notAllowedDropArea(!1),this._transferData.component){var e=this._transferData,i={start:e.start,source:e.source,target:e.target};this._transferData.component.events.fire(l.DragEvents.afterDrag,[i,t,this._transferData.type])}this.cancelCanDrop(t),this._canMove=!0,this._isDrag=!1,this._lastOverItemId=null,this._transferData={},this._transferData.target=null,this._transferData.dropComponentId=null,this._lastTargetItemState=null},t.prototype._canDrop=function(t){this._canMove=!0;var e=this._transferData,i={start:e.start,source:e.source,target:e.target,dropPosition:e.dropPosition},n=a.collectionStore.getItem(this._transferData.dropComponentId);n&&this._transferData.target&&n.events.fire(l.DragEvents.canDrop,[i,t,this._transferData.type])},t.prototype._toggleTextSelection=function(t){t?document.body.classList.add("dhx_no-select"):document.body.classList.remove("dhx_no-select")},t.prototype._notAllowedDropArea=function(t){t?document.body.classList.contains("dhx_drop-area--not-allowed")||document.body.classList.add("dhx_drop-area--not-allowed"):document.body.classList.remove("dhx_drop-area--not-allowed")},t}(),f=window.dhxHelpers=window.dhxHelpers||{};f.dragManager=f.dragManager||new h,e.dragManager=f.dragManager},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.collectionStore=e.CollectionStore=void 0;var n=i(0),o=function(){function t(){this._store={}}return t.prototype.setItem=function(t,e){this._store[t]=e},t.prototype.getItem=function(t){return(0,n.isId)(t)&&this._store[t]?this._store[t]:null},t}();e.CollectionStore=o;var r=window.dhxHelpers=window.dhxHelpers||{};r.collectionStore=r.collectionStore||new o,e.collectionStore=r.collectionStore},function(t,e,i){"use strict";(function(t){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.LazyDataProxy=void 0;var r=i(15),a=i(0),l=i(23),s=function(e){function i(t,i){var n=e.call(this,t)||this;return n.config=(0,a.extend)({from:0,limit:50,delay:50,prepare:0},i),n.updateUrl(t,{from:n.config.from,limit:n.config.limit}),n}return o(i,e),i.prototype.load=function(){var e=this;return new t((function(t,i){e._timeout?(clearTimeout(e._timeout),e._timeout=setTimeout((function(){l.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0}),e.config.delay),e._cooling&&(t(null),e._cooling=!1)):(l.ajax.get(e.url,{responseType:"text"}).then(t).catch(i),e._cooling=!0,e._timeout=setTimeout((function(){})))}))},i}(r.DataProxy);e.LazyDataProxy=s}).call(this,i(9))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;var n=i(6),o=i(16),r=i(12),a=i(0),l=function(){function t(t,e,i){var o=this;this.events=i||new n.EventSystem(this),this.config=t,this._data=e,this._selected=null,this._data.events.on(r.DataEvents.removeAll,(function(){o._selected=null})),this._data.events.on(r.DataEvents.change,(function(){if((0,a.isId)(o._selected)){var t=o._data.getNearId(o._selected);t!==o._selected&&(o._selected=null,t&&o.add(t))}}))}return t.prototype.getId=function(){return this._selected},t.prototype.getItem=function(){return(0,a.isId)(this._selected)?this._data.getItem(this._selected):null},t.prototype.remove=function(t){return t=null!=t?t:this._selected,!(0,a.isDefined)(t)||!!this.events.fire(o.SelectionEvents.beforeUnSelect,[t])&&(this._data.update(t,{$selected:!1},!0),this._selected=null,this.events.fire(o.SelectionEvents.afterUnSelect,[t]),!0)},t.prototype.add=function(t){this._selected!==t&&!this.config.disabled&&this._data.exists(t)&&(this.remove(),this._addSingle(t))},t.prototype.enable=function(){this.config.disabled=!1},t.prototype.disable=function(){this.remove(),this.config.disabled=!0},t.prototype._addSingle=function(t){this.events.fire(o.SelectionEvents.beforeSelect,[t])&&(this._selected=t,this._data.update(t,{$selected:!0},!0),this.events.fire(o.SelectionEvents.afterSelect,[t]))},t}();e.Selection=l},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Grid=void 0;var l=i(1),s=i(6),c=i(2),d=i(0),u=i(25),h=i(11),f=i(8),p=i(82),g=i(4),v=i(14),_=i(5),m=i(88),y=i(89),b=i(3),x=i(90),w=i(7),C=i(21),S=i(122),E=i(123),D=i(19),O=i(127),k=i(128),R=i(20),T=function(t){function e(e,i){void 0===i&&(i={});var n,o=this;if((o=t.call(this,e,i)||this)._touch={duration:350,dblDuration:300,timer:null,start:!1},o._destructed=!1,o._sortingStates=[],o._dropManager=null,o._cachedSizes=null,o._resizeObserver=null,o._rowHeights=new m.PrefixSums,o._colWidths=new m.PrefixSums,o._rowHeightsRebuild=!0,o._observedEl=null,o._commonSummary={},o._colSummary={},o.version="9.3.8",o.name="grid",o.config=(0,d.extend)({rowHeight:40,headerRowHeight:40,footerRowHeight:40,keyNavigation:!0,sortable:!0,columns:[],data:[],tooltip:!0,rootParent:"string"==typeof e&&e||o._uid},o._normalizeConfig(i)),o.content=(0,C.getContent)(o),o._scroll={top:0,left:0},o.config.autoWidth=o.config.autoWidth||o.config.fitToContainer,o.config.adjust=o.config.adjust||o.config.columnsAutoWidth,o.config.editable=o.config.editable||o.config.editing,o.config.leftSplit=o.config.leftSplit||o.config.splitAt,o.config.columns.forEach((function(t){"date"===t.type&&t.format&&(t.dateFormat=t.format)})),o._setHTMLEventHandlers(),o.config.eventHandlers)for(var r=0,a=Object.entries(o.config.eventHandlers);r<a.length;r++){var l=a[r],s=l[0],u=l[1];o._htmlEvents[s]=(0,c.eventHandler)((function(t){return{col:o.getColumn((0,c.locate)(t,"data-dhx-col-id")||(0,c.locate)(t,"data-dhx-id"))||{},row:o.data.getItem((0,c.locate)(t,"data-dhx-id"))||{}}}),u,o._htmlEvents[s])}return o._init(),o._dragInit(),o.config.columns&&o._parseColumns(!0),o._canDataParse()&&o.data.parse(o.config.data),o.selection=new y.Selection(o,{type:"string"==typeof o.config.selection&&o.config.selection||"complex",disabled:!o.config.selection,multiSelection:o.config.multiselection},o.events,o._uid),o.mount(e,o._createView()),(null===(n=o._container)||void 0===n?void 0:n.tagName)&&o._observeResize(o._container),i.autoEmptyRow&&0===o.data.getLength()&&(o._addEmptyRow(),o.paint()),o}return o(e,t),e.prototype.destructor=function(){var t;this._destructed=!0,this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._cachedSizes=null,this._observedEl=null,this._rowHeights=null,this._colWidths=null,this._destroyContent(),null===(t=this.config.$subRowCells)||void 0===t||t.forEach((function(t){var e;null===(e=t.cell)||void 0===e||e.destructor()})),this.keyManager&&this.keyManager.destructor(),this.events&&this.events.clear(),this._events&&this._events.clear(),this.export=this.content=this.selection=null,this._activeFilters=this._filterData=this._scroll=this._touch=this._htmlEvents=this._hiddenFilters=this.config.$subRowCells=null,this.unmount()},e.prototype.setColumns=function(t){var e=this;this._destroyContent(),this.config.columns=t,this._parseColumns(!0),(0,_.isAutoWidth)(this.config)&&this._applyAutoWidth(),this._setSummary(),this._adjustColumns(),this._checkFilters(),this._checkMarks(),this._normalizeSpans(),this.paint(),this.config.keyNavigation&&(0,l.awaitRedraw)().then((function(){e._initHotKey(!0),e.paint()}))},e.prototype._rebuildRowHeights=function(t){t||(t=this.data.getRawData(0,-1,null,2));for(var e=this._rowHeights.ensureCapacity(t.length),i=0,n=0;n<t.length;n++){var o=t[n];o.hidden||(e[i+1]=e[i]+(0,g.getTotalRowHeight)(o),i++)}this._rowHeights.setLength(i),this.config.$totalHeight=this._rowHeights.totalSize(),this.config.$rowHeights=this._rowHeights,this._rowHeightsRebuild=!1},e.prototype._rebuildColWidths=function(){for(var t=this.config.columns,e=this._colWidths.ensureCapacity(t.length),i=0,n=0;n<t.length;n++)t[n].hidden||(e[i+1]=e[i]+(t[n].$width||0),i++);this._colWidths.setLength(i),this.config.$totalWidth=this._colWidths.totalSize(),this.config.$colWidths=this._colWidths},e.prototype.addRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css||"";n.match(new RegExp(e,"g"))||(i.$css=n+" ".concat(e),this.paint())}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.removeRowCss=function(t,e){var i=this.data.getItem(t);if(i){var n=i.$css?i.$css.replace(e,""):"";i.$css=n,this.paint()}else(0,f.dhxWarning)('Row with id "'.concat(t,'" not found'))},e.prototype.addCellCss=function(t,e,i){var n=this.getColumn(e);if(n){n.$cellCss=n.$cellCss||{};var o=n.$cellCss[t];if(o){var r=o.match(new RegExp(i,"g"))?"":" ".concat(i);n.$cellCss[t]+=r}else this.data.getItem(t)&&(n.$cellCss[t]="".concat(i," "));this.paint()}},e.prototype.removeCellCss=function(t,e,i){var n=this.getColumn(e);n&&(n.$cellCss[t]?(n.$cellCss[t]=n.$cellCss[t].replace(i,""),this.paint()):this.data.getItem(t)&&(n.$cellCss[t]=""))},e.prototype.showColumn=function(t){var e=this.getColumn(t);e&&e.hidden&&this.events.fire(b.GridEvents.beforeColumnShow,[e])&&(this._showColumn(e),this.events.fire(b.GridEvents.afterColumnShow,[e]))},e.prototype.hideColumn=function(t){var e=this.getColumn(t);e&&!e.hidden&&this.events.fire(b.GridEvents.beforeColumnHide,[e])&&(this._hideColumn(e),this.events.fire(b.GridEvents.afterColumnHide,[e]))},e.prototype.isColumnHidden=function(t){var e=this.getColumn(t);if(e)return!!e.hidden},e.prototype.showRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&i.hidden&&this.events.fire(b.GridEvents.beforeRowShow,[i])&&(this.data.update(e,{hidden:!1}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this.paint(),this.events.fire(b.GridEvents.afterRowShow,[i]))}},e.prototype.hideRow=function(t){if((0,d.isDefined)(t)){var e=t.toString(),i=this.data.getItem(e);i&&this.events.fire(b.GridEvents.beforeRowHide,[i])&&(this.data.update(e,{hidden:!0}),this._rowHeightsRebuild=!0,this._checkFilters(!0),this._checkSelectFilterValue(),this.paint(),this.events.fire(b.GridEvents.afterRowHide,[i]))}},e.prototype.isRowHidden=function(t){if((0,d.isDefined)(t)){var e=this.data.getItem(t.toString());return e?!!e.hidden:void 0}},e.prototype.getScrollState=function(){return{x:this._scroll.left,y:this._scroll.top}},e.prototype.scroll=function(t,e){var i=this.getRootView().refs.grid_body.el.querySelector(".scroll-view")||this.getRootView().refs.grid_body.el;i.scrollLeft=!t&&0!==t||"number"!=typeof t?i.scrollLeft:t,i.scrollTop=!e&&0!==e||"number"!=typeof e?i.scrollTop:e,this.paint()},e.prototype.scrollTo=function(t,e){var i=this.config,n=i.topSplit,o=i.bottomSplit,r=i.columns,a=i.$width,l=i.$height,s=i.$headerHeight,c=r.filter((function(t){return!t.hidden})),u=this.data.getRawData(0,-1,null,2),h=c.findIndex((function(t){return t.id==e})),f=u.findIndex((function(e){return e.id==t}));if((0,d.isDefined)(h)&&(0,d.isDefined)(f)){var p=this.getScrollState(),v=this.selection.getCell(),_=v&&r.findIndex((function(t){return t.id==v.column.id})),m=v&&u.findIndex((function(t){return t.id==v.row.id})),y=(0,w.getCurrFixedCols)(this.config,b.Split.left).length,x=(0,w.getCurrFixedCols)(this.config,b.Split.right).length,C=y&&_<y,S=x&&_>=r.length-x,E=n&&m<n,D=o&&m>=u.length-o,O=(0,g.colsWidth)(this.config,c,0,h),k=(0,g.rowsHeight)(this.config,u,0,f),R=(0,g.getTotalRowHeight)(u[f]);if(y){var T=(0,g.colsWidth)(this.config,c,0,y);(!C&&!S&&h<_||O-p.x-T<0)&&(O-=T)}if(x){var M=(0,g.colsWidth)(this.config,c,c.length-x,c.length);(!C&&!S&&h>_||a+p.x-O-c[h].$width-M<0)&&(O+=M)}if(n){var I=(0,g.rowsHeight)(this.config,u,0,n);(!E&&!D&&f<m||k-p.y-I<0)&&(k-=I)}if(o){var H=(0,g.rowsHeight)(this.config,u,u.length-o,u.length);(!E&&!D&&f>m||l+p.y-s-k-R-H<0)&&(k+=H)}var P=a+p.x,F=l+p.y-s,A=k-p.y-R,$=O-p.x-r[h].$width,j=k+2*R+18-F,L=O+2*r[h].$width+18-P,N=A>0&&j<0?0:A<0?A:j,V=$>0&&L<0?0:$<0?$:L;this.scroll(V+p.x,N+p.y)}},e.prototype.adjustColumnWidth=function(t,e){void 0===e&&(e=!0);var i=this.config.columns.filter((function(t){return!t.hidden})),n=i.filter((function(e){return e.id===t})),o=this._adjustColumnsWidth({rows:this.config.data,cols:n,totalCols:i,adjust:e});this.config.$totalWidth=i.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0),this.paint()},e.prototype.getCellRect=function(t,e){var i,n,o=this.config.columns.filter((function(t){return!t.hidden}));(0,d.isDefined)(e)||(e=this.config.columns[0].id);var r=this.data.getRawData(0,-1),a=this.getSpan(t,e),l=o.findIndex((function(t){return t.id==(a?a.column:e)})),s=r.findIndex((function(e){return e.id==(a?a.row:t)})),c=(0,g.colsWidth)(this.config,o,0,l),u=(0,g.rowsHeight)(this.config,r,0,s);if("bottom"===this.config.footerPosition&&"auto"!==this.config.height&&this.config.$height>=this.config.$totalHeight&&this.config.bottomSplit){var h=r.slice(-this.config.bottomSplit)||[],f=h.findIndex((function(e){return e.id===t}));if(h.length&&-1!==f){var p=(0,w.calcScrollBarWidth)(this.config,!!(null===(i=this.scrollView)||void 0===i?void 0:i.config.enable));u=this.config.$height-this.config.$footerHeight-this.config.$headerHeight-(0,g.rowsHeight)(this.config,r,r.length-this.config.bottomSplit+f,r.length)-p.x-w.BORDERS}}return{x:c,y:u,height:(null==a?void 0:a.rowspan)>1?(0,v.getSpanHeight)(r,a):(0,g.getTotalRowHeight)(r[s])||0,width:(null==a?void 0:a.colspan)>1?(0,v.getWidth)(this.config.columns,a.colspan,this.config.columns.findIndex((function(t){return t.id===a.column}))):(null===(n=o[l])||void 0===n?void 0:n.$width)||0}},e.prototype.getColumn=function(t){for(var e,i=0,n=null===(e=this.config)||void 0===e?void 0:e.columns;i<n.length;i++){var o=n[i];if(o.id==t)return o}},e.prototype.addSpan=function(t){this.config.spans=this.config.spans||[];var e=(0,d.findIndex)(this.config.spans,(function(e){return"".concat(e.row)==="".concat(t.row)&&"".concat(e.column)==="".concat(t.column)}));e>=0?this.config.spans[e]=t:(this.config.spans.push((0,D.normalizeSpan)(t,this.config,this.data)),this._checkMarks(),this.paint())},e.prototype.getSpan=function(t,e){var i,n=this;if(this.config.spans){var o=this.data.getIndex(t.toString()),r=this.config.columns.findIndex((function(t){return t.id===e})),a=(0,d.findIndex)(this.config.spans,(function(t){var e=n.data.getIndex(t.row.toString()),i=n.config.columns.findIndex((function(e){return e.id===t.column})),a=e,l=t.rowspan?e+t.rowspan:e+1,s=i,c=t.colspan?i+t.colspan:i+1;return o>=a&&o<l&&r>=s&&r<c}));return null===(i=this.config)||void 0===i?void 0:i.spans[a]}},e.prototype.removeSpan=function(t,e){if(this.config.spans){var i=(0,d.findIndex)(this.config.spans,(function(i){return"".concat(i.row)=="".concat(t)&&"".concat(i.column)=="".concat(e)}));this.config.spans.splice(i,1),this.paint()}},e.prototype.editCell=function(t,e,i){var n,o=this.data.getItem(t),r=this.getColumn(e);if(o&&r){var a=r.editorType,l=this.getSpan(o.id,r.id);if(!l||"function"!=typeof l.text){if(i||(i=this.config.autoHeight&&"number"!==r.type?"textarea":"input","date"===r.type&&(i="datePicker"),"boolean"===r.type&&(i="checkbox"),a&&(i=a),(0,d.isDefined)(null==l?void 0:l.text)&&(i=this.config.autoHeight?"textarea":"input")),"number"===r.type)if(!((0,d.isDefined)(null==l?void 0:l.text)&&["input","textarea"].includes(i))&&!["input","select","combobox"].includes(i))return;this.events.fire(b.GridEvents.beforeEditStart,[o,r,i])&&((null===(n=this.config.$editable)||void 0===n?void 0:n.editor)||this.config.$editable&&this.config.$editable.row===t&&this.config.$editable.col===e&&this.config.$editable.editorType===i||(this.config.$editable={row:o.id,col:r.id,isSpan:!!l,editorType:i},this.selection.config.disabled||this.selection.setCell(t.toString(),e.toString()),this.paint(),this.events.fire(b.GridEvents.afterEditStart,[o,r,i])))}}else(0,f.dhxWarning)("item not found")},e.prototype.editEnd=function(t){this.config.$editable&&this.config.$editable.editor&&this.config.$editable.editor.endEdit(t)},e.prototype.getHeaderFilter=function(t){var e=this,i=this.getColumn(t);if(i){var n=null;return i.header.forEach((function(o){if(o.content){var r=e.content[o.content];r&&(r.element[t]||r.toHtml(i,e.config),n=r.element[t])}})),n}},e.prototype.getSummary=function(t){return r(r({},this._commonSummary),t?this._colSummary[t]:{})},e.prototype.getSortingState=function(){var t,e=null===(t=this._sortingStates)||void 0===t?void 0:t[0];return{dir:e.dir,by:e.by}},e.prototype._createView=function(){var t=this;return(0,l.create)({render:function(e,i){return t._destructed?(0,l.el)("div"):(0,x.render)(e,i,t._htmlEvents,t.selection,t._uid)},hooks:this._initHooks()},this)},e.prototype._dragInit=function(){(this.config.dragMode||this.config.dragItem)&&(f.dragManager.setItem(this._uid,this),this._dropManager=new O.DropManager({view:this}),this.config.dragItem||(this.config.dragItem="row"),this.config.dragMode||(this.config.dragMode="both"))},e.prototype._parseColumns=function(t){void 0===t&&(t=!1);var e=this.config.columns.filter((function(t){return!t.hidden}));this.config.$filteredColumns=e,this.normalizeColumns({config:this.config,columns:e,configChanged:t}),(0,g.countColumns)(this.config,e)},e.prototype.normalizeColumns=function(t){var e,i,n,o=this,r=t.config,a=t.columns,l=t.configChanged;r.$headerHeightMap=[],r.$footerHeightMap=[],r.$headerHeight=r.$footerHeight=0;for(var s=0,c=a;s<c.length;s++){(p=c[s]).htmlEnable=null!==(e=p.htmlEnable)&&void 0!==e?e:r.htmlEnable,p.$cellCss=p.$cellCss||{},(0,g.normalizeArray)(p,"header"),(0,g.normalizeArray)(p,"footer"),p.minWidth&&p.minWidth<20&&(p.minWidth=20),p.maxWidth&&p.maxWidth<20&&(p.maxWidth=20);var d=p.minWidth||100;p.width&&(d=(d=p.maxWidth&&p.minWidth?p.width>=p.minWidth&&p.width<=p.maxWidth?p.width:p.width>=p.maxWidth?p.maxWidth:p.minWidth:p.maxWidth?p.width<=p.maxWidth?p.width:p.maxWidth>100?p.maxWidth:100:p.minWidth?p.width>=p.minWidth?p.width:p.minWidth:p.width)<20?20:d),p.$width=p.$width&&!l?p.$width:d,p.$width>p.maxWidth&&(p.$width=p.maxWidth),p.$width<p.minWidth&&(p.$width=p.minWidth)}for(var u=function(t){if(null===(i=t.header)||void 0===i?void 0:i.length){var e=0;t.header.forEach((function(i,n){(e=r.headerAutoHeight?o.getNormalizeContentHeight(i,t,r):r.headerRowHeight)>(r.$headerHeightMap[n]||0)&&(r.$headerHeightMap[n]=Math.max(e,r.headerRowHeight))}))}if(null===(n=t.footer)||void 0===n?void 0:n.length){var a=0;t.footer.forEach((function(e,i){(a=r.footerAutoHeight?o.getNormalizeContentHeight(e,t,r):r.footerRowHeight)>(r.$footerHeightMap[i]||0)&&(r.$footerHeightMap[i]=Math.max(a,r.footerRowHeight))}))}},h=0,f=a;h<f.length;h++){var p;u(p=f[h])}r.$headerHeight=r.$headerHeightMap.reduce((function(t,e){return t+e}),0),r.$footerHeight=r.$footerHeightMap.reduce((function(t,e){return t+e}),0)},e.prototype.getNormalizeContentHeight=function(t,e,i){return this.config.footerRowHeight},e.prototype._parseData=function(){this._rowHeightsRebuild=!0,this._detectColsTypes(),this.config.data=this.data.map((function(t){return t})),this.config.data=this._prepareData(this.data),this._checkMarks(),this._applyLocalFilter(),this._checkFilters()},e.prototype._createCollection=function(){this.data=new f.DataCollection(null,this.events)},e.prototype._getRowIndex=function(t){return this.data.getIndex(t)},e.prototype._setHTMLEventHandlers=function(){var t=this,e=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id"));if(o&&n&&(0,_.isTooltip)(t.config,n)){var a=void 0;if("combobox"===n.editorType||"select"===n.editorType){var l=(0,g.getEditorOptions)(n,o).find((function(t){var e;return(t instanceof Object?t.id.toString():t)===(null===(e=o[n.id])||void 0===e?void 0:e.toString())}));a=l instanceof Object?l.value:l}else if("multiselect"===n.editorType){var s=null===(i=o[n.id])||void 0===i?void 0:i.toString().split(", ");if(null==s?void 0:s.length)a=(0,g.getEditorOptions)(n,o).filter((function(t){return s.includes(t instanceof Object?t.id.toString():t)})).map((function(t){return t instanceof Object?t.value:t})).join(", ")}var d=(0,g.applyPattern)(a||o[n.id],n),u=function(){return!!d||"boolean"==typeof d};n.tooltipTemplate?d=n.tooltipTemplate(d,o,n)||null:u()&&n.template&&(d=n.template(d,o,n)),u()&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,n)))}},i=function(e,i){var n;void 0===i&&(i="header");var o=(0,c.locate)(e,"data-dhx-text-id"),a=(0,c.locate)(e,"data-dhx-id"),l=t.getColumn(a);if(o&&l){var s=null===(n=l[i])||void 0===n?void 0:n.find((function(t){return t.id===o}));if((0,_.isContentTooltip)(t.config,l,s,i)){var d=null==s?void 0:s.text,u=t.getSummary(l.id);"function"==typeof d&&(d=d(u)),"function"==typeof(null==s?void 0:s.tooltipTemplate)&&(d=s.tooltipTemplate(r({value:d},u),s,l)||null),(null==d?void 0:d.toString().length)&&(0,_.showTooltip)(d,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,l,s)},(0,_.getTooltipConfig)(t.config,l,s,i)))}}},n=function(e){var i,n=t.getColumn((0,c.locate)(e,"data-dhx-col-id")),o=t.data.getItem((0,c.locate)(e,"data-dhx-id")),a=t.getSpan(o.id,n.id);if(o&&a&&(0,_.isTooltip)(t.config,a)){var l=t.getSummary(n.id),s=null===(i=("function"==typeof a.text?a.text(l):a.text)||(0,g.applyPattern)(o[n.id],n))||void 0===i?void 0:i.toString();a.tooltipTemplate?s=a.tooltipTemplate(r({value:s},l),a)||null:n.template&&(s=n.template(s,o,n)),s&&(0,_.showTooltip)(s,r({node:e,htmlEnable:(0,_.isHtmlEnable)(t.config,n)},(0,_.getTooltipConfig)(t.config,null,a)))}};this._htmlEvents={onclick:(0,c.eventHandler)((function(t){return(0,c.locate)(t)}),{"dhx_grid-header-cell--sortable":function(e,i){var n=e.target.getAttribute("dhx_resized"),o=t.getColumn(i);if(o&&(0,_.isSortable)(t.config,o)&&!n){var r=(0,c.locate)(e,"data-dhx-text-id"),a=o.header.find((function(t){return t.id===r}));t._sort(i,a.sortAs)}},"dhx_grid-expand-cell":function(e,i){e.target.classList.contains("dhx_grid-expand-cell-icon")&&t.events.fire(b.GridEvents.expand,[i])},"dhx_span-expand-cell":function(e,i){e.target.classList.contains("dhx_span-expand-cell-icon")&&t.events.fire(b.GridEvents.expand,[i])}}),onscroll:function(e){t.events.fire(b.GridEvents.scroll,[{y:e.target.scrollTop,x:e.target.scrollLeft}])},onmouseover:function(t){for(var o=[{className:"dhx_grid-header-cell",action:function(t){return i(t,"header")}},{className:"dhx_grid-footer-cell",action:function(t){return i(t,"footer")}},{className:"dhx_grid-cell",action:e},{className:"dhx_span-cell",action:n}],r=0,a=o;r<a.length;r++){var l=a[r],s=l.className,d=l.action,u=(0,c.locateNodeByClassName)(t,s);if(u){d(u);break}}}}},e.prototype._setEventHandlers=function(){var t=this;this.data.events.on(f.DataEvents.load,(function(){if(t._applyLocalFilter(!0),t._parseData(),t._parseColumns(),t.config.autoEmptyRow){var e=t.data.find({by:"$emptyRow",match:!0});e?t.data.move(e.id,t.data.getLength()-1):t._addEmptyRow()}t.config.data instanceof f.DataCollection?(0,l.awaitRedraw)().then((function(){return t._normalizeSpans()})):t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.change,(function(e,i,n){if("load"!==i&&"add"!==i&&"remove"!==i)if(t._rowHeightsRebuild=!0,"setPage"!==i){if("sort"===i?t._setSort():"update"===i?t.config.data=t._prepareData(t.data):((0,f.isTreeCollection)(t.data)?t.config.data=t._prepareData(t.data):t._setSummary(),t._adjustColumns()),(0,d.isId)(e)&&(t._checkFilters(),t._checkSelectFilterValue()),t._detectColsTypes(),t._removeMarks(),t._checkMarks(),t.config.autoEmptyRow&&(!t._activeFilters||(0,d.isEmptyObj)(t._activeFilters))){var o=t.data.find({by:"$emptyRow",match:!0});if(o){if(o.id===e)return;t.data.move(o.id,t.data.getLength()-1)}else t._addEmptyRow()}if("sort"===i)t._normalizeSpans();t._render()}else(0,l.awaitRedraw)().then((function(){var e=t.config.columns.find((function(t){return!0!==t.hidden}));t.scrollTo(t.data.getId(n[0]).toString(),e.id.toString()),t._render()}))})),this.data.events.on(f.DataEvents.filter,(function(e){t._rowHeightsRebuild=!0,e||t.data.getRawFilters({permanent:!0})||t._applyLocalFilter(),!e||(0,f.isOnlyPermanentFilters)(e)?(t._filterData=t.data.map((function(t){return t}))||[],t._setUniqueData(),t._clearFilterValue()):t._checkFilters(),t._setSummary(),t._removeMarks(),t._checkMarks(),t._normalizeSpans(),t.paint()})),this.data.events.on(f.DataEvents.removeAll,(function(){t._hiddenFilters={},t.config.columns.map((function(t){t.header.map((function(e){!e.content||"selectFilter"!==e.content&&"comboFilter"!==e.content||(t.$uniqueData=[])}))})),(0,d.isEmptyObj)(t._activeFilters)||t.data.resetFilter(),t._clearFilterValue(!0)})),this.data.events.on(f.DataEvents.afterAdd,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"add")})),this.data.events.on(f.DataEvents.afterRemove,(function(e,i,n){i.length===++n&&t._handleRow(e.id,"remove")})),this.events.on(f.DragEvents.beforeDrag,(function(e,i,n,o){if("row"===o)return!t.data.isGrouped()&&t.events.fire(b.GridEvents.beforeRowDrag,[e,i])})),this.events.on(f.DragEvents.dragStart,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowStart,[e,i]),t._autoScroll("vertical")})),this.events.on(f.DragEvents.dragIn,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowIn,[e,i])})),this.events.on(f.DragEvents.dragOut,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.dragRowOut,[e,i])})),this.events.on(f.DragEvents.canDrop,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.canRowDrop,[e,i])})),this.events.on(f.DragEvents.cancelDrop,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.cancelRowDrop,[e,i])})),this.events.on(f.DragEvents.beforeDrop,(function(e,i,n){if("row"===n)return t.events.fire(b.GridEvents.beforeRowDrop,[e,i])})),this.events.on(f.DragEvents.afterDrop,(function(e,i,n){var o,r=e.source,l=e.target,s=e.start;if("row"===n){var c=t.data.getItem(e.start);if(!c||r.some((function(t){return t==l})))return;for(var d=0,u=t.config.columns;d<u.length;d++){var h=u[d];void 0===c[h.id]&&t.data.update(c.id,((o={})[h.id]=null,o),!0)}var f=t.data.getInitialData(),p=null==f?void 0:f.findIndex((function(t){return t.id==s})),g=null==f?void 0:f.findIndex((function(t){return t.id==l}));if(p>-1&&g>-1)if((null==r?void 0:r.length)>1){for(var v=[],_=function(t){var e=null==f?void 0:f.findIndex((function(e){return e.id==t})),i=null==f?void 0:f.splice(e,1)[0];v.push(i)},m=0,y=r;m<y.length;m++){_(y[m])}g=null==f?void 0:f.findIndex((function(t){return t.id==l})),g>0&&++g,null==f||f.splice.apply(f,a([g,0],v,!1))}else null==f||f.splice(g,0,null==f?void 0:f.splice(p,1)[0]);t._rowHeightsRebuild=!0,t._adjustColumns(),t._checkFilters(),t.paint(),t.events.fire(b.GridEvents.afterRowDrop,[e,i])}})),this.events.on(f.DragEvents.afterDrag,(function(e,i,n){if("row"===n)t.events.fire(b.GridEvents.afterRowDrag,[e,i]),t._normalizeSpans()})),this.events.on(b.GridEvents.dragPanelItemMouseDown,(function(e,i){t._dragProcess(i,t.data.getItem(e))})),this.events.on(b.GridEvents.cellMouseDown,(function(e,i,n){!t.config.dragPanel&&t._dragProcess(n,e,i)})),this._events.on(b.GridSystemEvents.cellTouchMove,(function(e,i,n){t._touch.start&&n.preventDefault(),t._clearTouchTimer()})),this._events.on(b.GridSystemEvents.cellTouchEnd,(function(){t._touch.start=!1,t._clearTouchTimer()})),this.events.on(b.GridEvents.filterChange,(function(e,i,n,o){var r,a,l;if(t.events.fire(b.GridEvents.beforeFilter,[e,i])){if(t.config.autoEmptyRow){var s=t.data.find({by:"$emptyRow",match:!0});s&&t.data.remove(s.id)}t._activeFilters||(t._activeFilters={});var c=t.getColumn(i),d=c.header.filter((function(t){return t.content===n&&void 0!==t.customFilter}))[0];if("comboFilter"===n&&void 0!==e||"comboFilter"!==n&&""!==e){var u=(0,g.getEditorOptions)(c);"combobox"!==c.editorType&&"select"!==c.editorType&&"multiselect"!==c.editorType||!u||(e=Array.isArray(e)?e.map((function(t){var e;return(null===(e=u.find((function(e){return"string"==typeof e?e===t:e.value===t})))||void 0===e?void 0:e.id)||t})):null!==(a=null===(r=u.find((function(t){return"string"==typeof t?t===e:t.value===e})))||void 0===r?void 0:r.id)&&void 0!==a?a:e);t._activeFilters[i]={by:i,match:e,compare:null!==(l=null==d?void 0:d.customFilter)&&void 0!==l?l:function(e){var i=t.getColumn(e);return function(e,o,r,a){return t.content[n].match({val:e,match:o,obj:r,multi:a,col:i})}}(i),multi:"multiselect"===(null==c?void 0:c.editorType)}}else delete t._activeFilters[i];o||t.data.filter(t._activeFilters)}})),this.events.on(b.GridEvents.scroll,(function(e){t._scroll={top:e.y,left:e.x},t.paint()})),this.events.on(b.GridEvents.cellDblClick,(function(e,i,n){e&&((0,c.locateNodeByClassName)(n,"dhx_boolean-cell")||e.hasOwnProperty("$group")||(!1!==i.editable&&t.config.editable||i.editable)&&t.editCell(e.id,i.id,i.editorType))})),this.events.on(b.GridEvents.afterEditEnd,(function(e,i,n){t._afterEditEndProcess(e,i,n)})),this.events.on(b.GridEvents.headerCellMouseDown,(function(e,i,n){var o=n.target.getAttribute("dhx_resized");if(o&&t.events.fire(b.GridEvents.beforeResizeStart,[i,n])&&(0,S.startResize)(t,o.toString(),n,(function(){t.paint(),t.config.$resizing=null,t.events.fire(b.GridEvents.afterResizeEnd,[i,n])})),n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(b.GridEvents.headerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(b.GridEvents.footerCellDblClick,(function(e,i,n){if(n.targetTouches){if(t._touch.timeStamp)t._touch.dblDuration>=t._touch.timeStamp-+n.timeStamp.toFixed()&&(n.preventDefault(),t.events.fire(b.GridEvents.footerCellDblClick,[e,i,n])),t._touch.timeStamp=null;else t._touch.timeStamp=+n.timeStamp.toFixed();setTimeout((function(){t._touch.timeStamp=null}),t._touch.dblDuration)}})),this.events.on(b.GridEvents.resize,(function(){return t._parseColumns()})),this.events.on(b.GridEvents.afterResizeEnd,(function(e){var i;t.config.columns=null===(i=t.config.columns)||void 0===i?void 0:i.map((function(t){return t.id==e.id&&(t.width=e.$width),t})),t._parseColumns()}))},e.prototype._afterEditEndProcess=function(t,e,i){var n,o,a=this;if(!(null===(o=this.config.$editable)||void 0===o?void 0:o.editor)||this.config.$editable.col===i.id&&this.config.$editable.row===e.id){var s,c;this.config.$editable?(s=this.config.$editable.row,c=this.config.$editable.col):(s=e.id,c=i.id);var u=this.getSpan(s,c);if((0,d.isDefined)(null==u?void 0:u.text)&&(0,d.isDefined)(t))u.text=t.toString();else{var h=this.data.getItem(s);delete h.$emptyRow,(0,d.isDefined)(t)&&this.data.update(s,r(r({},h),((n={})[c]=t,n)))}this.config.$editable=null,this.paint(),(0,l.awaitRedraw)().then((function(){var t;null===(t=a.selection)||void 0===t||t.restoreFocus()}))}},e.prototype._addEmptyRow=function(){var t=this.data.getId(this.data.getLength()-1),e=this.data.getItem(t),i=this.config.columns.filter((function(t){return!t.hidden}));(0,_.isRowEmpty)(e)||this.data.add(i.reduce((function(t,e){return t[e.id]="",t}),{$emptyRow:!0}))},e.prototype._sort=function(t,e,i){void 0===i&&(i=this.config.multiSort);var n=this.getColumn(t),o=this._sortingStates.find((function(e){return e.by==t}));if(this.events.fire(b.GridEvents.beforeSort,[n,"asc"===(null==o?void 0:o.dir)?"desc":"asc"])){var r="asc";(null==o?void 0:o.by)===t&&(r="asc"===o.dir?"desc":"asc");this.data.sort({by:t,dir:r,as:null!=e?e:function(t){return t&&"date"===n.type?(0,w.getNormalizeDateObject)(t,n.dateFormat).getTime():t?"".concat(t):""}},{smartSorting:i}),this.events.fire(b.GridEvents.afterSort,[n,r])}},e.prototype._setSort=function(){var t,e=null===(t=this.data.getSortingStates())||void 0===t?void 0:t[0];this._sortingStates=e&&[e]||[]},e.prototype._clearTouchTimer=function(){this._touch.timer&&(clearTimeout(this._touch.timer),this._touch.timer=null)},e.prototype._checkFilters=function(t){if(void 0===t&&(t=!1),(0,d.isEmptyObj)(this._activeFilters))t&&this.data.resetFilter(),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData();else{var e=this.data.getRawFilters({permanent:!0});this.data.filter(e,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(),this.data.filter(null,{$restore:!0},!0),this._filterData=this.data.map((function(t){return t}))||[],this._setUniqueData(!0)}},e.prototype._setUniqueData=function(t){var e=this;void 0===t&&(t=!1),this._filterData&&this.config.columns.forEach((function(i){i.header.forEach((function(n){var o;if(!(null===(o=e._activeFilters)||void 0===o?void 0:o[i.id])&&n.content&&("selectFilter"===n.content||"comboFilter"===n.content)){var r=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.multiselection})),a=i.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}));if(!t||t&&!a){var l=(0,g.getNormalizeFilterData)(e._filterData,i.id,r,i.editorType),s=(0,g.getEditorOptions)(i);"combobox"!==i.editorType&&"select"!==i.editorType&&"multiselect"!==i.editorType||!s||(l=l.map((function(t){var e=s.find((function(e){return"string"==typeof e?t===e:t===e.id}));return e&&"string"!=typeof e?e.value:t}))),l="string"!==i.type?Array.from(new Set(l.map((function(t){return(0,g.applyPattern)(t,i)})))):l,t?i.$activeFilterData=l:(i.$uniqueData=l,i.$activeFilterData&&delete i.$activeFilterData)}}}))}))},e.prototype._checkSelectFilterValue=function(){var t,e=null===(t=this.content)||void 0===t?void 0:t.selectFilter;if(e)for(var i in e.value){var n=this.getColumn(i),o=e.value[i];n.hidden||!o||n.$uniqueData.includes(o)||e.element[i].clear()}},e.prototype._clearFilterValue=function(t){var e=this;void 0===t&&(t=!1),["selectFilter","inputFilter","dateFilter"].map((function(t){var i;return null===(i=e.content)||void 0===i?void 0:i[t]})).filter((function(t){return t})).forEach((function(i){for(var n in i.value)!i.value[n]||!t&&e.getColumn(n).hidden||i.element[n].clear(!0)}))},e.prototype._adjustColumns=function(){var t=this,e=this.config.columns.filter((function(t){return!t.hidden})),i=[],n=[],o={};if(e.forEach((function(t){(0,d.isDefined)(t.adjust)?t.adjust&&i.push(t):n.push(t)})),i.length||n.length){var a=this.config.data&&this.config.data.length?this.config.data:this.data.map((function(t){return t}));i.forEach((function(i){o=r(r({},o),t._adjustColumnsWidth({rows:a,cols:[i],totalCols:e,adjust:i.adjust}))})),n.length&&(o=r(r({},o),this._adjustColumnsWidth({rows:a,cols:n,totalCols:e})))}this.config.$totalWidth=e.reduce((function(t,e){if(o[e.id]){e.$fixedWidth=!0;var i=e.maxWidth,n=e.minWidth,r=o[e.id];e.$width=r,i&&r>i&&(e.$width=i),n&&e.$width<n&&(e.$width=n)}return t+e.$width}),0)},e.prototype._prepareData=function(t){var e=this;return(this.config.autoHeight||this.config.headerAutoHeight||this.config.footerAutoHeight)&&(this.config.autoHeight=this.config.headerAutoHeight=this.config.footerAutoHeight=!1),this._normalizeDataType(),this._setSummary(),this._adjustColumns(),t.map((function(t){return t.$height=Number(t.height)||e.config.rowHeight,t}))},e.prototype._adjustColumnsWidth=function(t){var e,i,n,o,r=this,a=t.rows,l=t.cols,s=t.adjust,c=void 0===s?this.config.adjust:s,d={};if("header"===c||!0===c){var u=l.filter((function(t){return t.header}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"header"),u,{font:"normal 14.4px Arial"},"header"))for(var h=0,f=Object.entries(y);h<f.length;h++){var p=f[h],v=p[0],m=p[1];d=Object.assign(d,((e={})[v]=+m+24+(o=this.getColumn(v),(0,_.isSortable)(r.config,o)?16:0),e))}}if("footer"===c||!0===c){var y;u=l.filter((function(t){return t.footer}));if(y=(0,g.getMaxColsWidth)(this._prepareColumnData(u,"footer"),u,{font:"normal 14.4px Arial"},"footer"))for(var b=0,x=Object.entries(y);b<x.length;b++){var w=x[b];v=w[0],m=w[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((i={})[v]=+m+24,i)))}}if(("data"===c||!0===c)&&(y=(0,g.getMaxColsWidth)(a,l,{font:"normal 14.4px Arial"},"data")))for(var C=0,S=Object.entries(y);C<S.length;C++){var E=S[C];v=E[0],m=E[1];(d[v]&&d[v]<+m+24||!d[v])&&(d=Object.assign(d,((n={})[v]=+m+24,n)))}return d},e.prototype._prepareColumnData=function(t,e){for(var i,n,o,a=[],l=0;l<t.length;l++){for(var s=[],c=t[l],d=0;d<(null==c?void 0:c[e].length);d++){var u={},h=null===(n=null==c?void 0:c[e][d])||void 0===n?void 0:n.text;if(h){"function"==typeof h&&(h=h(this.getSummary(c.id)));var f=null===(o=null==c?void 0:c[e][d])||void 0===o?void 0:o.htmlEnable;u[c.id]=h||"",f&&(u[c.id]=(0,_.removeHTMLTags)(u[c.id]))}else u[c.id]="";s.push(u)}for(var p=0;p<s.length;p++)for(var g=0,v=Object.entries(s[p]);g<v.length;g++){var m=v[g],y=m[0],b=m[1];a[p]=r({},a[p])||{},a[p]=Object.assign(a[p],((i={})[y]=b,i))}}return a},e.prototype._dragStart=function(t){if(this.config.dragMode&&("row"===this.config.dragItem||"both"===this.config.dragItem)&&!this.config.$editable){var e=this.data.getItem((0,c.locate)(t,"data-dhx-id")).id;t.targetTouches&&(this._touch.start=!0),f.dragManager.onMouseDown({event:t,source:[e],itemsForGhost:[this._getRowGhost([e])],type:"row"})}},e.prototype._dragProcess=function(t,e,i){var n=this;if(t.targetTouches){if(this._touch.timer=setTimeout((function(){n._dragStart(t)}),this._touch.duration),this._touch.timeStamp)this._touch.dblDuration>=this._touch.timeStamp-+t.timeStamp.toFixed()&&((!1!==i.editable&&this.config.editable||i.editable)&&this.editCell(e.id,i.id,i.editorType),t.preventDefault(),this.events.fire(b.GridEvents.cellDblClick,[e,i,t])),this._touch.timeStamp=null;else this._touch.timeStamp=+t.timeStamp.toFixed();setTimeout((function(){n._touch.timeStamp=null}),this._touch.dblDuration)}else this._dragStart(t)},e.prototype._getRowGhost=function(t){for(var e,i=this.config,n=i.$totalWidth,o=i.$width,r=this.getRootNode(),a=(0,w.getCurrFixedCols)(this.config,b.Split.left),l=(0,w.getCurrFixedCols)(this.config,b.Split.right),s=(0,w.calcScrollBarWidth)(this.config,!!(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)),d=[],u=function(e){var i=t[e],u=(0,k.getRowNode)(i,r);if(!u)return"continue";var h=n>o-s.y?o-s.y-w.BORDERS:n;if(a.length||l.length){var f=new Array(3);if(f[1]=u,a.length){var p=(0,k.getRowNode)(i,r,"left");h-=p.offsetWidth,f[0]=p}if(l.length){var g=(0,k.getRowNode)(i,r,"right");h-=g.offsetWidth,f[2]=g}var v=document.createElement("div");return v.style.display="flex",f.forEach((function(t){if(t){var e=t.cloneNode(!0);if(t===u){var i=(0,c.getNodeOffset)(t,r).left-(0,_.getTotalWidth)(a)-w.BORDERS/2;v.appendChild((0,k.getVisibleRowNode)(e,h,i))}else e.removeAttribute("aria-rowindex"),e.style.width=t.offsetWidth+"px",v.appendChild(e)}})),{value:v}}var m=u.cloneNode(!0);d.push((0,k.getVisibleRowNode)(m,h,(0,c.getNodeOffset)(u,r).left-w.BORDERS/2))},h=0;h<t.length;h++){var f=u(h);if("object"==typeof f)return f.value}var p=document.createElement("div");return p.style.setProperty("width","initial","important"),d.forEach((function(t){return p.appendChild(t)})),p},e.prototype._initHooks=function(){var t=this;return{didMount:function(){t._canDataParse(!0)&&(t._container||t._applyAutoWidth(),t.data.parse(t.config.data)),t.config.autoWidth&&t._parseColumns(),t.config.keyNavigation&&(t.keyManager&&t.keyManager.destructor(),t.keyManager=new u.KeyManager((function(e,i){return!(i!==t._uid||!t.events.fire(b.GridEvents.beforeKeyDown,[e]))&&(t.events.fire(b.GridEvents.afterKeyDown,[e]),!0)})),t._initHotKey())}}},e.prototype._normalizeDataType=function(){var t=this,e=this.config.columns.reduce((function(t,e){return"number"===e.type&&t.push(e),t}),[]);e.length&&this.data.forEach((function(i){for(var n,o=0,r=e;o<r.length;o++){var a=r[o],l=(0,g.getValueForNumberColumn)(a,i[a.id]);if(Number.isNaN(l)&&!i.$group)throw new Error("Incorrect data in column with type 'number', see docs: https://docs.dhtmlx.com/suite/grid/api/api_gridcolumn_properties/");i[a.id]!==l&&t.data.update(i.id,((n={})[a.id]=l,n),!0)}}))},e.prototype._applyLocalFilter=function(t){void 0===t&&(t=!1);var e={add:!0,permanent:!0,$local:!0},i=this.data.getRawFilters(),n=Object.keys(i||{}).find((function(t){return i[t].config.$local}));n&&(e.id=n),t?this.data.filter((function(t){return t}),e,!0):this.data.filter((function(t){return t&&!t.hidden}),e,!0)},e.prototype._normalizeSpans=function(){var t,e=this;this.config.spans=null===(t=this.config.spans)||void 0===t?void 0:t.map((function(t){return(0,D.normalizeSpan)(t,e.config,e.data)}))},e.prototype._hideColumn=function(t){t.hidden=!0,this.config.$totalWidth-=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._activeFilters&&this._activeFilters[t.id];e&&(this._hiddenFilters||(this._hiddenFilters={}),this._hiddenFilters[t.id]=e,delete this._activeFilters[t.id],this._checkFilters()),this._normalizeSpans(),this.paint()},e.prototype._showColumn=function(t){t.hidden=!1,this.config.$totalWidth+=t.$width,this._parseColumns(),this.config.data=this._prepareData(this.data);var e=this._hiddenFilters&&this._hiddenFilters[t.id];e&&(this._activeFilters[t.id]=e,delete this._hiddenFilters[t.id],this._checkFilters(),this._checkSelectFilterValue()),this._normalizeSpans(),this.paint()},e.prototype._setSummary=function(){var t=this,e=this.data.map((function(t){return t})).filter((function(t){return t!=t.$group&&t!=t.$groupSummary}));"tree"===this.config.type&&(e=e.filter((function(e){return!t.data.haveItems(e.id)}))),this.config.summary&&Object.entries(this.config.summary).forEach((function(i){var n=i[0],o=i[1];t._commonSummary[n]=t._applyMethod(o,e)})),this.config.columns.forEach((function(i){var n;if(i.summary){var o=i.id,r=i.summary;t._colSummary[o]||(t._colSummary[o]={}),"string"==typeof r?t._colSummary[o][r]=null===(n=f.methods[r])||void 0===n?void 0:n.call(f.methods,e,o):Object.entries(r).forEach((function(i){var n=i[0],r=i[1];t._colSummary[o][n]=t._applyMethod(r,e,o)}))}}))},e.prototype._init=function(){this.events=new s.EventSystem(this),this._events=new s.EventSystem(this),this._attachDataCollection(),this.export=new p.Exporter({name:"grid",version:this.version,view:this,export:null}),this._setEventHandlers()},e.prototype._observeResize=function(t){var e=this;t&&t!==this._observedEl&&(this._resizeObserver||"undefined"==typeof ResizeObserver||(this._resizeObserver=new ResizeObserver((function(t){var i,n=null===(i=t[0])||void 0===i?void 0:i.target;if(n&&n.clientWidth){var o=getComputedStyle(n),r=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight)||0,a=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)||0,l=n.clientWidth-r,s=n.clientHeight-a;if(!e._cachedSizes||e._cachedSizes.width!==l||e._cachedSizes.height!==s){var c=!!e._cachedSizes;e._cachedSizes={width:l,height:s},c&&!e._destructed&&e.paint()}}}))),this._resizeObserver&&(this._observedEl&&this._resizeObserver.unobserve(this._observedEl),this._resizeObserver.observe(t),this._observedEl=t,this._cachedSizes=null))},e.prototype._applyMethod=function(t,e,i){var n;return"function"==typeof t?t(e):"string"==typeof t&&(null===f.methods||void 0===f.methods?void 0:f.methods[t])?null===f.methods||void 0===f.methods?void 0:f.methods[t](e,i):Array.isArray(t)&&(null===f.methods||void 0===f.methods?void 0:f.methods[null==t?void 0:t[1]])?null===(n=f.methods[t[1]])||void 0===n?void 0:n.call(f.methods,e,t[0]):null},e.prototype._canDataParse=function(t){var e;return void 0===t&&(t=!1),!!((null===(e=this.config.data)||void 0===e?void 0:e.length)&&this.config.data instanceof Array&&this.config.columns)&&(this.config.autoWidth&&this.config.autoHeight?t:!t)},e.prototype._attachDataCollection=function(){if(this.config.data instanceof f.DataCollection)return this.data=this.config.data,this.data.config.collapsed=this.config.collapsed,void(this.config.data=this.data.serialize());this._createCollection()},e.prototype._setMarks=function(t,e){for(var i=[],n=0,o=this.data.map((function(e){return i.push(e[t.id]),{id:e.id,data:e[t.id],row:e}}));n<o.length;n++){var r=o[n],a=e(r.data,i,r.row,t);a&&(t.$cellCss=t.$cellCss||{},t.$cellCss[r.id]+=" "+a)}},e.prototype._checkMarks=function(){var t=this;this.config.columns.map((function(e){var i=e.mark;i&&("function"==typeof i?t._setMarks(e,i):t._setMarks(e,(function(t,e){var n=[];e.forEach((function(t){null!=t&&""!==t&&n.push(parseFloat(t))}));var o=(0,d.getMinArrayNumber)(n),r=(0,d.getMaxArrayNumber)(n);return i.max&&r===parseFloat(t)?i.max:!(!i.min||o!==parseFloat(t))&&i.min})))}))},e.prototype._removeMarks=function(){this.config.columns.forEach((function(t){t.mark&&(t.$cellCss={})}))},e.prototype._detectColsTypes=function(){this.config.columns.forEach((function(t){return t.type?t:t.numberMask?(t.type="number",t):void(t.type||(t.type="string"))}))},e.prototype._destroyContent=function(){for(var t in this.content)"function"==typeof this.content[t].destructor&&this.content[t].destructor()},e.prototype._render=function(){this.paint()},e.prototype._initHotKey=function(t){void 0===t&&(t=!1);var e=(0,E.getKeysHandlers)(this);for(var i in e)this.keyManager.exist(i)||this.keyManager.addHotKey(i,e[i]);if(!t)for(var i in this.config.hotkeys)this.keyManager.addHotKey(i,this.config.hotkeys[i])},e.prototype._normalizeConfig=function(t){return Object.keys(t).forEach((function(e){e.startsWith("$")&&delete t[e]})),t},e.prototype._autoScroll=function(t){var e,i,n,o,r=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):null===(n=this.getRootNode())||void 0===n?void 0:n.querySelector(".dhx_grid-body");if(r){var a=null,l=r.getBoundingClientRect(),s=l.top,c=l.bottom,d=l.left,u=l.right,h=l.height,f=l.width,p=30,g=this.config.dragPanel?(null===(o=this.config.dragPanel)||void 0===o?void 0:o.width)||R.defaultDragPanelConfig.width:0,v=function(t,e){t&&r.scrollBy("left"===t?-40:40,0),e&&r.scrollBy(0,"up"===e?-40:40),(t||e)&&(a=setTimeout((function(){v(t,e)}),100))},_=function(e){var i=e.clientX,n=e.clientY,o=null,r=null;switch(t){case"horizontal":i>u-p&&i<u&&n>s&&n<c?o="right":i>d&&i<d+p&&n>s&&n<c&&(o="left");break;case"vertical":n>c-p&&n<c&&i>d-g&&i<u?r="down":n>s&&n<s+p&&i>d-g&&i<u&&(r="up");break;case"auto":i>u-p&&i<u&&n>s&&n<c?o="right":i>d&&i<d+p&&n>s&&n<c&&(o="left"),n>c-p&&n<c&&i>d-g&&i<u?r="down":n>s&&n<s+p&&i>d-g&&i<u&&(r="up")}o||r?a||v(o,r):a&&(clearTimeout(a),a=null)};(f<r.scrollWidth||h<r.scrollHeight)&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",(function(){document.removeEventListener("pointermove",_),a&&clearTimeout(a)}),{once:!0}))}},e.prototype._applyAutoWidth=function(){var t,e,i,n,o=this._container||(null===(i=null===(e=null===(t=this.getRootView())||void 0===t?void 0:t.node)||void 0===e?void 0:e.parent)||void 0===i?void 0:i.el);if(o){var r=(0,x.getElementSizes)(o),a=null===(n=this.scrollView)||void 0===n?void 0:n.config.enable;(0,x.applyAutoWidth)(this.config,r,a)}},e.prototype._handleRow=function(t,e){if(this._rowHeightsRebuild=!0,(0,d.isId)(t)&&"remove"===e){var i=this.selection.getCells().find((function(e){return e.row.id===t}));i&&this.selection.removeCell(i.row.id,i.column.id)}if(this.config.data=this._prepareData(this.data),(0,d.isId)(t)&&(this._checkFilters(),this._checkSelectFilterValue()),this._detectColsTypes(),this._removeMarks(),this._checkMarks(),this.config.autoEmptyRow&&(!this._activeFilters||(0,d.isEmptyObj)(this._activeFilters))){var n=this.data.find({by:"$emptyRow",match:!0});if(n){if(n.id===t)return;this.data.move(n.id,this.data.getLength()-1)}else this._addEmptyRow()}this._normalizeSpans(),this._render()},e}(h.View);e.Grid=T},function(t,e,i){"use strict";(function(t){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,i,n,o){return new(n||(n=t))((function(t,r){function a(t){try{s(o.next(t))}catch(t){r(t)}}function l(t){try{s(o.throw(t))}catch(t){r(t)}}function s(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(t){t(i)}))).then(a,l)}s((o=o.apply(e,i||[])).next())}))},r=this&&this.__generator||function(t,e){var i,n,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(l){return function(s){return function(l){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(a=0)),a;)try{if(i=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t],n=0}finally{i=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Exporter=void 0;var l=i(5),s=i(8),c=i(0),d=i(13),u=i(2),h=i(1),f=i(18),p=i(4),g=function(){function e(t){this._xlsxWorker=null,this._name=t.name,this._version=t.version,this._grid=t.view,this._exportConfigCallback=t.export}return e.prototype.pdf=function(t){return this._rawExport(t,"pdf")},e.prototype.png=function(t){return this._rawExport(t,"png")},e.prototype.xlsx=function(t){void 0===t&&(t={});var e=this._getExportConfig("xlsx");return this._xlsxExport(n({url:"https://cdn.dhtmlx.com/libs/json2excel/next/worker.js?vx",name:"grid",tableName:"data"},t),e)},e.prototype.csv=function(e){var i=this;return void 0===e&&(e={}),new t((function(t){var o,r=i._getExportConfig("csv"),a=(e=n(n({asFile:!0,rowDelimiter:"\n",columnDelimiter:",",skipHeader:0},e),r.typeConfig||{})).name||"grid";o="getRoot"in i._grid.data&&e.flat?i.getFlatCSV(e,r):i._getCSV(e,r),e.asFile&&(0,c.downloadFile)(o,"".concat(a,".csv"),"text/csv"),t(o)}))},e.prototype._getExportData=function(t,e){var i,o=this;if(void 0===t&&(t={}),!(0,l.isWasmSupported)())throw new Error("WebAssembly is not supported by your browser");var r={number:"#,##0.00",percent:"#,##0.00%",date:t.dateFormatMask||"dd/mm/yy",string:"@"},a=this._getExportWidget(null,e),s=a.config.columns.filter((function(t){return!t.hidden})),u=a._colSummary;if(!s.length)return{data:[{name:t.tableName||"data",cols:[],rows:[],merged:[],cells:[]}],styles:[]};var h={},g={},_=(0,l.transpose)(s.map((function(t){return(t.header||[]).map((function(e){var i=e.text;return i?(0,l.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):""}))}))),y=(0,l.transpose)(s.map((function(t){return(t.footer||[]).map((function(e){var i=e.text;return{text:i?(0,l.removeHTMLTags)("string"==typeof i?i||"":i(u[t.id])):"",content:t.summary,col_id:t.id}}))}))),b=[],x=[],w=new Map;w.set("default",{css:{color:"#000000",background:"#FFFFFF",fontSize:14},index:w.size});var C=new Map,S={},E={},D=a.config.$headerHeightMap.map((function(t){return{height:t}})),O=e.data.map((function(t,i){D.push({height:t.$height});var n="function"==typeof e.rowCss?e.rowCss(t):"";(t.$css||n)&&(E[t.id]="".concat(t.$css||""," ").concat(n||"").trim()),h[t.id]=i;var r=s.map((function(i,n){var r=i.id,a=i.editorType,s=i.type,c=i.options,u=i.patternMask,h=i.numberMask;S[r]=n;var g=e.spans.find((function(e){return e.column===r&&e.row===t.id})),v=(null==g?void 0:g.text)||t[r],_=t.$group&&o._grid.config.columns.find((function(e){return t.$by==e.id}));if((i.options||_)&&(v=(0,p.getOptionValue)(v,_||i)),"multiselect"===a&&c instanceof Array)return(v||"").split(",").map((function(t){var e=t.trim(),i=c.find((function(t){return"string"==typeof t?t===e:t.id==e}));return i?"object"==typeof i?i.value:i:e})).join(", ");if("date"===s){var m=i.dateFormat||"%M %d %Y";if("string"==typeof v){var y=(0,d.stringToDate)(v,m,!0)?(0,d.stringToDate)(v,m):new Date(v);y instanceof Date&&!isNaN(y.valueOf())&&(v=(0,d.getExcelDate)(y))}else v instanceof Date&&(v=(0,d.getExcelDate)(v))}else"number"===s?("string"==typeof v&&u&&(v=(0,f.removePatternMask)(v,u)),"string"==typeof v&&"object"==typeof h&&(v=(0,f.removeNumberMask)(v,h))):v=(0,p.applyPattern)(v,i);return v||n||!t.$groupName?(0,l.removeHTMLTags)(v):"^ ".concat(t.$groupName)}));return r}));a.config.$footerHeightMap.forEach((function(t){return D.push({height:t})}));for(var k=function(t){var i=t.type,o=t.align,a=t.numberMask,d=t.patternMask,f=t.footer,p=t.header,m=n({},t.$cellCss);(e.spans.filter((function(e){return e.column===t.id}))||[]).forEach((function(t){(null==t?void 0:t.css)&&(m[t.row]="".concat(m[t.row]||""," ").concat(t.css).trim())}));var S="number"===i?"right":o;b.push({width:t.$width});var D=s.indexOf(t);g[t.id]=D;var k="";S&&(k+=" align:".concat(S));var R="";R="number"===i?a?"boolean"==typeof a?r.number:function(t){var e=t.prefix,i=t.suffix,n=t.maxIntLength,o=t.maxDecLength,r=void 0===o?2:o,a="";e&&(a+='"'.concat(e,'"'));if(n)for(var l=0;l<n;l++)a+=l===n-1?"0":"#";else a+="#";if(r){a+=".";for(l=0;l<r;l++)a+="#"}i&&(a+="%"===i?i:'"'.concat(i,'"'));return a}(a):"string"==typeof d&&d.includes("0")&&!["#","a","*"].find((function(t){return d.includes(t)}))?function(t){if(!t.includes("0")&&!t.includes("#"))return"";var e=t.split(""),i="",n=!0;return e.forEach((function(t){"0"===t||"#"===t?(n||(i+='"',n=!0),i+=t):(n&&(i+='"',n=!1),i+=t)})),i}(d):r.number:i&&r[i]||"";var T=v(k+=" format:".concat(R));if(w.has(T))C.set("col_".concat(D),T);else{if($=(0,l.getStyleByClass)("dhx_grid-cell","dhx_grid-cell",w.get("default"))){var M=n(n({},$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(T,{css:n(n({},w.get("default").css),M),index:w.size})}C.has("col_".concat(D))||C.set("col_".concat(D),T)}for(var I in f&&f.forEach((function(e,i){var o=e.rowspan,r=void 0===o?0:o,a=e.colspan,s=void 0===a?0:a;if(s||r){var d=O.length+_.length+i;x.push({from:{row:d,column:D},to:{row:d+(r?r-1:0),column:D+(s?s-1:0)}})}var h=e.text?"function"==typeof e.text?e.text(u[t.id]):e.text:"";y[i][D]=n(n({},y[i][D]),{text:(0,l.removeHTMLTags)(h)});var f=R||(0,c.isNumeric)(h)&&"0.00",p="dhx_grid-footer-cell ".concat(e.css||""," ").concat(f," ").concat(e.align),g=v(p);if(!w.has(g)){var m=(0,l.getStyleByClass)(p,"dhx_grid-footer-cell",w.get("default"));if(m){var b=n(n({},m),{f_format:f});e.align&&(b.align=e.align),b["font-weight"]=b.bold?"bold":"normal",b.fontSize&&(b.fontSize="".concat(b.fontSize,"px")),w.set(g,{css:n(n({},w.get("default").css),b),index:w.size})}}C.set("footer_".concat(D,"_").concat(i),g)})),p&&p.forEach((function(t,e){var i=t.rowspan,o=void 0===i?0:i,r=t.colspan,a=void 0===r?0:r;if(a||o){var s=e;x.push({from:{row:s,column:D},to:{row:s+(o?o-1:0),column:D+(a?a-1:0)}})}var c="dhx_grid-header-cell ".concat(t.css||""," ").concat(t.align||""," ").concat(S||""),d=v(c);if(!w.has(d)){var u=(0,l.getStyleByClass)(c,"dhx_grid-header-cell",w.get("default"));if(u){var h=n(n({},u),{format:R});(t.align||S)&&(h.align=t.align||S),w.set(d,{css:n(n({},w.get("default").css),h),index:w.size})}}C.set("header_".concat(D,"_").concat(e),d)})),m){var H="dhx_grid-cell ".concat(m[I].trim()," ").concat(k),P=v(H),F="dhx_grid-row";if(E[I]&&(F+=" ".concat(E[I].trim())),!w.has(P))if($=(0,l.getStyleByClass)(H,F,w.get("default"))){M=n(n(n({},w.get("default").css),$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(P,{css:n({},M),index:w.size})}w.has(P)&&C.set("".concat(h[I],"_").concat(D),P)}for(var I in E)if(!(m||{})[I]){var A="".concat(E[I]," format:").concat(R);S&&(A+=" align:".concat(S));var $,j=v(A);F="dhx_grid-row ".concat(E[I].trim());if(!w.has(j))if($=(0,l.getStyleByClass)("dhx_grid-cell",F,w.get("default"))){M=n(n(n({},w.get("default").css),$),{format:R});S&&(M.align=S),M["font-weight"]=M.bold?"bold":"normal",M.fontSize&&(M.fontSize="".concat(M.fontSize,"px")),w.set(j,{css:n({},M),index:w.size})}w.has(j)&&C.set("".concat(h[I],"_").concat(D),j)}},R=0,T=s;R<T.length;R++){k(T[R])}var M=[];w.forEach((function(t){var e={};Object.keys(t.css).forEach((function(i){if(t.css[i])return"bold"===i?e.fontWeight="bold":void(e[i]="".concat(t.css[i]))})),e.verticalAlign="center",M.push(n(n({},e),{id:t.index.toString()}))})),M[0].format="#";var I=[];if(_.length){var H=_.map((function(t,e){return t.map((function(t,i){var n=C.get("header_".concat(i,"_").concat(e))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));I.push.apply(I,H)}var P=O.map((function(t,e){return t.map((function(t,i){var n=C.get("".concat(e,"_").concat(i))||C.get("col_".concat(i))||"default";return{v:""===t?null:t,s:w.get(n).index}}))}));if(I.push.apply(I,P),y.length){var F=y.map((function(e,i){return e.map((function(e,n){var o,r=e.text,a=e.content,l=e.col_id,s="string"==typeof a,c=a&&(o=u[l],Object.values(o)[0]==r),d=C.get("footer_".concat(n,"_").concat(i))||C.get("col_".concat(n))||"default";return{v:a&&s&&c?m({func:a,startRow:_.length+1,col:n,rowsCount:P.length,functionsMap:t.mapToExcelFormulas}):""===r?null:r,s:w.get(d).index}}))}));I.push.apply(I,F)}if(null===(i=e.spans)||void 0===i?void 0:i.length){var A=e.spans.map((function(t){var e=h[t.row]+_.length,i=g[t.column],n=t.rowspan,o=void 0===n?1:n,r=t.colspan;return{from:{row:e,column:i},to:{row:e+o-1,column:i+(void 0===r?1:r)-1}}}));x.push.apply(x,A)}return a.destructor(),{data:[{name:t.tableName||"data",cells:I,cols:b,rows:D,merged:x}],styles:M}},e.prototype._xlsxExport=function(e,i){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var o,a;return r(this,(function(r){switch(r.label){case 0:return e=n(n({},e),i.typeConfig||{}),o=this._getExportData(e,i),e.url?[4,this._getXlsxWorker(e.url)]:[3,2];case 1:return a=r.sent(),[2,new t((function(t,i){var n=function(r){if("ready"===r.data.type){a.removeEventListener("message",n);var l=r.data.blob;(0,c.downloadFile)(l,"".concat(e.name||"dhtmlx_grid",".xlsx")),t(o)}else"error"===r.data.type&&(a.removeEventListener("message",n),i(r.data))};a.addEventListener("message",n),a.postMessage({type:"convert",data:o})}))];case 2:return[2,o]}}))}))},e.prototype.getFlatCSV=function(t,e){var i=this._grid.data,n=i.getRoot(),o=e.columns,r=o[0],c=i.getMaxLevel(),d="";i.eachChild(n,(function(e){var n=function(t,e){for(var i=[],n=0;n<=c;n++)if(t&&t[r.id]){i[t.$level]=t[r.id];var o=e.getParent(t.id,!0);t=o&&o.id?o:null}else i[n]="";return i}(e,i).join(t.columnDelimiter);d+=n+Object.keys(e).reduce((function(i,n,o){return"id"===n||"parent"===n||n.startsWith("$")||0===o?i:i+t.columnDelimiter+(null===e[n]?"":e[n])}),""),d+=t.rowDelimiter}));var u=function(t,e){for(var i=0;i<t.length;i++)t[i]=e;return t}(new Array(c+1),""),h=(0,l.transpose)(o.map((function(t){return(t.header||[]).map((function(t){return(0,l.removeHTMLTags)("".concat(t.text||" "))}))})));return h=h.map((function(t){return t.splice.apply(t,a([0,1],u,!1)),t})),new s.CsvDriver(t).serialize(h,!0)+t.rowDelimiter+d},e.prototype._getCSV=function(t,e){var i=this._getExportData(t,e),n=new s.CsvDriver(t),o=i.data[0].cells.map((function(t){return t.map((function(t){return t.v}))}));return n.serialize(o,!0)},e.prototype._rawExport=function(e,i){void 0===e&&(e={});var o=document.createElement("div");o.setAttribute("style","display: none;");var r=this._getExportConfig(i),a=this._getExportWidget(o,r);(e=n(n({},r.typeConfig||{}),e)).url=e.url||"https://export.dhtmlx.com/"+this._name+"/"+i+"/"+this._version;var l="boolean"==typeof e.exportStyles||Array.isArray(e.exportStyles)?e.exportStyles:a.config.exportStyles;if("pdf"===i){var c=e.pdf;e.pdf=n({printBackground:!1,format:"A4"},c)}return new t((function(t,n){(0,h.awaitRedraw)().then((function(){var r="";!0===l?r="".concat((0,u.getPageLinksCss)(),"<style>").concat((0,u.getPageInlineCss)(),"</style>"):Array.isArray(l)&&l.length&&(r="".concat((0,u.getPageLinksCss)(l)));var c=o.children[0];null==c||c.setAttribute("data-dhx-theme",e.theme||"light"),"png"===i&&(null==c||c.setAttribute("style","width: ".concat(a.config.width,"px;")));var d="\n\t\t\t\t\t\t".concat(r,"\n\t\t\t\t\t\t").concat(o.innerHTML,"\n\t\t\t\t\t");fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({raw:d,config:e})}).then((function(t){return t.ok||(0,s.dhxError)("HTTP error, status: ".concat(t.status)),t.blob()})).then((function(n){var r,l=document.createElement("a");l.href=URL.createObjectURL(n),l.download="".concat(e.name||"grid",".").concat(i),l.click(),URL.revokeObjectURL(l.href),a.destructor(),null===(r=o.parentNode)||void 0===r||r.removeChild(o),t()})).catch((function(t){var e;a.destructor(),null===(e=o.parentNode)||void 0===e||e.removeChild(o),n(t)}))})).catch((function(t){var e;a.destructor(),null===(e=o.parentNode)||void 0===e||e.removeChild(o),n(t)}))}))},e.prototype._getExportWidget=function(t,e){var i,o,r=n(n({},e),{keyNavigation:!1,selection:!1,rangeSelection:!1,blockSelection:!1,clipboard:!1,history:!1,resizable:!1,editable:!1});(null===(i=r.data)||void 0===i?void 0:i.length)||(0,s.dhxWarning)("There is no data to export"),(null===(o=r.columns)||void 0===o?void 0:o.length)||(0,s.dhxWarning)("There is no column for export");var a=new this._grid.constructor(t,(0,c.getCloneObject)(r)),l=a.config.$totalWidth,d=a.config.$totalHeight+a.config.$headerHeight+(a.config.$footer?a.config.$footerHeight:0);return a.config.height=d,a.config.width=l,a.paint(),a},e.prototype._getExportConfig=function(t){var e=n({},this._grid.config);if("function"!=typeof this._exportConfigCallback)return n(n({},e),{spans:e.spans||[]});var i=this._exportConfigCallback(e,t),o=this._grid.data.getRawData(0,-1,null,2)||[];return n(n(n({},e),i),{columns:(i.columns?this._getCallbackData(e.columns,i.columns):e.columns)||[],spans:(i.spans?this._getCallbackData(e.spans,i.spans):e.spans)||[],data:(i.data?this._getCallbackData(o,i.data):o)||[]})},e.prototype._getCallbackData=function(t,e){var i=this;return"function"!=typeof e?null:t.map((function(t,n,o){return e((0,c.getCloneObject)(t),n,o,i._grid)})).filter(Boolean)},e.prototype._getXlsxWorker=function(e){return o(this,void 0,void 0,(function(){var i;return r(this,(function(n){return null===this._xlsxWorker&&(i=window.URL.createObjectURL(new Blob(["importScripts('".concat(e,"');")],{type:"text/javascript"})),this._xlsxWorker=new t((function(t){var e=new Worker(i);e.addEventListener("message",(function(i){"init"===i.data.type&&t(e)}))}))),[2,this._xlsxWorker]}))}))},e}();function v(t){return t.split("").reduce((function(t,e){var i=(t<<5)-t+e.charCodeAt(0);return Math.abs(i&i)}),0).toString()}function _(t){for(var e="";t>=0;)e=String.fromCharCode(t%26+65)+e,t=Math.floor(t/26)-1;return e}function m(t){var e=t.func,i=t.startRow,n=t.col,o=t.rowsCount,r=t.functionsMap,a=void 0===r?{}:r,l="".concat(_(n)).concat(i,":").concat(_(n)).concat(o+i-1),s={sum:"=SUM(".concat(l,")"),avg:"=AVERAGE(".concat(l,")"),count:"=COUNT(".concat(l,")"),max:"=MAX(".concat(l,")"),min:"=MIN(".concat(l,")")};return Object.entries(a).forEach((function(t){var e=t[0],i=t[1];s[e]="=".concat(i,"(").concat(l,")")})),s[e]}e.Exporter=g}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(84),e),o(i(85),e),o(i(86),e),o(i(87),e),o(i(26),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.message=void 0;var n=i(0),o=i(2),r=i(26),a=new WeakMap,l=new Map;function s(t,e){var i=document.createElement("div");return i.setAttribute("data-position",e),i.className="dhx_message-container dhx_message-container--"+e+(t===document.body?" dhx_message-container--in-body":""),i}e.message=function(t){var e;"string"==typeof t&&(t={text:t}),t.position=t.position||r.MessageContainerPosition.topRight;var i=document.createElement("div");i.className="dhx_widget dhx_message "+(t.css||""),i.setAttribute("role","alert");var c=t.text&&(0,n.uid)();c&&i.setAttribute("aria-describedby",c),t.html?i.innerHTML=t.html:(i.innerHTML='<span class="dhx_message__text" id='.concat(c,"></span>\n\t\t").concat(t.icon?'<span class="dhx_message__icon dxi '.concat(t.icon,'"></span>'):""),i.querySelector("#".concat(c)).textContent=t.text);var d=t.node?(0,o.toNode)(t.node):document.body;"static"===getComputedStyle(d).position&&(d.style.position="relative");var u=l.get(d);u?u[t.position]||(u[t.position]={stack:[],container:s(d,t.position)}):l.set(d,((e={})[t.position]={stack:[],container:s(d,t.position)},e));var h=l.get(d)[t.position],f=h.stack,p=h.container;function g(t){void 0===t&&(t=!0),i&&(!function(t,e){e&&clearTimeout(a.get(t));var i=t.parentNode,n=i.getAttribute("data-position"),o=i.parentNode,r=l.get(o);if(r){var s=r[n];if(s){var c=s.stack,d=c.indexOf(t);-1!==d&&(i.removeChild(t),c.splice(d,1),0===c.length&&o.removeChild(i))}}}(i,t),i=null)}if(0===f.length&&d.appendChild(p),f.push(i),p.appendChild(i),t.expire){var v=setTimeout((function(){return g(!1)}),t.expire);a.set(i,v)}return i.onclick=function(){return g()},{close:function(){return g()}}}},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.alert=void 0;var n=i(38),o=i(39),r=i(0);e.alert=function(e){var i=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.apply,a=(0,o.blockScreen)(e.blockerCss);return new t((function(t){var n="dhx_alert__".concat((0,r.uid)(),"_content"),o="dhx_alert__".concat((0,r.uid)(),"_header"),l=document.createElement("div");l.setAttribute("role","alert"),l.setAttribute("aria-modal","true"),e.text&&l.setAttribute("aria-describedby",n),e.header&&l.setAttribute("aria-labelledby",o),l.className="dhx_widget dhx_alert "+(e.css||"");var s=function(e){"Escape"!==e.key&&"Esc"!==e.key||(c(e),t(!1))};function c(t){t.preventDefault(),a(),document.body.removeChild(l),document.removeEventListener("keydown",s)}l.innerHTML="\n\t\t\t".concat(e.header?"<div id=".concat(o,' class="dhx_alert__header"> ').concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t\t").concat(e.text?"<div id=".concat(n,' class="dhx_alert__content">').concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="confirm" class="dhx_alert__apply-button dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(l.querySelector("#".concat(o)).textContent=e.header),e.text&&(l.querySelector("#".concat(n)).textContent=e.text)),document.body.appendChild(l),l.querySelector(".dhx_alert__apply-button").focus(),l.querySelector("button").addEventListener("click",(function(e){c(e),t(!0)})),document.addEventListener("keydown",s)}))}}).call(this,i(9))},function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.confirm=void 0;var n=i(38),o=i(39),r=i(0);e.confirm=function(e){e.buttonsAlignment=e.buttonsAlignment||"right";var i=e.buttons&&e.buttons[1]?e.buttons[1]:n.default.apply,a=e.buttons&&e.buttons[0]?e.buttons[0]:n.default.reject,l=(0,o.blockScreen)("dhx_alert__overlay-confirm "+(e.blockerCss||""));return new t((function(t){var n=document.createElement("div");n.setAttribute("role","alertdialog"),n.setAttribute("aria-modal","true");var o,s=e.header&&(0,r.uid)(),c=e.header&&(0,r.uid)();c&&n.setAttribute("aria-describedby",c),s&&n.setAttribute("aria-labelledby",s);var d=function(e){l(),n.removeEventListener("click",u),document.removeEventListener("keydown",h),document.body.removeChild(n),t(e)},u=function(t){"BUTTON"===t.target.tagName&&d(t.target.classList.contains("dhx_alert__confirm-aply"))},h=function(t){"Escape"===t.key||"Esc"===t.key?(n.querySelector(".dhx_alert__confirm-aply").focus(),d(t.target.classList.contains("dhx_alert__confirm-reject"))):"Tab"===t.key&&("aply"===o?(o="reject",n.querySelector(".dhx_alert__confirm-reject").focus()):(o="aply",n.querySelector(".dhx_alert__confirm-aply").focus()),t.preventDefault())};n.className="dhx_widget dhx_alert dhx_alert--confirm"+(e.css?" "+e.css:""),n.innerHTML="\n\t\t".concat(e.header?'<div class="dhx_alert__header" id='.concat(s,"> ").concat(!1!==e.htmlEnable?e.header:""," </div>"):"","\n\t\t").concat(e.text?'<div class="dhx_alert__content" id='.concat(c,">").concat(!1!==e.htmlEnable?e.text:"","</div>"):"",'\n\t\t\t<div class="dhx_alert__footer ').concat(e.buttonsAlignment?"dhx_alert__footer--"+e.buttonsAlignment:"",'">\n\t\t\t\t<button type="button" aria-label="reject" class="dhx_alert__confirm-reject dhx_button dhx_button--view_link dhx_button--color_primary dhx_button--size_medium">').concat(a,'</button>\n\t\t\t\t<button type="button" aria-label="aply"class="dhx_alert__confirm-aply dhx_button dhx_button--view_flat dhx_button--color_primary dhx_button--size_medium">').concat(i,"</button>\n\t\t\t</div>"),!1===e.htmlEnable&&(e.header&&(n.querySelector("#".concat(s)).textContent=e.header),e.text&&(n.querySelector("#".concat(c)).textContent=e.text)),document.body.appendChild(n),o="aply",n.querySelector(".dhx_alert__confirm-aply").focus(),n.addEventListener("click",u),document.addEventListener("keydown",h)}))}}).call(this,i(9))},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.disableTooltip=e.enableTooltip=e.tooltip=e.getZIndex=e.findPosition=void 0;var o=i(2),r=i(26),a=750,l=200;function s(t,e,i,n,o,a){var l,c,d;if(void 0===o&&(o=8),void 0===a&&(a=0),a>1&&(e=r.Position.center),"top"!==e&&"bottom"!==e){var u=t.top+(t.height-n)/2,h=u<0&&window.pageYOffset+u+n<scrollY+window.innerHeight;d=window.pageYOffset+(h?0:u)}switch(e){case r.Position.center:return(c=t.left+window.pageXOffset+(t.width-i)/2)+o<window.pageXOffset&&(c=t.left+window.pageXOffset),{left:c,top:d,pos:l=r.RealPosition.center};case r.Position.right:return l=r.RealPosition.right,(c=t.right+window.pageXOffset+o)+i>window.innerWidth+window.pageXOffset?s(t,r.Position.left,i,n,o,++a):{left:c,top:d,pos:l};case r.Position.left:return l=r.RealPosition.left,(c=window.pageXOffset+t.left-i-o)<0?s(t,r.Position.right,i,n,o,++a):{left:c,top:d,pos:l};case r.Position.top:return l=r.RealPosition.top,(c=window.pageXOffset+t.left+(t.width-i)/2)+i>window.innerWidth+window.pageXOffset?c=window.innerWidth+window.pageXOffset-i:c<0&&(c=0),t.top<n?s(t,r.Position.bottom,i,n,o,++a):{left:c,top:d=window.pageYOffset+t.top-n-o,pos:l};case r.Position.bottom:default:return(c=window.pageXOffset+t.left+(t.width-i)/2)+i>window.innerWidth+window.pageXOffset?c=window.innerWidth+window.pageXOffset-i:c<0&&(c=0),l=r.RealPosition.bottom,(d=window.pageYOffset+t.bottom+o)+n>window.innerHeight+window.pageYOffset?s(t,r.Position.top,i,n,o,++a):{left:c,top:d,pos:l}}}e.findPosition=s;var c=document.createElement("div"),d=document.createElement("span");d.className="dhx_tooltip__text",c.appendChild(d),c.setAttribute("role","tooltip"),c.style.position="absolute";var u,h=null,f=!1,p=null,g=null;function v(t){return t&&(t.classList.contains("dhx_popup--window")&&t.classList.contains("dhx_popup--window_active")||t.classList.contains("dhx_popup--window_modal")||t.classList.contains("dhx_popup"))?1e7:(null==t?void 0:t.classList.contains("dhx_popup--window"))?9999999:t&&t.offsetParent?v(t.offsetParent):null}function _(t,e,i,n,o,a,l){void 0===n&&(n=""),void 0===o&&(o=!1),void 0===a&&(a=8);var u=t.getBoundingClientRect();l?d.innerHTML=e:d.textContent=e,c.style.left=null,c.style.top=null,document.body.appendChild(c),c.className="dhx_widget dhx_tooltip ".concat(o?" dhx_tooltip--forced":""," ").concat(n);var h=c.getBoundingClientRect(),p=s(u,i,h.width,h.height,a),g=p.left,_=p.top,m=p.pos,y=v(t);switch(y&&(c.style.zIndex=y.toString()),m){case r.RealPosition.bottom:case r.RealPosition.top:case r.RealPosition.left:case r.RealPosition.right:case r.RealPosition.center:c.style.left=g+"px",c.style.top=_+"px"}c.className+=" dhx_tooltip--".concat(m),f=!0,o||setTimeout((function(){c.className+=" dhx_tooltip--animate"}))}function m(t,e,i){var n=i.force,o=i.showDelay,s=i.hideDelay,d=i.position,v=i.css,m=i.htmlEnable,y=i.margin;n||(g=setTimeout((function(){_(t,e,d||r.Position.bottom,v,!1,y,m)}),o||a));var b=function(){var e;f&&(e=s,h&&(p=setTimeout((function(){document.body.removeChild(c),f=!1,p=null}),e||l))),clearTimeout(g),t.removeEventListener("mouseleave",b),t.removeEventListener("blur",b),document.removeEventListener("mousedown",b),h=null,u=null};n&&_(t,e,d,v,n,y,m),t.addEventListener("mouseleave",b),t.addEventListener("blur",b),document.addEventListener("mousedown",b),u=b}function y(t,e){var i=(0,o.toNode)(e.node);i!==h&&(u&&(u(),u=null),h=i,p?(clearTimeout(p),p=null,m(i,t,n(n({},e),{force:!0}))):m(i,t,e))}function b(t){var e=(0,o.locateNode)(t,"dhx_tooltip_text");e&&y(e.getAttribute("dhx_tooltip_text"),{position:e.getAttribute("dhx_tooltip_position")||r.Position.bottom,node:e})}e.getZIndex=v,e.tooltip=y,e.enableTooltip=function(){document.addEventListener("mousemove",b)},e.disableTooltip=function(){document.removeEventListener("mousemove",b)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSums=void 0;var n=function(){function t(){this._prefix=new Float64Array(1),this._length=0}return t.prototype.ensureCapacity=function(t){return this._prefix.length<t+1&&(this._prefix=new Float64Array(t+1)),this._prefix[0]=0,this._prefix},t.prototype.setLength=function(t){this._length=t},t.prototype.totalSize=function(){return this._prefix[this._length]},t.prototype.rangeSize=function(t,e){var i=t<0?0:t,n=e>this._length?this._length:e;return n<=i?0:this._prefix[n]-this._prefix[i]},t.prototype.itemSize=function(t){return t<0||t>=this._length?0:this._prefix[t+1]-this._prefix[t]},t.prototype.findIndex=function(t){if(0===this._length)return 0;if(t<=0)return 0;if(t>=this._prefix[this._length])return this._length-1;for(var e=0,i=this._length;e<i;){var n=e+i>>1;this._prefix[n+1]>t?i=n:e=n+1}return e},Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this._length=0,this._prefix=new Float64Array(1)},t}();e.PrefixSums=n},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.GridSelectionEvents=void 0;var r,a=i(1),l=i(8),s=i(0),c=i(6),d=i(3),u=i(17),h=i(7),f=i(5),p=i(14),g=i(4);!function(t){t.beforeUnSelect="beforeUnSelect",t.afterUnSelect="afterUnSelect",t.beforeSelect="beforeSelect",t.afterSelect="afterSelect"}(r||(e.GridSelectionEvents=r={}));var v=function(){function t(t,e,i,o){this._grid=t,this._gridId=o,this._selectedCell=null,this._selectedCells=[],this._selectedSet=new Set,this.config=n({type:"complex",disabled:!1,multiSelection:!1},e),this.events=i||new c.EventSystem(this),this._init()}return t.prototype.setCell=function(t,e,i,n){var r,l,s,c,d,h,f,p,g,v,_,m,y,b=this;void 0===i&&(i=!1),void 0===n&&(n=!1);var x="tree"===this._grid.config.type;if(this._gridId&&u.focusManager.getFocusId()!==this._gridId&&u.focusManager.setFocusId(this._gridId),"row"===this.config.type&&(null===(s=this._selectedCells[0])||void 0===s?void 0:s.row.id)===((null==t?void 0:t.id)||t)||"row"!==this.config.type&&(null===(c=this._selectedCells[0])||void 0===c?void 0:c.row.id)===((null==t?void 0:t.id)||t)&&(null===(d=this._selectedCells[0])||void 0===d?void 0:d.column.id)===((null==e?void 0:e.id)||e)){if(i)return this._removeCell(null===(h=this._selectedCells[0])||void 0===h?void 0:h.row,null===(f=this._selectedCells[0])||void 0===f?void 0:f.column),void(0,a.awaitRedraw)().then((function(){b._grid.paint(),b._setBrowserFocus()}));if("row"===this.config.type&&e&&this._selectedCell){var w=this._grid.getColumn(e.id||e);if(w&&w.id!==(null===(p=this._selectedCell.column)||void 0===p?void 0:p.id))return this._selectedCell={row:this._selectedCell.row,column:w},void(0,a.awaitRedraw)().then((function(){return b._setBrowserFocus()}))}if(!this.config.multiSelection||this.config.multiSelection&&1===this._selectedCells.length)return}if(!(this.config.disabled||this._grid.config.$editable||!this.config.multiSelection&&this._selectedCells.length&&!this._removeCell(null===(g=this._selectedCell)||void 0===g?void 0:g.row,null===(v=this._selectedCell)||void 0===v?void 0:v.column))){if(this.config.multiSelection){if(i||n||this._removeCells(),this.isSelectedCell(t,e))return void this.removeCell((null==t?void 0:t.id)||t,(null==e?void 0:e.id)||e);n&&this._selectedCells.length>1&&!x&&o([],this._selectedCells,!0).forEach((function(t,e){var i=t.row,n=t.column;e>0&&b.removeCell(i.id,n.id)}))}t=this._grid.data.getItem(t&&t.id||t);var C=null===(m=null===(_=this._grid.config)||void 0===_?void 0:_.columns)||void 0===m?void 0:m.filter((function(t){return!t.hidden}));if(e||(e=null==C?void 0:C[0]),(e=this._grid.getColumn(e.id||e))&&t){if(this.config.multiSelection&&n&&this._selectedCells.length&&!x){var S=null===(y=this._selectedCells)||void 0===y?void 0:y[0],E=this._grid.data.getIndex(S.row.id),D=this._grid.data.getIndex(t.id);if(E>D&&(E=(r=[D,E])[0],D=r[1]),"cell"===this.config.type||"complex"===this.config.type){var O=C.map((function(t){return t.id})),k=O.indexOf(S.column.id),R=O.indexOf(e.id);if(-1!==k&&-1!==R){k>R&&(k=(l=[R,k])[0],R=l[1]);var T=C.slice(k,R+1);this._grid.data.mapRange(E,D,(function(t){T.forEach((function(e){-1===b._findIndex({row:t,column:e})&&b._setCell(t,e)}))}))}}else this._grid.data.mapRange(E,D,(function(t){-1===b._findIndex({row:t,column:e})&&b._setCell(t,e)}))}else this._setCell(t,e);(0,a.awaitRedraw)().then((function(){b._grid.paint(),b._setBrowserFocus()}))}}},t.prototype.removeCell=function(t,e){var i=this;if(t&&e&&("cell"===this.config.type||"complex"===this.config.type)){var n=this._selectedCells.find((function(i){var n=i.row,o=i.column;return n.id==t&&o.id==e}));n&&this._removeCell(n.row,n.column)}else if(t){this._selectedCells.filter((function(e){return e.row.id==t})).forEach((function(t){var e=t.row,n=t.column;i._removeCell(e,n)}))}else this._removeCells();(0,a.awaitRedraw)().then((function(){i._grid.paint()}))},t.prototype.getCell=function(){return this._selectedCell},t.prototype.getCells=function(){return this._selectedCells},t.prototype.disable=function(){this.removeCell(),this.config.disabled=!0,this._grid.paint()},t.prototype.enable=function(){this.config.disabled=!1,this._grid.paint()},t.prototype.isSelectedCell=function(t,e){var i=(null==t?void 0:t.id)||t,n=(null==e?void 0:e.id)||e;return this._selectedSet.has(this._cellKey(i,n))},t.prototype.restoreFocus=function(){this._setBrowserFocus()},t.prototype.toHTML=function(){var t=this;if(!this._isUnselected()){if(this.config.multiSelection){var e=[],i={};return this._selectedCells.forEach((function(n,o,r){var a=(0,p.normalizeCell)(n,t._grid);e.push(t._toHTML(a.row,a.column,o===r.length-1||"cell"===t.config.type||"complex"===t.config.type,i[n.row.id])),i[n.row.id]=!0})),e}var n=(0,p.normalizeCell)(this._selectedCell,this._grid);return this._toHTML(n.row,n.column,!0)}},t.prototype._setCell=function(t,e){t&&e&&(0,s.isDefined)(t.id)&&(0,s.isDefined)(e.id)&&this.events.fire(r.beforeSelect,[t,e])&&(this._selectedCell={row:t,column:e},this.config.multiSelection?this._selectedCells.push(this._selectedCell):(this._selectedSet.clear(),this._selectedCells=[this._selectedCell]),this._selectedSet.add(this._cellKey(t.id,e.id)),this.events.fire(r.afterSelect,[t,e]))},t.prototype._removeCell=function(t,e,i){var n,o;if(void 0===i&&(i=!1),!(t&&e&&(0,s.isDefined)(t.id)&&(0,s.isDefined)(e.id)))return!1;if(!i&&!this.events.fire(r.beforeUnSelect,[t,e]))return!1;var a=this._selectedCells.findIndex((function(i){return i.row.id===t.id&&i.column.id===e.id}));return this._selectedCells.splice(a,1),this._selectedSet.delete(this._cellKey(t.id,e.id)),this._selectedCell&&e.id===this._selectedCell.column.id&&t.id===this._selectedCell.row.id&&(this._selectedCell=(null===(n=this._selectedCells)||void 0===n?void 0:n[(null===(o=this._selectedCells)||void 0===o?void 0:o.length)-1])||null),!i&&this.events.fire(r.afterUnSelect,[t,e]),!0},t.prototype._removeCells=function(t){var e=this;void 0===t&&(t=!1),this._selectedSet.clear(),o([],this._selectedCells,!0).forEach((function(i){e._removeCell(null==i?void 0:i.row,null==i?void 0:i.column,t)}))},t.prototype._init=function(){var t=this;this._grid.events.on(d.GridEvents.cellClick,(function(e,i,n){t.setCell(e,i,n.ctrlKey||n.metaKey,n.shiftKey)})),this._grid.data.events.on(l.DataEvents.beforeRemove,(function(e){var i,n;if(e&&t._selectedCell&&t._selectedCell.row&&t._selectedCell.row.id===e.id){var o=void 0,r=t._grid.data.getIndex(e.id);if(t._grid.data instanceof l.TreeCollection){var a=t._grid.data.getItems(e.parent);o=(null===(i=a[r+1])||void 0===i?void 0:i.id)||(null===(n=a[r-1])||void 0===n?void 0:n.id)||e.parent}else o=t._grid.data.getId(r+1)||t._grid.data.getId(r-1);(0,s.isId)(o)&&(t.setCell(o),t._grid.paint())}})),this._grid.data.events.on(l.DataEvents.removeAll,(function(){t._removeCells()})),this._grid.data.events.on(l.DataEvents.load,(function(){t._removeCells(!0)}))},t.prototype._toHTML=function(t,e,i,n){var o,r,l,c,u,p,v,_,m,y,b,x,w;void 0===i&&(i=!1),void 0===n&&(n=!1);var C=this._grid.data.getRawData(0,-1,null,2);if(-1===(0,s.findIndex)(C,(function(e){return e.id==t.id})))return null;var S=this._grid.config,E=S.topSplit,D=S.bottomSplit,O=S.$totalWidth,k=S.$totalHeight,R=S.columns,T=null==R?void 0:R.filter((function(t){return!t.hidden})),M={left:(0,h.getCurrFixedCols)(this._grid.config,d.Split.left),right:(0,h.getCurrFixedCols)(this._grid.config,d.Split.right)},I=this._grid.data.getLength(),H={top:E?this._grid.data.getRawData(0,E):[],bottom:D?this._grid.data.getRawData(I-D,I):[]},P={left:null===(o=null==M?void 0:M.left)||void 0===o?void 0:o.map((function(t){return t.id})),right:null===(r=null==M?void 0:M.right)||void 0===r?void 0:r.map((function(t){return t.id}))},F={top:H.top.map((function(t){return t.id})),bottom:H.bottom.map((function(t){return t.id}))},A=null===(l=null==M?void 0:M.left)||void 0===l?void 0:l.reduce((function(t,e){return t+(e.$width||0)}),0),$=null===(c=null==M?void 0:M.right)||void 0===c?void 0:c.reduce((function(t,e){return t+(e.$width||0)}),0),j=H.top.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),L=H.bottom.reduce((function(t,e){return t+(0,g.getTotalRowHeight)(e)}),0),N=this._grid.getCellRect(t.id,e.id);t.$subRowHeight&&t.$opened&&(N.height=N.height-t.$subRowHeight);var V,W,z,B,G=this._grid.getScrollState(),Y=N.y,U=null===(u=F.top)||void 0===u?void 0:u.includes(t.id),X=null===(p=P.left)||void 0===p?void 0:p.includes(e.id),q=M.left.length&&A>N.x-G.x,K=H.top.length&&j>N.y-G.y,Z=N.width,J=N.height,Q=null,tt=null,et=q?A+G.x:N.x;if(q&&(Z-=(X?(0,f.getTotalWidth)(M.left.slice(0,T.indexOf(e))):A)-(N.x-G.x)),K&&(J-=(U?(0,f.getTotalHeight)(H.top.slice(0,C.indexOf(t))):j)-(N.y-G.y)-1,Y+=N.height-J),U)if(Y=N.y+G.y,(nt=this._grid.getSpan(t.id,e.id))&&nt.rowspan>1){var it=C.indexOf(t);Q=(0,f.getTotalHeight)(H.top.slice(it,it+nt.rowspan))}else J=E===F.top.indexOf(t.id)+1?N.height-1:N.height;if(X)if(et=N.x+G.x,(nt=this._grid.getSpan(t.id,e.id))&&nt.colspan>1){it=null==T?void 0:T.indexOf(e);tt=(0,f.getTotalWidth)(M.left.slice(it,it+nt.colspan))}else Z=M.left.length===P.left.indexOf(e.id)+1?N.width-1:N.width;if((null===(v=M.right)||void 0===v?void 0:v.length)||D){var nt=this._grid.getSpan(t.id,e.id),ot=(0,g.getReverseScrollState)(this._grid);if((null===(_=M.right)||void 0===_?void 0:_.length)&&(V=(null===(m=P.right)||void 0===m?void 0:m.includes(e.id))||nt&&T.indexOf(e)+(nt.colspan||1)>T.length-M.right.length,(W=O-$<ot.x+N.x+N.width)&&!V&&(Z-=ot.x+N.x+N.width-O+$),V))if(nt&&!(null===(y=P.right)||void 0===y?void 0:y.includes(nt.column))){it=T.length-T.indexOf(e)-(nt.colspan||1);var rt=O-$;et=N.x+ot.x<rt+1?N.x:rt-ot.x+1,tt=(0,f.getTotalWidth)(it?M.right.slice(0,-it):M.right)-1,Z=N.width-ot.x}else{var at=(null===(b=P.right)||void 0===b?void 0:b.indexOf(e.id))?0:1;et=N.x-ot.x+at,Z=N.width-at}if(D&&(z=F.bottom.includes(t.id)||nt&&C.indexOf(t)+(nt.rowspan||1)>C.length-D,(B=k-L<ot.y+N.y+N.height)&&!z&&(J-=ot.y+N.y+N.height-k+L),z))if(nt&&!F.bottom.includes(nt.row)){var lt=k-L;at=(it=C.length-C.indexOf(t)-(nt.rowspan||1))?0:1;Y=N.y+ot.y<lt?N.y:lt-ot.y,Q=(0,f.getTotalHeight)(it?H.bottom.slice(0,-it):H.bottom)-at,J=N.height-ot.y-at}else Y=N.y,J=N.height-(D===F.bottom.indexOf(t.id)+1?1:0)}var st=null;"row"!==this.config.type&&"complex"!==this.config.type||n||(st=(0,a.el)(".dhx_grid-selected-row",{style:{width:(null===(x=M.left)||void 0===x?void 0:x.length)?O-G.x:O,height:J,minHeight:Q,minWidth:tt,display:J<0&&!Q?"none":"flex",top:Y,left:(null===(w=M.left)||void 0===w?void 0:w.length)?G.x:0,position:"absolute"}}));var ct=null;return"cell"!==this.config.type&&"complex"!==this.config.type||!i||(ct=(0,a.el)(".dhx_grid-selected-cell",{style:{width:Z,height:J,top:Y,minHeight:Q,minWidth:tt,left:et,position:"absolute",display:Z<0&&!tt||J<0&&!Q?"none":"flex",borderLeft:q&&!X?"none":null,borderRight:W&&!V?"none":null,borderTop:K&&!U?"none":null,borderBottom:B&&!z?"none":null}})),(0,a.el)(".dhx_grid-selection",{style:{zIndex:20}},[st,ct])},t.prototype._isUnselected=function(){return!this._selectedCell||!this._selectedCell.row||!this._selectedCell.column||0===this._selectedCells.length},t.prototype._findIndex=function(t){var e=this;void 0===t&&(t=this._selectedCell);var i=-1;return this._selectedCells.some((function(n,o){if("cell"===e.config.type||"complex"===e.config.type){if((0,s.compare)(n.row,t.row)&&(0,s.compare)(n.column,t.column))return i=o,!0}else if("row"===e.config.type&&(0,s.compare)(n.row,t.row))return i=o,!0})),i},t.prototype._cellKey=function(t,e){return"row"===this.config.type?""+t:t+"_"+e},t.prototype._setBrowserFocus=function(){var t=this._grid.getRootView().data.getRootNode();if(t){var e=t.querySelector(".dhx_grid_data");if(e&&this._selectedCell&&this._selectedCell.row&&this._selectedCell.column){var i=e.querySelector('[data-dhx-id="'.concat(this._selectedCell.row.id,'"]')),n=this._grid.getSpan(this._selectedCell.row.id,this._selectedCell.column.id);if(i){var o=n?t.querySelector(".dhx_span-spans"):null,r=o?o.querySelector('[data-dhx-col-id="'.concat(n.column,'"][data-dhx-id="').concat(n.row,'"]')):i.querySelector('[data-dhx-col-id="'.concat(this._selectedCell.column.id,'"]'));r&&(r.tabIndex=0,r.focus({preventScroll:!0}))}}}},t}();e.Selection=v},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.proRender=e.render=e.applyAutoWidth=e.getElementSizes=e.getRenderConfig=void 0;var o=i(1),r=i(2),a=i(4),l=i(5),s=i(8),c=i(3),d=i(19),u=i(54),h=i(55),f=i(0),p=i(7),g=i(116),v=i(117),_=i(118),m=i(20);function y(t,e,i,n){var o=void 0===i?[0,0]:i,r=o[0],a=o[1],l=t[0],s=t[1],c=e[0],d=e[1];return c<=l&&l<=d||c<=s&&s<=d||l<=c&&d<=s||l<r||a&&s>=n-a}function b(t,e,i){var o=t.config,r=o.spans,l=void 0===r?[]:r,d=o.columns,u=o.leftSplit,h=void 0===u?0:u,f=o.topSplit,g=void 0===f?0:f,_=o.rightSplit,m=void 0===_?0:_,b=o.bottomSplit,x=void 0===b?0:b,w=o.$filteredColumns||d.filter((function(t){return!t.hidden})),C=(0,a.calculateVisibleRange)(i,t._scroll,o,e),S=w.slice(C.xStart,C.xEnd),E=e.slice(C.yStart,C.yEnd),D=l.filter((function(t){var i;if(!(null===(i=t.$renderFrom)||void 0===i?void 0:i.length))return!1;var n=y(t.$rowsVisibility,[C.yStart,C.yEnd],[g,x],e.length),o=y(t.$colsVisibility,[C.xStart,C.xEnd],[h,m],d.length);return n&&o})),O={left:(0,p.getCurrFixedCols)(o,c.Split.left),right:(0,p.getCurrFixedCols)(o,c.Split.right)},k={top:e.slice(0,o.topSplit||0),bottom:o.bottomSplit?e.slice(-o.bottomSplit):[]};return t.config.$subRowCells&&(0,v.setSubRowCell)(t,E),n(n({},o),{data:e,columns:o.columns,scroll:t._scroll,$positions:C,headerHeight:o.$headerHeight,footerHeight:o.$footerHeight,firstColId:w[0]&&w[0].id,events:t.events,_events:t._events,filteredColumns:w,currentColumns:S,currentRows:E,currentSpans:D,fixedColumns:O,fixedRows:k,sort:t._sortingStates,content:t.content,gridId:t._uid,commonSummary:t._commonSummary,colSummary:t._colSummary,dropManager:t._dropManager,blockSelection:t.block,$renderFrom:"render",$isDragging:s.dragManager.isDrag()})}function x(t){if(t&&(t.tagName||(t=t._parent._container),t)){var e=t.currentStyle||window.getComputedStyle(t),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)||0,n=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)||0;return{width:t.clientWidth-i,height:t.clientHeight-n}}}function w(t,e,i){void 0===i&&(i=!1);var r,a=(0,d.getCells)(t),s=t.filteredColumns,c=t.$resizing,u=t.$totalHeight,h=t.$totalWidth,g=t.leftSplit,_=t.$positions,m=t.$scrollBarWidth,y=(0,d.getSpans)(t);if(c){var b=(0,f.findIndex)(s,(function(t){return t.id===c})),x=(0,l.getTotalWidth)(s.slice(0,b))+s[b].$width;r=(0,o.el)(".dhx_grid-resize-line",{style:{top:0,left:x,height:u}})}var w=t.dropManager?t.dropManager.toHTML():null,C=t.blockSelection?t.blockSelection.toHTML():null,S=t.selection?t.selection.toHTML():null;S="string"==typeof S?(0,o.el)("div.dhx_selection",{".innerHTML":S}):S;var E=_,D=i?t.$height-t.$footerHeight-t.$headerHeight-m.x-(t.$footer?1:0)-p.BORDERS:u;return(0,o.el)(".dhx_data-wrap",{style:{height:D,width:h,"padding-left":e.x,"padding-top":e.y},role:"presentation","data-dhx-drop-area":"row"},[(0,o.el)(".dhx_grid_data".concat(g?".dhx_grid_fixed_left":""),n(n({_flags:o.KEYED_LIST},(0,d.getHandlers)(E.yStart,E.xStart,t)),{role:"rowgroup"}),a),(0,v.getSubRowContent)(t),(0,o.el)(".dhx_span-spans",n({role:"presentation"},(0,d.getHandlers)(E.yStart,E.xStart,t)),y),(0,o.el)(".dhx_grid_selection",{_ref:"selection","aria-hidden":"true"},[].concat(S,r)),w,C])}function C(t,e,i){var n=i.height-p.BORDERS;return n=e?n:n-t.headerHeight,t.$footer?e?n:n-t.footerHeight:n}function S(t,e,i){void 0===i&&(i=!1);var n=!i&&t.$totalHeight>=e.height-(t.$headerHeight||0)?(0,r.getScrollbarWidth)():0,o=e.width-p.BORDERS-n;if(!(o<0)){var a=t.$filteredColumns||(t.columns||[]).filter((function(t){return!t.hidden})),s=[],c=[],d=!1;a.forEach((function(e){e.width||e.$fixedWidth||!(0,l.isAutoWidth)(t,e)?s.push(e):c.push(e)}));do{d=!1;for(var u=c.reduce((function(t,e){return t+(e.gravity||1)}),0),h=(0,l.getTotalWidth)(s),f=function(t){var e=o>h?(o-h)*((t.gravity||1)/u):0,i=t.minWidth&&e<t.minWidth,n=t.maxWidth&&e>t.maxWidth;if(i||n)return d=!0,t.$width=i?t.minWidth:t.maxWidth,c=c.filter((function(e){return e.id!=t.id})),s.push(t),"break";t.$width=e},g=0,v=c;g<v.length;g++){if("break"===f(v[g]))break}}while(d)}}e.getRenderConfig=b,e.getElementSizes=x,e.applyAutoWidth=S,e.render=function(t,e,i,r,a){var s,f,g,v,_,m,y=(null===(f=null===(s=null==t?void 0:t.node)||void 0===s?void 0:s.parent)||void 0===f?void 0:f.el)||e._container;(null==y?void 0:y.tagName)&&e._observeResize&&e._observeResize(y);var E=e._cachedSizes||x(y),D=e.config;if(!D)return(0,o.el)("div");if(!D.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":D.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var O=e.data.getRawData(0,-1,null,2);D.columns.every((function(t){return t.hidden}))?D.$totalHeight=0:e._rowHeightsRebuild&&(null===(v=(g=e)._rebuildRowHeights)||void 0===v||v.call(g,O));var k={width:(D.width&&"number"==typeof D.width?D.width:null==E?void 0:E.width)||0,height:(D.height&&"number"==typeof D.height?D.height:null==E?void 0:E.height)||0};(0,l.isAutoWidth)(D)&&S(D,k),null===(m=(_=e)._rebuildColWidths)||void 0===m||m.call(_),D.$width=k.width,D.$height=k.height;var R=b(e,O,k);R.selection=r,R.datacollection=e.data;var T=(0,d.getShifts)(R);R.$scrollBarWidth=(0,p.calcScrollBarWidth)(R);var M,I,H,P,F=(0,l.isCssSupport)("position","sticky"),A=C(R,F,k),$={wrapper:k,sticky:F,shifts:T,gridBodyHeight:A,footerAtBottom:!1},j=(0,h.getFixedRows)(R,n(n({},$),{name:"header",position:"top"})),L=R.$footer?(0,h.getFixedRows)(R,n(n({},$),{name:"footer",position:"bottom"})):null,N=R.$totalWidth+p.BORDERS<k.width?"dhx_grid-less-width":"",V=R.$totalHeight+p.BORDERS<k.height?"dhx_grid-less-height":"",W=R.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",z=D.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"";if(!t.node){var B=e.getScrollState(),G=B.x,Y=B.y;(0,o.awaitRedraw)().then((function(){e.scroll(G,Y)}))}return(0,o.el)(".dhx_grid.dhx_widget",n({class:(R.css||"")+(F?"":" dhx_grid_border")+(D.multiselection?" dhx_no-select--pointer":""),"data-dhx-widget-id":a,"data-dhx-root-id":D.rootParent,"data-dhx-drop-area":"common"},(M=R.data,I=D.columns,H=R.editable,P=R.multiselection,{role:"tree"===R.type?"treegrid":"grid","aria-rowcount":M.length,"aria-colcount":I.filter((function(t){return!t.hidden})).length,"aria-readonly":H?"false":"true","aria-multiselectable":P?"true":"false"})),[(0,o.resizer)((function(){return e.paint()})),(0,o.el)(".dhx_grid-content",n(n({style:n({},k)},i),{class:"".concat(N," ").concat(V," ").concat(W," ").concat(z).trim(),role:"presentation"}),[(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0,role:"button","aria-label":"Enter grid"}),F?null:j,(0,o.el)(".dhx_grid-body",{style:{height:A,width:k.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[(0,o.el)("div",{},[F?j:null,w(R,T),F?L:null])]),(0,u.getFixedColsHeader)(R,$,c.Split.left),(0,u.getFixedColsHeader)(R,$,c.Split.right),(0,u.getFixedCols)(R,$,c.Split.left),(0,u.getFixedCols)(R,$,c.Split.right),(0,h.getFixedDataRows)(R,$,c.Split.top),(0,h.getFixedDataRows)(R,$,c.Split.bottom),F?null:L,(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0,role:"button","aria-label":"Exit grid"})])])},e.proRender=function(t,e,i,r,a){var s,f,v,y,E,D,O,k=(null===(f=null===(s=null==t?void 0:t.node)||void 0===s?void 0:s.parent)||void 0===f?void 0:f.el)||e._container;(null==k?void 0:k.tagName)&&e._observeResize&&e._observeResize(k);var R=e._cachedSizes||x(k),T=e.config;if(!T)return(0,o.el)("div");if(!T.columns.length)return(0,o.el)(".dhx_grid",{"data-dhx-widget-id":a,"data-dhx-root-id":T.rootParent,"data-dhx-drop-area":"common",role:"empty-grid"});var M,I=e.data.getRawData(0,-1,null,2),H=T.topSplit||0,P=T.bottomSplit||0,F=T.columns.every((function(t){return t.hidden}));if(e._rowHeightsRebuild){for(var A=0,$=0,j=0;j<I.length;j++){var L=I[j];H&&j<H+A&&(T.subRow&&(L.$subRowHeight=0,L.$opened=!1),L.hidden&&A++),P&&j>=I.length-P-$&&(T.subRow&&(L.$subRowHeight=0,L.$opened=!1),L.hidden&&$++),L.$index=j}F?(T.$totalHeight=0,e._rowHeightsRebuild=!1):null===(y=(v=e)._rebuildRowHeights)||void 0===y||y.call(v,I)}var N="auto"===e.config.height;N&&(M=function(t,e,i){var n,o,r=t._container,a=e.$headerHeight+(e.$footerHeight&&e.$footerHeight+1)+e.$totalHeight+p.BORDERS;if(r){var l=window.getComputedStyle(r),s=l.minHeight,c=l.maxHeight;return a<=parseFloat(s)?parseFloat(s):a>=parseFloat(c)?parseFloat(c):a+(0,p.calcScrollBarWidth)(e,!!(null===(n=t.scrollView)||void 0===n?void 0:n.config.enable),i).x}return a+(i?(0,p.calcScrollBarWidth)(e,!!(null===(o=t.scrollView)||void 0===o?void 0:o.config.enable),i).x:0)}(e,T,R));var V=T.width&&"number"==typeof T.width?T.width:null==R?void 0:R.width,W=T.height&&"number"==typeof T.height?T.height:null==R?void 0:R.height,z={width:V||0,height:(N?M:W)||0},B=null==T?void 0:T.group,G=null==T?void 0:T.dragPanel,Y=null==B?void 0:B.panel,U=!!T.dragPanel;Y&&(z.height-=B.panelHeight||40),U&&(z.width-=(null==G?void 0:G.width)||m.defaultDragPanelConfig.width),(0,l.isAutoWidth)(T)&&S(T,z,e.scrollView&&e.scrollView.config.enable),null===(D=(E=e)._rebuildColWidths)||void 0===D||D.call(E),T.$width=z.width,T.$height=z.height;var X=b(e,I,z);X.selection=r,X.datacollection=e.data;var q=(0,d.getShifts)(X);X.$scrollBarWidth=(0,p.calcScrollBarWidth)(X,!!(null===(O=e.scrollView)||void 0===O?void 0:O.config.enable));var K=(0,l.isCssSupport)("position","sticky"),Z=C(X,K,z),J={wrapper:z,sticky:K,shifts:q,gridBodyHeight:Z,footerAtBottom:!1},Q=X.$totalWidth+p.BORDERS<z.width?"dhx_grid-less-width":"",tt=X.$totalWidth+p.BORDERS===z.width?"dhx_grid-full-width":"",et=X.$totalHeight+p.BORDERS<z.height-X.$footerHeight-X.$headerHeight?"dhx_grid-less-height":"",it=X.fixedColumns.right.length?"dhx_grid__contains_cols_right--fixed":"",nt=T.bottomSplit?"dhx_grid__contains_rows_bottom--fixed":"",ot="bottom"===T.footerPosition&&!!et&&!N;J.footerAtBottom=ot;var rt=(0,h.getFixedRows)(X,n(n({},J),{name:"header",position:"top"})),at=X.$footer?(0,h.getFixedRows)(X,n(n({},J),{name:"footer",position:"bottom"})):null;if(!t.node){var lt=e.getScrollState(),st=lt.x,ct=lt.y;(0,o.awaitRedraw)().then((function(){e.scroll(st,ct)}))}var dt=(0,o.el)("div",{},[K?rt:null,w(X,q,ot),K?at:null]);return(0,o.el)(".dhx_grid.dhx_widget",{class:(X.css||"")+(K?"":" dhx_grid_border")+(T.multiselection?" dhx_no-select--pointer":""),style:{height:null!=M?M:null},"data-dhx-widget-id":a,"data-dhx-root-id":T.rootParent,role:"tree"===T.type?"treegrid":"grid","aria-rowcount":X.data.length,"aria-colcount":X.filteredColumns.length,"aria-readonly":X.editable?"false":"true","aria-multiselectable":X.multiselection?"true":"false","data-dhx-drop-area":"common"},[(0,o.resizer)((function(){return e.paint()})),Y&&(0,g.getGroupPanel)(T.$grouped,e)||null,U&&(0,_.getDragPanelNode)(e,X,J,!!et)||null,(0,o.el)(".dhx_grid-content",n(n({style:n({},z)},i),{class:"".concat(Q," ").concat(et," ").concat(tt," ").concat(it," ").concat(nt).trim(),role:"presentation"}),[(0,o.el)(".dhx_grid-focus-sentinel",{tabindex:0,role:"button","aria-label":"Enter grid"}),K?null:rt,(0,o.el)(".dhx_grid-body",{style:{height:Z,width:z.width-p.BORDERS},onscroll:i.onscroll,_ref:"grid_body",role:"presentation"},[e.scrollView&&e.scrollView.config.enable?e.scrollView.render([dt]):dt]),(0,u.getFixedColsHeader)(X,J,c.Split.left),(0,u.getFixedColsHeader)(X,J,c.Split.right),(0,u.getFixedCols)(X,J,c.Split.left),(0,u.getFixedCols)(X,J,c.Split.right),(0,h.getFixedDataRows)(X,J,c.Split.top),(0,h.getFixedDataRows)(X,J,c.Split.bottom),K?null:at,(0,o.el)(".dhx_grid-focus-sentinel.dhx_grid-focus-sentinel--end",{tabindex:0,role:"button","aria-label":"Exit grid"})])])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n,o=i(3),r=i(92),a=i(93),l=i(94),s=i(107),c=i(108),d=i(115),u={cell:{row:null,col:null},editor:null,gridId:null};e.getEditor=function(t,e,i,h){var f="boolean"===e.type?"checkbox":i.$editable.editorType;if(void 0===f&&(f=i.autoHeight?"textarea":"input"),u.cell.row===t.id&&u.cell.col===e.id&&u.gridId===i.gridId&&i.$editable.editor)return u.editor;switch("checkbox"!==f&&(u={cell:{row:t.id,col:e.id},editor:u.editor,gridId:i.gridId}),n||(n=function(){u={cell:{row:null,col:null},editor:null,gridId:null}},i.events.on(o.GridEvents.afterEditEnd,n)),f){case"input":default:return u.editor=new r.InputEditor(t,e,i);case"textarea":return u.editor=new d.TextAreaEditor(t,e,i,h);case"select":return u.editor=new a.SelectEditor(t,e,i);case"datePicker":return u.editor=new l.DateEditor(t,e,i);case"checkbox":return new s.CheckboxEditor(t,e,i);case"multiselect":case"combobox":return u.editor=new c.ComboboxEditor(t,e,i)}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var o=i(1),r=i(3),a=i(0),l=i(4),s=i(18),c=function(){function t(t,e,i){this.prevValue="",this._config=i,this._cell={row:t,col:e},this.type=e.type,this._initHandlers()}return t.prototype.endEdit=function(t){if(this._config.$editable){var e;if(!t&&(e=this._removeValuePattern(this._input.value,!0),"number"===this.type||this._cell.col.numberMask))if(e=parseFloat(e),Number.isNaN(e))e="";else{var i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);(0,a.isDefined)(null==i?void 0:i.min)&&e<n&&(e=n),(0,a.isDefined)(null==i?void 0:i.max)&&e>o&&(e=o)}this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;return(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this,(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,l.getColumnHeaderText)(this._cell.col),onblur:this._handlers.onBlur,oninput:this._handlers.onInput,value:t})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(){var e=t._removeValuePattern(t._input.value);"number"===t.type&&(t._isValidWord(e)?t.prevValue=e:e=t.prevValue,!t.prevValue.length||"-"===t.prevValue||t._isCorrectRange(parseFloat(t.prevValue))?t._input.classList.remove("dhx_cell-editor__input--not-valid"):t._input.classList.add("dhx_cell-editor__input--not-valid")),t._input.value=t._applyValuePattern(e,t._input)},didInsert:function(e){t._input=e.el,t._input.focus()}}},t.prototype._isValidWord=function(t){var e,i=null===(e=t[t.length-1])||void 0===e?void 0:e.toLocaleLowerCase(),n=function(t,e){return t.toLocaleLowerCase().split(e.toLocaleLowerCase()).length-1};return!t.length||"-"===t||"."===t||"-."===t&&this._cell.col.numberMask||!isNaN(Number(t))&&t.trim().length===t.length||t.replace("-","").length>1&&"e"===i&&!n(this.prevValue,"e")||t.replace("-","").length>1&&"e"===i&&1===n(t,"e")},t.prototype._isCorrectRange=function(t){var e=!0,i=this._cell.col.editorConfig,n=parseFloat(null==i?void 0:i.min),o=parseFloat(null==i?void 0:i.max);return(0,a.isDefined)(null==i?void 0:i.min)&&(0,a.isDefined)(null==i?void 0:i.max)?e=t>=n&&t<=o:(0,a.isDefined)(null==i?void 0:i.min)?e=t>n:(0,a.isDefined)(null==i?void 0:i.max)&&(e=t<o),e},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,s.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,s.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,s.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,s.removePatternMask)(t,this._cell.col.patternMask):t},t}();e.InputEditor=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectEditor=void 0;var n=i(1),o=i(3),r=i(4),a=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(t){var e;this._config.$editable&&(t||(e=this._input.value),this._config.events.fire(o.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("keydown",this._handlers.onkeydown),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(o.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus())},t.prototype.toHTML=function(){var t=(0,r.getEditorOptions)(this._cell.col,this._cell.row).map((function(t){return"string"==typeof t?{id:"".concat(t),value:t}:t}))||[],e=this._cell.row[this._cell.col.id];this._input&&(e=this._input.options[this._input.selectedIndex].value);var i=t.map((function(t){return(0,n.el)("option",{selected:t.id.toString()===(null==e?void 0:e.toString()),value:t.id},t.value)}));return this._config.$editable.editor=this,(0,n.el)("select.dhx_cell-editor.dhx_cell-editor__select",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,r.getColumnHeaderText)(this._cell.col)},i)},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onkeydown:function(e){"Escape"===e.key&&t.endEdit()},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onkeydown)}}},t}();e.SelectEditor=a},function(t,e,i){"use strict";var n=this&&this.__rest||function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i};Object.defineProperty(e,"__esModule",{value:!0}),e.DateEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(95),s=i(13),c=i(30),d=function(){function t(t,e,i){var n=this;this._config=i,this._cell={row:t,col:e},this._editorConfig=this._cleanConfig(e),this._calendar=new l.Calendar(null,this._editorConfig),this._calendar.setValue(this._getValue(this._cell.row[this._cell.col.id])),this._value=this._calendar.getValue(),this._cell.row[this._cell.col.id]=this._value,this._popup=new c.Popup,this._popup.attach(this._calendar),this._calendar.events.on(l.CalendarEvents.change,(function(){n.endEdit(!1,!0)})),this._popup.events.on(c.PopupEvents.afterHide,(function(){n.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(t,e){var i=this;if(this._handlers&&this._config.$editable){var n=this._calendar.config.dateFormat,a=this._cell.row[this._cell.col.id],l=this._input.value;if(!t){if(a instanceof Date||e)return this._value=this._calendar.getValue(),this._input.value=this._value,void this._popup.hide();!(0,s.stringToDate)(l,n,!0)&&l||(!a||l.length!==a.length)&&a&&l||(this._value=l,this._value?this._calendar.setValue(this._value):this._calendar.clear())}var c=this._calendar.getValue(this._editorConfig.asDateObject);this._config.events.fire(r.GridEvents.beforeEditEnd,[c,this._cell.row,this._cell.col])?(this._input.removeEventListener("focus",this._handlers.onFocus),this._input.removeEventListener("change",this._handlers.onChange),document.removeEventListener("mousedown",this._handlers.onOuterClick),(0,o.awaitRedraw)().then((function(){i._popup.destructor(),i._calendar.destructor()})),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[c,this._cell.row,this._cell.col])):this._input.focus()}},t.prototype.toHTML=function(){var t=this._getValue(this._cell.row[this._cell.col.id]);return this._config.$editable.editor=this,document.addEventListener("mousedown",this._handlers.onOuterClick),(0,o.el)("input.dhx_cell-editor.dhx_cell-editor__input.dhx_cell-editor__datepicker",{_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,a.getColumnHeaderText)(this._cell.col),value:t})},t.prototype._cleanConfig=function(t){var e=t.editorConfig||{},i=(e.value,e.range,e.dateFormat,n(e,["value","range","dateFormat"]));return i.dateFormat=t.dateFormat,i},t.prototype._initHandlers=function(){var t=this;this._handlers={onFocus:function(){(0,o.awaitRedraw)().then((function(){t._popup.show(t._input,{centering:!0,mode:"bottom",theme:t._input})}))},onChange:function(){t.endEdit()},onOuterClick:function(e){if(e.target instanceof Node){var i=t._input&&t._input.contains(e.target),n=t._popup&&t._popup.getRootNode()&&t._popup.getRootNode().contains(e.target);i||n||t._popup.hide()}},didInsert:function(e){var i=e.el;t._input=i,t._input.addEventListener("focus",t._handlers.onFocus),t._input.addEventListener("change",t._handlers.onChange),i.focus(),i.setSelectionRange(i.value.length,i.value.length)}}},t.prototype._getValue=function(t){var e=this._calendar.config.dateFormat||"%M %d %Y";if("string"==typeof t&&!(0,s.stringToDate)(t,e,!0)){var i=new Date(t);if(!(null==i?void 0:i.valueOf()))return"";t=i}return t},t}();e.DateEditor=d},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(96),e),o(i(46),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Calendar=void 0;var l=i(0),s=i(1),c=i(6),d=i(11),u=i(97),h=i(106),f=i(13),p=i(46),g=i(2),v=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,l.extend)({weekStart:"sunday",thisMonthOnly:!1,dateFormat:window&&window.dhx&&window.dhx.dateFormat,width:"250px"},i))||this;switch(n._selected=[],n.events=new c.EventSystem,n.config.disabledDates=n.config.disabledDates||n.config.block,n.config.mode=n.config.mode||n.config.view,n.config.dateFormat||(n.config.timePicker?12===n.config.timeFormat?n.config.dateFormat="%d/%m/%y %h:%i %A":n.config.dateFormat="%d/%m/%y %H:%i":n.config.dateFormat="%d/%m/%y"),n.config.value&&n._setSelected(n.config.value),n.config.date?n._currentDate=f.DateHelper.toDateObject(n.config.date,n.config.dateFormat):n._getSelected()?n._currentDate=f.DateHelper.copy(n._getSelected()):n._currentDate=new Date,n.config.mode){case"month":n._currentViewMode="month";break;case"year":n._currentViewMode="year";break;case"timepicker":n._currentViewMode=n.config.timePicker?"timepicker":"calendar";break;default:n._currentViewMode="calendar"}if(n._initHandlers(),n.config.timePicker){n._timepicker=new u.Timepicker(null,{timeFormat:n.config.timeFormat,controls:!0});var o=n._getSelected()||new Date;n._timepicker.setValue(o),n._time=n._timepicker.getValue(),n._timepicker.events.on(u.TimepickerEvents.afterClose,(function(){n._timepicker.setValue(n._time),n.showDate(null,"calendar")})),n._timepicker.events.on(u.TimepickerEvents.afterApply,(function(){var t=n._timepicker.getValue(!0),e=t.hour,i=t.minute,o=t.AM,r=n._getSelected(),a=f.DateHelper.withHoursAndMinutes(n._getSelected()||new Date,e,i,o);n.events.fire(p.CalendarEvents.beforeChange,[a,r,!0])&&(n._selected[n._selected.length-1]=a,n.events.fire(p.CalendarEvents.change,[a,r,!0])),n._time=n._timepicker.getValue(),n.showDate(null,"calendar")}))}return n.mount(e,(0,s.create)({render:function(){return n._draw()}})),n}return o(e,t),e.prototype.setValue=function(t){if(!t||t instanceof Array&&0===t.length)return!1;var e=t instanceof Array?t[0]:t,i=f.DateHelper.toDateObject(e,this.config.dateFormat),n=f.DateHelper.copy(this._getSelected());return!!this.events.fire(p.CalendarEvents.beforeChange,[i,n,!1])&&(this._selected=[],this._setSelected(t),this._timepicker&&(this._timepicker.setValue(i),this._time=this._timepicker.getValue()),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!1]),this.paint(),!0)},e.prototype.getValue=function(t){var e=this;return void 0===t&&(t=!1),this._selected[0]?this.config.range?t?this._selected.map((function(t){return f.DateHelper.copy(t)})):this._selected.map((function(t){return(0,f.getFormattedDate)(e.config.dateFormat,t)})):t?f.DateHelper.copy(this._selected[0]):(0,f.getFormattedDate)(this.config.dateFormat,this._selected[0]):""},e.prototype.getCurrentMode=function(){return this._currentViewMode},e.prototype.showDate=function(t,e){t&&(this._currentDate=f.DateHelper.copy(t)),e&&(this._currentViewMode=e),this.paint()},e.prototype.destructor=function(){this._linkedCalendar&&this._unlink(),this._timepicker&&this._timepicker.destructor(),this.events&&this.events.clear(),this.config=this.events=null,this._uid=this._selected=this._currentDate=this._currentViewMode=this._handlers=this._timepicker=this._time=null,this.unmount()},e.prototype.clear=function(){var t=this.getValue(!0);this.events.fire(p.CalendarEvents.beforeChange,["",t,!1])&&(this.config.timePicker&&(this._timepicker.clear(),this._time=this._timepicker.getValue()),this._selected=[],this.showDate(null,this.config.mode),this.events.fire(p.CalendarEvents.change,[this.getValue(!0),t,!1,"clear"]))},e.prototype.link=function(t){var e=this;this._linkedCalendar&&this._unlink(),this._linkedCalendar=t;var i=this.getValue(!0),n=t.getValue(!0),o=i&&f.DateHelper.dayStart(i),r=n&&f.DateHelper.dayStart(n);this.config.$rangeMark&&this._linkedCalendar.config.$rangeMark||(this.config.$rangeMark=this._linkedCalendar.config.$rangeMark=function(t){if(o&&r)return t>=o&&t<=r&&function(t){if(f.DateHelper.isSameDay(r,o))return null;var e="dhx_calendar-day--in-range";return f.DateHelper.isSameDay(t,o)&&(e+=" dhx_calendar-day--first-date"),f.DateHelper.isSameDay(t,r)&&(e+=" dhx_calendar-day--last-date"),e}(t)}),this.config.disabledDates&&this._linkedCalendar.config.disabledDates||(this.config.disabledDates=function(t){if(r)return t>r},this._linkedCalendar.config.disabledDates=function(t){if(o)return t<o}),this.config.thisMonthOnly=!0,t.config.thisMonthOnly=!0,this.events.on(p.CalendarEvents.change,(function(t){o=t?f.DateHelper.dayStart(t):null,e._linkedCalendar.paint()}),"link"),this._linkedCalendar.events.on(p.CalendarEvents.change,(function(t){r=t?f.DateHelper.dayStart(t):null,e.paint()}),"link"),this._linkedCalendar.paint(),this.paint()},e.prototype._unlink=function(){this._linkedCalendar&&(this.config.$rangeMark=this._linkedCalendar.config.$rangeMark=null,this.config.disabledDates=this._linkedCalendar.config.disabledDates=null,this.events.detach(p.CalendarEvents.change,"link"),this._linkedCalendar.events.detach(p.CalendarEvents.change,"link"),this._linkedCalendar.paint(),this._linkedCalendar=null)},e.prototype._setSelected=function(t){var e=this,i=t instanceof Array?t[0]:t,n=f.DateHelper.toDateObject(i,this.config.dateFormat);if(t instanceof Array&&this.config.range){var o=[];t.forEach((function(t,i){i<2&&o.push(f.DateHelper.toDateObject(t,e.config.dateFormat))})),2===o.length&&o[0]<=o[1]?o.forEach((function(t){return e._selected.push(t)})):this._selected[0]=o[0]}else this._selected[0]=n},e.prototype._getSelected=function(){return this._selected[this._selected.length-1]},e.prototype._draw=function(){switch(this._currentViewMode){case"calendar":return this.events.fire(p.CalendarEvents.modeChange,["calendar"]),this._drawCalendar();case"month":return this.events.fire(p.CalendarEvents.modeChange,["month"]),this._drawMonthSelector();case"year":return this.events.fire(p.CalendarEvents.modeChange,["year"]),this._drawYearSelector();case"timepicker":return this.events.fire(p.CalendarEvents.modeChange,["timepicker"]),this._drawTimepicker()}},e.prototype._initHandlers=function(){var t=this,e={Up:"ArrowUp",Down:"ArrowDown",Right:"ArrowRight",Left:"ArrowLeft",Esc:"Escape",Spacebar:"Space"},i=function(e){void 0===e&&(e=!1);var i=0;switch(t._currentViewMode){case"calendar":i=e?-7:7;break;case"month":case"year":i=e?-4:4}return i};this._handlers={onkeydown:{".dhx_calendar-year, .dhx_calendar-month, .dhx_calendar-day":function(n,o){switch(function(t){var i;if(t.which>=48&&t.which<=57||t.which>=65&&t.which<=90)i=String.fromCharCode(t.which);else{var n=32===t.which?t.code:t.key;i=(0,g.isIE)()&&e[n]||n}return i}(n)){case"Enter":t._selectDate(n,o);break;case"ArrowLeft":t._moveBrowseFocus(n,o,-1);break;case"ArrowRight":t._moveBrowseFocus(n,o,1);break;case"ArrowUp":t._moveBrowseFocus(n,o,i(!0));break;case"ArrowDown":t._moveBrowseFocus(n,o,i())}}},onclick:{".dhx_calendar-year, .dhx_calendar-month, .dhx_calendar-day":function(e,i){t._selectDate(e,i)},".dhx_calendar-action__cancel":function(){t.showDate(t._getSelected(),"calendar"),t.events.fire(p.CalendarEvents.cancelClick,[])},".dhx_calendar-action__show-month":function(){return t.showDate(null,"month")},".dhx_calendar-action__show-year":function(){return t.showDate(null,"year")},".dhx_calendar-action__next":function(){var e;switch(t._currentViewMode){case"calendar":e=f.DateHelper.addMonth(t._currentDate,1);break;case"month":e=f.DateHelper.addYear(t._currentDate,1);break;case"year":e=f.DateHelper.addYear(t._currentDate,12)}t.showDate(e)},".dhx_calendar-action__prev":function(){var e;switch(t._currentViewMode){case"calendar":e=f.DateHelper.addMonth(t._currentDate,-1);break;case"month":e=f.DateHelper.addYear(t._currentDate,-1);break;case"year":e=f.DateHelper.addYear(t._currentDate,-12)}t.showDate(e)},".dhx_calendar-action__show-timepicker":function(){t._currentViewMode="timepicker",t.paint()}},onmouseover:{".dhx_calendar-day":function(e,i){t.events.fire(p.CalendarEvents.dateMouseOver,[new Date(i.attrs._date),e]),t.events.fire(p.CalendarEvents.dateHover,[new Date(i.attrs._date),e])}}}},e.prototype._getData=function(t){var e,i=this;switch(this._isSelectedInCurrentRange=!1,this.config.weekStart){case"saturday":e=-1;break;case"monday":e=1;break;default:e=0}for(var n=[],o=6,r=f.DateHelper.weekStart(f.DateHelper.monthStart(t),e);o--;){for(var a=f.DateHelper.getWeekNumber(r),l=0,s=7,c=[],d=function(){var e=f.DateHelper.isWeekEnd(r),n=t.getMonth()===r.getMonth(),o=u.config.disabledDates&&u.config.disabledDates(r),a=[];if(u.config.range&&u._selected[0]&&u._selected[1]){var s=function(){if(i._selected[0]&&i._selected[1]){var t=f.DateHelper.dayStart(i._selected[0]),e=f.DateHelper.dayStart(i._selected[1]);return r>=t&&r<=e&&(f.DateHelper.isSameDay(i._selected[0],i._selected[1])?null:"dhx_calendar-day--in-range")}};u.config.$rangeMark=s}if(e&&a.push("dhx_calendar-day--weekend"),n||(u.config.thisMonthOnly?(l++,a.push("dhx_calendar-day--hidden")):a.push("dhx_calendar-day--muffled")),u.config.mark){var d=u.config.mark(r);d&&a.push(d)}u.config.$rangeMark&&((s=u.config.$rangeMark(r))&&a.push(s));o&&(e?a.push("dhx_calendar-day--weekend-disabled"):a.push("dhx_calendar-day--disabled")),u._selected.forEach((function(t,e){if(t&&f.DateHelper.isSameDay(t,r)){i._isSelectedInCurrentRange=!0;var n="dhx_calendar-day--selected";i.config.range&&(n+=" dhx_calendar-day--selected-".concat(0===e?"first ":"last")),a.push(n)}})),c.push({date:r,day:r.getDate(),css:a.join(" ")}),r=f.DateHelper.addDay(r)},u=this;s--;)d();n.push({weekNumber:a,days:c,disabledWeekNumber:7===l})}return n},e.prototype._drawCalendar=function(){var t,e=this,i=this._currentDate,n=this.config,o=n.weekStart,l=n.thisMonthOnly,c=n.css,d=n.timePicker,u=n.width;switch(o){case"saturday":t=a([f.locale.daysShort[6]],f.locale.daysShort.slice(0,-1),!0);break;case"monday":t=a(a([],f.locale.daysShort.slice(1),!0),[f.locale.daysShort[0]],!1);break;default:t=f.locale.daysShort}for(var h,p=t.map((function(t){return(0,s.el)(".dhx_calendar-weekday",t)})),g=this._getData(i),v=!0,_=this._getSelected(),m=function(t){var i={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(e._isSelectedInCurrentRange?function(t){return t&&_&&t.getTime()===_.getTime()}(t.date)&&(i.tabindex=0,i["aria-pressed"]="true"):v&&(i.tabindex=0),v=!1),i},y=[],b=[],x=0,w=g;x<w.length;x++){var C=w[x],S=C.days.map((function(t){return(0,s.el)("div.dhx_calendar-day",r({class:t.css,_date:t.date},m(t)),t.day)}));!this.config.weekNumbers||C.disabledWeekNumber&&l||b.push((0,s.el)("div",{class:"dhx_calendar-week-number"},C.weekNumber)),y=y.concat(S)}this.config.weekNumbers&&(h=(0,s.el)(".dhx_calendar__week-numbers",b));var E="dhx_calendar dhx_widget"+(c?" "+c:"")+(d?" dhx_calendar--with_timepicker":"")+(this.config.weekNumbers?" dhx_calendar--with_week-numbers":"");return(0,s.el)("div",r({class:E,style:{width:this.config.weekNumbers?parseInt(u.toString())+48+"px":u}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_calendar-action__show-month.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},f.locale.months[i.getMonth()]+" "+i.getFullYear())),this.config.weekNumbers&&(0,s.el)(".dhx_calendar__dates-wrapper",[(0,s.el)(".dhx_calendar__weekdays",p),(0,s.el)(".dhx_calendar__days",y),h]),!this.config.weekNumbers&&(0,s.el)(".dhx_calendar__weekdays",p),!this.config.weekNumbers&&(0,s.el)(".dhx_calendar__days",y),d?(0,s.el)(".dhx_timepicker__actions",[(0,s.el)("button.dhx_calendar__timepicker-button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__show-timepicker",{type:"button"},[(0,s.el)("span.dhx_button__icon.dxi.dxi-clock-outline"),(0,s.el)("span.dhx_button__text",this._time)])]):null])])},e.prototype._drawMonthSelector=function(){var t=this._currentDate,e=t.getMonth(),i=this._getSelected()?this._getSelected().getFullYear():null,n=this.config,o=n.css,a=n.timePicker,l=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(l?" dhx_calendar--with_week-numbers":""),h=!0,p=i===t.getFullYear(),g=function(t){return p&&e===t};return(0,s.el)("div",r({class:u,style:{width:l?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_calendar-action__show-year.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},t.getFullYear())),(0,s.el)(".dhx_calendar__months",f.locale.monthsShort.map((function(t,e){return(0,s.el)("div",r(r({class:"dhx_calendar-month"+(g(e)?" dhx_calendar-month--selected":"")},function(t,e){var i={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(p?g(e)&&(i.tabindex=0,i["aria-pressed"]="true"):h&&(i.tabindex=0),h=!1),i}(t,e)),{_date:e}),t)}))),"month"!==d?(0,s.el)(".dhx_calendar__actions",[(0,s.el)("button.dhx_button.dhx_button--color_primary.dhx_button--view_link.dhx_button--size_small.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__cancel",{type:"button"},f.locale.cancel)]):null])])},e.prototype._drawYearSelector=function(){var t=this,e=this._currentDate,i=f.DateHelper.getTwelweYears(e),n=this.config,o=n.css,a=n.timePicker,l=n.weekNumbers,c=n.width,d=n.mode,u="dhx_calendar dhx_widget"+(o?" "+o:"")+(a?" dhx_calendar--with_timepicker":"")+(l?" dhx_calendar--with_week-numbers":""),h=!0,p=this._getSelected()&&i.includes(this._getSelected().getFullYear()),g=function(e){return t._getSelected()&&e===t._getSelected().getFullYear()};return(0,s.el)("div",r({class:u,style:{width:l?parseInt(c.toString())+48+"px":c}},this._handlers),[(0,s.el)(".dhx_calendar__wrapper",[this._drawHeader((0,s.el)("button.dhx_button.dhx_button--view_link.dhx_button--size_small.dhx_button--color_secondary.dhx_button--circle",{"aria-live":"polite",type:"button"},i[0]+"-"+i[i.length-1])),(0,s.el)(".dhx_calendar__years",i.map((function(t){return(0,s.el)("div",r({class:"dhx_calendar-year"+(g(t)?" dhx_calendar-year--selected":""),_date:t},function(t){var e={role:"button",tabindex:-1,"aria-pressed":"false"};return t&&(p?g(t)&&(e.tabindex=0,e["aria-pressed"]="true"):h&&(e.tabindex=0),h=!1),e}(t)),t)}))),"year"!==d&&"month"!==d?(0,s.el)(".dhx_calendar__actions",[(0,s.el)("button.dhx_button.dhx_button--color_primary.dhx_button--view_link.dhx_button--size_small.dhx_button--width_full.dhx_button--circle.dhx_calendar-action__cancel",{type:"button"},f.locale.cancel)]):null])])},e.prototype._drawHeader=function(t){return(0,s.el)(".dhx_calendar__navigation",[(0,s.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__prev"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"prev",type:"button"},[(0,s.el)(".dhx_button__icon.dxi.dxi-chevron-left")]),t,(0,s.el)("button.dhx_calendar-navigation__button.dhx_calendar-action__next"+h.linkButtonClasses+".dhx_button--icon.dhx_button--circle",{"aria-label":"next",type:"button"},[(0,s.el)(".dhx_button__icon.dxi.dxi-chevron-right")])])},e.prototype._drawTimepicker=function(){var t=this.config,e=t.css,i=t.weekNumbers,n=t.width;return(0,s.el)(".dhx_widget.dhx-calendar",{class:e?" "+e:"",style:{width:i?parseInt(n.toString())+48+"px":n}},[(0,s.inject)(this._timepicker.getRootView())])},e.prototype._selectDate=function(t,e){var i=e.attrs._date,n=f.DateHelper.copy(this._getSelected());switch(this._currentViewMode){case"calendar":var o=this.config.timePicker?f.DateHelper.mergeHoursAndMinutes(i,this._getSelected()||this._currentDate):i;if(!this.events.fire(p.CalendarEvents.beforeChange,[o,n,!0]))return;this.config.range&&1===this._selected.length&&this._selected[0]<=o?this._selected.push(o):(this._selected=[],this._selected[0]=o),e.el.blur(),this.showDate(this._getSelected()),this.events.fire(p.CalendarEvents.change,[i,n,!0]);break;case"month":if("month"!==this.config.mode)f.DateHelper.setMonth(this._currentDate,i),this.showDate(null,"calendar"),this.events.fire(p.CalendarEvents.monthSelected,[i]);else{var r=f.DateHelper.fromYearAndMonth(this._currentDate.getFullYear()||this._getSelected().getFullYear(),i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.monthSelected,[i]),this.paint()}break;case"year":if("year"!==this.config.mode)f.DateHelper.setYear(this._currentDate,i),this.showDate(null,"month"),this.events.fire(p.CalendarEvents.yearSelected,[i]);else{r=f.DateHelper.fromYear(i);if(!this.events.fire(p.CalendarEvents.beforeChange,[r,n,!0]))return;this._currentDate=r,this._selected[0]=r,this.events.fire(p.CalendarEvents.change,[this._getSelected(),n,!0]),this.events.fire(p.CalendarEvents.yearSelected,[i]),this.paint()}}},e.prototype._moveBrowseFocus=function(t,e,i){if(e){var n=e.parent.body[e.idx+i];if(n){var o=n.el;o&&(t.target.tabIndex=-1,o.tabIndex=0,o.focus({preventScroll:!0}))}}},e}(d.View);e.Calendar=v},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(98),e),o(i(45),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Timepicker=void 0;var a=i(0),l=i(1),s=i(6),c=i(11),d=i(27),u=i(101),h=i(104),f=i(105),p=i(45),g=i(2);function v(t,e){return isNaN(t)?0:Math.min(e,Math.max(0,t))}var _=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,e,(0,a.extend)({timeFormat:24,controls:!1,valueFormat:"string",actions:!1},i))||this;return n.events=new s.EventSystem(n),n._time={hour:0,minute:0,AM:!0},12===n.config.timeFormat&&(n._time.hour=12),n.config.controls=n.config.controls||n.config.actions,n.config.value&&n._setValue(n.config.value),n._initUI(e),n._initHandlers(),n._initEvents(),n}return o(e,t),e.prototype.getValue=function(t){return 12===this.config.timeFormat&&(this._time.hour=this._time.hour%12||12),this._getValue(this._time,t)},e.prototype.setValue=function(t){this._setValue(t),this._hoursSlider.setValue(this._time.hour),this._minutesSlider.setValue(this._time.minute),this._inputsView.paint()},e.prototype.clear=function(){24===this.config.timeFormat?this.setValue("00:00"):this.setValue("12:00AM")},e.prototype.destructor=function(){this._minutesSlider&&this._minutesSlider.destructor(),this._hoursSlider&&this._hoursSlider.destructor(),this.events&&this.events.clear(),this.layout&&this.layout.destructor(),this.config=this.events=null,this._handlers=this._time=this._inputsView=this._minutesSlider=this._hoursSlider=null,this.unmount()},e.prototype.getRootView=function(){return this.layout.getRootView()},e.prototype._getValue=function(t,e){var i=t.hour,n=t.minute,o=t.AM;if(e){var r={hour:i,minute:n};return 12===this.config.timeFormat&&(r.AM=o),r}return(i<10?"0"+i:i)+":"+(n<10?"0"+n:n)+(12===this.config.timeFormat?o?"AM":"PM":"")},e.prototype._setValue=function(t){var e,i=0,n=0;if("number"==typeof t&&(t=new Date(t)),t instanceof Date)i=t.getMinutes(),n=t.getHours();else if(Array.isArray(t))n=v(t[0],23),i=v(t[1],59),t[2]&&"pm"===t[2].toLowerCase()&&(e=!0);else if("string"==typeof t){var o=t.match(/\d+/g);n=v(+o[0],23),i=v(+o[1],59),t.toLowerCase().includes("pm")&&(e=!0)}else"object"==typeof t&&t.hasOwnProperty("hour")&&t.hasOwnProperty("minute")&&(n=t.hour,i=t.minute,e=!t.AM);return e&&n<12&&(n+=12),12===this.config.timeFormat&&!(0,f.isTimeCheck)(t)&&n>=12&&(e=!0),this._time={hour:n,minute:i,AM:!e}},e.prototype._initUI=function(t){var e=this,i={gravity:!1,css:"dhx_widget dhx_timepicker "+(this.config.css?this.config.css:"")+(this.config.controls?" dhx_timepicker--with-controls":""),rows:[{id:"timepicker",css:"dhx_timepicker__inputs"},{id:"hour-slider",css:"dhx_timepicker__hour"},{id:"minute-slider",css:"dhx_timepicker__minute"}]};this.config.controls&&(i.rows.unshift({id:"close-action",css:"dhx_timepicker__close"}),i.rows.push({id:"save-action",css:"dhx_timepicker__save"}));var n=this.layout=new d.Layout(t,i),o=(0,l.create)({render:function(){return e._draw()}}),r=this._inputsView=(0,c.toViewLike)(o),a=this._minutesSlider=new u.Slider(null,{min:0,max:59,step:1,tooltip:!1,labelPosition:"top",label:h.default.minutes,value:this.config.value?this._time.minute:0}),s=this._hoursSlider=new u.Slider(null,{min:0,max:23,step:1,tooltip:!1,labelPosition:"top",label:h.default.hours,value:this.config.value?12===this._time.hour&&this._time.AM?0:this._time.hour:0});if(n.getCell("timepicker").attach(r),n.getCell("hour-slider").attach(s),n.getCell("minute-slider").attach(a),this.config.controls){n.getCell("save-action").attach((function(){return(0,l.el)("button.dhx_timepicker__button-save.dhx_button.dhx_button--view_flat.dhx_button--color_primary.dhx_button--size_small.dhx_button--circle.dhx_button--width_full",{onclick:e._outerHandlers.save,type:"button"},h.default.save)})),n.getCell("close-action").attach((function(){return(0,l.el)("button.dhx_timepicker__button-close.dhx_button.dhx_button--view_link.dhx_button--size_medium.dhx_button--view_link.dhx_button--color_secondary.dhx_button--icon.dhx_button--circle",{_ref:"close",onclick:e._outerHandlers.close,type:"button","aria-label":"close timepicker"},[(0,l.el)("span.dhx_button__icon.dxi.dxi-close")])}))}},e.prototype._initHandlers=function(){var t=this,e=function(e){var i=v(parseInt(e.value,10),59);e.value=i.toString(),t._minutesSlider.setValue(i)},i=function(e){var i=v(parseInt(e.value,10),23);e.value=i.toString(),t._hoursSlider.setValue(i)};this._handlers={onchange:{".dhx_timepicker-input--hour":function(t){return i(t.target)},".dhx_timepicker-input--minutes":function(t){return e(t.target)}},oninput:{".dhx_timepicker-input--hour":function(t){((0,g.isSafari)()||(0,g.isFirefox)())&&i(t.target)},".dhx_timepicker-input--minutes":function(t){((0,g.isSafari)()||(0,g.isFirefox)())&&e(t.target)}}},this._outerHandlers={close:function(){t.events.fire(p.TimepickerEvents.beforeClose,[t.getValue(t._isTimeObj())])&&(t.events.fire(p.TimepickerEvents.afterClose,[t.getValue(t._isTimeObj())]),t.events.fire(p.TimepickerEvents.close,[]))},save:function(){t.events.fire(p.TimepickerEvents.beforeApply,[t.getValue(t._isTimeObj())])&&(t.events.fire(p.TimepickerEvents.afterApply,[t.getValue(t._isTimeObj())]),t.events.fire(p.TimepickerEvents.apply,[t.getValue()]),t.events.fire(p.TimepickerEvents.save,[t._time]))}}},e.prototype._initEvents=function(){var t=this;this._hoursSlider.events.on(u.SliderEvents.beforeChange,(function(e){if(!(e<t._hoursSlider.config.min||e>t._hoursSlider.config.max)){var i=r({},t._time);12===t.config.timeFormat?(i.AM=e<12,i.hour=e%12||12):i.hour=e;var n=t._isTimeObj();return t.events.fire(p.TimepickerEvents.beforeChange,[t._getValue(i,n)])}})),this._hoursSlider.events.on(u.SliderEvents.change,(function(e){if(!(e<t._hoursSlider.config.min||e>t._hoursSlider.config.max)){12===t.config.timeFormat?(t._time.AM=e<12,t._time.hour=e%12||12):t._time.hour=e;var i=t._isTimeObj();t.events.fire(p.TimepickerEvents.change,[t.getValue(i)]),t._inputsView.paint()}})),this._minutesSlider.events.on(u.SliderEvents.beforeChange,(function(e){if(!(e<t._minutesSlider.config.min||e>t._minutesSlider.config.max)){var i=r(r({},t._time),{minute:e}),n=t._isTimeObj();return t.events.fire(p.TimepickerEvents.beforeChange,[t._getValue(i,n)])}})),this._minutesSlider.events.on(u.SliderEvents.change,(function(e){if(!(e<t._minutesSlider.config.min||e>t._minutesSlider.config.max)){t._time.minute=e;var i=t._isTimeObj();t.events.fire(p.TimepickerEvents.change,[t.getValue(i)]),t._inputsView.paint()}}))},e.prototype._draw=function(){return this._minutesSlider.config.label=h.default.minutes,this._hoursSlider.config.label=h.default.hours,(0,l.el)(".dhx_timepicker-inputs",r({},this._handlers),[(0,l.el)("input.dhx_timepicker-input.dhx_timepicker-input--hour",{_key:"hour",_ref:"hour",value:this.getValue(!0).hour.toString().length>1?this.getValue(!0).hour:"0"+this.getValue(!0).hour,"aria-label":"hours"}),(0,l.el)("span.dhx_timepicker-delimer",":"),(0,l.el)("input.dhx_timepicker-input.dhx_timepicker-input--minutes",{_key:"minute",value:this.getValue(!0).minute.toString().length>1?this.getValue(!0).minute:"0"+this.getValue(!0).minute,"aria-label":"minutes"}),12===this.config.timeFormat?(0,l.el)(".dhx_timepicker-ampm",this._time.AM?"AM":"PM"):null])},e.prototype._isTimeObj=function(){var t;return"timeobject"===(null===(t=this.config.valueFormat)||void 0===t?void 0:t.toLowerCase())},e}(c.View);e.Timepicker=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMarginSize=e.getBlockRange=void 0,e.getBlockRange=function(t,e,i){return void 0===i&&(i=!0),i?{min:t.left+window.pageXOffset,max:e.right+window.pageXOffset}:{min:t.top+window.pageYOffset,max:e.bottom+window.pageYOffset}},e.getMarginSize=function(t){return t&&("space"===t.type||"wide"===t.type)?12:0}},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProLayout=void 0;var r=i(28),a=i(41),l=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createCell=function(t){var i;return t.rows||t.cols||t.views?(t.parent=this._root,i=new e(this,t)):i=new a.ProCell(this,t),this._root._all[i.id]=i,t.init&&t.init(i,t),i},e}(r.Layout);e.ProLayout=l},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,n,o)}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),o=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),o(i(102),e),o(i(44),e)},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var a=i(0),l=i(1),s=i(6),c=i(25),d=i(11),u=i(30),h=i(44),f=i(2);function p(t,e,i){return t<e?e:t>i?i:t}var g=function(t){function e(e,i){var n=t.call(this,e,(0,a.extend)({mode:"horizontal",min:0,max:100,step:1,tooltip:!0},i))||this;n._disabled=!1,n.config.helpMessage=n.config.helpMessage||n.config.help,void 0!==n.config.thumbLabel&&(n.config.tooltip=n.config.thumbLabel),n.config.labelInline&&(n.config.labelPosition="left"),n.events=new s.EventSystem(n),n._axis="horizontal"===n.config.mode?"clientX":"clientY",n._initStartPosition(),n._keyManager=new c.KeyManager((function(){var t,e;return document.activeElement===(null===(e=null===(t=n.getRootView().refs)||void 0===t?void 0:t[n._isExtraActive?"extraRunner":"runner"])||void 0===e?void 0:e.el)})),n._initHotkeys();var o=(0,l.create)({render:function(){return n._draw()},hooks:{didMount:function(){return n._calcSliderPosition()},didRedraw:function(){return n._calcSliderPosition()}}});return n._initHandlers(),n.mount(e,o),n}return o(e,t),e.prototype.disable=function(){this._disabled=!0,this.paint()},e.prototype.enable=function(){this._disabled=!1,this.paint()},e.prototype.isDisabled=function(){return this._disabled},e.prototype.focus=function(t){this.getRootView().refs[t?"extraRunner":"runner"].el.focus()},e.prototype.blur=function(){this.getRootView().refs[this._isExtraActive?"extraRunner":"runner"].el.blur()},e.prototype.getValue=function(){var t;if(this.config.range){var e=this._getValue(this._currentPosition),i=this._getValue(this._extraCurrentPosition);t=e<i?[e,i]:[i,e]}else t=[this._getValue(this._currentPosition)];return t},e.prototype.setValue=function(t){var e=this._getValue(this._currentPosition);if(Array.isArray(t)&&t.length>1){var i=this._getValue(this._extraCurrentPosition);this.events.fire(h.SliderEvents.beforeChange,[t[0],e,!1])&&(this._setValue(t[0],!1),this.events.fire(h.SliderEvents.change,[t[0],e,!1])),this.events.fire(h.SliderEvents.beforeChange,[t[1],i,!0])&&(this._setValue(t[1],!0),this.events.fire(h.SliderEvents.change,[t[1],i,!0]))}else{if(t=parseFloat(t),isNaN(t))throw new Error("Wrong value type, for more info check documentation https://docs.dhtmlx.com/suite/slider__api__slider_setvalue_method.html");this.events.fire(h.SliderEvents.beforeChange,[t,e,!1])&&(this._setValue(t),this.events.fire(h.SliderEvents.change,[t,e,!1]))}this.paint()},e.prototype.destructor=function(){this._keyManager&&this._keyManager.destructor(),document.body.contains(this._tooltip)&&document.body.removeChild(this._tooltip),this._tooltip=null,this.unmount()},e.prototype._calcSliderPosition=function(){var t=this.getRootView();if(t){var e=t.refs.track.el.getBoundingClientRect();this._offsets={left:e.left+window.pageXOffset,top:e.top+window.pageYOffset},this._length="horizontal"===this.config.mode?e.width:e.height}},e.prototype._initHotkeys=function(){var t=this,e={arrowLeft:function(e){e.preventDefault(),t._move(-t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowRight:function(e){e.preventDefault(),t._move(t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowUp:function(e){e.preventDefault(),t._move(t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))},arrowDown:function(e){e.preventDefault(),t._move(-t.config.step,e.target.classList.contains("dhx_slider__thumb--extra"))}};for(var i in e)this._keyManager.addHotKey(i,e[i])},e.prototype._move=function(t,e){void 0===e&&(e=!1),this.config.inverse&&(t=-t);var i=this.config,n=i.max,o=i.min,r=e?this._getValue(this._extraCurrentPosition):this._getValue(this._currentPosition),a=r+t;(a>n||a<o)&&(a=r),this.events.fire(h.SliderEvents.beforeChange,[a,r,e])&&(this._setValue(r+t,e),this.events.fire(h.SliderEvents.change,[a,r,e]),this.paint())},e.prototype._initStartPosition=function(){var t=this.config,e=t.max,i=t.min,n=t.range,o=function(t,e,i){var n;return(n=void 0===t?[]:Array.isArray(t)?t:"string"==typeof t?t.split(",").map((function(t){return parseInt(t,10)})):[t])[0]=void 0===n[0]?e:p(n[0],e,i),n[1]=void 0===n[1]?i:p(n[1],e,i),n}(this.config.value,this.config.min,this.config.max),r=o[0],a=o[1];this._currentPosition=(r-i)/(e-i)*100,n&&(this._extraCurrentPosition=(e-a)/(e-i)*100),this._currentPosition=(r-i)/(e-i)*100,n&&(this._extraCurrentPosition=(a-i)/(e-i)*100),this._isInverse()&&(this._currentPosition=100-this._currentPosition,n&&(this._extraCurrentPosition=100-this._extraCurrentPosition))},e.prototype._getValue=function(t){this._isInverse()&&(t=100-t);var e=this.config,i=e.min,n=e.max,o=e.step;if(100===t)return n;if(0===t)return i;var r=t*(n-i)/100,a=r%o,l=a>=o/2?o:0;return+(Number(i)+Number(r)-a+l).toFixed(5)},e.prototype._setValue=function(t,e){void 0===e&&(e=!1);var i=this.config,n=i.max,o=i.min;if(t>n||t<o)return!1;var r=(t-o)/(n-o)*100,a=this._isInverse()?100-r:r;e?this._extraCurrentPosition=a:this._currentPosition=a},e.prototype._initHandlers=function(){var t=this,e=function(e){e.cancelable&&e.preventDefault();var i=((e.targetTouches?e.targetTouches[0][t._axis]:e[t._axis])-t._getBegining())/t._length*100;if(t._findNewDirection){if(Math.abs(t._currentPosition-i)<1)return;i>t._currentPosition?t._possibleRange=[t._currentPosition,100]:t._possibleRange=[0,t._currentPosition],t._findNewDirection=null}t._inSide(i)&&t._updatePosition(i,t._isExtraActive),t.paint()},i=function(n){t.events.fire(h.SliderEvents.mouseup,[n]),setTimeout((function(){t._isMouseMoving=!1,t.paint()}),4),n.targetTouches?(document.removeEventListener("touchend",i),document.removeEventListener("touchmove",e)):(document.removeEventListener("mouseup",i),document.removeEventListener("mousemove",e))},n=function(e){var i;if(!t._disabled&&3!==e.which)if(t.events.fire(h.SliderEvents.mousedown,[e]),t._isMouseMoving=!0,e.target.classList.contains("dhx_slider__thumb--extra")?(t._isExtraActive=!0,i=t._extraCurrentPosition):(t._isExtraActive=!1,i=t._currentPosition),t._findNewDirection=null,t.config.range){var n=t._currentPosition>t._extraCurrentPosition?[t._currentPosition,t._extraCurrentPosition]:[t._extraCurrentPosition,t._currentPosition],o=n[0],r=n[1];t._currentPosition===t._extraCurrentPosition?(t._findNewDirection=i,t._possibleRange=[0,100]):t._possibleRange=i<o?[0,o]:[r,100]}else t._possibleRange=[0,100]};this.config.helpMessage&&(this._helper=new u.Popup({css:"dhx_tooltip dhx_tooltip--forced dhx_tooltip--light"}),this._helper.attachHTML(this.config.helpMessage)),this._handlers={showHelper:function(e){e.preventDefault(),e.stopPropagation(),t._helper.show(e.target,{theme:e.target})},onmousedown:function(t){n(t),document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)},ontouchstart:function(o){t._setTooltip(o),t._mouseIn=!1,n(o),document.addEventListener("touchmove",e,{passive:!1}),document.addEventListener("touchend",i),t.paint()},ontouchend:function(e){t._setTooltip(e),t._mouseIn=!1,t.paint()},onlabelClick:function(){t.getRootView().refs.runner.el.focus()},onclick:function(e){if(!t._disabled&&!t._isMouseMoving&&3!==e.which){var i=(e[t._axis]-t._getBegining())/t._length*100,n=t.getRootView().refs;if(t.config.range)Math.abs(t._currentPosition-i)<Math.abs(t._extraCurrentPosition-i)?(t._updatePosition(i,!1),n.runner.el.focus()):(t._updatePosition(i,!0),n.extraRunner.el.focus());else t._updatePosition(i,!1),n.runner.el.focus();t.paint()}},onmouseover:function(e){t._setTooltip(e),t._mouseIn=!0,t.paint()},onmouseout:function(e){t._setTooltip(e),t._mouseIn=!1,t.paint()},onfocus:function(e){t._setTooltip(e),t._focusIn=!0,t.events.fire(h.SliderEvents.focus,[]),t.paint()},onblur:function(e){t._setTooltip(e),t._focusIn=!1,t.events.fire(h.SliderEvents.blur,[]),t.paint()},onkeydown:function(e){t.events.fire(h.SliderEvents.keydown,[e])}}},e.prototype._getBegining=function(){return"horizontal"===this.config.mode?this._offsets.left-window.pageXOffset:this._offsets.top-window.pageYOffset},e.prototype._inSide=function(t){var e=this._possibleRange;return t<e[0]?(this._updatePosition(e[0],this._isExtraActive),!1):!(t>e[1])||(this._updatePosition(e[1],this._isExtraActive),!1)},e.prototype._updatePosition=function(t,e){void 0===e&&(e=!1),t>100&&(t=100),t<0&&(t=0);var i=this.config,n=i.max,o=i.min,r=e?this._extraCurrentPosition:this._currentPosition,a=this._getValue(r),l=this._getValue(t);if(a!==l&&this.events.fire(h.SliderEvents.beforeChange,[l,a,e])){var s=(l-o)/(n-o)*100,c=this._isInverse()?100-s:s;e?this._extraCurrentPosition=c:this._currentPosition=c,this.events.fire(h.SliderEvents.change,[l,a,e])}},e.prototype._getRunnerStyle=function(t){var e;void 0===t&&(t=!1);var i="horizontal"===this.config.mode?"left":"top",n=t?this._extraCurrentPosition:this._currentPosition;return(e={})[i]=n+"%",e},e.prototype._isInverse=function(){return this.config.inverse&&"horizontal"===this.config.mode||!this.config.inverse&&"vertical"===this.config.mode},e.prototype._getRunnerCss=function(t){return void 0===t&&(t=!1),"dhx_slider__thumb"+(t?" dhx_slider__thumb--extra":"")+(this._isMouseMoving&&(t&&this._isExtraActive||!t&&!this._isExtraActive)?" dhx_slider__thumb--active":"")+(this._disabled?" dhx_slider__thumb--disabled":"")+(this._isNullable(t?this._extraCurrentPosition:this._currentPosition)&&!this.config.range?" dhx_slider__thumb--nullable":"")},e.prototype._draw=function(){var t=this.config,e=t.labelPosition,i=t.mode,n=t.hiddenLabel,o=t.tick,a=t.majorTick,s=t.css,c=t.helpMessage,d=(0,f.getLabelStyle)(r(r({},this.config),{required:!1}));return!this._tooltip||this._mouseIn&&this._focusIn&&this._isMouseMoving||document.body.contains(this._tooltip)&&document.body.removeChild(this._tooltip),(0,l.el)("div",{class:"dhx_slider dhx_slider--mode_"+i+("left"===e?" dhx_slider--label-inline":"")+(n?" dhx_slider--label_sr":"")+(o?" dhx_slider--ticks":"")+(a?" dhx_slider--major-ticks":"")+(s?" "+s:"")+(this._disabled?" dhx_slider--disabled":""),style:{paddingBottom:this.config.tick?"16px":null}},[d?(0,l.el)("label.dhx_label.dhx_slider__label",{style:d.style,class:c?"dhx_label--with-help":"",onclick:this._handlers.onlabelClick},c?[d.label&&(0,l.el)("span.dhx_label__holder",d.label),(0,l.el)("span.dhx_label-help.dxi.dxi-help-circle-outline",{tabindex:"0",role:"button",onclick:this._handlers.showHelper})]:d.label):null,this._drawSlider()])},e.prototype._drawSlider=function(){return(0,l.el)(".dhx_widget.dhx_slider__track-holder",{"data-dhx-widget-id":this._uid},[(0,l.el)(".dhx_slider__track",{_ref:"track",onmouseover:this._handlers.onmouseover,onmouseout:this._handlers.onmouseout,onclick:this._handlers.onclick},[this._getDetector(),(0,l.el)("div",{_ref:"runner",class:this._getRunnerCss(),ontouchstart:this._handlers.ontouchstart,ontouchend:this._handlers.ontouchend,onmousedown:this._handlers.onmousedown,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,onkeydown:this._handlers.onkeydown,style:this._getRunnerStyle(),tabindex:0}),this.config.tooltip&&(this._mouseIn||this._focusIn||this._isMouseMoving)?this._drawTooltip():null,this.config.tooltip&&this.config.range&&(this._mouseIn||this._focusIn||this._isMouseMoving)?this._drawTooltip(!0):null,this.config.range?(0,l.el)("div",{_ref:"extraRunner",class:this._getRunnerCss(!0),ontouchstart:this._handlers.ontouchstart,ontouchend:this._handlers.ontouchend,onmousedown:this._handlers.onmousedown,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,onkeydown:this._handlers.onkeydown,style:this._getRunnerStyle(!0),tabindex:0}):null]),this.config.tick?this._drawTicks():null])},e.prototype._getDetector=function(){var t,e,i;if(this._disabled)return(0,l.el)(".dhx_slider__range");var n="horizontal"===this.config.mode?"left":"top",o="horizontal"===this.config.mode?"width":"height";if(this.config.range){var r=this._currentPosition>this._extraCurrentPosition?[this._currentPosition,this._extraCurrentPosition]:[this._extraCurrentPosition,this._currentPosition],a=r[0],s=r[1];return(0,l.el)(".dhx_slider__range",{style:(t={},t[n]=s+"%",t[o]=a-s+"%",t)})}return this._isInverse()?(0,l.el)(".dhx_slider__range",{style:(e={},e[n]=this._currentPosition+"%",e[o]=100-this._currentPosition+"%",e)}):(0,l.el)(".dhx_slider__range",{style:(i={},i[n]=0,i[o]=this._currentPosition+"%",i)})},e.prototype._drawTooltip=function(t){if(void 0===t&&(t=!1),"none"!==this._activeTooltip&&this.getRootView()){var e="extraTooltip"===this._activeTooltip?this._extraCurrentPosition:this._currentPosition,i="horizontal"===this.config.mode?"left":"top",n="";(t&&this._isExtraActive||!t&&!this._isExtraActive)&&(n+=" dhx_slider__thumb-label--active"),this._tooltip||(this._tooltip=document.createElement("div"));var o="tooltip"===this._activeTooltip?this.getRootView().refs.runner.el.getBoundingClientRect():this.getRootView().refs.extraRunner.el.getBoundingClientRect();this._tooltip.className="dhx_slider__thumb-label"+n,this._tooltip.style.left=o.x+("left"===i?6:-30)+window.pageXOffset+"px",this._tooltip.style.top=o.y+("left"===i?-30:6)+window.pageYOffset+"px",this._tooltip.innerText=this._getValue(e).toString(),document.body.appendChild(this._tooltip)}},e.prototype._getTicks=function(){for(var t=this.config,e=t.max,i=t.min,n=t.step,o=t.tick,r=t.majorTick,a=e-i,l=n*o/a,s=[],c=0,d=0;c<1;){var u=+(Number(i)+c*a).toFixed(5),h=d%r==0;s.push({position:(this._isInverse()?100*(1-c):100*c)+"%",isMultiple:h,label:h&&"function"==typeof this.config.tickTemplate?this.config.tickTemplate(u):null}),c+=l,d++}return s.push({position:(this._isInverse()?0:100)+"%",isMultiple:!0,label:"function"==typeof this.config.tickTemplate?this.config.tickTemplate(e):null}),s},e.prototype._drawTicks=function(){var t="horizontal"===this.config.mode?"left":"top";return(0,l.el)(".dhx_slider__ticks-holder",this._getTicks().map((function(e){var i;return(0,l.el)("div",{class:"dhx_slider__tick"+(e.isMultiple?" dhx_slider__tick--major":""),style:(i={},i[t]=e.position,i)},void 0!==e.label?[(0,l.el)(".dhx_slider__tick-label",e.label)]:null)})))},e.prototype._isNullable=function(t){return this._isInverse()?100===t:0===t},e.prototype._setTooltip=function(t){t.target.classList.contains("dhx_slider__thumb--extra")?this._activeTooltip="extraTooltip":t.target.classList.contains("dhx_slider__thumb")?this._activeTooltip="tooltip":this._activeTooltip="none"},e}(d.View);e.Slider=g},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Popup=void 0;var a=i(0),l=i(1),s=i(6),c=i(2),d=i(11),u=i(43),h=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,null,(0,a.extend)({},e))||this,n=i._popup=document.createElement("div");return n.className="dhx_widget dhx_popup"+(i.config.css?" "+i.config.css:""),n.style.position="absolute",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.setAttribute("aria-live","polite"),i.config.theme&&i._setTheme(i.config.theme),i.mount(n,(0,l.create)({render:function(){return i.toVDOM()}})),i._clickEvent=function(t){return i.events.fire(u.PopupEvents.click,[t])},i.events=e.events||new s.EventSystem(i),i._isActive=!1,i}return o(e,t),e.prototype.show=function(t,e,i){var n=this;void 0===e&&(e={}),this.events.fire(u.PopupEvents.beforeShow,[t])&&(t=(0,c.toNode)(t),this._isActive?this._setPopupSize(t,e):(i&&this.attach(i),e.theme&&this._setTheme(e.theme),this._popup.style.left="0",this._popup.style.top="0",(0,l.awaitRedraw)().then((function(){n._setPopupSize(t,e),n._popup.style.position="fixed",document.body.appendChild(n._popup),n._isActive=!0})).then((function(){n._popup.style.position="absolute",n.events.fire(u.PopupEvents.afterShow,[t]),n._outerClickDestructor=n._detectOuterClick(t)}))))},e.prototype.hide=function(){this._hide(!1,null)},e.prototype.isVisible=function(){return this._isActive},e.prototype.attach=function(t,e){return this._html=null,"object"==typeof t?this._ui=t:"string"==typeof t?this._ui=new window.dhx[t](null,e):"function"==typeof t&&(t.prototype instanceof d.View?this._ui=new t(null,e):this._ui={getRootView:function(){return t(e)}}),this.paint(),this._ui},e.prototype.attachHTML=function(t){this._html=t,this.paint()},e.prototype.getWidget=function(){return this._ui},e.prototype.getContainer=function(){return this.getRootView().refs.content.el},e.prototype.toVDOM=function(){var t;return this._html?t=(0,l.el)(".dhx_popup__inner-html-content",{".innerHTML":this._html}):(t=this._ui?this._ui.getRootView():null)&&t.render&&(t=(0,l.inject)(t)),(0,l.el)("div",{class:"dhx_popup-content",tabindex:0,onclick:this._clickEvent,_key:this._uid,_ref:"content"},[t])},e.prototype.destructor=function(){this.events&&this.events.clear(),this.hide(),this._outerClickDestructor&&this._outerClickDestructor(),this._popup=null},e.prototype._setTheme=function(t){var e;if("string"==typeof t)this._popup.setAttribute("data-dhx-theme",t);else{var i=null===(e=null==t?void 0:t.closest("[data-dhx-theme]"))||void 0===e?void 0:e.getAttribute("data-dhx-theme");i&&this._popup.setAttribute("data-dhx-theme",i)}},e.prototype._setPopupSize=function(t,e,i){var n=this;void 0===i&&(i=3);var o=this._popup.getBoundingClientRect(),a=o.width,l=o.height;if(this._timeout&&(clearTimeout(this._timeout),this._timeout=null),!i||0!==a&&0!==l){var s=(0,c.fitPosition)(t,r(r({centering:!0,mode:"bottom"},e),{width:a,height:l})),d=s.left,u=s.top;if(this._popup.style.left=d,this._popup.style.top=u,e.indent&&0!==e.indent)switch(e.mode){case"top":this._popup.style.top=parseInt(this._popup.style.top.slice(0,-2),null)-parseInt(e.indent.toString(),null)+"px";break;case"bottom":default:this._popup.style.top=parseInt(this._popup.style.top.slice(0,-2),null)+parseInt(e.indent.toString(),null)+"px";break;case"left":this._popup.style.left=parseInt(this._popup.style.left.slice(0,-2),null)-parseInt(e.indent.toString(),null)+"px";break;case"right":this._popup.style.left=parseInt(this._popup.style.left.slice(0,-2),null)+parseInt(e.indent.toString(),null)+"px"}}else this._timeout=setTimeout((function(){n._isActive&&(n._setPopupSize(t,e,i-1),n._timeout=null)}))},e.prototype._detectOuterClick=function(t){var e=this,i=!1,n=new WeakMap,o=function(r){var a=r.target,l=document.querySelectorAll(".dhx_popup");for(i?l.forEach((function(t){return n.has(t)||n.set(t,e._popup)})):(i=Boolean(l.length))&&l.forEach((function(t){return n.set(t,!0)}));a;){if(a===t||a===e._popup||n.get(a)===e._popup)return;a=a.parentNode}e._hide(!0,r)&&document.removeEventListener("mousedown",o)};return document.addEventListener("mousedown",o),function(){return document.removeEventListener("mousedown",o)}},e.prototype._hide=function(t,e){if(this._isActive)return!!this.events.fire(u.PopupEvents.beforeHide,[t,e])&&(document.body.removeChild(this._popup),this._isActive=!1,this._outerClickDestructor&&(this._outerClickDestructor(),this._outerClickDestructor=null),this.events.fire(u.PopupEvents.afterHide,[e]),!0)},e}(d.View);e.Popup=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={hours:"Hours",minutes:"Minutes",save:"Save"}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeCheck=void 0,e.isTimeCheck=function(t){return/(^12:[0-5][0-9]?AM$)/i.test(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linkButtonClasses=void 0,e.linkButtonClasses=".dhx_button.dhx_button--view_link.dhx_button--icon.dhx_button--size_medium.dhx_button--color_secondary"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckboxEditor=void 0;var n=i(0),o=i(1),r=i(3),a=i(4),l=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(){var t=this._checked;this._config.events.fire(r.GridEvents.beforeEditEnd,[t,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.events.fire(r.GridEvents.afterEditEnd,[t,this._cell.row,this._cell.col])):this._input.checked=!t},t.prototype.toHTML=function(){void 0===this._checked&&(this._checked=this._cell.row[this._cell.col.id]);var t=(0,n.uid)();return(0,o.el)("div.dhx_checkbox.dhx_cell-editor__checkbox",[(0,o.el)("label",{style:{display:"none"},for:t},(0,a.getColumnHeaderText)(this._cell.col)),(0,o.el)("input.dhx_checkbox__input",{type:"checkbox",_hooks:{didInsert:this._handlers.didInsert},_key:"cell_editor","data-dhx-id":"cell_editor","data-dhx-checked":(!!this._checked).toString(),checked:this._checked,id:t,style:{userSelect:"none"}}),(0,o.el)("span.dhx_checkbox__visual-input")])},t.prototype._initHandlers=function(){var t=this;this._handlers={onClick:function(){var e=!t._input.checked;t._config.events.fire(r.GridEvents.beforeEditStart,[t._cell.row,t._cell.col,"checkbox"])?(t._checked=e,t._config.events.fire(r.GridEvents.afterEditStart,[t._cell.row,t._cell.col,"checkbox"]),t.endEdit()):t._input.checked=!e},didInsert:function(e){t._checkbox=e.el.parentNode.lastChild,t._input=e.el.parentNode.querySelector("input"),e.el.parentNode.addEventListener("click",t._handlers.onClick)}}},t}();e.CheckboxEditor=l},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ComboboxEditor=void 0;var o=i(1),r=i(3),a=i(4),l=i(47),s=i(17),c=i(4),d=function(){function t(t,e,i){this._config=i,this._cell={row:t,col:e},this._initHandlers()}return t.prototype.endEdit=function(t){var e=this;if(this._config.$editable){var i;if(!t){var n=this._input.getValue();i="multiselect"===this._cell.col.editorType?n.split(",").join(", "):n}if(this._config.events.fire(r.GridEvents.beforeEditEnd,[i,this._cell.row,this._cell.col])){var o=(0,c.getEditorOptions)(this._cell.col,this._cell.row);this._input.popup.hide(),document.removeEventListener("mousedown",this._handlers.onOuterClick),this._cell.row=this._config.datacollection.getItem(this._cell.row.id),s.focusManager.setFocusId(this._config.gridId),"multiselect"===this._cell.col.editorType?null==i||i.toString().split(", ").forEach((function(t){return e._setCustomOptions(t,o)})):this._setCustomOptions(null==i?void 0:i.toString(),o),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[i,this._cell.row,this._cell.col])}else this._input.focus()}},t.prototype.toHTML=function(){var t=this,e=(0,c.getEditorOptions)(this._cell.col,this._cell.row).map((function(t){return"string"==typeof t?{id:"".concat(t),value:t}:t}))||[];if(!this._input){this._input=new l.ProCombobox(null,n({itemHeight:37,css:"dhx_cell-editor__combobox",multiselection:"multiselect"===this._cell.col.editorType,htmlEnable:this._cell.col.htmlEnable},this._cell.col.editorConfig)),this._input.data.parse(e);var i=this._cell.row[this._cell.col.id],r="multiselect"===this._cell.col.editorType?((null==i?void 0:i.toString())||"").split(", "):i;this._input.setValue(r),this._input.events.on("keydown",this._handlers.onkeydown),this._input.data.events.on("beforeAdd",(function(e){if(e.id!==e.value)return t._input.addOption({id:e.value,value:e.value},!0),!1}))}return document.addEventListener("mousedown",this._handlers.onOuterClick),this._config.$editable.editor=this,(0,o.awaitRedraw)().then((function(){var e=t._input.getRootView().refs.holder.el,i=e.querySelector("input");i&&i.setAttribute("aria-label",(0,a.getColumnHeaderText)(t._cell.col)),t._input.popup.getContainer().style.width=e.offsetWidth+"px",t._input._filter(),t._input.popup.show(e)})),s.focusManager.setFocusId(this._input._uid),(0,o.inject)(this._input.getRootView())},t.prototype._initHandlers=function(){var t=this;this._handlers={onOuterClick:function(e){if(e.target instanceof Node){var i=t._input&&t._input.getRootNode()&&t._input.getRootNode().contains(e.target),n=t._input.popup&&t._input.popup.getRootNode()&&t._input.popup.getRootNode().contains(e.target);i||n||t.endEdit()}},onkeydown:function(e){if("Escape"!==e.key&&"Tab"!==e.key||t.endEdit(),"Enter"===e.key){if(!t._config.events.fire(r.GridEvents.beforeKeyDown,[e]))return;e.stopPropagation(),t.endEdit(),t._config.events.fire(r.GridEvents.afterKeyDown,[e])}}}},t.prototype._setCustomOptions=function(t,e){var i=e.find((function(e){return"string"==typeof e?e===t:e.id.toString()===t}));t&&!i&&(this._cell.col.$customOptions||(this._cell.col.$customOptions=[]),this._cell.col.$customOptions.push(this._input.data.getItem(t)))},t}();e.ComboboxEditor=d},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEY_CODES=void 0,e.KEY_CODES={BACKSPACE:8,ENTER:13,ESC:27,DOWN_ARROW:40,UP_ARROW:38,LEFT_ARROW:37,RIGHT_ARROW:39}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditor=void 0;var n=i(111);e.getEditor=function(t,e){return new n.InputEditor(t,e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputEditor=void 0;var n=i(1),o=i(31),r=function(){function t(t,e){var i=this;this._list=e,this._config=e.config,this._item=t,this._list.events.on(o.ListEvents.focusChange,(function(t,e){i._mode&&e!==i._item.id&&i.endEdit()})),this._initHandlers()}return t.prototype.endEdit=function(){if(this._input){var t=this._input.value;this._list.events.fire(o.ListEvents.beforeEditEnd,[t,this._item.id])?(this._input.removeEventListener("blur",this._handlers.onBlur),this._input.removeEventListener("change",this._handlers.onChange),this._input.removeEventListener("keydown",this._handlers.onKeyDown),this._handlers={},this._mode=!1,this._list.events.fire(o.ListEvents.afterEditEnd,[t,this._item.id])):this._input.focus()}},t.prototype.toHTML=function(){this._mode=!0;var t=this._config.itemHeight;return(0,n.el)(".dhx_input__wrapper",{role:"presentation"},[(0,n.el)("div.dhx_input__container",{role:"presentation"},[(0,n.el)("input.dhx_input",{class:this._item.css?" "+this._item.css:"",style:{height:t,width:"100%",padding:"8px 12px"},_hooks:{didInsert:this._handlers.didInsert},_key:this._item.id,"data-dhx-id":this._item.id})])])},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onChange:function(){t.endEdit()},onKeyDown:function(e){"Enter"===e.key&&t._item.value===t._input.value&&t.endEdit(),"Escape"===e.key&&(t._input.value=t._item.value,t.endEdit())},didInsert:function(e){var i=e.el;t._input=i,i.focus(),i.value=t._item.value,i.setSelectionRange(0,i.value.length),i.addEventListener("change",t._handlers.onChange),i.addEventListener("blur",t._handlers.onBlur),i.addEventListener("keydown",t._handlers.onKeyDown)}}},t}();e.InputEditor=r},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},a=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.ProList=void 0;var l=i(1),s=i(42),c=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.scrollView=new s.ScrollView((function(){return n.getRootView()})),n.paint(),n}return o(e,t),e.prototype.destructor=function(){t.prototype.destructor.call(this),this.scrollView=null},e.prototype.scrollTo=function(t){var e,i,n=this.getRootView();if(n&&n.node&&n.node.el&&void 0!==t){var o=(null===(e=this.scrollView)||void 0===e?void 0:e.config.enable)?null===(i=this.getRootNode())||void 0===i?void 0:i.querySelector(".scroll-view"):this.getRootNode();this._scrollTo(t,o)}},e.prototype._renderList=function(){var t=this,e=this._getRange(),i=this.data.getRawData(e[0],e[1]).map((function(e,i){return t._renderItem(e,i)}));this.config.virtual&&(i=a(a([(0,l.el)(".div",{style:{height:e[2]+"px",_key:"start-key"}})],i,!0),[(0,l.el)(".div",{style:{height:e[3]+"px",_key:"end-key"}})],!1));var n=this.scrollView&&this.scrollView.config.enable,o=(this.config.css?this.config.css:"")+(this.config.multiselection&&this.selection.getItem()?" dhx_no-select--pointer":"")+(n?" dhx_list--scroll-view":"");return(0,l.el)("ul.dhx_widget.dhx_list",r(r({style:{"max-height":this.config.height,position:"relative"},id:this._uid,class:o,"data-dhx-widget-id":this._uid,"data-dhx-drop-area":"row"},this._handlers),this._getListAriaAttrs(this.config,this.data.getLength())),n?[].concat(this.scrollView.render(i)):i)},e}(i(50).List);e.ProList=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyListener=void 0;var n=function(){function t(){var t=this;this._handler=function(e){if(t._isActive){var i=e.key;"Backspace"===i&&t._sequence.length>0&&(t._sequence=t._sequence.slice(0,t._sequence.length-1),t._change()),i.length<2&&(t._sequence+=i,t._change())}},this._sequence="",document.addEventListener("keydown",this._handler)}return t.prototype.startNewListen=function(t){this._isActive=!0,this._sequence="",this._currentAction=t},t.prototype.endListen=function(){this._currentAction=null,this.reset(),this._isActive=!1},t.prototype.reset=function(){this._sequence=""},t.prototype.destructor=function(){document.removeEventListener("keydown",this._handler)},t.prototype._change=function(){this._currentAction(this._sequence),this._addClearTimeout()},t.prototype._addClearTimeout=function(){var t=this;this._clearTimeout&&clearTimeout(this._clearTimeout),this._clearTimeout=setTimeout((function(){t.reset(),t._clearTimeout=null}),2e3)},t}();e.KeyListener=n},function(t,e,i){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ProCombobox=void 0;var r=i(48),a=i(49),l=i(27),s=i(52),c=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype._createLayout=function(){var t=this.list=new a.ProList(null,{$template:r.$template,template:this.config.template,htmlEnable:this.config.htmlEnable,virtual:this.config.virtual,keyNavigation:!0,multiselection:this.config.multiselection,itemHeight:this.config.itemHeight,height:this.config.listHeight,data:this.data,eventHandlers:this.config.eventHandlers}),e=this._layout=new l.ProLayout(this.popup.getContainer(),{css:"dhx_combobox-options dhx_combobox__options",rows:[{id:"select-unselect-all",hidden:!this.config.multiselection||!this.config.selectAllButton},{id:"list",height:"content"},{id:"not-found",hidden:!0}],on:{click:{".dhx_combobox__action-select-all":this._handlers.selectAll,".dhx_combobox-options__action-create-option":this._handlers.addOption}}});e.getCell("list").attach(t),this.config.multiselection&&this.config.selectAllButton&&e.getCell("select-unselect-all").attach(s.selectAllView)},e}(r.Combobox);e.ProCombobox=c},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaEditor=void 0;var o=i(1),r=i(3),a=i(0),l=i(4),s=i(4),c=i(18),d=function(){function t(t,e,i,n){this._config=i,this._cell={row:t,col:e},this.type=this._cell.col.type,this._width=this._getCellWidth(n),this._config.firstColId===this._cell.col.id&&this._cell.row.hasOwnProperty("$level")&&(this._width-=(0,s.getTreeCellWidthOffset)(this._cell.row)-12),this._initHandlers()}return t.prototype.endEdit=function(t){var e;this._config.$editable&&(t||(e=this._removeValuePattern(this._input.value,!0),("number"===this.type||this._cell.col.numberMask)&&(e=parseFloat(e),Number.isNaN(e)&&(e=""))),this._config.events.fire(r.GridEvents.beforeEditEnd,[e,this._cell.row,this._cell.col])?(this._cell.row=this._config.datacollection.getItem(this._cell.row.id),this._config.$editable=null,this._config.events.fire(r.GridEvents.afterEditEnd,[e,this._cell.row,this._cell.col])):this._input.focus())},t.prototype.toHTML=function(t){var e;(0,a.isDefined)(t)&&(this.type="string"),t=null!==(e=this._input?this._input.value:null!=t?t:this._cell.row[this._cell.col.id])&&void 0!==e?e:"";var i=this._cell.col.numberMask;(0,a.isDefined)(null==i?void 0:i.maxDecLength)&&(i=n(n({},i),{maxDecLength:void 0})),t=this._applyValuePattern(t,this._input,!0,i),this._config.$editable.editor=this;var r=void 0!==this._cell.row.height||this._cell.col.htmlEnable?"dhx_cell-editor dhx_cell-editor__textarea_constant-height":"dhx_cell-editor dhx_cell-editor__textarea";return(0,o.el)("textarea",{_hooks:{didInsert:this._handlers.didInsert},_ref:"textarea",_key:"cell_editor","data-dhx-id":"cell_editor","aria-label":(0,l.getColumnHeaderText)(this._cell.col),value:t,onblur:this._handlers.onBlur,oninput:this._handlers.onInput,onkeydown:this._handlers.onKeydown,class:r,style:{width:this._width}})},t.prototype._initHandlers=function(){var t=this;this._handlers={onBlur:function(){t.endEdit()},onInput:function(e){var i=t._removeValuePattern(t._input.value);t._input.value=t._applyValuePattern(i,t._input),t._updateHeight(e,t._input.value)},onKeydown:function(e){"Escape"===e.key&&t._updateHeight(e,t._initialValue),"Enter"!==e.key||e.shiftKey||e.preventDefault()},didInsert:function(e){t._input=e.el,t._initialValue=e.el.value,t._input.focus()}}},t.prototype._getCurrentHeight=function(t,e){e=n({width:100,maxHeight:40,lineHeight:20},e);var i=document.createElement("textarea");i.className="dhx_cell-editor dhx_cell-editor__textarea",i.value=t,i.style.width="".concat(e.width,"px"),i.style.lineHeight="".concat(e.lineHeight,"px"),i.style.maxHeight="".concat(e.maxHeight,"px"),i.style.boxSizing="border-box",document.body.appendChild(i);var o=this._getElementHeight(i),r=i.value.split("\n").length,a=Math.round(o/e.lineHeight),l=o<e.maxHeight?e.maxHeight:o;return document.body.removeChild(i),1===r&&r===a?e.maxHeight:l},t.prototype._getElementHeight=function(t){return t.scrollHeight},t.prototype._applyValuePattern=function(t,e,i,o){return void 0===i&&(i=!1),this._cell.col.numberMask?(0,c.numberMask)(t.toString(),n(n({},o||this._cell.col.numberMask),{onlyView:i}),e):this._cell.col.patternMask?(0,c.patternMask)(t.toString(),this._cell.col.patternMask,e):t},t.prototype._removeValuePattern=function(t,e){return void 0===e&&(e=!1),this._cell.col.numberMask?(0,c.removeNumberMask)(t,n(n({},this._cell.col.numberMask),{lastCall:e})):this._cell.col.patternMask?(0,c.removePatternMask)(t,this._cell.col.patternMask):t},t.prototype._getCellWidth=function(t){return t?this._config.columns.slice(t.$colsVisibility[0],t.$colsVisibility[1]+1).reduce((function(t,e){return t+e.$width}),0):this._cell.col.$width},t.prototype._updateHeight=function(t,e){var i,o;if(void 0===this._cell.row.height&&!this._cell.col.htmlEnable){var a=this._getCurrentHeight(e,{width:this._width-2,maxHeight:this._config.rowHeight}),l=n(n({},this._cell.row),((i={})[this._cell.col.id]=e,i)),c=(0,s.getCalculatedRowHeight)((0,s.getMaxRowHeight)({row:l,cols:this._config.columns})),d=(0,s.getCalculatedRowHeight)((0,s.getMaxRowHeight)({row:(o={},o[this._cell.col.id]=l[this._cell.col.id],o),cols:this._config.columns}));if(this._minHeight=c===d?this._config.rowHeight:c,a>=this._minHeight&&a!==this._prevHeight){if(!this._config.events.fire(r.GridEvents.beforeRowResize,[this._cell.row,t,a]))return;this._config.events.fire(r.GridEvents.afterRowResize,[this._cell.row,t,a])}this._prevHeight=a}},t}();e.TextAreaEditor=d},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getGroupPanel=e.getGroupItem=void 0;var r=i(1),a=i(3),l=i(2),s=i(56);var c={onclick:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchstart:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t.events.fire(a.GridEvents.groupPanelItemMouseDown,[i,e])},ontouchmove:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemTouchMove,[i,e])},ontouchend:function(t,e){var i=(0,l.locate)(e,"data-dhx-group-item-id");i&&t._events.fire(a.GridSystemEvents.groupPanelItemItemTouchEnd,[i,e])}};function d(t){var e=t.id,i=t.label,n=t.sortDir,o=t.sortOrder,a=t.mode,l=void 0===a?"basic":a,s=t.sortable,c=void 0===s||s,d=t.closable,u=void 0===d||d;return(0,r.el)("div",{role:"option",class:"dhx_grid-group_item dhx_grid-group_item--".concat(l),"data-dhx-group-item-id":e,"data-dhx-id":e,_key:e},[c&&(n&&(0,r.el)("div.dhx_grid-sort",[(0,r.el)("i.dxi.dxi-arrow-up.dhx_grid-group_item-sort.dhx_grid-group_item-sort--".concat(n),{"aria-hidden":"true"}),o&&(0,r.el)("div.dhx_grid-sort-counter",{"aria-hidden":"true"},[o])||null])||(0,r.el)("i.dxi.dxi-sort.dhx_grid-group_item-sort.dhx_grid-group_item-unsorted"))||null,(0,r.el)("span.dhx_grid-group_item-label",i),u&&(0,r.el)("i.dxi.dxi-close-circle.dhx_grid-group_item-remove",{"data-dhx-group-item-remove":"true"})||null])}e.getGroupItem=d,e.getGroupPanel=function(t,e){var i,a;void 0===t&&(t=[]);var l=[];t.forEach((function(e,i){l.push(d(e)),i!==t.length-1&&l.push(function(t){var e=t.id;return(0,r.el)("div.dhx_grid-group_chain",{"aria-hidden":"true","data-dhx-id":e,_key:"chain_".concat(e)},[(0,r.el)("i.dxi.dxi-chevron-right")])}(e))}));var u=Object.entries(c).reduce((function(t,i){var o,r=i[0],a=i[1];return n(n({},t),((o={})[r]=[a,e],o))}),{});return(0,r.el)("section",n({class:"dhx_grid-group_panel","data-dhx-drop-area":"group",role:"presentation",style:{height:(null===(a=null===(i=e.config)||void 0===i?void 0:i.group)||void 0===a?void 0:a.panelHeight)||40}},u),[(0,r.el)("div",{class:"dhx_grid-group_title"},s.default.dropAreaTitle),(0,r.el)("div",{class:"dhx_grid-group_drop-area",role:"listbox"},o([],l.length?l:[(0,r.el)("span",{class:"dhx_grid-group_drop-area-placeholder"},s.default.dropAreaPlaceholder)],!0))])}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.setSubRowCell=e.getSubRowContent=void 0;var o=i(1),r=i(5),a=i(20),l=i(41),s=i(7);function c(t,e,i,o){var r=e(t),s=new l.ProCell(null,{id:"cell"+t.id,css:"dhx_grid_subrow "+(i.css||""),html:"string"==typeof r&&r||null,height:t.$subRowHeight,padding:i.padding});o.set(t.id,n(n(n({},a.defaultSubRowConfig),i),{cell:s})),"function"==typeof(null==r?void 0:r.paint)&&s.attach(r)}e.getSubRowContent=function(t){var e,i=[],n=null===(e=t.subRowConfig)||void 0===e?void 0:e.fullWidth;return t.$subRowCells&&t.currentRows.forEach((function(e){var a;if(e.$opened){var l=t.$subRowCells.get(e.id),c=null===(a=null==l?void 0:l.cell)||void 0===a?void 0:a.getRootView();if(c){var d=(0,r.getTotalHeight)(t.data.slice(0,e.$index))+e.$height;i.push((0,o.el)(".dhx_grid_subrow__container",{_key:"sub"+e.id,role:"region","aria-labelledby":"row-".concat(e.id),"data-dhx-id":e.id,"data-dhx-root-widget-id":t.gridId,tabindex:0,style:{position:"absolute",top:d,width:n?t.$totalWidth:t.$width-t.$scrollBarWidth.y-s.BORDERS}},[(0,o.inject)(c)]))}}})),i.length?(0,o.el)(".dhx_grid_subrow__data",{_flags:o.KEYED_LIST,style:{left:n?0:t.scroll.left},role:"presentation"},i):[]},e.setSubRowCell=function(t,e){for(var i=t.config,o=i.subRowConfig,r=i.$subRowCells,l=i.subRow,s=new Map,d=0;d<e.length;d++){var u=e[d];if(!u.$group){if(!r.has(u.id)||!r.get(u.id).cell){var h=n(n({},a.defaultSubRowConfig),("function"==typeof o?o(u):o)||{});r.set(u.id,h),(u.$opened||h.preserve)&&u.$subRowHeight&&c(u,l,h,r)}s.set(u.id,u.$opened)}}r.forEach((function(t,e){var i;t.preserve||(s.has(e)||r.delete(e),s.get(e)||((null==t?void 0:t.cell)&&(null===(i=t.cell)||void 0===i||i.destructor()),delete t.cell))}))}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getDragPanelNode=void 0;var r=i(1),a=i(3),l=i(20),s=i(7),c=i(2),d=i(5),u={onclick:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemClick,[i,e])},onmousedown:function(t,e){var i=(0,c.locate)(e,"data-dhx-id");i&&t.events.fire(a.GridEvents.dragPanelItemMouseDown,[i,e])}};function h(t){return(0,r.el)(".dhx_grid-drag-panel_header",{style:{height:t.$headerHeight},role:"banner","aria-label":"Panel header"})}function f(t,e,i){var n=t.$footer,o=((!i||e.footerAtBottom)&&t.$scrollBarWidth.x||0)+(n&&t.$footerHeight||0);if(!o||!n&&t.$totalHeight<t.$height-t.$headerHeight-t.$footerHeight)return null;var a=s.BORDERS/2,c=t.dragPanel,d={height:o+a};return e.footerAtBottom&&(d.width=c.width||l.defaultDragPanelConfig.width,d.height=d.height+a),(0,r.el)(".dhx_grid-drag-panel_footer".concat(e.footerAtBottom?".dhx_grid-drag-panel_footer--at-bottom":""),{style:d,role:"contentinfo","aria-label":"Panel footer"})}function p(t,e,i){var n=t.$height-t.$headerHeight-s.BORDERS;return(0,r.el)(".dhx_grid-drag-panel_main",{style:{height:n},role:"main","aria-label":"Panel content"},[g(t,e),f(t,e,i),v(t,e,a.Split.top,i),v(t,e,a.Split.bottom,i)])}function g(t,e){var i=t.dragPanel,n=t.currentRows.map((function(t){return _(t,i.icon)}));return(0,r.el)(".dhx_grid-drag-panel_content",{style:{height:t.$totalHeight,paddingTop:e.shifts.y,top:-t.scroll.top},_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],n,!0))}function v(t,e,i,n){var c=t.dragPanel,u=(i===a.Split.bottom?t.fixedRows.bottom:t.fixedRows.top)||[];if(!u.length)return null;var h=u.map((function(t){return _(t,c.icon)})),f={width:c.width||l.defaultDragPanelConfig.width};if(i===a.Split.bottom&&e.footerAtBottom)f.bottom=t.footerHeight+s.BORDERS/2+(t.$scrollBarWidth.x||-1);else{var p=(0,d.getTotalHeight)(t.fixedRows.bottom),g=t.group?(0,l.getGroupDefaultConfig)(t.group).panelHeight:0;f.top=i===a.Split.bottom?n?t.$totalHeight+t.$headerHeight-p+s.BORDERS/2+g:t.$height-p-t.$footerHeight-s.BORDERS/2-t.$scrollBarWidth.x+g:t.$headerHeight+g}return(0,r.el)(".dhx_grid-drag-panel_content.dhx_grid-drag-panel_content--fixed",{style:f,_flags:r.KEYED_LIST,role:"list","aria-label":"Draggable rows"},o([],h,!0))}function _(t,e){return(0,r.el)(".dhx_grid-drag-panel_item",{"data-dhx-id":t.id,style:{height:t.$height},_key:t.id+"_panel",role:"listitem","aria-label":"Row id ".concat(t.id)},[(0,r.el)("i.dhx_grid-drag-panel_item-icon",{class:e,"aria-hidden":"true"})])}e.getDragPanelNode=function(t,e,i,o){var a;void 0===o&&(o=!1);var s=e.dragPanel,c=Object.entries(u).reduce((function(e,i){var o,r=i[0],a=i[1];return n(n({},e),((o={})[r]=[a,t],o))}),{}),d="dhx_grid-drag-panel ";return o&&(d+="dhx_grid-drag-panel--less-height "),(null===(a=t.config.$grouped)||void 0===a?void 0:a.length)&&(d+="dhx_grid-drag-panel--drag-not-allowed "),s.css&&(d+=s.css),(0,r.el)("section",n({class:d,style:{width:s.width||l.defaultDragPanelConfig.width},role:"region","aria-label":"Drag panel"},c),[h(e),p(e,i,o)])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComboFilter=void 0;var n=i(47),o=i(6),r=i(8),a=i(0),l=i(3),s=i(21),c=function(){function t(t){var e,i=t.column,n=t.config,r=t.headerConfig,l=t.uniqueData,s=t.value,c=t.grid;this.events=new o.EventSystem,this._silentMode=!1,this.column=i,this.config=n,this.data=l,this.value=s,this.filterConfig={},this._grid=c,Object.assign(this.filterConfig,(null==r?void 0:r.filterConfig)||{}),(this.column.htmlEnable||(null===(e=this.config)||void 0===e?void 0:e.htmlEnable)&&!1!==this.column.htmlEnable)&&(this.column.template||!1===this.filterConfig.readonly||(this.filterConfig.readonly=!0),this.filterConfig.template||(this.filterConfig.template=function(t){return t.value})),this.filterConfig.filter||(this.filterConfig.filter=function(t,e){return(0,a.isExistValue)(t.value,e)}),this.initFilter(),this.config&&this.initHandlers()}return t.prototype.initFilter=function(){this._filter=new n.ProCombobox(null,Object.assign({virtual:!0},this.filterConfig)),this.data&&this._filter.data&&this._setData()},t.prototype.initHandlers=function(){var t=this,e=this.column.id.toString();[r.DataEvents.load,r.DataEvents.afterLazyLoad].forEach((function(e){t._grid.events.on(e,(function(){return t._setData()}),!0)})),this._filter.events.on("change",(function(i){var n;i&&((Array.isArray(i)?i.find((function(e){return t._filter.data.getItem(e)})):t._filter.data.getItem(i))&&(n=t._filter.config.multiselection?t._filter.list.selection.getItem().map((function(e){if(e&&t._filter.data.getItem(e.id))return e.value})):t._filter.list.selection.getItem().value));t.value=n,t._grid.events.fire(l.GridEvents.filterChange,[t.value,e,"comboFilter",t._silentMode]),t._silentMode&&void 0===t.value&&(t._silentMode=!1)})),this._grid.events.on(l.GridEvents.filterChange,(function(e){return t.events.fire(s.HeaderFilterEvent.change,[e])}),this),this._filter.popup.events.on("afterHide",(function(){t.filterConfig.multiselection||t._filter.list.selection.getItem()||t.clear()})),this._filter.popup.events.on("afterShow",(function(){!t.filterConfig.multiselection&&(""===t.value||t.filterConfig.readonly&&void 0!==t.value)&&t.clear()})),this._grid.events.on(l.GridEvents.scroll,(function(){var e;t._isFocused&&(null===(e=t._filter.getRootView().refs)||void 0===e?void 0:e.input)&&t._filter.focus()}),this),this._grid.events.on(l.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()}),this),this._grid.events.on(l.GridEvents.cellMouseDown,(function(){return t.blur()}),this),this._grid.events.on(r.DataEvents.change,(function(e,i){t.column.hidden||"update"!==i||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(r.DataEvents.afterAdd,(function(){t.column.hidden||t._setData(!0)})),this._grid.events.on(r.DataEvents.afterRemove,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))})),this._grid.events.on(r.DataEvents.removeAll,(function(){t.clear(!0),t._setData()}),this),this._grid.events.on(l.GridEvents.afterRowShow,(function(){return t._setData(!0)}),this),this._grid.events.on(l.GridEvents.afterRowHide,(function(){t.column.hidden||(t._checkValue(),t._setData(!0))}),this),this._grid.events.on(r.DataEvents.filter,(function(e){t.column.hidden||(!e||(0,r.isOnlyPermanentFilters)(e)?t.clear(!0):t._checkValue(),t.filterConfig.multiselection&&t._filter.popup.isVisible()||t._setData(!0))}),this),this._grid.events.on(l.GridEvents.afterColumnShow,(function(){t.filterConfig.multiselection||(t._checkValue(),t._setData())}),this),this._grid.events.on(l.GridEvents.afterColumnHide,(function(){t.filterConfig.multiselection||t._setData()}),this)},t.prototype.getFilter=function(){return this._filter},t.prototype.setValue=function(t,e){var i,n=this;if(this.filterConfig.multiselection||!Array.isArray(t))if((0,a.isDefined)(t)){if((null==t?void 0:t.length)||""===t){var o=this.filterConfig.multiselection&&Array.isArray(t)?t.map((function(t){var e;return null===(e=n._filter.data.find((function(e){return e.value===t})))||void 0===e?void 0:e.id})):null===(i=this._filter.data.find((function(e){return e.value===t})))||void 0===i?void 0:i.id;this._filter.setValue(o,e)}}else e&&(this._silentMode=!0),this._filter.clear(),this.filterConfig.multiselection||void 0===this.value||(this.value=void 0,this._grid.events.fire(l.GridEvents.filterChange,[this.value,this.column.id,"comboFilter"]))},t.prototype.clear=function(t){void 0!==this.value&&this.setValue(null,t)},t.prototype.focus=function(){var t;this._isFocused=!0,(null===(t=this._filter.getRootView().refs)||void 0===t?void 0:t.input)&&this._filter.focus()},t.prototype.blur=function(){var t;this._isFocused=!1,(null===(t=this._filter.getRootView().refs)||void 0===t?void 0:t.input)&&this._filter.blur()},t.prototype.destructor=function(){var t=this._grid.events;if(t)for(var e in t.events)this._grid.events.detach(e,this);this.events.clear(),this._filter&&this._filter.destructor(),this.config=this.filterConfig=this.data=this.column=this.value=this.events=null},t.prototype._setData=function(t){var e=this;void 0===t&&(t=!1);var i=function(){var t=e.column.$activeFilterData||e.column.$uniqueData;if(e.column.header.some((function(t){var e;return null===(e=t.filterConfig)||void 0===e?void 0:e.filter}))){var i=e._filter.data.reduce((function(t,e){return t[e.value]=e.id,t}),{}),n=t.map((function(t){return i[t]?{id:i[t],value:t}:{value:t}}));e._filter.data.parse(n)}else e._filter.data.parse(t.map((function(t){return{value:t}})))};void 0===this.value?i():t&&this.filterConfig.multiselection&&(i(),this.setValue(this.value,!0))},t.prototype._checkValue=function(){if(void 0!==this.value)for(var t=Array.isArray(this.value)?this.value:[this.value],e=function(e){if(i.column.$uniqueData.includes(e))return"continue";if(t.length>1){var n=i._filter.data.find((function(t){return t.value===e}));i._filter.list.selection.remove(n.id)}else i.clear();return"break"},i=this,n=0,o=t;n<o.length;n++){if("break"===e(o[n]))break}},t}();e.ComboFilter=c},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.SelectFilter=void 0;var o=i(1),r=i(6),a=i(3),l=i(21),s=i(4),c=function(){function t(t){var e=t.column,i=t.config,n=t.uniqueData,o=void 0===n?[]:n,a=t.value,l=t.grid;this.events=new r.EventSystem,this.column=e,this.config=i,this.data=o,this.value=a||"",this._grid=l,this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){var t,e=this;return(0,o.el)("label.dhx_grid-filter__label.dxi.dxi-menu-down",{_ref:"".concat(this.column.id,"_filter")},[(0,o.el)("select.dxi.dxi-menu-down",{type:"text",class:"dhx_input dhx_grid-filter dhx_grid-filter--select","aria-label":"Filter ".concat((0,s.getColumnHeaderText)(this.column)),tabindex:-1,onchange:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id},n([(0,o.el)("option",{value:"",_key:0},"")],null===(t=(this.value?[this.value]:this.data)||[])||void 0===t?void 0:t.map((function(t){return""!==(t=null!=t?t:"")&&(0,o.el)("option",{_key:t,value:t,selected:e.value===t.toString()},t)})),!0))])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){this.value=t||"",this.events.fire(l.HeaderFilterEvent.change,[t]),this._grid.events.fire(a.GridEvents.filterChange,[this.value,this.column.id,"selectFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e;this._isFocused=!0;var i=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;i&&i.focus()},t.prototype.blur=function(){var t,e;this._isFocused=!1;var i=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;i&&i.blur()},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t.setValue(a)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(a.GridEvents.scroll,(function(){var e,i,n=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&n&&(0,o.awaitRedraw)().then((function(){n.focus()}))})),this._grid.events.on(a.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(a.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.SelectFilter=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFilter=void 0;var n=i(1),o=i(6),r=i(3),a=i(21),l=i(4),s=function(){function t(t){var e=t.column,i=t.config,n=t.id,r=t.value,a=t.headerConfig,l=t.grid;this.events=new o.EventSystem,this.column=e,this.config=i,this.id=n,this.value=r||"",this.filterConfig={},this._grid=l,Object.assign(this.filterConfig,(null==a?void 0:a.filterConfig)||{}),this.initHandlers(),this.toHTML()}return t.prototype.toHTML=function(){var t="Filter ".concat((0,l.getColumnHeaderText)(this.column));return(0,n.el)("div.dhx_grid-filter__label",{"aria-label":t,_ref:"".concat(this.column.id,"_filter")},[(0,n.el)(".dhx_grid-filter__icon.dhx_input__icon",{class:"dxi "+(this.filterConfig.icon||" dxi-magnify")}),(0,n.el)("label",{style:{display:"none"},for:this.id},t),(0,n.el)("input",{type:"text",class:"dhx_input dhx_grid-filter","aria-label":t,tabindex:-1,oninput:this._handlers.onchange,onfocus:this._handlers.onfocus,onblur:this._handlers.onblur,_key:this.column.id,id:this.id,value:this.value,placeholder:this.filterConfig.placeholder})])},t.prototype.getFilter=function(){return this.toHTML()},t.prototype.setValue=function(t,e){var i;this.value=t||"",this.events.fire(a.HeaderFilterEvent.change,[this.value]),null===(i=this._grid.events)||void 0===i||i.fire(r.GridEvents.filterChange,[this.value,this.column.id,"inputFilter",e])},t.prototype.clear=function(t){this.setValue("",t)},t.prototype.focus=function(){var t,e,i;this._isFocused=!0;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.focus())},t.prototype.blur=function(){var t,e,i;this._isFocused=!1;var n=null===(e=null===(t=this._grid.getRootView())||void 0===t?void 0:t.refs["".concat(this.column.id,"_filter")])||void 0===e?void 0:e.el;n&&(null===(i=n.querySelector("input"))||void 0===i||i.blur())},t.prototype.initHandlers=function(){var t=this;this._handlers={onchange:function(e){var i,n,o,r,a=(null===(i=e.target)||void 0===i?void 0:i.value)||(null===(o=null===(n=e.composedPath())||void 0===n?void 0:n[0])||void 0===o?void 0:o.value)||(null===(r=e.explicitOriginalTarget)||void 0===r?void 0:r.value);t._inputDelay&&clearTimeout(t._inputDelay),t._inputDelay=setTimeout((function(){return t.setValue(a)}),500)},onfocus:function(){t._isFocused=!0},onblur:function(){t._isFocused=!1}},this._grid.events.on(r.GridEvents.scroll,(function(){var e,i,o=null===(i=null===(e=t._grid.getRootView())||void 0===e?void 0:e.refs["".concat(t.column.id,"_filter")])||void 0===i?void 0:i.el;t._isFocused&&o&&(0,n.awaitRedraw)().then((function(){var t;null===(t=o.querySelector("input"))||void 0===t||t.focus()}))})),this._grid.events.on(r.GridEvents.headerCellMouseDown,(function(e,i){i.id!==t.column.id&&t.blur()})),this._grid.events.on(r.GridEvents.cellMouseDown,(function(){return t.blur()}))},t}();e.InputFilter=s},function(t,e,i){"use strict";var n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.startResize=void 0;var o=i(0),r=i(3),a=i(7);e.startResize=function(t,e,i,l){var s,c=t.config.rightSplit;i.targetTouches&&i.preventDefault();var d=i.targetTouches?i.targetTouches[0].clientX:i.clientX,u=t.config.columns.filter((function(t){return!t.hidden})),h=c?u.slice(-c).map((function(t){return t.id})):[],f=!!(null===(s=t.scrollView)||void 0===s?void 0:s.config.enable),p=c?(0,a.calcScrollBarWidth)(t.config,f).xState:null,g=0;t.config.$resizing=e;var v=function(i){var l,s=(0,o.findIndex)(u,(function(t){return t.id===e})),v=i.targetTouches?i.targetTouches[0].clientX:i.clientX,_=v-t.getRootNode().getBoundingClientRect().left,m=(0,a.calcScrollBarWidth)(t.config,f);if(!(t.config.leftSplit===s+1&&_>=t.config.$width-m.y-2||c&&h.includes(e)&&m.xState!==p)){g=g||u[s].$width;var y=40;"function"==typeof t.data.getMaxLevel&&0===s&&(y*=t.data.getMaxLevel());var b,x=u[s].minWidth||y,w=u[s].maxWidth,C=v-d,S=n([],u,!0),E=g+(p&&h.includes(e)?-C:C);w&&E>=w||E<=x?(E<=x&&(b=x),E>=w&&(b=w)):b=E,S[s].$width=b;for(var D=0;D<S.length;D++){(null!==(l=S[D].adjust)&&void 0!==l?l:t.config.adjust)||(S[D].$fixedWidth=D<=s)}t.events.fire(r.GridEvents.resize,[u[s],i]),t.paint()}},_=function(){i.targetTouches?(document.removeEventListener("touchmove",v),document.removeEventListener("touchend",_)):(document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",_)),l()};i.targetTouches?(document.addEventListener("touchmove",v),document.addEventListener("touchend",_)):(document.addEventListener("mousemove",v),document.addEventListener("mouseup",_)),t.paint()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getKeysHandlers=void 0;var n=i(2),o=i(14),r=i(17),a=i(5),l=i(124),s=i(125),c=i(126);e.getKeysHandlers=function(t){var e,i,d,u="cell"===t.config.selection||"complex"===t.config.selection||!0===t.config.selection,h=null===(d=null===(i=null===(e=t.getRootView())||void 0===e?void 0:e.refs)||void 0===i?void 0:i.grid_body)||void 0===d?void 0:d.el;if(!t.getRootView()||h){(0,c.initFocusSentinel)(t),(0,c.initEndSentinel)(t),(0,c.restoreZoneTabindex)(t,"header");var f=function(e,i,o){var r,a,s;if(void 0===o&&(o=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var c=null===(r=t.selection)||void 0===r?void 0:r.getCell(),d=t,u=null===(a=d.range)||void 0===a?void 0:a.getRange();if((c||u)&&h){e.preventDefault();var f,p=i*Math.max(1,Math.floor(h.clientHeight/t.config.rowHeight)),g=t.config.multiselection&&o;if(c)(f=(0,l.walkVisibleRows)(t,c.row.id,p))!==c.row.id&&(t.scrollTo(f.toString(),c.column.id.toString()),t.selection.setCell(f,c.column.id,!1,g));if(u&&"range"===(null===(s=d.block)||void 0===s?void 0:s.config.mode))(f=(0,l.walkVisibleRows)(t,u.yEnd,p))!==u.yEnd&&(0,l.applyRangeMove)(d,t.data.getItem(f),u,"vertical",o)}else h&&(e.preventDefault(),h.scrollTop+=i*h.clientHeight)}},p=function(e,i,n){var o,r;void 0===n&&(n=!1);var a=null===(o=t.selection)||void 0===o?void 0:o.getCell(),s=null===(r=t.range)||void 0===r?void 0:r.getRange();a||s?(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:i,toEnd:!0,shiftUp:n}):h&&(e.preventDefault(),h.scrollTop=i>0?h.scrollHeight:0)},g=function(e,i,o){var r,l,s,c;if(void 0===o&&(o=!1),!(t.config.$editable||(0,n.locateNodeByClassName)(e,"dhx_grid-header-cell")||(0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))){var d=null===(r=t.selection)||void 0===r?void 0:r.getCell(),u=t,h=null===(l=u.range)||void 0===l?void 0:l.getRange();if(d||h){e.preventDefault();var f,p,g=t.config.columns.filter((function(t){return!t.hidden})),v=t.config.multiselection&&o;if(i<0)f=t.data.getId(0),p=g[0].id;else{var _=t.data.getId(t.data.getLength()-1);"tree"===t.config.type&&(_=(0,a.getLastChild)(_,t.data)),f=_,p=g[g.length-1].id}d&&(t.scrollTo(f.toString(),p.toString()),t.selection.setCell(f,p,!1,v)),h&&"range"===(null===(s=u.block)||void 0===s?void 0:s.config.mode)&&(u.scrollTo(f,p),o?u.range.setRange({yEnd:f,xEnd:p},!0):u.range.setRange({yStart:f,yEnd:f,xStart:p,xEnd:p}),null===(c=u.block)||void 0===c||c.restoreFocus())}}};return{enter:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"===n||"footer"===n){var r=e.target;return(0,c.isContentCell)(r)?(e.preventDefault(),void(0,c.activateContentCell)(r)):void(0,c.triggerHeaderSort)(t,e)}u?(i=(0,o.normalizeCell)(t.selection.getCell(),t))&&(0,s.isColumnEditable)(i.column,t.config)&&(t.config.$editable?t.editEnd():"boolean"===i.column.type?(0,s.toggleBooleanCell)(t,i.row,i.column):(0,s.startCellEdit)(t,i)):t.config.$editable?t.editEnd():(i=(0,l.getActiveCell)(t,!1))&&(0,s.isColumnEditable)(i.column,t.config)&&("boolean"===i.column.type?(0,s.toggleBooleanCell)(t,i.row,i.column):(0,s.startCellEdit)(t,i))},f2:function(){if(!t.config.$editable){var e=(0,l.getActiveCell)(t,u);e&&(0,s.isColumnEditable)(e.column,t.config)&&"boolean"!==e.column.type&&(0,s.startCellEdit)(t,e)}},space:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if(!t.config.$editable){var n=(0,l.getActiveCell)(t,u);n&&(0,s.isColumnEditable)(n.column,t.config)&&"boolean"===n.column.type&&(e.preventDefault(),(0,s.toggleBooleanCell)(t,n.row,n.column))}}else(0,c.triggerHeaderSort)(t,e)},escape:function(e){var i,n,o,r,a,l=(0,c.detectFocusZone)(e);if("header"!==l&&"footer"!==l)t.config.$editable&&t.editEnd(!0);else{e.preventDefault();var s=e.target,d=s.closest(".dhx_grid-".concat(l,"-cell, .dhx_span-cell"));if(d&&s!==d&&(0,c.isContentCell)(d))return void(0,c.deactivateContentCell)(d);(0,c.restoreZoneTabindex)(t,l);var u=(0,c.getActiveColumnId)(t)||(0,c.getColIdFromTarget)(s)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id);if(t.config.blockSelection&&(null===(n=t.range)||void 0===n?void 0:n.getRange())){var h=t.range.getRange();t.scrollTo(h.yStart,h.xStart),t.block.restoreFocus(),(null===(o=document.activeElement)||void 0===o?void 0:o.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,h.xStart,"first")}else if(null===(r=t.selection)||void 0===r?void 0:r.getCell()){var f=t.selection.getCell();t.scrollTo(f.row.id,f.column.id),t.selection.restoreFocus(),(null===(a=document.activeElement)||void 0===a?void 0:a.getAttribute("data-dhx-col-id"))||(0,c.transitionToBody)(t,f.column.id,"first")}else u&&(0,c.transitionToBody)(t,u,"first")}},tab:function(e){var i,n,o,a,s,d,u=(0,c.detectFocusZone)(e);if("header"!==u&&"footer"!==u){t.config.$editable&&t.editEnd();var h=null===(s=t.selection)||void 0===s?void 0:s.getCell(),f=t.config.columns.filter((function(t){return!t.hidden}));if(h){if(h.row.$opened&&h.row.$subRowHeight){var p=t.getSubRow(h.row.id),g=p.view,v=p.element;return void((null==g?void 0:g.name.includes("grid"))?(g.selection.setCell(g.data.getId(0)),r.focusManager.setFocusId(g._uid)):v.focus())}var _=f.indexOf(h.column)+(0,l.getRangedIndex)(t,"right");if(_>=0&&_<f.length)e&&e.preventDefault(),t.scrollTo(h.row.id.toString(),f[_].id.toString()),t.selection.setCell(h.row.id,f[_].id);else if(_>=0){(y=(0,l.getNextVisibleRowId)(t,h.row.id,1))?(e&&e.preventDefault(),t.scrollTo(y.toString(),f[0].id.toString()),t.selection.setCell(y,f[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",f[0].id,0))}}else{var m=null===(d=t.range)||void 0===d?void 0:d.getRange();if(m){var y,b=f.findIndex((function(t){return t.id===m.xEnd}))+1;if(b<f.length)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,m.yEnd,f[b].id);else(y=(0,l.getNextVisibleRowId)(t,m.yEnd,1))?(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,y,f[0].id)):(0,c.hasFooter)(t)&&(e&&e.preventDefault(),(0,c.transitionFromBodyToZone)(t,"footer",f[0].id,0))}}}else{var x=e.target,w=x.closest(".dhx_grid-".concat(u,"-cell, .dhx_span-cell"));if(w&&x!==w&&(0,c.isContentCell)(w))return e.preventDefault(),void(0,c.deactivateContentCell)(w);if("exit-end"===(0,c.moveZoneFocusTab)(t,e,u,"forward"))if("header"===u){e.preventDefault(),(0,c.restoreZoneTabindex)(t,u);var C=(0,c.getVisibleColumns)(t);(0,c.transitionToBody)(t,null===(i=C[0])||void 0===i?void 0:i.id,"first")}else{(0,c.restoreZoneTabindex)(t,u);var S=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||(null===(a=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===a?void 0:a.getRootNode()),E=null==S?void 0:S.querySelector(".dhx_grid-focus-sentinel--end");E&&(E.setAttribute("tabindex","-1"),setTimeout((function(){return E.setAttribute("tabindex","0")}),0))}}},delete:function(){var e,i;"range"===(null===(e=t.block)||void 0===e?void 0:e.config.mode)&&t.config.editable&&!t.config.$editable&&(0,o.clearCells)(t,null===(i=t.range)||void 0===i?void 0:i.getRangedCells())},"shift+tab":function(e){var i,o,a,s,d,u,h,f,p=(0,c.detectFocusZone)(e);if("header"!==p&&"footer"!==p)if("body"===p&&(0,c.isAtFirstRow)(t)&&(0,c.isAtFirstColumn)(t)){e.preventDefault();var g=(0,c.getVisibleColumns)(t),v=g[g.length-1].id,_=(0,c.getZoneRowCount)(t,"header")-1;(0,c.transitionFromBodyToZone)(t,"header",v,_)}else{t.config.$editable&&t.editEnd();var m=null===(s=t.selection)||void 0===s?void 0:s.getCell(),y=t.config.columns.filter((function(t){return!t.hidden}));if(m){var b=(0,n.locate)(null===(h=null===(u=null===(d=t.getRootView().node)||void 0===d?void 0:d.parent)||void 0===u?void 0:u.parent)||void 0===h?void 0:h.el,"data-dhx-root-widget-id");if(b)return void r.focusManager.setFocusId(b);var x=y.indexOf(m.column)+(0,l.getRangedIndex)(t,"left");if(x>=0&&x<y.length)e&&e.preventDefault(),t.scrollTo(m.row.id.toString(),y[x].id.toString()),t.selection.setCell(m.row.id,y[x].id);else(C=(0,l.getNextVisibleRowId)(t,m.row.id,-1))&&(e&&e.preventDefault(),t.scrollTo(C.toString(),y[y.length-1].id.toString()),t.selection.setCell(C,y[y.length-1].id))}else{var w=null===(f=t.range)||void 0===f?void 0:f.getRange();if(w){var C,S=y.findIndex((function(t){return t.id===w.xEnd}))-1;if(S>=0)e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,w.yEnd,y[S].id);else(C=(0,l.getNextVisibleRowId)(t,w.yEnd,-1))&&(e&&e.preventDefault(),(0,l.navigateToCell)(t,!1,C,y[y.length-1].id))}}}else{var E=e.target,D=E.closest(".dhx_grid-".concat(p,"-cell, .dhx_span-cell"));if(D&&E!==D&&(0,c.isContentCell)(D))return e.preventDefault(),void(0,c.deactivateContentCell)(D);if("exit-start"===(0,c.moveZoneFocusTab)(t,e,p,"backward")){(0,c.restoreZoneTabindex)(t,p);var O=(null===(i=t.getRootNode)||void 0===i?void 0:i.call(t))||(null===(a=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===a?void 0:a.getRootNode()),k=null==O?void 0:O.querySelector(".dhx_grid-focus-sentinel");k&&(k.setAttribute("tabindex","-1"),setTimeout((function(){return k.setAttribute("tabindex","0")}),0))}}},arrowUp:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"!==n&&"footer"!==n){if("body"===n){if((0,c.isAtFirstRow)(t))return e.preventDefault(),void((r=(0,c.getActiveColumnId)(t)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id))&&(0,c.transitionFromBodyToZone)(t,"header",r));(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:(0,l.getRangedIndex)(t,"up")})}}else if(!(0,c.moveZoneFocusVertical)(t,e,n,"up")&&"footer"===n){var o=e.target,r=(0,c.getColIdFromTarget)(o);(0,c.restoreZoneTabindex)(t,"footer"),r&&(0,c.transitionToBody)(t,r,"last")}},"shift+enter":function(e){var i=(0,c.detectFocusZone)(e);"header"!==i&&"footer"!==i||(0,c.triggerHeaderSort)(t,e,!0)},"ctrl+z":function(){var e;(null===(e=t.history)||void 0===e?void 0:e.canUndo())&&t.history.undo()},"ctrl+shift+z":function(){var e;(null===(e=t.history)||void 0===e?void 0:e.canRedo())&&t.history.redo()},"ctrl+enter":function(){var e=(0,l.getActiveCell)(t,u);e&&(e.row.$opened?t.collapse(e.row.id):t.expand(e.row.id))},"ctrl+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0})},"shift+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowUp":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:-1,toEnd:!0,shiftUp:!0})},arrowDown:function(e){var i,n=(0,c.detectFocusZone)(e);if("header"!==n&&"footer"!==n){if("body"===n){if((0,c.hasFooter)(t)&&(0,c.isAtLastRow)(t))return e.preventDefault(),void((r=(0,c.getActiveColumnId)(t)||(null===(i=(0,c.getVisibleColumns)(t)[0])||void 0===i?void 0:i.id))&&(0,c.transitionFromBodyToZone)(t,"footer",r,0));(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:(0,l.getRangedIndex)(t,"down")})}}else if(!(0,c.moveZoneFocusVertical)(t,e,n,"down")){var o=e.target,r=(0,c.getColIdFromTarget)(o);(0,c.restoreZoneTabindex)(t,n),r&&(0,c.transitionToBody)(t,r,"footer"===n?"last":"first")}},"ctrl+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0})},"shift+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowDown":function(e){(0,l.move)({grid:t,event:e,dir:"vertical",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowRight:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if("body"===i){if("tree"===t.config.type&&!t.config.$editable){var n=(0,l.getActiveCell)(t,u);if(n&&((0,l.isTreeColumn)(t,n.column.id)||"row"===t.config.selection)){var o=n.row,r=t.data.haveItems(o.id);if(r&&!o.$opened)return e.preventDefault(),void t.expand(o.id);if(r&&o.$opened){var a=t.data.getItems(o.id);if(null==a?void 0:a.length)return e.preventDefault(),void(0,l.navigateToCell)(t,u,a[0].id,n.column.id)}}}(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:(0,l.getRangedIndex)(t,"right")})}}else(0,c.moveZoneFocus)(t,e,i,"right")},"ctrl+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0})},"shift+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,shiftUp:!0})},"ctrl+shift+arrowRight":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:1,toEnd:!0,shiftUp:!0})},arrowLeft:function(e){var i=(0,c.detectFocusZone)(e);if("header"!==i&&"footer"!==i){if("body"===i){if("tree"===t.config.type&&!t.config.$editable){var n=(0,l.getActiveCell)(t,u);if(n&&((0,l.isTreeColumn)(t,n.column.id)||"row"===t.config.selection)){var o=n.row;if(t.data.haveItems(o.id)&&o.$opened)return e.preventDefault(),void t.collapse(o.id);var r=t.data.getParent(o.id);if(r&&r!==t.data.getRoot())return e.preventDefault(),void(0,l.navigateToCell)(t,u,r,n.column.id)}}(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:(0,l.getRangedIndex)(t,"left")})}}else(0,c.moveZoneFocus)(t,e,i,"left")},"ctrl+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0})},"shift+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,shiftUp:!0})},"ctrl+shift+arrowLeft":function(e){(0,l.move)({grid:t,event:e,dir:"horizontal",rangedIndex:-1,toEnd:!0,shiftUp:!0})},pageDown:function(t){return f(t,1)},pageUp:function(t){return f(t,-1)},"shift+pageDown":function(t){return f(t,1,!0)},"shift+pageUp":function(t){return f(t,-1,!0)},home:function(t){return p(t,-1)},end:function(t){return p(t,1)},"shift+home":function(t){return p(t,-1,!0)},"shift+end":function(t){return p(t,1,!0)},"ctrl+home":function(t){return g(t,-1)},"ctrl+end":function(t){return g(t,1)},"ctrl+shift+home":function(t){return g(t,-1,!0)},"ctrl+shift+end":function(t){return g(t,1,!0)}}}}},function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.navigateToCell=e.isTreeColumn=e.getNextVisibleRowId=e.walkVisibleRows=e.getActiveCell=e.getRangedIndex=e.applyRangeMove=e.move=void 0;var o=i(2),r=i(14),a=i(5);function l(t,e,i,n,o){var r,a="vertical"===n,l=a?e.id:i.yEnd,s=a?i.xEnd:e.id;if(t.scrollTo(l,s),o){var c=a?{yEnd:e.id,xEnd:i.xEnd}:{yEnd:i.yEnd,xEnd:e.id};t.range.setRange(c,!0)}else{c=a?{yStart:e.id,yEnd:e.id,xStart:i.xStart,xEnd:i.xStart}:{yStart:i.yStart,yEnd:i.yStart,xStart:e.id,xEnd:e.id};t.range.setRange(c)}null===(r=t.block)||void 0===r||r.restoreFocus()}e.move=function(t){var e=t.grid,i=t.event;if(!(e.config.$editable||(0,o.locateNodeByClassName)(i,"dhx_grid-header-cell")||(0,o.locateNodeByClassName)(i,"dhx_grid-footer-cell"))){i&&i.preventDefault();var r=e.config.columns.filter((function(t){return!t.hidden}));!function(t){var e=t.grid,i=t.columns,n=t.dir,o=t.rangedIndex,r=t.toEnd,l=t.shiftUp,s=e.selection.getCell(),c=e.config.multiselection&&l;if(!s)return;if("vertical"===n)if(r){var d=e.data.getItem(e.data.getId(0));if(1===o){var u=e.data.getId(e.data.getLength()-1);"tree"===e.config.type&&(u=(0,a.getLastChild)(u,e.data)),d=e.data.getItem(u)}e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c)}else{d=null;if("tree"===e.config.type){var h=o<0?(0,a.getClosestTop)(s.row.id,e.data):(0,a.getClosestBottom)(s.row.id,e.data);h&&(d=e.data.getItem(h))}else{(f=e.data.getIndex(s.row.id.toString()))+o>=0&&f+o<e.data.getLength()&&(d=e.data.getItem(e.data.getId(f+o)))}d&&(e.scrollTo(d.id.toString(),s.column.id.toString()),e.selection.setCell(d.id,s.column.id,!1,c))}else if(r){d=1===o?i[i.length-1]:i[0];e.scrollTo(s.row.id.toString(),d.id.toString()),e.selection.setCell(s.row.id,d.id,!1,c)}else{var f;(f=i.findIndex((function(t){return t.id==s.column.id})))+o>=0&&f+o<i.length&&(e.scrollTo(s.row.id.toString(),i[f+o].id.toString()),e.selection.setCell(s.row.id,i[f+o].id,!1,c))}}(n(n({},t),{columns:r})),function(t){var e,i=t.grid,o=t.dir,r=i,s=null===(e=r.range)||void 0===e?void 0:e.getRange();if(!s)return;var c="vertical"===o?function(t){var e=t.grid,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex,l=e,s=l.data,c=l.config;if(n){if(r>0){var d=s.getId(s.getLength()-1);return"tree"===c.type&&(d=(0,a.getLastChild)(d,s)),s.getItem(d)}return s.getItem(s.getId(0))}var u=r<0;if("tree"===c.type){var h=o?i.yEnd:u?i.yStart:i.yEnd,f=u?(0,a.getClosestTop)(h,s):(0,a.getClosestBottom)(h,s);return f?s.getItem(f):null}var p=s.getIndex(i.yStart),g=s.getIndex(i.yEnd),v=o?i.yEnd:s.getId(u?Math.min(p,g):Math.max(p,g)),_=s.getIndex(v)+r;if(_>=0&&_<s.getLength())return s.getItem(s.getId(_));return null}(n(n({},t),{rangedCell:s})):function(t){var e=t.columns,i=t.rangedCell,n=t.toEnd,o=t.shiftUp,r=t.rangedIndex;if(n)return r>0?e[e.length-1]:e[0];var a=e.findIndex((function(t){return t.id===i.xStart})),l=e.findIndex((function(t){return t.id===i.xEnd})),s=r<0,c=(o?l:s?Math.min(a,l):Math.max(a,l))+r;if(c>=0&&c<e.length)return e[c];return null}(n(n({},t),{rangedCell:s}));c&&l(r,c,s,o,t.shiftUp)}(n(n({},t),{columns:r}))}},e.applyRangeMove=l,e.getRangedIndex=function(t,e){var i,n,o=t.selection.getCell(),r=o&&t.getSpan(o.row.id,o.column.id);if(r){if("up"===e||"down"===e){var a=null===(i=t.config.data)||void 0===i?void 0:i.findIndex((function(t){return t.id===r.row})),l=null===(n=t.config.data)||void 0===n?void 0:n.findIndex((function(t){return t.id===o.row.id}));return"up"===e?a-l-1:a+(r.rowspan||1)-l}var s=t.config.columns.filter((function(t){return!t.hidden}));a=s.findIndex((function(t){return t.id===r.column})),l=s.findIndex((function(t){return t.id===o.column.id}));return"left"===e?a-l-1:a+(r.colspan||1)-l}return"down"===e||"right"===e?1:-1},e.getActiveCell=function(t,e){var i;if(e||"row"===t.config.selection)return(0,r.normalizeCell)(t.selection.getCell(),t);var n=null===(i=t.range)||void 0===i?void 0:i.getRange();if((null==n?void 0:n.yEnd)&&(null==n?void 0:n.xEnd)){var o=t.data.getItem(n.yEnd),a=t.config.columns.find((function(t){return t.id===n.xEnd}));if(o&&a)return{row:o,column:a}}return null},e.walkVisibleRows=function(t,e,i){for(var n="tree"===t.config.type,o=i<0,r=Math.abs(i),l=e,s=0;s<r;s++){var c=void 0;if(n)c=o?(0,a.getClosestTop)(l,t.data):(0,a.getClosestBottom)(l,t.data);else{var d=t.data.getIndex(l),u=o?d-1:d+1;if(u<0||u>=t.data.getLength())break;c=t.data.getId(u)}if(!c)break;l=c}return l},e.getNextVisibleRowId=function(t,e,i){if("tree"===t.config.type)return i>0?(0,a.getClosestBottom)(e,t.data):(0,a.getClosestTop)(e,t.data);var n=t.data.getIndex(e)+i;return n>=0&&n<t.data.getLength()?t.data.getId(n):null},e.isTreeColumn=function(t,e){var i;return(null===(i=t.config.columns.filter((function(t){return!t.hidden}))[0])||void 0===i?void 0:i.id)==e},e.navigateToCell=function(t,e,i,n){var o;if(t.scrollTo(i.toString(),n.toString()),e||"row"===t.config.selection)t.selection.setCell(i,n);else{var r=t;r.range&&(r.range.setRange({yStart:i,yEnd:i,xStart:n,xEnd:n}),null===(o=r.block)||void 0===o||o.restoreFocus())}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.startCellEdit=e.toggleBooleanCell=e.isColumnEditable=void 0;var n=i(3);e.isColumnEditable=function(t,e){return!!(!1!==t.editable&&e.editable||t.editable)},e.toggleBooleanCell=function(t,e,i){t.events.fire(n.GridEvents.beforeEditStart,[e,i,"checkbox"])&&(t.events.fire(n.GridEvents.afterEditStart,[e,i,"checkbox"]),t.events.fire(n.GridEvents.beforeEditEnd,[!e[i.id],e,i])&&t.events.fire(n.GridEvents.afterEditEnd,[!e[i.id],e,i]))},e.startCellEdit=function(t,e){t.editCell(e.row.id,e.column.id,e.column.editorType)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.initEndSentinel=e.initFocusSentinel=e.restoreZoneTabindex=e.getColIdFromTarget=e.getActiveColumnId=e.hasFooter=e.isAtLastRow=e.isAtFirstRow=e.transitionFromBodyToZone=e.transitionToBody=e.setZoneCellFocus=e.triggerHeaderSort=e.deactivateContentCell=e.activateContentCell=e.isContentCell=e.isAtFirstColumn=e.moveZoneFocusTab=e.moveZoneFocusVertical=e.moveZoneFocus=e.resolveSpanTarget=e.ensureZoneCellVisible=e.findZoneCell=e.getZoneRowCount=e.getColumnSplitSection=e.getVisibleColumns=e.detectFocusZone=void 0;var n=i(2),o=i(5),r=new WeakMap;function a(t){return t.config.columns.filter((function(t){return!t.hidden}))}function l(t,e){var i=a(t),n=i.find((function(t){return t.id===e}));if(!n)return"center";var o=n.$index,r=t.config.leftSplit||0,l=t.config.rightSplit||0;return r>0&&o<r?"left":l>0&&o>=i.length-l?"right":"center"}function s(t,e){var i,n;return"header"===e?(null===(i=t.config.$headerHeightMap)||void 0===i?void 0:i.length)||0:"footer"===e&&(null===(n=t.config.$footerHeightMap)||void 0===n?void 0:n.length)||0}function c(t,e,i,n){var o,r,a,s=(null===(o=t.getRootNode)||void 0===o?void 0:o.call(t))||(null===(a=null===(r=t.getRootView())||void 0===r?void 0:r.data)||void 0===a?void 0:a.getRootNode());if(!s)return null;for(var c=function(t,e,i){var n=[];if("left"===i){(o=t.querySelector(".dhx_".concat(e,"-fixed-cols.dhx_grid__cols_left--fixed")))&&n.push(o)}else if("right"===i){var o;(o=t.querySelector(".dhx_".concat(e,"-fixed-cols.dhx_grid__cols_right--fixed")))&&n.push(o)}else{var r=t.querySelector(".dhx_".concat(e,"-wrapper"));r&&n.push(r)}if(0===n.length){t.querySelectorAll(".dhx_".concat(e,"-wrapper, .dhx_").concat(e,"-fixed-cols")).forEach((function(t){return n.push(t)}))}return n}(s,e,l(t,i)),d=0,u=c;d<u.length;d++){var h=u[d],f=h.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));if(f)return f;var p=h.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'));if(p)return p}var g=s.querySelector('.dhx_span-cell[data-dhx-id="'.concat(i,'"][data-dhx-row-index="').concat(n,'"]'));return g||(s.querySelector(".dhx_grid-".concat(e,'-cell[data-dhx-id="').concat(i,'"][data-dhx-row-index="').concat(n,'"]'))||null)}function d(t,e){var i,n,r;if("center"===l(t,e)){var s=a(t),c=t.config.leftSplit||0,d=s.findIndex((function(t){return t.id===e}));if(!(d<0)){var u=t.getScrollState(),h=(0,o.getTotalWidth)(s.slice(c,d)),f=h+(s[d].$width||0),p=null===(r=null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.refs)||void 0===n?void 0:n.grid_body)||void 0===r?void 0:r.el,g=p?p.clientWidth:t.config.$width,v=c>0?(0,o.getTotalWidth)(s.slice(0,c)):0,_=t.config.rightSplit||0,m=g-v-(_>0?(0,o.getTotalWidth)(s.slice(-_)):0),y=u.x;h<y?t.scroll(h,null):f>y+m&&t.scroll(f-m,null)}}}function u(t,e,i,n){var o,r="footer"===t?"footer":"header",a=n.findIndex((function(t){return t.id===e}));if(a<0)return{colId:e,rowIndex:i};for(var l=0;l<=i;l++)for(var s=0;s<=a;s++){var c=null===(o=n[s][r])||void 0===o?void 0:o[l];if(c){var d=s+(c.colspan||1),u=l+(c.rowspan||1);if(d>a&&u>i&&(l<i||s<a))return{colId:n[s].id,rowIndex:l}}}return{colId:e,rowIndex:i}}e.detectFocusZone=function(t){var e=t.target;if((0,n.locateNodeByClassName)(e,"dhx_grid-header-cell"))return"header";if((0,n.locateNodeByClassName)(e,"dhx_grid-footer-cell"))return"footer";if((0,n.locateNodeByClassName)(e,"dhx_span-cell"))for(var i=e;i;){if(i.classList){if(i.classList.contains("dhx_header-spans"))return"header";if(i.classList.contains("dhx_footer-spans"))return"footer";if(i.classList.contains("dhx_span-spans"))return"body"}i=i.parentNode}return(0,n.locateNodeByClassName)(e,"dhx_grid-group_item")?"groupPanel":"body"},e.getVisibleColumns=a,e.getColumnSplitSection=l,e.getZoneRowCount=s,e.findZoneCell=c,e.ensureZoneCellVisible=d,e.resolveSpanTarget=u,e.moveZoneFocus=function(t,e,i,n){var o,l;e.preventDefault();var s=e.target,c=s.getAttribute("data-dhx-id"),d=parseInt(s.getAttribute("data-dhx-row-index")||"0",10);if(c){var h=r.get(t),f=null!==(o=null==h?void 0:h.navRowIndex)&&void 0!==o?o:d,g=a(t),v=g.findIndex((function(t){return t.id===c}));if(!(v<0)){var _="footer"===i?"footer":"header",m="right"===n?1:-1,y=v;if("right"===n){var b=null===(l=g[v][_])||void 0===l?void 0:l[d];(null==b?void 0:b.colspan)>1&&(y=v+b.colspan-1)}var x=y+m;if(!(x<0||x>=g.length)){var w=u(i,g[x].id,f,g);p(t,i,w.colId,w.rowIndex,s,f)}}}},e.moveZoneFocusVertical=function(t,e,i,n){var o;e.preventDefault();var r=e.target,l=r.getAttribute("data-dhx-id"),c=parseInt(r.getAttribute("data-dhx-row-index")||"0",10);if(!l)return!1;var d=a(t),h="footer"===i?"footer":"header",f="down"===n?1:-1,g=c;if("down"===n){var v=d.findIndex((function(t){return t.id===l}));if(v>=0){var _=null===(o=d[v][h])||void 0===o?void 0:o[c];(null==_?void 0:_.rowspan)>1&&(g=c+_.rowspan-1)}}var m=g+f,y=s(t,i);if(m<0||m>=y)return!1;var b=u(i,l,m,d);return p(t,i,b.colId,b.rowIndex,r,m),!0},e.moveZoneFocusTab=function(t,e,i,n){var o,l,c=e.target,d=c.getAttribute("data-dhx-id")?c:c.closest("[data-dhx-id]");if(!d)return"forward"===n?"exit-end":"exit-start";var h=d.getAttribute("data-dhx-id"),f=parseInt(d.getAttribute("data-dhx-row-index")||"0",10),g=a(t),v=g.findIndex((function(t){return t.id===h}));if(v<0)return"forward"===n?"exit-end":"exit-start";var _="footer"===i?"footer":"header",m=s(t,i),y="forward"===n?1:-1,b=r.get(t),x=null!==(o=null==b?void 0:b.navRowIndex)&&void 0!==o?o:f,w=v;if("forward"===n){var C=null===(l=g[v][_])||void 0===l?void 0:l[f];(null==C?void 0:C.colspan)>1&&(w=v+C.colspan-1)}for(var S=w+y,E=x,D=g.length*m,O=0;O<D;O++){if("forward"===n&&S>=g.length){if(++E>=m)return"exit-end";S=0}else if("backward"===n&&S<0){if(--E<0)return"exit-start";S=g.length-1}var k=u(i,g[S].id,E,g);if(k.colId!==h||k.rowIndex!==f){if(p(t,i,k.colId,k.rowIndex,c,E))return e.preventDefault(),"moved";S+=y}else S+=y}return"forward"===n?"exit-end":"exit-start"},e.isAtFirstColumn=function(t){var e,i,n=a(t);if(0===n.length)return!0;var o=n[0].id;if(t.config.blockSelection){var r=null===(e=t.range)||void 0===e?void 0:e.getRange();if(r)return r.xStart==o}else{var l=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(l)return l.column.id==o}return!0},e.isContentCell=function(t){return t.classList.contains("dhx_grid-custom-content-cell")};var h=new WeakMap;function f(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","-1");var i=h.get(e);i&&(e.removeEventListener("keydown",i),h.delete(e))}t.setAttribute("tabindex","0"),t.focus()}function p(t,e,i,n,o,a){o&&o.setAttribute("tabindex","-1"),d(t,i);var l=c(t,e,i,n);if(!l)return!1;l.setAttribute("tabindex","0"),l.focus();var s=r.get(t);return s&&(s.colId=i,s.rowIndex=n,s.navRowIndex=null!=a?a:n),!0}e.activateContentCell=function(t){var e=t.querySelector("input, select");if(e){e.setAttribute("tabindex","0"),e.focus();var i=h.get(e);i&&e.removeEventListener("keydown",i);var n=function(i){"Escape"===i.key&&(i.preventDefault(),e.removeEventListener("keydown",n),h.delete(e),f(t))};e.addEventListener("keydown",n),h.set(e,n)}},e.deactivateContentCell=f,e.triggerHeaderSort=function(t,e,i){var n,r,a=e.target,l=a.getAttribute("data-dhx-id"),s=parseInt(a.getAttribute("data-dhx-row-index")||"0",10);if(l){var c=t.getColumn(l);if(c&&(0,o.isSortable)(t.config,c)){var d=a.getAttribute("data-dhx-text-id"),u=null===(n=c.header)||void 0===n?void 0:n.find((function(t){return t.id===d}));if(!((null==u?void 0:u.content)||(null==u?void 0:u.colspan)>1)){e.preventDefault();var h=t.config.multiSort&&(!i||i&&!(null===(r=t._sortingStates)||void 0===r?void 0:r.length));t._sort(l,null==u?void 0:u.sortAs,h),p(t,"header",l,s)}}}},e.setZoneCellFocus=p,e.transitionToBody=function(t,e,i){var n;0!==t.data.getLength()&&("first"===i?n=t.data.getId(0):(n=t.data.getId(t.data.getLength()-1),"tree"===t.config.type&&(n=(0,o.getLastChild)(n,t.data)||n)),t.config.blockSelection&&t.range?(t.range.setRange({xStart:e,yStart:n,xEnd:e,yEnd:n}),t.scrollTo(n,e),t.block.restoreFocus()):t.selection&&(t.selection.setCell(n,e),t.scrollTo(n,e),t.selection.restoreFocus()),function(t){var e,i,n,o=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(!o)return!1;var r=document.activeElement;return r&&o.contains(r)&&!!r.getAttribute("data-dhx-col-id")}(t)||function(t,e,i){var n,o,r,a=(null===(n=t.getRootNode)||void 0===n?void 0:n.call(t))||(null===(r=null===(o=t.getRootView())||void 0===o?void 0:o.data)||void 0===r?void 0:r.getRootNode());if(a){var l=a.querySelector('[data-dhx-id="'.concat(e,'"] [data-dhx-col-id="').concat(i,'"]'));l&&(l.tabIndex=0,l.focus({preventScroll:!0}))}}(t,n,e))},e.transitionFromBodyToZone=function(t,e,i,n){var o=a(t);if(0!==o.length){void 0===n&&(n=s(t,e)-1);var r=u(e,i,n,o);p(t,e,r.colId,r.rowIndex,void 0,n)}},e.isAtFirstRow=function(t){var e,i;if(t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.yStart==t.data.getId(0)}else{var o=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(o)return o.row.id==t.data.getId(0)}return!0},e.isAtLastRow=function(t){var e,i;if(0===t.data.getLength())return!0;var n=t.data.getId(t.data.getLength()-1);if("tree"===t.config.type&&(n=(0,o.getLastChild)(n,t.data)||n),t.config.blockSelection){var r=null===(e=t.range)||void 0===e?void 0:e.getRange();if(r)return r.yEnd==n}else{var a=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(a)return a.row.id==n}return!0},e.hasFooter=function(t){return s(t,"footer")>0},e.getActiveColumnId=function(t){var e,i;if(t.config.blockSelection){var n=null===(e=t.range)||void 0===e?void 0:e.getRange();if(n)return n.xStart}else{var o=null===(i=t.selection)||void 0===i?void 0:i.getCell();if(o)return o.column.id}return null},e.getColIdFromTarget=function(t){return(null==t?void 0:t.getAttribute("data-dhx-id"))||null},e.restoreZoneTabindex=function(t,e){var i,n,o,r=(null===(i=t.getRootNode)||void 0===i?void 0:i.call(t))||(null===(o=null===(n=t.getRootView())||void 0===n?void 0:n.data)||void 0===o?void 0:o.getRootNode());if(r){var a=".dhx_grid-".concat(e,"-cell[tabindex], .dhx_").concat(e,"-spans .dhx_span-cell[tabindex]");r.querySelectorAll(a).forEach((function(t){t.setAttribute("tabindex","-1")}));r.querySelectorAll(".dhx_grid-custom-content-cell input, .dhx_grid-custom-content-cell select").forEach((function(t){t.setAttribute("tabindex","-1")}))}},e.initFocusSentinel=function(t){var e,i,n,o=r.get(t);if(!(null==o?void 0:o.initialized)){var l=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(l){var c=l.querySelector(".dhx_grid-focus-sentinel");c&&(o||(o={colId:null,rowIndex:null,navRowIndex:null,initialized:!1},r.set(t,o)),c.addEventListener("focus",(function(){var e=a(t);if(0!==e.length){var i=s(t,"header");if(0!==i){var n=o.colId,r=o.rowIndex;null!==n&&null!==r||(n=e[0].id,r=0),e.some((function(t){return t.id===n}))||(n=e[0].id,r=0),r>=i&&(r=0),p(t,"header",n,r)}}})),o.initialized=!0)}}},e.initEndSentinel=function(t){var e,i,n,o=(null===(e=t.getRootNode)||void 0===e?void 0:e.call(t))||(null===(n=null===(i=t.getRootView())||void 0===i?void 0:i.data)||void 0===n?void 0:n.getRootNode());if(o){var r=o.querySelector(".dhx_grid-focus-sentinel--end");r&&!r.getAttribute("data-dhx-initialized")&&(r.addEventListener("focus",(function(){var e=a(t);if(0!==e.length){var i=s(t,"footer");if(i>0){var n=e[e.length-1].id;p(t,"footer",n,i-1)}else{s(t,"header")>0&&p(t,"header",e[0].id,0)}}})),r.setAttribute("data-dhx-initialized","true"))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropManager=void 0;var n=i(1),o=i(3),r=i(8),a=i(7),l=i(5),s=i(0),c=i(4),d=i(5),u=i(2),h=function(){function t(t){var e=t.view;this._isTreeMode=!1,this._grid=null,this._dragState=null,this._dragType=null,this._grid=e,this._isTreeMode="tree"===this._grid.config.type,this._init()}return t.prototype.toHTML=function(t){var e,i,o=(null===(e=this._grid.config.$grouped)||void 0===e?void 0:e.length)&&this._grid.config.$grouped.some((function(t){return t.notGrouped})),r=(0,s.isDefined)(null===(i=this._dragState)||void 0===i?void 0:i.target)&&!this._grid.config.$resizing&&!o;return(0,n.el)(".dhx_grid-drop",{"aria-hidden":"true"},[r&&this._getDropLineNode(t)])},t.prototype._getDropLineNode=function(t){return!this._dragType||(null==t?void 0:t.header)&&"horizontal"===this._dragType?null:"horizontal"===this._dragType?this._getHorizontalDropLine():this._getVerticalDropLine(t)},t.prototype._getVerticalDropLine=function(t){var e=this,i=void 0===t?{}:t,r=i.header,d=void 0!==r&&r,u=i.mode,h=void 0===u?null:u,f=this._grid.config.columns.filter((function(t){return!t.hidden})),p=f.findIndex((function(t){return t.id==e._dragState.target})),g=f[p];if(!(0,s.isDefined)(g))return null;var v,_,m=this._grid.config,y=m.leftSplit,b=m.rightSplit,x=f.findIndex((function(t){return t.id==e._dragState.start})),w=this._grid.getScrollState(),C=d?this._grid.config.$headerHeight:this._grid.config.$height,S=a.BORDERS,E=d?0:w.y;if(y&&(v=this._isColumnFixed(g,o.Split.left)),b&&(_=this._isColumnFixed(g,o.Split.right)),v&&h===o.Split.right||_&&h===o.Split.left||h&&!_&&!v)return null;var D=0;if(x===p||-1==p)return null;if(D=(0,l.getTotalWidth)(f.slice(0,p+1)),x>p&&(D-=g.$width),f.length-(!_&&b||0)===p+1&&(D-=a.BORDERS),v&&!h&&(D+=w.x),_)if(h){var O=(0,a.getCurrFixedCols)(this._grid.config,o.Split.right),k=O.findIndex((function(t){return t.id==e._dragState.target})),R=O.findIndex((function(t){return t.id==e._dragState.start}));D=(0,l.getTotalWidth)(O.slice(0,k+1)),R>k&&(D-=g.$width),O.length===k+1&&(D-=a.BORDERS)}else D-=(0,c.getReverseScrollState)(this._grid).x;return(0,n.el)(".dhx_grid-drop-line",{style:{height:C,width:S,top:E,left:D}})},t.prototype._getHorizontalDropLine=function(){var t=this._grid.data.getItem(this._dragState.target);if(!(0,s.isDefined)(t)||this._dragState.source.find((function(e){return e==t.id})))return null;var e,i,o=this._grid.config,r=o.topSplit,l=o.bottomSplit,d=this._grid.config.$width,u="in"===this._dragState.dropPosition?t.$height:a.BORDERS,h=this._grid.getScrollState(),f=a.BORDERS/2;r&&(e=this._grid.data.getRawData(0,r).map((function(t){return t.id})).includes(t.id));if(l){var p=this._grid.data.getLength();i=this._grid.data.getRawData(p-l,p).map((function(t){return t.id})).includes(t.id)}var g=this._getTopPosition(t);"bottom"===this._dragState.dropPosition&&(g=this._getBottomPosition(t),t.$index===this._grid.data._order.length-1&&(g-=f)),"in"!==this._dragState.dropPosition&&(g-=f,"top"===this._dragState.dropPosition&&0===t.$index&&(g+=f)),e&&(g+=h.y),i&&(g-=(0,c.getReverseScrollState)(this._grid).y);var v=t.$level&&"in"!==this._dragState.dropPosition?(0,c.getTreeCellWidthOffset)(t,t.$items):0;return(0,n.el)(".dhx_grid-drop-line",{style:{marginLeft:v,height:u,width:d,left:h.x,top:g}})},t.prototype._init=function(){var t=this;this._grid.events.on(r.DragEvents.dragStart,(function(e,i,n){"group"!==n&&"row"===n&&t._toggleRowDraggable(e.source,!0)})),this._grid.events.on(r.DragEvents.dragIn,(function(e,i,n){"group"===n||t._isSameComponent(i)||(t._dragState=e,t._dragType="row"===n?"horizontal":"vertical")})),this._grid.events.on(r.DragEvents.cancelDrop,(function(e,i,n){"group"!==n&&(t._dragState=t._dragType=null)})),this._grid.events.on(r.DragEvents.afterDrag,(function(e,i,n){t._dragState=t._dragType=null,"group"!==n&&"row"===n&&t._toggleRowDraggable(e.source,!1)}))},t.prototype._getNextRow=function(t){var e=this._grid.data.getIndex(t.id)+1,i=this._grid.data.getItem(this._grid.data.getId(e));return i||(i=this._grid.data.getItem((0,d.getLastChild)(t.id,this._grid.data,!0))),i},t.prototype._isColumnFixed=function(t,e){var i=(0,a.getCurrFixedCols)(this._grid.config,e),n=null==i?void 0:i.map((function(t){return t.id}));return null==n?void 0:n.includes(t.id)},t.prototype._getTopPosition=function(t){return this._grid.getCellRect(t.id).y},t.prototype._getBottomPosition=function(t){if(this._isTreeMode&&t.$items){var e=this._getNextRow(t);if(!(0,s.isDefined)(e))return 0;var i=this._getTopPosition(e);return e.$level&&(i+=e.$height-a.BORDERS/2),i}return this._getTopPosition(t)+t.$height},t.prototype._toggleRowDraggable=function(t,e){var i=this;t.forEach((function(t){i._grid.data.update(t,{$draggable:e},!0),i._isTreeMode&&i._grid.data.haveItems(t)&&i._grid.data.eachChild(t,(function(t){i._grid.data.update(t.id,{$draggable:e},!0)}))}))},t.prototype._isSameComponent=function(t){return(0,u.locate)(t.target,"data-dhx-widget-id")!=this._grid._uid},t}();e.DropManager=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVisibleRowNode=e.getRowNode=void 0,e.getRowNode=function(t,e,i){var n=i?".dhx_grid__cols_".concat(i,"--fixed"):":not(.dhx_grid-fixed-cols-wrap)";return e.querySelector("".concat(n,' .dhx_grid-row[data-dhx-id="').concat(t,'"]'))},e.getVisibleRowNode=function(t,e,i){var n=document.createElement("div");return n.style.width=e+"px",n.style.overflow="hidden",t.style.width=e-i+"px",t.style.marginLeft=i+"px",n.appendChild(t),n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setLocale=void 0,e.setLocale=function(t,e){var i=this[t];if(i)for(var n in e)i[n]=e[n]}}])})),window.dhx_legacy){if(window.dhx)for(var key in dhx)if("i18n"===key)for(var lang in dhx[key])window.dhx_legacy[key][lang]=dhx[key][lang];else dhx_legacy[key]=dhx[key];window.dhx=dhx_legacy,delete window.dhx_legacy}