186.bundle.js 1.7 MB

12345678910111213141516171819202122232425
  1. /*! For license information please see 186.bundle.js.LICENSE.txt */
  2. (self.webpackChunkfront=self.webpackChunkfront||[]).push([[186],{654:(e,t,n)=>{"use strict";var o=n(85072),i=n.n(o),r=n(97825),s=n.n(r),a=n(77659),l=n.n(a),c=n(55056),u=n.n(c),d=n(10540),h=n.n(d),p=n(41113),m=n.n(p),g=n(15411),f={};f.styleTagTransform=m(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=s(),f.insertStyleElement=h(),i()(g.A,f),g.A&&g.A.locals&&g.A.locals},659:(e,t,n)=>{var o=n(51873),i=Object.prototype,r=i.hasOwnProperty,s=i.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=r.call(e,a),n=e[a];try{e[a]=void 0;var o=!0}catch(e){}var i=s.call(e);return o&&(t?e[a]=n:delete e[a]),i}},1233:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(5544),i=n(96540);function r(e){var t=i.useRef(!1),n=i.useState(e),r=(0,o.A)(n,2),s=r[0],a=r[1];return i.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[s,function(e,n){n&&t.current||a(e)}]}},2616:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var o=n(64467);const i=Math.round;function r(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],o=n.map((e=>parseFloat(e)));for(let e=0;e<3;e+=1)o[e]=t(o[e]||0,n[e]||"",e);return n[3]?o[3]=n[3].includes("%")?o[3]/100:o[3]:o[3]=1,o}const s=(e,t,n)=>0===n?e:e/100;function a(e,t){const n=t||255;return e>n?n:e<0?0:e}class l{constructor(e){function t(t){return t[0]in e&&t[1]in e&&t[2]in e}if((0,o.A)(this,"isValid",!0),(0,o.A)(this,"r",0),(0,o.A)(this,"g",0),(0,o.A)(this,"b",0),(0,o.A)(this,"a",1),(0,o.A)(this,"_h",void 0),(0,o.A)(this,"_s",void 0),(0,o.A)(this,"_l",void 0),(0,o.A)(this,"_v",void 0),(0,o.A)(this,"_max",void 0),(0,o.A)(this,"_min",void 0),(0,o.A)(this,"_brightness",void 0),e)if("string"==typeof e){const n=e.trim();function i(e){return n.startsWith(e)}/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(e instanceof l)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=a(e.r),this.g=a(e.g),this.b=a(e.b),this.a="number"==typeof e.a?a(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else{if(!t("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e));this.fromHsv(e)}}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if(void 0===this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:i(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(void 0===this._s){const e=this.getMax()-this.getMin();this._s=0===e?0:e/this.getMax()}return this._s}getLightness(){return void 0===this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return void 0===this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return void 0===this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let o=this.getLightness()-e/100;return o<0&&(o=0),this._c({h:t,s:n,l:o,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let o=this.getLightness()+e/100;return o>1&&(o=1),this._c({h:t,s:n,l:o,a:this.a})}mix(e,t=50){const n=this._c(e),o=t/100,r=e=>(n[e]-this[e])*o+this[e],s={r:i(r("r")),g:i(r("g")),b:i(r("b")),a:i(100*r("a"))/100};return this._c(s)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),o=e=>i((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:o("r"),g:o("g"),b:o("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=2===t.length?t:"0"+t;const n=(this.g||0).toString(16);e+=2===n.length?n:"0"+n;const o=(this.b||0).toString(16);if(e+=2===o.length?o:"0"+o,"number"==typeof this.a&&this.a>=0&&this.a<1){const t=i(255*this.a).toString(16);e+=2===t.length?t:"0"+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=i(100*this.getSaturation()),n=i(100*this.getLightness());return 1!==this.a?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const o=this.clone();return o[e]=a(t,n),o}_c(e){return new this.constructor(e)}getMax(){return void 0===this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return void 0===this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:o}){if(this._h=e%360,this._s=t,this._l=n,this.a="number"==typeof o?o:1,t<=0){const e=i(255*n);this.r=e,this.g=e,this.b=e}let r=0,s=0,a=0;const l=e/60,c=(1-Math.abs(2*n-1))*t,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(r=c,s=u):l>=1&&l<2?(r=u,s=c):l>=2&&l<3?(s=c,a=u):l>=3&&l<4?(s=u,a=c):l>=4&&l<5?(r=u,a=c):l>=5&&l<6&&(r=c,a=u);const d=n-c/2;this.r=i(255*(r+d)),this.g=i(255*(s+d)),this.b=i(255*(a+d))}fromHsv({h:e,s:t,v:n,a:o}){this._h=e%360,this._s=t,this._v=n,this.a="number"==typeof o?o:1;const r=i(255*n);if(this.r=r,this.g=r,this.b=r,t<=0)return;const s=e/60,a=Math.floor(s),l=s-a,c=i(n*(1-t)*255),u=i(n*(1-t*l)*255),d=i(n*(1-t*(1-l))*255);switch(a){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;default:this.g=c,this.b=u}}fromHsvString(e){const t=r(e,s);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=r(e,s);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=r(e,((e,t)=>t.includes("%")?i(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}},5544:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(96369),i=n(27800),r=n(76562);function s(e,t){return(0,o.A)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=r.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||(0,i.A)(e,t)||(0,r.A)()}},6481:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(96540),i=n(34164),r=n(26739),s=n(58296),a=n(21362),l=n(1908);function c(e){return(0,l.Ay)("MuiTabPanel",e)}(0,n(96148).A)("MuiTabPanel",["root","hidden"]);var u=n(65836),d=n(74848);const h=(0,r.Ay)("div",{name:"MuiTabPanel",slot:"Root"})((({theme:e})=>({padding:e.spacing(3)}))),p=o.forwardRef((function(e,t){const n=(0,s.A)({props:e,name:"MuiTabPanel"}),{children:o,className:r,value:l,keepMounted:p=!1,...m}=n,g={...n},f=(e=>{const{classes:t,hidden:n}=e,o={root:["root",n&&"hidden"]};return(0,a.A)(o,c,t)})(g),b=(0,u.QM)();if(null===b)throw new TypeError("No TabContext provided");const v=(0,u.eR)(b,l),w=(0,u.vU)(b,l);return(0,d.jsx)(h,{"aria-labelledby":w,className:(0,i.A)(f.root,r),hidden:l!==b.value,id:v,ref:t,role:"tabpanel",ownerState:g,...m,children:(p||l===b.value)&&o})}))},7193:(e,t,n)=>{"use strict";n.d(t,{A:()=>Av});var o=n(96540),i=n.t(o,2),r={},s="rc-table-internal-hook",a=n(5544),l=n(26956),c=n(30981),u=n(43210),d=n(40961),h=n.t(d,2);function p(e){var t=o.createContext(void 0);return{Context:t,Provider:function(e){var n=e.value,i=e.children,r=o.useRef(n);r.current=n;var s=o.useState((function(){return{getValue:function(){return r.current},listeners:new Set}})),l=(0,a.A)(s,1)[0];return(0,c.A)((function(){(0,d.unstable_batchedUpdates)((function(){l.listeners.forEach((function(e){e(n)}))}))}),[n]),o.createElement(t.Provider,{value:l},i)},defaultValue:e}}function m(e,t){var n=(0,l.A)("function"==typeof t?t:function(e){if(void 0===t)return e;if(!Array.isArray(t))return e[t];var n={};return t.forEach((function(t){n[t]=e[t]})),n}),i=o.useContext(null==e?void 0:e.Context),r=i||{},s=r.listeners,d=r.getValue,h=o.useRef();h.current=n(i?d():null==e?void 0:e.defaultValue);var p=o.useState({}),m=(0,a.A)(p,2)[1];return(0,c.A)((function(){if(i)return s.add(e),function(){s.delete(e)};function e(e){var t=n(e);(0,u.A)(h.current,t,!0)||m({})}}),[i]),h.current}var g=n(58168),f=n(8719);function b(){var e=o.createContext(null);function t(){return o.useContext(e)}return{makeImmutable:function(n,i){var r=(0,f.f3)(n),s=function(s,a){var l=r?{ref:a}:{},c=o.useRef(0),u=o.useRef(s);return null!==t()?o.createElement(n,(0,g.A)({},s,l)):(i&&!i(u.current,s)||(c.current+=1),u.current=s,o.createElement(e.Provider,{value:c.current},o.createElement(n,(0,g.A)({},s,l))))};return r?o.forwardRef(s):s},responseImmutable:function(e,n){var i=(0,f.f3)(e),r=function(n,r){var s=i?{ref:r}:{};return t(),o.createElement(e,(0,g.A)({},n,s))};return i?o.memo(o.forwardRef(r),n):o.memo(r,n)},useImmutableMark:t}}var v=b(),w=(v.makeImmutable,v.responseImmutable,v.useImmutableMark,b()),y=w.makeImmutable,C=w.responseImmutable,x=w.useImmutableMark;const E=p();var S=n(82284),A=n(89379),k=n(64467),R=n(46942),M=n.n(R),T=n(28104),I=n(16300),P=n(68210);const O=o.createContext({renderWithProps:!1});function D(e){var t=[],n={};return e.forEach((function(e){for(var o,i=e||{},r=i.key,s=i.dataIndex,a=r||(o=s,null==o?[]:Array.isArray(o)?o:[o]).join("-")||"RC_TABLE_KEY";n[a];)a="".concat(a,"_next");n[a]=!0,t.push(a)})),t}function N(e){return null!=e}var H=n(81470);function L(e){var t,n,i,r,s,l,c,d,h=e.component,p=e.children,f=e.ellipsis,b=e.scope,v=e.prefixCls,w=e.className,y=e.align,C=e.record,R=e.render,P=e.dataIndex,D=e.renderIndex,L=e.shouldCellUpdate,$=e.index,_=e.rowType,z=e.colSpan,F=e.rowSpan,B=e.fixLeft,j=e.fixRight,W=e.firstFixLeft,V=e.lastFixLeft,G=e.firstFixRight,K=e.lastFixRight,U=e.appendNode,q=e.additionalProps,Y=void 0===q?{}:q,X=e.isSticky,Q="".concat(v,"-cell"),J=m(E,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Z=J.supportSticky,ee=J.allColumnsFixedLeft,te=J.rowHoverable,ne=function(e,t,n,i,r,s){var l=o.useContext(O),c=x();return(0,T.A)((function(){if(N(i))return[i];var s,a=null==t||""===t?[]:Array.isArray(t)?t:[t],c=(0,I.A)(e,a),u=c,d=void 0;if(r){var h=r(c,e,n);!(s=h)||"object"!==(0,S.A)(s)||Array.isArray(s)||o.isValidElement(s)?u=h:(u=h.children,d=h.props,l.renderWithProps=!0)}return[u,d]}),[c,e,i,t,r,n],(function(e,t){if(s){var n=(0,a.A)(e,2)[1],o=(0,a.A)(t,2)[1];return s(o,n)}return!!l.renderWithProps||!(0,u.A)(e,t,!0)}))}(C,P,D,p,R,L),oe=(0,a.A)(ne,2),ie=oe[0],re=oe[1],se={},ae="number"==typeof B&&Z,le="number"==typeof j&&Z;ae&&(se.position="sticky",se.left=B),le&&(se.position="sticky",se.right=j);var ce=null!==(t=null!==(n=null!==(i=null==re?void 0:re.colSpan)&&void 0!==i?i:Y.colSpan)&&void 0!==n?n:z)&&void 0!==t?t:1,ue=null!==(r=null!==(s=null!==(l=null==re?void 0:re.rowSpan)&&void 0!==l?l:Y.rowSpan)&&void 0!==s?s:F)&&void 0!==r?r:1,de=function(e,t){return m(E,(function(n){var o,i,r,s;return[(o=e,i=t||1,r=n.hoverStartRow,s=n.hoverEndRow,o<=s&&o+i-1>=r),n.onHover]}))}($,ue),he=(0,a.A)(de,2),pe=he[0],me=he[1],ge=(0,H._q)((function(e){var t;C&&me($,$+ue-1),null==Y||null===(t=Y.onMouseEnter)||void 0===t||t.call(Y,e)})),fe=(0,H._q)((function(e){var t;C&&me(-1,-1),null==Y||null===(t=Y.onMouseLeave)||void 0===t||t.call(Y,e)}));if(0===ce||0===ue)return null;var be=null!==(c=Y.title)&&void 0!==c?c:function(e){var t,n=e.ellipsis,i=e.rowType,r=e.children,s=!0===n?{showTitle:!0}:n;return s&&(s.showTitle||"header"===i)&&("string"==typeof r||"number"==typeof r?t=r.toString():o.isValidElement(r)&&"string"==typeof r.props.children&&(t=r.props.children)),t}({rowType:_,ellipsis:f,children:ie}),ve=M()(Q,w,(d={},(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)(d,"".concat(Q,"-fix-left"),ae&&Z),"".concat(Q,"-fix-left-first"),W&&Z),"".concat(Q,"-fix-left-last"),V&&Z),"".concat(Q,"-fix-left-all"),V&&ee&&Z),"".concat(Q,"-fix-right"),le&&Z),"".concat(Q,"-fix-right-first"),G&&Z),"".concat(Q,"-fix-right-last"),K&&Z),"".concat(Q,"-ellipsis"),f),"".concat(Q,"-with-append"),U),"".concat(Q,"-fix-sticky"),(ae||le)&&X&&Z),(0,k.A)(d,"".concat(Q,"-row-hover"),!re&&pe)),Y.className,null==re?void 0:re.className),we={};y&&(we.textAlign=y);var ye=(0,A.A)((0,A.A)((0,A.A)((0,A.A)({},null==re?void 0:re.style),se),we),Y.style),Ce=ie;return"object"!==(0,S.A)(Ce)||Array.isArray(Ce)||o.isValidElement(Ce)||(Ce=null),f&&(V||G)&&(Ce=o.createElement("span",{className:"".concat(Q,"-content")},Ce)),o.createElement(h,(0,g.A)({},re,Y,{className:ve,style:ye,title:be,scope:b,onMouseEnter:te?ge:void 0,onMouseLeave:te?fe:void 0,colSpan:1!==ce?ce:null,rowSpan:1!==ue?ue:null}),U,Ce)}const $=o.memo(L);function _(e,t,n,o,i){var r,s,a=n[e]||{},l=n[t]||{};"left"===a.fixed?r=o.left["rtl"===i?t:e]:"right"===l.fixed&&(s=o.right["rtl"===i?e:t]);var c=!1,u=!1,d=!1,h=!1,p=n[t+1],m=n[e-1],g=p&&!p.fixed||m&&!m.fixed||n.every((function(e){return"left"===e.fixed}));return"rtl"===i?void 0!==r?h=!(m&&"left"===m.fixed)&&g:void 0!==s&&(d=!(p&&"right"===p.fixed)&&g):void 0!==r?c=!(p&&"left"===p.fixed)&&g:void 0!==s&&(u=!(m&&"right"===m.fixed)&&g),{fixLeft:r,fixRight:s,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:h,isSticky:o.isSticky}}const z=o.createContext({});var F=n(80045),B=["children"];function j(e){return e.children}j.Row=function(e){var t=e.children,n=(0,F.A)(e,B);return o.createElement("tr",n,t)},j.Cell=function(e){var t=e.className,n=e.index,i=e.children,r=e.colSpan,s=void 0===r?1:r,a=e.rowSpan,l=e.align,c=m(E,["prefixCls","direction"]),u=c.prefixCls,d=c.direction,h=o.useContext(z),p=h.scrollColumnIndex,f=h.stickyOffsets,b=n+s-1+1===p?s+1:s,v=_(n,n+b-1,h.flattenColumns,f,d);return o.createElement($,(0,g.A)({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,align:l,colSpan:b,rowSpan:a,render:function(){return i}},v))};const W=j,V=C((function(e){var t=e.children,n=e.stickyOffsets,i=e.flattenColumns,r=m(E,"prefixCls"),s=i.length-1,a=i[s],l=o.useMemo((function(){return{stickyOffsets:n,flattenColumns:i,scrollColumnIndex:null!=a&&a.scrollbar?s:null}}),[a,i,s,n]);return o.createElement(z.Provider,{value:l},o.createElement("tfoot",{className:"".concat(r,"-summary")},t))}));var G=W,K=n(76288);function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return o.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(U(e)):(0,K.A)(e)&&e.props?n=n.concat(U(e.props.children,t)):n.push(e))})),n}var q=n(66588),Y=o.createContext(null),X=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n<o.length;n++){var i=o[n];e.call(t,i[1],i[0])}},t}()}(),Q="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,J=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Z="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(J):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},ee=["top","right","bottom","left","width","height","size","weight"],te="undefined"!=typeof MutationObserver,ne=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,o=0;function i(){t&&(t=!1,e()),n&&s()}function r(){Z(i)}function s(){var e=Date.now();if(t){if(e-o<2)return;n=!0}else t=!0,n=!1,setTimeout(r,20);o=e}return s}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Q&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),te?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Q&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;ee.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),oe=function(e,t){for(var n=0,o=Object.keys(t);n<o.length;n++){var i=o[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},ie=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||J},re=ue(0,0,0,0);function se(e){return parseFloat(e)||0}function ae(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+se(e["border-"+n+"-width"])}),0)}var le="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof ie(e).SVGGraphicsElement}:function(e){return e instanceof ie(e).SVGElement&&"function"==typeof e.getBBox};function ce(e){return Q?le(e)?function(e){var t=e.getBBox();return ue(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return re;var o=ie(e).getComputedStyle(e),i=function(e){for(var t={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var i=o[n],r=e["padding-"+i];t[i]=se(r)}return t}(o),r=i.left+i.right,s=i.top+i.bottom,a=se(o.width),l=se(o.height);if("border-box"===o.boxSizing&&(Math.round(a+r)!==t&&(a-=ae(o,"left","right")+r),Math.round(l+s)!==n&&(l-=ae(o,"top","bottom")+s)),!function(e){return e===ie(e).document.documentElement}(e)){var c=Math.round(a+r)-t,u=Math.round(l+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(u)&&(l-=u)}return ue(i.left,i.top,a,l)}(e):re}function ue(e,t,n,o){return{x:e,y:t,width:n,height:o}}var de=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ue(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=ce(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),he=function(e,t){var n,o,i,r,s,a,l,c=(o=(n=t).x,i=n.y,r=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),oe(l,{x:o,y:i,width:r,height:s,top:i,right:o+r,bottom:s+i,left:o}),l);oe(this,{target:e,contentRect:c})},pe=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new X,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof ie(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new de(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof ie(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new he(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),me="undefined"!=typeof WeakMap?new WeakMap:new X,ge=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=ne.getInstance(),o=new pe(t,n,this);me.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){ge.prototype[e]=function(){var t;return(t=me.get(this))[e].apply(t,arguments)}}));const fe=void 0!==J.ResizeObserver?J.ResizeObserver:ge;var be=new Map,ve=new fe((function(e){e.forEach((function(e){var t,n=e.target;null===(t=be.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))})),we=n(23029),ye=n(92901),Ce=n(85501),xe=n(49640),Ee=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(){return(0,we.A)(this,n),t.apply(this,arguments)}return(0,ye.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(o.Component);function Se(e,t){var n=e.children,i=e.disabled,r=o.useRef(null),s=o.useRef(null),a=o.useContext(Y),l="function"==typeof n,c=l?n(r):n,u=o.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!l&&o.isValidElement(c)&&(0,f.f3)(c),h=d?(0,f.A9)(c):null,p=(0,f.xK)(h,r),m=function(){var e;return(0,q.Ay)(r.current)||(r.current&&"object"===(0,S.A)(r.current)?(0,q.Ay)(null===(e=r.current)||void 0===e?void 0:e.nativeElement):null)||(0,q.Ay)(s.current)};o.useImperativeHandle(t,(function(){return m()}));var g=o.useRef(e);g.current=e;var b=o.useCallback((function(e){var t=g.current,n=t.onResize,o=t.data,i=e.getBoundingClientRect(),r=i.width,s=i.height,l=e.offsetWidth,c=e.offsetHeight,d=Math.floor(r),h=Math.floor(s);if(u.current.width!==d||u.current.height!==h||u.current.offsetWidth!==l||u.current.offsetHeight!==c){var p={width:d,height:h,offsetWidth:l,offsetHeight:c};u.current=p;var m=l===Math.round(r)?r:l,f=c===Math.round(s)?s:c,b=(0,A.A)((0,A.A)({},p),{},{offsetWidth:m,offsetHeight:f});null==a||a(b,e,o),n&&Promise.resolve().then((function(){n(b,e)}))}}),[]);return o.useEffect((function(){var e,t,n=m();return n&&!i&&(e=n,t=b,be.has(e)||(be.set(e,new Set),ve.observe(e)),be.get(e).add(t)),function(){return function(e,t){be.has(e)&&(be.get(e).delete(t),be.get(e).size||(ve.unobserve(e),be.delete(e)))}(n,b)}}),[r.current,i]),o.createElement(Ee,{ref:s},d?o.cloneElement(c,{ref:p}):c)}const Ae=o.forwardRef(Se);function ke(e,t){var n=e.children;return("function"==typeof n?[n]:U(n)).map((function(n,i){var r=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(i);return o.createElement(Ae,(0,g.A)({},e,{key:r,ref:0===i?t:void 0}),n)}))}var Re=o.forwardRef(ke);Re.Collection=function(e){var t=e.children,n=e.onBatchResize,i=o.useRef(0),r=o.useRef([]),s=o.useContext(Y),a=o.useCallback((function(e,t,o){i.current+=1;var a=i.current;r.current.push({size:e,element:t,data:o}),Promise.resolve().then((function(){a===i.current&&(null==n||n(r.current),r.current=[])})),null==s||s(e,t,o)}),[n,s]);return o.createElement(Y.Provider,{value:a},t)};const Me=Re;var Te=n(20998),Ie=function(e){if((0,Te.A)()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1};var Pe,Oe=n(34552);function De(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var o,i,r=n.style;if(r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll",e){var s=getComputedStyle(e);r.scrollbarColor=s.scrollbarColor,r.scrollbarWidth=s.scrollbarWidth;var a=getComputedStyle(e,"::-webkit-scrollbar"),l=parseInt(a.width,10),c=parseInt(a.height,10);try{var u=l?"width: ".concat(a.width,";"):"",d=c?"height: ".concat(a.height,";"):"";(0,Oe.BD)("\n#".concat(t,"::-webkit-scrollbar {\n").concat(u,"\n").concat(d,"\n}"),t)}catch(e){console.error(e),o=l,i=c}}document.body.appendChild(n);var h=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,p=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),(0,Oe.m6)(t),{width:h,height:p}}function Ne(e){return"undefined"==typeof document?0:((e||void 0===Pe)&&(Pe=De()),Pe.width)}function He(e){return"undefined"!=typeof document&&e&&e instanceof Element?De(e):{width:0,height:0}}var Le="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function $e(e,t){return 0===e.indexOf(t)}function _e(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:(0,A.A)({},n);var o={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||$e(n,"aria-"))||t.data&&$e(n,"data-")||t.attr&&Le.includes(n))&&(o[n]=e[n])})),o}function ze(e,t,n,o,i,r,s){var a=r(t,s);e.push({record:t,indent:n,index:s,rowKey:a});var l=null==i?void 0:i.has(a);if(t&&Array.isArray(t[o])&&l)for(var c=0;c<t[o].length;c+=1)ze(e,t[o][c],n+1,o,i,r,c)}function Fe(e,t,n,i){return o.useMemo((function(){if(null!=n&&n.size){for(var o=[],r=0;r<(null==e?void 0:e.length);r+=1)ze(o,e[r],0,t,n,i,r);return o}return null==e?void 0:e.map((function(e,t){return{record:e,indent:0,index:t,rowKey:i(e,t)}}))}),[e,t,n,i])}function Be(e,t,n,o){var i,r=m(E,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),s=r.flattenColumns,a=r.expandableType,l=r.expandedKeys,c=r.childrenColumnName,u=r.onTriggerExpand,d=r.rowExpandable,h=r.onRow,p=r.expandRowByClick,g=r.rowClassName,f="nest"===a,b="row"===a&&(!d||d(e)),v=b||f,w=l&&l.has(t),y=c&&e&&e[c],C=(0,H._q)(u),x=null==h?void 0:h(e,n),S=null==x?void 0:x.onClick;"string"==typeof g?i=g:"function"==typeof g&&(i=g(e,n,o));var k=D(s);return(0,A.A)((0,A.A)({},r),{},{columnsKey:k,nestExpandable:f,expanded:w,hasNestChildren:y,record:e,onTriggerExpand:C,rowSupportExpand:b,expandable:v,rowProps:(0,A.A)((0,A.A)({},x),{},{className:M()(i,null==x?void 0:x.className),onClick:function(t){p&&v&&u(e,t);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];null==S||S.apply(void 0,[t].concat(o))}})})}const je=function(e){var t=e.prefixCls,n=e.children,i=e.component,r=e.cellComponent,s=e.className,a=e.expanded,l=e.colSpan,c=e.isEmpty,u=e.stickyOffset,d=void 0===u?0:u,h=m(E,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),p=h.scrollbarSize,g=h.fixHeader,f=h.fixColumn,b=h.componentWidth,v=h.horizonScroll,w=n;return(c?v&&b:f)&&(w=o.createElement("div",{style:{width:b-d-(g&&!c?p:0),position:"sticky",left:d,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},w)),o.createElement(i,{className:s,style:{display:a?null:"none"}},o.createElement($,{component:r,prefixCls:t,colSpan:l},w))};function We(e){var t=e.prefixCls,n=e.record,i=e.onExpand,r=e.expanded,s=e.expandable,a="".concat(t,"-row-expand-icon");return s?o.createElement("span",{className:M()(a,(0,k.A)((0,k.A)({},"".concat(t,"-row-expanded"),r),"".concat(t,"-row-collapsed"),!r)),onClick:function(e){i(n,e),e.stopPropagation()}}):o.createElement("span",{className:M()(a,"".concat(t,"-row-spaced"))})}function Ve(e,t,n,o){return"string"==typeof e?e:"function"==typeof e?e(t,n,o):""}function Ge(e,t,n,i,r){var s,a,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=e.record,d=e.prefixCls,h=e.columnsKey,p=e.fixedInfoList,m=e.expandIconColumnIndex,g=e.nestExpandable,f=e.indentSize,b=e.expandIcon,v=e.expanded,w=e.hasNestChildren,y=e.onTriggerExpand,C=e.expandable,x=e.expandedKeys,E=h[n],S=p[n];n===(m||0)&&g&&(a=o.createElement(o.Fragment,null,o.createElement("span",{style:{paddingLeft:"".concat(f*i,"px")},className:"".concat(d,"-row-indent indent-level-").concat(i)}),b({prefixCls:d,expanded:v,expandable:w,record:u,onExpand:y})));var A=(null===(s=t.onCell)||void 0===s?void 0:s.call(t,u,r))||{};if(c){var k=A.rowSpan,R=void 0===k?1:k;if(C&&R&&n<c){for(var M=R,T=r;T<r+R;T+=1){var I=l[T];x.has(I)&&(M+=1)}A.rowSpan=M}}return{key:E,fixedInfo:S,appendCellNode:a,additionalCellProps:A}}const Ke=C((function(e){var t=e.className,n=e.style,i=e.record,r=e.index,s=e.renderIndex,a=e.rowKey,l=e.rowKeys,c=e.indent,u=void 0===c?0:c,d=e.rowComponent,h=e.cellComponent,p=e.scopeCellComponent,m=e.expandedRowInfo,f=Be(i,a,r,u),b=f.prefixCls,v=f.flattenColumns,w=f.expandedRowClassName,y=f.expandedRowRender,C=f.rowProps,x=f.expanded,E=f.rowSupportExpand,S=o.useRef(!1);S.current||(S.current=x);var R,T=Ve(w,i,r,u),I=o.createElement(d,(0,g.A)({},C,{"data-row-key":a,className:M()(t,"".concat(b,"-row"),"".concat(b,"-row-level-").concat(u),null==C?void 0:C.className,(0,k.A)({},T,u>=1)),style:(0,A.A)((0,A.A)({},n),null==C?void 0:C.style)}),v.map((function(e,t){var n=e.render,a=e.dataIndex,c=e.className,d=Ge(f,e,t,u,r,l,null==m?void 0:m.offset),v=d.key,w=d.fixedInfo,y=d.appendCellNode,C=d.additionalCellProps;return o.createElement($,(0,g.A)({className:c,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:h,prefixCls:b,key:v,record:i,index:r,renderIndex:s,dataIndex:a,render:n,shouldCellUpdate:e.shouldCellUpdate},w,{appendNode:y,additionalProps:C}))})));if(E&&(S.current||x)){var P=y(i,r,u+1,x);R=o.createElement(je,{expanded:x,className:M()("".concat(b,"-expanded-row"),"".concat(b,"-expanded-row-level-").concat(u+1),T),prefixCls:b,component:d,cellComponent:h,colSpan:m?m.colSpan:v.length,stickyOffset:null==m?void 0:m.sticky,isEmpty:!1},P)}return o.createElement(o.Fragment,null,I,R)}));function Ue(e){var t=e.columnKey,n=e.onColumnResize,i=o.useRef();return(0,c.A)((function(){i.current&&n(t,i.current.offsetWidth)}),[]),o.createElement(Me,{data:t},o.createElement("td",{ref:i,style:{padding:0,border:0,height:0}},o.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}const qe=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,o=t.height;if(n||o)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),r=i.width,s=i.height;if(r||s)return!0}}return!1};function Ye(e){var t=e.prefixCls,n=e.columnsKey,i=e.onColumnResize,r=o.useRef(null);return o.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},ref:r},o.createElement(Me.Collection,{onBatchResize:function(e){qe(r.current)&&e.forEach((function(e){var t=e.data,n=e.size;i(t,n.offsetWidth)}))}},n.map((function(e){return o.createElement(Ue,{key:e,columnKey:e,onColumnResize:i})}))))}const Xe=C((function(e){var t,n=e.data,i=e.measureColumnWidth,r=m(E,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),s=r.prefixCls,a=r.getComponent,l=r.onColumnResize,c=r.flattenColumns,u=r.getRowKey,d=r.expandedKeys,h=r.childrenColumnName,p=r.emptyNode,g=r.expandedRowOffset,f=void 0===g?0:g,b=r.colWidths,v=Fe(n,h,d,u),w=o.useMemo((function(){return v.map((function(e){return e.rowKey}))}),[v]),y=o.useRef({renderWithProps:!1}),C=o.useMemo((function(){for(var e=c.length-f,t=0,n=0;n<f;n+=1)t+=b[n]||0;return{offset:f,colSpan:e,sticky:t}}),[c.length,f,b]),x=a(["body","wrapper"],"tbody"),S=a(["body","row"],"tr"),A=a(["body","cell"],"td"),k=a(["body","cell"],"th");t=n.length?v.map((function(e,t){var n=e.record,i=e.indent,r=e.index,s=e.rowKey;return o.createElement(Ke,{key:s,rowKey:s,rowKeys:w,record:n,index:t,renderIndex:r,rowComponent:S,cellComponent:A,scopeCellComponent:k,indent:i,expandedRowInfo:C})})):o.createElement(je,{expanded:!0,className:"".concat(s,"-placeholder"),prefixCls:s,component:S,cellComponent:A,colSpan:c.length,isEmpty:!0},p);var R=D(c);return o.createElement(O.Provider,{value:y.current},o.createElement(x,{className:"".concat(s,"-tbody")},i&&o.createElement(Ye,{prefixCls:s,columnsKey:R,onColumnResize:l}),t))}));var Qe=["expandable"],Je="RC_TABLE_INTERNAL_COL_DEFINE",Ze=["columnType"];const et=function(e){for(var t=e.colWidths,n=e.columns,i=e.columCount,r=m(E,["tableLayout"]).tableLayout,s=[],a=!1,l=(i||n.length)-1;l>=0;l-=1){var c=t[l],u=n&&n[l],d=void 0,h=void 0;if(u&&(d=u[Je],"auto"===r&&(h=u.minWidth)),c||h||d||a){var p=d||{},f=(p.columnType,(0,F.A)(p,Ze));s.unshift(o.createElement("col",(0,g.A)({key:l,style:{width:c,minWidth:h}},f))),a=!0}}return o.createElement("colgroup",null,s)};var tt=n(60436),nt=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"],ot=o.forwardRef((function(e,t){var n=e.className,i=e.noData,r=e.columns,s=e.flattenColumns,a=e.colWidths,l=e.columCount,c=e.stickyOffsets,u=e.direction,d=e.fixHeader,h=e.stickyTopOffset,p=e.stickyBottomOffset,g=e.stickyClassName,b=e.onScroll,v=e.maxContentScroll,w=e.children,y=(0,F.A)(e,nt),C=m(E,["prefixCls","scrollbarSize","isSticky","getComponent"]),x=C.prefixCls,S=C.scrollbarSize,R=C.isSticky,T=(0,C.getComponent)(["header","table"],"table"),I=R&&!d?0:S,P=o.useRef(null),O=o.useCallback((function(e){(0,f.Xf)(t,e),(0,f.Xf)(P,e)}),[]);o.useEffect((function(){function e(e){var t=e,n=t.currentTarget,o=t.deltaX;o&&(b({currentTarget:n,scrollLeft:n.scrollLeft+o}),e.preventDefault())}var t=P.current;return null==t||t.addEventListener("wheel",e,{passive:!1}),function(){null==t||t.removeEventListener("wheel",e)}}),[]);var D=o.useMemo((function(){return s.every((function(e){return e.width}))}),[s]),N=s[s.length-1],H={fixed:N?N.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(x,"-cell-scrollbar")}}},L=(0,o.useMemo)((function(){return I?[].concat((0,tt.A)(r),[H]):r}),[I,r]),$=(0,o.useMemo)((function(){return I?[].concat((0,tt.A)(s),[H]):s}),[I,s]),_=(0,o.useMemo)((function(){var e=c.right,t=c.left;return(0,A.A)((0,A.A)({},c),{},{left:"rtl"===u?[].concat((0,tt.A)(t.map((function(e){return e+I}))),[0]):t,right:"rtl"===u?e:[].concat((0,tt.A)(e.map((function(e){return e+I}))),[0]),isSticky:R})}),[I,c,R]),z=function(e,t){return(0,o.useMemo)((function(){for(var n=[],o=0;o<t;o+=1){var i=e[o];if(void 0===i)return null;n[o]=i}return n}),[e.join("_"),t])}(a,l);return o.createElement("div",{style:(0,A.A)({overflow:"hidden"},R?{top:h,bottom:p}:{}),ref:O,className:M()(n,(0,k.A)({},g,!!g))},o.createElement(T,{style:{tableLayout:"fixed",visibility:i||z?null:"hidden"}},(!i||!v||D)&&o.createElement(et,{colWidths:z?[].concat((0,tt.A)(z),[I]):[],columCount:l+1,columns:$}),w((0,A.A)((0,A.A)({},y),{},{stickyOffsets:_,columns:L,flattenColumns:$}))))}));const it=o.memo(ot),rt=function(e){var t,n=e.cells,i=e.stickyOffsets,r=e.flattenColumns,s=e.rowComponent,a=e.cellComponent,l=e.onHeaderRow,c=e.index,u=m(E,["prefixCls","direction"]),d=u.prefixCls,h=u.direction;l&&(t=l(n.map((function(e){return e.column})),c));var p=D(n.map((function(e){return e.column})));return o.createElement(s,t,n.map((function(e,t){var n,s=e.column,l=_(e.colStart,e.colEnd,r,i,h);return s&&s.onHeaderCell&&(n=e.column.onHeaderCell(s)),o.createElement($,(0,g.A)({},e,{scope:s.title?e.colSpan>1?"colgroup":"col":null,ellipsis:s.ellipsis,align:s.align,component:a,prefixCls:d,key:p[t]},l,{additionalProps:n,rowType:"header"}))})))},st=C((function(e){var t=e.stickyOffsets,n=e.columns,i=e.flattenColumns,r=e.onHeaderRow,s=m(E,["prefixCls","getComponent"]),a=s.prefixCls,l=s.getComponent,c=o.useMemo((function(){return function(e){var t=[];!function e(n,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var r=o;return n.filter(Boolean).map((function(n){var o={key:n.key,className:n.className||"",children:n.title,column:n,colStart:r},s=1,a=n.children;return a&&a.length>0&&(s=e(a,r,i+1).reduce((function(e,t){return e+t}),0),o.hasSubColumns=!0),"colSpan"in n&&(s=n.colSpan),"rowSpan"in n&&(o.rowSpan=n.rowSpan),o.colSpan=s,o.colEnd=o.colStart+s-1,t[i].push(o),r+=s,s}))}(e,0);for(var n=t.length,o=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i<n;i+=1)o(i);return t}(n)}),[n]),u=l(["header","wrapper"],"thead"),d=l(["header","row"],"tr"),h=l(["header","cell"],"th");return o.createElement(u,{className:"".concat(a,"-thead")},c.map((function(e,n){return o.createElement(rt,{key:n,flattenColumns:i,cells:e,stickyOffsets:t,rowComponent:d,cellComponent:h,onHeaderRow:r,index:n})})))}));function at(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"==typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var lt=["children"],ct=["fixed"];function ut(e){return U(e).filter((function(e){return o.isValidElement(e)})).map((function(e){var t=e.key,n=e.props,o=n.children,i=(0,F.A)(n,lt),r=(0,A.A)({key:t},i);return o&&(r.children=ut(o)),r}))}function dt(e){return e.filter((function(e){return e&&"object"===(0,S.A)(e)&&!e.hidden})).map((function(e){var t=e.children;return t&&t.length>0?(0,A.A)((0,A.A)({},e),{},{children:dt(t)}):e}))}function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter((function(e){return e&&"object"===(0,S.A)(e)})).reduce((function(e,n,o){var i=n.fixed,r=!0===i?"left":i,s="".concat(t,"-").concat(o),a=n.children;return a&&a.length>0?[].concat((0,tt.A)(e),(0,tt.A)(ht(a,s).map((function(e){return(0,A.A)({fixed:r},e)})))):[].concat((0,tt.A)(e),[(0,A.A)((0,A.A)({key:s},n),{},{fixed:r})])}),[])}const pt=function(e,t){var n=e.prefixCls,i=e.columns,s=e.children,l=e.expandable,c=e.expandedKeys,u=e.columnTitle,d=e.getRowKey,h=e.onTriggerExpand,p=e.expandIcon,m=e.rowExpandable,g=e.expandIconColumnIndex,f=e.expandedRowOffset,b=void 0===f?0:f,v=e.direction,w=e.expandRowByClick,y=e.columnWidth,C=e.fixed,x=e.scrollWidth,E=e.clientWidth,S=o.useMemo((function(){return dt((i||ut(s)||[]).slice())}),[i,s]),R=o.useMemo((function(){if(l){var e=S.slice();if(!e.includes(r)){var t=g||0;t>=0&&(t||"left"===C||!C)&&e.splice(t,0,r),"right"===C&&e.splice(S.length,0,r)}var i=e.indexOf(r);e=e.filter((function(e,t){return e!==r||t===i}));var s,a=S[i];s=C||(a?a.fixed:null);var f=(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({},Je,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",u),"fixed",s),"className","".concat(n,"-row-expand-icon-cell")),"width",y),"render",(function(e,t,i){var r=d(t,i),s=c.has(r),a=!m||m(t),l=p({prefixCls:n,expanded:s,expandable:a,record:t,onExpand:h});return w?o.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l}));return e.map((function(e,t){var n=e===r?f:e;return t<b?(0,A.A)((0,A.A)({},n),{},{fixed:n.fixed||"left"}):n}))}return S.filter((function(e){return e!==r}))}),[l,S,d,c,p,v,b]),M=o.useMemo((function(){var e=R;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,R,v]),T=o.useMemo((function(){return"rtl"===v?function(e){return e.map((function(e){var t=e.fixed,n=(0,F.A)(e,ct),o=t;return"left"===t?o="right":"right"===t&&(o="left"),(0,A.A)({fixed:o},n)}))}(ht(M)):ht(M)}),[M,v,x]),I=o.useMemo((function(){for(var e=-1,t=T.length-1;t>=0;t-=1){var n=T[t].fixed;if("left"===n||!0===n){e=t;break}}if(e>=0)for(var o=0;o<=e;o+=1){var i=T[o].fixed;if("left"!==i&&!0!==i)return!0}var r=T.findIndex((function(e){return"right"===e.fixed}));if(r>=0)for(var s=r;s<T.length;s+=1)if("right"!==T[s].fixed)return!0;return!1}),[T]),P=function(e,t,n){return o.useMemo((function(){if(t&&t>0){var o=0,i=0;e.forEach((function(e){var n=at(t,e.width);n?o+=n:i+=1}));var r=Math.max(t,n),s=Math.max(r-o,i),a=i,l=s/i,c=0,u=e.map((function(e){var n=(0,A.A)({},e),o=at(t,n.width);if(o)n.width=o;else{var i=Math.floor(l);n.width=1===a?s:i,s-=i,a-=1}return c+=n.width,n}));if(c<r){var d=r/c;s=r,u.forEach((function(e,t){var n=Math.floor(e.width*d);e.width=t===u.length-1?s:n,s-=n}))}return[u,Math.max(c,r)]}return[e,t]}),[e,t,n])}(T,x,E),O=(0,a.A)(P,2),D=O[0],N=O[1];return[M,D,N,I]};var mt=(0,Te.A)()?window:null;const gt=function(e){var t=e.className,n=e.children;return o.createElement("div",{className:t},n)};function ft(e,t,n,o){var i=d.unstable_batchedUpdates?function(e){d.unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,i,o),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,i,o)}}}var bt=n(25371);function vt(e){var t=(0,q.rb)(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var wt=function(e,t){var n,i,r,s,l,c,u,d,h=e.scrollBodyRef,p=e.onScroll,g=e.offsetScroll,f=e.container,b=e.direction,v=m(E,"prefixCls"),w=(null===(n=h.current)||void 0===n?void 0:n.scrollWidth)||0,y=(null===(i=h.current)||void 0===i?void 0:i.clientWidth)||0,C=w&&y*(y/w),x=o.useRef(),S=(r={scrollLeft:0,isHiddenScrollBar:!0},s=(0,o.useRef)(r),l=(0,o.useState)({}),c=(0,a.A)(l,2)[1],u=(0,o.useRef)(null),d=(0,o.useRef)([]),(0,o.useEffect)((function(){return function(){u.current=null}}),[]),[s.current,function(e){d.current.push(e);var t=Promise.resolve();u.current=t,t.then((function(){if(u.current===t){var e=d.current,n=s.current;d.current=[],e.forEach((function(e){s.current=e(s.current)})),u.current=null,n!==s.current&&c({})}}))}]),R=(0,a.A)(S,2),T=R[0],I=R[1],P=o.useRef({delta:0,x:0}),O=o.useState(!1),D=(0,a.A)(O,2),N=D[0],H=D[1],L=o.useRef(null);o.useEffect((function(){return function(){bt.A.cancel(L.current)}}),[]);var $=function(){H(!1)},_=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(N&&0!==n){var o=P.current.x+e.pageX-P.current.x-P.current.delta,i="rtl"===b;o=Math.max(i?C-y:0,Math.min(i?0:y-C,o)),(!i||Math.abs(o)+Math.abs(C)<y)&&(p({scrollLeft:o/y*(w+2)}),P.current.x=e.pageX)}else N&&H(!1)},z=function(){bt.A.cancel(L.current),L.current=(0,bt.A)((function(){if(h.current){var e=vt(h.current).top,t=e+h.current.offsetHeight,n=f===window?document.documentElement.scrollTop+window.innerHeight:vt(f).top+f.clientHeight;t-Ne()<=n||e>=n-g?I((function(e){return(0,A.A)((0,A.A)({},e),{},{isHiddenScrollBar:!0})})):I((function(e){return(0,A.A)((0,A.A)({},e),{},{isHiddenScrollBar:!1})}))}}))},F=function(e){I((function(t){return(0,A.A)((0,A.A)({},t),{},{scrollLeft:e/w*y||0})}))};return o.useImperativeHandle(t,(function(){return{setScrollLeft:F,checkScrollBarVisible:z}})),o.useEffect((function(){var e=ft(document.body,"mouseup",$,!1),t=ft(document.body,"mousemove",_,!1);return z(),function(){e.remove(),t.remove()}}),[C,N]),o.useEffect((function(){if(h.current){for(var e=[],t=(0,q.rb)(h.current);t;)e.push(t),t=t.parentElement;return e.forEach((function(e){return e.addEventListener("scroll",z,!1)})),window.addEventListener("resize",z,!1),window.addEventListener("scroll",z,!1),f.addEventListener("scroll",z,!1),function(){e.forEach((function(e){return e.removeEventListener("scroll",z)})),window.removeEventListener("resize",z),window.removeEventListener("scroll",z),f.removeEventListener("scroll",z)}}}),[f]),o.useEffect((function(){T.isHiddenScrollBar||I((function(e){var t=h.current;return t?(0,A.A)((0,A.A)({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e}))}),[T.isHiddenScrollBar]),w<=y||!C||T.isHiddenScrollBar?null:o.createElement("div",{style:{height:Ne(),width:y,bottom:g},className:"".concat(v,"-sticky-scroll")},o.createElement("div",{onMouseDown:function(e){e.persist(),P.current.delta=e.pageX-T.scrollLeft,P.current.x=0,H(!0),e.preventDefault()},ref:x,className:M()("".concat(v,"-sticky-scroll-bar"),(0,k.A)({},"".concat(v,"-sticky-scroll-bar-active"),N)),style:{width:"".concat(C,"px"),transform:"translate3d(".concat(T.scrollLeft,"px, 0, 0)")}}))};const yt=o.forwardRef(wt);var Ct="rc-table",xt=[],Et={};function St(){return"No Data"}function At(e,t){var n=(0,A.A)({rowKey:"key",prefixCls:Ct,emptyText:St},e),i=n.prefixCls,r=n.className,d=n.rowClassName,h=n.style,p=n.data,m=n.rowKey,f=n.scroll,b=n.tableLayout,v=n.direction,w=n.title,y=n.footer,C=n.summary,x=n.caption,R=n.id,P=n.showHeader,O=n.components,H=n.emptyText,L=n.onRow,$=n.onHeaderRow,z=n.onScroll,B=n.internalHooks,j=n.transformColumns,G=n.internalRefs,K=n.tailor,U=n.getContainerWidth,Y=n.sticky,X=n.rowHoverable,Q=void 0===X||X,J=p||xt,Z=!!J.length,ee=B===s,te=o.useCallback((function(e,t){return(0,I.A)(O,e)||t}),[O]),ne=o.useMemo((function(){return"function"==typeof m?m:function(e){return e&&e[m]}}),[m]),oe=te(["body"]),ie=function(){var e=o.useState(-1),t=(0,a.A)(e,2),n=t[0],i=t[1],r=o.useState(-1),s=(0,a.A)(r,2),l=s[0],c=s[1];return[n,l,o.useCallback((function(e,t){i(e),c(t)}),[])]}(),re=(0,a.A)(ie,3),se=re[0],ae=re[1],le=re[2],ce=function(e,t,n){var i=function(e){var t,n=e.expandable,o=(0,F.A)(e,Qe);return!1===(t="expandable"in e?(0,A.A)((0,A.A)({},o),n):o).showExpandColumn&&(t.expandIconColumnIndex=-1),t}(e),r=i.expandIcon,l=i.expandedRowKeys,c=i.defaultExpandedRowKeys,u=i.defaultExpandAllRows,d=i.expandedRowRender,h=i.onExpand,p=i.onExpandedRowsChange,m=r||We,g=i.childrenColumnName||"children",f=o.useMemo((function(){return d?"row":!!(e.expandable&&e.internalHooks===s&&e.expandable.__PARENT_RENDER_ICON__||t.some((function(e){return e&&"object"===(0,S.A)(e)&&e[g]})))&&"nest"}),[!!d,t]),b=o.useState((function(){return c||(u?function(e,t,n){var o=[];return function e(i){(i||[]).forEach((function(i,r){o.push(t(i,r)),e(i[n])}))}(e),o}(t,n,g):[])})),v=(0,a.A)(b,2),w=v[0],y=v[1],C=o.useMemo((function(){return new Set(l||w||[])}),[l,w]),x=o.useCallback((function(e){var o,i=n(e,t.indexOf(e)),r=C.has(i);r?(C.delete(i),o=(0,tt.A)(C)):o=[].concat((0,tt.A)(C),[i]),y(o),h&&h(!r,e),p&&p(o)}),[n,C,t,h,p]);return[i,f,C,m,g,x]}(n,J,ne),ue=(0,a.A)(ce,6),de=ue[0],he=ue[1],pe=ue[2],me=ue[3],ge=ue[4],fe=ue[5],be=null==f?void 0:f.x,ve=o.useState(0),we=(0,a.A)(ve,2),ye=we[0],Ce=we[1],xe=pt((0,A.A)((0,A.A)((0,A.A)({},n),de),{},{expandable:!!de.expandedRowRender,columnTitle:de.columnTitle,expandedKeys:pe,getRowKey:ne,onTriggerExpand:fe,expandIcon:me,expandIconColumnIndex:de.expandIconColumnIndex,direction:v,scrollWidth:ee&&K&&"number"==typeof be?be:null,clientWidth:ye}),ee?j:null),Ee=(0,a.A)(xe,4),Se=Ee[0],Ae=Ee[1],ke=Ee[2],Re=Ee[3],Te=null!=ke?ke:be,Pe=o.useMemo((function(){return{columns:Se,flattenColumns:Ae}}),[Se,Ae]),Oe=o.useRef(),De=o.useRef(),Ne=o.useRef(),Le=o.useRef();o.useImperativeHandle(t,(function(){return{nativeElement:Oe.current,scrollTo:function(e){var t,n;if(Ne.current instanceof HTMLElement){var o=e.index,i=e.top,r=e.key;if("number"!=typeof(n=i)||Number.isNaN(n)){var s,a=null!=r?r:ne(J[o]);null===(s=Ne.current.querySelector('[data-row-key="'.concat(a,'"]')))||void 0===s||s.scrollIntoView()}else{var l;null===(l=Ne.current)||void 0===l||l.scrollTo({top:i})}}else null!==(t=Ne.current)&&void 0!==t&&t.scrollTo&&Ne.current.scrollTo(e)}}}));var $e,ze,Fe,Be=o.useRef(),je=o.useState(!1),Ve=(0,a.A)(je,2),Ge=Ve[0],Ke=Ve[1],Ue=o.useState(!1),qe=(0,a.A)(Ue,2),Ye=qe[0],Je=qe[1],Ze=o.useState(new Map),nt=(0,a.A)(Ze,2),ot=nt[0],rt=nt[1],at=D(Ae).map((function(e){return ot.get(e)})),lt=o.useMemo((function(){return at}),[at.join("_")]),ct=function(e,t,n){return(0,o.useMemo)((function(){var o=t.length,i=function(n,o,i){for(var r=[],s=0,a=n;a!==o;a+=i)r.push(s),t[a].fixed&&(s+=e[a]||0);return r},r=i(0,o,1),s=i(o-1,-1,-1).reverse();return"rtl"===n?{left:s,right:r}:{left:r,right:s}}),[e,t,n])}(lt,Ae,v),ut=f&&N(f.y),dt=f&&N(Te)||Boolean(de.fixed),ht=dt&&Ae.some((function(e){return e.fixed})),ft=o.useRef(),bt=function(e,t){var n="object"===(0,S.A)(e)?e:{},i=n.offsetHeader,r=void 0===i?0:i,s=n.offsetSummary,a=void 0===s?0:s,l=n.offsetScroll,c=void 0===l?0:l,u=n.getContainer,d=(void 0===u?function(){return mt}:u)()||mt,h=!!e;return o.useMemo((function(){return{isSticky:h,stickyClassName:h?"".concat(t,"-sticky-holder"):"",offsetHeader:r,offsetSummary:a,offsetScroll:c,container:d}}),[h,c,r,a,t,d])}(Y,i),vt=bt.isSticky,wt=bt.offsetHeader,At=bt.offsetSummary,kt=bt.offsetScroll,Rt=bt.stickyClassName,Mt=bt.container,Tt=o.useMemo((function(){return null==C?void 0:C(J)}),[C,J]),It=(ut||vt)&&o.isValidElement(Tt)&&Tt.type===W&&Tt.props.fixed;ut&&(ze={overflowY:Z?"scroll":"auto",maxHeight:f.y}),dt&&($e={overflowX:"auto"},ut||(ze={overflowY:"hidden"}),Fe={width:!0===Te?"auto":Te,minWidth:"100%"});var Pt=o.useCallback((function(e,t){rt((function(n){if(n.get(e)!==t){var o=new Map(n);return o.set(e,t),o}return n}))}),[]),Ot=function(){var e=(0,o.useRef)(null),t=(0,o.useRef)();function n(){window.clearTimeout(t.current)}return(0,o.useEffect)((function(){return n}),[]),[function(o){e.current=o,n(),t.current=window.setTimeout((function(){e.current=null,t.current=void 0}),100)},function(){return e.current}]}(),Dt=(0,a.A)(Ot,2),Nt=Dt[0],Ht=Dt[1];function Lt(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout((function(){t.scrollLeft=e}),0)))}var $t=(0,l.A)((function(e){var t,n=e.currentTarget,o=e.scrollLeft,i="rtl"===v,r="number"==typeof o?o:n.scrollLeft,s=n||Et;Ht()&&Ht()!==s||(Nt(s),Lt(r,De.current),Lt(r,Ne.current),Lt(r,Be.current),Lt(r,null===(t=ft.current)||void 0===t?void 0:t.setScrollLeft));var a=n||De.current;if(a){var l=ee&&K&&"number"==typeof Te?Te:a.scrollWidth,c=a.clientWidth;if(l===c)return Ke(!1),void Je(!1);i?(Ke(-r<l-c),Je(-r>0)):(Ke(r>0),Je(r<l-c))}})),_t=(0,l.A)((function(e){$t(e),null==z||z(e)})),zt=function(){var e;dt&&Ne.current?$t({currentTarget:(0,q.rb)(Ne.current),scrollLeft:null===(e=Ne.current)||void 0===e?void 0:e.scrollLeft}):(Ke(!1),Je(!1))},Ft=o.useRef(!1);o.useEffect((function(){Ft.current&&zt()}),[dt,p,Se.length]),o.useEffect((function(){Ft.current=!0}),[]);var Bt=o.useState(0),jt=(0,a.A)(Bt,2),Wt=jt[0],Vt=jt[1],Gt=o.useState(!0),Kt=(0,a.A)(Gt,2),Ut=Kt[0],qt=Kt[1];(0,c.A)((function(){var e,t;K&&ee||(Ne.current instanceof Element?Vt(He(Ne.current).width):Vt(He(Le.current).width)),qt((e="position",t="sticky",Array.isArray(e)||void 0===t?Ie(e):function(e,t){if(!Ie(e))return!1;var n=document.createElement("div"),o=n.style[e];return n.style[e]=t,n.style[e]!==o}(e,t)))}),[]),o.useEffect((function(){ee&&G&&(G.body.current=Ne.current)}));var Yt,Xt=o.useCallback((function(e){return o.createElement(o.Fragment,null,o.createElement(st,e),"top"===It&&o.createElement(V,e,Tt))}),[It,Tt]),Qt=o.useCallback((function(e){return o.createElement(V,e,Tt)}),[Tt]),Jt=te(["table"],"table"),Zt=o.useMemo((function(){return b||(ht?"max-content"===Te?"auto":"fixed":ut||vt||Ae.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[ut,ht,Ae,b,vt]),en={colWidths:lt,columCount:Ae.length,stickyOffsets:ct,onHeaderRow:$,fixHeader:ut,scroll:f},tn=o.useMemo((function(){return Z?null:"function"==typeof H?H():H}),[Z,H]),nn=o.createElement(Xe,{data:J,measureColumnWidth:ut||dt||vt}),on=o.createElement(et,{colWidths:Ae.map((function(e){return e.width})),columns:Ae}),rn=null!=x?o.createElement("caption",{className:"".concat(i,"-caption")},x):void 0,sn=_e(n,{data:!0}),an=_e(n,{aria:!0});if(ut||vt){var ln;"function"==typeof oe?(ln=oe(J,{scrollbarSize:Wt,ref:Ne,onScroll:$t}),en.colWidths=Ae.map((function(e,t){var n=e.width,o=t===Ae.length-1?n-Wt:n;return"number"!=typeof o||Number.isNaN(o)?0:o}))):ln=o.createElement("div",{style:(0,A.A)((0,A.A)({},$e),ze),onScroll:_t,ref:Ne,className:M()("".concat(i,"-body"))},o.createElement(Jt,(0,g.A)({style:(0,A.A)((0,A.A)({},Fe),{},{tableLayout:Zt})},an),rn,on,nn,!It&&Tt&&o.createElement(V,{stickyOffsets:ct,flattenColumns:Ae},Tt)));var cn=(0,A.A)((0,A.A)((0,A.A)({noData:!J.length,maxContentScroll:dt&&"max-content"===Te},en),Pe),{},{direction:v,stickyClassName:Rt,onScroll:$t});Yt=o.createElement(o.Fragment,null,!1!==P&&o.createElement(it,(0,g.A)({},cn,{stickyTopOffset:wt,className:"".concat(i,"-header"),ref:De}),Xt),ln,It&&"top"!==It&&o.createElement(it,(0,g.A)({},cn,{stickyBottomOffset:At,className:"".concat(i,"-summary"),ref:Be}),Qt),vt&&Ne.current&&Ne.current instanceof Element&&o.createElement(yt,{ref:ft,offsetScroll:kt,scrollBodyRef:Ne,onScroll:$t,container:Mt,direction:v}))}else Yt=o.createElement("div",{style:(0,A.A)((0,A.A)({},$e),ze),className:M()("".concat(i,"-content")),onScroll:$t,ref:Ne},o.createElement(Jt,(0,g.A)({style:(0,A.A)((0,A.A)({},Fe),{},{tableLayout:Zt})},an),rn,on,!1!==P&&o.createElement(st,(0,g.A)({},en,Pe)),nn,Tt&&o.createElement(V,{stickyOffsets:ct,flattenColumns:Ae},Tt)));var un=o.createElement("div",(0,g.A)({className:M()(i,r,(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({},"".concat(i,"-rtl"),"rtl"===v),"".concat(i,"-ping-left"),Ge),"".concat(i,"-ping-right"),Ye),"".concat(i,"-layout-fixed"),"fixed"===b),"".concat(i,"-fixed-header"),ut),"".concat(i,"-fixed-column"),ht),"".concat(i,"-fixed-column-gapped"),ht&&Re),"".concat(i,"-scroll-horizontal"),dt),"".concat(i,"-has-fix-left"),Ae[0]&&Ae[0].fixed),"".concat(i,"-has-fix-right"),Ae[Ae.length-1]&&"right"===Ae[Ae.length-1].fixed)),style:h,id:R,ref:Oe},sn),w&&o.createElement(gt,{className:"".concat(i,"-title")},w(J)),o.createElement("div",{ref:Le,className:"".concat(i,"-container")},Yt),y&&o.createElement(gt,{className:"".concat(i,"-footer")},y(J)));dt&&(un=o.createElement(Me,{onResize:function(e){var t,n=e.width;null===(t=ft.current)||void 0===t||t.checkScrollBarVisible();var o=Oe.current?Oe.current.offsetWidth:n;ee&&U&&Oe.current&&(o=U(Oe.current,o)||o),o!==ye&&(zt(),Ce(o))}},un));var dn=function(e,t,n){var o=e.map((function(o,i){return _(i,i,e,t,n)}));return(0,T.A)((function(){return o}),[o],(function(e,t){return!(0,u.A)(e,t)}))}(Ae,ct,v),hn=o.useMemo((function(){return{scrollX:Te,prefixCls:i,getComponent:te,scrollbarSize:Wt,direction:v,fixedInfoList:dn,isSticky:vt,supportSticky:Ut,componentWidth:ye,fixHeader:ut,fixColumn:ht,horizonScroll:dt,tableLayout:Zt,rowClassName:d,expandedRowClassName:de.expandedRowClassName,expandIcon:me,expandableType:he,expandRowByClick:de.expandRowByClick,expandedRowRender:de.expandedRowRender,expandedRowOffset:de.expandedRowOffset,onTriggerExpand:fe,expandIconColumnIndex:de.expandIconColumnIndex,indentSize:de.indentSize,allColumnsFixedLeft:Ae.every((function(e){return"left"===e.fixed})),emptyNode:tn,columns:Se,flattenColumns:Ae,onColumnResize:Pt,colWidths:lt,hoverStartRow:se,hoverEndRow:ae,onHover:le,rowExpandable:de.rowExpandable,onRow:L,getRowKey:ne,expandedKeys:pe,childrenColumnName:ge,rowHoverable:Q}}),[Te,i,te,Wt,v,dn,vt,Ut,ye,ut,ht,dt,Zt,d,de.expandedRowClassName,me,he,de.expandRowByClick,de.expandedRowRender,de.expandedRowOffset,fe,de.expandIconColumnIndex,de.indentSize,tn,Se,Ae,Pt,lt,se,ae,le,de.rowExpandable,L,ne,pe,ge,Q]);return o.createElement(E.Provider,{value:hn},un)}var kt=o.forwardRef(At);function Rt(e){return y(kt,e)}var Mt=Rt();Mt.EXPAND_COLUMN=r,Mt.INTERNAL_HOOKS=s,Mt.Column=function(e){return null},Mt.ColumnGroup=function(e){return null},Mt.Summary=G;const Tt=Mt;var It=o.forwardRef((function(e,t){var n=e.height,i=e.offsetY,r=e.offsetX,s=e.children,a=e.prefixCls,l=e.onInnerResize,c=e.innerProps,u=e.rtl,d=e.extra,h={},p={display:"flex",flexDirection:"column"};return void 0!==i&&(h={height:n,position:"relative",overflow:"hidden"},p=(0,A.A)((0,A.A)({},p),{},(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({transform:"translateY(".concat(i,"px)")},u?"marginRight":"marginLeft",-r),"position","absolute"),"left",0),"right",0),"top",0))),o.createElement("div",{style:h},o.createElement(Me,{onResize:function(e){e.offsetHeight&&l&&l()}},o.createElement("div",(0,g.A)({style:p,className:M()((0,k.A)({},"".concat(a,"-holder-inner"),a)),ref:t},c),s,d)))}));It.displayName="Filler";const Pt=It;function Ot(e){var t=e.children,n=e.setRef,i=o.useCallback((function(e){n(e)}),[]);return o.cloneElement(t,{ref:i})}const Dt="object"===("undefined"==typeof navigator?"undefined":(0,S.A)(navigator))&&/Firefox/i.test(navigator.userAgent),Nt=function(e,t,n,i){var r=(0,o.useRef)(!1),s=(0,o.useRef)(null),a=(0,o.useRef)({top:e,bottom:t,left:n,right:i});return a.current.top=e,a.current.bottom=t,a.current.left=n,a.current.right=i,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e?t<0&&a.current.left||t>0&&a.current.right:t<0&&a.current.top||t>0&&a.current.bottom;return n&&o?(clearTimeout(s.current),r.current=!1):o&&!r.current||(clearTimeout(s.current),r.current=!0,s.current=setTimeout((function(){r.current=!1}),50)),!r.current&&o}};const Ht=function(){function e(){(0,we.A)(this,e),(0,k.A)(this,"maps",void 0),(0,k.A)(this,"id",0),(0,k.A)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ye.A)(e,[{key:"set",value:function(e,t){this.diffRecords.set(e,this.maps[e]),this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e}();function Lt(e){var t=parseFloat(e);return isNaN(t)?0:t}var $t=14/15;function _t(e){return Math.floor(Math.pow(e,.5))}function zt(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}var Ft=o.forwardRef((function(e,t){var n=e.prefixCls,i=e.rtl,r=e.scrollOffset,s=e.scrollRange,l=e.onStartMove,c=e.onStopMove,u=e.onScroll,d=e.horizontal,h=e.spinSize,p=e.containerSize,m=e.style,g=e.thumbStyle,f=e.showScrollBar,b=o.useState(!1),v=(0,a.A)(b,2),w=v[0],y=v[1],C=o.useState(null),x=(0,a.A)(C,2),E=x[0],S=x[1],R=o.useState(null),T=(0,a.A)(R,2),I=T[0],P=T[1],O=!i,D=o.useRef(),N=o.useRef(),H=o.useState(f),L=(0,a.A)(H,2),$=L[0],_=L[1],z=o.useRef(),F=function(){!0!==f&&!1!==f&&(clearTimeout(z.current),_(!0),z.current=setTimeout((function(){_(!1)}),3e3))},B=s-p||0,j=p-h||0,W=o.useMemo((function(){return 0===r||0===B?0:r/B*j}),[r,B,j]),V=o.useRef({top:W,dragging:w,pageY:E,startTop:I});V.current={top:W,dragging:w,pageY:E,startTop:I};var G=function(e){y(!0),S(zt(e,d)),P(V.current.top),l(),e.stopPropagation(),e.preventDefault()};o.useEffect((function(){var e=function(e){e.preventDefault()},t=D.current,n=N.current;return t.addEventListener("touchstart",e,{passive:!1}),n.addEventListener("touchstart",G,{passive:!1}),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",G)}}),[]);var K=o.useRef();K.current=B;var U=o.useRef();U.current=j,o.useEffect((function(){if(w){var e,t=function(t){var n=V.current,o=n.dragging,i=n.pageY,r=n.startTop;bt.A.cancel(e);var s=D.current.getBoundingClientRect(),a=p/(d?s.width:s.height);if(o){var l=(zt(t,d)-i)*a,c=r;!O&&d?c-=l:c+=l;var h=K.current,m=U.current,g=m?c/m:0,f=Math.ceil(g*h);f=Math.max(f,0),f=Math.min(f,h),e=(0,bt.A)((function(){u(f,d)}))}},n=function(){y(!1),c()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),bt.A.cancel(e)}}}),[w]),o.useEffect((function(){return F(),function(){clearTimeout(z.current)}}),[r]),o.useImperativeHandle(t,(function(){return{delayHidden:F}}));var q="".concat(n,"-scrollbar"),Y={position:"absolute",visibility:$?null:"hidden"},X={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(Y,{height:8,left:0,right:0,bottom:0}),Object.assign(X,(0,k.A)({height:"100%",width:h},O?"left":"right",W))):(Object.assign(Y,(0,k.A)({width:8,top:0,bottom:0},O?"right":"left",0)),Object.assign(X,{width:"100%",height:h,top:W})),o.createElement("div",{ref:D,className:M()(q,(0,k.A)((0,k.A)((0,k.A)({},"".concat(q,"-horizontal"),d),"".concat(q,"-vertical"),!d),"".concat(q,"-visible"),$)),style:(0,A.A)((0,A.A)({},Y),m),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:F},o.createElement("div",{ref:N,className:M()("".concat(q,"-thumb"),(0,k.A)({},"".concat(q,"-thumb-moving"),w)),style:(0,A.A)((0,A.A)({},X),g),onMouseDown:G}))}));const Bt=Ft;function jt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*e;return isNaN(t)&&(t=0),t=Math.max(t,20),Math.floor(t)}var Wt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Vt=[],Gt={overflowY:"auto",overflowAnchor:"none"};function Kt(e,t){var n=e.prefixCls,i=void 0===n?"rc-virtual-list":n,r=e.className,s=e.height,l=e.itemHeight,u=e.fullHeight,h=void 0===u||u,p=e.style,m=e.data,f=e.children,b=e.itemKey,v=e.virtual,w=e.direction,y=e.scrollWidth,C=e.component,x=void 0===C?"div":C,E=e.onScroll,R=e.onVirtualScroll,T=e.onVisibleChange,I=e.innerProps,P=e.extraRender,O=e.styles,D=e.showScrollBar,N=void 0===D?"optional":D,L=(0,F.A)(e,Wt),$=o.useCallback((function(e){return"function"==typeof b?b(e):null==e?void 0:e[b]}),[b]),_=function(e){var t=o.useState(0),n=(0,a.A)(t,2),i=n[0],r=n[1],s=(0,o.useRef)(new Map),l=(0,o.useRef)(new Ht),c=(0,o.useRef)(0);function u(){c.current+=1}function d(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u();var t=function(){var e=!1;s.current.forEach((function(t,n){if(t&&t.offsetParent){var o=t.offsetHeight,i=getComputedStyle(t),r=i.marginTop,s=i.marginBottom,a=o+Lt(r)+Lt(s);l.current.get(n)!==a&&(l.current.set(n,a),e=!0)}})),e&&r((function(e){return e+1}))};if(e)t();else{c.current+=1;var n=c.current;Promise.resolve().then((function(){n===c.current&&t()}))}}return(0,o.useEffect)((function(){return u}),[]),[function(t,n){var o=e(t);s.current.get(o);n?(s.current.set(o,n),d()):s.current.delete(o)},d,l.current,i]}($),z=(0,a.A)(_,4),B=z[0],j=z[1],W=z[2],V=z[3],G=!(!1===v||!s||!l),K=o.useMemo((function(){return Object.values(W.maps).reduce((function(e,t){return e+t}),0)}),[W.id,W.maps]),U=G&&m&&(Math.max(l*m.length,K)>s||!!y),q="rtl"===w,Y=M()(i,(0,k.A)({},"".concat(i,"-rtl"),q),r),X=m||Vt,Q=(0,o.useRef)(),J=(0,o.useRef)(),Z=(0,o.useRef)(),ee=(0,o.useState)(0),te=(0,a.A)(ee,2),ne=te[0],oe=te[1],ie=(0,o.useState)(0),re=(0,a.A)(ie,2),se=re[0],ae=re[1],le=(0,o.useState)(!1),ce=(0,a.A)(le,2),ue=ce[0],de=ce[1],he=function(){de(!0)},pe=function(){de(!1)},me={getKey:$};function ge(e){oe((function(t){var n=function(e){var t=e;return Number.isNaN(He.current)||(t=Math.min(t,He.current)),t=Math.max(t,0)}("function"==typeof e?e(t):e);return Q.current.scrollTop=n,n}))}var fe=(0,o.useRef)({start:0,end:X.length}),be=(0,o.useRef)(),ve=function(e,t,n){var i=o.useState(e),r=(0,a.A)(i,2),s=r[0],l=r[1],c=o.useState(null),u=(0,a.A)(c,2),d=u[0],h=u[1];return o.useEffect((function(){var o=function(e,t,n){var o,i,r=e.length,s=t.length;if(0===r&&0===s)return null;r<s?(o=e,i=t):(o=t,i=e);var a={__EMPTY_ITEM__:!0};function l(e){return void 0!==e?n(e):a}for(var c=null,u=1!==Math.abs(r-s),d=0;d<i.length;d+=1){var h=l(o[d]);if(h!==l(i[d])){c=d,u=u||h!==l(i[d+1]);break}}return null===c?null:{index:c,multiple:u}}(s||[],e||[],t);void 0!==(null==o?void 0:o.index)&&(null==n||n(o.index),h(e[o.index])),l(e)}),[e]),[d]}(X,$),we=(0,a.A)(ve,1)[0];be.current=we;var ye=o.useMemo((function(){if(!G)return{scrollHeight:void 0,start:0,end:X.length-1,offset:void 0};var e;if(!U)return{scrollHeight:(null===(e=J.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:X.length-1,offset:void 0};for(var t,n,o,i=0,r=X.length,a=0;a<r;a+=1){var c=X[a],u=$(c),d=W.get(u),h=i+(void 0===d?l:d);h>=ne&&void 0===t&&(t=a,n=i),h>ne+s&&void 0===o&&(o=a),i=h}return void 0===t&&(t=0,n=0,o=Math.ceil(s/l)),void 0===o&&(o=X.length-1),{scrollHeight:i,start:t,end:o=Math.min(o+1,X.length-1),offset:n}}),[U,G,ne,X,V,s]),Ce=ye.scrollHeight,xe=ye.start,Ee=ye.end,Se=ye.offset;fe.current.start=xe,fe.current.end=Ee,o.useLayoutEffect((function(){var e=W.getRecord();if(1===e.size){var t=Array.from(e.keys())[0],n=e.get(t),o=X[xe];if(o&&void 0===n&&$(o)===t){var i=W.get(t)-l;ge((function(e){return e+i}))}}W.resetRecord()}),[Ce]);var Ae=o.useState({width:0,height:s}),ke=(0,a.A)(Ae,2),Re=ke[0],Te=ke[1],Ie=(0,o.useRef)(),Pe=(0,o.useRef)(),Oe=o.useMemo((function(){return jt(Re.width,y)}),[Re.width,y]),De=o.useMemo((function(){return jt(Re.height,Ce)}),[Re.height,Ce]),Ne=Ce-s,He=(0,o.useRef)(Ne);He.current=Ne;var Le=ne<=0,$e=ne>=Ne,_e=se<=0,ze=se>=y,Fe=Nt(Le,$e,_e,ze),Be=function(){return{x:q?-se:se,y:ne}},je=(0,o.useRef)(Be()),We=(0,H._q)((function(e){if(R){var t=(0,A.A)((0,A.A)({},Be()),e);je.current.x===t.x&&je.current.y===t.y||(R(t),je.current=t)}}));function Ve(e,t){var n=e;t?((0,d.flushSync)((function(){ae(n)})),We()):ge(n)}var Ge=function(e){var t=e,n=y?y-Re.width:0;return t=Math.max(t,0),Math.min(t,n)},Ke=(0,H._q)((function(e,t){t?((0,d.flushSync)((function(){ae((function(t){return Ge(t+(q?-e:e))}))})),We()):ge((function(t){return t+e}))})),Ue=function(e,t,n,i,r,s,a){var l=(0,o.useRef)(0),c=(0,o.useRef)(null),u=(0,o.useRef)(null),d=(0,o.useRef)(!1),h=Nt(t,n,i,r),p=(0,o.useRef)(null),m=(0,o.useRef)(null);return[function(t){if(e){bt.A.cancel(m.current),m.current=(0,bt.A)((function(){p.current=null}),2);var n=t.deltaX,o=t.deltaY,i=t.shiftKey,r=n,g=o;("sx"===p.current||!p.current&&i&&o&&!n)&&(r=o,g=0,p.current="sx");var f=Math.abs(r),b=Math.abs(g);null===p.current&&(p.current=s&&f>b?"x":"y"),"y"===p.current?function(e,t){if(bt.A.cancel(c.current),!h(!1,t)){var n=e;n._virtualHandled||(n._virtualHandled=!0,l.current+=t,u.current=t,Dt||n.preventDefault(),c.current=(0,bt.A)((function(){var e=d.current?10:1;a(l.current*e,!1),l.current=0})))}}(t,g):function(e,t){a(t,!0),Dt||e.preventDefault()}(t,r)}},function(t){e&&(d.current=t.detail===u.current)}]}(G,Le,$e,_e,ze,!!y,Ke),qe=(0,a.A)(Ue,2),Ye=qe[0],Xe=qe[1];!function(e,t,n){var i,r=(0,o.useRef)(!1),s=(0,o.useRef)(0),a=(0,o.useRef)(0),l=(0,o.useRef)(null),u=(0,o.useRef)(null),d=function(e){if(r.current){var t=Math.ceil(e.touches[0].pageX),o=Math.ceil(e.touches[0].pageY),i=s.current-t,l=a.current-o,c=Math.abs(i)>Math.abs(l);c?s.current=t:a.current=o;var d=n(c,c?i:l,!1,e);d&&e.preventDefault(),clearInterval(u.current),d&&(u.current=setInterval((function(){c?i*=$t:l*=$t;var e=Math.floor(c?i:l);(!n(c,e,!0)||Math.abs(e)<=.1)&&clearInterval(u.current)}),16))}},h=function(){r.current=!1,i()},p=function(e){i(),1!==e.touches.length||r.current||(r.current=!0,s.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),l.current=e.target,l.current.addEventListener("touchmove",d,{passive:!1}),l.current.addEventListener("touchend",h,{passive:!0}))};i=function(){l.current&&(l.current.removeEventListener("touchmove",d),l.current.removeEventListener("touchend",h))},(0,c.A)((function(){return e&&t.current.addEventListener("touchstart",p,{passive:!0}),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",p),i(),clearInterval(u.current)}}),[e])}(G,Q,(function(e,t,n,o){var i=o;return!(Fe(e,t,n)||i&&i._virtualHandled||(i&&(i._virtualHandled=!0),Ye({preventDefault:function(){},deltaX:e?t:0,deltaY:e?0:t}),0))})),function(e,t){o.useEffect((function(){var n=t.current;if(e&&n){var o,i,r=!1,s=function(){bt.A.cancel(o)},a=function e(){s(),o=(0,bt.A)((function(){var t;t=i,ge((function(e){return e+t})),e()}))},l=function(e){if(!e.target.draggable&&0===e.button){var t=e;t._virtualHandled||(t._virtualHandled=!0,r=!0)}},c=function(){r=!1,s()},u=function(e){if(r){var t=zt(e,!1),o=n.getBoundingClientRect(),l=o.top,c=o.bottom;t<=l?(i=-_t(l-t),a()):t>=c?(i=_t(t-c),a()):s()}};return n.addEventListener("mousedown",l),n.ownerDocument.addEventListener("mouseup",c),n.ownerDocument.addEventListener("mousemove",u),function(){n.removeEventListener("mousedown",l),n.ownerDocument.removeEventListener("mouseup",c),n.ownerDocument.removeEventListener("mousemove",u),s()}}}),[e])}(U,Q),(0,c.A)((function(){function e(e){var t=Le&&e.detail<0,n=$e&&e.detail>0;!G||t||n||e.preventDefault()}var t=Q.current;return t.addEventListener("wheel",Ye,{passive:!1}),t.addEventListener("DOMMouseScroll",Xe,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",Ye),t.removeEventListener("DOMMouseScroll",Xe),t.removeEventListener("MozMousePixelScroll",e)}}),[G,Le,$e]),(0,c.A)((function(){if(y){var e=Ge(se);ae(e),We({x:e})}}),[Re.width,y]);var Qe=function(){var e,t;null===(e=Ie.current)||void 0===e||e.delayHidden(),null===(t=Pe.current)||void 0===t||t.delayHidden()},Je=function(e,t,n,i,r,s,l,u){var d=o.useRef(),h=o.useState(null),p=(0,a.A)(h,2),m=p[0],g=p[1];return(0,c.A)((function(){if(m&&m.times<10){if(!e.current)return void g((function(e){return(0,A.A)({},e)}));s();var o=m.targetAlign,a=m.originAlign,c=m.index,u=m.offset,d=e.current.clientHeight,h=!1,p=o,f=null;if(d){for(var b=o||a,v=0,w=0,y=0,C=Math.min(t.length-1,c),x=0;x<=C;x+=1){var E=r(t[x]);w=v;var S=n.get(E);v=y=w+(void 0===S?i:S)}for(var k="top"===b?u:d-u,R=C;R>=0;R-=1){var M=r(t[R]),T=n.get(M);if(void 0===T){h=!0;break}if((k-=T)<=0)break}switch(b){case"top":f=w-u;break;case"bottom":f=y-d+u;break;default:var I=e.current.scrollTop;w<I?p="top":y>I+d&&(p="bottom")}null!==f&&l(f),f!==m.lastTop&&(h=!0)}h&&g((0,A.A)((0,A.A)({},m),{},{times:m.times+1,targetAlign:p,lastTop:f}))}}),[m,e.current]),function(e){if(null!=e){if(bt.A.cancel(d.current),"number"==typeof e)l(e);else if(e&&"object"===(0,S.A)(e)){var n,o=e.align;n="index"in e?e.index:t.findIndex((function(t){return r(t)===e.key}));var i=e.offset;g({times:0,index:n,offset:void 0===i?0:i,originAlign:o})}}else u()}}(Q,X,W,l,$,(function(){return j(!0)}),ge,Qe);o.useImperativeHandle(t,(function(){return{nativeElement:Z.current,getScrollInfo:Be,scrollTo:function(e){var t;(t=e)&&"object"===(0,S.A)(t)&&("left"in t||"top"in t)?(void 0!==e.left&&ae(Ge(e.left)),Je(e.top)):Je(e)}}})),(0,c.A)((function(){if(T){var e=X.slice(xe,Ee+1);T(e,X)}}),[xe,Ee,X]);var Ze=function(e,t,n,i){var r=o.useMemo((function(){return[new Map,[]]}),[e,n.id,i]),s=(0,a.A)(r,2),l=s[0],c=s[1];return function(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,s=l.get(o),a=l.get(r);if(void 0===s||void 0===a)for(var u=e.length,d=c.length;d<u;d+=1){var h,p=e[d],m=t(p);l.set(m,d);var g=null!==(h=n.get(m))&&void 0!==h?h:i;if(c[d]=(c[d-1]||0)+g,m===o&&(s=d),m===r&&(a=d),void 0!==s&&void 0!==a)break}return{top:c[s-1]||0,bottom:c[a]}}}(X,$,W,l),et=null==P?void 0:P({start:xe,end:Ee,virtual:U,offsetX:se,offsetY:Se,rtl:q,getSize:Ze}),tt=function(e,t,n,i,r,s,a,l){var c=l.getKey;return e.slice(t,n+1).map((function(e,n){var l=a(e,t+n,{style:{width:i},offsetX:r}),u=c(e);return o.createElement(Ot,{key:u,setRef:function(t){return s(e,t)}},l)}))}(X,xe,Ee,y,se,B,f,me),nt=null;s&&(nt=(0,A.A)((0,k.A)({},h?"height":"maxHeight",s),Gt),G&&(nt.overflowY="hidden",y&&(nt.overflowX="hidden"),ue&&(nt.pointerEvents="none")));var ot={};return q&&(ot.dir="rtl"),o.createElement("div",(0,g.A)({ref:Z,style:(0,A.A)((0,A.A)({},p),{},{position:"relative"}),className:Y},ot,L),o.createElement(Me,{onResize:function(e){Te({width:e.offsetWidth,height:e.offsetHeight})}},o.createElement(x,{className:"".concat(i,"-holder"),style:nt,ref:Q,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==ne&&ge(t),null==E||E(e),We()},onMouseEnter:Qe},o.createElement(Pt,{prefixCls:i,height:Ce,offsetX:se,offsetY:Se,scrollWidth:y,onInnerResize:j,ref:J,innerProps:I,rtl:q,extra:et},tt))),U&&Ce>s&&o.createElement(Bt,{ref:Ie,prefixCls:i,scrollOffset:ne,scrollRange:Ce,rtl:q,onScroll:Ve,onStartMove:he,onStopMove:pe,spinSize:De,containerSize:Re.height,style:null==O?void 0:O.verticalScrollBar,thumbStyle:null==O?void 0:O.verticalScrollBarThumb,showScrollBar:N}),U&&y>Re.width&&o.createElement(Bt,{ref:Pe,prefixCls:i,scrollOffset:se,scrollRange:y,rtl:q,onScroll:Ve,onStartMove:he,onStopMove:pe,spinSize:Oe,containerSize:Re.width,horizontal:!0,style:null==O?void 0:O.horizontalScrollBar,thumbStyle:null==O?void 0:O.horizontalScrollBarThumb,showScrollBar:N}))}var Ut=o.forwardRef(Kt);Ut.displayName="List";const qt=Ut;var Yt=p(null),Xt=p(null);const Qt=function(e){var t=e.rowInfo,n=e.column,i=e.colIndex,r=e.indent,s=e.index,a=e.component,l=e.renderIndex,c=e.record,u=e.style,d=e.className,h=e.inverse,p=e.getHeight,f=n.render,b=n.dataIndex,v=n.className,w=n.width,y=m(Xt,["columnsOffset"]).columnsOffset,C=Ge(t,n,i,r,s),x=C.key,E=C.fixedInfo,S=C.appendCellNode,k=C.additionalCellProps,R=k.style,T=k.colSpan,I=void 0===T?1:T,P=k.rowSpan,O=void 0===P?1:P,D=function(e,t,n){return n[e+(t||1)]-(n[e]||0)}(i-1,I,y),N=I>1?w-D:0,H=(0,A.A)((0,A.A)((0,A.A)({},R),u),{},{flex:"0 0 ".concat(D,"px"),width:"".concat(D,"px"),marginRight:N,pointerEvents:"auto"}),L=o.useMemo((function(){return h?O<=1:0===I||0===O||O>1}),[O,I,h]);L?H.visibility="hidden":h&&(H.height=null==p?void 0:p(O));var _=L?function(){return null}:f,z={};return 0!==O&&0!==I||(z.rowSpan=1,z.colSpan=1),o.createElement($,(0,g.A)({className:M()(v,d),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:a,prefixCls:t.prefixCls,key:x,record:c,index:s,renderIndex:l,dataIndex:b,render:_,shouldCellUpdate:n.shouldCellUpdate},E,{appendNode:S,additionalProps:(0,A.A)((0,A.A)({},k),{},{style:H},z)}))};var Jt=["data","index","className","rowKey","style","extra","getHeight"],Zt=o.forwardRef((function(e,t){var n,i=e.data,r=e.index,s=e.className,a=e.rowKey,l=e.style,c=e.extra,u=e.getHeight,d=(0,F.A)(e,Jt),h=i.record,p=i.indent,f=i.index,b=m(E,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),v=b.scrollX,w=b.flattenColumns,y=b.prefixCls,C=b.fixColumn,x=b.componentWidth,S=m(Yt,["getComponent"]).getComponent,R=Be(h,a,r,p),T=S(["body","row"],"div"),I=S(["body","cell"],"div"),P=R.rowSupportExpand,O=R.expanded,D=R.rowProps,N=R.expandedRowRender,H=R.expandedRowClassName;if(P&&O){var L=N(h,r,p+1,O),_=Ve(H,h,r,p),z={};C&&(z={style:(0,k.A)({},"--virtual-width","".concat(x,"px"))});var B="".concat(y,"-expanded-row-cell");n=o.createElement(T,{className:M()("".concat(y,"-expanded-row"),"".concat(y,"-expanded-row-level-").concat(p+1),_)},o.createElement($,{component:I,prefixCls:y,className:M()(B,(0,k.A)({},"".concat(B,"-fixed"),C)),additionalProps:z},L))}var j=(0,A.A)((0,A.A)({},l),{},{width:v});c&&(j.position="absolute",j.pointerEvents="none");var W=o.createElement(T,(0,g.A)({},D,d,{"data-row-key":a,ref:P?null:t,className:M()(s,"".concat(y,"-row"),null==D?void 0:D.className,(0,k.A)({},"".concat(y,"-row-extra"),c)),style:(0,A.A)((0,A.A)({},j),null==D?void 0:D.style)}),w.map((function(e,t){return o.createElement(Qt,{key:t,component:I,rowInfo:R,column:e,colIndex:t,indent:p,index:r,renderIndex:f,record:h,inverse:c,getHeight:u})})));return P?o.createElement("div",{ref:t},W,n):W}));const en=C(Zt);var tn=o.forwardRef((function(e,t){var n=e.data,i=e.onScroll,r=m(E,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),s=r.flattenColumns,l=r.onColumnResize,c=r.getRowKey,u=r.expandedKeys,d=r.prefixCls,h=r.childrenColumnName,p=r.scrollX,g=r.direction,f=m(Yt),b=f.sticky,v=f.scrollY,w=f.listItemHeight,y=f.getComponent,C=f.onScroll,x=o.useRef(),A=Fe(n,h,u,c),k=o.useMemo((function(){var e=0;return s.map((function(t){var n=t.width;return[t.key,n,e+=n]}))}),[s]),R=o.useMemo((function(){return k.map((function(e){return e[2]}))}),[k]);o.useEffect((function(){k.forEach((function(e){var t=(0,a.A)(e,2),n=t[0],o=t[1];l(n,o)}))}),[k]),o.useImperativeHandle(t,(function(){var e,t={scrollTo:function(e){var t;null===(t=x.current)||void 0===t||t.scrollTo(e)},nativeElement:null===(e=x.current)||void 0===e?void 0:e.nativeElement};return Object.defineProperty(t,"scrollLeft",{get:function(){var e;return(null===(e=x.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=x.current)||void 0===t||t.scrollTo({left:e})}}),t}));var M=function(e,t){var n,o=null===(n=A[t])||void 0===n?void 0:n.record,i=e.onCell;if(i){var r,s=i(o,t);return null!==(r=null==s?void 0:s.rowSpan)&&void 0!==r?r:1}return 1},T=o.useMemo((function(){return{columnsOffset:R}}),[R]),I="".concat(d,"-tbody"),P=y(["body","wrapper"]),O={};return b&&(O.position="sticky",O.bottom=0,"object"===(0,S.A)(b)&&b.offsetScroll&&(O.bottom=b.offsetScroll)),o.createElement(Xt.Provider,{value:T},o.createElement(qt,{fullHeight:!1,ref:x,prefixCls:"".concat(I,"-virtual"),styles:{horizontalScrollBar:O},className:I,height:v,itemHeight:w||24,data:A,itemKey:function(e){return c(e.record)},component:P,scrollWidth:p,direction:g,onVirtualScroll:function(e){var t,n=e.x;i({currentTarget:null===(t=x.current)||void 0===t?void 0:t.nativeElement,scrollLeft:n})},onScroll:C,extraRender:function(e){var t=e.start,n=e.end,i=e.getSize,r=e.offsetY;if(n<0)return null;for(var a=s.filter((function(e){return 0===M(e,t)})),l=t,u=function(e){if(!(a=a.filter((function(t){return 0===M(t,e)}))).length)return l=e,1},d=t;d>=0&&!u(d);d-=1);for(var h=s.filter((function(e){return 1!==M(e,n)})),p=n,m=function(e){if(!(h=h.filter((function(t){return 1!==M(t,e)}))).length)return p=Math.max(e-1,n),1},g=n;g<A.length&&!m(g);g+=1);for(var f=[],b=function(e){if(!A[e])return 1;s.some((function(t){return M(t,e)>1}))&&f.push(e)},v=l;v<=p;v+=1)b(v);return f.map((function(e){var t=A[e],n=c(t.record,e),s=i(n);return o.createElement(en,{key:e,data:t,rowKey:n,index:e,style:{top:-r+s.top},extra:!0,getHeight:function(t){var o=e+t-1,r=c(A[o].record,o),s=i(n,r);return s.bottom-s.top}})}))}},(function(e,t,n){var i=c(e.record,t);return o.createElement(en,{data:e,rowKey:i,index:t,style:n.style})})))}));const nn=C(tn);var on=function(e,t){var n=t.ref,i=t.onScroll;return o.createElement(nn,{ref:n,data:e,onScroll:i})};function rn(e,t){var n=e.data,i=e.columns,r=e.scroll,a=e.sticky,l=e.prefixCls,c=void 0===l?Ct:l,u=e.className,d=e.listItemHeight,h=e.components,p=e.onScroll,m=r||{},f=m.x,b=m.y;"number"!=typeof f&&(f=1),"number"!=typeof b&&(b=500);var v=(0,H._q)((function(e,t){return(0,I.A)(h,e)||t})),w=(0,H._q)(p),y=o.useMemo((function(){return{sticky:a,scrollY:b,listItemHeight:d,getComponent:v,onScroll:w}}),[a,b,d,v,w]);return o.createElement(Yt.Provider,{value:y},o.createElement(Tt,(0,g.A)({},e,{className:M()(u,"".concat(c,"-virtual")),scroll:(0,A.A)((0,A.A)({},r),{},{x:f}),components:(0,A.A)((0,A.A)({},h),{},{body:null!=n&&n.length?on:void 0}),columns:i,internalHooks:s,tailor:!0,ref:t})))}var sn=o.forwardRef(rn);function an(e){return y(sn,e)}an();const ln={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var cn=n(45748),un=n(61053);function dn(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function hn(e){return function(e){return dn(e)instanceof ShadowRoot}(e)?dn(e):null}function pn(e){return"object"===(0,S.A)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,S.A)(e.icon)||"function"==typeof e.icon)}function mn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var o,i=e[n];return"class"===n?(t.className=i,delete t.class):(delete t[n],t[(o=n,o.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=i),t}),{})}function gn(e,t,n){return n?o.createElement(e.tag,(0,A.A)((0,A.A)({key:t},mn(e.attrs)),n),(e.children||[]).map((function(n,o){return gn(n,"".concat(t,"-").concat(e.tag,"-").concat(o))}))):o.createElement(e.tag,(0,A.A)({key:t},mn(e.attrs)),(e.children||[]).map((function(n,o){return gn(n,"".concat(t,"-").concat(e.tag,"-").concat(o))})))}function fn(e){return(0,cn.cM)(e)[0]}function bn(e){return e?Array.isArray(e)?e:[e]:[]}var vn=["icon","className","onClick","style","primaryColor","secondaryColor"],wn={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},yn=function(e){var t,n,i,r,s,a,l,c,u=e.icon,d=e.className,h=e.onClick,p=e.style,m=e.primaryColor,g=e.secondaryColor,f=(0,F.A)(e,vn),b=o.useRef(),v=wn;if(m&&(v={primaryColor:m,secondaryColor:g||fn(m)}),t=b,n=(0,o.useContext)(un.A),i=n.csp,r=n.prefixCls,s=n.layer,a="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",r&&(a=a.replace(/anticon/g,r)),s&&(a="@layer ".concat(s," {\n").concat(a,"\n}")),(0,o.useEffect)((function(){var e=hn(t.current);(0,Oe.BD)(a,"@ant-design-icons",{prepend:!s,csp:i,attachTo:e})}),[]),l=pn(u),c="icon should be icon definiton, but got ".concat(u),(0,P.Ay)(l,"[@ant-design/icons] ".concat(c)),!pn(u))return null;var w=u;return w&&"function"==typeof w.icon&&(w=(0,A.A)((0,A.A)({},w),{},{icon:w.icon(v.primaryColor,v.secondaryColor)})),gn(w.icon,"svg-".concat(w.name),(0,A.A)((0,A.A)({className:d,onClick:h,style:p,"data-icon":w.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f),{},{ref:b}))};yn.displayName="IconReact",yn.getTwoToneColors=function(){return(0,A.A)({},wn)},yn.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;wn.primaryColor=t,wn.secondaryColor=n||fn(t),wn.calculated=!!n};const Cn=yn;function xn(e){var t=bn(e),n=(0,a.A)(t,2),o=n[0],i=n[1];return Cn.setTwoToneColors({primaryColor:o,secondaryColor:i})}var En=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];xn(cn.z1.primary);var Sn=o.forwardRef((function(e,t){var n=e.className,i=e.icon,r=e.spin,s=e.rotate,l=e.tabIndex,c=e.onClick,u=e.twoToneColor,d=(0,F.A)(e,En),h=o.useContext(un.A),p=h.prefixCls,m=void 0===p?"anticon":p,f=h.rootClassName,b=M()(f,m,(0,k.A)((0,k.A)({},"".concat(m,"-").concat(i.name),!!i.name),"".concat(m,"-spin"),!!r||"loading"===i.name),n),v=l;void 0===v&&c&&(v=-1);var w=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,y=bn(u),C=(0,a.A)(y,2),x=C[0],E=C[1];return o.createElement("span",(0,g.A)({role:"img","aria-label":i.name},d,{ref:t,tabIndex:v,onClick:c,className:b}),o.createElement(Cn,{icon:i,primaryColor:x,secondaryColor:E,style:w}))}));Sn.displayName="AntdIcon",Sn.getTwoToneColor=function(){var e=Cn.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},Sn.setTwoToneColor=xn;const An=Sn;var kn=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:ln}))};const Rn=o.forwardRef(kn);var Mn=o.createContext(null),Tn=o.createContext({}),In=function(e){for(var t=e.prefixCls,n=e.level,i=e.isStart,r=e.isEnd,s="".concat(t,"-indent-unit"),a=[],l=0;l<n;l+=1)a.push(o.createElement("span",{key:l,className:M()(s,(0,k.A)((0,k.A)({},"".concat(s,"-start"),i[l]),"".concat(s,"-end"),r[l]))}));return o.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},a)};const Pn=o.memo(In);function On(e,t){return e[t]}function Dn(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}var Nn=["children"];function Hn(e,t){return"".concat(e,"-").concat(t)}function Ln(e,t){return null!=e?e:t}function $n(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function _n(e){return function e(t){return U(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return(0,P.Ay)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,o=t.props,i=o.children,r=(0,F.A)(o,Nn),s=(0,A.A)({key:n},r),a=e(i);return a.length&&(s.children=a),s})).filter((function(e){return e}))}(e)}function zn(e,t,n){var o=$n(n),i=o._title,r=o.key,s=o.children,a=new Set(!0===t?[]:t),l=[];return function e(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map((function(c,u){for(var d,h=Hn(o?o.pos:"0",u),p=Ln(c[r],h),m=0;m<i.length;m+=1){var g=i[m];if(void 0!==c[g]){d=c[g];break}}var f=Object.assign(Dn(c,[].concat((0,tt.A)(i),[r,s])),{title:d,key:p,parent:o,pos:h,children:null,data:c,isStart:[].concat((0,tt.A)(o?o.isStart:[]),[0===u]),isEnd:[].concat((0,tt.A)(o?o.isEnd:[]),[u===n.length-1])});return l.push(f),!0===t||a.has(p)?f.children=e(c[s]||[],f):f.children=[],f}))}(e),l}function Fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,o=t.processEntity,i=t.onProcessFinished,r=t.externalGetKey,s=t.childrenPropName,a=t.fieldNames,l=r||(arguments.length>2?arguments[2]:void 0),c={},u={},d={posEntities:c,keyEntities:u};return n&&(d=n(d)||d),function(e,t,n){var i,r=("object"===(0,S.A)(n)?n:{externalGetKey:n})||{},s=r.childrenPropName,a=r.externalGetKey,l=$n(r.fieldNames),h=l.key,p=l.children,m=s||p;a?"string"==typeof a?i=function(e){return e[a]}:"function"==typeof a&&(i=function(e){return a(e)}):i=function(e,t){return Ln(e[h],t)},function t(n,r,s,a){var l=n?n[m]:e,h=n?Hn(s.pos,r):"0",p=n?[].concat((0,tt.A)(a),[n]):[];if(n){var g=i(n,h);!function(e){var t=e.node,n=e.index,i=e.pos,r=e.key,s=e.parentPos,a=e.level,l={node:t,nodes:e.nodes,index:n,key:r,pos:i,level:a},h=Ln(r,i);c[i]=l,u[h]=l,l.parent=c[s],l.parent&&(l.parent.children=l.parent.children||[],l.parent.children.push(l)),o&&o(l,d)}({node:n,index:r,pos:h,key:g,parentPos:s.node?s.pos:null,level:s.level+1,nodes:p})}l&&l.forEach((function(e,o){t(e,o,{node:n,pos:h,level:s?s.level+1:-1},p)}))}(null)}(e,0,{externalGetKey:l,childrenPropName:s,fieldNames:a}),i&&i(d),d}function Bn(e,t){var n=t.expandedKeys,o=t.selectedKeys,i=t.loadedKeys,r=t.loadingKeys,s=t.checkedKeys,a=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=On(t.keyEntities,e);return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==o.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==r.indexOf(e),checked:-1!==s.indexOf(e),halfChecked:-1!==a.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function jn(e){var t=e.data,n=e.expanded,o=e.selected,i=e.checked,r=e.loaded,s=e.loading,a=e.halfChecked,l=e.dragOver,c=e.dragOverGapTop,u=e.dragOverGapBottom,d=e.pos,h=e.active,p=e.eventKey,m=(0,A.A)((0,A.A)({},t),{},{expanded:n,selected:o,checked:i,loaded:r,loading:s,halfChecked:a,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:h,key:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return(0,P.Ay)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}var Wn=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Vn="open",Gn="close",Kn=function(e){var t,n,i,r=e.eventKey,s=e.className,l=e.style,c=e.dragOver,u=e.dragOverGapTop,d=e.dragOverGapBottom,h=e.isLeaf,p=e.isStart,m=e.isEnd,f=e.expanded,b=e.selected,v=e.checked,w=e.halfChecked,y=e.loading,C=e.domRef,x=e.active,E=e.data,S=e.onMouseMove,R=e.selectable,T=(0,F.A)(e,Wn),I=o.useContext(Mn),P=o.useContext(Tn),O=o.useRef(null),D=o.useState(!1),N=(0,a.A)(D,2),H=N[0],L=N[1],$=!!(I.disabled||e.disabled||null!==(t=P.nodeDisabled)&&void 0!==t&&t.call(P,E)),_=o.useMemo((function(){return!(!I.checkable||!1===e.checkable)&&I.checkable}),[I.checkable,e.checkable]),z=function(t){$||_&&!e.disableCheckbox&&I.onNodeCheck(t,jn(e),!v)},B=o.useMemo((function(){return"boolean"==typeof R?R:I.selectable}),[R,I.selectable]),j=function(t){I.onNodeClick(t,jn(e)),B?function(t){$||I.onNodeSelect(t,jn(e))}(t):z(t)},W=function(t){I.onNodeDoubleClick(t,jn(e))},V=function(t){I.onNodeMouseEnter(t,jn(e))},G=function(t){I.onNodeMouseLeave(t,jn(e))},K=function(t){I.onNodeContextMenu(t,jn(e))},U=o.useMemo((function(){return!(!I.draggable||I.draggable.nodeDraggable&&!I.draggable.nodeDraggable(E))}),[I.draggable,E]),q=function(t){y||I.onNodeExpand(t,jn(e))},Y=o.useMemo((function(){var e=(On(I.keyEntities,r)||{}).children;return Boolean((e||[]).length)}),[I.keyEntities,r]),X=o.useMemo((function(){return!1!==h&&(h||!I.loadData&&!Y||I.loadData&&e.loaded&&!Y)}),[h,I.loadData,Y,e.loaded]);o.useEffect((function(){y||"function"!=typeof I.loadData||!f||X||e.loaded||I.onNodeLoad(jn(e))}),[y,I.loadData,I.onNodeLoad,f,X,e]);var Q=o.useMemo((function(){var e;return null!==(e=I.draggable)&&void 0!==e&&e.icon?o.createElement("span",{className:"".concat(I.prefixCls,"-draggable-icon")},I.draggable.icon):null}),[I.draggable]),J=function(t){var n=e.switcherIcon||I.switcherIcon;return"function"==typeof n?n((0,A.A)((0,A.A)({},e),{},{isLeaf:t})):n},Z=o.useMemo((function(){if(!_)return null;var t="boolean"!=typeof _?_:null;return o.createElement("span",{className:M()("".concat(I.prefixCls,"-checkbox"),(0,k.A)((0,k.A)((0,k.A)({},"".concat(I.prefixCls,"-checkbox-checked"),v),"".concat(I.prefixCls,"-checkbox-indeterminate"),!v&&w),"".concat(I.prefixCls,"-checkbox-disabled"),$||e.disableCheckbox)),onClick:z,role:"checkbox","aria-checked":w?"mixed":v,"aria-disabled":$||e.disableCheckbox,"aria-label":"Select ".concat("string"==typeof e.title?e.title:"tree node")},t)}),[_,v,w,$,e.disableCheckbox,e.title]),ee=o.useMemo((function(){return X?null:f?Vn:Gn}),[X,f]),te=o.useMemo((function(){return o.createElement("span",{className:M()("".concat(I.prefixCls,"-iconEle"),"".concat(I.prefixCls,"-icon__").concat(ee||"docu"),(0,k.A)({},"".concat(I.prefixCls,"-icon_loading"),y))})}),[I.prefixCls,ee,y]),ne=o.useMemo((function(){var t=Boolean(I.draggable);return!e.disabled&&t&&I.dragOverNodeKey===r?I.dropIndicatorRender({dropPosition:I.dropPosition,dropLevelOffset:I.dropLevelOffset,indent:I.indent,prefixCls:I.prefixCls,direction:I.direction}):null}),[I.dropPosition,I.dropLevelOffset,I.indent,I.prefixCls,I.direction,I.draggable,I.dragOverNodeKey,I.dropIndicatorRender]),oe=o.useMemo((function(){var t,n,i=e.title,r=void 0===i?"---":i,s="".concat(I.prefixCls,"-node-content-wrapper");if(I.showIcon){var a=e.icon||I.icon;t=a?o.createElement("span",{className:M()("".concat(I.prefixCls,"-iconEle"),"".concat(I.prefixCls,"-icon__customize"))},"function"==typeof a?a(e):a):te}else I.loadData&&y&&(t=te);return n="function"==typeof r?r(E):I.titleRender?I.titleRender(E):r,o.createElement("span",{ref:O,title:"string"==typeof r?r:"",className:M()(s,"".concat(s,"-").concat(ee||"normal"),(0,k.A)({},"".concat(I.prefixCls,"-node-selected"),!$&&(b||H))),onMouseEnter:V,onMouseLeave:G,onContextMenu:K,onClick:j,onDoubleClick:W},t,o.createElement("span",{className:"".concat(I.prefixCls,"-title")},n),ne)}),[I.prefixCls,I.showIcon,e,I.icon,te,I.titleRender,E,ee,V,G,K,j,W]),ie=_e(T,{aria:!0,data:!0}),re=(On(I.keyEntities,r)||{}).level,se=m[m.length-1],ae=!$&&U,le=I.draggingNodeKey===r,ce=void 0!==R?{"aria-selected":!!R}:void 0;return o.createElement("div",(0,g.A)({ref:C,role:"treeitem","aria-expanded":h?void 0:f,className:M()(s,"".concat(I.prefixCls,"-treenode"),(i={},(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)(i,"".concat(I.prefixCls,"-treenode-disabled"),$),"".concat(I.prefixCls,"-treenode-switcher-").concat(f?"open":"close"),!h),"".concat(I.prefixCls,"-treenode-checkbox-checked"),v),"".concat(I.prefixCls,"-treenode-checkbox-indeterminate"),w),"".concat(I.prefixCls,"-treenode-selected"),b),"".concat(I.prefixCls,"-treenode-loading"),y),"".concat(I.prefixCls,"-treenode-active"),x),"".concat(I.prefixCls,"-treenode-leaf-last"),se),"".concat(I.prefixCls,"-treenode-draggable"),U),"dragging",le),(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)(i,"drop-target",I.dropTargetKey===r),"drop-container",I.dropContainerKey===r),"drag-over",!$&&c),"drag-over-gap-top",!$&&u),"drag-over-gap-bottom",!$&&d),"filter-node",null===(n=I.filterTreeNode)||void 0===n?void 0:n.call(I,jn(e))),"".concat(I.prefixCls,"-treenode-leaf"),X))),style:l,draggable:ae,onDragStart:ae?function(t){t.stopPropagation(),L(!0),I.onNodeDragStart(t,e);try{t.dataTransfer.setData("text/plain","")}catch(e){}}:void 0,onDragEnter:U?function(t){t.preventDefault(),t.stopPropagation(),I.onNodeDragEnter(t,e)}:void 0,onDragOver:U?function(t){t.preventDefault(),t.stopPropagation(),I.onNodeDragOver(t,e)}:void 0,onDragLeave:U?function(t){t.stopPropagation(),I.onNodeDragLeave(t,e)}:void 0,onDrop:U?function(t){t.preventDefault(),t.stopPropagation(),L(!1),I.onNodeDrop(t,e)}:void 0,onDragEnd:U?function(t){t.stopPropagation(),L(!1),I.onNodeDragEnd(t,e)}:void 0,onMouseMove:S},ce,ie),o.createElement(Pn,{prefixCls:I.prefixCls,level:re,isStart:p,isEnd:m}),Q,function(){if(X){var e=J(!0);return!1!==e?o.createElement("span",{className:M()("".concat(I.prefixCls,"-switcher"),"".concat(I.prefixCls,"-switcher-noop"))},e):null}var t=J(!1);return!1!==t?o.createElement("span",{onClick:q,className:M()("".concat(I.prefixCls,"-switcher"),"".concat(I.prefixCls,"-switcher_").concat(f?Vn:Gn))},t):null}(),Z,oe)};Kn.isTreeNode=1;const Un=Kn;function qn(e,t){if(!e)return[];var n=e.slice(),o=n.indexOf(t);return o>=0&&n.splice(o,1),n}function Yn(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function Xn(e){return e.split("-")}function Qn(e,t){var n=[];return function e(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var o=t.key,i=t.children;n.push(o),e(i)}))}(On(t,e).children),n}function Jn(e){if(e.parent){var t=Xn(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function Zn(e,t,n,o,i,r,s,a,l,c){var u,d=e.clientX,h=e.clientY,p=e.target.getBoundingClientRect(),m=p.top,g=p.height,f=(("rtl"===c?-1:1)*(((null==i?void 0:i.x)||0)-d)-12)/o,b=l.filter((function(e){var t;return null===(t=a[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length})),v=On(a,n.eventKey);if(h<m+g/2){var w=s.findIndex((function(e){return e.key===v.key})),y=s[w<=0?0:w-1].key;v=On(a,y)}var C=v.key,x=v,E=v.key,S=0,A=0;if(!b.includes(C))for(var k=0;k<f&&Jn(v);k+=1)v=v.parent,A+=1;var R,M=t.data,T=v.node,I=!0;return R=Xn(v.pos),0===Number(R[R.length-1])&&0===v.level&&h<m+g/2&&r({dragNode:M,dropNode:T,dropPosition:-1})&&v.key===n.eventKey?S=-1:(x.children||[]).length&&b.includes(E)?r({dragNode:M,dropNode:T,dropPosition:0})?S=0:I=!1:0===A?f>-1.5?r({dragNode:M,dropNode:T,dropPosition:1})?S=1:I=!1:r({dragNode:M,dropNode:T,dropPosition:0})?S=0:r({dragNode:M,dropNode:T,dropPosition:1})?S=1:I=!1:r({dragNode:M,dropNode:T,dropPosition:1})?S=1:I=!1,{dropPosition:S,dropLevelOffset:A,dropTargetKey:v.key,dropTargetPos:v.pos,dragOverNodeKey:E,dropContainerKey:0===S?null:(null===(u=v.parent)||void 0===u?void 0:u.key)||null,dropAllowed:I}}function eo(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function to(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,S.A)(e))return(0,P.Ay)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function no(e,t){var n=new Set;function o(e){if(!n.has(e)){var i=On(t,e);if(i){n.add(e);var r=i.parent;i.node.disabled||r&&o(r.key)}}}return(e||[]).forEach((function(e){o(e)})),(0,tt.A)(n)}function oo(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function io(e){var t=e||{},n=t.disabled,o=t.disableCheckbox,i=t.checkable;return!(!n&&!o)||!1===i}function ro(e,t,n,o){var i,r=[];i=o||io;var s,a=new Set(e.filter((function(e){var t=!!On(n,e);return t||r.push(e),t}))),l=new Map,c=0;return Object.keys(n).forEach((function(e){var t=n[e],o=t.level,i=l.get(o);i||(i=new Set,l.set(o,i)),i.add(t),c=Math.max(c,o)})),(0,P.Ay)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),s=!0===t?function(e,t,n,o){for(var i=new Set(e),r=new Set,s=0;s<=n;s+=1)(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,s=void 0===r?[]:r;i.has(t)&&!o(n)&&s.filter((function(e){return!o(e.node)})).forEach((function(e){i.add(e.key)}))}));for(var a=new Set,l=n;l>=0;l-=1)(t.get(l)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!o(n)&&e.parent&&!a.has(e.parent.key))if(o(e.parent.node))a.add(t.key);else{var s=!0,l=!1;(t.children||[]).filter((function(e){return!o(e.node)})).forEach((function(e){var t=e.key,n=i.has(t);s&&!n&&(s=!1),l||!n&&!r.has(t)||(l=!0)})),s&&i.add(t.key),l&&r.add(t.key),a.add(t.key)}}));return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(oo(r,i))}}(a,l,c,i):function(e,t,n,o,i){for(var r=new Set(e),s=new Set(t),a=0;a<=o;a+=1)(n.get(a)||new Set).forEach((function(e){var t=e.key,n=e.node,o=e.children,a=void 0===o?[]:o;r.has(t)||s.has(t)||i(n)||a.filter((function(e){return!i(e.node)})).forEach((function(e){r.delete(e.key)}))}));s=new Set;for(var l=new Set,c=o;c>=0;c-=1)(n.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!i(n)&&e.parent&&!l.has(e.parent.key))if(i(e.parent.node))l.add(t.key);else{var o=!0,a=!1;(t.children||[]).filter((function(e){return!i(e.node)})).forEach((function(e){var t=e.key,n=r.has(t);o&&!n&&(o=!1),a||!n&&!s.has(t)||(a=!0)})),o||r.delete(t.key),a&&s.add(t.key),l.add(t.key)}}));return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(oo(s,r))}}(a,t.halfCheckedKeys,l,c,i),s}var so=n(12533),ao=n(18877),lo=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],co=(0,o.forwardRef)((function(e,t){var n=e.prefixCls,i=void 0===n?"rc-checkbox":n,r=e.className,s=e.style,l=e.checked,c=e.disabled,u=e.defaultChecked,d=void 0!==u&&u,h=e.type,p=void 0===h?"checkbox":h,m=e.title,f=e.onChange,b=(0,F.A)(e,lo),v=(0,o.useRef)(null),w=(0,o.useRef)(null),y=(0,so.A)(d,{value:l}),C=(0,a.A)(y,2),x=C[0],E=C[1];(0,o.useImperativeHandle)(t,(function(){return{focus:function(e){var t;null===(t=v.current)||void 0===t||t.focus(e)},blur:function(){var e;null===(e=v.current)||void 0===e||e.blur()},input:v.current,nativeElement:w.current}}));var S=M()(i,r,(0,k.A)((0,k.A)({},"".concat(i,"-checked"),x),"".concat(i,"-disabled"),c));return o.createElement("span",{className:S,title:m,style:s,ref:w},o.createElement("input",(0,g.A)({},b,{className:"".concat(i,"-input"),ref:v,onChange:function(t){c||("checked"in e||E(t.target.checked),null==f||f({target:(0,A.A)((0,A.A)({},e),{},{type:p,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:c,checked:!!x,type:p})),o.createElement("span",{className:"".concat(i,"-inner")}))}));const uo=co;var ho=n(62279);function po(e){return e&&o.isValidElement(e)&&e.type===o.Fragment}function mo(e,t){return((e,t,n)=>o.isValidElement(e)?o.cloneElement(e,"function"==typeof n?n(e.props||{}):n):t)(e,e,t)}var go=n(77132),fo=n(9417);const bo=(0,ye.A)((function e(){(0,we.A)(this,e)}));var vo="CALC_UNIT",wo=new RegExp(vo,"g");function yo(e){return"number"==typeof e?"".concat(e).concat(vo):e}var Co=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(e,o){var i;(0,we.A)(this,n),i=t.call(this),(0,k.A)((0,fo.A)(i),"result",""),(0,k.A)((0,fo.A)(i),"unitlessCssVar",void 0),(0,k.A)((0,fo.A)(i),"lowPriority",void 0);var r=(0,S.A)(e);return i.unitlessCssVar=o,e instanceof n?i.result="(".concat(e.result,")"):"number"===r?i.result=yo(e):"string"===r&&(i.result=e),i}return(0,ye.A)(n,[{key:"add",value:function(e){return e instanceof n?this.result="".concat(this.result," + ").concat(e.getResult()):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," + ").concat(yo(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof n?this.result="".concat(this.result," - ").concat(e.getResult()):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," - ").concat(yo(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," * ").concat(e.getResult(!0)):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," / ").concat(e.getResult(!0)):"number"!=typeof e&&"string"!=typeof e||(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){var t=this,n=(e||{}).unit,o=!0;return"boolean"==typeof n?o=n:Array.from(this.unitlessCssVar).some((function(e){return t.result.includes(e)}))&&(o=!1),this.result=this.result.replace(wo,o?"px":""),void 0!==this.lowPriority?"calc(".concat(this.result,")"):this.result}}]),n}(bo);const xo=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(e){var o;return(0,we.A)(this,n),o=t.call(this),(0,k.A)((0,fo.A)(o),"result",0),e instanceof n?o.result=e.result:"number"==typeof e&&(o.result=e),o}return(0,ye.A)(n,[{key:"add",value:function(e){return e instanceof n?this.result+=e.result:"number"==typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof n?this.result-=e.result:"number"==typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof n?this.result*=e.result:"number"==typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof n?this.result/=e.result:"number"==typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),n}(bo),Eo=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))},So=function(e,t,n,o){var i=(0,A.A)({},t[e]);null!=o&&o.deprecatedTokens&&o.deprecatedTokens.forEach((function(e){var t,n=(0,a.A)(e,2),o=n[0],r=n[1];(null!=i&&i[o]||null!=i&&i[r])&&(null!==(t=i[r])&&void 0!==t||(i[r]=null==i?void 0:i[o]))}));var r=(0,A.A)((0,A.A)({},n),i);return Object.keys(r).forEach((function(e){r[e]===t[e]&&delete r[e]})),r};var Ao="undefined"!=typeof CSSINJS_STATISTIC,ko=!0;function Ro(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!Ao)return Object.assign.apply(Object,[{}].concat(t));ko=!1;var o={};return t.forEach((function(e){"object"===(0,S.A)(e)&&Object.keys(e).forEach((function(t){Object.defineProperty(o,t,{configurable:!0,enumerable:!0,get:function(){return e[t]}})}))})),ko=!0,o}var Mo={};function To(){}const Io=function(e,t,n){var o;return"function"==typeof n?n(Ro(t,null!==(o=t[e])&&void 0!==o?o:{})):null!=n?n:{}};var Po=new(function(){function e(){(0,we.A)(this,e),(0,k.A)(this,"map",new Map),(0,k.A)(this,"objectIDMap",new WeakMap),(0,k.A)(this,"nextID",0),(0,k.A)(this,"lastAccessBeat",new Map),(0,k.A)(this,"accessBeat",0)}return(0,ye.A)(e,[{key:"set",value:function(e,t){this.clear();var n=this.getCompositeKey(e);this.map.set(n,t),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(e){var t=this.getCompositeKey(e),n=this.map.get(t);return this.lastAccessBeat.set(t,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(e){var t=this;return e.map((function(e){return e&&"object"===(0,S.A)(e)?"obj_".concat(t.getObjectID(e)):"".concat((0,S.A)(e),"_").concat(e)})).join("|")}},{key:"getObjectID",value:function(e){if(this.objectIDMap.has(e))return this.objectIDMap.get(e);var t=this.nextID;return this.objectIDMap.set(e,t),this.nextID+=1,t}},{key:"clear",value:function(){var e=this;if(this.accessBeat>1e4){var t=Date.now();this.lastAccessBeat.forEach((function(n,o){t-n>6e5&&(e.map.delete(o),e.lastAccessBeat.delete(o))})),this.accessBeat=0}}}]),e}());const Oo=function(){return{}};var Do=n(25905),No=n(39319);const{genStyleHooks:Ho,genComponentStyleHook:Lo,genSubStyleComponent:$o}=function(e){var t=e.useCSP,n=void 0===t?Oo:t,i=e.useToken,r=e.usePrefix,s=e.getResetStyles,l=e.getCommonStyle,c=e.getCompUnitless;function u(t,c,u){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},h=Array.isArray(t)?t:[t,t],p=(0,a.A)(h,1)[0],m=h.join("-"),g=e.layer||{name:"antd"};return function(e){var t,a,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,f=i(),b=f.theme,v=f.realToken,w=f.hashId,y=f.token,C=f.cssVar,x=r(),E=x.rootPrefixCls,k=x.iconPrefixCls,R=n(),M=C?"css":"js",T=(t=function(){var e=new Set;return C&&Object.keys(d.unitless||{}).forEach((function(t){e.add((0,go.Ki)(t,C.prefix)),e.add((0,go.Ki)(t,Eo(p,C.prefix)))})),function(e,t){var n="css"===e?Co:xo;return function(e){return new n(e,t)}}(M,e)},a=[M,p,null==C?void 0:C.prefix],o.useMemo((function(){var e=Po.get(a);if(e)return e;var n=t();return Po.set(a,n),n}),a)),I=function(e){return"js"===e?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"max(".concat(t.map((function(e){return(0,go.zA)(e)})).join(","),")")},min:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"min(".concat(t.map((function(e){return(0,go.zA)(e)})).join(","),")")}}}(M),P=I.max,O=I.min,D={theme:b,token:y,hashId:w,nonce:function(){return R.nonce},clientOnly:d.clientOnly,layer:g,order:d.order||-999};return"function"==typeof s&&(0,go.IV)((0,A.A)((0,A.A)({},D),{},{clientOnly:!1,path:["Shared",E]}),(function(){return s(y,{prefix:{rootPrefixCls:E,iconPrefixCls:k},csp:R})})),[(0,go.IV)((0,A.A)((0,A.A)({},D),{},{path:[m,e,k]}),(function(){if(!1===d.injectStyle)return[];var t=function(e){var t,n=e,o=To;return Ao&&"undefined"!=typeof Proxy&&(t=new Set,n=new Proxy(e,{get:function(e,n){var o;return ko&&(null===(o=t)||void 0===o||o.add(n)),e[n]}}),o=function(e,n){var o;Mo[e]={global:Array.from(t),component:(0,A.A)((0,A.A)({},null===(o=Mo[e])||void 0===o?void 0:o.component),n)}}),{token:n,keys:t,flush:o}}(y),n=t.token,o=t.flush,i=Io(p,v,u),r=".".concat(e),s=So(p,v,i,{deprecatedTokens:d.deprecatedTokens});C&&i&&"object"===(0,S.A)(i)&&Object.keys(i).forEach((function(e){i[e]="var(".concat((0,go.Ki)(e,Eo(p,C.prefix)),")")}));var a=Ro(n,{componentCls:r,prefixCls:e,iconCls:".".concat(k),antCls:".".concat(E),calc:T,max:P,min:O},C?i:s),m=c(a,{hashId:w,prefixCls:e,rootPrefixCls:E,iconPrefixCls:k});o(p,s);var g="function"==typeof l?l(a,e,h,d.resetFont):null;return[!1===d.resetStyle?null:g,m]})),w]}}return{genStyleHooks:function(e,t,n,r){var s=Array.isArray(e)?e[0]:e;function l(e){return"".concat(String(s)).concat(e.slice(0,1).toUpperCase()).concat(e.slice(1))}var d=(null==r?void 0:r.unitless)||{},h="function"==typeof c?c(e):{},p=(0,A.A)((0,A.A)({},h),{},(0,k.A)({},l("zIndexPopup"),!0));Object.keys(d).forEach((function(e){p[l(e)]=d[e]}));var m=(0,A.A)((0,A.A)({},r),{},{unitless:p,prefixToken:l}),g=u(e,t,n,m),f=function(e,t,n){var r=n.unitless,s=n.injectStyle,a=void 0===s||s,l=n.prefixToken,c=n.ignore,u=function(o){var s=o.rootCls,a=o.cssVar,u=void 0===a?{}:a,d=i().realToken;return(0,go.RC)({path:[e],prefix:u.prefix,key:u.key,unitless:r,ignore:c,token:d,scope:s},(function(){var o=Io(e,d,t),i=So(e,d,o,{deprecatedTokens:null==n?void 0:n.deprecatedTokens});return Object.keys(o).forEach((function(e){i[l(e)]=i[e],delete i[e]})),i})),null};return function(t){var n=i().cssVar;return[function(i){return a&&n?o.createElement(o.Fragment,null,o.createElement(u,{rootCls:t,cssVar:n,component:e}),i):i},null==n?void 0:n.key]}}(s,n,m);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=g(e,t),o=(0,a.A)(n,2)[1],i=f(t),r=(0,a.A)(i,2);return[r[0],o,r[1]]}},genSubStyleComponent:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=u(e,t,n,(0,A.A)({resetStyle:!1,order:-998},o));return function(e){var t=e.prefixCls,n=e.rootCls;return i(t,void 0===n?t:n),null}},genComponentStyleHook:u}}({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=(0,o.useContext)(ho.QO);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,o,i]=(0,No.Ay)();return{theme:e,realToken:t,hashId:n,token:o,cssVar:i}},useCSP:()=>{const{csp:e}=(0,o.useContext)(ho.QO);return null!=e?e:{}},getResetStyles:(e,t)=>{var n;const o=(0,Do.av)(e);return[o,{"&":o},(0,Do.jz)(null!==(n=null==t?void 0:t.prefix.iconPrefixCls)&&void 0!==n?n:ho.pM)]},getCommonStyle:Do.vj,getCompUnitless:()=>No.Is}),_o=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},zo=Lo("Wave",(e=>[_o(e)])),Fo=`${ho.yH}-wave-target`;var Bo=n(90754);function jo(e,t){this.v=e,this.k=t}function Wo(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Wo=function(e,t,n,o){if(t)i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n;else{var r=function(t,n){Wo(e,t,(function(e){return this._invoke(t,n,e)}))};r("next",0),r("throw",1),r("return",2)}},Wo(e,t,n,o)}function Vo(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var l=o&&o.prototype instanceof a?o:a,c=Object.create(l.prototype);return Wo(c,"_invoke",function(n,o,i){var r,a,l,c=0,u=i||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return r=t,a=0,l=e,h.n=n,s}};function p(n,o){for(a=n,l=o,t=0;!d&&c&&!i&&t<u.length;t++){var i,r=u[t],p=h.p,m=r[2];n>3?(i=m===o)&&(l=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=e):r[0]<=p&&((i=n<2&&p<r[1])?(a=0,h.v=o,h.n=r[1]):p<m&&(i=n<3||r[0]>o||o>m)&&(r[4]=n,r[5]=o,h.n=m,a=0))}if(i||n>1)return s;throw d=!0,o}return function(i,u,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,m),a=u,l=m;(t=a<2?e:l)||!d;){r||(a?a<3?(a>1&&(h.n=-1),p(a,l)):h.n=l:h.v=l);try{if(c=2,r){if(a||(i="next"),t=r[i]){if(!(t=t.call(r,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=r.return)&&t.call(r),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);r=e}else if((t=(d=h.n<0)?l:n.call(o,h))!==s)break}catch(t){r=e,a=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,i,r),!0),c}var s={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][o]?t(t([][o]())):(Wo(t={},o,(function(){return this})),t),d=c.prototype=a.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Wo(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Wo(d,"constructor",c),Wo(c,"constructor",l),l.displayName="GeneratorFunction",Wo(c,i,"GeneratorFunction"),Wo(d),Wo(d,i,"Generator"),Wo(d,o,(function(){return this})),Wo(d,"toString",(function(){return"[object Generator]"})),(Vo=function(){return{w:r,m:h}})()}function Go(e,t){function n(o,i,r,s){try{var a=e[o](i),l=a.value;return l instanceof jo?t.resolve(l.v).then((function(e){n("next",e,r,s)}),(function(e){n("throw",e,r,s)})):t.resolve(l).then((function(e){a.value=e,r(a)}),(function(e){return n("throw",e,r,s)}))}catch(e){s(e)}}var o;this.next||(Wo(Go.prototype),Wo(Go.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),Wo(this,"_invoke",(function(e,i,r){function s(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(s,s):s()}),!0)}function Ko(e,t,n,o,i){return new Go(Vo().w(e,t,n,o),i||Promise)}function Uo(e,t,n,o,i){var r=Ko(e,t,n,o,i);return r.next().then((function(e){return e.done?e.value:r.next()}))}function qo(e){var t=Object(e),n=[];for(var o in t)n.unshift(o);return function e(){for(;n.length;)if((o=n.pop())in t)return e.value=o,e.done=!1,e;return e.done=!0,e}}function Yo(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError((0,S.A)(e)+" is not iterable")}function Xo(){var e=Vo(),t=e.m(Xo),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function o(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===n||"GeneratorFunction"===(t.displayName||t.name))}var i={throw:1,return:2,break:3,continue:3};function r(e){var t,n;return function(o){t||(t={stop:function(){return n(o.a,2)},catch:function(){return o.v},abrupt:function(e,t){return n(o.a,i[e],t)},delegateYield:function(e,i,r){return t.resultName=i,n(o.d,Yo(e),r)},finish:function(e){return n(o.f,e)}},n=function(e,n,i){o.p=t.prev,o.n=t.next;try{return e(n,i)}finally{t.next=o.n}}),t.resultName&&(t[t.resultName]=o.v,t.resultName=void 0),t.sent=o.v,t.next=o.n;try{return e.call(this,t)}finally{o.p=t.prev,o.n=t.next}}}return(Xo=function(){return{wrap:function(t,n,o,i){return e.w(r(t),n,o,i&&i.reverse())},isGeneratorFunction:o,mark:e.m,awrap:function(e,t){return new jo(e,t)},AsyncIterator:Go,async:function(e,t,n,i,s){return(o(t)?Ko:Uo)(r(e),t,n,i,s)},keys:qo,values:Yo}})()}function Qo(e,t,n,o,i,r,s){try{var a=e[r](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(o,i)}function Jo(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function s(e){Qo(r,o,i,s,a,"next",e)}function a(e){Qo(r,o,i,s,a,"throw",e)}s(void 0)}))}}var Zo,ei=(0,A.A)({},h),ti=ei.version,ni=ei.render,oi=ei.unmountComponentAtNode;try{Number((ti||"").split(".")[0])>=18&&(Zo=ei.createRoot)}catch(e){}function ii(e){var t=ei.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,S.A)(t)&&(t.usingClientEntryPoint=e)}var ri="__rc_react_root__";function si(e){return ai.apply(this,arguments)}function ai(){return(ai=Jo(Xo().mark((function e(t){return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[ri])||void 0===e||e.unmount(),delete t[ri]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function li(e){oi(e)}function ci(){return(ci=Jo(Xo().mark((function e(t){return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===Zo){e.next=2;break}return e.abrupt("return",si(t));case 2:li(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}let ui=(e,t)=>(function(e,t){Zo?function(e,t){ii(!0);var n=t[ri]||Zo(t);ii(!1),n.render(e),t[ri]=n}(e,t):function(e,t){null==ni||ni(e,t)}(e,t)}(e,t),()=>function(e){return ci.apply(this,arguments)}(t));function di(e){return e&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&"transparent"!==e}function hi(e){return Number.isNaN(e)?0:e}const pi=e=>{const{className:t,target:n,component:i,registerUnmount:r}=e,s=o.useRef(null),a=o.useRef(null);o.useEffect((()=>{a.current=r()}),[]);const[l,c]=o.useState(null),[u,d]=o.useState([]),[h,p]=o.useState(0),[m,g]=o.useState(0),[b,v]=o.useState(0),[w,y]=o.useState(0),[C,x]=o.useState(!1),E={left:h,top:m,width:b,height:w,borderRadius:u.map((e=>`${e}px`)).join(" ")};function S(){const e=getComputedStyle(n);c(function(e){const{borderTopColor:t,borderColor:n,backgroundColor:o}=getComputedStyle(e);return di(t)?t:di(n)?n:di(o)?o:null}(n));const t="static"===e.position,{borderLeftWidth:o,borderTopWidth:i}=e;p(t?n.offsetLeft:hi(-parseFloat(o))),g(t?n.offsetTop:hi(-parseFloat(i))),v(n.offsetWidth),y(n.offsetHeight);const{borderTopLeftRadius:r,borderTopRightRadius:s,borderBottomLeftRadius:a,borderBottomRightRadius:l}=e;d([r,s,l,a].map((e=>hi(parseFloat(e)))))}if(l&&(E["--wave-color"]=l),o.useEffect((()=>{if(n){const e=(0,bt.A)((()=>{S(),x(!0)}));let t;return"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(S),t.observe(n)),()=>{bt.A.cancel(e),null==t||t.disconnect()}}}),[]),!C)return null;const A=("Checkbox"===i||"Radio"===i)&&(null==n?void 0:n.classList.contains(Fo));return o.createElement(Bo.Ay,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(e,t)=>{var n,o;if(t.deadline||"opacity"===t.propertyName){const e=null===(n=s.current)||void 0===n?void 0:n.parentElement;null===(o=a.current)||void 0===o||o.call(a).then((()=>{null==e||e.remove()}))}return!1}},(({className:e},n)=>o.createElement("div",{ref:(0,f.K4)(s,n),className:M()(t,e,{"wave-quick":A}),style:E})))},mi=(e,t)=>{var n;const{component:i}=t;if("Checkbox"===i&&!(null===(n=e.querySelector("input"))||void 0===n?void 0:n.checked))return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",null==e||e.insertBefore(r,null==e?void 0:e.firstChild);let s=null;s=ui(o.createElement(pi,Object.assign({},t,{target:e,registerUnmount:function(){return s}})),r)},gi=(e,t,n)=>{const{wave:i}=o.useContext(ho.QO),[,r,s]=(0,No.Ay)(),a=(0,l.A)((o=>{const a=e.current;if((null==i?void 0:i.disabled)||!a)return;const l=a.querySelector(`.${Fo}`)||a,{showEffect:c}=i||{};(c||mi)(l,{className:t,token:r,component:n,event:o,hashId:s})})),c=o.useRef(null);return e=>{bt.A.cancel(c.current),c.current=(0,bt.A)((()=>{a(e)}))}},fi=e=>{const{children:t,disabled:n,component:i}=e,{getPrefixCls:r}=(0,o.useContext)(ho.QO),s=(0,o.useRef)(null),a=r("wave"),[,l]=zo(a),c=gi(s,M()(a,l),i);return o.useEffect((()=>{const e=s.current;if(!e||1!==e.nodeType||n)return;const t=t=>{!qe(t.target)||!e.getAttribute||e.getAttribute("disabled")||e.disabled||e.className.includes("disabled")||e.className.includes("-leave")||c(t)};return e.addEventListener("click",t,!0),()=>{e.removeEventListener("click",t,!0)}}),[n]),o.isValidElement(t)?mo(t,{ref:(0,f.f3)(t)?(0,f.K4)((0,f.A9)(t),s):s}):null!=t?t:null};var bi=n(98119);const vi=e=>{const[,,,,t]=(0,No.Ay)();return t?`${e}-css-var`:""};var wi="RC_FORM_INTERNAL_HOOKS",yi=function(){(0,P.Ay)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const Ci=o.createContext({getFieldValue:yi,getFieldsValue:yi,getFieldError:yi,getFieldWarning:yi,getFieldsError:yi,isFieldsTouched:yi,isFieldTouched:yi,isFieldValidating:yi,isFieldsValidating:yi,resetFields:yi,setFields:yi,setFieldValue:yi,setFieldsValue:yi,validateFields:yi,submit:yi,getInternalHooks:function(){return yi(),{dispatch:yi,initEntityValue:yi,registerField:yi,useSubscribe:yi,setInitialValues:yi,destroyForm:yi,setCallbacks:yi,registerWatch:yi,getFields:yi,setValidateMessages:yi,setPreserve:yi,getInitialValue:yi}}}),xi=o.createContext(null);function Ei(e){return null==e?[]:Array.isArray(e)?e:[e]}function Si(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Ai=Si(),ki=n(53954),Ri=n(63662),Mi=n(52176);function Ti(e){var t="function"==typeof Map?new Map:void 0;return Ti=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if((0,Mi.A)())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var i=new(e.bind.apply(e,o));return n&&(0,Ri.A)(i,n.prototype),i}(e,arguments,(0,ki.A)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,Ri.A)(n,e)},Ti(e)}var Ii=/%[sdj%]/g;function Pi(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function Oi(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i=0,r=n.length;return"function"==typeof e?e.apply(null,n):"string"==typeof e?e.replace(Ii,(function(e){if("%%"===e)return"%";if(i>=r)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(e){return"[Circular]"}default:return e}})):e}function Di(e,t){return null==e||!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e)}function Ni(e,t,n){var o=0,i=e.length;!function r(s){if(s&&s.length)n(s);else{var a=o;o+=1,a<i?t(e[a],r):n([])}}([])}"undefined"!=typeof process&&process.env;var Hi=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(e,o){var i;return(0,we.A)(this,n),i=t.call(this,"Async Validation Error"),(0,k.A)((0,fo.A)(i),"errors",void 0),(0,k.A)((0,fo.A)(i),"fields",void 0),i.errors=e,i.fields=o,i}return(0,ye.A)(n)}(Ti(Error));function Li(e,t){return function(n){var o,i;return o=e.fullFields?function(e,t){for(var n=e,o=0;o<t.length;o++){if(null==n)return n;n=n[t[o]]}return n}(t,e.fullFields):t[n.field||e.fullField],(i=n)&&void 0!==i.message?(n.field=n.field||e.fullField,n.fieldValue=o,n):{message:"function"==typeof n?n():n,fieldValue:o,field:n.field||e.fullField}}}function $i(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];"object"===(0,S.A)(o)&&"object"===(0,S.A)(e[n])?e[n]=(0,A.A)((0,A.A)({},e[n]),o):e[n]=o}return e}var _i="enum";const zi=function(e,t,n,o,i,r){!e.required||n.hasOwnProperty(e.field)&&!Di(t,r||e.type)||o.push(Oi(i.messages.required,e.fullField))};var Fi,Bi=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,ji=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Wi={integer:function(e){return Wi.number(e)&&parseInt(e,10)===e},float:function(e){return Wi.number(e)&&!Wi.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"===(0,S.A)(e)&&!Wi.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(Bi)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(function(){if(Fi)return Fi;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",i=["(?:".concat(o,":){7}(?:").concat(o,"|:)"),"(?:".concat(o,":){6}(?:").concat(n,"|:").concat(o,"|:)"),"(?:".concat(o,":){5}(?::").concat(n,"|(?::").concat(o,"){1,2}|:)"),"(?:".concat(o,":){4}(?:(?::").concat(o,"){0,1}:").concat(n,"|(?::").concat(o,"){1,3}|:)"),"(?:".concat(o,":){3}(?:(?::").concat(o,"){0,2}:").concat(n,"|(?::").concat(o,"){1,4}|:)"),"(?:".concat(o,":){2}(?:(?::").concat(o,"){0,3}:").concat(n,"|(?::").concat(o,"){1,5}|:)"),"(?:".concat(o,":){1}(?:(?::").concat(o,"){0,4}:").concat(n,"|(?::").concat(o,"){1,6}|:)"),"(?::(?:(?::".concat(o,"){0,5}:").concat(n,"|(?::").concat(o,"){1,7}|:))")],r="(?:".concat(i.join("|"),")").concat("(?:%[0-9a-zA-Z]{1,})?"),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(r,"$)")),a=new RegExp("^".concat(n,"$")),l=new RegExp("^".concat(r,"$")),c=function(e){return e&&e.exact?s:new RegExp("(?:".concat(t(e)).concat(n).concat(t(e),")|(?:").concat(t(e)).concat(r).concat(t(e),")"),"g")};c.v4=function(e){return e&&e.exact?a:new RegExp("".concat(t(e)).concat(n).concat(t(e)),"g")},c.v6=function(e){return e&&e.exact?l:new RegExp("".concat(t(e)).concat(r).concat(t(e)),"g")};var u=c.v4().source,d=c.v6().source,h="(?:".concat("(?:(?:[a-z]+:)?//)","|www\\.)").concat("(?:\\S+(?::\\S*)?@)?","(?:localhost|").concat(u,"|").concat(d,"|").concat("(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)").concat("(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*").concat("(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",")").concat("(?::\\d{2,5})?").concat('(?:[/?#][^\\s"]*)?');return Fi=new RegExp("(?:^".concat(h,"$)"),"i")}())},hex:function(e){return"string"==typeof e&&!!e.match(ji)}};const Vi=zi,Gi=function(e,t,n,o,i){(/^\s+$/.test(t)||""===t)&&o.push(Oi(i.messages.whitespace,e.fullField))},Ki=function(e,t,n,o,i){if(e.required&&void 0===t)zi(e,t,n,o,i);else{var r=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(r)>-1?Wi[r](t)||o.push(Oi(i.messages.types[r],e.fullField,e.type)):r&&(0,S.A)(t)!==e.type&&o.push(Oi(i.messages.types[r],e.fullField,e.type))}},Ui=function(e,t,n,o,i){var r="number"==typeof e.len,s="number"==typeof e.min,a="number"==typeof e.max,l=t,c=null,u="number"==typeof t,d="string"==typeof t,h=Array.isArray(t);if(u?c="number":d?c="string":h&&(c="array"),!c)return!1;h&&(l=t.length),d&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),r?l!==e.len&&o.push(Oi(i.messages[c].len,e.fullField,e.len)):s&&!a&&l<e.min?o.push(Oi(i.messages[c].min,e.fullField,e.min)):a&&!s&&l>e.max?o.push(Oi(i.messages[c].max,e.fullField,e.max)):s&&a&&(l<e.min||l>e.max)&&o.push(Oi(i.messages[c].range,e.fullField,e.min,e.max))},qi=function(e,t,n,o,i){e[_i]=Array.isArray(e[_i])?e[_i]:[],-1===e[_i].indexOf(t)&&o.push(Oi(i.messages[_i],e.fullField,e[_i].join(", ")))},Yi=function(e,t,n,o,i){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||o.push(Oi(i.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"==typeof e.pattern&&(new RegExp(e.pattern).test(t)||o.push(Oi(i.messages.pattern.mismatch,e.fullField,t,e.pattern))))},Xi=function(e,t,n,o,i){var r=e.type,s=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t,r)&&!e.required)return n();Vi(e,t,o,s,i,r),Di(t,r)||Ki(e,t,o,s,i)}n(s)},Qi={string:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t,"string")&&!e.required)return n();Vi(e,t,o,r,i,"string"),Di(t,"string")||(Ki(e,t,o,r,i),Ui(e,t,o,r,i),Yi(e,t,o,r,i),!0===e.whitespace&&Gi(e,t,o,r,i))}n(r)},method:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t)&&!e.required)return n();Vi(e,t,o,r,i),void 0!==t&&Ki(e,t,o,r,i)}n(r)},number:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(""===t&&(t=void 0),Di(t)&&!e.required)return n();Vi(e,t,o,r,i),void 0!==t&&(Ki(e,t,o,r,i),Ui(e,t,o,r,i))}n(r)},boolean:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t)&&!e.required)return n();Vi(e,t,o,r,i),void 0!==t&&Ki(e,t,o,r,i)}n(r)},regexp:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t)&&!e.required)return n();Vi(e,t,o,r,i),Di(t)||Ki(e,t,o,r,i)}n(r)},integer:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t)&&!e.required)return n();Vi(e,t,o,r,i),void 0!==t&&(Ki(e,t,o,r,i),Ui(e,t,o,r,i))}n(r)},float:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t)&&!e.required)return n();Vi(e,t,o,r,i),void 0!==t&&(Ki(e,t,o,r,i),Ui(e,t,o,r,i))}n(r)},array:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();Vi(e,t,o,r,i,"array"),null!=t&&(Ki(e,t,o,r,i),Ui(e,t,o,r,i))}n(r)},object:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t)&&!e.required)return n();Vi(e,t,o,r,i),void 0!==t&&Ki(e,t,o,r,i)}n(r)},enum:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t)&&!e.required)return n();Vi(e,t,o,r,i),void 0!==t&&qi(e,t,o,r,i)}n(r)},pattern:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t,"string")&&!e.required)return n();Vi(e,t,o,r,i),Di(t,"string")||Yi(e,t,o,r,i)}n(r)},date:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t,"date")&&!e.required)return n();var s;Vi(e,t,o,r,i),Di(t,"date")||(s=t instanceof Date?t:new Date(t),Ki(e,s,o,r,i),s&&Ui(e,s.getTime(),o,r,i))}n(r)},url:Xi,hex:Xi,email:Xi,required:function(e,t,n,o,i){var r=[],s=Array.isArray(t)?"array":(0,S.A)(t);Vi(e,t,o,r,i,s),n(r)},any:function(e,t,n,o,i){var r=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(Di(t)&&!e.required)return n();Vi(e,t,o,r,i)}n(r)}};var Ji=function(){function e(t){(0,we.A)(this,e),(0,k.A)(this,"rules",null),(0,k.A)(this,"_messages",Ai),this.define(t)}return(0,ye.A)(e,[{key:"define",value:function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(0,S.A)(e)||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var o=e[n];t.rules[n]=Array.isArray(o)?o:[o]}))}},{key:"messages",value:function(e){return e&&(this._messages=$i(Si(),e)),this._messages}},{key:"validate",value:function(t){var n=this,o=t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if("function"==typeof i&&(r=i,i={}),!this.rules||0===Object.keys(this.rules).length)return r&&r(null,o),Promise.resolve(o);if(i.messages){var s=this.messages();s===Ai&&(s=Si()),$i(s,i.messages),i.messages=s}else i.messages=this.messages();var a={};(i.keys||Object.keys(this.rules)).forEach((function(e){var i=n.rules[e],r=o[e];i.forEach((function(i){var s=i;"function"==typeof s.transform&&(o===t&&(o=(0,A.A)({},o)),null!=(r=o[e]=s.transform(r))&&(s.type=s.type||(Array.isArray(r)?"array":(0,S.A)(r)))),(s="function"==typeof s?{validator:s}:(0,A.A)({},s)).validator=n.getValidationMethod(s),s.validator&&(s.field=e,s.fullField=s.fullField||e,s.type=n.getType(s),a[e]=a[e]||[],a[e].push({rule:s,value:r,source:o,field:e}))}))}));var l={};return function(e,t,n,o,i){if(t.first){var r=new Promise((function(t,r){var s=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,(0,tt.A)(e[n]||[]))})),t}(e);Ni(s,n,(function(e){return o(e),e.length?r(new Hi(e,Pi(e))):t(i)}))}));return r.catch((function(e){return e})),r}var s=!0===t.firstFields?Object.keys(e):t.firstFields||[],a=Object.keys(e),l=a.length,c=0,u=[],d=new Promise((function(t,r){var d=function(e){if(u.push.apply(u,e),++c===l)return o(u),u.length?r(new Hi(u,Pi(u))):t(i)};a.length||(o(u),t(i)),a.forEach((function(t){var o=e[t];-1!==s.indexOf(t)?Ni(o,n,d):function(e,t,n){var o=[],i=0,r=e.length;function s(e){o.push.apply(o,(0,tt.A)(e||[])),++i===r&&n(o)}e.forEach((function(e){t(e,s)}))}(o,n,d)}))}));return d.catch((function(e){return e})),d}(a,i,(function(t,n){var r,s=t.rule,a=!("object"!==s.type&&"array"!==s.type||"object"!==(0,S.A)(s.fields)&&"object"!==(0,S.A)(s.defaultField));function c(e,t){return(0,A.A)((0,A.A)({},t),{},{fullField:"".concat(s.fullField,".").concat(e),fullFields:s.fullFields?[].concat((0,tt.A)(s.fullFields),[e]):[e]})}function u(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=Array.isArray(r)?r:[r];!i.suppressWarning&&u.length&&e.warning("async-validator:",u),u.length&&void 0!==s.message&&(u=[].concat(s.message));var d=u.map(Li(s,o));if(i.first&&d.length)return l[s.field]=1,n(d);if(a){if(s.required&&!t.value)return void 0!==s.message?d=[].concat(s.message).map(Li(s,o)):i.error&&(d=[i.error(s,Oi(i.messages.required,s.field))]),n(d);var h={};s.defaultField&&Object.keys(t.value).map((function(e){h[e]=s.defaultField})),h=(0,A.A)((0,A.A)({},h),t.rule.fields);var p={};Object.keys(h).forEach((function(e){var t=h[e],n=Array.isArray(t)?t:[t];p[e]=n.map(c.bind(null,e))}));var m=new e(p);m.messages(i.messages),t.rule.options&&(t.rule.options.messages=i.messages,t.rule.options.error=i.error),m.validate(t.value,t.rule.options||i,(function(e){var t=[];d&&d.length&&t.push.apply(t,(0,tt.A)(d)),e&&e.length&&t.push.apply(t,(0,tt.A)(e)),n(t.length?t:null)}))}else n(d)}if(a=a&&(s.required||!s.required&&t.value),s.field=t.field,s.asyncValidator)r=s.asyncValidator(s,t.value,u,t.source,i);else if(s.validator){try{r=s.validator(s,t.value,u,t.source,i)}catch(e){var d,h;null===(d=(h=console).error)||void 0===d||d.call(h,e),i.suppressValidatorError||setTimeout((function(){throw e}),0),u(e.message)}!0===r?u():!1===r?u("function"==typeof s.message?s.message(s.fullField||s.field):s.message||"".concat(s.fullField||s.field," fails")):r instanceof Array?u(r):r instanceof Error&&u(r.message)}r&&r.then&&r.then((function(){return u()}),(function(e){return u(e)}))}),(function(e){!function(e){for(var t,n,i=[],s={},a=0;a<e.length;a++)t=e[a],n=void 0,Array.isArray(t)?i=(n=i).concat.apply(n,(0,tt.A)(t)):i.push(t);i.length?(s=Pi(i),r(i,s)):r(null,o)}(e)}),o)}},{key:"getType",value:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!Qi.hasOwnProperty(e.type))throw new Error(Oi("Unknown rule type %s",e.type));return e.type||"string"}},{key:"getValidationMethod",value:function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?Qi.required:Qi[this.getType(e)]||void 0}}]),e}();(0,k.A)(Ji,"register",(function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");Qi[e]=t})),(0,k.A)(Ji,"warning",(function(){})),(0,k.A)(Ji,"messages",Ai),(0,k.A)(Ji,"validators",Qi);const Zi=Ji;var er="'${name}' is not a valid ${type}",tr={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:er,method:er,array:er,object:er,number:er,date:er,boolean:er,integer:er,float:er,regexp:er,email:er,url:er,hex:er},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},nr=n(20488),or=Zi;function ir(e,t){return e.replace(/\\?\$\{\w+\}/g,(function(e){if(e.startsWith("\\"))return e.slice(1);var n=e.slice(2,-1);return t[n]}))}var rr="CODE_LOGIC_ERROR";function sr(e,t,n,o,i){return ar.apply(this,arguments)}function ar(){return ar=Jo(Xo().mark((function e(t,n,i,r,s){var a,l,c,u,d,h,p,m,g;return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(a=(0,A.A)({},i)).ruleIndex,or.warning=function(){},a.validator&&(l=a.validator,a.validator=function(){try{return l.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(rr)}}),c=null,a&&"array"===a.type&&a.defaultField&&(c=a.defaultField,delete a.defaultField),u=new or((0,k.A)({},t,[a])),d=(0,nr.h)(tr,r.validateMessages),u.messages(d),h=[],e.prev=10,e.next=13,Promise.resolve(u.validate((0,k.A)({},t,n),(0,A.A)({},r)));case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(10),e.t0.errors&&(h=e.t0.errors.map((function(e,t){var n=e.message,i=n===rr?d.default:n;return o.isValidElement(i)?o.cloneElement(i,{key:"error_".concat(t)}):i})));case 18:if(h.length||!c){e.next=23;break}return e.next=21,Promise.all(n.map((function(e,n){return sr("".concat(t,".").concat(n),e,c,r,s)})));case 21:return p=e.sent,e.abrupt("return",p.reduce((function(e,t){return[].concat((0,tt.A)(e),(0,tt.A)(t))}),[]));case 23:return m=(0,A.A)((0,A.A)({},i),{},{name:t,enum:(i.enum||[]).join(", ")},s),g=h.map((function(e){return"string"==typeof e?ir(e,m):e})),e.abrupt("return",g);case 26:case"end":return e.stop()}}),e,null,[[10,15]])}))),ar.apply(this,arguments)}function lr(e,t,n,o,i,r){var s,a=e.join("."),l=n.map((function(e,t){var n=e.validator,o=(0,A.A)((0,A.A)({},e),{},{ruleIndex:t});return n&&(o.validator=function(e,t,o){var i=!1,r=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){(0,P.Ay)(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||o.apply(void 0,t)}))}));i=r&&"function"==typeof r.then&&"function"==typeof r.catch,(0,P.Ay)(i,"`callback` is deprecated. Please return a promise instead."),i&&r.then((function(){o()})).catch((function(e){o(e||" ")}))}),o})).sort((function(e,t){var n=e.warningOnly,o=e.ruleIndex,i=t.warningOnly,r=t.ruleIndex;return!!n==!!i?o-r:n?1:-1}));if(!0===i)s=new Promise(function(){var e=Jo(Xo().mark((function e(n,i){var s,c,u;return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=0;case 1:if(!(s<l.length)){e.next=12;break}return c=l[s],e.next=5,sr(a,t,c,o,r);case 5:if(!(u=e.sent).length){e.next=9;break}return i([{errors:u,rule:c}]),e.abrupt("return");case 9:s+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var c=l.map((function(e){return sr(a,t,e,o,r).then((function(t){return{errors:t,rule:e}}))}));s=(i?function(e){return ur.apply(this,arguments)}(c):function(e){return cr.apply(this,arguments)}(c)).then((function(e){return Promise.reject(e)}))}return s.catch((function(e){return e})),s}function cr(){return(cr=Jo(Xo().mark((function e(t){return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,(0,tt.A)(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ur(){return(ur=Jo(Xo().mark((function e(t){var n;return Xo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(o){o.then((function(o){o.errors.length&&e([o]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dr(e){return Ei(e)}function hr(e,t){var n={};return t.forEach((function(t){var o=(0,I.A)(e,t);n=(0,nr.A)(n,t,o)})),n}function pr(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return mr(t,e,n)}))}function mr(e,t){return!(!e||!t)&&!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,n){return e[n]===t}))}function gr(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,S.A)(t.target)&&e in t.target?t.target[e]:t}function fr(e,t,n){var o=e.length;if(t<0||t>=o||n<0||n>=o)return e;var i=e[t],r=t-n;return r>0?[].concat((0,tt.A)(e.slice(0,n)),[i],(0,tt.A)(e.slice(n,t)),(0,tt.A)(e.slice(t+1,o))):r<0?[].concat((0,tt.A)(e.slice(0,t)),(0,tt.A)(e.slice(t+1,n+1)),[i],(0,tt.A)(e.slice(n+1,o))):e}var br=["name"],vr=[];function wr(e,t,n,o,i,r){return"function"==typeof e?e(t,n,"source"in r?{source:r.source}:{}):o!==i}var yr=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(e){var i;return(0,we.A)(this,n),i=t.call(this,e),(0,k.A)((0,fo.A)(i),"state",{resetCount:0}),(0,k.A)((0,fo.A)(i),"cancelRegisterFunc",null),(0,k.A)((0,fo.A)(i),"mounted",!1),(0,k.A)((0,fo.A)(i),"touched",!1),(0,k.A)((0,fo.A)(i),"dirty",!1),(0,k.A)((0,fo.A)(i),"validatePromise",void 0),(0,k.A)((0,fo.A)(i),"prevValidating",void 0),(0,k.A)((0,fo.A)(i),"errors",vr),(0,k.A)((0,fo.A)(i),"warnings",vr),(0,k.A)((0,fo.A)(i),"cancelRegister",(function(){var e=i.props,t=e.preserve,n=e.isListField,o=e.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(n,t,dr(o)),i.cancelRegisterFunc=null})),(0,k.A)((0,fo.A)(i),"getNamePath",(function(){var e=i.props,t=e.name,n=e.fieldContext.prefixName,o=void 0===n?[]:n;return void 0!==t?[].concat((0,tt.A)(o),(0,tt.A)(t)):[]})),(0,k.A)((0,fo.A)(i),"getRules",(function(){var e=i.props,t=e.rules,n=void 0===t?[]:t,o=e.fieldContext;return n.map((function(e){return"function"==typeof e?e(o):e}))})),(0,k.A)((0,fo.A)(i),"refresh",(function(){i.mounted&&i.setState((function(e){return{resetCount:e.resetCount+1}}))})),(0,k.A)((0,fo.A)(i),"metaCache",null),(0,k.A)((0,fo.A)(i),"triggerMetaEvent",(function(e){var t=i.props.onMetaChange;if(t){var n=(0,A.A)((0,A.A)({},i.getMeta()),{},{destroy:e});(0,u.A)(i.metaCache,n)||t(n),i.metaCache=n}else i.metaCache=null})),(0,k.A)((0,fo.A)(i),"onStoreChange",(function(e,t,n){var o=i.props,r=o.shouldUpdate,s=o.dependencies,a=void 0===s?[]:s,l=o.onReset,c=n.store,d=i.getNamePath(),h=i.getValue(e),p=i.getValue(c),m=t&&pr(t,d);switch("valueUpdate"!==n.type||"external"!==n.source||(0,u.A)(h,p)||(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=vr,i.warnings=vr,i.triggerMetaEvent()),n.type){case"reset":if(!t||m)return i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=vr,i.warnings=vr,i.triggerMetaEvent(),null==l||l(),void i.refresh();break;case"remove":if(r&&wr(r,e,c,h,p,n))return void i.reRender();break;case"setField":var g=n.data;if(m)return"touched"in g&&(i.touched=g.touched),"validating"in g&&!("originRCField"in g)&&(i.validatePromise=g.validating?Promise.resolve([]):null),"errors"in g&&(i.errors=g.errors||vr),"warnings"in g&&(i.warnings=g.warnings||vr),i.dirty=!0,i.triggerMetaEvent(),void i.reRender();if("value"in g&&pr(t,d,!0))return void i.reRender();if(r&&!d.length&&wr(r,e,c,h,p,n))return void i.reRender();break;case"dependenciesUpdate":if(a.map(dr).some((function(e){return pr(n.relatedFields,e)})))return void i.reRender();break;default:if(m||(!a.length||d.length||r)&&wr(r,e,c,h,p,n))return void i.reRender()}!0===r&&i.reRender()})),(0,k.A)((0,fo.A)(i),"validateRules",(function(e){var t=i.getNamePath(),n=i.getValue(),o=e||{},r=o.triggerName,s=o.validateOnly,a=void 0!==s&&s,l=Promise.resolve().then(Jo(Xo().mark((function o(){var s,a,c,u,d,h,p;return Xo().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i.mounted){o.next=2;break}return o.abrupt("return",[]);case 2:if(s=i.props,a=s.validateFirst,c=void 0!==a&&a,u=s.messageVariables,d=s.validateDebounce,h=i.getRules(),r&&(h=h.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||Ei(t).includes(r)}))),!d||!r){o.next=10;break}return o.next=8,new Promise((function(e){setTimeout(e,d)}));case 8:if(i.validatePromise===l){o.next=10;break}return o.abrupt("return",[]);case 10:return(p=lr(t,n,h,e,c,u)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vr;if(i.validatePromise===l){var t;i.validatePromise=null;var n=[],o=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,i=e.errors,r=void 0===i?vr:i;t?o.push.apply(o,(0,tt.A)(r)):n.push.apply(n,(0,tt.A)(r))})),i.errors=n,i.warnings=o,i.triggerMetaEvent(),i.reRender()}})),o.abrupt("return",p);case 13:case"end":return o.stop()}}),o)}))));return a||(i.validatePromise=l,i.dirty=!0,i.errors=vr,i.warnings=vr,i.triggerMetaEvent(),i.reRender()),l})),(0,k.A)((0,fo.A)(i),"isFieldValidating",(function(){return!!i.validatePromise})),(0,k.A)((0,fo.A)(i),"isFieldTouched",(function(){return i.touched})),(0,k.A)((0,fo.A)(i),"isFieldDirty",(function(){return!(!i.dirty&&void 0===i.props.initialValue)||void 0!==(0,i.props.fieldContext.getInternalHooks(wi).getInitialValue)(i.getNamePath())})),(0,k.A)((0,fo.A)(i),"getErrors",(function(){return i.errors})),(0,k.A)((0,fo.A)(i),"getWarnings",(function(){return i.warnings})),(0,k.A)((0,fo.A)(i),"isListField",(function(){return i.props.isListField})),(0,k.A)((0,fo.A)(i),"isList",(function(){return i.props.isList})),(0,k.A)((0,fo.A)(i),"isPreserve",(function(){return i.props.preserve})),(0,k.A)((0,fo.A)(i),"getMeta",(function(){return i.prevValidating=i.isFieldValidating(),{touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:null===i.validatePromise}})),(0,k.A)((0,fo.A)(i),"getOnlyChild",(function(e){if("function"==typeof e){var t=i.getMeta();return(0,A.A)((0,A.A)({},i.getOnlyChild(e(i.getControlled(),t,i.props.fieldContext))),{},{isFunction:!0})}var n=U(e);return 1===n.length&&o.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}})),(0,k.A)((0,fo.A)(i),"getValue",(function(e){var t=i.props.fieldContext.getFieldsValue,n=i.getNamePath();return(0,I.A)(e||t(!0),n)})),(0,k.A)((0,fo.A)(i),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.props,n=t.name,o=t.trigger,r=t.validateTrigger,s=t.getValueFromEvent,a=t.normalize,l=t.valuePropName,c=t.getValueProps,u=t.fieldContext,d=void 0!==r?r:u.validateTrigger,h=i.getNamePath(),p=u.getInternalHooks,m=u.getFieldsValue,g=p(wi).dispatch,f=i.getValue(),b=c||function(e){return(0,k.A)({},l,e)},v=e[o],w=void 0!==n?b(f):{},y=(0,A.A)((0,A.A)({},e),w);return y[o]=function(){var e;i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];e=s?s.apply(void 0,n):gr.apply(void 0,[l].concat(n)),a&&(e=a(e,f,m(!0))),e!==f&&g({type:"updateValue",namePath:h,value:e}),v&&v.apply(void 0,n)},Ei(d||[]).forEach((function(e){var t=y[e];y[e]=function(){t&&t.apply(void 0,arguments);var n=i.props.rules;n&&n.length&&g({type:"validateField",namePath:h,triggerName:e})}})),y})),e.fieldContext&&(0,(0,e.fieldContext.getInternalHooks)(wi).initEntityValue)((0,fo.A)(i)),i}return(0,ye.A)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var o=(0,n.getInternalHooks)(wi).registerField;this.cancelRegisterFunc=o(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,i=this.getOnlyChild(n),r=i.child;return i.isFunction?e=r:o.isValidElement(r)?e=o.cloneElement(r,this.getControlled(r.props)):((0,P.Ay)(!r,"`children` of Field is not validate ReactElement."),e=r),o.createElement(o.Fragment,{key:t},e)}}]),n}(o.Component);(0,k.A)(yr,"contextType",Ci),(0,k.A)(yr,"defaultProps",{trigger:"onChange",valuePropName:"value"});const Cr=function(e){var t,n=e.name,i=(0,F.A)(e,br),r=o.useContext(Ci),s=o.useContext(xi),a=void 0!==n?dr(n):void 0,l=null!==(t=i.isListField)&&void 0!==t?t:!!s,c="keep";return l||(c="_".concat((a||[]).join("_"))),o.createElement(yr,(0,g.A)({key:c,name:a,isListField:l},i,{fieldContext:r}))};var xr="__@field_split__";function Er(e){return e.map((function(e){return"".concat((0,S.A)(e),":").concat(e)})).join(xr)}var Sr=function(){function e(){(0,we.A)(this,e),(0,k.A)(this,"kvs",new Map)}return(0,ye.A)(e,[{key:"set",value:function(e,t){this.kvs.set(Er(e),t)}},{key:"get",value:function(e){return this.kvs.get(Er(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(Er(e))}},{key:"map",value:function(e){return(0,tt.A)(this.kvs.entries()).map((function(t){var n=(0,a.A)(t,2),o=n[0],i=n[1],r=o.split(xr);return e({key:r.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,a.A)(t,3),o=n[1],i=n[2];return"number"===o?Number(i):i})),value:i})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,o=t.value;return e[n.join(".")]=o,null})),e}}]),e}();const Ar=Sr;var kr=["name"],Rr=(0,ye.A)((function e(t){var n=this;(0,we.A)(this,e),(0,k.A)(this,"formHooked",!1),(0,k.A)(this,"forceRootUpdate",void 0),(0,k.A)(this,"subscribable",!0),(0,k.A)(this,"store",{}),(0,k.A)(this,"fieldEntities",[]),(0,k.A)(this,"initialValues",{}),(0,k.A)(this,"callbacks",{}),(0,k.A)(this,"validateMessages",null),(0,k.A)(this,"preserve",null),(0,k.A)(this,"lastValidatePromise",null),(0,k.A)(this,"getForm",(function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}})),(0,k.A)(this,"getInternalHooks",(function(e){return e===wi?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):((0,P.Ay)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)})),(0,k.A)(this,"useSubscribe",(function(e){n.subscribable=e})),(0,k.A)(this,"prevWithoutPreserves",null),(0,k.A)(this,"setInitialValues",(function(e,t){if(n.initialValues=e||{},t){var o,i=(0,nr.h)(e,n.store);null===(o=n.prevWithoutPreserves)||void 0===o||o.map((function(t){var n=t.key;i=(0,nr.A)(i,n,(0,I.A)(e,n))})),n.prevWithoutPreserves=null,n.updateStore(i)}})),(0,k.A)(this,"destroyForm",(function(e){if(e)n.updateStore({});else{var t=new Ar;n.getFieldEntities(!0).forEach((function(e){n.isMergedPreserve(e.isPreserve())||t.set(e.getNamePath(),!0)})),n.prevWithoutPreserves=t}})),(0,k.A)(this,"getInitialValue",(function(e){var t=(0,I.A)(n.initialValues,e);return e.length?(0,nr.h)(t):t})),(0,k.A)(this,"setCallbacks",(function(e){n.callbacks=e})),(0,k.A)(this,"setValidateMessages",(function(e){n.validateMessages=e})),(0,k.A)(this,"setPreserve",(function(e){n.preserve=e})),(0,k.A)(this,"watchList",[]),(0,k.A)(this,"registerWatch",(function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}})),(0,k.A)(this,"notifyWatch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,o,e)}))}})),(0,k.A)(this,"timeoutId",null),(0,k.A)(this,"warningUnhooked",(function(){})),(0,k.A)(this,"updateStore",(function(e){n.store=e})),(0,k.A)(this,"getFieldEntities",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities})),(0,k.A)(this,"getFieldsMap",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new Ar;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t})),(0,k.A)(this,"getFieldEntitiesForNamePathList",(function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=dr(e);return t.get(n)||{INVALIDATE_NAME_PATH:dr(e)}}))})),(0,k.A)(this,"getFieldsValue",(function(e,t){var o,i,r;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(o=e,i=t):e&&"object"===(0,S.A)(e)&&(r=e.strict,i=e.filter),!0===o&&!i)return n.store;var s=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),a=[];return s.forEach((function(e){var t,n,s,l,c="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(r){if(null!==(s=(l=e).isList)&&void 0!==s&&s.call(l))return}else if(!o&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(i){var u="getMeta"in e?e.getMeta():null;i(u)&&a.push(c)}else a.push(c)})),hr(n.store,a.map(dr))})),(0,k.A)(this,"getFieldValue",(function(e){n.warningUnhooked();var t=dr(e);return(0,I.A)(n.store,t)})),(0,k.A)(this,"getFieldsError",(function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:dr(e[n]),errors:[],warnings:[]}}))})),(0,k.A)(this,"getFieldError",(function(e){n.warningUnhooked();var t=dr(e);return n.getFieldsError([t])[0].errors})),(0,k.A)(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=dr(e);return n.getFieldsError([t])[0].warnings})),(0,k.A)(this,"isFieldsTouched",(function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i,r=t[0],s=t[1],a=!1;0===t.length?i=null:1===t.length?Array.isArray(r)?(i=r.map(dr),a=!1):(i=null,a=r):(i=r.map(dr),a=s);var l=n.getFieldEntities(!0),c=function(e){return e.isFieldTouched()};if(!i)return a?l.every((function(e){return c(e)||e.isList()})):l.some(c);var u=new Ar;i.forEach((function(e){u.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();i.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&u.update(n,(function(t){return[].concat((0,tt.A)(t),[e])}))}))}));var d=function(e){return e.some(c)},h=u.map((function(e){return e.value}));return a?h.every(d):h.some(d)})),(0,k.A)(this,"isFieldTouched",(function(e){return n.warningUnhooked(),n.isFieldsTouched([e])})),(0,k.A)(this,"isFieldsValidating",(function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var o=e.map(dr);return t.some((function(e){var t=e.getNamePath();return pr(o,t)&&e.isFieldValidating()}))})),(0,k.A)(this,"isFieldValidating",(function(e){return n.warningUnhooked(),n.isFieldsValidating([e])})),(0,k.A)(this,"resetWithFieldInitialValue",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new Ar,i=n.getFieldEntities(!0);i.forEach((function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var i=o.get(n)||new Set;i.add({entity:e,value:t}),o.set(n,i)}})),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach((function(t){var n,i=o.get(t);i&&(n=e).push.apply(n,(0,tt.A)((0,tt.A)(i).map((function(e){return e.entity}))))}))):e=i,e.forEach((function(e){if(void 0!==e.props.initialValue){var i=e.getNamePath();if(void 0!==n.getInitialValue(i))(0,P.Ay)(!1,"Form already set 'initialValues' with path '".concat(i.join("."),"'. Field can not overwrite it."));else{var r=o.get(i);if(r&&r.size>1)(0,P.Ay)(!1,"Multiple Field with path '".concat(i.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(r){var s=n.getFieldValue(i);e.isListField()||t.skipExist&&void 0!==s||n.updateStore((0,nr.A)(n.store,i,(0,tt.A)(r)[0].value))}}}}))})),(0,k.A)(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore((0,nr.h)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var o=e.map(dr);o.forEach((function(e){var t=n.getInitialValue(e);n.updateStore((0,nr.A)(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(t,o,{type:"reset"}),n.notifyWatch(o)})),(0,k.A)(this,"setFields",(function(e){n.warningUnhooked();var t=n.store,o=[];e.forEach((function(e){var i=e.name,r=(0,F.A)(e,kr),s=dr(i);o.push(s),"value"in r&&n.updateStore((0,nr.A)(n.store,s,r.value)),n.notifyObservers(t,[s],{type:"setField",data:e})})),n.notifyWatch(o)})),(0,k.A)(this,"getFields",(function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),o=e.getMeta(),i=(0,A.A)((0,A.A)({},o),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(i,"originRCField",{value:!0}),i}))})),(0,k.A)(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var o=e.getNamePath();void 0===(0,I.A)(n.store,o)&&n.updateStore((0,nr.A)(n.store,o,t))}})),(0,k.A)(this,"isMergedPreserve",(function(e){var t=void 0!==e?e:n.preserve;return null==t||t})),(0,k.A)(this,"registerField",(function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var o=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(o,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(o,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(i)&&(!o||r.length>1)){var s=o?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==s&&n.fieldEntities.every((function(e){return!mr(e.getNamePath(),t)}))){var a=n.store;n.updateStore((0,nr.A)(a,t,s,!0)),n.notifyObservers(a,[t],{type:"remove"}),n.triggerDependenciesUpdate(a,t)}}n.notifyWatch([t])}})),(0,k.A)(this,"dispatch",(function(e){switch(e.type){case"updateValue":var t=e.namePath,o=e.value;n.updateValue(t,o);break;case"validateField":var i=e.namePath,r=e.triggerName;n.validateFields([i],{triggerName:r})}})),(0,k.A)(this,"notifyObservers",(function(e,t,o){if(n.subscribable){var i=(0,A.A)((0,A.A)({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,i)}))}else n.forceRootUpdate()})),(0,k.A)(this,"triggerDependenciesUpdate",(function(e,t){var o=n.getDependencyChildrenFields(t);return o.length&&n.validateFields(o),n.notifyObservers(e,o,{type:"dependenciesUpdate",relatedFields:[t].concat((0,tt.A)(o))}),o})),(0,k.A)(this,"updateValue",(function(e,t){var o=dr(e),i=n.store;n.updateStore((0,nr.A)(n.store,o,t)),n.notifyObservers(i,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var r=n.triggerDependenciesUpdate(i,o),s=n.callbacks.onValuesChange;s&&s(hr(n.store,[o]),n.getFieldsValue()),n.triggerOnFieldsChange([o].concat((0,tt.A)(r)))})),(0,k.A)(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var o=(0,nr.h)(n.store,e);n.updateStore(o)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()})),(0,k.A)(this,"setFieldValue",(function(e,t){n.setFields([{name:e,value:t,errors:[],warnings:[]}])})),(0,k.A)(this,"getDependencyChildrenFields",(function(e){var t=new Set,o=[],i=new Ar;return n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=dr(t);i.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))})),function e(n){(i.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var i=n.getNamePath();n.isFieldDirty()&&i.length&&(o.push(i),e(i))}}))}(e),o})),(0,k.A)(this,"triggerOnFieldsChange",(function(e,t){var o=n.callbacks.onFieldsChange;if(o){var i=n.getFields();if(t){var r=new Ar;t.forEach((function(e){var t=e.name,n=e.errors;r.set(t,n)})),i.forEach((function(e){e.errors=r.get(e.name)||e.errors}))}var s=i.filter((function(t){var n=t.name;return pr(e,n)}));s.length&&o(s,i)}})),(0,k.A)(this,"validateFields",(function(e,t){var o,i;n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(o=e,i=t):i=e;var r=!!o,s=r?o.map(dr):[],a=[],l=String(Date.now()),c=new Set,u=i||{},d=u.recursive,h=u.dirty;n.getFieldEntities(!0).forEach((function(e){if(r||s.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!h||e.isFieldDirty())){var t=e.getNamePath();if(c.add(t.join(l)),!r||pr(s,t,d)){var o=e.validateRules((0,A.A)({validateMessages:(0,A.A)((0,A.A)({},tr),n.validateMessages)},i));a.push(o.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,o=[],i=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?i.push.apply(i,(0,tt.A)(n)):o.push.apply(o,(0,tt.A)(n))})),o.length?Promise.reject({name:t,errors:o,warnings:i}):{name:t,errors:o,warnings:i}})))}}}));var p=function(e){var t=!1,n=e.length,o=[];return e.length?new Promise((function(i,r){e.forEach((function(e,s){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,o[s]=e,n>0||(t&&r(o),i(o))}))}))})):Promise.resolve([])}(a);n.lastValidatePromise=p,p.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var m=p.then((function(){return n.lastValidatePromise===p?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(s),errorFields:t,outOfDate:n.lastValidatePromise!==p})}));m.catch((function(e){return e}));var g=s.filter((function(e){return c.has(e.join(l))}));return n.triggerOnFieldsChange(g),m})),(0,k.A)(this,"submit",(function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t}));const Mr=function(e){var t=o.useRef(),n=o.useState({}),i=(0,a.A)(n,2)[1];if(!t.current)if(e)t.current=e;else{var r=new Rr((function(){i({})}));t.current=r.getForm()}return[t.current]};var Tr=o.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}});const Ir=Tr;var Pr=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"];const Or=function(e,t){var n=e.name,i=e.initialValues,r=e.fields,s=e.form,l=e.preserve,c=e.children,u=e.component,d=void 0===u?"form":u,h=e.validateMessages,p=e.validateTrigger,m=void 0===p?"onChange":p,f=e.onValuesChange,b=e.onFieldsChange,v=e.onFinish,w=e.onFinishFailed,y=e.clearOnDestroy,C=(0,F.A)(e,Pr),x=o.useRef(null),E=o.useContext(Ir),k=Mr(s),R=(0,a.A)(k,1)[0],M=R.getInternalHooks(wi),T=M.useSubscribe,I=M.setInitialValues,P=M.setCallbacks,O=M.setValidateMessages,D=M.setPreserve,N=M.destroyForm;o.useImperativeHandle(t,(function(){return(0,A.A)((0,A.A)({},R),{},{nativeElement:x.current})})),o.useEffect((function(){return E.registerForm(n,R),function(){E.unregisterForm(n)}}),[E,R,n]),O((0,A.A)((0,A.A)({},E.validateMessages),h)),P({onValuesChange:f,onFieldsChange:function(e){if(E.triggerFormChange(n,e),b){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];b.apply(void 0,[e].concat(o))}},onFinish:function(e){E.triggerFormFinish(n,e),v&&v(e)},onFinishFailed:w}),D(l);var H,L=o.useRef(null);I(i,!L.current),L.current||(L.current=!0),o.useEffect((function(){return function(){return N(y)}}),[]);var $="function"==typeof c;H=$?c(R.getFieldsValue(!0),R):c,T(!$);var _=o.useRef();o.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==(0,S.A)(e)||"object"!==(0,S.A)(t))return!1;var n=Object.keys(e),o=Object.keys(t),i=new Set([].concat(n,o));return(0,tt.A)(i).every((function(n){var o=e[n],i=t[n];return"function"==typeof o&&"function"==typeof i||o===i}))})(_.current||[],r||[])||R.setFields(r||[]),_.current=r}),[r,R]);var z=o.useMemo((function(){return(0,A.A)((0,A.A)({},R),{},{validateTrigger:m})}),[R,m]),B=o.createElement(xi.Provider,{value:null},o.createElement(Ci.Provider,{value:z},H));return!1===d?B:o.createElement(d,(0,g.A)({},C,{ref:x,onSubmit:function(e){e.preventDefault(),e.stopPropagation(),R.submit()},onReset:function(e){var t;e.preventDefault(),R.resetFields(),null===(t=C.onReset)||void 0===t||t.call(C,e)}}),B)};function Dr(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}var Nr=o.forwardRef(Or);Nr.FormProvider=function(e){var t=e.validateMessages,n=e.onFormChange,i=e.onFormFinish,r=e.children,s=o.useContext(Tr),a=o.useRef({});return o.createElement(Tr.Provider,{value:(0,A.A)((0,A.A)({},s),{},{validateMessages:(0,A.A)((0,A.A)({},s.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:a.current}),s.triggerFormChange(e,t)},triggerFormFinish:function(e,t){i&&i(e,{values:t,forms:a.current}),s.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(a.current=(0,A.A)((0,A.A)({},a.current),{},(0,k.A)({},e,t))),s.registerForm(e,t)},unregisterForm:function(e){var t=(0,A.A)({},a.current);delete t[e],a.current=t,s.unregisterForm(e)}})},r)},Nr.Field=Cr,Nr.List=function(e){var t=e.name,n=e.initialValue,i=e.children,r=e.rules,s=e.validateTrigger,a=e.isListField,l=o.useContext(Ci),c=o.useContext(xi),u=o.useRef({keys:[],id:0}).current,d=o.useMemo((function(){var e=dr(l.prefixName)||[];return[].concat((0,tt.A)(e),(0,tt.A)(dr(t)))}),[l.prefixName,t]),h=o.useMemo((function(){return(0,A.A)((0,A.A)({},l),{},{prefixName:d})}),[l,d]),p=o.useMemo((function(){return{getKey:function(e){var t=d.length,n=e[t];return[u.keys[n],e.slice(t+1)]}}}),[d]);return"function"!=typeof i?((0,P.Ay)(!1,"Form.List only accepts function as children."),null):o.createElement(xi.Provider,{value:p},o.createElement(Ci.Provider,{value:h},o.createElement(Cr,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:r,validateTrigger:s,initialValue:n,isList:!0,isListField:null!=a?a:!!c},(function(e,t){var n=e.value,o=void 0===n?[]:n,r=e.onChange,s=l.getFieldValue,a=function(){return s(d||[])||[]},c={add:function(e,t){var n=a();t>=0&&t<=n.length?(u.keys=[].concat((0,tt.A)(u.keys.slice(0,t)),[u.id],(0,tt.A)(u.keys.slice(t))),r([].concat((0,tt.A)(n.slice(0,t)),[e],(0,tt.A)(n.slice(t))))):(u.keys=[].concat((0,tt.A)(u.keys),[u.id]),r([].concat((0,tt.A)(n),[e]))),u.id+=1},remove:function(e){var t=a(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(u.keys=u.keys.filter((function(e,t){return!n.has(t)})),r(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=a();e<0||e>=n.length||t<0||t>=n.length||(u.keys=fr(u.keys,e,t),r(fr(n,e,t)))}}},h=o||[];return Array.isArray(h)||(h=[]),i(h.map((function(e,t){var n=u.keys[t];return void 0===n&&(u.keys[t]=u.id,n=u.keys[t],u.id+=1),{name:t,key:n,isListField:!0}})),c,t)}))))},Nr.useForm=Mr,Nr.useWatch=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0],r=t[1],s=void 0===r?{}:r,l=function(e){return e&&!!e._init}(s)?{form:s}:s,c=l.form,u=(0,o.useState)(),d=(0,a.A)(u,2),h=d[0],p=d[1],m=(0,o.useMemo)((function(){return Dr(h)}),[h]),g=(0,o.useRef)(m);g.current=m;var f=(0,o.useContext)(Ci),b=c||f,v=b&&b._init,w=dr(i),y=(0,o.useRef)(w);return y.current=w,(0,o.useEffect)((function(){if(v){var e=b.getFieldsValue,t=(0,b.getInternalHooks)(wi).registerWatch,n=function(e,t){var n=l.preserve?t:e;return"function"==typeof i?i(n):(0,I.A)(n,y.current)},o=t((function(e,t){var o=n(e,t),i=Dr(o);g.current!==i&&(g.current=i,p(o))})),r=n(e(),e(!0));return h!==r&&p(r),o}}),[v]),h};const Hr=o.createContext({}),Lr=({children:e,status:t,override:n})=>{const i=o.useContext(Hr),r=o.useMemo((()=>{const e=Object.assign({},i);return n&&delete e.isFormItemInput,t&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[t,n,i]);return o.createElement(Hr.Provider,{value:r},e)},$r=o.createContext(void 0),_r=o.createContext(null),zr=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,Do.dF)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},(0,Do.dF)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,Do.dF)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},(0,Do.jk)(e))},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,go.zA)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`\n ${n}:not(${n}-disabled),\n ${t}:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`\n ${n}-checked:not(${n}-disabled),\n ${t}-checked:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function Fr(e,t){const n=Ro(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[zr(n)]}const Br=Ho("Checkbox",((e,{prefixCls:t})=>[Fr(t,e)]));function jr(e){const t=o.useRef(null),n=()=>{bt.A.cancel(t.current),t.current=null};return[()=>{n(),t.current=(0,bt.A)((()=>{t.current=null}))},o=>{t.current&&(o.stopPropagation(),n()),null==e||e(o)}]}const Wr=(e,t)=>{var n;const{prefixCls:i,className:r,rootClassName:s,children:a,indeterminate:l=!1,style:c,onMouseEnter:u,onMouseLeave:d,skipGroup:h=!1,disabled:p}=e,m=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:g,direction:b,checkbox:v}=o.useContext(ho.QO),w=o.useContext(_r),{isFormItemInput:y}=o.useContext(Hr),C=o.useContext(bi.A),x=null!==(n=(null==w?void 0:w.disabled)||p)&&void 0!==n?n:C,E=o.useRef(m.value),S=o.useRef(null),A=(0,f.K4)(t,S);o.useEffect((()=>{null==w||w.registerValue(m.value)}),[]),o.useEffect((()=>{if(!h)return m.value!==E.current&&(null==w||w.cancelValue(E.current),null==w||w.registerValue(m.value),E.current=m.value),()=>null==w?void 0:w.cancelValue(m.value)}),[m.value]),o.useEffect((()=>{var e;(null===(e=S.current)||void 0===e?void 0:e.input)&&(S.current.input.indeterminate=l)}),[l]);const k=g("checkbox",i),R=vi(k),[T,I,P]=Br(k,R),O=Object.assign({},m);w&&!h&&(O.onChange=(...e)=>{m.onChange&&m.onChange.apply(m,e),w.toggleOption&&w.toggleOption({label:a,value:m.value})},O.name=w.name,O.checked=w.value.includes(m.value));const D=M()(`${k}-wrapper`,{[`${k}-rtl`]:"rtl"===b,[`${k}-wrapper-checked`]:O.checked,[`${k}-wrapper-disabled`]:x,[`${k}-wrapper-in-form-item`]:y},null==v?void 0:v.className,r,s,P,R,I),N=M()({[`${k}-indeterminate`]:l},Fo,I),[H,L]=jr(O.onClick);return T(o.createElement(fi,{component:"Checkbox",disabled:x},o.createElement("label",{className:D,style:Object.assign(Object.assign({},null==v?void 0:v.style),c),onMouseEnter:u,onMouseLeave:d,onClick:H},o.createElement(uo,Object.assign({},O,{onClick:L,prefixCls:k,className:N,disabled:x,ref:A})),null!=a&&o.createElement("span",{className:`${k}-label`},a))))},Vr=o.forwardRef(Wr);const Gr=o.forwardRef(((e,t)=>{const{defaultValue:n,children:i,options:r=[],prefixCls:s,className:a,rootClassName:l,style:c,onChange:u}=e,d=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:h,direction:p}=o.useContext(ho.QO),[m,g]=o.useState(d.value||n||[]),[f,b]=o.useState([]);o.useEffect((()=>{"value"in d&&g(d.value||[])}),[d.value]);const v=o.useMemo((()=>r.map((e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e))),[r]),w=e=>{b((t=>t.filter((t=>t!==e))))},y=e=>{b((t=>[].concat((0,tt.A)(t),[e])))},C=e=>{const t=m.indexOf(e.value),n=(0,tt.A)(m);-1===t?n.push(e.value):n.splice(t,1),"value"in d||g(n),null==u||u(n.filter((e=>f.includes(e))).sort(((e,t)=>v.findIndex((t=>t.value===e))-v.findIndex((e=>e.value===t)))))},x=h("checkbox",s),E=`${x}-group`,S=vi(x),[A,k,R]=Br(x,S),T=Dn(d,["value","disabled"]),I=r.length?v.map((e=>o.createElement(Vr,{prefixCls:x,key:e.value.toString(),disabled:"disabled"in e?e.disabled:d.disabled,value:e.value,checked:m.includes(e.value),onChange:e.onChange,className:M()(`${E}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label))):i,P=o.useMemo((()=>({toggleOption:C,value:m,disabled:d.disabled,name:d.name,registerValue:y,cancelValue:w})),[C,m,d.disabled,d.name,y,w]),O=M()(E,{[`${E}-rtl`]:"rtl"===p},a,l,R,S,k);return A(o.createElement("div",Object.assign({className:O,style:c},T,{ref:t}),o.createElement(_r.Provider,{value:P},I)))})),Kr=Gr,Ur=Vr;Ur.Group=Kr,Ur.__ANT_CHECKBOX=!0;const qr=Ur,Yr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var Xr=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Yr}))};const Qr=o.forwardRef(Xr),Jr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var Zr=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Jr}))};const es=o.forwardRef(Zr),ts=o.createContext(null);var ns=[],os="rc-util-locker-".concat(Date.now()),is=0;var rs=!1,ss=function(e){return!1!==e&&((0,Te.A)()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},as=o.forwardRef((function(e,t){var n=e.open,i=e.autoLock,r=e.getContainer,s=(e.debug,e.autoDestroy),l=void 0===s||s,u=e.children,h=o.useState(n),p=(0,a.A)(h,2),m=p[0],g=p[1],b=m||n;o.useEffect((function(){(l||n)&&g(n)}),[n,l]);var v=o.useState((function(){return ss(r)})),w=(0,a.A)(v,2),y=w[0],C=w[1];o.useEffect((function(){var e=ss(r);C(null!=e?e:null)}));var x=function(e){var t=o.useState((function(){return(0,Te.A)()?document.createElement("div"):null})),n=(0,a.A)(t,1)[0],i=o.useRef(!1),r=o.useContext(ts),s=o.useState(ns),l=(0,a.A)(s,2),u=l[0],d=l[1],h=r||(i.current?void 0:function(e){d((function(t){return[e].concat((0,tt.A)(t))}))});function p(){n.parentElement||document.body.appendChild(n),i.current=!0}function m(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),i.current=!1}return(0,c.A)((function(){return e?r?r(p):p():m(),m}),[e]),(0,c.A)((function(){u.length&&(u.forEach((function(e){return e()})),d(ns))}),[u]),[n,h]}(b&&!y),E=(0,a.A)(x,2),S=E[0],A=E[1],k=null!=y?y:S;!function(e){var t=!!e,n=o.useState((function(){return is+=1,"".concat(os,"_").concat(is)})),i=(0,a.A)(n,1)[0];(0,c.A)((function(){if(t){var e=He(document.body).width,n=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;(0,Oe.BD)("\nhtml body {\n overflow-y: hidden;\n ".concat(n?"width: calc(100% - ".concat(e,"px);"):"","\n}"),i)}else(0,Oe.m6)(i);return function(){(0,Oe.m6)(i)}}),[t,i])}(i&&n&&(0,Te.A)()&&(k===S||k===document.body));var R=null;u&&(0,f.f3)(u)&&t&&(R=u.ref);var M=(0,f.xK)(R,t);if(!b||!(0,Te.A)()||void 0===y)return null;var T=!1===k||rs,I=u;return t&&(I=o.cloneElement(u,{ref:M})),o.createElement(ts.Provider,{value:A},T?I:(0,d.createPortal)(I,k))}));const ls=as;var cs=0,us=(0,A.A)({},i).useId;const ds=us?function(e){var t=us();return e||t}:function(e){var t=o.useState("ssr-id"),n=(0,a.A)(t,2),i=n[0],r=n[1];return o.useEffect((function(){var e=cs;cs+=1,r("rc_unique_".concat(e))}),[]),e||i},hs=function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))};function ps(e){var t=e.prefixCls,n=e.align,i=e.arrow,r=e.arrowPos,s=i||{},a=s.className,l=s.content,c=r.x,u=void 0===c?0:c,d=r.y,h=void 0===d?0:d,p=o.useRef();if(!n||!n.points)return null;var m={position:"absolute"};if(!1!==n.autoArrow){var g=n.points[0],f=n.points[1],b=g[0],v=g[1],w=f[0],y=f[1];b!==w&&["t","b"].includes(b)?"t"===b?m.top=0:m.bottom=0:m.top=h,v!==y&&["l","r"].includes(v)?"l"===v?m.left=0:m.right=0:m.left=u}return o.createElement("div",{ref:p,className:M()("".concat(t,"-arrow"),a),style:m},l)}function ms(e){var t=e.prefixCls,n=e.open,i=e.zIndex,r=e.mask,s=e.motion;return r?o.createElement(Bo.Ay,(0,g.A)({},s,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return o.createElement("div",{style:{zIndex:i},className:M()("".concat(t,"-mask"),n)})})):null}const gs=o.memo((function(e){return e.children}),(function(e,t){return t.cache}));var fs=o.forwardRef((function(e,t){var n=e.popup,i=e.className,r=e.prefixCls,s=e.style,l=e.target,u=e.onVisibleChanged,d=e.open,h=e.keepDom,p=e.fresh,m=e.onClick,b=e.mask,v=e.arrow,w=e.arrowPos,y=e.align,C=e.motion,x=e.maskMotion,E=e.forceRender,S=e.getPopupContainer,k=e.autoDestroy,R=e.portal,T=e.zIndex,I=e.onMouseEnter,P=e.onMouseLeave,O=e.onPointerEnter,D=e.onPointerDownCapture,N=e.ready,H=e.offsetX,L=e.offsetY,$=e.offsetR,_=e.offsetB,z=e.onAlign,F=e.onPrepare,B=e.stretch,j=e.targetWidth,W=e.targetHeight,V="function"==typeof n?n():n,G=d||h,K=(null==S?void 0:S.length)>0,U=o.useState(!S||!K),q=(0,a.A)(U,2),Y=q[0],X=q[1];if((0,c.A)((function(){!Y&&K&&l&&X(!0)}),[Y,K,l]),!Y)return null;var Q="auto",J={left:"-1000vw",top:"-1000vh",right:Q,bottom:Q};if(N||!d){var Z,ee=y.points,te=y.dynamicInset||(null===(Z=y._experimental)||void 0===Z?void 0:Z.dynamicInset),ne=te&&"r"===ee[0][1],oe=te&&"b"===ee[0][0];ne?(J.right=$,J.left=Q):(J.left=H,J.right=Q),oe?(J.bottom=_,J.top=Q):(J.top=L,J.bottom=Q)}var ie={};return B&&(B.includes("height")&&W?ie.height=W:B.includes("minHeight")&&W&&(ie.minHeight=W),B.includes("width")&&j?ie.width=j:B.includes("minWidth")&&j&&(ie.minWidth=j)),d||(ie.pointerEvents="none"),o.createElement(R,{open:E||G,getContainer:S&&function(){return S(l)},autoDestroy:k},o.createElement(ms,{prefixCls:r,open:d,zIndex:T,mask:b,motion:x}),o.createElement(Me,{onResize:z,disabled:!d},(function(e){return o.createElement(Bo.Ay,(0,g.A)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:"".concat(r,"-hidden")},C,{onAppearPrepare:F,onEnterPrepare:F,visible:d,onVisibleChanged:function(e){var t;null==C||null===(t=C.onVisibleChanged)||void 0===t||t.call(C,e),u(e)}}),(function(n,a){var l=n.className,c=n.style,u=M()(r,l,i);return o.createElement("div",{ref:(0,f.K4)(e,t,a),className:u,style:(0,A.A)((0,A.A)((0,A.A)((0,A.A)({"--arrow-x":"".concat(w.x||0,"px"),"--arrow-y":"".concat(w.y||0,"px")},J),ie),c),{},{boxSizing:"border-box",zIndex:T},s),onMouseEnter:I,onMouseLeave:P,onPointerEnter:O,onClick:m,onPointerDownCapture:D},v&&o.createElement(ps,{prefixCls:r,arrow:v,arrowPos:w,align:y}),o.createElement(gs,{cache:!d&&!p},V))}))})))}));const bs=fs,vs=o.forwardRef((function(e,t){var n=e.children,i=e.getTriggerDOMNode,r=(0,f.f3)(n),s=o.useCallback((function(e){(0,f.Xf)(t,i?i(e):e)}),[i]),a=(0,f.xK)(s,(0,f.A9)(n));return r?o.cloneElement(n,{ref:a}):n})),ws=o.createContext(null);function ys(e){return e?Array.isArray(e)?e:[e]:[]}function Cs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function xs(e,t,n,o){return t||(n?{motionName:"".concat(e,"-").concat(n)}:o?{motionName:o}:null)}function Es(e){return e.ownerDocument.defaultView}function Ss(e){for(var t=[],n=null==e?void 0:e.parentElement,o=["hidden","scroll","clip","auto"];n;){var i=Es(n).getComputedStyle(n);[i.overflowX,i.overflowY,i.overflow].some((function(e){return o.includes(e)}))&&t.push(n),n=n.parentElement}return t}function As(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function ks(e){return As(parseFloat(e),0)}function Rs(e,t){var n=(0,A.A)({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=Es(e).getComputedStyle(e),o=t.overflow,i=t.overflowClipMargin,r=t.borderTopWidth,s=t.borderBottomWidth,a=t.borderLeftWidth,l=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,h=e.offsetWidth,p=e.clientWidth,m=ks(r),g=ks(s),f=ks(a),b=ks(l),v=As(Math.round(c.width/h*1e3)/1e3),w=As(Math.round(c.height/u*1e3)/1e3),y=(h-p-f-b)*v,C=(u-d-m-g)*w,x=m*w,E=g*w,S=f*v,A=b*v,k=0,R=0;if("clip"===o){var M=ks(i);k=M*v,R=M*w}var T=c.x+S-k,I=c.y+x-R,P=T+c.width+2*k-S-A-y,O=I+c.height+2*R-x-E-C;n.left=Math.max(n.left,T),n.top=Math.max(n.top,I),n.right=Math.min(n.right,P),n.bottom=Math.min(n.bottom,O)}})),n}function Ms(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function Ts(e,t){var n=t||[],o=(0,a.A)(n,2),i=o[0],r=o[1];return[Ms(e.width,i),Ms(e.height,r)]}function Is(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function Ps(e,t){var n,o=t[0],i=t[1];return n="t"===o?e.y:"b"===o?e.y+e.height:e.y+e.height/2,{x:"l"===i?e.x:"r"===i?e.x+e.width:e.x+e.width/2,y:n}}function Os(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,o){return o===t?n[e]||"c":e})).join("")}var Ds=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const Ns=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ls,t=o.forwardRef((function(t,n){var i=t.prefixCls,r=void 0===i?"rc-trigger-popup":i,s=t.children,u=t.action,d=void 0===u?"hover":u,h=t.showAction,p=t.hideAction,m=t.popupVisible,g=t.defaultPopupVisible,f=t.onPopupVisibleChange,b=t.afterPopupVisibleChange,v=t.mouseEnterDelay,w=t.mouseLeaveDelay,y=void 0===w?.1:w,C=t.focusDelay,x=t.blurDelay,E=t.mask,S=t.maskClosable,k=void 0===S||S,R=t.getPopupContainer,T=t.forceRender,I=t.autoDestroy,P=t.destroyPopupOnHide,O=t.popup,D=t.popupClassName,N=t.popupStyle,H=t.popupPlacement,L=t.builtinPlacements,$=void 0===L?{}:L,_=t.popupAlign,z=t.zIndex,B=t.stretch,j=t.getPopupClassNameFromAlign,W=t.fresh,V=t.alignPoint,G=t.onPopupClick,K=t.onPopupAlign,U=t.arrow,Y=t.popupMotion,X=t.maskMotion,Q=t.popupTransitionName,J=t.popupAnimation,Z=t.maskTransitionName,ee=t.maskAnimation,te=t.className,ne=t.getTriggerDOMNode,oe=(0,F.A)(t,Ds),ie=I||P||!1,re=o.useState(!1),se=(0,a.A)(re,2),ae=se[0],le=se[1];(0,c.A)((function(){le(hs())}),[]);var ce=o.useRef({}),ue=o.useContext(ws),de=o.useMemo((function(){return{registerSubPopup:function(e,t){ce.current[e]=t,null==ue||ue.registerSubPopup(e,t)}}}),[ue]),he=ds(),pe=o.useState(null),me=(0,a.A)(pe,2),ge=me[0],fe=me[1],be=o.useRef(null),ve=(0,l.A)((function(e){be.current=e,(0,q.fk)(e)&&ge!==e&&fe(e),null==ue||ue.registerSubPopup(he,e)})),we=o.useState(null),ye=(0,a.A)(we,2),Ce=ye[0],xe=ye[1],Ee=o.useRef(null),Se=(0,l.A)((function(e){(0,q.fk)(e)&&Ce!==e&&(xe(e),Ee.current=e)})),Ae=o.Children.only(s),ke=(null==Ae?void 0:Ae.props)||{},Re={},Te=(0,l.A)((function(e){var t,n,o=Ce;return(null==o?void 0:o.contains(e))||(null===(t=hn(o))||void 0===t?void 0:t.host)===e||e===o||(null==ge?void 0:ge.contains(e))||(null===(n=hn(ge))||void 0===n?void 0:n.host)===e||e===ge||Object.values(ce.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),Ie=xs(r,Y,J,Q),Pe=xs(r,X,ee,Z),Oe=o.useState(g||!1),De=(0,a.A)(Oe,2),Ne=De[0],He=De[1],Le=null!=m?m:Ne,$e=(0,l.A)((function(e){void 0===m&&He(e)}));(0,c.A)((function(){He(m||!1)}),[m]);var _e=o.useRef(Le);_e.current=Le;var ze=o.useRef([]);ze.current=[];var Fe=(0,l.A)((function(e){var t;$e(e),(null!==(t=ze.current[ze.current.length-1])&&void 0!==t?t:Le)!==e&&(ze.current.push(e),null==f||f(e))})),Be=o.useRef(),je=function(){clearTimeout(Be.current)},We=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;je(),0===t?Fe(e):Be.current=setTimeout((function(){Fe(e)}),1e3*t)};o.useEffect((function(){return je}),[]);var Ve=o.useState(!1),Ge=(0,a.A)(Ve,2),Ke=Ge[0],Ue=Ge[1];(0,c.A)((function(e){e&&!Le||Ue(!0)}),[Le]);var Ye=o.useState(null),Xe=(0,a.A)(Ye,2),Qe=Xe[0],Je=Xe[1],Ze=o.useState(null),et=(0,a.A)(Ze,2),nt=et[0],ot=et[1],it=function(e){ot([e.clientX,e.clientY])},rt=function(e,t,n,i,r,s,u){var d=o.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:r[i]||{}}),h=(0,a.A)(d,2),p=h[0],m=h[1],g=o.useRef(0),f=o.useMemo((function(){return t?Ss(t):[]}),[t]),b=o.useRef({});e||(b.current={});var v=(0,l.A)((function(){if(t&&n&&e){var o,l,c,d,h,p=t,g=p.ownerDocument,v=Es(p),w=v.getComputedStyle(p).position,y=p.style.left,C=p.style.top,x=p.style.right,E=p.style.bottom,S=p.style.overflow,k=(0,A.A)((0,A.A)({},r[i]),s),R=g.createElement("div");if(null===(o=p.parentElement)||void 0===o||o.appendChild(R),R.style.left="".concat(p.offsetLeft,"px"),R.style.top="".concat(p.offsetTop,"px"),R.style.position=w,R.style.height="".concat(p.offsetHeight,"px"),R.style.width="".concat(p.offsetWidth,"px"),p.style.left="0",p.style.top="0",p.style.right="auto",p.style.bottom="auto",p.style.overflow="hidden",Array.isArray(n))h={x:n[0],y:n[1],width:0,height:0};else{var M,T,I=n.getBoundingClientRect();I.x=null!==(M=I.x)&&void 0!==M?M:I.left,I.y=null!==(T=I.y)&&void 0!==T?T:I.top,h={x:I.x,y:I.y,width:I.width,height:I.height}}var P=p.getBoundingClientRect(),O=v.getComputedStyle(p),D=O.height,N=O.width;P.x=null!==(l=P.x)&&void 0!==l?l:P.left,P.y=null!==(c=P.y)&&void 0!==c?c:P.top;var H=g.documentElement,L=H.clientWidth,$=H.clientHeight,_=H.scrollWidth,z=H.scrollHeight,F=H.scrollTop,B=H.scrollLeft,j=P.height,W=P.width,V=h.height,G=h.width,K={left:0,top:0,right:L,bottom:$},U={left:-B,top:-F,right:_-B,bottom:z-F},Y=k.htmlRegion,X="visible",Q="visibleFirst";"scroll"!==Y&&Y!==Q&&(Y=X);var J=Y===Q,Z=Rs(U,f),ee=Rs(K,f),te=Y===X?ee:Z,ne=J?ee:te;p.style.left="auto",p.style.top="auto",p.style.right="0",p.style.bottom="0";var oe=p.getBoundingClientRect();p.style.left=y,p.style.top=C,p.style.right=x,p.style.bottom=E,p.style.overflow=S,null===(d=p.parentElement)||void 0===d||d.removeChild(R);var ie=As(Math.round(W/parseFloat(N)*1e3)/1e3),re=As(Math.round(j/parseFloat(D)*1e3)/1e3);if(0===ie||0===re||(0,q.fk)(n)&&!qe(n))return;var se=k.offset,ae=k.targetOffset,le=Ts(P,se),ce=(0,a.A)(le,2),ue=ce[0],de=ce[1],he=Ts(h,ae),pe=(0,a.A)(he,2),me=pe[0],ge=pe[1];h.x-=me,h.y-=ge;var fe=k.points||[],be=(0,a.A)(fe,2),ve=be[0],we=Is(be[1]),ye=Is(ve),Ce=Ps(h,we),xe=Ps(P,ye),Ee=(0,A.A)({},k),Se=Ce.x-xe.x+ue,Ae=Ce.y-xe.y+de;function wt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:te,o=P.x+e,i=P.y+t,r=o+W,s=i+j,a=Math.max(o,n.left),l=Math.max(i,n.top),c=Math.min(r,n.right),u=Math.min(s,n.bottom);return Math.max(0,(c-a)*(u-l))}var ke,Re,Me,Te,Ie=wt(Se,Ae),Pe=wt(Se,Ae,ee),Oe=Ps(h,["t","l"]),De=Ps(P,["t","l"]),Ne=Ps(h,["b","r"]),He=Ps(P,["b","r"]),Le=k.overflow||{},$e=Le.adjustX,_e=Le.adjustY,ze=Le.shiftX,Fe=Le.shiftY,Be=function(e){return"boolean"==typeof e?e:e>=0};function yt(){ke=P.y+Ae,Re=ke+j,Me=P.x+Se,Te=Me+W}yt();var je=Be(_e),We=ye[0]===we[0];if(je&&"t"===ye[0]&&(Re>ne.bottom||b.current.bt)){var Ve=Ae;We?Ve-=j-V:Ve=Oe.y-He.y-de;var Ge=wt(Se,Ve),Ke=wt(Se,Ve,ee);Ge>Ie||Ge===Ie&&(!J||Ke>=Pe)?(b.current.bt=!0,Ae=Ve,de=-de,Ee.points=[Os(ye,0),Os(we,0)]):b.current.bt=!1}if(je&&"b"===ye[0]&&(ke<ne.top||b.current.tb)){var Ue=Ae;We?Ue+=j-V:Ue=Ne.y-De.y-de;var Ye=wt(Se,Ue),Xe=wt(Se,Ue,ee);Ye>Ie||Ye===Ie&&(!J||Xe>=Pe)?(b.current.tb=!0,Ae=Ue,de=-de,Ee.points=[Os(ye,0),Os(we,0)]):b.current.tb=!1}var Qe=Be($e),Je=ye[1]===we[1];if(Qe&&"l"===ye[1]&&(Te>ne.right||b.current.rl)){var Ze=Se;Je?Ze-=W-G:Ze=Oe.x-He.x-ue;var et=wt(Ze,Ae),tt=wt(Ze,Ae,ee);et>Ie||et===Ie&&(!J||tt>=Pe)?(b.current.rl=!0,Se=Ze,ue=-ue,Ee.points=[Os(ye,1),Os(we,1)]):b.current.rl=!1}if(Qe&&"r"===ye[1]&&(Me<ne.left||b.current.lr)){var nt=Se;Je?nt+=W-G:nt=Ne.x-De.x-ue;var ot=wt(nt,Ae),it=wt(nt,Ae,ee);ot>Ie||ot===Ie&&(!J||it>=Pe)?(b.current.lr=!0,Se=nt,ue=-ue,Ee.points=[Os(ye,1),Os(we,1)]):b.current.lr=!1}yt();var rt=!0===ze?0:ze;"number"==typeof rt&&(Me<ee.left&&(Se-=Me-ee.left-ue,h.x+G<ee.left+rt&&(Se+=h.x-ee.left+G-rt)),Te>ee.right&&(Se-=Te-ee.right-ue,h.x>ee.right-rt&&(Se+=h.x-ee.right+rt)));var st=!0===Fe?0:Fe;"number"==typeof st&&(ke<ee.top&&(Ae-=ke-ee.top-de,h.y+V<ee.top+st&&(Ae+=h.y-ee.top+V-st)),Re>ee.bottom&&(Ae-=Re-ee.bottom-de,h.y>ee.bottom-st&&(Ae+=h.y-ee.bottom+st)));var at=P.x+Se,lt=at+W,ct=P.y+Ae,ut=ct+j,dt=h.x,ht=dt+G,pt=h.y,mt=pt+V,gt=(Math.max(at,dt)+Math.min(lt,ht))/2-at,ft=(Math.max(ct,pt)+Math.min(ut,mt))/2-ct;null==u||u(t,Ee);var bt=oe.right-P.x-(Se+P.width),vt=oe.bottom-P.y-(Ae+P.height);1===ie&&(Se=Math.round(Se),bt=Math.round(bt)),1===re&&(Ae=Math.round(Ae),vt=Math.round(vt)),m({ready:!0,offsetX:Se/ie,offsetY:Ae/re,offsetR:bt/ie,offsetB:vt/re,arrowX:gt/ie,arrowY:ft/re,scaleX:ie,scaleY:re,align:Ee})}})),w=function(){m((function(e){return(0,A.A)((0,A.A)({},e),{},{ready:!1})}))};return(0,c.A)(w,[i]),(0,c.A)((function(){e||w()}),[e]),[p.ready,p.offsetX,p.offsetY,p.offsetR,p.offsetB,p.arrowX,p.arrowY,p.scaleX,p.scaleY,p.align,function(){g.current+=1;var e=g.current;Promise.resolve().then((function(){g.current===e&&v()}))}]}(Le,ge,V&&null!==nt?nt:Ce,H,$,_,K),st=(0,a.A)(rt,11),at=st[0],lt=st[1],ct=st[2],ut=st[3],dt=st[4],ht=st[5],pt=st[6],mt=st[7],gt=st[8],ft=st[9],bt=st[10],vt=function(e,t,n,i){return o.useMemo((function(){var o=ys(null!=n?n:t),r=ys(null!=i?i:t),s=new Set(o),a=new Set(r);return e&&(s.has("hover")&&(s.delete("hover"),s.add("click")),a.has("hover")&&(a.delete("hover"),a.add("click"))),[s,a]}),[e,t,n,i])}(ae,d,h,p),wt=(0,a.A)(vt,2),yt=wt[0],Ct=wt[1],xt=yt.has("click"),Et=Ct.has("click")||Ct.has("contextMenu"),St=(0,l.A)((function(){Ke||bt()}));!function(e,t,n,o){(0,c.A)((function(){if(e&&t&&n){var i=n,r=Ss(t),s=Ss(i),a=Es(i),l=new Set([a].concat((0,tt.A)(r),(0,tt.A)(s)));function c(){o(),_e.current&&V&&Et&&We(!1)}return l.forEach((function(e){e.addEventListener("scroll",c,{passive:!0})})),a.addEventListener("resize",c,{passive:!0}),o(),function(){l.forEach((function(e){e.removeEventListener("scroll",c),a.removeEventListener("resize",c)}))}}}),[e,t,n])}(Le,Ce,ge,St),(0,c.A)((function(){St()}),[nt,H]),(0,c.A)((function(){!Le||null!=$&&$[H]||St()}),[JSON.stringify(_)]);var At=o.useMemo((function(){var e=function(e,t,n,o){for(var i=n.points,r=Object.keys(e),s=0;s<r.length;s+=1){var a,l=r[s];if(Cs(null===(a=e[l])||void 0===a?void 0:a.points,i,o))return"".concat(t,"-placement-").concat(l)}return""}($,r,ft,V);return M()(e,null==j?void 0:j(ft))}),[ft,j,$,r,V]);o.useImperativeHandle(n,(function(){return{nativeElement:Ee.current,popupElement:be.current,forceAlign:St}}));var kt=o.useState(0),Rt=(0,a.A)(kt,2),Mt=Rt[0],Tt=Rt[1],It=o.useState(0),Pt=(0,a.A)(It,2),Ot=Pt[0],Dt=Pt[1],Nt=function(){if(B&&Ce){var e=Ce.getBoundingClientRect();Tt(e.width),Dt(e.height)}};function Ht(e,t,n,o){Re[e]=function(i){var r;null==o||o(i),We(t,n);for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];null===(r=ke[e])||void 0===r||r.call.apply(r,[ke,i].concat(a))}}(0,c.A)((function(){Qe&&(bt(),Qe(),Je(null))}),[Qe]),(xt||Et)&&(Re.onClick=function(e){var t;_e.current&&Et?We(!1):!_e.current&&xt&&(it(e),We(!0));for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];null===(t=ke.onClick)||void 0===t||t.call.apply(t,[ke,e].concat(o))});var Lt,$t,_t=function(e,t,n,i,r,s,a,l){var c=o.useRef(e);c.current=e;var u=o.useRef(!1);return o.useEffect((function(){if(t&&i&&(!r||s)){var e=function(){u.current=!1},o=function(e){var t;!c.current||a((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)||u.current||l(!1)},d=Es(i);d.addEventListener("pointerdown",e,!0),d.addEventListener("mousedown",o,!0),d.addEventListener("contextmenu",o,!0);var h=hn(n);return h&&(h.addEventListener("mousedown",o,!0),h.addEventListener("contextmenu",o,!0)),function(){d.removeEventListener("pointerdown",e,!0),d.removeEventListener("mousedown",o,!0),d.removeEventListener("contextmenu",o,!0),h&&(h.removeEventListener("mousedown",o,!0),h.removeEventListener("contextmenu",o,!0))}}}),[t,n,i,r,s]),function(){u.current=!0}}(Le,Et,Ce,ge,E,k,Te,We),zt=yt.has("hover"),Ft=Ct.has("hover");zt&&(Ht("onMouseEnter",!0,v,(function(e){it(e)})),Ht("onPointerEnter",!0,v,(function(e){it(e)})),Lt=function(e){(Le||Ke)&&null!=ge&&ge.contains(e.target)&&We(!0,v)},V&&(Re.onMouseMove=function(e){var t;null===(t=ke.onMouseMove)||void 0===t||t.call(ke,e)})),Ft&&(Ht("onMouseLeave",!1,y),Ht("onPointerLeave",!1,y),$t=function(){We(!1,y)}),yt.has("focus")&&Ht("onFocus",!0,C),Ct.has("focus")&&Ht("onBlur",!1,x),yt.has("contextMenu")&&(Re.onContextMenu=function(e){var t;_e.current&&Ct.has("contextMenu")?We(!1):(it(e),We(!0)),e.preventDefault();for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];null===(t=ke.onContextMenu)||void 0===t||t.call.apply(t,[ke,e].concat(o))}),te&&(Re.className=M()(ke.className,te));var Bt=(0,A.A)((0,A.A)({},ke),Re),jt={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){oe[e]&&(jt[e]=function(){for(var t,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];null===(t=Bt[e])||void 0===t||t.call.apply(t,[Bt].concat(o)),oe[e].apply(oe,o)})}));var Wt=o.cloneElement(Ae,(0,A.A)((0,A.A)({},Bt),jt)),Vt={x:ht,y:pt},Gt=U?(0,A.A)({},!0!==U?U:{}):null;return o.createElement(o.Fragment,null,o.createElement(Me,{disabled:!Le,ref:Se,onResize:function(){Nt(),St()}},o.createElement(vs,{getTriggerDOMNode:ne},Wt)),o.createElement(ws.Provider,{value:de},o.createElement(bs,{portal:e,ref:ve,prefixCls:r,popup:O,className:M()(D,At),style:N,target:Ce,onMouseEnter:Lt,onMouseLeave:$t,onPointerEnter:Lt,zIndex:z,open:Le,keepDom:Ke,fresh:W,onClick:G,onPointerDownCapture:_t,mask:E,motion:Ie,maskMotion:Pe,onVisibleChanged:function(e){Ue(!1),bt(),null==b||b(e)},onPrepare:function(){return new Promise((function(e){Nt(),Je((function(){return e}))}))},forceRender:T,autoDestroy:ie,getPopupContainer:R,align:ft,arrow:Gt,arrowPos:Vt,ready:at,offsetX:lt,offsetY:ct,offsetR:ut,offsetB:dt,onAlign:St,stretch:B,targetWidth:Mt/mt,targetHeight:Ot/gt})))}));return t}(ls);var Hs={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Hs.F1&&t<=Hs.F12)return!1;switch(t){case Hs.ALT:case Hs.CAPS_LOCK:case Hs.CONTEXT_MENU:case Hs.CTRL:case Hs.DOWN:case Hs.END:case Hs.ESC:case Hs.HOME:case Hs.INSERT:case Hs.LEFT:case Hs.MAC_FF_META:case Hs.META:case Hs.NUMLOCK:case Hs.NUM_CENTER:case Hs.PAGE_DOWN:case Hs.PAGE_UP:case Hs.PAUSE:case Hs.PRINT_SCREEN:case Hs.RIGHT:case Hs.SHIFT:case Hs.UP:case Hs.WIN_KEY:case Hs.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Hs.ZERO&&e<=Hs.NINE)return!0;if(e>=Hs.NUM_ZERO&&e<=Hs.NUM_MULTIPLY)return!0;if(e>=Hs.A&&e<=Hs.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Hs.SPACE:case Hs.QUESTION_MARK:case Hs.NUM_PLUS:case Hs.NUM_MINUS:case Hs.NUM_PERIOD:case Hs.NUM_DIVISION:case Hs.SEMICOLON:case Hs.DASH:case Hs.EQUALS:case Hs.COMMA:case Hs.PERIOD:case Hs.SLASH:case Hs.APOSTROPHE:case Hs.SINGLE_QUOTE:case Hs.OPEN_SQUARE_BRACKET:case Hs.BACKSLASH:case Hs.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const Ls=Hs;var $s=Ls.ESC,_s=Ls.TAB;const zs=(0,o.forwardRef)((function(e,t){var n=e.overlay,i=e.arrow,r=e.prefixCls,s=(0,o.useMemo)((function(){return"function"==typeof n?n():n}),[n]),a=(0,f.K4)(t,(0,f.A9)(s));return o.createElement(o.Fragment,null,i&&o.createElement("div",{className:"".concat(r,"-arrow")}),o.cloneElement(s,{ref:(0,f.f3)(s)?a:void 0}))}));var Fs={adjustX:1,adjustY:1},Bs=[0,0];const js={topLeft:{points:["bl","tl"],overflow:Fs,offset:[0,-4],targetOffset:Bs},top:{points:["bc","tc"],overflow:Fs,offset:[0,-4],targetOffset:Bs},topRight:{points:["br","tr"],overflow:Fs,offset:[0,-4],targetOffset:Bs},bottomLeft:{points:["tl","bl"],overflow:Fs,offset:[0,4],targetOffset:Bs},bottom:{points:["tc","bc"],overflow:Fs,offset:[0,4],targetOffset:Bs},bottomRight:{points:["tr","br"],overflow:Fs,offset:[0,4],targetOffset:Bs}};var Ws=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Vs(e,t){var n,i=e.arrow,r=void 0!==i&&i,s=e.prefixCls,l=void 0===s?"rc-dropdown":s,c=e.transitionName,u=e.animation,d=e.align,h=e.placement,p=void 0===h?"bottomLeft":h,m=e.placements,b=void 0===m?js:m,v=e.getPopupContainer,w=e.showAction,y=e.hideAction,C=e.overlayClassName,x=e.overlayStyle,E=e.visible,S=e.trigger,A=void 0===S?["hover"]:S,R=e.autoFocus,T=e.overlay,I=e.children,P=e.onVisibleChange,O=(0,F.A)(e,Ws),D=o.useState(),N=(0,a.A)(D,2),H=N[0],L=N[1],$="visible"in e?E:H,_=o.useRef(null),z=o.useRef(null),B=o.useRef(null);o.useImperativeHandle(t,(function(){return _.current}));var j=function(e){L(e),null==P||P(e)};!function(e){var t=e.visible,n=e.triggerRef,i=e.onVisibleChange,r=e.autoFocus,s=e.overlayRef,a=o.useRef(!1),l=function(){var e,o;t&&(null===(e=n.current)||void 0===e||null===(o=e.focus)||void 0===o||o.call(e),null==i||i(!1))},c=function(){var e;return!(null===(e=s.current)||void 0===e||!e.focus||(s.current.focus(),a.current=!0,0))},u=function(e){switch(e.keyCode){case $s:l();break;case _s:var t=!1;a.current||(t=c()),t?e.preventDefault():l()}};o.useEffect((function(){return t?(window.addEventListener("keydown",u),r&&(0,bt.A)(c,3),function(){window.removeEventListener("keydown",u),a.current=!1}):function(){a.current=!1}}),[t])}({visible:$,triggerRef:B,onVisibleChange:j,autoFocus:R,overlayRef:z});var W,V,G,K=function(){return o.createElement(zs,{ref:z,overlay:T,prefixCls:l,arrow:r})},U=o.cloneElement(I,{className:M()(null===(n=I.props)||void 0===n?void 0:n.className,$&&(W=e.openClassName,void 0!==W?W:"".concat(l,"-open"))),ref:(0,f.f3)(I)?(0,f.K4)(B,(0,f.A9)(I)):void 0}),q=y;return q||-1===A.indexOf("contextMenu")||(q=["click"]),o.createElement(Ns,(0,g.A)({builtinPlacements:b},O,{prefixCls:l,ref:_,popupClassName:M()(C,(0,k.A)({},"".concat(l,"-show-arrow"),r)),popupStyle:x,action:A,showAction:w,hideAction:q,popupPlacement:p,popupAlign:d,popupTransitionName:c,popupAnimation:u,popupVisible:$,stretch:(V=e.minOverlayWidthMatchTrigger,G=e.alignPoint,("minOverlayWidthMatchTrigger"in e?V:!G)?"minWidth":""),popup:"function"==typeof T?K:K(),onPopupVisibleChange:j,onPopupClick:function(t){var n=e.onOverlayClick;L(!1),n&&n(t)},getPopupContainer:v}),U)}const Gs=o.forwardRef(Vs),Ks=o.createContext(void 0),Us=100,qs={Modal:Us,Drawer:Us,Popover:Us,Popconfirm:Us,Tooltip:Us,Tour:Us,FloatButton:Us},Ys={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},Xs=(e,t)=>{const[,n]=(0,No.Ay)(),i=o.useContext(Ks),r=e in qs;let s;if(void 0!==t)s=[t,t];else{let o=null!=i?i:0;o+=r?(i?0:n.zIndexPopupBase)+qs[e]:Ys[e],s=[void 0===i?t:o,o]}return s};function Qs(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:o}=e,i=t/2,r=i,s=1*o/Math.sqrt(2),a=i-o*(1-1/Math.sqrt(2)),l=i-n*(1/Math.sqrt(2)),c=o*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),u=2*i-l,d=c,h=2*i-s,p=a,m=2*i-0,g=r,f=i*Math.sqrt(2)+o*(Math.sqrt(2)-2),b=o*(Math.sqrt(2)-1);return{arrowShadowWidth:f,arrowPath:`path('M 0 ${r} A ${o} ${o} 0 0 0 ${s} ${a} L ${l} ${c} A ${n} ${n} 0 0 1 ${u} ${d} L ${h} ${p} A ${o} ${o} 0 0 0 ${m} ${g} Z')`,arrowPolygon:`polygon(${b}px 100%, 50% ${b}px, ${2*i-b}px 100%, ${b}px 100%)`}}const Js=(e,t,n)=>{const{sizePopupArrow:o,arrowPolygon:i,arrowPath:r,arrowShadowWidth:s,borderRadiusXS:a,calc:l}=e;return{pointerEvents:"none",width:o,height:o,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:o,height:l(o).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,r]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,go.zA)(a)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}};function Zs(e){const{contentRadius:t,limitVerticalRadius:n}=e,o=t>12?t+2:12;return{arrowOffsetHorizontal:o,arrowOffsetVertical:n?8:o}}function ea(e,t){return e?t:{}}function ta(e,t,n){const{componentCls:o,boxShadowPopoverArrow:i,arrowOffsetVertical:r,arrowOffsetHorizontal:s}=e,{arrowDistance:a=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[o]:Object.assign(Object.assign(Object.assign(Object.assign({[`${o}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},Js(e,t,i)),{"&:before":{background:t}})]},ea(!!l.top,{[[`&-placement-top > ${o}-arrow`,`&-placement-topLeft > ${o}-arrow`,`&-placement-topRight > ${o}-arrow`].join(",")]:{bottom:a,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${o}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":s,[`> ${o}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,go.zA)(s)})`,[`> ${o}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),ea(!!l.bottom,{[[`&-placement-bottom > ${o}-arrow`,`&-placement-bottomLeft > ${o}-arrow`,`&-placement-bottomRight > ${o}-arrow`].join(",")]:{top:a,transform:"translateY(-100%)"},[`&-placement-bottom > ${o}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":s,[`> ${o}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,go.zA)(s)})`,[`> ${o}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),ea(!!l.left,{[[`&-placement-left > ${o}-arrow`,`&-placement-leftTop > ${o}-arrow`,`&-placement-leftBottom > ${o}-arrow`].join(",")]:{right:{_skip_check_:!0,value:a},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${o}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${o}-arrow`]:{top:r},[`&-placement-leftBottom > ${o}-arrow`]:{bottom:r}})),ea(!!l.right,{[[`&-placement-right > ${o}-arrow`,`&-placement-rightTop > ${o}-arrow`,`&-placement-rightBottom > ${o}-arrow`].join(",")]:{left:{_skip_check_:!0,value:a},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${o}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${o}-arrow`]:{top:r},[`&-placement-rightBottom > ${o}-arrow`]:{bottom:r}}))}}const na={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},oa={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},ia=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function ra(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:o,offset:i,borderRadius:r,visibleFirst:s}=e,a=t/2,l={};return Object.keys(na).forEach((e=>{const c=o&&oa[e]||na[e],u=Object.assign(Object.assign({},c),{offset:[0,0],dynamicInset:!0});switch(l[e]=u,ia.has(e)&&(u.autoArrow=!1),e){case"top":case"topLeft":case"topRight":u.offset[1]=-a-i;break;case"bottom":case"bottomLeft":case"bottomRight":u.offset[1]=a+i;break;case"left":case"leftTop":case"leftBottom":u.offset[0]=-a-i;break;case"right":case"rightTop":case"rightBottom":u.offset[0]=a+i}const d=Zs({contentRadius:r,limitVerticalRadius:!0});if(o)switch(e){case"topLeft":case"bottomLeft":u.offset[0]=-d.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":u.offset[0]=d.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":u.offset[1]=2*-d.arrowOffsetHorizontal+a;break;case"leftBottom":case"rightBottom":u.offset[1]=2*d.arrowOffsetHorizontal-a}u.overflow=function(e,t,n,o){if(!1===o)return{adjustX:!1,adjustY:!1};const i=o&&"object"==typeof o?o:{},r={};switch(e){case"top":case"bottom":r.shiftX=2*t.arrowOffsetHorizontal+n,r.shiftY=!0,r.adjustY=!0;break;case"left":case"right":r.shiftY=2*t.arrowOffsetVertical+n,r.shiftX=!0,r.adjustX=!0}const s=Object.assign(Object.assign({},r),i);return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}(e,d,t,n),s&&(u.htmlRegion="visibleFirst")})),l}var sa=n(82345);const aa=(e,t,n,i,r)=>function(e){return t=>o.createElement(sa.Ay,{theme:{token:{motion:!1,zIndexPopupBase:0}}},o.createElement(e,Object.assign({},t)))}((s=>{const{prefixCls:a,style:l}=s,c=o.useRef(null),[u,d]=o.useState(0),[h,p]=o.useState(0),[m,g]=(0,so.A)(!1,{value:s.open}),{getPrefixCls:f}=o.useContext(ho.QO),b=f(i||"select",a);o.useEffect((()=>{if(g(!0),"undefined"!=typeof ResizeObserver){const e=new ResizeObserver((e=>{const t=e[0].target;d(t.offsetHeight+8),p(t.offsetWidth)})),t=setInterval((()=>{var n;const o=r?`.${r(b)}`:`.${b}-dropdown`,i=null===(n=c.current)||void 0===n?void 0:n.querySelector(o);i&&(clearInterval(t),e.observe(i))}),10);return()=>{clearInterval(t),e.disconnect()}}}),[]);let v=Object.assign(Object.assign({},s),{style:Object.assign(Object.assign({},l),{margin:0}),open:m,visible:m,getPopupContainer:()=>c.current});n&&(v=n(v)),t&&Object.assign(v,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const w={paddingBottom:u,position:"relative",minWidth:h};return o.createElement("div",{ref:c,style:w},o.createElement(e,Object.assign({},v)))}));var la=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ca=void 0;function ua(e,t){var n=e.prefixCls,i=e.invalidate,r=e.item,s=e.renderItem,a=e.responsive,l=e.responsiveDisabled,c=e.registerSize,u=e.itemKey,d=e.className,h=e.style,p=e.children,m=e.display,f=e.order,b=e.component,v=void 0===b?"div":b,w=(0,F.A)(e,la),y=a&&!m;function C(e){c(u,e)}o.useEffect((function(){return function(){C(null)}}),[]);var x,E=s&&r!==ca?s(r,{index:f}):p;i||(x={opacity:y?0:1,height:y?0:ca,overflowY:y?"hidden":ca,order:a?f:ca,pointerEvents:y?"none":ca,position:y?"absolute":ca});var S={};y&&(S["aria-hidden"]=!0);var k=o.createElement(v,(0,g.A)({className:M()(!i&&n,d),style:(0,A.A)((0,A.A)({},x),h)},S,w,{ref:t}),E);return a&&(k=o.createElement(Me,{onResize:function(e){C(e.offsetWidth)},disabled:l},k)),k}var da=o.forwardRef(ua);da.displayName="Item";const ha=da;function pa(e,t){var n=o.useState(t),i=(0,a.A)(n,2),r=i[0],s=i[1];return[r,(0,l.A)((function(t){e((function(){s(t)}))}))]}var ma=o.createContext(null),ga=["component"],fa=["className"],ba=["className"],va=function(e,t){var n=o.useContext(ma);if(!n){var i=e.component,r=void 0===i?"div":i,s=(0,F.A)(e,ga);return o.createElement(r,(0,g.A)({},s,{ref:t}))}var a=n.className,l=(0,F.A)(n,fa),c=e.className,u=(0,F.A)(e,ba);return o.createElement(ma.Provider,{value:null},o.createElement(ha,(0,g.A)({ref:t,className:M()(a,c)},l,u)))},wa=o.forwardRef(va);wa.displayName="RawItem";const ya=wa;var Ca=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],xa="responsive",Ea="invalidate";function Sa(e){return"+ ".concat(e.length," ...")}function Aa(e,t){var n,i=e.prefixCls,r=void 0===i?"rc-overflow":i,s=e.data,l=void 0===s?[]:s,u=e.renderItem,h=e.renderRawItem,p=e.itemKey,m=e.itemWidth,f=void 0===m?10:m,b=e.ssr,v=e.style,w=e.className,y=e.maxCount,C=e.renderRest,x=e.renderRawRest,E=e.suffix,S=e.component,k=void 0===S?"div":S,R=e.itemComponent,T=e.onVisibleChange,I=(0,F.A)(e,Ca),P="full"===b,O=(n=o.useRef(null),function(e){n.current||(n.current=[],function(e){if("undefined"==typeof MessageChannel)(0,bt.A)(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,d.unstable_batchedUpdates)((function(){n.current.forEach((function(e){e()})),n.current=null}))}))),n.current.push(e)}),D=pa(O,null),N=(0,a.A)(D,2),H=N[0],L=N[1],$=H||0,_=pa(O,new Map),z=(0,a.A)(_,2),B=z[0],j=z[1],W=pa(O,0),V=(0,a.A)(W,2),G=V[0],K=V[1],U=pa(O,0),q=(0,a.A)(U,2),Y=q[0],X=q[1],Q=pa(O,0),J=(0,a.A)(Q,2),Z=J[0],ee=J[1],te=(0,o.useState)(null),ne=(0,a.A)(te,2),oe=ne[0],ie=ne[1],re=(0,o.useState)(null),se=(0,a.A)(re,2),ae=se[0],le=se[1],ce=o.useMemo((function(){return null===ae&&P?Number.MAX_SAFE_INTEGER:ae||0}),[ae,H]),ue=(0,o.useState)(!1),de=(0,a.A)(ue,2),he=de[0],pe=de[1],me="".concat(r,"-item"),ge=Math.max(G,Y),fe=y===xa,be=l.length&&fe,ve=y===Ea,we=be||"number"==typeof y&&l.length>y,ye=(0,o.useMemo)((function(){var e=l;return be?e=null===H&&P?l:l.slice(0,Math.min(l.length,$/f)):"number"==typeof y&&(e=l.slice(0,y)),e}),[l,f,H,y,be]),Ce=(0,o.useMemo)((function(){return be?l.slice(ce+1):l.slice(ye.length)}),[l,ye,be,ce]),xe=(0,o.useCallback)((function(e,t){var n;return"function"==typeof p?p(e):null!==(n=p&&(null==e?void 0:e[p]))&&void 0!==n?n:t}),[p]),Ee=(0,o.useCallback)(u||function(e){return e},[u]);function Se(e,t,n){(ae!==e||void 0!==t&&t!==oe)&&(le(e),n||(pe(e<l.length-1),null==T||T(e)),void 0!==t&&ie(t))}function Ae(e,t){j((function(n){var o=new Map(n);return null===t?o.delete(e):o.set(e,t),o}))}function ke(e){return B.get(xe(ye[e],e))}(0,c.A)((function(){if($&&"number"==typeof ge&&ye){var e=Z,t=ye.length,n=t-1;if(!t)return void Se(0,null);for(var o=0;o<t;o+=1){var i=ke(o);if(P&&(i=i||0),void 0===i){Se(o-1,void 0,!0);break}if(e+=i,0===n&&e<=$||o===n-1&&e+ke(n)<=$){Se(n,null);break}if(e+ge>$){Se(o-1,e-i-Z+Y);break}}E&&ke(0)+Z>$&&ie(null)}}),[$,B,Y,Z,xe,ye]);var Re=he&&!!Ce.length,Te={};null!==oe&&be&&(Te={position:"absolute",left:oe,top:0});var Ie={prefixCls:me,responsive:be,component:R,invalidate:ve},Pe=h?function(e,t){var n=xe(e,t);return o.createElement(ma.Provider,{key:n,value:(0,A.A)((0,A.A)({},Ie),{},{order:t,item:e,itemKey:n,registerSize:Ae,display:t<=ce})},h(e,t))}:function(e,t){var n=xe(e,t);return o.createElement(ha,(0,g.A)({},Ie,{order:t,key:n,item:e,renderItem:Ee,itemKey:n,registerSize:Ae,display:t<=ce}))},Oe={order:Re?ce:Number.MAX_SAFE_INTEGER,className:"".concat(me,"-rest"),registerSize:function(e,t){X(t),K(Y)},display:Re},De=C||Sa,Ne=x?o.createElement(ma.Provider,{value:(0,A.A)((0,A.A)({},Ie),Oe)},x(Ce)):o.createElement(ha,(0,g.A)({},Ie,Oe),"function"==typeof De?De(Ce):De),He=o.createElement(k,(0,g.A)({className:M()(!ve&&r,w),style:v,ref:t},I),ye.map(Pe),we?Ne:null,E&&o.createElement(ha,(0,g.A)({},Ie,{responsive:fe,responsiveDisabled:!be,order:ce,className:"".concat(me,"-suffix"),registerSize:function(e,t){ee(t)},display:!0,style:Te}),E));return fe?o.createElement(Me,{onResize:function(e,t){L(t.clientWidth)},disabled:!be},He):He}var ka=o.forwardRef(Aa);ka.displayName="Overflow",ka.Item=ya,ka.RESPONSIVE=xa,ka.INVALIDATE=Ea;const Ra=ka;var Ma=o.createContext(null);function Ta(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function Ia(e){return Ta(o.useContext(Ma),e)}var Pa=["children","locked"],Oa=o.createContext(null);function Da(e){var t=e.children,n=e.locked,i=(0,F.A)(e,Pa),r=o.useContext(Oa),s=(0,T.A)((function(){return e=r,t=i,n=(0,A.A)({},e),Object.keys(t).forEach((function(e){var o=t[e];void 0!==o&&(n[e]=o)})),n;var e,t,n}),[r,i],(function(e,t){return!(n||e[0]===t[0]&&(0,u.A)(e[1],t[1],!0))}));return o.createElement(Oa.Provider,{value:s},t)}var Na=[],Ha=o.createContext(null);function La(){return o.useContext(Ha)}var $a=o.createContext(Na);function _a(e){var t=o.useContext($a);return o.useMemo((function(){return void 0!==e?[].concat((0,tt.A)(t),[e]):t}),[t,e])}var za=o.createContext(null);const Fa=o.createContext({});function Ba(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(qe(e)){var n=e.nodeName.toLowerCase(),o=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),r=Number(i),s=null;return i&&!Number.isNaN(r)?s=r:o&&null===s&&(s=0),o&&e.disabled&&(s=null),null!==s&&(s>=0||t&&s<0)}return!1}var ja=Ls.LEFT,Wa=Ls.RIGHT,Va=Ls.UP,Ga=Ls.DOWN,Ka=Ls.ENTER,Ua=Ls.ESC,qa=Ls.HOME,Ya=Ls.END,Xa=[Va,Ga,ja,Wa];function Qa(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,tt.A)(e.querySelectorAll("*")).filter((function(e){return Ba(e,t)}));return Ba(e,t)&&n.unshift(e),n}(e,!0).filter((function(e){return t.has(e)}))}function Ja(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var i=Qa(e,t),r=i.length,s=i.findIndex((function(e){return n===e}));return o<0?-1===s?s=r-1:s-=1:o>0&&(s+=1),i[s=(s+r)%r]}var Za=function(e,t){var n=new Set,o=new Map,i=new Map;return e.forEach((function(e){var r=document.querySelector("[data-menu-id='".concat(Ta(t,e),"']"));r&&(n.add(r),i.set(r,e),o.set(e,r))})),{elements:n,key2element:o,element2key:i}};var el="__RC_UTIL_PATH_SPLIT__",tl=function(e){return e.join(el)},nl="rc-menu-more";function ol(e){var t=o.useRef(e);t.current=e;var n=o.useCallback((function(){for(var e,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(o))}),[]);return e?n:void 0}var il=Math.random().toFixed(5).toString().slice(2),rl=0;function sl(e,t,n,i){var r=o.useContext(Oa),s=r.activeKey,a=r.onActive,l=r.onInactive,c={active:s===e};return t||(c.onMouseEnter=function(t){null==n||n({key:e,domEvent:t}),a(e)},c.onMouseLeave=function(t){null==i||i({key:e,domEvent:t}),l(e)}),c}function al(e){var t=o.useContext(Oa),n=t.mode,i=t.rtl,r=t.inlineIndent;return"inline"!==n?null:i?{paddingRight:e*r}:{paddingLeft:e*r}}function ll(e){var t,n=e.icon,i=e.props,r=e.children;return null===n||!1===n?null:("function"==typeof n?t=o.createElement(n,(0,A.A)({},i)):"boolean"!=typeof n&&(t=n),t||r||null)}var cl=["item"];function ul(e){var t=e.item,n=(0,F.A)(e,cl);return Object.defineProperty(n,"item",{get:function(){return(0,P.Ay)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var dl=["title","attribute","elementRef"],hl=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],pl=["active"],ml=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(){return(0,we.A)(this,n),t.apply(this,arguments)}return(0,ye.A)(n,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.attribute,i=e.elementRef,r=Dn((0,F.A)(e,dl),["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,P.Ay)(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),o.createElement(Ra.Item,(0,g.A)({},n,{title:"string"==typeof t?t:void 0},r,{ref:i}))}}]),n}(o.Component),gl=o.forwardRef((function(e,t){var n=e.style,i=e.className,r=e.eventKey,s=(e.warnKey,e.disabled),a=e.itemIcon,l=e.children,c=e.role,u=e.onMouseEnter,d=e.onMouseLeave,h=e.onClick,p=e.onKeyDown,m=e.onFocus,b=(0,F.A)(e,hl),v=Ia(r),w=o.useContext(Oa),y=w.prefixCls,C=w.onItemClick,x=w.disabled,E=w.overflowDisabled,S=w.itemIcon,R=w.selectedKeys,T=w.onActive,I=o.useContext(Fa)._internalRenderMenuItem,P="".concat(y,"-item"),O=o.useRef(),D=o.useRef(),N=x||s,H=(0,f.xK)(t,D),L=_a(r),$=function(e){return{key:r,keyPath:(0,tt.A)(L).reverse(),item:O.current,domEvent:e}},_=a||S,z=sl(r,N,u,d),B=z.active,j=(0,F.A)(z,pl),W=R.includes(r),V=al(L.length),G={};"option"===e.role&&(G["aria-selected"]=W);var K=o.createElement(ml,(0,g.A)({ref:O,elementRef:H,role:null===c?"none":c||"menuitem",tabIndex:s?null:-1,"data-menu-id":E&&v?null:v},Dn(b,["extra"]),j,G,{component:"li","aria-disabled":s,style:(0,A.A)((0,A.A)({},V),n),className:M()(P,(0,k.A)((0,k.A)((0,k.A)({},"".concat(P,"-active"),B),"".concat(P,"-selected"),W),"".concat(P,"-disabled"),N),i),onClick:function(e){if(!N){var t=$(e);null==h||h(ul(t)),C(t)}},onKeyDown:function(e){if(null==p||p(e),e.which===Ls.ENTER){var t=$(e);null==h||h(ul(t)),C(t)}},onFocus:function(e){T(r),null==m||m(e)}}),l,o.createElement(ll,{props:(0,A.A)((0,A.A)({},e),{},{isSelected:W}),icon:_}));return I&&(K=I(K,e,{selected:W})),K}));function fl(e,t){var n=e.eventKey,i=La(),r=_a(n);return o.useEffect((function(){if(i)return i.registerPath(n,r),function(){i.unregisterPath(n,r)}}),[r]),i?null:o.createElement(gl,(0,g.A)({},e,{ref:t}))}const bl=o.forwardRef(fl);var vl=["className","children"],wl=function(e,t){var n=e.className,i=e.children,r=(0,F.A)(e,vl),s=o.useContext(Oa),a=s.prefixCls,l=s.mode,c=s.rtl;return o.createElement("ul",(0,g.A)({className:M()(a,c&&"".concat(a,"-rtl"),"".concat(a,"-sub"),"".concat(a,"-").concat("inline"===l?"inline":"vertical"),n),role:"menu"},r,{"data-menu-list":!0,ref:t}),i)},yl=o.forwardRef(wl);yl.displayName="SubMenuList";const Cl=yl;function xl(e,t){return U(e).map((function(e,n){if(o.isValidElement(e)){var i,r,s=e.key,a=null!==(i=null===(r=e.props)||void 0===r?void 0:r.eventKey)&&void 0!==i?i:s;null==a&&(a="tmp_key-".concat([].concat((0,tt.A)(t),[n]).join("-")));var l={key:a,eventKey:a};return o.cloneElement(e,l)}return e}))}var El={adjustX:1,adjustY:1},Sl={topLeft:{points:["bl","tl"],overflow:El},topRight:{points:["br","tr"],overflow:El},bottomLeft:{points:["tl","bl"],overflow:El},bottomRight:{points:["tr","br"],overflow:El},leftTop:{points:["tr","tl"],overflow:El},leftBottom:{points:["br","bl"],overflow:El},rightTop:{points:["tl","tr"],overflow:El},rightBottom:{points:["bl","br"],overflow:El}},Al={topLeft:{points:["bl","tl"],overflow:El},topRight:{points:["br","tr"],overflow:El},bottomLeft:{points:["tl","bl"],overflow:El},bottomRight:{points:["tr","br"],overflow:El},rightTop:{points:["tr","tl"],overflow:El},rightBottom:{points:["br","bl"],overflow:El},leftTop:{points:["tl","tr"],overflow:El},leftBottom:{points:["bl","br"],overflow:El}};function kl(e,t,n){return t||(n?n[e]||n.other:void 0)}var Rl={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Ml(e){var t=e.prefixCls,n=e.visible,i=e.children,r=e.popup,s=e.popupStyle,l=e.popupClassName,c=e.popupOffset,u=e.disabled,d=e.mode,h=e.onVisibleChange,p=o.useContext(Oa),m=p.getPopupContainer,g=p.rtl,f=p.subMenuOpenDelay,b=p.subMenuCloseDelay,v=p.builtinPlacements,w=p.triggerSubMenuAction,y=p.forceSubMenuRender,C=p.rootClassName,x=p.motion,E=p.defaultMotions,S=o.useState(!1),R=(0,a.A)(S,2),T=R[0],I=R[1],P=g?(0,A.A)((0,A.A)({},Al),v):(0,A.A)((0,A.A)({},Sl),v),O=Rl[d],D=kl(d,x,E),N=o.useRef(D);"inline"!==d&&(N.current=D);var H=(0,A.A)((0,A.A)({},N.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),L=o.useRef();return o.useEffect((function(){return L.current=(0,bt.A)((function(){I(n)})),function(){bt.A.cancel(L.current)}}),[n]),o.createElement(Ns,{prefixCls:t,popupClassName:M()("".concat(t,"-popup"),(0,k.A)({},"".concat(t,"-rtl"),g),l,C),stretch:"horizontal"===d?"minWidth":null,getPopupContainer:m,builtinPlacements:P,popupPlacement:O,popupVisible:T,popup:r,popupStyle:s,popupAlign:c&&{offset:c},action:u?[]:[w],mouseEnterDelay:f,mouseLeaveDelay:b,onPopupVisibleChange:h,forceRender:y,popupMotion:H,fresh:!0},i)}function Tl(e){var t=e.id,n=e.open,i=e.keyPath,r=e.children,s="inline",l=o.useContext(Oa),c=l.prefixCls,u=l.forceSubMenuRender,d=l.motion,h=l.defaultMotions,p=l.mode,m=o.useRef(!1);m.current=p===s;var f=o.useState(!m.current),b=(0,a.A)(f,2),v=b[0],w=b[1],y=!!m.current&&n;o.useEffect((function(){m.current&&w(!1)}),[p]);var C=(0,A.A)({},kl(s,d,h));i.length>1&&(C.motionAppear=!1);var x=C.onVisibleChanged;return C.onVisibleChanged=function(e){return m.current||e||w(!0),null==x?void 0:x(e)},v?null:o.createElement(Da,{mode:s,locked:!m.current},o.createElement(Bo.Ay,(0,g.A)({visible:y},C,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(c,"-hidden")}),(function(e){var n=e.className,i=e.style;return o.createElement(Cl,{id:t,className:n,style:i},r)})))}var Il=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Pl=["active"],Ol=o.forwardRef((function(e,t){var n=e.style,i=e.className,r=e.title,s=e.eventKey,l=(e.warnKey,e.disabled),c=e.internalPopupClose,u=e.children,d=e.itemIcon,h=e.expandIcon,p=e.popupClassName,m=e.popupOffset,f=e.popupStyle,b=e.onClick,v=e.onMouseEnter,w=e.onMouseLeave,y=e.onTitleClick,C=e.onTitleMouseEnter,x=e.onTitleMouseLeave,E=(0,F.A)(e,Il),S=Ia(s),R=o.useContext(Oa),T=R.prefixCls,I=R.mode,P=R.openKeys,O=R.disabled,D=R.overflowDisabled,N=R.activeKey,H=R.selectedKeys,L=R.itemIcon,$=R.expandIcon,_=R.onItemClick,z=R.onOpenChange,B=R.onActive,j=o.useContext(Fa)._internalRenderSubMenuItem,W=o.useContext(za).isSubPathKey,V=_a(),G="".concat(T,"-submenu"),K=O||l,U=o.useRef(),q=o.useRef(),Y=null!=d?d:L,X=null!=h?h:$,Q=P.includes(s),J=!D&&Q,Z=W(H,s),ee=sl(s,K,C,x),te=ee.active,ne=(0,F.A)(ee,Pl),oe=o.useState(!1),ie=(0,a.A)(oe,2),re=ie[0],se=ie[1],ae=function(e){K||se(e)},le=o.useMemo((function(){return te||"inline"!==I&&(re||W([N],s))}),[I,te,N,re,s,W]),ce=al(V.length),ue=ol((function(e){null==b||b(ul(e)),_(e)})),de=S&&"".concat(S,"-popup"),he=o.useMemo((function(){return o.createElement(ll,{icon:"horizontal"!==I?X:void 0,props:(0,A.A)((0,A.A)({},e),{},{isOpen:J,isSubMenu:!0})},o.createElement("i",{className:"".concat(G,"-arrow")}))}),[I,X,e,J,G]),pe=o.createElement("div",(0,g.A)({role:"menuitem",style:ce,className:"".concat(G,"-title"),tabIndex:K?null:-1,ref:U,title:"string"==typeof r?r:null,"data-menu-id":D&&S?null:S,"aria-expanded":J,"aria-haspopup":!0,"aria-controls":de,"aria-disabled":K,onClick:function(e){K||(null==y||y({key:s,domEvent:e}),"inline"===I&&z(s,!Q))},onFocus:function(){B(s)}},ne),r,he),me=o.useRef(I);if("inline"!==I&&V.length>1?me.current="vertical":me.current=I,!D){var ge=me.current;pe=o.createElement(Ml,{mode:ge,prefixCls:G,visible:!c&&J&&"inline"!==I,popupClassName:p,popupOffset:m,popupStyle:f,popup:o.createElement(Da,{mode:"horizontal"===ge?"vertical":ge},o.createElement(Cl,{id:de,ref:q},u)),disabled:K,onVisibleChange:function(e){"inline"!==I&&z(s,e)}},pe)}var fe=o.createElement(Ra.Item,(0,g.A)({ref:t,role:"none"},E,{component:"li",style:n,className:M()(G,"".concat(G,"-").concat(I),i,(0,k.A)((0,k.A)((0,k.A)((0,k.A)({},"".concat(G,"-open"),J),"".concat(G,"-active"),le),"".concat(G,"-selected"),Z),"".concat(G,"-disabled"),K)),onMouseEnter:function(e){ae(!0),null==v||v({key:s,domEvent:e})},onMouseLeave:function(e){ae(!1),null==w||w({key:s,domEvent:e})}}),pe,!D&&o.createElement(Tl,{id:de,open:J,keyPath:V},u));return j&&(fe=j(fe,e,{selected:Z,active:le,open:J,disabled:K})),o.createElement(Da,{onItemClick:ue,mode:"horizontal"===I?"vertical":I,itemIcon:Y,expandIcon:X},fe)}));const Dl=o.forwardRef((function(e,t){var n,i=e.eventKey,r=e.children,s=_a(i),a=xl(r,s),l=La();return o.useEffect((function(){if(l)return l.registerPath(i,s),function(){l.unregisterPath(i,s)}}),[s]),n=l?a:o.createElement(Ol,(0,g.A)({ref:t},e),a),o.createElement($a.Provider,{value:s},n)}));function Nl(e){var t=e.className,n=e.style,i=o.useContext(Oa).prefixCls;return La()?null:o.createElement("li",{role:"separator",className:M()("".concat(i,"-item-divider"),t),style:n})}var Hl=["className","title","eventKey","children"],Ll=o.forwardRef((function(e,t){var n=e.className,i=e.title,r=(e.eventKey,e.children),s=(0,F.A)(e,Hl),a=o.useContext(Oa).prefixCls,l="".concat(a,"-item-group");return o.createElement("li",(0,g.A)({ref:t,role:"presentation"},s,{onClick:function(e){return e.stopPropagation()},className:M()(l,n)}),o.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:"string"==typeof i?i:void 0},i),o.createElement("ul",{role:"group",className:"".concat(l,"-list")},r))}));const $l=o.forwardRef((function(e,t){var n=e.eventKey,i=xl(e.children,_a(n));return La()?i:o.createElement(Ll,(0,g.A)({ref:t},Dn(e,["warnKey"])),i)}));var _l=["label","children","key","type","extra"];function zl(e,t,n){var i=t.item,r=t.group,s=t.submenu,a=t.divider;return(e||[]).map((function(e,l){if(e&&"object"===(0,S.A)(e)){var c=e,u=c.label,d=c.children,h=c.key,p=c.type,m=c.extra,f=(0,F.A)(c,_l),b=null!=h?h:"tmp-".concat(l);return d||"group"===p?"group"===p?o.createElement(r,(0,g.A)({key:b},f,{title:u}),zl(d,t,n)):o.createElement(s,(0,g.A)({key:b},f,{title:u}),zl(d,t,n)):"divider"===p?o.createElement(a,(0,g.A)({key:b},f)):o.createElement(i,(0,g.A)({key:b},f,{extra:m}),u,(!!m||0===m)&&o.createElement("span",{className:"".concat(n,"-item-extra")},m))}return null})).filter((function(e){return e}))}function Fl(e,t,n,o,i){var r=e,s=(0,A.A)({divider:Nl,item:bl,group:$l,submenu:Dl},o);return t&&(r=zl(t,s,i)),xl(r,n)}var Bl=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],jl=[],Wl=o.forwardRef((function(e,t){var n,i=e,r=i.prefixCls,s=void 0===r?"rc-menu":r,l=i.rootClassName,c=i.style,h=i.className,p=i.tabIndex,m=void 0===p?0:p,f=i.items,b=i.children,v=i.direction,w=i.id,y=i.mode,C=void 0===y?"vertical":y,x=i.inlineCollapsed,E=i.disabled,S=i.disabledOverflow,R=i.subMenuOpenDelay,T=void 0===R?.1:R,I=i.subMenuCloseDelay,P=void 0===I?.1:I,O=i.forceSubMenuRender,D=i.defaultOpenKeys,N=i.openKeys,H=i.activeKey,L=i.defaultActiveFirst,$=i.selectable,_=void 0===$||$,z=i.multiple,B=void 0!==z&&z,j=i.defaultSelectedKeys,W=i.selectedKeys,V=i.onSelect,G=i.onDeselect,K=i.inlineIndent,U=void 0===K?24:K,q=i.motion,Y=i.defaultMotions,X=i.triggerSubMenuAction,Q=void 0===X?"hover":X,J=i.builtinPlacements,Z=i.itemIcon,ee=i.expandIcon,te=i.overflowedIndicator,ne=void 0===te?"...":te,oe=i.overflowedIndicatorPopupClassName,ie=i.getPopupContainer,re=i.onClick,se=i.onOpenChange,ae=i.onKeyDown,le=(i.openAnimation,i.openTransitionName,i._internalRenderMenuItem),ce=i._internalRenderSubMenuItem,ue=i._internalComponents,de=(0,F.A)(i,Bl),he=o.useMemo((function(){return[Fl(b,f,jl,ue,s),Fl(b,f,jl,{},s)]}),[b,f,ue]),pe=(0,a.A)(he,2),me=pe[0],ge=pe[1],fe=o.useState(!1),be=(0,a.A)(fe,2),ve=be[0],we=be[1],ye=o.useRef(),Ce=function(e){var t=(0,so.A)(e,{value:e}),n=(0,a.A)(t,2),i=n[0],r=n[1];return o.useEffect((function(){rl+=1;var e="".concat(il,"-").concat(rl);r("rc-menu-uuid-".concat(e))}),[]),i}(w),xe="rtl"===v,Ee=(0,so.A)(D,{value:N,postState:function(e){return e||jl}}),Se=(0,a.A)(Ee,2),Ae=Se[0],ke=Se[1],Re=function(e){function t(){ke(e),null==se||se(e)}arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,d.flushSync)(t):t()},Me=o.useState(Ae),Te=(0,a.A)(Me,2),Ie=Te[0],Pe=Te[1],Oe=o.useRef(!1),De=o.useMemo((function(){return"inline"!==C&&"vertical"!==C||!x?[C,!1]:["vertical",x]}),[C,x]),Ne=(0,a.A)(De,2),He=Ne[0],Le=Ne[1],$e="inline"===He,_e=o.useState(He),ze=(0,a.A)(_e,2),Fe=ze[0],Be=ze[1],je=o.useState(Le),We=(0,a.A)(je,2),Ve=We[0],Ge=We[1];o.useEffect((function(){Be(He),Ge(Le),Oe.current&&($e?ke(Ie):Re(jl))}),[He,Le]);var Ke=o.useState(0),Ue=(0,a.A)(Ke,2),qe=Ue[0],Ye=Ue[1],Xe=qe>=me.length-1||"horizontal"!==Fe||S;o.useEffect((function(){$e&&Pe(Ae)}),[Ae]),o.useEffect((function(){return Oe.current=!0,function(){Oe.current=!1}}),[]);var Qe=function(){var e=o.useState({}),t=(0,a.A)(e,2)[1],n=(0,o.useRef)(new Map),i=(0,o.useRef)(new Map),r=o.useState([]),s=(0,a.A)(r,2),l=s[0],c=s[1],u=(0,o.useRef)(0),d=(0,o.useRef)(!1),h=(0,o.useCallback)((function(e,o){var r=tl(o);i.current.set(r,e),n.current.set(e,r),u.current+=1;var s,a=u.current;s=function(){a===u.current&&(d.current||t({}))},Promise.resolve().then(s)}),[]),p=(0,o.useCallback)((function(e,t){var o=tl(t);i.current.delete(o),n.current.delete(e)}),[]),m=(0,o.useCallback)((function(e){c(e)}),[]),g=(0,o.useCallback)((function(e,t){var o=(n.current.get(e)||"").split(el);return t&&l.includes(o[0])&&o.unshift(nl),o}),[l]),f=(0,o.useCallback)((function(e,t){return e.filter((function(e){return void 0!==e})).some((function(e){return g(e,!0).includes(t)}))}),[g]),b=(0,o.useCallback)((function(e){var t="".concat(n.current.get(e)).concat(el),o=new Set;return(0,tt.A)(i.current.keys()).forEach((function(e){e.startsWith(t)&&o.add(i.current.get(e))})),o}),[]);return o.useEffect((function(){return function(){d.current=!0}}),[]),{registerPath:h,unregisterPath:p,refreshOverflowKeys:m,isSubPathKey:f,getKeyPath:g,getKeys:function(){var e=(0,tt.A)(n.current.keys());return l.length&&e.push(nl),e},getSubPathKeys:b}}(),Je=Qe.registerPath,Ze=Qe.unregisterPath,et=Qe.refreshOverflowKeys,nt=Qe.isSubPathKey,ot=Qe.getKeyPath,it=Qe.getKeys,rt=Qe.getSubPathKeys,st=o.useMemo((function(){return{registerPath:Je,unregisterPath:Ze}}),[Je,Ze]),at=o.useMemo((function(){return{isSubPathKey:nt}}),[nt]);o.useEffect((function(){et(Xe?jl:me.slice(qe+1).map((function(e){return e.key})))}),[qe,Xe]);var lt=(0,so.A)(H||L&&(null===(n=me[0])||void 0===n?void 0:n.key),{value:H}),ct=(0,a.A)(lt,2),ut=ct[0],dt=ct[1],ht=ol((function(e){dt(e)})),pt=ol((function(){dt(void 0)}));(0,o.useImperativeHandle)(t,(function(){return{list:ye.current,focus:function(e){var t,n,o=it(),i=Za(o,Ce),r=i.elements,s=i.key2element,a=i.element2key,l=Qa(ye.current,r),c=null!=ut?ut:l[0]?a.get(l[0]):null===(t=me.find((function(e){return!e.props.disabled})))||void 0===t?void 0:t.key,u=s.get(c);c&&u&&(null==u||null===(n=u.focus)||void 0===n||n.call(u,e))}}}));var mt=(0,so.A)(j||[],{value:W,postState:function(e){return Array.isArray(e)?e:null==e?jl:[e]}}),gt=(0,a.A)(mt,2),ft=gt[0],vt=gt[1],wt=ol((function(e){null==re||re(ul(e)),function(e){if(_){var t,n=e.key,o=ft.includes(n);t=B?o?ft.filter((function(e){return e!==n})):[].concat((0,tt.A)(ft),[n]):[n],vt(t);var i=(0,A.A)((0,A.A)({},e),{},{selectedKeys:t});o?null==G||G(i):null==V||V(i)}!B&&Ae.length&&"inline"!==Fe&&Re(jl)}(e)})),yt=ol((function(e,t){var n=Ae.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==Fe){var o=rt(e);n=n.filter((function(e){return!o.has(e)}))}(0,u.A)(Ae,n,!0)||Re(n,!0)})),Ct=function(e,t,n,i,r,s,a,l,c,u){var d=o.useRef(),h=o.useRef();h.current=t;var p=function(){bt.A.cancel(d.current)};return o.useEffect((function(){return function(){p()}}),[]),function(o){var m=o.which;if([].concat(Xa,[Ka,Ua,qa,Ya]).includes(m)){var g=s(),f=Za(g,i),b=f,v=b.elements,w=b.key2element,y=b.element2key,C=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(w.get(t),v),x=y.get(C),E=function(e,t,n,o){var i,r="prev",s="next",a="children",l="parent";if("inline"===e&&o===Ka)return{inlineTrigger:!0};var c=(0,k.A)((0,k.A)({},Va,r),Ga,s),u=(0,k.A)((0,k.A)((0,k.A)((0,k.A)({},ja,n?s:r),Wa,n?r:s),Ga,a),Ka,a),d=(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({},Va,r),Ga,s),Ka,a),Ua,l),ja,n?a:l),Wa,n?l:a);switch(null===(i={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d}["".concat(e).concat(t?"":"Sub")])||void 0===i?void 0:i[o]){case r:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}(e,1===a(x,!0).length,n,m);if(!E&&m!==qa&&m!==Ya)return;(Xa.includes(m)||[qa,Ya].includes(m))&&o.preventDefault();var S=function(e){if(e){var t=e,n=e.querySelector("a");null!=n&&n.getAttribute("href")&&(t=n);var o=y.get(e);l(o),p(),d.current=(0,bt.A)((function(){h.current===o&&t.focus()}))}};if([qa,Ya].includes(m)||E.sibling||!C){var A,R,M=Qa(A=C&&"inline"!==e?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(C):r.current,v);R=m===qa?M[0]:m===Ya?M[M.length-1]:Ja(A,v,C,E.offset),S(R)}else if(E.inlineTrigger)c(x);else if(E.offset>0)c(x,!0),p(),d.current=(0,bt.A)((function(){f=Za(g,i);var e=C.getAttribute("aria-controls"),t=Ja(document.getElementById(e),f.elements);S(t)}),5);else if(E.offset<0){var T=a(x,!0),I=T[T.length-2],P=w.get(I);c(I,!1),S(P)}}null==u||u(o)}}(Fe,ut,xe,Ce,ye,it,ot,dt,(function(e,t){var n=null!=t?t:!Ae.includes(e);yt(e,n)}),ae);o.useEffect((function(){we(!0)}),[]);var xt=o.useMemo((function(){return{_internalRenderMenuItem:le,_internalRenderSubMenuItem:ce}}),[le,ce]),Et="horizontal"!==Fe||S?me:me.map((function(e,t){return o.createElement(Da,{key:e.key,overflowDisabled:t>qe},e)})),St=o.createElement(Ra,(0,g.A)({id:w,ref:ye,prefixCls:"".concat(s,"-overflow"),component:"ul",itemComponent:bl,className:M()(s,"".concat(s,"-root"),"".concat(s,"-").concat(Fe),h,(0,k.A)((0,k.A)({},"".concat(s,"-inline-collapsed"),Ve),"".concat(s,"-rtl"),xe),l),dir:v,style:c,role:"menu",tabIndex:m,data:Et,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,n=t?me.slice(-t):null;return o.createElement(Dl,{eventKey:nl,title:ne,disabled:Xe,internalPopupClose:0===t,popupClassName:oe},n)},maxCount:"horizontal"!==Fe||S?Ra.INVALIDATE:Ra.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){Ye(e)},onKeyDown:Ct},de));return o.createElement(Fa.Provider,{value:xt},o.createElement(Ma.Provider,{value:Ce},o.createElement(Da,{prefixCls:s,rootClassName:l,mode:Fe,openKeys:Ae,rtl:xe,disabled:E,motion:ve?q:null,defaultMotions:ve?Y:null,activeKey:ut,onActive:ht,onInactive:pt,selectedKeys:ft,inlineIndent:U,subMenuOpenDelay:T,subMenuCloseDelay:P,forceSubMenuRender:O,builtinPlacements:J,triggerSubMenuAction:Q,getPopupContainer:ie,itemIcon:Z,expandIcon:ee,onItemClick:wt,onOpenChange:yt},o.createElement(za.Provider,{value:at},St),o.createElement("div",{style:{display:"none"},"aria-hidden":!0},o.createElement(Ha.Provider,{value:st},ge)))))})),Vl=Wl;Vl.Item=bl,Vl.SubMenu=Dl,Vl.ItemGroup=$l,Vl.Divider=Nl;const Gl=Vl,Kl=o.createContext({}),Ul={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};var ql=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Ul}))};const Yl=o.forwardRef(ql),Xl=()=>({height:0,opacity:0}),Ql=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},Jl=e=>({height:e?e.offsetHeight:0}),Zl=(e,t)=>!0===(null==t?void 0:t.deadline)||"height"===t.propertyName,ec=(e,t,n)=>void 0!==n?n:`${e}-${t}`,tc=(e=ho.yH)=>({motionName:`${e}-motion-collapse`,onAppearStart:Xl,onEnterStart:Xl,onAppearActive:Ql,onEnterActive:Ql,onLeaveStart:Jl,onLeaveActive:Xl,onAppearEnd:Zl,onEnterEnd:Zl,onLeaveEnd:Zl,motionDeadline:500}),nc=(0,o.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});const oc=e=>{const{prefixCls:t,className:n,dashed:i}=e,r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","className","dashed"]),{getPrefixCls:s}=o.useContext(ho.QO),a=s("menu",t),l=M()({[`${a}-item-divider-dashed`]:!!i},n);return o.createElement(Nl,Object.assign({className:l},r))};function ic(e){var t=e.children,n=e.prefixCls,i=e.id,r=e.overlayInnerStyle,s=e.bodyClassName,a=e.className,l=e.style;return o.createElement("div",{className:M()("".concat(n,"-content"),a),style:l},o.createElement("div",{className:M()("".concat(n,"-inner"),s),id:i,role:"tooltip",style:r},"function"==typeof t?t():t))}var rc={shiftX:64,adjustY:1},sc={adjustX:1,shiftY:!0},ac=[0,0],lc={left:{points:["cr","cl"],overflow:sc,offset:[-4,0],targetOffset:ac},right:{points:["cl","cr"],overflow:sc,offset:[4,0],targetOffset:ac},top:{points:["bc","tc"],overflow:rc,offset:[0,-4],targetOffset:ac},bottom:{points:["tc","bc"],overflow:rc,offset:[0,4],targetOffset:ac},topLeft:{points:["bl","tl"],overflow:rc,offset:[0,-4],targetOffset:ac},leftTop:{points:["tr","tl"],overflow:sc,offset:[-4,0],targetOffset:ac},topRight:{points:["br","tr"],overflow:rc,offset:[0,-4],targetOffset:ac},rightTop:{points:["tl","tr"],overflow:sc,offset:[4,0],targetOffset:ac},bottomRight:{points:["tr","br"],overflow:rc,offset:[0,4],targetOffset:ac},rightBottom:{points:["bl","br"],overflow:sc,offset:[4,0],targetOffset:ac},bottomLeft:{points:["tl","bl"],overflow:rc,offset:[0,4],targetOffset:ac},leftBottom:{points:["br","bl"],overflow:sc,offset:[-4,0],targetOffset:ac}},cc=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],uc=function(e,t){var n=e.overlayClassName,i=e.trigger,r=void 0===i?["hover"]:i,s=e.mouseEnterDelay,a=void 0===s?0:s,l=e.mouseLeaveDelay,c=void 0===l?.1:l,u=e.overlayStyle,d=e.prefixCls,h=void 0===d?"rc-tooltip":d,p=e.children,m=e.onVisibleChange,f=e.afterVisibleChange,b=e.transitionName,v=e.animation,w=e.motion,y=e.placement,C=void 0===y?"right":y,x=e.align,E=void 0===x?{}:x,S=e.destroyTooltipOnHide,k=void 0!==S&&S,R=e.defaultVisible,T=e.getTooltipContainer,I=e.overlayInnerStyle,P=(e.arrowContent,e.overlay),O=e.id,D=e.showArrow,N=void 0===D||D,H=e.classNames,L=e.styles,$=(0,F.A)(e,cc),_=ds(O),z=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(function(){return z.current}));var B,j,W,V=(0,A.A)({},$);return"visible"in e&&(V.popupVisible=e.visible),o.createElement(Ns,(0,g.A)({popupClassName:M()(n,null==H?void 0:H.root),prefixCls:h,popup:function(){return o.createElement(ic,{key:"content",prefixCls:h,id:_,bodyClassName:null==H?void 0:H.body,overlayInnerStyle:(0,A.A)((0,A.A)({},I),null==L?void 0:L.body)},P)},action:r,builtinPlacements:lc,popupPlacement:C,ref:z,popupAlign:E,getPopupContainer:T,onPopupVisibleChange:m,afterPopupVisibleChange:f,popupTransitionName:b,popupAnimation:v,popupMotion:w,defaultPopupVisible:R,autoDestroy:k,mouseLeaveDelay:c,popupStyle:(0,A.A)((0,A.A)({},u),null==L?void 0:L.root),mouseEnterDelay:a,arrow:N},V),(j=(null==(B=o.Children.only(p))?void 0:B.props)||{},W=(0,A.A)((0,A.A)({},j),{},{"aria-describedby":P?_:null}),o.cloneElement(p,W)))};const dc=(0,o.forwardRef)(uc);var hc=n(48224);const pc=e=>{const t=o.useContext(hc.A);return o.useMemo((()=>e?"string"==typeof e?null!=e?e:t:"function"==typeof e?e(t):t:t),[e,t])},mc=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},gc=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},fc=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},bc=Ho("Space",(e=>{const t=Ro(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[gc(t),fc(t),mc(t)]}),(()=>({})),{resetStyle:!1});var vc=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};const wc=o.createContext(null),yc=(e,t)=>{const n=o.useContext(wc),i=o.useMemo((()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:r}=n,s="vertical"===o?"-vertical-":"-";return M()(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:r,[`${e}-compact${s}item-rtl`]:"rtl"===t})}),[e,t,n]);return{compactSize:null==n?void 0:n.compactSize,compactDirection:null==n?void 0:n.compactDirection,compactItemClassnames:i}},Cc=e=>{const{children:t}=e;return o.createElement(wc.Provider,{value:null},t)},xc=e=>{const{children:t}=e,n=vc(e,["children"]);return o.createElement(wc.Provider,{value:o.useMemo((()=>n),[n])},t)},Ec=e=>{const{space:t,form:n,children:i}=e;if(null==i)return null;let r=i;return n&&(r=o.createElement(Lr,{override:!0,status:!0},r)),t&&(r=o.createElement(Cc,null,r)),r},Sc=e=>({animationDuration:e,animationFillMode:"both"}),Ac=e=>({animationDuration:e,animationFillMode:"both"}),kc=(e,t,n,o,i=!1)=>{const r=i?"&":"";return{[`\n ${r}${e}-enter,\n ${r}${e}-appear\n `]:Object.assign(Object.assign({},Sc(o)),{animationPlayState:"paused"}),[`${r}${e}-leave`]:Object.assign(Object.assign({},Ac(o)),{animationPlayState:"paused"}),[`\n ${r}${e}-enter${e}-enter-active,\n ${r}${e}-appear${e}-appear-active\n `]:{animationName:t,animationPlayState:"running"},[`${r}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},Rc=new go.Mo("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Mc=new go.Mo("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Tc=new go.Mo("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Ic=new go.Mo("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),Pc=new go.Mo("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),Oc=new go.Mo("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Dc={zoom:{inKeyframes:Rc,outKeyframes:Mc},"zoom-big":{inKeyframes:Tc,outKeyframes:Ic},"zoom-big-fast":{inKeyframes:Tc,outKeyframes:Ic},"zoom-left":{inKeyframes:new go.Mo("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),outKeyframes:new go.Mo("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}})},"zoom-right":{inKeyframes:new go.Mo("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),outKeyframes:new go.Mo("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}})},"zoom-up":{inKeyframes:Pc,outKeyframes:Oc},"zoom-down":{inKeyframes:new go.Mo("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),outKeyframes:new go.Mo("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}})}},Nc=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:i,outKeyframes:r}=Dc[t];return[kc(o,i,r,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{[`\n ${o}-enter,\n ${o}-appear\n `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Hc=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Lc(e,t){return Hc.reduce(((n,o)=>{const i=e[`${o}1`],r=e[`${o}3`],s=e[`${o}6`],a=e[`${o}7`];return Object.assign(Object.assign({},n),t(o,{lightColor:i,lightBorderColor:r,darkColor:s,textColor:a}))}),{})}const $c=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:o,tooltipColor:i,tooltipBg:r,tooltipBorderRadius:s,zIndexPopup:a,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:h,sizePopupArrow:p}=e,m=t(s).add(p).add(h).equal(),g=t(s).mul(2).add(p).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Do.dF)(e)),{position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:o,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":r,[`${n}-inner`]:{minWidth:g,minHeight:l,padding:`${(0,go.zA)(e.calc(u).div(2).equal())} ${(0,go.zA)(d)}`,color:i,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:r,borderRadius:s,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:m},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(s,8)}},[`${n}-content`]:{position:"relative"}}),Lc(e,((e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-inner`]:{backgroundColor:t},[`${n}-arrow`]:{"--antd-arrow-background-color":t}}})))),{"&-rtl":{direction:"rtl"}})},ta(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},_c=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Zs({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Qs(Ro(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),zc=(e,t=!0)=>Ho("Tooltip",(e=>{const{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:o}=e,i=Ro(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:o});return[$c(i),Nc(e,"zoom-big-fast")]}),_c,{resetStyle:!1,injectStyle:t})(e),Fc=Hc.map((e=>`${e}-inverse`));function Bc(e,t){const n=function(e,t=!0){return t?[].concat((0,tt.A)(Fc),(0,tt.A)(Hc)).includes(e):Hc.includes(e)}(t),o=M()({[`${e}-${t}`]:t&&n}),i={},r={};return t&&!n&&(i.background=t,r["--antd-arrow-background-color"]=t),{className:o,overlayStyle:i,arrowStyle:r}}const jc=o.forwardRef(((e,t)=>{var n,i;const{prefixCls:r,openClassName:s,getTooltipContainer:a,color:l,overlayInnerStyle:c,children:u,afterOpenChange:d,afterVisibleChange:h,destroyTooltipOnHide:p,destroyOnHidden:m,arrow:g=!0,title:f,overlay:b,builtinPlacements:v,arrowPointAtCenter:w=!1,autoAdjustOverflow:y=!0,motion:C,getPopupContainer:x,placement:E="top",mouseEnterDelay:S=.1,mouseLeaveDelay:A=.1,overlayStyle:k,rootClassName:R,overlayClassName:T,styles:I,classNames:P}=e,O=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),D=!!g,[,N]=(0,No.Ay)(),{getPopupContainer:H,getPrefixCls:L,direction:$,className:_,style:z,classNames:F,styles:B}=(0,ho.TP)("tooltip"),j=(0,ao.rJ)("Tooltip"),W=o.useRef(null),V=()=>{var e;null===(e=W.current)||void 0===e||e.forceAlign()};o.useImperativeHandle(t,(()=>{var e,t;return{forceAlign:V,forcePopupAlign:()=>{j.deprecated(!1,"forcePopupAlign","forceAlign"),V()},nativeElement:null===(e=W.current)||void 0===e?void 0:e.nativeElement,popupElement:null===(t=W.current)||void 0===t?void 0:t.popupElement}}));const[G,K]=(0,so.A)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(i=e.defaultOpen)&&void 0!==i?i:e.defaultVisible}),U=!f&&!b&&0!==f,q=o.useMemo((()=>{var e,t;let n=w;return"object"==typeof g&&(n=null!==(t=null!==(e=g.pointAtCenter)&&void 0!==e?e:g.arrowPointAtCenter)&&void 0!==t?t:w),v||ra({arrowPointAtCenter:n,autoAdjustOverflow:y,arrowWidth:D?N.sizePopupArrow:0,borderRadius:N.borderRadius,offset:N.marginXXS,visibleFirst:!0})}),[w,g,v,N]),Y=o.useMemo((()=>0===f?f:b||f||""),[b,f]),X=o.createElement(Ec,{space:!0},"function"==typeof Y?Y():Y),Q=L("tooltip",r),J=L(),Z=e["data-popover-inject"];let ee=G;"open"in e||"visible"in e||!U||(ee=!1);const te=o.isValidElement(u)&&!po(u)?u:o.createElement("span",null,u),ne=te.props,oe=ne.className&&"string"!=typeof ne.className?ne.className:M()(ne.className,s||`${Q}-open`),[ie,re,se]=zc(Q,!Z),ae=Bc(Q,l),le=ae.arrowStyle,ce=M()(T,{[`${Q}-rtl`]:"rtl"===$},ae.className,R,re,se,_,F.root,null==P?void 0:P.root),ue=M()(F.body,null==P?void 0:P.body),[de,he]=Xs("Tooltip",O.zIndex),pe=o.createElement(dc,Object.assign({},O,{zIndex:de,showArrow:D,placement:E,mouseEnterDelay:S,mouseLeaveDelay:A,prefixCls:Q,classNames:{root:ce,body:ue},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},le),B.root),z),k),null==I?void 0:I.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},B.body),c),null==I?void 0:I.body),ae.overlayStyle)},getTooltipContainer:x||a||H,ref:W,builtinPlacements:q,overlay:X,visible:ee,onVisibleChange:t=>{var n,o;K(!U&&t),U||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(o=e.onVisibleChange)||void 0===o||o.call(e,t))},afterVisibleChange:null!=d?d:h,arrowContent:o.createElement("span",{className:`${Q}-arrow-content`}),motion:{motionName:ec(J,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:null!=m?m:!!p}),ee?mo(te,{className:oe}):te);return ie(o.createElement(Ks.Provider,{value:he},pe))})),Wc=jc;Wc._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,className:n,placement:i="top",title:r,color:s,overlayInnerStyle:a}=e,{getPrefixCls:l}=o.useContext(ho.QO),c=l("tooltip",t),[u,d,h]=zc(c),p=Bc(c,s),m=p.arrowStyle,g=Object.assign(Object.assign({},a),p.overlayStyle),f=M()(d,h,c,`${c}-pure`,`${c}-placement-${i}`,n,p.className);return u(o.createElement("div",{className:f,style:m},o.createElement("div",{className:`${c}-arrow`}),o.createElement(ic,Object.assign({},e,{className:d,prefixCls:c,overlayInnerStyle:g}),r)))};const Vc=Wc,Gc=e=>{var t;const{className:n,children:i,icon:r,title:s,danger:a,extra:l}=e,{prefixCls:c,firstLevel:u,direction:d,disableMenuItemTitleTooltip:h,inlineCollapsed:p}=o.useContext(nc),{siderCollapsed:m}=o.useContext(Kl);let g=s;void 0===s?g=u?i:"":!1===s&&(g="");const f={title:g};m||p||(f.title=null,f.open=!1);const b=U(i).length;let v=o.createElement(bl,Object.assign({},Dn(e,["title","icon","danger"]),{className:M()({[`${c}-item-danger`]:a,[`${c}-item-only-child`]:1===(r?b+1:b)},n),title:"string"==typeof s?s:void 0}),mo(r,{className:M()(o.isValidElement(r)?null===(t=r.props)||void 0===t?void 0:t.className:"",`${c}-item-icon`)}),(e=>{const t=null==i?void 0:i[0],n=o.createElement("span",{className:M()(`${c}-title-content`,{[`${c}-title-content-with-extra`]:!!l||0===l})},i);return(!r||o.isValidElement(i)&&"span"===i.type)&&i&&e&&u&&"string"==typeof t?o.createElement("div",{className:`${c}-inline-collapsed-noicon`},t.charAt(0)):n})(p));return h||(v=o.createElement(Vc,Object.assign({},f,{placement:"rtl"===d?"left":"right",classNames:{root:`${c}-inline-collapsed-tooltip`}}),v)),v};const Kc=o.createContext(null),Uc=o.forwardRef(((e,t)=>{const{children:n}=e,i=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["children"]),r=o.useContext(Kc),s=o.useMemo((()=>Object.assign(Object.assign({},r),i)),[r,i.prefixCls,i.mode,i.selectable,i.rootClassName]),a=(0,f.H3)(n),l=(0,f.xK)(t,a?(0,f.A9)(n):null);return o.createElement(Kc.Provider,{value:s},o.createElement(Ec,{space:!0},a?o.cloneElement(n,{ref:l}):n))})),qc=Kc;var Yc=n(2616);const Xc=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Qc=new go.Mo("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Jc=new go.Mo("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Zc=new go.Mo("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),eu=new go.Mo("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),tu=new go.Mo("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),nu=new go.Mo("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),ou=new go.Mo("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),iu=new go.Mo("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ru={"slide-up":{inKeyframes:Qc,outKeyframes:Jc},"slide-down":{inKeyframes:Zc,outKeyframes:eu},"slide-left":{inKeyframes:tu,outKeyframes:nu},"slide-right":{inKeyframes:ou,outKeyframes:iu}},su=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:i,outKeyframes:r}=ru[t];return[kc(o,i,r,e.motionDurationMid),{[`\n ${o}-enter,\n ${o}-appear\n `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},au=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:o,colorSplit:i,lineWidth:r,lineType:s,itemPaddingInline:a}=e;return{[`${t}-horizontal`]:{lineHeight:o,border:0,borderBottom:`${(0,go.zA)(r)} ${s} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${t}-item:hover,\n > ${t}-item-active,\n > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},lu=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,\n ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,go.zA)(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,go.zA)(t)})`}}}}),cu=e=>Object.assign({},(0,Do.jk)(e)),uu=(e,t)=>{const{componentCls:n,itemColor:o,itemSelectedColor:i,subMenuItemSelectedColor:r,groupTitleColor:s,itemBg:a,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:h,motionDurationSlow:p,motionEaseInOut:m,motionEaseOut:g,itemPaddingInline:f,motionDurationMid:b,itemHoverColor:v,lineType:w,colorSplit:y,itemDisabledColor:C,dangerItemColor:x,dangerItemHoverColor:E,dangerItemSelectedColor:S,dangerItemActiveBg:A,dangerItemSelectedBg:k,popupBg:R,itemHoverBg:M,itemActiveBg:T,menuSubMenuBg:I,horizontalItemSelectedColor:P,horizontalItemSelectedBg:O,horizontalItemBorderRadius:D,horizontalItemHoverBg:N}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:o,background:a,[`&${n}-root:focus-visible`]:Object.assign({},cu(e)),[`${n}-item`]:{"&-group-title, &-extra":{color:s}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:r},[`${n}-item, ${n}-submenu-title`]:{color:o,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},cu(e))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${C} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:T}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:T}}},[`${n}-item-danger`]:{color:x,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:A}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:S},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:k}},[`&${n}-submenu > ${n}`]:{backgroundColor:I},[`&${n}-popup > ${n}`]:{backgroundColor:R},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:R},[`&${n}-horizontal`]:Object.assign(Object.assign({},"dark"===t?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:h,marginTop:e.calc(h).mul(-1).equal(),marginBottom:0,borderRadius:D,"&::after":{position:"absolute",insetInline:f,bottom:0,borderBottom:`${(0,go.zA)(u)} solid transparent`,transition:`border-color ${p} ${m}`,content:'""'},"&:hover, &-active, &-open":{background:N,"&::after":{borderBottomWidth:u,borderBottomColor:P}},"&-selected":{color:P,backgroundColor:O,"&:hover":{backgroundColor:O},"&::after":{borderBottomWidth:u,borderBottomColor:P}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${(0,go.zA)(h)} ${w} ${y}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,go.zA)(d)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${b} ${g}`,`opacity ${b} ${g}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:S}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${b} ${m}`,`opacity ${b} ${m}`].join(",")}}}}}},du=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:o,padding:i,menuArrowSize:r,marginXS:s,itemMarginBlock:a,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(r).add(i).add(s).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:(0,go.zA)(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:a,width:l},[`> ${t}-item,\n > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:(0,go.zA)(n)},[`${t}-item-group-list ${t}-submenu-title,\n ${t}-submenu-title`]:{paddingInlineEnd:u}}},hu=e=>{const{componentCls:t,iconCls:n,itemHeight:o,colorTextLightSolid:i,dropdownWidth:r,controlHeightLG:s,motionEaseOut:a,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:h,paddingXS:p,boxShadowSecondary:m,collapsedWidth:g,collapsedIconSize:f}=e,b={height:o,lineHeight:(0,go.zA)(o),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},du(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},du(e)),{boxShadow:m})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:r,maxHeight:`calc(100vh - ${(0,go.zA)(e.calc(s).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${h}`,`background ${h}`,`padding ${d} ${a}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:b,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:b}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${t}-item,\n > ${t}-item-group > ${t}-item-group-list > ${t}-item,\n > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,\n > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,go.zA)(e.calc(f).div(2).equal())} - ${(0,go.zA)(c)})`,textOverflow:"clip",[`\n ${t}-submenu-arrow,\n ${t}-submenu-expand-icon\n `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:f,lineHeight:(0,go.zA)(o),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:i}},[`${t}-item-group-title`]:Object.assign(Object.assign({},Do.L9),{paddingInline:p})}}]},pu=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:o,motionEaseInOut:i,motionEaseOut:r,iconCls:s,iconSize:a,iconMarginInlineEnd:l}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${t}-item-icon, ${s}`]:{minWidth:a,fontSize:a,transition:[`font-size ${o} ${r}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},(0,Do.Nk)()),[`&${t}-item-only-child`]:{[`> ${s}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},mu=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:i,menuArrowSize:r,menuArrowOffset:s}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:r,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${o}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(r).mul(.6).equal(),height:e.calc(r).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${o}`,`transform ${n} ${o}`,`top ${n} ${o}`,`color ${n} ${o}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,go.zA)(e.calc(s).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,go.zA)(s)})`}}}}},gu=e=>{const{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:i,motionDurationMid:r,motionEaseInOut:s,paddingXS:a,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:h,subMenuItemBorderRadius:p,menuArrowSize:m,menuArrowOffset:g,lineType:f,groupTitleLineHeight:b,groupTitleFontSize:v}=e;return[{"":{[n]:Object.assign(Object.assign({},(0,Do.t6)()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Do.dF)(e)),(0,Do.t6)()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${(0,go.zA)(a)} ${(0,go.zA)(l)}`,fontSize:v,lineHeight:b,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${s}`,`background ${i} ${s}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${s}`,`background ${i} ${s}`,`padding ${r} ${s}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${s}`,`padding ${i} ${s}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:f,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),pu(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${(0,go.zA)(e.calc(o).mul(2).equal())} ${(0,go.zA)(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:h,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:h},pu(e)),mu(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${s}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),mu(e)),{[`&-inline-collapsed ${n}-submenu-arrow,\n &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,go.zA)(g)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,go.zA)(e.calc(g).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${(0,go.zA)(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,go.zA)(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,go.zA)(g)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},fu=e=>{var t,n,o;const{colorPrimary:i,colorError:r,colorTextDisabled:s,colorErrorBg:a,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:h,lineWidth:p,lineWidthBold:m,controlItemBgActive:g,colorBgTextHover:f,controlHeightLG:b,lineHeight:v,colorBgElevated:w,marginXXS:y,padding:C,fontSize:x,controlHeightSM:E,fontSizeLG:S,colorTextLightSolid:A,colorErrorHover:k}=e,R=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,M=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:p,T=null!==(o=e.itemMarginInline)&&void 0!==o?o:e.marginXXS,I=new Yc.Y(A).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:f,itemHoverBg:f,colorItemBgActive:h,itemActiveBg:g,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:R,colorActiveBarHeight:m,activeBarHeight:m,colorActiveBarBorderSize:p,activeBarBorderWidth:M,colorItemTextDisabled:s,itemDisabledColor:s,colorDangerItemText:r,dangerItemColor:r,colorDangerItemTextHover:r,dangerItemHoverColor:r,colorDangerItemTextSelected:r,dangerItemSelectedColor:r,colorDangerItemBgActive:a,dangerItemActiveBg:a,colorDangerItemBgSelected:a,dangerItemSelectedBg:a,itemMarginInline:T,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:v,collapsedWidth:2*b,popupBg:w,itemMarginBlock:y,itemPaddingInline:C,horizontalLineHeight:1.15*b+"px",iconSize:x,iconMarginInlineEnd:E-x,collapsedIconSize:S,groupTitleFontSize:x,darkItemDisabledColor:new Yc.Y(A).setA(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:r,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:A,darkItemSelectedBg:i,darkDangerItemSelectedBg:r,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:A,darkDangerItemHoverColor:k,darkDangerItemSelectedColor:A,darkDangerItemActiveBg:r,itemWidth:R?`calc(100% + ${M}px)`:`calc(100% - ${2*T}px)`}},bu=(e,t=e,n=!0)=>Ho("Menu",(e=>{const{colorBgElevated:t,controlHeightLG:n,fontSize:o,darkItemColor:i,darkDangerItemColor:r,darkItemBg:s,darkSubMenuItemBg:a,darkItemSelectedColor:l,darkItemSelectedBg:c,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:h,darkItemHoverColor:p,darkItemDisabledColor:m,darkDangerItemHoverColor:g,darkDangerItemSelectedColor:f,darkDangerItemActiveBg:b,popupBg:v,darkPopupBg:w}=e,y=e.calc(o).div(7).mul(5).equal(),C=Ro(e,{menuArrowSize:y,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(y).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),x=Ro(C,{itemColor:i,itemHoverColor:p,groupTitleColor:h,itemSelectedColor:l,subMenuItemSelectedColor:l,itemBg:s,popupBg:w,subMenuItemBg:a,itemActiveBg:"transparent",itemSelectedBg:c,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:m,dangerItemColor:r,dangerItemHoverColor:g,dangerItemSelectedColor:f,dangerItemActiveBg:b,dangerItemSelectedBg:u,menuSubMenuBg:a,horizontalItemSelectedColor:l,horizontalItemSelectedBg:c});return[gu(C),au(C),hu(C),uu(C,"light"),uu(x,"dark"),lu(C),Xc(C),su(C,"slide-up"),su(C,"slide-down"),Nc(C,"zoom-big")]}),fu,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),vu=e=>{var t;const{popupClassName:n,icon:i,title:r,theme:s}=e,a=o.useContext(nc),{prefixCls:l,inlineCollapsed:c,theme:u}=a,d=_a();let h;if(i){const e=o.isValidElement(r)&&"span"===r.type;h=o.createElement(o.Fragment,null,mo(i,{className:M()(o.isValidElement(i)?null===(t=i.props)||void 0===t?void 0:t.className:"",`${l}-item-icon`)}),e?r:o.createElement("span",{className:`${l}-title-content`},r))}else h=c&&!d.length&&r&&"string"==typeof r?o.createElement("div",{className:`${l}-inline-collapsed-noicon`},r.charAt(0)):o.createElement("span",{className:`${l}-title-content`},r);const p=o.useMemo((()=>Object.assign(Object.assign({},a),{firstLevel:!1})),[a]),[m]=Xs("Menu");return o.createElement(nc.Provider,{value:p},o.createElement(Dl,Object.assign({},Dn(e,["icon"]),{title:h,popupClassName:M()(l,n,`${l}-${s||u}`),popupStyle:Object.assign({zIndex:m},e.popupStyle)})))};function wu(e){return null===e||!1===e}const yu={item:Gc,submenu:vu,divider:oc},Cu=(0,o.forwardRef)(((e,t)=>{var n;const i=o.useContext(qc),r=i||{},{getPrefixCls:s,getPopupContainer:a,direction:c,menu:u}=o.useContext(ho.QO),d=s(),{prefixCls:h,className:p,style:m,theme:g="light",expandIcon:f,_internalDisableMenuItemTitleTooltip:b,inlineCollapsed:v,siderCollapsed:w,rootClassName:y,mode:C,selectable:x,onClick:E,overflowedIndicatorPopupClassName:S}=e,A=Dn(function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),["collapsedWidth"]);null===(n=r.validator)||void 0===n||n.call(r,{mode:C});const k=(0,l.A)(((...e)=>{var t;null==E||E.apply(void 0,e),null===(t=r.onClick)||void 0===t||t.call(r)})),R=r.mode||C,T=null!=x?x:r.selectable,I=null!=v?v:w,P={horizontal:{motionName:`${d}-slide-up`},inline:tc(d),other:{motionName:`${d}-zoom-big`}},O=s("menu",h||r.prefixCls),D=vi(O),[N,H,L]=bu(O,D,!i),$=M()(`${O}-${g}`,null==u?void 0:u.className,p),_=o.useMemo((()=>{var e,t;if("function"==typeof f||wu(f))return f||null;if("function"==typeof r.expandIcon||wu(r.expandIcon))return r.expandIcon||null;if("function"==typeof(null==u?void 0:u.expandIcon)||wu(null==u?void 0:u.expandIcon))return(null==u?void 0:u.expandIcon)||null;const n=null!==(e=null!=f?f:null==r?void 0:r.expandIcon)&&void 0!==e?e:null==u?void 0:u.expandIcon;return mo(n,{className:M()(`${O}-submenu-expand-icon`,o.isValidElement(n)?null===(t=n.props)||void 0===t?void 0:t.className:void 0)})}),[f,null==r?void 0:r.expandIcon,null==u?void 0:u.expandIcon,O]),z=o.useMemo((()=>({prefixCls:O,inlineCollapsed:I||!1,direction:c,firstLevel:!0,theme:g,mode:R,disableMenuItemTitleTooltip:b})),[O,I,c,b,g]);return N(o.createElement(qc.Provider,{value:null},o.createElement(nc.Provider,{value:z},o.createElement(Gl,Object.assign({getPopupContainer:a,overflowedIndicator:o.createElement(Yl,null),overflowedIndicatorPopupClassName:M()(O,`${O}-${g}`,S),mode:R,selectable:T,onClick:k},A,{inlineCollapsed:I,style:Object.assign(Object.assign({},null==u?void 0:u.style),m),className:$,prefixCls:O,direction:c,defaultMotions:P,expandIcon:_,ref:t,rootClassName:M()(y,H,r.rootClassName,L,D),_internalComponents:yu})))))})),xu=Cu,Eu=(0,o.forwardRef)(((e,t)=>{const n=(0,o.useRef)(null),i=o.useContext(Kl);return(0,o.useImperativeHandle)(t,(()=>({menu:n.current,focus:e=>{var t;null===(t=n.current)||void 0===t||t.focus(e)}}))),o.createElement(xu,Object.assign({ref:n},e,i))}));Eu.Item=Gc,Eu.SubMenu=vu,Eu.Divider=oc,Eu.ItemGroup=$l;const Su=Eu,Au=new go.Mo("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ku=new go.Mo("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),Ru=new go.Mo("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Mu=new go.Mo("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Tu=new go.Mo("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Iu=new go.Mo("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Pu={"move-up":{inKeyframes:new go.Mo("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new go.Mo("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:Au,outKeyframes:ku},"move-left":{inKeyframes:Ru,outKeyframes:Mu},"move-right":{inKeyframes:Tu,outKeyframes:Iu}},Ou=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:i,outKeyframes:r}=Pu[t];return[kc(o,i,r,e.motionDurationMid),{[`\n ${o}-enter,\n ${o}-appear\n `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Du=e=>{const{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:i}=e,r=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${r}`]:{[`&${r}-danger:not(${r}-disabled)`]:{color:o,"&:hover":{color:i,backgroundColor:o}}}}}},Nu=e=>{const{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:i,sizePopupArrow:r,antCls:s,iconCls:a,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:h,fontSizeIcon:p,controlPaddingHorizontal:m,colorBgElevated:g}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(r).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${s}-btn`]:{[`& > ${a}-down, & > ${s}-btn-icon > ${a}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${s}-btn > ${a}-down`]:{fontSize:p},[`${a}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${a}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottomLeft,\n &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottomLeft,\n &${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottom,\n &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottom,\n &${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottomRight,\n &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Qc},[`&${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-topLeft,\n &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-topLeft,\n &${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-top,\n &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-top,\n &${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-topRight,\n &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Zc},[`&${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottomLeft,\n &${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottom,\n &${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Jc},[`&${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-topLeft,\n &${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-top,\n &${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-topRight`]:{animationName:eu}}},ta(e,g,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},(0,Do.dF)(e)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},(0,Do.K8)(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${(0,go.zA)(c)} ${(0,go.zA)(m)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${(0,go.zA)(c)} ${(0,go.zA)(m)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},(0,Do.K8)(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,go.zA)(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:p,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${(0,go.zA)(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:g,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[su(e,"slide-up"),su(e,"slide-down"),Ou(e,"move-up"),Ou(e,"move-down"),Nc(e,"zoom-big")]]},Hu=Ho("Dropdown",(e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:o,componentCls:i}=e,r=Ro(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:o});return[Nu(r),Du(r)]}),(e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},Zs({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Qs(e))),{resetStyle:!1}),Lu=e=>{var t;const{menu:n,arrow:i,prefixCls:r,children:s,trigger:a,disabled:c,dropdownRender:u,popupRender:d,getPopupContainer:h,overlayClassName:p,rootClassName:m,overlayStyle:g,open:f,onOpenChange:b,visible:v,onVisibleChange:w,mouseEnterDelay:y=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:x=!0,placement:E="",overlay:S,transitionName:A,destroyOnHidden:k,destroyPopupOnHide:R}=e,{getPopupContainer:T,getPrefixCls:I,direction:P,dropdown:O}=o.useContext(ho.QO),D=d||u;(0,ao.rJ)("Dropdown");const N=o.useMemo((()=>{const e=I();return void 0!==A?A:E.includes("top")?`${e}-slide-down`:`${e}-slide-up`}),[I,E,A]),H=o.useMemo((()=>E?E.includes("Center")?E.slice(0,E.indexOf("Center")):E:"rtl"===P?"bottomRight":"bottomLeft"),[E,P]),L=I("dropdown",r),$=vi(L),[_,z,F]=Hu(L,$),[,B]=(0,No.Ay)(),j=o.Children.only("object"!=typeof(ee=s)&&"function"!=typeof ee||null===ee?o.createElement("span",null,s):s),W=mo(j,{className:M()(`${L}-trigger`,{[`${L}-rtl`]:"rtl"===P},j.props.className),disabled:null!==(t=j.props.disabled)&&void 0!==t?t:c}),V=c?[]:a,G=!!(null==V?void 0:V.includes("contextMenu")),[K,U]=(0,so.A)(!1,{value:null!=f?f:v}),q=(0,l.A)((e=>{null==b||b(e,{source:"trigger"}),null==w||w(e),U(e)})),Y=M()(p,m,z,F,$,null==O?void 0:O.className,{[`${L}-rtl`]:"rtl"===P}),X=ra({arrowPointAtCenter:"object"==typeof i&&i.pointAtCenter,autoAdjustOverflow:x,offset:B.marginXXS,arrowWidth:i?B.sizePopupArrow:0,borderRadius:B.borderRadius}),Q=o.useCallback((()=>{(null==n?void 0:n.selectable)&&(null==n?void 0:n.multiple)||(null==b||b(!1,{source:"menu"}),U(!1))}),[null==n?void 0:n.selectable,null==n?void 0:n.multiple]),[J,Z]=Xs("Dropdown",null==g?void 0:g.zIndex);var ee;let te=o.createElement(Gs,Object.assign({alignPoint:G},Dn(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:C,visible:K,builtinPlacements:X,arrow:!!i,overlayClassName:Y,prefixCls:L,getPopupContainer:h||T,transitionName:N,trigger:V,overlay:()=>{let e;return e=(null==n?void 0:n.items)?o.createElement(Su,Object.assign({},n)):"function"==typeof S?S():S,D&&(e=D(e)),e=o.Children.only("string"==typeof e?o.createElement("span",null,e):e),o.createElement(Uc,{prefixCls:`${L}-menu`,rootClassName:M()(F,$),expandIcon:o.createElement("span",{className:`${L}-menu-submenu-arrow`},"rtl"===P?o.createElement(Qr,{className:`${L}-menu-submenu-arrow-icon`}):o.createElement(es,{className:`${L}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Q,validator:({mode:e})=>{}},e)},placement:H,onVisibleChange:q,overlayStyle:Object.assign(Object.assign(Object.assign({},null==O?void 0:O.style),g),{zIndex:J}),autoDestroy:null!=k?k:R}),W);return J&&(te=o.createElement(Ks.Provider,{value:Z},te)),_(te)},$u=aa(Lu,"align",void 0,"dropdown",(e=>e));Lu._InternalPanelDoNotUseOrYouWillBeFired=e=>o.createElement($u,Object.assign({},e),o.createElement("span",null));const _u=Lu;const zu=o.createContext(void 0),Fu=/^[\u4E00-\u9FA5]{2}$/,Bu=Fu.test.bind(Fu);function ju(e){return"string"==typeof e}function Wu(e){return"text"===e||"link"===e}["default","primary","danger"].concat((0,tt.A)(Hc));const Vu={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var Gu=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Vu}))};const Ku=o.forwardRef(Gu),Uu=(0,o.forwardRef)(((e,t)=>{const{className:n,style:i,children:r,prefixCls:s}=e,a=M()(`${s}-icon`,n);return o.createElement("span",{ref:t,className:a,style:i},r)})),qu=Uu,Yu=(0,o.forwardRef)(((e,t)=>{const{prefixCls:n,className:i,style:r,iconClassName:s}=e,a=M()(`${n}-loading-icon`,i);return o.createElement(qu,{prefixCls:n,className:a,style:r,ref:t},o.createElement(Ku,{className:s}))})),Xu=()=>({width:0,opacity:0,transform:"scale(0)"}),Qu=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),Ju=e=>{const{prefixCls:t,loading:n,existIcon:i,className:r,style:s,mount:a}=e,l=!!n;return i?o.createElement(Yu,{prefixCls:t,className:r,style:s}):o.createElement(Bo.Ay,{visible:l,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Xu,onAppearActive:Qu,onEnterStart:Xu,onEnterActive:Qu,onLeaveStart:Qu,onLeaveActive:Xu},(({className:e,style:n},i)=>{const a=Object.assign(Object.assign({},s),n);return o.createElement(Yu,{prefixCls:t,className:M()(r,e),style:a,ref:i})}))},Zu=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),ed=e=>{const{componentCls:t,fontSize:n,lineWidth:o,groupBorderColor:i,colorErrorHover:r}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(o).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},Zu(`${t}-primary`,i),Zu(`${t}-danger`,r)]}};var td,nd=["b"],od=["v"],id=function(e){return Math.round(Number(e||0))},rd=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(e){return(0,we.A)(this,n),t.call(this,function(e){if(e instanceof Yc.Y)return e;if(e&&"object"===(0,S.A)(e)&&"h"in e&&"b"in e){var t=e,n=t.b,o=(0,F.A)(t,nd);return(0,A.A)((0,A.A)({},o),{},{v:n})}return"string"==typeof e&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e}(e))}return(0,ye.A)(n,[{key:"toHsbString",value:function(){var e=this.toHsb(),t=id(100*e.s),n=id(100*e.b),o=id(e.h),i=e.a,r="hsb(".concat(o,", ").concat(t,"%, ").concat(n,"%)"),s="hsba(".concat(o,", ").concat(t,"%, ").concat(n,"%, ").concat(i.toFixed(0===i?0:2),")");return 1===i?r:s}},{key:"toHsb",value:function(){var e=this.toHsv(),t=e.v,n=(0,F.A)(e,od);return(0,A.A)((0,A.A)({},n),{},{b:t,a:this.a})}}]),n}(Yc.Y);(td="#1677ff")instanceof rd||new rd(td);let sd=function(){return(0,ye.A)((function e(t){var n;if((0,we.A)(this,e),this.cleared=!1,t instanceof e)return this.metaColor=t.metaColor.clone(),this.colors=null===(n=t.colors)||void 0===n?void 0:n.map((t=>({color:new e(t.color),percent:t.percent}))),void(this.cleared=t.cleared);const o=Array.isArray(t);o&&t.length?(this.colors=t.map((({color:t,percent:n})=>({color:new e(t),percent:n}))),this.metaColor=new rd(this.colors[0].color.metaColor)):this.metaColor=new rd(o?"":t),(!t||o&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}),[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return e=this.toHexString(),t=this.metaColor.a<1,e?((e,t)=>(null==e?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"")(e,t):"";var e,t}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:e}=this;return e?`linear-gradient(90deg, ${e.map((e=>`${e.color.toRgbString()} ${e.percent}%`)).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(e){return!(!e||this.isGradient()!==e.isGradient())&&(this.isGradient()?this.colors.length===e.colors.length&&this.colors.every(((t,n)=>{const o=e.colors[n];return t.percent===o.percent&&t.color.equals(o.color)})):this.toHexString()===e.toHexString())}}])}();var ad=n(94925),ld=n(85045);const cd=e=>{const{paddingInline:t,onlyIconSize:n}=e;return Ro(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},ud=e=>{var t,n,o,i,r,s;const a=null!==(t=e.contentFontSize)&&void 0!==t?t:e.fontSize,l=null!==(n=e.contentFontSizeSM)&&void 0!==n?n:e.fontSize,c=null!==(o=e.contentFontSizeLG)&&void 0!==o?o:e.fontSizeLG,u=null!==(i=e.contentLineHeight)&&void 0!==i?i:(0,ad.k)(a),d=null!==(r=e.contentLineHeightSM)&&void 0!==r?r:(0,ad.k)(l),h=null!==(s=e.contentLineHeightLG)&&void 0!==s?s:(0,ad.k)(c),p=((e,t)=>{const{r:n,g:o,b:i,a:r}=e.toRgb(),s=new rd(e.toRgbString()).onBackground(t).toHsv();return r<=.5?s.v>.5:.299*n+.587*o+.114*i>192})(new sd(e.colorBgSolid),"#fff")?"#000":"#fff",m=Hc.reduce(((t,n)=>Object.assign(Object.assign({},t),{[`${n}ShadowColor`]:`0 ${(0,go.zA)(e.controlOutlineWidth)} 0 ${(0,ld.A)(e[`${n}1`],e.colorBgContainer)}`})),{});return Object.assign(Object.assign({},m),{fontWeight:400,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:p,contentFontSize:a,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:h,paddingBlock:Math.max((e.controlHeight-a*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*d)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-c*h)/2-e.lineWidth,0)})},dd=e=>{const{componentCls:t,iconCls:n,fontWeight:o,opacityLoading:i,motionDurationSlow:r,motionEaseInOut:s,marginXS:a,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:e.marginXS,alignItems:"center",justifyContent:"center",fontWeight:o,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:(0,Do.Nk)(),"> a":{color:"currentColor"},"&:not(:disabled)":(0,Do.K8)(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"},[`&${t}-round`]:{width:"auto"}},[`&${t}-loading`]:{opacity:i,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map((e=>`${e} ${r} ${s}`)).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(a).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(a).mul(-1).equal()}}}}}},hd=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),pd=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),md=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),gd=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),fd=(e,t,n,o,i,r,s,a)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:o||void 0,boxShadow:"none"},hd(e,Object.assign({background:t},s),Object.assign({background:t},a))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:r||void 0}})}),bd=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},gd(e))}),vd=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),wd=(e,t,n,o)=>{const i=o&&["link","text"].includes(o)?vd:bd;return Object.assign(Object.assign({},i(e)),hd(e.componentCls,t,n))},yd=(e,t,n,o,i)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:n},wd(e,o,i))}),Cd=(e,t,n,o,i)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:n},wd(e,o,i))}),xd=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Ed=(e,t,n,o)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},wd(e,n,o))}),Sd=(e,t,n,o,i)=>({[`&${e.componentCls}-variant-${n}`]:Object.assign({color:t,boxShadow:"none"},wd(e,o,i,n))}),Ad=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},yd(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),xd(e)),Ed(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),fd(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),Sd(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),kd=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Cd(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),xd(e)),Ed(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),Sd(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Sd(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),fd(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),Rd=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},yd(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Cd(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),xd(e)),Ed(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),Sd(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Sd(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),fd(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Md=e=>Object.assign(Object.assign({},Sd(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),fd(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),Td=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:Ad(e),[`${t}-color-primary`]:kd(e),[`${t}-color-dangerous`]:Rd(e),[`${t}-color-link`]:Md(e)},(e=>{const{componentCls:t}=e;return Hc.reduce(((n,o)=>{const i=e[`${o}6`],r=e[`${o}1`],s=e[`${o}5`],a=e[`${o}2`],l=e[`${o}3`],c=e[`${o}7`];return Object.assign(Object.assign({},n),{[`&${t}-color-${o}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:e[`${o}ShadowColor`]},yd(e,e.colorTextLightSolid,i,{background:s},{background:c})),Cd(e,i,e.colorBgContainer,{color:s,borderColor:s,background:e.colorBgContainer},{color:c,borderColor:c,background:e.colorBgContainer})),xd(e)),Ed(e,r,{background:a},{background:l})),Sd(e,i,"link",{color:s},{color:c})),Sd(e,i,"text",{color:s,background:r},{color:c,background:l}))})}),{})})(e))},Id=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Cd(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Sd(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),yd(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Sd(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Pd=(e,t="")=>{const{componentCls:n,controlHeight:o,fontSize:i,borderRadius:r,buttonPaddingHorizontal:s,iconCls:a,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:i,height:o,padding:`${(0,go.zA)(l)} ${(0,go.zA)(s)}`,borderRadius:r,[`&${n}-icon-only`]:{width:o,[a]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:pd(e)},{[`${n}${n}-round${t}`]:md(e)}]},Od=e=>{const t=Ro(e,{fontSize:e.contentFontSize});return Pd(t,e.componentCls)},Dd=e=>{const t=Ro(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Pd(t,`${e.componentCls}-sm`)},Nd=e=>{const t=Ro(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Pd(t,`${e.componentCls}-lg`)},Hd=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},Ld=Ho("Button",(e=>{const t=cd(e);return[dd(t),Od(t),Dd(t),Nd(t),Hd(t),Td(t),Id(t),ed(t)]}),ud,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function $d(e,t,n){const{focusElCls:o,focus:i,borderElCls:r}=n,s=r?"> *":"",a=["hover",i?"focus":null,"active"].filter(Boolean).map((e=>`&:${e} ${s}`)).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[a]:{zIndex:2}},o?{[`&${o}`]:{zIndex:2}}:{}),{[`&[disabled] ${s}`]:{zIndex:0}})}}function _d(e,t,n){const{borderElCls:o}=n,i=o?`> ${o}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function zd(e,t={focus:!0}){const{componentCls:n}=e,o=`${n}-compact`;return{[o]:Object.assign(Object.assign({},$d(e,o,t)),_d(n,o,t))}}function Fd(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Bd(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},Fd(e,t)),(n=e.componentCls,o=t,{[`&-item:not(${o}-first-item):not(${o}-last-item)`]:{borderRadius:0},[`&-item${o}-first-item:not(${o}-last-item)`]:{[`&, &${n}-sm, &${n}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${o}-last-item:not(${o}-first-item)`]:{[`&, &${n}-sm, &${n}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}))};var n,o}const jd=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:o,calc:i}=e,r=i(o).mul(-1).equal(),s=e=>{const i=`${t}-compact${e?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${i} + ${i}::before`]:{position:"absolute",top:e?r:0,insetInlineStart:e?0:r,backgroundColor:n,content:'""',width:e?"100%":o,height:e?o:"100%"}}};return Object.assign(Object.assign({},s()),s(!0))},Wd=$o(["Button","compact"],(e=>{const t=cd(e);return[zd(t),Bd(t),jd(t)]}),ud);const Vd={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},Gd=o.forwardRef(((e,t)=>{var n,i;const{loading:r=!1,prefixCls:s,color:a,variant:l,type:c,danger:u=!1,shape:d="default",size:h,styles:p,disabled:m,className:g,rootClassName:b,children:v,icon:w,iconPosition:y="start",ghost:C=!1,block:x=!1,htmlType:E="button",classNames:S,style:A={},autoInsertSpace:k,autoFocus:R}=e,T=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),I=c||"default",{button:P}=o.useContext(ho.QO),[O,D]=(0,o.useMemo)((()=>{if(a&&l)return[a,l];if(c||u){const e=Vd[I]||[];return u?["danger",e[1]]:e}return(null==P?void 0:P.color)&&(null==P?void 0:P.variant)?[P.color,P.variant]:["default","outlined"]}),[c,a,l,u,null==P?void 0:P.variant,null==P?void 0:P.color]),N="danger"===O?"dangerous":O,{getPrefixCls:H,direction:L,autoInsertSpace:$,className:_,style:z,classNames:F,styles:B}=(0,ho.TP)("button"),j=null===(n=null!=k?k:$)||void 0===n||n,W=H("btn",s),[V,G,K]=Ld(W),U=(0,o.useContext)(bi.A),q=null!=m?m:U,Y=(0,o.useContext)(zu),X=(0,o.useMemo)((()=>function(e){if("object"==typeof e&&e){let t=null==e?void 0:e.delay;return t=Number.isNaN(t)||"number"!=typeof t?0:t,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}(r)),[r]),[Q,J]=(0,o.useState)(X.loading),[Z,ee]=(0,o.useState)(!1),te=(0,o.useRef)(null),ne=(0,f.xK)(t,te),oe=1===o.Children.count(v)&&!w&&!Wu(D),ie=(0,o.useRef)(!0);o.useEffect((()=>(ie.current=!1,()=>{ie.current=!0})),[]),(0,o.useLayoutEffect)((()=>{let e=null;return X.delay>0?e=setTimeout((()=>{e=null,J(!0)}),X.delay):J(X.loading),function(){e&&(clearTimeout(e),e=null)}}),[X.delay,X.loading]),(0,o.useEffect)((()=>{if(!te.current||!j)return;const e=te.current.textContent||"";oe&&Bu(e)?Z||ee(!0):Z&&ee(!1)})),(0,o.useEffect)((()=>{R&&te.current&&te.current.focus()}),[]);const re=o.useCallback((t=>{var n;Q||q?t.preventDefault():null===(n=e.onClick)||void 0===n||n.call(e,t)}),[e.onClick,Q,q]),{compactSize:se,compactItemClassnames:ae}=yc(W,L),le=pc((e=>{var t,n;return null!==(n=null!==(t=null!=h?h:se)&&void 0!==t?t:Y)&&void 0!==n?n:e})),ce=le&&null!==(i={large:"lg",small:"sm",middle:void 0}[le])&&void 0!==i?i:"",ue=Q?"loading":w,de=Dn(T,["navigate"]),he=M()(W,G,K,{[`${W}-${d}`]:"default"!==d&&d,[`${W}-${I}`]:I,[`${W}-dangerous`]:u,[`${W}-color-${N}`]:N,[`${W}-variant-${D}`]:D,[`${W}-${ce}`]:ce,[`${W}-icon-only`]:!v&&0!==v&&!!ue,[`${W}-background-ghost`]:C&&!Wu(D),[`${W}-loading`]:Q,[`${W}-two-chinese-chars`]:Z&&j&&!Q,[`${W}-block`]:x,[`${W}-rtl`]:"rtl"===L,[`${W}-icon-end`]:"end"===y},ae,g,b,_),pe=Object.assign(Object.assign({},z),A),me=M()(null==S?void 0:S.icon,F.icon),ge=Object.assign(Object.assign({},(null==p?void 0:p.icon)||{}),B.icon||{}),fe=w&&!Q?o.createElement(qu,{prefixCls:W,className:me,style:ge},w):r&&"object"==typeof r&&r.icon?o.createElement(qu,{prefixCls:W,className:me,style:ge},r.icon):o.createElement(Ju,{existIcon:!!w,prefixCls:W,loading:Q,mount:ie.current}),be=v||0===v?function(e,t){let n=!1;const i=[];return o.Children.forEach(e,(e=>{const t=typeof e,o="string"===t||"number"===t;if(n&&o){const t=i.length-1,n=i[t];i[t]=`${n}${e}`}else i.push(e);n=o})),o.Children.map(i,(e=>function(e,t){if(null==e)return;const n=t?" ":"";return"string"!=typeof e&&"number"!=typeof e&&ju(e.type)&&Bu(e.props.children)?mo(e,{children:e.props.children.split("").join(n)}):ju(e)?Bu(e)?o.createElement("span",null,e.split("").join(n)):o.createElement("span",null,e):po(e)?o.createElement("span",null,e):e}(e,t)))}(v,oe&&j):null;if(void 0!==de.href)return V(o.createElement("a",Object.assign({},de,{className:M()(he,{[`${W}-disabled`]:q}),href:q?void 0:de.href,style:pe,onClick:re,ref:ne,tabIndex:q?-1:0}),fe,be));let ve=o.createElement("button",Object.assign({},T,{type:E,className:he,style:pe,onClick:re,disabled:q,ref:ne}),fe,be,ae&&o.createElement(Wd,{prefixCls:W}));return Wu(D)||(ve=o.createElement(fi,{component:"Button",disabled:Q},ve)),V(ve)})),Kd=Gd;Kd.Group=e=>{const{getPrefixCls:t,direction:n}=o.useContext(ho.QO),{prefixCls:i,size:r,className:s}=e,a=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","size","className"]),l=t("btn-group",i),[,,c]=(0,No.Ay)(),u=o.useMemo((()=>{switch(r){case"large":return"lg";case"small":return"sm";default:return""}}),[r]),d=M()(l,{[`${l}-${u}`]:u,[`${l}-rtl`]:"rtl"===n},s,c);return o.createElement(zu.Provider,{value:r},o.createElement("div",Object.assign({},a,{className:d})))},Kd.__ANT_BUTTON=!0;const Ud=Kd;function qd(e){return["small","middle","large"].includes(e)}function Yd(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}const Xd=o.createContext({latestIndex:0}),Qd=Xd.Provider,Jd=({className:e,index:t,children:n,split:i,style:r})=>{const{latestIndex:s}=o.useContext(Xd);return null==n?null:o.createElement(o.Fragment,null,o.createElement("div",{className:e,style:r},n),t<s&&i&&o.createElement("span",{className:`${e}-split`},i))};const Zd=o.forwardRef(((e,t)=>{var n;const{getPrefixCls:i,direction:r,size:s,className:a,style:l,classNames:c,styles:u}=(0,ho.TP)("space"),{size:d=(null!=s?s:"small"),align:h,className:p,rootClassName:m,children:g,direction:f="horizontal",prefixCls:b,split:v,style:w,wrap:y=!1,classNames:C,styles:x}=e,E=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[S,A]=Array.isArray(d)?d:[d,d],k=qd(A),R=qd(S),T=Yd(A),I=Yd(S),P=U(g,{keepEmpty:!0}),O=void 0===h&&"horizontal"===f?"center":h,D=i("space",b),[N,H,L]=bc(D),$=M()(D,a,H,`${D}-${f}`,{[`${D}-rtl`]:"rtl"===r,[`${D}-align-${O}`]:O,[`${D}-gap-row-${A}`]:k,[`${D}-gap-col-${S}`]:R},p,m,L),_=M()(`${D}-item`,null!==(n=null==C?void 0:C.item)&&void 0!==n?n:c.item);let z=0;const F=P.map(((e,t)=>{var n;null!=e&&(z=t);const i=(null==e?void 0:e.key)||`${_}-${t}`;return o.createElement(Jd,{className:_,key:i,index:t,split:v,style:null!==(n=null==x?void 0:x.item)&&void 0!==n?n:u.item},e)})),B=o.useMemo((()=>({latestIndex:z})),[z]);if(0===P.length)return null;const j={};return y&&(j.flexWrap="wrap"),!R&&I&&(j.columnGap=S),!k&&T&&(j.rowGap=A),N(o.createElement("div",Object.assign({ref:t,className:$,style:Object.assign(Object.assign(Object.assign({},j),l),w)},E),o.createElement(Qd,{value:B},F)))})),eh=Zd;eh.Compact=e=>{const{getPrefixCls:t,direction:n}=o.useContext(ho.QO),{size:i,direction:r,block:s,prefixCls:a,className:l,rootClassName:c,children:u}=e,d=vc(e,["size","direction","block","prefixCls","className","rootClassName","children"]),h=pc((e=>null!=i?i:e)),p=t("space-compact",a),[m,g]=bc(p),f=M()(p,g,{[`${p}-rtl`]:"rtl"===n,[`${p}-block`]:s,[`${p}-vertical`]:"vertical"===r},l,c),b=o.useContext(wc),v=U(u),w=o.useMemo((()=>v.map(((e,t)=>{const n=(null==e?void 0:e.key)||`${p}-item-${t}`;return o.createElement(xc,{key:n,compactSize:h,compactDirection:r,isFirstItem:0===t&&(!b||(null==b?void 0:b.isFirstItem)),isLastItem:t===v.length-1&&(!b||(null==b?void 0:b.isLastItem))},e)}))),[i,v,b]);return 0===v.length?null:m(o.createElement("div",Object.assign({className:f},d),w))};const th=eh;const nh=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:i}=o.useContext(ho.QO),{prefixCls:r,type:s="default",danger:a,disabled:l,loading:c,onClick:u,htmlType:d,children:h,className:p,menu:m,arrow:g,autoFocus:f,overlay:b,trigger:v,align:w,open:y,onOpenChange:C,placement:x,getPopupContainer:E,href:S,icon:A=o.createElement(Yl,null),title:k,buttonsRender:R=e=>e,mouseEnterDelay:T,mouseLeaveDelay:I,overlayClassName:P,overlayStyle:O,destroyOnHidden:D,destroyPopupOnHide:N,dropdownRender:H,popupRender:L}=e,$=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),_=n("dropdown",r),z=`${_}-button`,F={menu:m,arrow:g,autoFocus:f,align:w,disabled:l,trigger:l?[]:v,onOpenChange:C,getPopupContainer:E||t,mouseEnterDelay:T,mouseLeaveDelay:I,overlayClassName:P,overlayStyle:O,destroyOnHidden:D,popupRender:L||H},{compactSize:B,compactItemClassnames:j}=yc(_,i),W=M()(z,j,p);"destroyPopupOnHide"in e&&(F.destroyPopupOnHide=N),"overlay"in e&&(F.overlay=b),"open"in e&&(F.open=y),F.placement="placement"in e?x:"rtl"===i?"bottomLeft":"bottomRight";const V=o.createElement(Ud,{type:s,danger:a,disabled:l,loading:c,onClick:u,htmlType:d,href:S,title:k},h),G=o.createElement(Ud,{type:s,danger:a,icon:A}),[K,U]=R([V,G]);return o.createElement(th.Compact,Object.assign({className:W,size:B,block:!0},$),K,o.createElement(_u,Object.assign({},F),U))};nh.__ANT_BUTTON=!0;const oh=nh,ih=_u;ih.Button=oh;const rh=ih,sh=o.createContext(null),ah=sh.Provider,lh=sh,ch=o.createContext(null),uh=ch.Provider,dh=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-group`;return{[o]:Object.assign(Object.assign({},(0,Do.dF)(e)),{display:"inline-block",fontSize:0,[`&${o}-rtl`]:{direction:"rtl"},[`&${o}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},hh=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:o,radioSize:i,motionDurationSlow:r,motionDurationMid:s,motionEaseInOutCirc:a,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:h,paddingXS:p,dotColorDisabled:m,lineType:g,radioColor:f,radioBgColor:b,calc:v}=e,w=`${t}-inner`,y=v(i).sub(v(4).mul(2)),C=v(1).mul(i).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},(0,Do.dF)(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${(0,go.zA)(u)} ${g} ${o}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},(0,Do.dF)(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,\n &:hover ${w}`]:{borderColor:o},[`${t}-input:focus-visible + ${w}`]:Object.assign({},(0,Do.jk)(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:C,height:C,marginBlockStart:v(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:v(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:f,borderBlockStart:0,borderInlineStart:0,borderRadius:C,transform:"scale(0)",opacity:0,transition:`all ${r} ${a}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:C,height:C,backgroundColor:l,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${s}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[w]:{borderColor:o,backgroundColor:b,"&::after":{transform:`scale(${e.calc(e.dotSize).div(i).equal()})`,opacity:1,transition:`all ${r} ${a}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[w]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:m}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:h,cursor:"not-allowed"},[`&${t}-checked`]:{[w]:{"&::after":{transform:`scale(${v(y).div(i).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:p,paddingInlineEnd:p}})}},ph=e=>{const{buttonColor:t,controlHeight:n,componentCls:o,lineWidth:i,lineType:r,colorBorder:s,motionDurationSlow:a,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:h,controlHeightLG:p,controlHeightSM:m,paddingXS:g,borderRadius:f,borderRadiusSM:b,borderRadiusLG:v,buttonCheckedBg:w,buttonSolidCheckedColor:y,colorTextDisabled:C,colorBgContainerDisabled:x,buttonCheckedBgDisabled:E,buttonCheckedColorDisabled:S,colorPrimary:A,colorPrimaryHover:k,colorPrimaryActive:R,buttonSolidCheckedBg:M,buttonSolidCheckedHoverBg:T,buttonSolidCheckedActiveBg:I,calc:P}=e;return{[`${o}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:(0,go.zA)(P(n).sub(P(i).mul(2)).equal()),background:d,border:`${(0,go.zA)(i)} ${r} ${s}`,borderBlockStartWidth:P(i).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:i,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${o}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:P(i).mul(-1).equal(),insetInlineStart:P(i).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:i,paddingInline:0,backgroundColor:s,transition:`background-color ${a}`,content:'""'}},"&:first-child":{borderInlineStart:`${(0,go.zA)(i)} ${r} ${s}`,borderStartStartRadius:f,borderEndStartRadius:f},"&:last-child":{borderStartEndRadius:f,borderEndEndRadius:f},"&:first-child:last-child":{borderRadius:f},[`${o}-group-large &`]:{height:p,fontSize:h,lineHeight:(0,go.zA)(P(p).sub(P(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},[`${o}-group-small &`]:{height:m,paddingInline:P(g).sub(i).equal(),paddingBlock:0,lineHeight:(0,go.zA)(P(m).sub(P(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:A},"&:has(:focus-visible)":Object.assign({},(0,Do.jk)(e)),[`${o}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${o}-button-wrapper-disabled)`]:{zIndex:1,color:A,background:w,borderColor:A,"&::before":{backgroundColor:A},"&:first-child":{borderColor:A},"&:hover":{color:k,borderColor:k,"&::before":{backgroundColor:k}},"&:active":{color:R,borderColor:R,"&::before":{backgroundColor:R}}},[`${o}-group-solid &-checked:not(${o}-button-wrapper-disabled)`]:{color:y,background:M,borderColor:M,"&:hover":{color:y,background:T,borderColor:T},"&:active":{color:y,background:I,borderColor:I}},"&-disabled":{color:C,backgroundColor:x,borderColor:s,cursor:"not-allowed","&:first-child, &:hover":{color:C,backgroundColor:x,borderColor:s}},[`&-disabled${o}-button-wrapper-checked`]:{color:S,backgroundColor:E,borderColor:s,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},mh=Ho("Radio",(e=>{const{controlOutline:t,controlOutlineWidth:n}=e,o=`0 0 0 ${(0,go.zA)(n)} ${t}`,i=Ro(e,{radioFocusShadow:o,radioButtonFocusShadow:o});return[dh(i),hh(i),ph(i)]}),(e=>{const{wireframe:t,padding:n,marginXS:o,lineWidth:i,fontSizeLG:r,colorText:s,colorBgContainer:a,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:h,colorPrimaryActive:p,colorWhite:m}=e;return{radioSize:r,dotSize:t?r-8:r-2*(4+i),dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:h,buttonSolidCheckedActiveBg:p,buttonBg:a,buttonCheckedBg:a,buttonColor:s,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-i,wrapperMarginInlineEnd:o,radioColor:t?d:m,radioBgColor:t?a:d}}),{unitless:{radioSize:!0,dotSize:!0}});const gh=(e,t)=>{var n,i;const r=o.useContext(lh),s=o.useContext(ch),{getPrefixCls:a,direction:l,radio:c}=o.useContext(ho.QO),u=o.useRef(null),d=(0,f.K4)(t,u),{isFormItemInput:h}=o.useContext(Hr),{prefixCls:p,className:m,rootClassName:g,children:b,style:v,title:w}=e,y=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","className","rootClassName","children","style","title"]),C=a("radio",p),x="button"===((null==r?void 0:r.optionType)||s),E=x?`${C}-button`:C,S=vi(C),[A,k,R]=mh(C,S),T=Object.assign({},y),I=o.useContext(bi.A);r&&(T.name=r.name,T.onChange=t=>{var n,o;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(o=null==r?void 0:r.onChange)||void 0===o||o.call(r,t)},T.checked=e.value===r.value,T.disabled=null!==(n=T.disabled)&&void 0!==n?n:r.disabled),T.disabled=null!==(i=T.disabled)&&void 0!==i?i:I;const P=M()(`${E}-wrapper`,{[`${E}-wrapper-checked`]:T.checked,[`${E}-wrapper-disabled`]:T.disabled,[`${E}-wrapper-rtl`]:"rtl"===l,[`${E}-wrapper-in-form-item`]:h,[`${E}-wrapper-block`]:!!(null==r?void 0:r.block)},null==c?void 0:c.className,m,g,k,R,S),[O,D]=jr(T.onClick);return A(o.createElement(fi,{component:"Radio",disabled:T.disabled},o.createElement("label",{className:P,style:Object.assign(Object.assign({},null==c?void 0:c.style),v),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:w,onClick:O},o.createElement(uo,Object.assign({},T,{className:M()(T.className,{[Fo]:!x}),type:"radio",prefixCls:E,ref:d,onClick:D})),void 0!==b?o.createElement("span",{className:`${E}-label`},b):null)))},fh=o.forwardRef(gh),bh=o.forwardRef(((e,t)=>{const{getPrefixCls:n,direction:i}=o.useContext(ho.QO),r=ds(),{prefixCls:s,className:a,rootClassName:l,options:c,buttonStyle:u="outline",disabled:d,children:h,size:p,style:m,id:g,optionType:f,name:b=r,defaultValue:v,value:w,block:y=!1,onChange:C,onMouseEnter:x,onMouseLeave:E,onFocus:S,onBlur:A}=e,[k,R]=(0,so.A)(v,{value:w}),T=o.useCallback((t=>{const n=k,o=t.target.value;"value"in e||R(o),o!==n&&(null==C||C(t))}),[k,R,C]),I=n("radio",s),P=`${I}-group`,O=vi(I),[D,N,H]=mh(I,O);let L=h;c&&c.length>0&&(L=c.map((e=>"string"==typeof e||"number"==typeof e?o.createElement(fh,{key:e.toString(),prefixCls:I,disabled:d,value:e,checked:k===e},e):o.createElement(fh,{key:`radio-group-value-options-${e.value}`,prefixCls:I,disabled:e.disabled||d,value:e.value,checked:k===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label))));const $=pc(p),_=M()(P,`${P}-${u}`,{[`${P}-${$}`]:$,[`${P}-rtl`]:"rtl"===i,[`${P}-block`]:y},a,l,N,H,O),z=o.useMemo((()=>({onChange:T,value:k,disabled:d,name:b,optionType:f,block:y})),[T,k,d,b,f,y]);return D(o.createElement("div",Object.assign({},_e(e,{aria:!0,data:!0}),{className:_,style:m,onMouseEnter:x,onMouseLeave:E,onFocus:S,onBlur:A,id:g,ref:t}),o.createElement(ah,{value:z},L)))})),vh=o.memo(bh);const wh=(e,t)=>{const{getPrefixCls:n}=o.useContext(ho.QO),{prefixCls:i}=e,r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls"]),s=n("radio",i);return o.createElement(uh,{value:"button"},o.createElement(fh,Object.assign({prefixCls:s},r,{type:"radio",ref:t})))},yh=o.forwardRef(wh),Ch=fh;Ch.Button=yh,Ch.Group=vh,Ch.__ANT_RADIO=!0;const xh=Ch,Eh={},Sh="SELECT_ALL",Ah="SELECT_INVERT",kh="SELECT_NONE",Rh=[],Mh=(e,t)=>{let n=[];return(t||[]).forEach((t=>{n.push(t),t&&"object"==typeof t&&e in t&&(n=[].concat((0,tt.A)(n),(0,tt.A)(Mh(e,t[e]))))})),n};function Th(e){return null!=e&&e===e.window}var Ih=n(60685),Ph=n(80436);const Oh=(e,t)=>{const n=o.useContext(Ih.A);return[o.useMemo((()=>{var o;const i=t||Ph.A[e],r=null!==(o=null==n?void 0:n[e])&&void 0!==o?o:{};return Object.assign(Object.assign({},"function"==typeof i?i():i),r||{})}),[e,t,n]),o.useMemo((()=>{const e=null==n?void 0:n.locale;return(null==n?void 0:n.exist)&&!e?Ph.A.locale:e}),[n])]},Dh=()=>{const[,e]=(0,No.Ay)(),[t]=Oh("Empty"),n=new Yc.Y(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return o.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},o.createElement("title",null,(null==t?void 0:t.description)||"Empty"),o.createElement("g",{fill:"none",fillRule:"evenodd"},o.createElement("g",{transform:"translate(24 31.67)"},o.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),o.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),o.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),o.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),o.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),o.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),o.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},o.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),o.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Nh=()=>{const[,e]=(0,No.Ay)(),[t]=Oh("Empty"),{colorFill:n,colorFillTertiary:i,colorFillQuaternary:r,colorBgContainer:s}=e,{borderColor:a,shadowColor:l,contentColor:c}=(0,o.useMemo)((()=>({borderColor:new Yc.Y(n).onBackground(s).toHexString(),shadowColor:new Yc.Y(i).onBackground(s).toHexString(),contentColor:new Yc.Y(r).onBackground(s).toHexString()})),[n,i,r,s]);return o.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},o.createElement("title",null,(null==t?void 0:t.description)||"Empty"),o.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},o.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),o.createElement("g",{fillRule:"nonzero",stroke:a},o.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),o.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:c}))))},Hh=e=>{const{componentCls:t,margin:n,marginXS:o,marginXL:i,fontSize:r,lineHeight:s}=e;return{[t]:{marginInline:o,fontSize:r,lineHeight:s,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:o,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:o,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},Lh=Ho("Empty",(e=>{const{componentCls:t,controlHeightLG:n,calc:o}=e,i=Ro(e,{emptyImgCls:`${t}-img`,emptyImgHeight:o(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:o(n).mul(.875).equal()});return[Hh(i)]}));const $h=o.createElement(Dh,null),_h=o.createElement(Nh,null),zh=e=>{const{className:t,rootClassName:n,prefixCls:i,image:r=$h,description:s,children:a,imageStyle:l,style:c,classNames:u,styles:d}=e,h=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:p,direction:m,className:g,style:f,classNames:b,styles:v}=(0,ho.TP)("empty"),w=p("empty",i),[y,C,x]=Lh(w),[E]=Oh("Empty"),S=void 0!==s?s:null==E?void 0:E.description,A="string"==typeof S?S:"empty";let k=null;return k="string"==typeof r?o.createElement("img",{alt:A,src:r}):r,y(o.createElement("div",Object.assign({className:M()(C,x,w,g,{[`${w}-normal`]:r===_h,[`${w}-rtl`]:"rtl"===m},t,n,b.root,null==u?void 0:u.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},v.root),f),null==d?void 0:d.root),c)},h),o.createElement("div",{className:M()(`${w}-image`,b.image,null==u?void 0:u.image),style:Object.assign(Object.assign(Object.assign({},l),v.image),null==d?void 0:d.image)},k),S&&o.createElement("div",{className:M()(`${w}-description`,b.description,null==u?void 0:u.description),style:Object.assign(Object.assign({},v.description),null==d?void 0:d.description)},S),a&&o.createElement("div",{className:M()(`${w}-footer`,b.footer,null==u?void 0:u.footer),style:Object.assign(Object.assign({},v.footer),null==d?void 0:d.footer)},a)))};zh.PRESENTED_IMAGE_DEFAULT=$h,zh.PRESENTED_IMAGE_SIMPLE=_h;const Fh=zh,Bh=e=>{const{componentName:t}=e,{getPrefixCls:n}=(0,o.useContext)(ho.QO),i=n("empty");switch(t){case"Table":case"List":return o.createElement(Fh,{image:Fh.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return o.createElement(Fh,{image:Fh.PRESENTED_IMAGE_SIMPLE,className:`${i}-small`});case"Table.filter":return null;default:return o.createElement(Fh,null)}};function jh(){const[,e]=o.useReducer((e=>e+1),0);return e}const Wh=["xxl","xl","lg","md","sm","xs"],Vh=()=>{const[,e]=(0,No.Ay)(),t=(e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}))((e=>{const t=e,n=[].concat(Wh).reverse();return n.forEach(((e,o)=>{const i=e.toUpperCase(),r=`screen${i}Min`,s=`screen${i}`;if(!(t[r]<=t[s]))throw new Error(`${r}<=${s} fails : !(${t[r]}<=${t[s]})`);if(o<n.length-1){const e=`screen${i}Max`;if(!(t[s]<=t[e]))throw new Error(`${s}<=${e} fails : !(${t[s]}<=${t[e]})`);const r=`screen${n[o+1].toUpperCase()}Min`;if(!(t[e]<=t[r]))throw new Error(`${e}<=${r} fails : !(${t[e]}<=${t[r]})`)}})),e})(e));return o.useMemo((()=>{const e=new Map;let n=-1,o={};return{responsiveMap:t,matchHandlers:{},dispatch:t=>(o=t,e.forEach((e=>e(o))),e.size>=1),subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(o),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach((([e,t])=>{const n=({matches:t})=>{this.dispatch(Object.assign(Object.assign({},o),{[e]:t}))},i=window.matchMedia(t);((e,t)=>{void 0!==(null==e?void 0:e.addEventListener)?e.addEventListener("change",t):void 0!==(null==e?void 0:e.addListener)&&e.addListener(t)})(i,n),this.matchHandlers[t]={mql:i,listener:n},n(i)}))},unregister(){Object.values(t).forEach((e=>{const t=this.matchHandlers[e];((e,t)=>{void 0!==(null==e?void 0:e.removeEventListener)?e.removeEventListener("change",t):void 0!==(null==e?void 0:e.removeListener)&&e.removeListener(t)})(null==t?void 0:t.mql,null==t?void 0:t.listener)})),e.clear()}}}),[e])},Gh=function(e=!0,t={}){const n=(0,o.useRef)(t),i=jh(),r=Vh();return(0,c.A)((()=>{const t=r.subscribe((t=>{n.current=t,e&&i()}));return()=>r.unsubscribe(t)}),[]),n.current},Kh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};var Uh=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Kh}))};const qh=o.forwardRef(Uh),Yh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};var Xh=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Yh}))};const Qh=o.forwardRef(Xh),Jh={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};var Zh=[10,20,50,100];const ep=function(e){var t=e.pageSizeOptions,n=void 0===t?Zh:t,i=e.locale,r=e.changeSize,s=e.pageSize,l=e.goButton,c=e.quickGo,u=e.rootPrefixCls,d=e.disabled,h=e.buildOptionText,p=e.showSizeChanger,m=e.sizeChangerRender,g=o.useState(""),f=(0,a.A)(g,2),b=f[0],v=f[1],w=function(){return!b||Number.isNaN(b)?void 0:Number(b)},y="function"==typeof h?h:function(e){return"".concat(e," ").concat(i.items_per_page)},C=function(e){""!==b&&(e.keyCode!==Ls.ENTER&&"click"!==e.type||(v(""),null==c||c(w())))},x="".concat(u,"-options");if(!p&&!c)return null;var E=null,S=null,A=null;return p&&m&&(E=m({disabled:d,size:s,onSizeChange:function(e){null==r||r(Number(e))},"aria-label":i.page_size,className:"".concat(x,"-size-changer"),options:(n.some((function(e){return e.toString()===s.toString()}))?n:n.concat([s]).sort((function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))}))).map((function(e){return{label:y(e),value:e}}))})),c&&(l&&(A="boolean"==typeof l?o.createElement("button",{type:"button",onClick:C,onKeyUp:C,disabled:d,className:"".concat(x,"-quick-jumper-button")},i.jump_to_confirm):o.createElement("span",{onClick:C,onKeyUp:C},l)),S=o.createElement("div",{className:"".concat(x,"-quick-jumper")},i.jump_to,o.createElement("input",{disabled:d,type:"text",value:b,onChange:function(e){v(e.target.value)},onKeyUp:C,onBlur:function(e){l||""===b||(v(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(u,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(u,"-item"))>=0)||null==c||c(w()))},"aria-label":i.page}),i.page,A)),o.createElement("li",{className:x},E,S)},tp=function(e){var t=e.rootPrefixCls,n=e.page,i=e.active,r=e.className,s=e.showTitle,a=e.onClick,l=e.onKeyPress,c=e.itemRender,u="".concat(t,"-item"),d=M()(u,"".concat(u,"-").concat(n),(0,k.A)((0,k.A)({},"".concat(u,"-active"),i),"".concat(u,"-disabled"),!n),r),h=c(n,"page",o.createElement("a",{rel:"nofollow"},n));return h?o.createElement("li",{title:s?String(n):null,className:d,onClick:function(){a(n)},onKeyDown:function(e){l(e,a,n)},tabIndex:0},h):null};var np=function(e,t,n){return n};function op(){}function ip(e){var t=Number(e);return"number"==typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function rp(e,t,n){var o=void 0===e?t:e;return Math.floor((n-1)/o)+1}const sp=function(e){var t=e.prefixCls,n=void 0===t?"rc-pagination":t,i=e.selectPrefixCls,r=void 0===i?"rc-select":i,s=e.className,l=e.current,c=e.defaultCurrent,u=void 0===c?1:c,d=e.total,h=void 0===d?0:d,p=e.pageSize,m=e.defaultPageSize,f=void 0===m?10:m,b=e.onChange,v=void 0===b?op:b,w=e.hideOnSinglePage,y=e.align,C=e.showPrevNextJumpers,x=void 0===C||C,E=e.showQuickJumper,R=e.showLessItems,T=e.showTitle,I=void 0===T||T,P=e.onShowSizeChange,O=void 0===P?op:P,D=e.locale,N=void 0===D?Jh:D,H=e.style,L=e.totalBoundaryShowSizeChanger,$=void 0===L?50:L,_=e.disabled,z=e.simple,F=e.showTotal,B=e.showSizeChanger,j=void 0===B?h>$:B,W=e.sizeChangerRender,V=e.pageSizeOptions,G=e.itemRender,K=void 0===G?np:G,U=e.jumpPrevIcon,q=e.jumpNextIcon,Y=e.prevIcon,X=e.nextIcon,Q=o.useRef(null),J=(0,so.A)(10,{value:p,defaultValue:f}),Z=(0,a.A)(J,2),ee=Z[0],te=Z[1],ne=(0,so.A)(1,{value:l,defaultValue:u,postState:function(e){return Math.max(1,Math.min(e,rp(void 0,ee,h)))}}),oe=(0,a.A)(ne,2),ie=oe[0],re=oe[1],se=o.useState(ie),ae=(0,a.A)(se,2),le=ae[0],ce=ae[1];(0,o.useEffect)((function(){ce(ie)}),[ie]);var ue=Math.max(1,ie-(R?3:5)),de=Math.min(rp(void 0,ee,h),ie+(R?3:5));function he(t,i){var r=t||o.createElement("button",{type:"button","aria-label":i,className:"".concat(n,"-item-link")});return"function"==typeof t&&(r=o.createElement(t,(0,A.A)({},e))),r}function pe(e){var t=e.target.value,n=rp(void 0,ee,h);return""===t?t:Number.isNaN(Number(t))?le:t>=n?n:Number(t)}var me=h>ee&&E;function ge(e){var t=pe(e);switch(t!==le&&ce(t),e.keyCode){case Ls.ENTER:fe(t);break;case Ls.UP:fe(t-1);break;case Ls.DOWN:fe(t+1)}}function fe(e){if(function(e){return ip(e)&&e!==ie&&ip(h)&&h>0}(e)&&!_){var t=rp(void 0,ee,h),n=e;return e>t?n=t:e<1&&(n=1),n!==le&&ce(n),re(n),null==v||v(n,ee),n}return ie}var be=ie>1,ve=ie<rp(void 0,ee,h);function we(){be&&fe(ie-1)}function ye(){ve&&fe(ie+1)}function Ce(){fe(ue)}function xe(){fe(de)}function Ee(e,t){if("Enter"===e.key||e.charCode===Ls.ENTER||e.keyCode===Ls.ENTER){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];t.apply(void 0,o)}}function Se(e){"click"!==e.type&&e.keyCode!==Ls.ENTER||fe(le)}var Ae=null,ke=_e(e,{aria:!0,data:!0}),Re=F&&o.createElement("li",{className:"".concat(n,"-total-text")},F(h,[0===h?0:(ie-1)*ee+1,ie*ee>h?h:ie*ee])),Me=null,Te=rp(void 0,ee,h);if(w&&h<=ee)return null;var Ie=[],Pe={rootPrefixCls:n,onClick:fe,onKeyPress:Ee,showTitle:I,itemRender:K,page:-1},Oe=ie-1>0?ie-1:0,De=ie+1<Te?ie+1:Te,Ne=E&&E.goButton,He="object"===(0,S.A)(z)?z.readOnly:!z,Le=Ne,$e=null;z&&(Ne&&(Le="boolean"==typeof Ne?o.createElement("button",{type:"button",onClick:Se,onKeyUp:Se},N.jump_to_confirm):o.createElement("span",{onClick:Se,onKeyUp:Se},Ne),Le=o.createElement("li",{title:I?"".concat(N.jump_to).concat(ie,"/").concat(Te):null,className:"".concat(n,"-simple-pager")},Le)),$e=o.createElement("li",{title:I?"".concat(ie,"/").concat(Te):null,className:"".concat(n,"-simple-pager")},He?le:o.createElement("input",{type:"text","aria-label":N.jump_to,value:le,disabled:_,onKeyDown:function(e){e.keyCode!==Ls.UP&&e.keyCode!==Ls.DOWN||e.preventDefault()},onKeyUp:ge,onChange:ge,onBlur:function(e){fe(pe(e))},size:3}),o.createElement("span",{className:"".concat(n,"-slash")},"/"),Te));var ze=R?1:2;if(Te<=3+2*ze){Te||Ie.push(o.createElement(tp,(0,g.A)({},Pe,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var Fe=1;Fe<=Te;Fe+=1)Ie.push(o.createElement(tp,(0,g.A)({},Pe,{key:Fe,page:Fe,active:ie===Fe})))}else{var Be=R?N.prev_3:N.prev_5,je=R?N.next_3:N.next_5,We=K(ue,"jump-prev",he(U,"prev page")),Ve=K(de,"jump-next",he(q,"next page"));x&&(Ae=We?o.createElement("li",{title:I?Be:null,key:"prev",onClick:Ce,tabIndex:0,onKeyDown:function(e){Ee(e,Ce)},className:M()("".concat(n,"-jump-prev"),(0,k.A)({},"".concat(n,"-jump-prev-custom-icon"),!!U))},We):null,Me=Ve?o.createElement("li",{title:I?je:null,key:"next",onClick:xe,tabIndex:0,onKeyDown:function(e){Ee(e,xe)},className:M()("".concat(n,"-jump-next"),(0,k.A)({},"".concat(n,"-jump-next-custom-icon"),!!q))},Ve):null);var Ge=Math.max(1,ie-ze),Ke=Math.min(ie+ze,Te);ie-1<=ze&&(Ke=1+2*ze),Te-ie<=ze&&(Ge=Te-2*ze);for(var Ue=Ge;Ue<=Ke;Ue+=1)Ie.push(o.createElement(tp,(0,g.A)({},Pe,{key:Ue,page:Ue,active:ie===Ue})));if(ie-1>=2*ze&&3!==ie&&(Ie[0]=o.cloneElement(Ie[0],{className:M()("".concat(n,"-item-after-jump-prev"),Ie[0].props.className)}),Ie.unshift(Ae)),Te-ie>=2*ze&&ie!==Te-2){var qe=Ie[Ie.length-1];Ie[Ie.length-1]=o.cloneElement(qe,{className:M()("".concat(n,"-item-before-jump-next"),qe.props.className)}),Ie.push(Me)}1!==Ge&&Ie.unshift(o.createElement(tp,(0,g.A)({},Pe,{key:1,page:1}))),Ke!==Te&&Ie.push(o.createElement(tp,(0,g.A)({},Pe,{key:Te,page:Te})))}var Ye=function(e){var t=K(e,"prev",he(Y,"prev page"));return o.isValidElement(t)?o.cloneElement(t,{disabled:!be}):t}(Oe);if(Ye){var Xe=!be||!Te;Ye=o.createElement("li",{title:I?N.prev_page:null,onClick:we,tabIndex:Xe?null:0,onKeyDown:function(e){Ee(e,we)},className:M()("".concat(n,"-prev"),(0,k.A)({},"".concat(n,"-disabled"),Xe)),"aria-disabled":Xe},Ye)}var Qe,Je,Ze=function(e){var t=K(e,"next",he(X,"next page"));return o.isValidElement(t)?o.cloneElement(t,{disabled:!ve}):t}(De);Ze&&(z?(Qe=!ve,Je=be?0:null):Je=(Qe=!ve||!Te)?null:0,Ze=o.createElement("li",{title:I?N.next_page:null,onClick:ye,tabIndex:Je,onKeyDown:function(e){Ee(e,ye)},className:M()("".concat(n,"-next"),(0,k.A)({},"".concat(n,"-disabled"),Qe)),"aria-disabled":Qe},Ze));var et=M()(n,s,(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({},"".concat(n,"-start"),"start"===y),"".concat(n,"-center"),"center"===y),"".concat(n,"-end"),"end"===y),"".concat(n,"-simple"),z),"".concat(n,"-disabled"),_));return o.createElement("ul",(0,g.A)({className:et,style:H,ref:Q},ke),Re,Ye,z?$e:Ie,Ze,o.createElement(ep,{locale:N,rootPrefixCls:n,disabled:_,selectPrefixCls:r,changeSize:function(e){var t=rp(e,ee,h),n=ie>t&&0!==t?t:ie;te(e),ce(n),null==O||O(ie,e),re(n),null==v||v(n,e)},pageSize:ee,pageSizeOptions:V,quickGo:me?fe:null,goButton:Le,showSizeChanger:j,sizeChangerRender:W}))};var ap=n(96069);const lp=function(e){var t=e.className,n=e.customizeIcon,i=e.customizeIconProps,r=e.children,s=e.onMouseDown,a=e.onClick,l="function"==typeof n?n(i):n;return o.createElement("span",{className:t,onMouseDown:function(e){e.preventDefault(),null==s||s(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},void 0!==l?l:o.createElement("span",{className:M()(t.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},r))};var cp=o.createContext(null);function up(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=o.useRef(null),n=o.useRef(null);return o.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},function(o){(o||null===t.current)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}]}var dp=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],hp=function(e,t){var n=e.prefixCls,i=e.id,r=e.inputElement,s=e.autoFocus,a=e.autoComplete,l=e.editable,c=e.activeDescendantId,u=e.value,d=e.open,h=e.attrs,p=(0,F.A)(e,dp),m=r||o.createElement("input",null),g=m,b=g.ref,v=g.props;return(0,P.$e)(!("maxLength"in m.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),o.cloneElement(m,(0,A.A)((0,A.A)((0,A.A)({type:"search"},function(e,t,n){var o=(0,A.A)((0,A.A)({},e),n?t:{});return Object.keys(t).forEach((function(n){var i=t[n];"function"==typeof i&&(o[n]=function(){for(var t,o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return i.apply(void 0,r),null===(t=e[n])||void 0===t?void 0:t.call.apply(t,[e].concat(r))})})),o}(p,v,!0)),{},{id:i,ref:(0,f.K4)(t,b),autoComplete:a||"off",autoFocus:s,className:M()("".concat(n,"-selection-search-input"),null==v?void 0:v.className),role:"combobox","aria-expanded":d||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":d?c:void 0},h),{},{value:l?u:"",readOnly:!l,unselectable:l?null:"on",style:(0,A.A)((0,A.A)({},v.style),{},{opacity:l?null:0})}))};const pp=o.forwardRef(hp);function mp(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var gp="undefined"!=typeof window&&window.document&&window.document.documentElement;function fp(e){return["string","number"].includes((0,S.A)(e))}function bp(e){var t=void 0;return e&&(fp(e.title)?t=e.title.toString():fp(e.label)&&(t=e.label.toString())),t}function vp(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var wp=function(e){e.preventDefault(),e.stopPropagation()};const yp=function(e){var t,n,i=e.id,r=e.prefixCls,s=e.values,l=e.open,c=e.searchValue,u=e.autoClearSearchValue,d=e.inputRef,h=e.placeholder,p=e.disabled,m=e.mode,g=e.showSearch,f=e.autoFocus,b=e.autoComplete,v=e.activeDescendantId,w=e.tabIndex,y=e.removeIcon,C=e.maxTagCount,x=e.maxTagTextLength,E=e.maxTagPlaceholder,S=void 0===E?function(e){return"+ ".concat(e.length," ...")}:E,A=e.tagRender,R=e.onToggleOpen,T=e.onRemove,I=e.onInputChange,P=e.onInputPaste,O=e.onInputKeyDown,D=e.onInputMouseDown,N=e.onInputCompositionStart,H=e.onInputCompositionEnd,L=e.onInputBlur,$=o.useRef(null),_=(0,o.useState)(0),z=(0,a.A)(_,2),F=z[0],B=z[1],j=(0,o.useState)(!1),W=(0,a.A)(j,2),V=W[0],G=W[1],K="".concat(r,"-selection"),U=l||"multiple"===m&&!1===u||"tags"===m?c:"",q="tags"===m||"multiple"===m&&!1===u||g&&(l||V);t=function(){B($.current.scrollWidth)},n=[U],gp?o.useLayoutEffect(t,n):o.useEffect(t,n);var Y=function(e,t,n,i,r){return o.createElement("span",{title:bp(e),className:M()("".concat(K,"-item"),(0,k.A)({},"".concat(K,"-item-disabled"),n))},o.createElement("span",{className:"".concat(K,"-item-content")},t),i&&o.createElement(lp,{className:"".concat(K,"-item-remove"),onMouseDown:wp,onClick:r,customizeIcon:y},"×"))},X=function(e,t,n,i,r,s){return o.createElement("span",{onMouseDown:function(e){wp(e),R(!l)}},A({label:t,value:e,disabled:n,closable:i,onClose:r,isMaxTag:!!s}))},Q=o.createElement("div",{className:"".concat(K,"-search"),style:{width:F},onFocus:function(){G(!0)},onBlur:function(){G(!1)}},o.createElement(pp,{ref:d,open:l,prefixCls:r,id:i,inputElement:null,disabled:p,autoFocus:f,autoComplete:b,editable:q,activeDescendantId:v,value:U,onKeyDown:O,onMouseDown:D,onChange:I,onPaste:P,onCompositionStart:N,onCompositionEnd:H,onBlur:L,tabIndex:w,attrs:_e(e,!0)}),o.createElement("span",{ref:$,className:"".concat(K,"-search-mirror"),"aria-hidden":!0},U," ")),J=o.createElement(Ra,{prefixCls:"".concat(K,"-overflow"),data:s,renderItem:function(e){var t=e.disabled,n=e.label,o=e.value,i=!p&&!t,r=n;if("number"==typeof x&&("string"==typeof n||"number"==typeof n)){var s=String(r);s.length>x&&(r="".concat(s.slice(0,x),"..."))}var a=function(t){t&&t.stopPropagation(),T(e)};return"function"==typeof A?X(o,r,t,i,a):Y(e,r,t,i,a)},renderRest:function(e){if(!s.length)return null;var t="function"==typeof S?S(e):S;return"function"==typeof A?X(void 0,t,!1,!1,void 0,!0):Y({title:t},t,!1)},suffix:Q,itemKey:vp,maxCount:C});return o.createElement("span",{className:"".concat(K,"-wrap")},J,!s.length&&!U&&o.createElement("span",{className:"".concat(K,"-placeholder")},h))},Cp=function(e){var t=e.inputElement,n=e.prefixCls,i=e.id,r=e.inputRef,s=e.disabled,l=e.autoFocus,c=e.autoComplete,u=e.activeDescendantId,d=e.mode,h=e.open,p=e.values,m=e.placeholder,g=e.tabIndex,f=e.showSearch,b=e.searchValue,v=e.activeValue,w=e.maxLength,y=e.onInputKeyDown,C=e.onInputMouseDown,x=e.onInputChange,E=e.onInputPaste,S=e.onInputCompositionStart,A=e.onInputCompositionEnd,k=e.onInputBlur,R=e.title,M=o.useState(!1),T=(0,a.A)(M,2),I=T[0],P=T[1],O="combobox"===d,D=O||f,N=p[0],H=b||"";O&&v&&!I&&(H=v),o.useEffect((function(){O&&P(!1)}),[O,v]);var L=!("combobox"!==d&&!h&&!f||!H),$=void 0===R?bp(N):R,_=o.useMemo((function(){return N?null:o.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:L?{visibility:"hidden"}:void 0},m)}),[N,L,m,n]);return o.createElement("span",{className:"".concat(n,"-selection-wrap")},o.createElement("span",{className:"".concat(n,"-selection-search")},o.createElement(pp,{ref:r,prefixCls:n,id:i,open:h,inputElement:t,disabled:s,autoFocus:l,autoComplete:c,editable:D,activeDescendantId:u,value:H,onKeyDown:y,onMouseDown:C,onChange:function(e){P(!0),x(e)},onPaste:E,onCompositionStart:S,onCompositionEnd:A,onBlur:k,tabIndex:g,attrs:_e(e,!0),maxLength:O?w:void 0})),!O&&N?o.createElement("span",{className:"".concat(n,"-selection-item"),title:$,style:L?{visibility:"hidden"}:void 0},N.label):null,_)};var xp=function(e,t){var n=(0,o.useRef)(null),i=(0,o.useRef)(!1),r=e.prefixCls,s=e.open,l=e.mode,c=e.showSearch,u=e.tokenWithEnter,d=e.disabled,h=e.prefix,p=e.autoClearSearchValue,m=e.onSearch,f=e.onSearchSubmit,b=e.onToggleOpen,v=e.onInputKeyDown,w=e.onInputBlur,y=e.domRef;o.useImperativeHandle(t,(function(){return{focus:function(e){n.current.focus(e)},blur:function(){n.current.blur()}}}));var C=up(0),x=(0,a.A)(C,2),E=x[0],S=x[1],A=(0,o.useRef)(null),k=function(e){!1!==m(e,!0,i.current)&&b(!0)},R={inputRef:n,onInputKeyDown:function(e){var t,o=e.which,r=n.current instanceof HTMLTextAreaElement;r||!s||o!==Ls.UP&&o!==Ls.DOWN||e.preventDefault(),v&&v(e),o!==Ls.ENTER||"tags"!==l||i.current||s||null==f||f(e.target.value),r&&!s&&~[Ls.UP,Ls.DOWN,Ls.LEFT,Ls.RIGHT].indexOf(o)||(t=o)&&![Ls.ESC,Ls.SHIFT,Ls.BACKSPACE,Ls.TAB,Ls.WIN_KEY,Ls.ALT,Ls.META,Ls.WIN_KEY_RIGHT,Ls.CTRL,Ls.SEMICOLON,Ls.EQUALS,Ls.CAPS_LOCK,Ls.CONTEXT_MENU,Ls.F1,Ls.F2,Ls.F3,Ls.F4,Ls.F5,Ls.F6,Ls.F7,Ls.F8,Ls.F9,Ls.F10,Ls.F11,Ls.F12].includes(t)&&b(!0)},onInputMouseDown:function(){S(!0)},onInputChange:function(e){var t=e.target.value;if(u&&A.current&&/[\r\n]/.test(A.current)){var n=A.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,A.current)}A.current=null,k(t)},onInputPaste:function(e){var t=e.clipboardData,n=null==t?void 0:t.getData("text");A.current=n||""},onInputCompositionStart:function(){i.current=!0},onInputCompositionEnd:function(e){i.current=!1,"combobox"!==l&&k(e.target.value)},onInputBlur:w},M="multiple"===l||"tags"===l?o.createElement(yp,(0,g.A)({},e,R)):o.createElement(Cp,(0,g.A)({},e,R));return o.createElement("div",{ref:y,className:"".concat(r,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=E();e.target===n.current||t||"combobox"===l&&d||e.preventDefault(),("combobox"===l||c&&t)&&s||(s&&!1!==p&&m("",!0,!1),b())}},h&&o.createElement("div",{className:"".concat(r,"-prefix")},h),M)};const Ep=o.forwardRef(xp);var Sp=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ap=function(e,t){var n=e.prefixCls,i=(e.disabled,e.visible),r=e.children,s=e.popupElement,a=e.animation,l=e.transitionName,c=e.dropdownStyle,u=e.dropdownClassName,d=e.direction,h=void 0===d?"ltr":d,p=e.placement,m=e.builtinPlacements,f=e.dropdownMatchSelectWidth,b=e.dropdownRender,v=e.dropdownAlign,w=e.getPopupContainer,y=e.empty,C=e.getTriggerDOMNode,x=e.onPopupVisibleChange,E=e.onPopupMouseEnter,S=(0,F.A)(e,Sp),R="".concat(n,"-dropdown"),T=s;b&&(T=b(s));var I=o.useMemo((function(){return m||function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}}(f)}),[m,f]),P=a?"".concat(R,"-").concat(a):l,O="number"==typeof f,D=o.useMemo((function(){return O?null:!1===f?"minWidth":"width"}),[f,O]),N=c;O&&(N=(0,A.A)((0,A.A)({},N),{},{width:f}));var H=o.useRef(null);return o.useImperativeHandle(t,(function(){return{getPopupElement:function(){var e;return null===(e=H.current)||void 0===e?void 0:e.popupElement}}})),o.createElement(Ns,(0,g.A)({},S,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:p||("rtl"===h?"bottomRight":"bottomLeft"),builtinPlacements:I,prefixCls:R,popupTransitionName:P,popup:o.createElement("div",{onMouseEnter:E},T),ref:H,stretch:D,popupAlign:v,popupVisible:i,getPopupContainer:w,popupClassName:M()(u,(0,k.A)({},"".concat(R,"-empty"),y)),popupStyle:N,getTriggerDOMNode:C,onPopupVisibleChange:x}),r)};const kp=o.forwardRef(Ap);var Rp=n(87695);function Mp(e,t){var n,o=e.key;return"value"in e&&(n=e.value),null!=o?o:void 0!==n?n:"rc-index-key-".concat(t)}function Tp(e){return void 0!==e&&!Number.isNaN(e)}function Ip(e,t){var n=e||{},o=n.label||(t?"children":"label");return{label:o,value:n.value||"value",options:n.options||"options",groupLabel:n.groupLabel||o}}function Pp(e){var t=(0,A.A)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,P.Ay)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const Op=o.createContext(null);function Dp(e){var t=e.visible,n=e.values;return t?o.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,50).map((function(e){var t=e.label,n=e.value;return["number","string"].includes((0,S.A)(t))?t:n})).join(", ")),n.length>50?", ...":null):null}var Np=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Hp=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Lp=function(e){return"tags"===e||"multiple"===e},$p=o.forwardRef((function(e,t){var n,i=e.id,r=e.prefixCls,s=e.className,l=e.showSearch,u=e.tagRender,d=e.direction,h=e.omitDomProps,p=e.displayValues,m=e.onDisplayValuesChange,b=e.emptyOptions,v=e.notFoundContent,w=void 0===v?"Not Found":v,y=e.onClear,C=e.mode,x=e.disabled,E=e.loading,R=e.getInputElement,T=e.getRawInputElement,I=e.open,P=e.defaultOpen,O=e.onDropdownVisibleChange,D=e.activeValue,N=e.onActiveValueChange,H=e.activeDescendantId,L=e.searchValue,$=e.autoClearSearchValue,_=e.onSearch,z=e.onSearchSplit,B=e.tokenSeparators,j=e.allowClear,W=e.prefix,V=e.suffixIcon,G=e.clearIcon,K=e.OptionList,U=e.animation,q=e.transitionName,Y=e.dropdownStyle,X=e.dropdownClassName,Q=e.dropdownMatchSelectWidth,J=e.dropdownRender,Z=e.dropdownAlign,ee=e.placement,te=e.builtinPlacements,ne=e.getPopupContainer,oe=e.showAction,ie=void 0===oe?[]:oe,re=e.onFocus,se=e.onBlur,ae=e.onKeyUp,le=e.onKeyDown,ce=e.onMouseDown,ue=(0,F.A)(e,Np),de=Lp(C),he=(void 0!==l?l:de)||"combobox"===C,pe=(0,A.A)({},ue);Hp.forEach((function(e){delete pe[e]})),null==h||h.forEach((function(e){delete pe[e]}));var me=o.useState(!1),ge=(0,a.A)(me,2),fe=ge[0],be=ge[1];o.useEffect((function(){be(hs())}),[]);var ve=o.useRef(null),we=o.useRef(null),ye=o.useRef(null),Ce=o.useRef(null),xe=o.useRef(null),Ee=o.useRef(!1),Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=o.useState(!1),n=(0,a.A)(t,2),i=n[0],r=n[1],s=o.useRef(null),l=function(){window.clearTimeout(s.current)};return o.useEffect((function(){return l}),[]),[i,function(t,n){l(),s.current=window.setTimeout((function(){r(t),n&&n()}),e)},l]}(),Ae=(0,a.A)(Se,3),ke=Ae[0],Re=Ae[1],Me=Ae[2];o.useImperativeHandle(t,(function(){var e,t;return{focus:null===(e=Ce.current)||void 0===e?void 0:e.focus,blur:null===(t=Ce.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=xe.current)||void 0===t?void 0:t.scrollTo(e)},nativeElement:ve.current||we.current}}));var Te=o.useMemo((function(){var e;if("combobox"!==C)return L;var t=null===(e=p[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""}),[L,C,p]),Ie="combobox"===C&&"function"==typeof R&&R()||null,Pe="function"==typeof T&&T(),Oe=(0,f.xK)(we,null==Pe||null===(n=Pe.props)||void 0===n?void 0:n.ref),De=o.useState(!1),Ne=(0,a.A)(De,2),He=Ne[0],Le=Ne[1];(0,c.A)((function(){Le(!0)}),[]);var $e=(0,so.A)(!1,{defaultValue:P,value:I}),_e=(0,a.A)($e,2),ze=_e[0],Fe=_e[1],Be=!!He&&ze,je=!w&&b;(x||je&&Be&&"combobox"===C)&&(Be=!1);var We=!je&&Be,Ve=o.useCallback((function(e){var t=void 0!==e?e:!Be;x||(Fe(t),Be!==t&&(null==O||O(t)))}),[x,Be,Fe,O]),Ge=o.useMemo((function(){return(B||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[B]),Ke=o.useContext(Op)||{},Ue=Ke.maxCount,qe=Ke.rawValues,Ye=function(e,t,n){if(!(de&&Tp(Ue)&&(null==qe?void 0:qe.size)>=Ue)){var o=!0,i=e;null==N||N(null);var r=function(e,t,n){if(!t||!t.length)return null;var o=!1,i=function e(t,n){var i=(0,Rp.A)(n),r=i[0],s=i.slice(1);if(!r)return[t];var a=t.split(r);return o=o||a.length>1,a.reduce((function(t,n){return[].concat((0,tt.A)(t),(0,tt.A)(e(n,s)))}),[]).filter(Boolean)}(e,t);return o?void 0!==n?i.slice(0,n):i:null}(e,B,Tp(Ue)?Ue-qe.size:void 0),s=n?null:r;return"combobox"!==C&&s&&(i="",null==z||z(s),Ve(!1),o=!1),_&&Te!==i&&_(i,{source:t?"typing":"effect"}),o}};o.useEffect((function(){Be||de||"combobox"===C||Ye("",!1,!1)}),[Be]),o.useEffect((function(){ze&&x&&Fe(!1),x&&!Ee.current&&Re(!1)}),[x]);var Xe=up(),Qe=(0,a.A)(Xe,2),Je=Qe[0],Ze=Qe[1],et=o.useRef(!1),nt=o.useRef(!1),ot=[];o.useEffect((function(){return function(){ot.forEach((function(e){return clearTimeout(e)})),ot.splice(0,ot.length)}}),[]);var it,rt=o.useState({}),st=(0,a.A)(rt,2)[1];Pe&&(it=function(e){Ve(e)}),function(e,t,n,i){var r=o.useRef(null);r.current={open:t,triggerOpen:n,customizedTrigger:i},o.useEffect((function(){function e(e){var t,n;if(null===(t=r.current)||void 0===t||!t.customizedTrigger){var o=e.target;o.shadowRoot&&e.composed&&(o=e.composedPath()[0]||o),r.current.open&&[ve.current,null===(n=ye.current)||void 0===n?void 0:n.getPopupElement()].filter((function(e){return e})).every((function(e){return!e.contains(o)&&e!==o}))&&r.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}(0,We,Ve,!!Pe);var at,lt=o.useMemo((function(){return(0,A.A)((0,A.A)({},e),{},{notFoundContent:w,open:Be,triggerOpen:We,id:i,showSearch:he,multiple:de,toggleOpen:Ve})}),[e,w,We,Be,i,he,de,Ve]),ct=!!V||E;ct&&(at=o.createElement(lp,{className:M()("".concat(r,"-arrow"),(0,k.A)({},"".concat(r,"-arrow-loading"),E)),customizeIcon:V,customizeIconProps:{loading:E,searchValue:Te,open:Be,focused:ke,showSearch:he}}));var ut,dt=function(e,t,n,i,r){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=o.useMemo((function(){return"object"===(0,S.A)(i)?i.clearIcon:r||void 0}),[i,r]);return{allowClear:o.useMemo((function(){return!(s||!i||!n.length&&!a||"combobox"===l&&""===a)}),[i,s,n.length,a,l]),clearIcon:o.createElement(lp,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:c},"×")}}(r,(function(){var e;null==y||y(),null===(e=Ce.current)||void 0===e||e.focus(),m([],{type:"clear",values:p}),Ye("",!1,!1)}),p,j,G,x,Te,C),ht=dt.allowClear,pt=dt.clearIcon,mt=o.createElement(K,{ref:xe}),gt=M()(r,s,(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({},"".concat(r,"-focused"),ke),"".concat(r,"-multiple"),de),"".concat(r,"-single"),!de),"".concat(r,"-allow-clear"),j),"".concat(r,"-show-arrow"),ct),"".concat(r,"-disabled"),x),"".concat(r,"-loading"),E),"".concat(r,"-open"),Be),"".concat(r,"-customize-input"),Ie),"".concat(r,"-show-search"),he)),ft=o.createElement(kp,{ref:ye,disabled:x,prefixCls:r,visible:We,popupElement:mt,animation:U,transitionName:q,dropdownStyle:Y,dropdownClassName:X,direction:d,dropdownMatchSelectWidth:Q,dropdownRender:J,dropdownAlign:Z,placement:ee,builtinPlacements:te,getPopupContainer:ne,empty:b,getTriggerDOMNode:function(e){return we.current||e},onPopupVisibleChange:it,onPopupMouseEnter:function(){st({})}},Pe?o.cloneElement(Pe,{ref:Oe}):o.createElement(Ep,(0,g.A)({},e,{domRef:we,prefixCls:r,inputElement:Ie,ref:Ce,id:i,prefix:W,showSearch:he,autoClearSearchValue:$,mode:C,activeDescendantId:H,tagRender:u,values:p,open:Be,onToggleOpen:Ve,activeValue:D,searchValue:Te,onSearch:Ye,onSearchSubmit:function(e){e&&e.trim()&&_(e,{source:"submit"})},onRemove:function(e){var t=p.filter((function(t){return t!==e}));m(t,{type:"remove",values:[e]})},tokenWithEnter:Ge,onInputBlur:function(){et.current=!1}})));return ut=Pe?ft:o.createElement("div",(0,g.A)({className:gt},pe,{ref:ve,onMouseDown:function(e){var t,n=e.target,o=null===(t=ye.current)||void 0===t?void 0:t.getPopupElement();if(o&&o.contains(n)){var i=setTimeout((function(){var e,t=ot.indexOf(i);-1!==t&&ot.splice(t,1),Me(),fe||o.contains(document.activeElement)||null===(e=Ce.current)||void 0===e||e.focus()}));ot.push(i)}for(var r=arguments.length,s=new Array(r>1?r-1:0),a=1;a<r;a++)s[a-1]=arguments[a];null==ce||ce.apply(void 0,[e].concat(s))},onKeyDown:function(e){var t,n=Je(),o=e.key,i="Enter"===o;if(i&&("combobox"!==C&&e.preventDefault(),Be||Ve(!0)),Ze(!!Te),"Backspace"===o&&!n&&de&&!Te&&p.length){for(var r=(0,tt.A)(p),s=null,a=r.length-1;a>=0;a-=1){var l=r[a];if(!l.disabled){r.splice(a,1),s=l;break}}s&&m(r,{type:"remove",values:[s]})}for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d<c;d++)u[d-1]=arguments[d];!Be||i&&et.current||(i&&(et.current=!0),null===(t=xe.current)||void 0===t||t.onKeyDown.apply(t,[e].concat(u))),null==le||le.apply(void 0,[e].concat(u))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i;Be&&(null===(i=xe.current)||void 0===i||i.onKeyUp.apply(i,[e].concat(n))),"Enter"===e.key&&(et.current=!1),null==ae||ae.apply(void 0,[e].concat(n))},onFocus:function(){Re(!0),x||(re&&!nt.current&&re.apply(void 0,arguments),ie.includes("focus")&&Ve(!0)),nt.current=!0},onBlur:function(){Ee.current=!0,Re(!1,(function(){nt.current=!1,Ee.current=!1,Ve(!1)})),x||(Te&&("tags"===C?_(Te,{source:"submit"}):"multiple"===C&&_("",{source:"blur"})),se&&se.apply(void 0,arguments))}}),o.createElement(Dp,{visible:ke&&!Be,values:p}),ft,at,ht&&pt),o.createElement(cp.Provider,{value:lt},ut)}));const _p=$p;var zp=function(){return null};zp.isSelectOptGroup=!0;const Fp=zp;var Bp=function(){return null};Bp.isSelectOption=!0;const jp=Bp;var Wp=["disabled","title","children","style","className"];function Vp(e){return"string"==typeof e||"number"==typeof e}var Gp=function(e,t){var n=o.useContext(cp),i=n.prefixCls,r=n.id,s=n.open,l=n.multiple,c=n.mode,u=n.searchValue,d=n.toggleOpen,h=n.notFoundContent,p=n.onPopupScroll,m=o.useContext(Op),f=m.maxCount,b=m.flattenOptions,v=m.onActiveValue,w=m.defaultActiveFirstOption,y=m.onSelect,C=m.menuItemSelectedIcon,x=m.rawValues,E=m.fieldNames,S=m.virtual,A=m.direction,R=m.listHeight,I=m.listItemHeight,P=m.optionRender,O="".concat(i,"-item"),D=(0,T.A)((function(){return b}),[s,b],(function(e,t){return t[0]&&e[1]!==t[1]})),N=o.useRef(null),H=o.useMemo((function(){return l&&Tp(f)&&(null==x?void 0:x.size)>=f}),[l,f,null==x?void 0:x.size]),L=function(e){e.preventDefault()},$=function(e){var t;null===(t=N.current)||void 0===t||t.scrollTo("number"==typeof e?{index:e}:e)},_=o.useCallback((function(e){return"combobox"!==c&&x.has(e)}),[c,(0,tt.A)(x).toString(),x.size]),z=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=D.length,o=0;o<n;o+=1){var i=(e+o*t+n)%n,r=D[i]||{},s=r.group,a=r.data;if(!s&&(null==a||!a.disabled)&&(_(a.value)||!H))return i}return-1},B=o.useState((function(){return z(0)})),j=(0,a.A)(B,2),W=j[0],V=j[1],G=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];V(e);var n={source:t?"keyboard":"mouse"},o=D[e];o?v(o.value,e,n):v(null,-1,n)};(0,o.useEffect)((function(){G(!1!==w?z(0):-1)}),[D.length,u]);var K=o.useCallback((function(e){return"combobox"===c?String(e).toLowerCase()===u.toLowerCase():x.has(e)}),[c,u,(0,tt.A)(x).toString(),x.size]);(0,o.useEffect)((function(){var e,t=setTimeout((function(){if(!l&&s&&1===x.size){var e=Array.from(x)[0],t=D.findIndex((function(t){var n=t.data;return u?String(n.value).startsWith(u):n.value===e}));-1!==t&&(G(t),$(t))}}));return s&&(null===(e=N.current)||void 0===e||e.scrollTo(void 0)),function(){return clearTimeout(t)}}),[s,u]);var U=function(e){void 0!==e&&y(e,{selected:!x.has(e)}),l||d(!1)};if(o.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case Ls.N:case Ls.P:case Ls.UP:case Ls.DOWN:var o=0;if(t===Ls.UP?o=-1:t===Ls.DOWN?o=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===Ls.N?o=1:t===Ls.P&&(o=-1)),0!==o){var i=z(W+o,o);$(i),G(i,!0)}break;case Ls.TAB:case Ls.ENTER:var r,a=D[W];!a||null!=a&&null!==(r=a.data)&&void 0!==r&&r.disabled||H?U(void 0):U(a.value),s&&e.preventDefault();break;case Ls.ESC:d(!1),s&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){$(e)}}})),0===D.length)return o.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(O,"-empty"),onMouseDown:L},h);var q=Object.keys(E).map((function(e){return E[e]})),Y=function(e){return e.label};function X(e,t){return{role:e.group?"presentation":"option",id:"".concat(r,"_list_").concat(t)}}var Q=function(e){var t=D[e];if(!t)return null;var n=t.data||{},i=n.value,r=t.group,s=_e(n,!0),a=Y(t);return t?o.createElement("div",(0,g.A)({"aria-label":"string"!=typeof a||r?null:a},s,{key:e},X(t,e),{"aria-selected":K(i)}),i):null},J={role:"listbox",id:"".concat(r,"_list")};return o.createElement(o.Fragment,null,S&&o.createElement("div",(0,g.A)({},J,{style:{height:0,width:0,overflow:"hidden"}}),Q(W-1),Q(W),Q(W+1)),o.createElement(qt,{itemKey:"key",ref:N,data:D,height:R,itemHeight:I,fullHeight:!1,onMouseDown:L,onScroll:p,virtual:S,direction:A,innerProps:S?null:J},(function(e,t){var n=e.group,i=e.groupOption,r=e.data,s=e.label,a=e.value,l=r.key;if(n){var c,u=null!==(c=r.title)&&void 0!==c?c:Vp(s)?s.toString():void 0;return o.createElement("div",{className:M()(O,"".concat(O,"-group"),r.className),title:u},void 0!==s?s:l)}var d=r.disabled,h=r.title,p=(r.children,r.style),m=r.className,f=Dn((0,F.A)(r,Wp),q),b=_(a),v=d||!b&&H,w="".concat(O,"-option"),y=M()(O,w,m,(0,k.A)((0,k.A)((0,k.A)((0,k.A)({},"".concat(w,"-grouped"),i),"".concat(w,"-active"),W===t&&!v),"".concat(w,"-disabled"),v),"".concat(w,"-selected"),b)),x=Y(e),E=!C||"function"==typeof C||b,A="number"==typeof x?x:x||a,R=Vp(A)?A.toString():void 0;return void 0!==h&&(R=h),o.createElement("div",(0,g.A)({},_e(f),S?{}:X(e,t),{"aria-selected":K(a),className:y,title:R,onMouseMove:function(){W===t||v||G(t)},onClick:function(){v||U(a)},style:p}),o.createElement("div",{className:"".concat(w,"-content")},"function"==typeof P?P(e,{index:t}):A),o.isValidElement(C)||b,E&&o.createElement(lp,{className:"".concat(O,"-option-state"),customizeIcon:C,customizeIconProps:{value:a,disabled:v,isSelected:b}},b?"✓":null))})))};const Kp=o.forwardRef(Gp);function Up(e,t){return mp(e).join("").toUpperCase().includes(t)}var qp=0,Yp=(0,Te.A)();var Xp=["children","value"],Qp=["children"];function Jp(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return U(e).map((function(e,n){if(!o.isValidElement(e)||!e.type)return null;var i=e,r=i.type.isSelectOptGroup,s=i.key,a=i.props,l=a.children,c=(0,F.A)(a,Qp);return t||!r?function(e){var t=e,n=t.key,o=t.props,i=o.children,r=o.value,s=(0,F.A)(o,Xp);return(0,A.A)({key:n,value:void 0!==r?r:n,children:i},s)}(e):(0,A.A)((0,A.A)({key:"__RC_SELECT_GRP__".concat(null===s?n:s,"__"),label:s},c),{},{options:Jp(l)})})).filter((function(e){return e}))}const Zp=function(e,t,n,i,r){return o.useMemo((function(){var o=e;!e&&(o=Jp(t));var s=new Map,a=new Map,l=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(t){for(var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c<t.length;c+=1){var u=t[c];!u[n.options]||o?(s.set(u[n.value],u),l(a,u,n.label),l(a,u,i),l(a,u,r)):e(u[n.options],!0)}}(o),{options:o,valueOptions:s,labelOptions:a}}),[e,t,n,i,r])};function em(e){var t=o.useRef();t.current=e;var n=o.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}var tm=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],nm=["inputValue"],om=o.forwardRef((function(e,t){var n=e.id,i=e.mode,r=e.prefixCls,s=void 0===r?"rc-select":r,l=e.backfill,c=e.fieldNames,u=e.inputValue,d=e.searchValue,h=e.onSearch,p=e.autoClearSearchValue,m=void 0===p||p,f=e.onSelect,b=e.onDeselect,v=e.dropdownMatchSelectWidth,w=void 0===v||v,y=e.filterOption,C=e.filterSort,x=e.optionFilterProp,E=e.optionLabelProp,R=e.options,M=e.optionRender,T=e.children,I=e.defaultActiveFirstOption,P=e.menuItemSelectedIcon,O=e.virtual,D=e.direction,N=e.listHeight,H=void 0===N?200:N,L=e.listItemHeight,$=void 0===L?20:L,_=e.labelRender,z=e.value,B=e.defaultValue,j=e.labelInValue,W=e.onChange,V=e.maxCount,G=(0,F.A)(e,tm),K=function(e){var t=o.useState(),n=(0,a.A)(t,2),i=n[0],r=n[1];return o.useEffect((function(){var e;r("rc_select_".concat((Yp?(e=qp,qp+=1):e="TEST_OR_SSR",e)))}),[]),e||i}(n),U=Lp(i),q=!(R||!T),Y=o.useMemo((function(){return(void 0!==y||"combobox"!==i)&&y}),[y,i]),X=o.useMemo((function(){return Ip(c,q)}),[JSON.stringify(c),q]),Q=(0,so.A)("",{value:void 0!==d?d:u,postState:function(e){return e||""}}),J=(0,a.A)(Q,2),Z=J[0],ee=J[1],te=Zp(R,T,X,x,E),ne=te.valueOptions,oe=te.labelOptions,ie=te.options,re=o.useCallback((function(e){return mp(e).map((function(e){var t,n,o,i,r,s;!function(e){return!e||"object"!==(0,S.A)(e)}(e)?(o=e.key,n=e.label,t=null!==(s=e.value)&&void 0!==s?s:o):t=e;var a,l=ne.get(t);return l&&(void 0===n&&(n=null==l?void 0:l[E||X.label]),void 0===o&&(o=null!==(a=null==l?void 0:l.key)&&void 0!==a?a:t),i=null==l?void 0:l.disabled,r=null==l?void 0:l.title),{label:n,value:t,key:o,disabled:i,title:r}}))}),[X,E,ne]),se=(0,so.A)(B,{value:z}),ae=(0,a.A)(se,2),le=ae[0],ce=ae[1],ue=o.useMemo((function(){var e,t=re(U&&null===le?[]:le);return"combobox"===i&&function(e){return!e&&0!==e}(null===(e=t[0])||void 0===e?void 0:e.value)?[]:t}),[le,re,i,U]),de=function(e,t){var n=o.useRef({values:new Map,options:new Map});return[o.useMemo((function(){var o=n.current,i=o.values,r=o.options,s=e.map((function(e){var t;return void 0===e.label?(0,A.A)((0,A.A)({},e),{},{label:null===(t=i.get(e.value))||void 0===t?void 0:t.label}):e})),a=new Map,l=new Map;return s.forEach((function(e){a.set(e.value,e),l.set(e.value,t.get(e.value)||r.get(e.value))})),n.current.values=a,n.current.options=l,s}),[e,t]),o.useCallback((function(e){return t.get(e)||n.current.options.get(e)}),[t])]}(ue,ne),he=(0,a.A)(de,2),pe=he[0],me=he[1],ge=o.useMemo((function(){if(!i&&1===pe.length){var e=pe[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return pe.map((function(e){var t;return(0,A.A)((0,A.A)({},e),{},{label:null!==(t="function"==typeof _?_(e):e.label)&&void 0!==t?t:e.value})}))}),[i,pe,_]),fe=o.useMemo((function(){return new Set(pe.map((function(e){return e.value})))}),[pe]);o.useEffect((function(){if("combobox"===i){var e,t=null===(e=pe[0])||void 0===e?void 0:e.value;ee(function(e){return null!=e}(t)?String(t):"")}}),[pe]);var be=em((function(e,t){var n=null!=t?t:e;return(0,k.A)((0,k.A)({},X.value,e),X.label,n)})),ve=function(e,t,n,i,r){return o.useMemo((function(){if(!n||!1===i)return e;var o=t.options,s=t.label,a=t.value,l=[],c="function"==typeof i,u=n.toUpperCase(),d=c?i:function(e,t){return r?Up(t[r],u):t[o]?Up(t["children"!==s?s:"label"],u):Up(t[a],u)},h=c?function(e){return Pp(e)}:function(e){return e};return e.forEach((function(e){if(e[o])if(d(n,h(e)))l.push(e);else{var t=e[o].filter((function(e){return d(n,h(e))}));t.length&&l.push((0,A.A)((0,A.A)({},e),{},(0,k.A)({},o,t)))}else d(n,h(e))&&l.push(e)})),l}),[e,i,r,n,t])}(o.useMemo((function(){if("tags"!==i)return ie;var e=(0,tt.A)(ie);return(0,tt.A)(pe).sort((function(e,t){return e.value<t.value?-1:1})).forEach((function(t){var n=t.value;(function(e){return ne.has(e)})(n)||e.push(be(n,t.label))})),e}),[be,ie,ne,pe,i]),X,Z,Y,x),we=o.useMemo((function(){return"tags"!==i||!Z||ve.some((function(e){return e[x||"value"]===Z}))||ve.some((function(e){return e[X.value]===Z}))?ve:[be(Z)].concat((0,tt.A)(ve))}),[be,x,i,ve,Z,X]),ye=function e(t){return(0,tt.A)(t).sort((function(e,t){return C(e,t,{searchValue:Z})})).map((function(t){return Array.isArray(t.options)?(0,A.A)((0,A.A)({},t),{},{options:t.options.length>0?e(t.options):t.options}):t}))},Ce=o.useMemo((function(){return C?ye(we):we}),[we,C,Z]),xe=o.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,o=t.childrenAsData,i=[],r=Ip(n,!1),s=r.label,a=r.value,l=r.options,c=r.groupLabel;return function e(t,n){Array.isArray(t)&&t.forEach((function(t){if(n||!(l in t)){var r=t[a];i.push({key:Mp(t,i.length),groupOption:n,data:t,label:t[s],value:r})}else{var u=t[c];void 0===u&&o&&(u=t.label),i.push({key:Mp(t,i.length),group:!0,data:t,label:u}),e(t[l],!0)}}))}(e,!1),i}(Ce,{fieldNames:X,childrenAsData:q})}),[Ce,X,q]),Ee=function(e){var t=re(e);if(ce(t),W&&(t.length!==pe.length||t.some((function(e,t){var n;return(null===(n=pe[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)})))){var n=j?t:t.map((function(e){return e.value})),o=t.map((function(e){return Pp(me(e.value))}));W(U?n:n[0],U?o:o[0])}},Se=o.useState(null),Ae=(0,a.A)(Se,2),ke=Ae[0],Re=Ae[1],Me=o.useState(0),Te=(0,a.A)(Me,2),Ie=Te[0],Pe=Te[1],Oe=void 0!==I?I:"combobox"!==i,De=o.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,o=void 0===n?"keyboard":n;Pe(t),l&&"combobox"===i&&null!==e&&"keyboard"===o&&Re(String(e))}),[l,i]),Ne=function(e,t,n){var o=function(){var t,n=me(e);return[j?{label:null==n?void 0:n[X.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,Pp(n)]};if(t&&f){var i=o(),r=(0,a.A)(i,2),s=r[0],l=r[1];f(s,l)}else if(!t&&b&&"clear"!==n){var c=o(),u=(0,a.A)(c,2),d=u[0],h=u[1];b(d,h)}},He=em((function(e,t){var n,o=!U||t.selected;n=o?U?[].concat((0,tt.A)(pe),[e]):[e]:pe.filter((function(t){return t.value!==e})),Ee(n),Ne(e,o),"combobox"===i?Re(""):Lp&&!m||(ee(""),Re(""))})),Le=o.useMemo((function(){var e=!1!==O&&!1!==w;return(0,A.A)((0,A.A)({},te),{},{flattenOptions:xe,onActiveValue:De,defaultActiveFirstOption:Oe,onSelect:He,menuItemSelectedIcon:P,rawValues:fe,fieldNames:X,virtual:e,direction:D,listHeight:H,listItemHeight:$,childrenAsData:q,maxCount:V,optionRender:M})}),[V,te,xe,De,Oe,He,P,fe,X,O,w,D,H,$,q,M]);return o.createElement(Op.Provider,{value:Le},o.createElement(_p,(0,g.A)({},G,{id:K,prefixCls:s,ref:t,omitDomProps:nm,mode:i,displayValues:ge,onDisplayValuesChange:function(e,t){Ee(e);var n=t.type,o=t.values;"remove"!==n&&"clear"!==n||o.forEach((function(e){Ne(e.value,!1,n)}))},direction:D,searchValue:Z,onSearch:function(e,t){if(ee(e),Re(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===i&&Ee(e),null==h||h(e));else{var n=(e||"").trim();if(n){var o=Array.from(new Set([].concat((0,tt.A)(fe),[n])));Ee(o),Ne(n,!0),ee("")}}},autoClearSearchValue:m,onSearchSplit:function(e){var t=e;"tags"!==i&&(t=e.map((function(e){var t=oe.get(e);return null==t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat((0,tt.A)(fe),(0,tt.A)(t))));Ee(n),n.forEach((function(e){Ne(e,!0)}))},dropdownMatchSelectWidth:w,OptionList:Kp,emptyOptions:!xe.length,activeValue:ke,activeDescendantId:"".concat(K,"_list_").concat(Ie)})))})),im=om;im.Option=jp,im.OptGroup=Fp;const rm=im;function sm(e,t,n){return M()({[`${e}-status-success`]:"success"===t,[`${e}-status-warning`]:"warning"===t,[`${e}-status-error`]:"error"===t,[`${e}-status-validating`]:"validating"===t,[`${e}-has-feedback`]:n})}const am=(e,t)=>t||e,lm=(e,t,n=void 0)=>{var i,r;const{variant:s,[e]:a}=o.useContext(ho.QO),l=o.useContext($r),c=null==a?void 0:a.variant;let u;return u=void 0!==t?t:!1===n?"borderless":null!==(r=null!==(i=null!=l?l:c)&&void 0!==i?i:s)&&void 0!==r?r:"outlined",[u,ho.lJ.includes(u)]},cm=function(e,t){return e||(e=>{const t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:"scroll"===e?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}})(t)},um=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:o,optionPadding:i}=e;return{position:"relative",display:"block",minHeight:t,padding:i,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:o,boxSizing:"border-box"}},dm=e=>{const{antCls:t,componentCls:n}=e,o=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,r=`&${t}-slide-up-appear${t}-slide-up-appear-active`,s=`&${t}-slide-up-leave${t}-slide-up-leave-active`,a=`${n}-dropdown-placement-`,l=`${o}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},(0,Do.dF)(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`\n ${i}${a}bottomLeft,\n ${r}${a}bottomLeft\n `]:{animationName:Qc},[`\n ${i}${a}topLeft,\n ${r}${a}topLeft,\n ${i}${a}topRight,\n ${r}${a}topRight\n `]:{animationName:Zc},[`${s}${a}bottomLeft`]:{animationName:Jc},[`\n ${s}${a}topLeft,\n ${s}${a}topRight\n `]:{animationName:eu},"&-hidden":{display:"none"},[o]:Object.assign(Object.assign({},um(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Do.L9),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${o}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},um(e)),{color:e.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},su(e,"slide-up"),su(e,"slide-down"),Ou(e,"move-up"),Ou(e,"move-down")]},hm=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:o,motionDurationSlow:i,paddingXS:r,multipleItemColorDisabled:s,multipleItemBorderColorDisabled:a,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=e,d=`${t}-selection-overflow`;return{[d]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:o,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:r,paddingInlineEnd:e.calc(r).div(2).equal(),[`${t}-disabled&`]:{color:s,borderColor:a,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(r).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,Do.Nk)()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},pm=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:o}=e,i=`${n}-selection-overflow`,r=e.multipleSelectItemHeight,s=(e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:o}=e;return e.calc(n).sub(t).div(2).sub(o).equal()})(e),a=t?`${n}-${t}`:"",l=(e=>{const{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:o,INTERNAL_FIXED_ITEM_MARGIN:i}=e,r=e.max(e.calc(n).sub(o).equal(),0);return{basePadding:r,containerPadding:e.max(e.calc(r).sub(i).equal(),0),itemHeight:(0,go.zA)(t),itemLineHeight:(0,go.zA)(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}})(e);return{[`${n}-multiple${a}`]:Object.assign(Object.assign({},hm(e)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,go.zA)(o)} 0`,lineHeight:(0,go.zA)(r),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:(0,go.zA)(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,go.zA)(r),marginBlock:o}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${i}-item + ${i}-item,\n ${n}-prefix + ${n}-selection-wrap\n `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:o},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(s).equal(),"\n &-input,\n &-mirror\n ":{height:r,fontFamily:e.fontFamily,lineHeight:(0,go.zA)(r),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function mm(e,t){const{componentCls:n}=e,o=t?`${n}-${t}`:"",i={[`${n}-multiple${o}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`\n &${n}-show-arrow ${n}-selector,\n &${n}-allow-clear ${n}-selector\n `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[pm(e,t),i]}const gm=e=>{const{componentCls:t}=e,n=Ro(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),o=Ro(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[mm(e),mm(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},mm(o,"lg")]};function fm(e,t){const{componentCls:n,inputPaddingHorizontalBase:o,borderRadius:i}=e,r=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),s=t?`${n}-${t}`:"";return{[`${n}-single${s}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},(0,Do.dF)(e,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:(0,go.zA)(r)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`\n ${n}-selection-item,\n ${n}-selection-placeholder\n `]:{display:"block",padding:0,lineHeight:(0,go.zA)(r),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`\n &${n}-show-arrow ${n}-selection-item,\n &${n}-show-arrow ${n}-selection-search,\n &${n}-show-arrow ${n}-selection-placeholder\n `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${(0,go.zA)(o)}`,[`${n}-selection-search-input`]:{height:r,fontSize:e.fontSize},"&:after":{lineHeight:(0,go.zA)(r)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,go.zA)(o)}`,"&:after":{display:"none"}}}}}}}function bm(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[fm(e),fm(Ro(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${(0,go.zA)(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`\n &${t}-show-arrow ${t}-selection-item,\n &${t}-show-arrow ${t}-selection-placeholder\n `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},fm(Ro(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const vm=(e,t)=>{const{componentCls:n,antCls:o,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${(0,go.zA)(i)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},wm=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},vm(e,t))}),ym=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},vm(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),wm(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),wm(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Cm=(e,t)=>{const{componentCls:n,antCls:o}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},xm=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Cm(e,t))}),Em=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},Cm(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),xm(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),xm(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Sm=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),Am=(e,t)=>{const{componentCls:n,antCls:o}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${(0,go.zA)(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${n}-prefix`]:{color:t.color}}}},km=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Am(e,t))}),Rm=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},Am(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),km(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),km(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Mm=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},ym(e)),Em(e)),Sm(e)),Rm(e))}),Tm=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Im=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},Pm=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:o,iconCls:i}=e,r={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},(0,Do.dF)(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},Tm(e)),Im(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Do.L9),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Do.L9),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},(0,Do.Nk)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":r,"&:hover":r}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(o).add(e.fontSize).add(e.paddingXS).equal()}}}}}},Om=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Pm(e),bm(e),gm(e),dm(e),{[`${t}-rtl`]:{direction:"rtl"}},zd(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},Dm=Ho("Select",((e,{rootPrefixCls:t})=>{const n=Ro(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Om(n),Mm(n)]}),(e=>{const{fontSize:t,lineHeight:n,lineWidth:o,controlHeight:i,controlHeightSM:r,controlHeightLG:s,paddingXXS:a,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:h,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:g,colorBgContainerDisabled:f,colorTextDisabled:b,colorPrimaryHover:v,colorPrimary:w,controlOutline:y}=e,C=2*a,x=2*o,E=Math.min(i-C,i-x),S=Math.min(r-C,r-x),A=Math.min(s-C,s-x);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:h,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:s,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:S,multipleItemHeightLG:A,multipleSelectorBgDisabled:f,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize),hoverBorderColor:v,activeBorderColor:w,activeOutlineColor:y,selectAffixPadding:a}}),{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),Nm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var Hm=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Nm}))};const Lm=o.forwardRef(Hm),$m={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var _m=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:$m}))};const zm=o.forwardRef(_m),Fm={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var Bm=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Fm}))};const jm=o.forwardRef(Bm),Wm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var Vm=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Wm}))};const Gm=o.forwardRef(Vm);const Km="SECRET_COMBOBOX_MODE_DO_NOT_USE",Um=(e,t)=>{var n,i,r,s,a;const{prefixCls:l,bordered:c,className:u,rootClassName:d,getPopupContainer:h,popupClassName:p,dropdownClassName:m,listHeight:g=256,placement:f,listItemHeight:b,size:v,disabled:w,notFoundContent:y,status:C,builtinPlacements:x,dropdownMatchSelectWidth:E,popupMatchSelectWidth:S,direction:A,style:k,allowClear:R,variant:T,dropdownStyle:I,transitionName:P,tagRender:O,maxCount:D,prefix:N,dropdownRender:H,popupRender:L,onDropdownVisibleChange:$,onOpenChange:_,styles:z,classNames:F}=e,B=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:j,getPrefixCls:W,renderEmpty:V,direction:G,virtual:K,popupMatchSelectWidth:U,popupOverflow:q}=o.useContext(ho.QO),{showSearch:Y,style:X,styles:Q,className:J,classNames:Z}=(0,ho.TP)("select"),[,ee]=(0,No.Ay)(),te=null!=b?b:null==ee?void 0:ee.controlHeight,ne=W("select",l),oe=W(),ie=null!=A?A:G,{compactSize:re,compactItemClassnames:se}=yc(ne,ie),[ae,le]=lm("select",T,c),ce=vi(ne),[ue,de,he]=Dm(ne,ce),pe=o.useMemo((()=>{const{mode:t}=e;if("combobox"!==t)return t===Km?"combobox":t}),[e.mode]),me="multiple"===pe||"tags"===pe,ge=function(e,t){return void 0!==t?t:null!==e}(e.suffixIcon,e.showArrow),fe=null!==(n=null!=S?S:E)&&void 0!==n?n:U,be=(null===(i=null==z?void 0:z.popup)||void 0===i?void 0:i.root)||(null===(r=Q.popup)||void 0===r?void 0:r.root)||I,ve=L||H,we=_||$,{status:ye,hasFeedback:Ce,isFormItemInput:xe,feedbackIcon:Ee}=o.useContext(Hr),Se=am(ye,C);let Ae;Ae=void 0!==y?y:"combobox"===pe?null:(null==V?void 0:V("Select"))||o.createElement(Bh,{componentName:"Select"});const{suffixIcon:ke,itemIcon:Re,removeIcon:Me,clearIcon:Te}=function({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:i,loading:r,multiple:s,hasFeedback:a,prefixCls:l,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:h}){const p=null!=t?t:o.createElement(zm,null),m=t=>null!==e||a||d?o.createElement(o.Fragment,null,!1!==c&&t,a&&u):null;let g=null;if(void 0!==e)g=m(e);else if(r)g=m(o.createElement(Ku,{spin:!0}));else{const e=`${l}-suffix`;g=({open:t,showSearch:n})=>m(t&&n?o.createElement(Gm,{className:e}):o.createElement(Rn,{className:e}))}let f=null;f=void 0!==n?n:s?o.createElement(Lm,null):null;let b=null;return b=void 0!==i?i:o.createElement(jm,null),{clearIcon:p,suffixIcon:g,itemIcon:f,removeIcon:b}}(Object.assign(Object.assign({},B),{multiple:me,hasFeedback:Ce,feedbackIcon:Ee,showSuffixIcon:ge,prefixCls:ne,componentName:"Select"})),Ie=!0===R?{clearIcon:Te}:R,Pe=Dn(B,["suffixIcon","itemIcon"]),Oe=M()((null===(s=null==F?void 0:F.popup)||void 0===s?void 0:s.root)||(null===(a=null==Z?void 0:Z.popup)||void 0===a?void 0:a.root)||p||m,{[`${ne}-dropdown-${ie}`]:"rtl"===ie},d,Z.root,null==F?void 0:F.root,he,ce,de),De=pc((e=>{var t;return null!==(t=null!=v?v:re)&&void 0!==t?t:e})),Ne=o.useContext(bi.A),He=null!=w?w:Ne,Le=M()({[`${ne}-lg`]:"large"===De,[`${ne}-sm`]:"small"===De,[`${ne}-rtl`]:"rtl"===ie,[`${ne}-${ae}`]:le,[`${ne}-in-form-item`]:xe},sm(ne,Se,Ce),se,J,u,Z.root,null==F?void 0:F.root,d,he,ce,de),$e=o.useMemo((()=>void 0!==f?f:"rtl"===ie?"bottomRight":"bottomLeft"),[f,ie]),[_e]=Xs("SelectLike",null==be?void 0:be.zIndex);return ue(o.createElement(rm,Object.assign({ref:t,virtual:K,showSearch:Y},Pe,{style:Object.assign(Object.assign(Object.assign(Object.assign({},Q.root),null==z?void 0:z.root),X),k),dropdownMatchSelectWidth:fe,transitionName:ec(oe,"slide-up",P),builtinPlacements:cm(x,q),listHeight:g,listItemHeight:te,mode:pe,prefixCls:ne,placement:$e,direction:ie,prefix:N,suffixIcon:ke,menuItemSelectedIcon:Re,removeIcon:Me,allowClear:Ie,notFoundContent:Ae,className:Le,getPopupContainer:h||j,dropdownClassName:Oe,disabled:He,dropdownStyle:Object.assign(Object.assign({},be),{zIndex:_e}),maxCount:me?D:void 0,tagRender:me?O:void 0,dropdownRender:ve,onDropdownVisibleChange:we})))},qm=o.forwardRef(Um),Ym=aa(qm,"dropdownAlign");qm.SECRET_COMBOBOX_MODE_DO_NOT_USE=Km,qm.Option=jp,qm.OptGroup=Fp,qm._InternalPanelDoNotUseOrYouWillBeFired=Ym;const Xm=qm;function Qm(e){return Ro(e,{inputAffixPadding:e.paddingXXS})}const Jm=e=>{const{controlHeight:t,fontSize:n,lineHeight:o,lineWidth:i,controlHeightSM:r,controlHeightLG:s,fontSizeLG:a,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:h,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:g,controlOutline:f,colorErrorOutline:b,colorWarningOutline:v,colorBgContainer:w,inputFontSize:y,inputFontSizeLG:C,inputFontSizeSM:x}=e,E=y||n,S=x||E,A=C||a,k=Math.round((t-E*o)/2*10)/10-i,R=Math.round((r-S*o)/2*10)/10-i,M=Math.ceil((s-A*l)/2*10)/10-i;return{paddingBlock:Math.max(k,0),paddingBlockSM:Math.max(R,0),paddingBlockLG:Math.max(M,0),paddingInline:c-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:h,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${g}px ${f}`,errorActiveShadow:`0 0 0 ${g}px ${b}`,warningActiveShadow:`0 0 0 ${g}px ${v}`,hoverBg:w,activeBg:w,inputFontSize:E,inputFontSizeLG:A,inputFontSizeSM:S}},Zm=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),eg=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},Zm(Ro(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),tg=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),ng=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},tg(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),og=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},tg(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},eg(e))}),ng(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),ng(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),ig=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),rg=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},ig(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),ig(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},eg(e))}})}),sg=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},ag=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:null!==(n=null==t?void 0:t.inputColor)&&void 0!==n?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},lg=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},ag(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),cg=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ag(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},eg(e))}),lg(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),lg(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),ug=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),dg=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},ug(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),ug(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),hg=(e,t)=>({background:e.colorBgContainer,borderWidth:`${(0,go.zA)(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.borderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),pg=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},hg(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),mg=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},hg(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),pg(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),pg(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),gg=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:o,paddingInlineLG:i}=e;return{padding:`${(0,go.zA)(t)} ${(0,go.zA)(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:o}},fg=e=>({padding:`${(0,go.zA)(e.paddingBlockSM)} ${(0,go.zA)(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),bg=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,go.zA)(e.paddingBlock)} ${(0,go.zA)(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},{"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e.colorTextPlaceholder,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),{"&-lg":Object.assign({},gg(e)),"&-sm":Object.assign({},fg(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),vg=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},gg(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},fg(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${(0,go.zA)(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${(0,go.zA)(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${(0,go.zA)(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${(0,go.zA)(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,Do.t6)()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`\n & > ${t}-affix-wrapper,\n & > ${t}-number-affix-wrapper,\n & > ${n}-picker-range\n `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,\n & > ${n}-select-auto-complete ${t},\n & > ${n}-cascader-picker ${t},\n & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,\n & > ${n}-select:first-child > ${n}-select-selector,\n & > ${n}-select-auto-complete:first-child ${t},\n & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,\n & > ${n}-select:last-child > ${n}-select-selector,\n & > ${n}-cascader-picker:last-child ${t},\n & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},wg=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:o,calc:i}=e,r=i(n).sub(i(o).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Do.dF)(e)),bg(e)),og(e)),cg(e)),sg(e)),mg(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:r,paddingBottom:r}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},yg=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,go.zA)(e.inputAffixPadding)}`}}}},Cg=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:o,motionDurationSlow:i,colorIcon:r,colorIconHover:s,iconCls:a}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},bg(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:o,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),yg(e)),{[`${a}${t}-password-icon`]:{color:r,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:s}}}),[`${t}-underlined`]:{borderRadius:0},[c]:{[`${a}${t}-password-icon`]:{color:r,cursor:"not-allowed","&:hover":{color:r}}}}},xg=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:o}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},(0,Do.dF)(e)),vg(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:o}}},rg(e)),dg(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},Eg=e=>{const{componentCls:t,antCls:n}=e,o=`${t}-search`;return{[o]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${o}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${o}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${o}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${o}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${o}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${o}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,\n > ${t},\n ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},Sg=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Ag=Ho(["Input","Shared"],(e=>{const t=Ro(e,Qm(e));return[wg(t),Cg(t)]}),Jm,{resetFont:!1}),kg=Ho(["Input","Component"],(e=>{const t=Ro(e,Qm(e));return[xg(t),Eg(t),Sg(t),zd(t)]}),Jm,{resetFont:!1}),Rg=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}},[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{[`&${t}-disabled ${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Mg=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:(0,go.zA)(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,go.zA)(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,go.zA)(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`\n &${t}-mini ${t}-prev ${t}-item-link,\n &${t}-mini ${t}-next ${t}-item-link\n `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:(0,go.zA)(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:(0,go.zA)(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:(0,go.zA)(e.itemSizeSM),input:Object.assign(Object.assign({},fg(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},Tg=e=>{const{componentCls:t}=e;return{[`\n &${t}-simple ${t}-prev,\n &${t}-simple ${t}-next\n `]:{height:e.itemSizeSM,lineHeight:(0,go.zA)(e.itemSizeSM),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSizeSM,lineHeight:(0,go.zA)(e.itemSizeSM)}}},[`&${t}-simple ${t}-simple-pager`]:{display:"inline-block",height:e.itemSizeSM,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",padding:`0 ${(0,go.zA)(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${(0,go.zA)(e.inputOutlineOffset)} 0 ${(0,go.zA)(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}}}},Ig=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`\n ${t}-prev,\n ${t}-jump-prev,\n ${t}-jump-next\n `]:{marginInlineEnd:e.marginXS},[`\n ${t}-prev,\n ${t}-next,\n ${t}-jump-prev,\n ${t}-jump-next\n `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:(0,go.zA)(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:(0,go.zA)(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},bg(e)),tg(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},eg(e)),width:e.calc(e.controlHeightLG).mul(1.25).equal(),height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},Pg=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:(0,go.zA)(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${(0,go.zA)(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}}}},Og=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Do.dF)(e)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:(0,go.zA)(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),Pg(e)),Ig(e)),Tg(e)),Mg(e)),Rg(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},Dg=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},(0,Do.K8)(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},(0,Do.jk)(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Object.assign({},(0,Do.jk)(e))}}}},Ng=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},Jm(e)),Hg=e=>Ro(e,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},Qm(e)),Lg=Ho("Pagination",(e=>{const t=Hg(e);return[Og(t),Dg(t)]}),Ng),$g=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${(0,go.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},_g=$o(["Pagination","bordered"],(e=>{const t=Hg(e);return[$g(t)]}),Ng);function zg(e){return(0,o.useMemo)((()=>"boolean"==typeof e?[e,{}]:e&&"object"==typeof e?[!0,e]:[void 0,void 0]),[e])}const Fg=e=>{const{align:t,prefixCls:n,selectPrefixCls:i,className:r,rootClassName:s,style:a,size:l,locale:c,responsive:u,showSizeChanger:d,selectComponentClass:h,pageSizeOptions:p}=e,m=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:g}=Gh(u),[,f]=(0,No.Ay)(),{getPrefixCls:b,direction:v,showSizeChanger:w,className:y,style:C}=(0,ho.TP)("pagination"),x=b("pagination",n),[E,S,A]=Lg(x),k=pc(l),R="small"===k||!(!g||k||!u),[T]=Oh("Pagination",ap.A),I=Object.assign(Object.assign({},T),c),[P,O]=zg(d),[D,N]=zg(w),H=null!=P?P:D,L=null!=O?O:N,$=h||Xm,_=o.useMemo((()=>p?p.map((e=>Number(e))):void 0),[p]),z=o.useMemo((()=>{const e=o.createElement("span",{className:`${x}-item-ellipsis`},"•••");return{prevIcon:o.createElement("button",{className:`${x}-item-link`,type:"button",tabIndex:-1},"rtl"===v?o.createElement(es,null):o.createElement(Qr,null)),nextIcon:o.createElement("button",{className:`${x}-item-link`,type:"button",tabIndex:-1},"rtl"===v?o.createElement(Qr,null):o.createElement(es,null)),jumpPrevIcon:o.createElement("a",{className:`${x}-item-link`},o.createElement("div",{className:`${x}-item-container`},"rtl"===v?o.createElement(Qh,{className:`${x}-item-link-icon`}):o.createElement(qh,{className:`${x}-item-link-icon`}),e)),jumpNextIcon:o.createElement("a",{className:`${x}-item-link`},o.createElement("div",{className:`${x}-item-container`},"rtl"===v?o.createElement(qh,{className:`${x}-item-link-icon`}):o.createElement(Qh,{className:`${x}-item-link-icon`}),e))}}),[v,x]),F=b("select",i),B=M()({[`${x}-${t}`]:!!t,[`${x}-mini`]:R,[`${x}-rtl`]:"rtl"===v,[`${x}-bordered`]:f.wireframe},y,r,s,S,A),j=Object.assign(Object.assign({},C),a);return E(o.createElement(o.Fragment,null,f.wireframe&&o.createElement(_g,{prefixCls:x}),o.createElement(sp,Object.assign({},z,m,{style:j,prefixCls:x,selectPrefixCls:F,className:B,locale:I,pageSizeOptions:_,showSizeChanger:H,sizeChangerRender:e=>{var t;const{disabled:n,size:i,onSizeChange:r,"aria-label":s,className:a,options:l}=e,{className:c,onChange:u}=L||{},d=null===(t=l.find((e=>String(e.value)===String(i))))||void 0===t?void 0:t.value;return o.createElement($,Object.assign({disabled:n,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":s,options:l},L,{value:d,onChange:(e,t)=>{null==r||r(e),null==u||u(e,t)},size:R?"small":"middle",className:M()(a,c)}))}}))))};const Bg=80*Math.PI,jg=e=>{const{dotClassName:t,style:n,hasCircleCls:i}=e;return o.createElement("circle",{className:M()(`${t}-circle`,{[`${t}-circle-bg`]:i}),r:40,cx:50,cy:50,strokeWidth:20,style:n})},Wg=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,i=`${n}-holder`,r=`${i}-hidden`,[s,a]=o.useState(!1);(0,c.A)((()=>{0!==e&&a(!0)}),[0!==e]);const l=Math.max(Math.min(e,100),0);if(!s)return null;const u={strokeDashoffset:""+Bg/4,strokeDasharray:`${Bg*l/100} ${Bg*(100-l)/100}`};return o.createElement("span",{className:M()(i,`${n}-progress`,l<=0&&r)},o.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},o.createElement(jg,{dotClassName:n,hasCircleCls:!0}),o.createElement(jg,{dotClassName:n,style:u})))};function Vg(e){const{prefixCls:t,percent:n=0}=e,i=`${t}-dot`,r=`${i}-holder`,s=`${r}-hidden`;return o.createElement(o.Fragment,null,o.createElement("span",{className:M()(r,n>0&&s)},o.createElement("span",{className:M()(i,`${t}-dot-spin`)},[1,2,3,4].map((e=>o.createElement("i",{className:`${t}-dot-item`,key:e}))))),o.createElement(Wg,{prefixCls:t,percent:n}))}function Gg(e){const{prefixCls:t,indicator:n,percent:i}=e,r=`${t}-dot`;return n&&o.isValidElement(n)?mo(n,{className:M()(n.props.className,r),percent:i}):o.createElement(Vg,{prefixCls:t,percent:i})}const Kg=new go.Mo("antSpinMove",{to:{opacity:1}}),Ug=new go.Mo("antRotate",{to:{transform:"rotate(405deg)"}}),qg=e=>{const{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},(0,Do.dF)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Kg,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:Ug,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map((t=>`${t} ${e.motionDurationSlow} ease`)).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}},Yg=Ho("Spin",(e=>{const t=Ro(e,{spinDotDefault:e.colorTextDescription});return[qg(t)]}),(e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}})),Xg=[[30,.05],[70,.03],[96,.01]];let Qg;const Jg=e=>{var t;const{prefixCls:n,spinning:i=!0,delay:r=0,className:s,rootClassName:a,size:l="default",tip:c,wrapperClassName:u,style:d,children:h,fullscreen:p=!1,indicator:m,percent:g}=e,f=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:b,direction:v,className:w,style:y,indicator:C}=(0,ho.TP)("spin"),x=b("spin",n),[E,S,A]=Yg(x),[k,R]=o.useState((()=>i&&!function(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}(i,r))),T=function(e,t){const[n,i]=o.useState(0),r=o.useRef(null),s="auto"===t;return o.useEffect((()=>(s&&e&&(i(0),r.current=setInterval((()=>{i((e=>{const t=100-e;for(let n=0;n<Xg.length;n+=1){const[o,i]=Xg[n];if(e<=o)return e+t*i}return e}))}),200)),()=>{clearInterval(r.current)})),[s,e]),s?n:t}(k,g);o.useEffect((()=>{if(i){const e=function(e,t,n){var o=(n||{}).atBegin;return function(e,t,n){var o,i=n||{},r=i.noTrailing,s=void 0!==r&&r,a=i.noLeading,l=void 0!==a&&a,c=i.debounceMode,u=void 0===c?void 0:c,d=!1,h=0;function p(){o&&clearTimeout(o)}function m(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var a=this,c=Date.now()-h;function m(){h=Date.now(),t.apply(a,i)}function g(){o=void 0}d||(l||!u||o||m(),p(),void 0===u&&c>e?l?(h=Date.now(),s||(o=setTimeout(u?g:m,e))):m():!0!==s&&(o=setTimeout(u?g:m,void 0===u?e-c:e)))}return m.cancel=function(e){var t=(e||{}).upcomingOnly,n=void 0!==t&&t;p(),d=!n},m}(e,t,{debounceMode:!1!==(void 0!==o&&o)})}(r,(()=>{R(!0)}));return e(),()=>{var t;null===(t=null==e?void 0:e.cancel)||void 0===t||t.call(e)}}R(!1)}),[r,i]);const I=o.useMemo((()=>void 0!==h&&!p),[h,p]),P=M()(x,w,{[`${x}-sm`]:"small"===l,[`${x}-lg`]:"large"===l,[`${x}-spinning`]:k,[`${x}-show-text`]:!!c,[`${x}-rtl`]:"rtl"===v},s,!p&&a,S,A),O=M()(`${x}-container`,{[`${x}-blur`]:k}),D=null!==(t=null!=m?m:C)&&void 0!==t?t:Qg,N=Object.assign(Object.assign({},y),d),H=o.createElement("div",Object.assign({},f,{style:N,className:P,"aria-live":"polite","aria-busy":k}),o.createElement(Gg,{prefixCls:x,indicator:D,percent:T}),c&&(I||p)?o.createElement("div",{className:`${x}-text`},c):null);return E(I?o.createElement("div",Object.assign({},f,{className:M()(`${x}-nested-loading`,u,S,A)}),k&&o.createElement("div",{key:"loading"},H),o.createElement("div",{className:O,key:"container"},h)):p?o.createElement("div",{className:M()(`${x}-fullscreen`,{[`${x}-fullscreen-show`]:k},a,S,A)},H):H)};Jg.setDefaultIndicator=e=>{Qg=e};const Zg=Jg,ef=(e,t)=>"key"in e&&void 0!==e.key&&null!==e.key?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function tf(e,t){return t?`${t}-${e}`:`${e}`}const nf=(e,t)=>"function"==typeof e?e(t):e,of={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};var rf=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:of}))};const sf=o.forwardRef(rf),af=function(...e){const t={};return e.forEach((e=>{e&&Object.keys(e).forEach((n=>{void 0!==e[n]&&(t[n]=e[n])}))})),t};function lf(e){if(null==e)throw new TypeError("Cannot destructure "+e)}var cf=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],uf=o.forwardRef((function(e,t){var n=e.className,i=e.style,r=e.motion,s=e.motionNodes,l=e.motionType,u=e.onMotionStart,d=e.onMotionEnd,h=e.active,p=e.treeNodeRequiredProps,m=(0,F.A)(e,cf),f=o.useState(!0),b=(0,a.A)(f,2),v=b[0],w=b[1],y=o.useContext(Mn).prefixCls,C=s&&"hide"!==l;(0,c.A)((function(){s&&C!==v&&w(C)}),[s]);var x=o.useRef(!1),E=function(){s&&!x.current&&(x.current=!0,d())};return function(e,t){var n=o.useState(!1),i=(0,a.A)(n,2),r=i[0],s=i[1];(0,c.A)((function(){if(r)return e(),function(){t()}}),[r]),(0,c.A)((function(){return s(!0),function(){s(!1)}}),[])}((function(){s&&u()}),E),s?o.createElement(Bo.Ay,(0,g.A)({ref:t,visible:v},r,{motionAppear:"show"===l,onVisibleChanged:function(e){C===e&&E()}}),(function(e,t){var n=e.className,i=e.style;return o.createElement("div",{ref:t,className:M()("".concat(y,"-treenode-motion"),n),style:i},s.map((function(e){var t=Object.assign({},(lf(e.data),e.data)),n=e.title,i=e.key,r=e.isStart,s=e.isEnd;delete t.children;var a=Bn(i,p);return o.createElement(Un,(0,g.A)({},t,a,{title:n,active:h,data:e.data,key:i,isStart:r,isEnd:s}))})))})):o.createElement(Un,(0,g.A)({domRef:t,className:n,style:i},m,{active:h}))}));const df=uf;function hf(e,t,n){var o=e.findIndex((function(e){return e.key===n})),i=e[o+1],r=t.findIndex((function(e){return e.key===n}));if(i){var s=t.findIndex((function(e){return e.key===i.key}));return t.slice(r+1,s)}return t.slice(r+1)}var pf=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],mf={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},gf=function(){},ff="RC_TREE_MOTION_".concat(Math.random()),bf={key:ff},vf={key:ff,level:0,index:0,pos:"0",node:bf,nodes:[bf]},wf={parent:null,children:[],pos:vf.pos,data:bf,title:null,key:ff,isStart:[],isEnd:[]};function yf(e,t,n,o){return!1!==t&&n?e.slice(0,Math.ceil(n/o)+1):e}function Cf(e){return Ln(e.key,e.pos)}var xf=o.forwardRef((function(e,t){var n=e.prefixCls,i=e.data,r=(e.selectable,e.checkable,e.expandedKeys),s=e.selectedKeys,l=e.checkedKeys,u=e.loadedKeys,d=e.loadingKeys,h=e.halfCheckedKeys,p=e.keyEntities,m=e.disabled,f=e.dragging,b=e.dragOverNodeKey,v=e.dropPosition,w=e.motion,y=e.height,C=e.itemHeight,x=e.virtual,E=e.scrollWidth,S=e.focusable,A=e.activeItem,k=e.focused,R=e.tabIndex,M=e.onKeyDown,T=e.onFocus,I=e.onBlur,P=e.onActiveChange,O=e.onListChangeStart,D=e.onListChangeEnd,N=(0,F.A)(e,pf),H=o.useRef(null),L=o.useRef(null);o.useImperativeHandle(t,(function(){return{scrollTo:function(e){H.current.scrollTo(e)},getIndentWidth:function(){return L.current.offsetWidth}}}));var $=o.useState(r),_=(0,a.A)($,2),z=_[0],B=_[1],j=o.useState(i),W=(0,a.A)(j,2),V=W[0],G=W[1],K=o.useState(i),U=(0,a.A)(K,2),q=U[0],Y=U[1],X=o.useState([]),Q=(0,a.A)(X,2),J=Q[0],Z=Q[1],ee=o.useState(null),te=(0,a.A)(ee,2),ne=te[0],oe=te[1],ie=o.useRef(i);function re(){var e=ie.current;G(e),Y(e),Z([]),oe(null),D()}ie.current=i,(0,c.A)((function(){B(r);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,o=t.length;if(1!==Math.abs(n-o))return{add:!1,key:null};function i(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var o=t.filter((function(e){return!n.has(e)}));return 1===o.length?o[0]:null}return n<o?{add:!0,key:i(e,t)}:{add:!1,key:i(t,e)}}(z,r);if(null!==e.key)if(e.add){var t=V.findIndex((function(t){return t.key===e.key})),n=yf(hf(V,i,e.key),x,y,C),o=V.slice();o.splice(t+1,0,wf),Y(o),Z(n),oe("show")}else{var s=i.findIndex((function(t){return t.key===e.key})),a=yf(hf(i,V,e.key),x,y,C),l=i.slice();l.splice(s+1,0,wf),Y(l),Z(a),oe("hide")}else V!==i&&(G(i),Y(i))}),[r,i]),o.useEffect((function(){f||re()}),[f]);var se=w?q:i,ae={expandedKeys:r,selectedKeys:s,loadedKeys:u,loadingKeys:d,checkedKeys:l,halfCheckedKeys:h,dragOverNodeKey:b,dropPosition:v,keyEntities:p};return o.createElement(o.Fragment,null,k&&A&&o.createElement("span",{style:mf,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(A)),o.createElement("div",null,o.createElement("input",{style:mf,disabled:!1===S||m,tabIndex:!1!==S?R:null,onKeyDown:M,onFocus:T,onBlur:I,value:"",onChange:gf,"aria-label":"for screen reader"})),o.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},o.createElement("div",{className:"".concat(n,"-indent")},o.createElement("div",{ref:L,className:"".concat(n,"-indent-unit")}))),o.createElement(qt,(0,g.A)({},N,{data:se,itemKey:Cf,height:y,fullHeight:!1,virtual:x,itemHeight:C,scrollWidth:E,prefixCls:"".concat(n,"-list"),ref:H,role:"tree",onVisibleChange:function(e){e.every((function(e){return Cf(e)!==ff}))&&re()}}),(function(e){var t=e.pos,n=Object.assign({},(lf(e.data),e.data)),i=e.title,r=e.key,s=e.isStart,a=e.isEnd,l=Ln(r,t);delete n.key,delete n.children;var c=Bn(l,ae);return o.createElement(df,(0,g.A)({},n,c,{title:i,active:!!A&&r===A.key,pos:t,data:e.data,isStart:s,isEnd:a,motion:w,motionNodes:r===ff?J:null,motionType:ne,onMotionStart:O,onMotionEnd:re,treeNodeRequiredProps:ae,onMouseMove:function(){P(null)}}))})))}));const Ef=xf;var Sf=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(){var e;(0,we.A)(this,n);for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return e=t.call.apply(t,[this].concat(r)),(0,k.A)((0,fo.A)(e),"destroyed",!1),(0,k.A)((0,fo.A)(e),"delayedDragEnterLogic",void 0),(0,k.A)((0,fo.A)(e),"loadingRetryTimes",{}),(0,k.A)((0,fo.A)(e),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:$n()}),(0,k.A)((0,fo.A)(e),"dragStartMousePosition",null),(0,k.A)((0,fo.A)(e),"dragNodeProps",null),(0,k.A)((0,fo.A)(e),"currentMouseOverDroppableNodeKey",null),(0,k.A)((0,fo.A)(e),"listRef",o.createRef()),(0,k.A)((0,fo.A)(e),"onNodeDragStart",(function(t,n){var o=e.state,i=o.expandedKeys,r=o.keyEntities,s=e.props.onDragStart,a=n.eventKey;e.dragNodeProps=n,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var l=qn(i,a);e.setState({draggingNodeKey:a,dragChildrenKeys:Qn(a,r),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(l),window.addEventListener("dragend",e.onWindowDragEnd),null==s||s({event:t,node:jn(n)})})),(0,k.A)((0,fo.A)(e),"onNodeDragEnter",(function(t,n){var o=e.state,i=o.expandedKeys,r=o.keyEntities,s=o.dragChildrenKeys,a=o.flattenNodes,l=o.indent,c=e.props,u=c.onDragEnter,d=c.onExpand,h=c.allowDrop,p=c.direction,m=n.pos,g=n.eventKey;if(e.currentMouseOverDroppableNodeKey!==g&&(e.currentMouseOverDroppableNodeKey=g),e.dragNodeProps){var f=Zn(t,e.dragNodeProps,n,l,e.dragStartMousePosition,h,a,r,i,p),b=f.dropPosition,v=f.dropLevelOffset,w=f.dropTargetKey,y=f.dropContainerKey,C=f.dropTargetPos,x=f.dropAllowed,E=f.dragOverNodeKey;!s.includes(w)&&x?(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach((function(t){clearTimeout(e.delayedDragEnterLogic[t])})),e.dragNodeProps.eventKey!==n.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout((function(){if(null!==e.state.draggingNodeKey){var o=(0,tt.A)(i),s=On(r,n.eventKey);s&&(s.children||[]).length&&(o=Yn(i,n.eventKey)),e.props.hasOwnProperty("expandedKeys")||e.setExpandedKeys(o),null==d||d(o,{node:jn(n),expanded:!0,nativeEvent:t.nativeEvent})}}),800)),e.dragNodeProps.eventKey!==w||0!==v?(e.setState({dragOverNodeKey:E,dropPosition:b,dropLevelOffset:v,dropTargetKey:w,dropContainerKey:y,dropTargetPos:C,dropAllowed:x}),null==u||u({event:t,node:jn(n),expandedKeys:i})):e.resetDragState()):e.resetDragState()}else e.resetDragState()})),(0,k.A)((0,fo.A)(e),"onNodeDragOver",(function(t,n){var o=e.state,i=o.dragChildrenKeys,r=o.flattenNodes,s=o.keyEntities,a=o.expandedKeys,l=o.indent,c=e.props,u=c.onDragOver,d=c.allowDrop,h=c.direction;if(e.dragNodeProps){var p=Zn(t,e.dragNodeProps,n,l,e.dragStartMousePosition,d,r,s,a,h),m=p.dropPosition,g=p.dropLevelOffset,f=p.dropTargetKey,b=p.dropContainerKey,v=p.dropTargetPos,w=p.dropAllowed,y=p.dragOverNodeKey;!i.includes(f)&&w&&(e.dragNodeProps.eventKey===f&&0===g?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():m===e.state.dropPosition&&g===e.state.dropLevelOffset&&f===e.state.dropTargetKey&&b===e.state.dropContainerKey&&v===e.state.dropTargetPos&&w===e.state.dropAllowed&&y===e.state.dragOverNodeKey||e.setState({dropPosition:m,dropLevelOffset:g,dropTargetKey:f,dropContainerKey:b,dropTargetPos:v,dropAllowed:w,dragOverNodeKey:y}),null==u||u({event:t,node:jn(n)}))}})),(0,k.A)((0,fo.A)(e),"onNodeDragLeave",(function(t,n){e.currentMouseOverDroppableNodeKey!==n.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var o=e.props.onDragLeave;null==o||o({event:t,node:jn(n)})})),(0,k.A)((0,fo.A)(e),"onWindowDragEnd",(function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)})),(0,k.A)((0,fo.A)(e),"onNodeDragEnd",(function(t,n){var o=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==o||o({event:t,node:jn(n)}),e.dragNodeProps=null,window.removeEventListener("dragend",e.onWindowDragEnd)})),(0,k.A)((0,fo.A)(e),"onNodeDrop",(function(t,n){var o,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.state,s=r.dragChildrenKeys,a=r.dropPosition,l=r.dropTargetKey,c=r.dropTargetPos;if(r.dropAllowed){var u=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==l){var d=(0,A.A)((0,A.A)({},Bn(l,e.getTreeNodeRequiredProps())),{},{active:(null===(o=e.getActiveItem())||void 0===o?void 0:o.key)===l,data:On(e.state.keyEntities,l).node}),h=s.includes(l);(0,P.Ay)(!h,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=Xn(c),m={event:t,node:jn(d),dragNode:e.dragNodeProps?jn(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(s),dropToGap:0!==a,dropPosition:a+Number(p[p.length-1])};i||null==u||u(m),e.dragNodeProps=null}}})),(0,k.A)((0,fo.A)(e),"cleanDragState",(function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null})),(0,k.A)((0,fo.A)(e),"triggerExpandActionExpand",(function(t,n){var o=e.state,i=o.expandedKeys,r=o.flattenNodes,s=n.expanded,a=n.key;if(!(n.isLeaf||t.shiftKey||t.metaKey||t.ctrlKey)){var l=r.filter((function(e){return e.key===a}))[0],c=jn((0,A.A)((0,A.A)({},Bn(a,e.getTreeNodeRequiredProps())),{},{data:l.data}));e.setExpandedKeys(s?qn(i,a):Yn(i,a)),e.onNodeExpand(t,c)}})),(0,k.A)((0,fo.A)(e),"onNodeClick",(function(t,n){var o=e.props,i=o.onClick;"click"===o.expandAction&&e.triggerExpandActionExpand(t,n),null==i||i(t,n)})),(0,k.A)((0,fo.A)(e),"onNodeDoubleClick",(function(t,n){var o=e.props,i=o.onDoubleClick;"doubleClick"===o.expandAction&&e.triggerExpandActionExpand(t,n),null==i||i(t,n)})),(0,k.A)((0,fo.A)(e),"onNodeSelect",(function(t,n){var o=e.state.selectedKeys,i=e.state,r=i.keyEntities,s=i.fieldNames,a=e.props,l=a.onSelect,c=a.multiple,u=n.selected,d=n[s.key],h=!u,p=(o=h?c?Yn(o,d):[d]:qn(o,d)).map((function(e){var t=On(r,e);return t?t.node:null})).filter(Boolean);e.setUncontrolledState({selectedKeys:o}),null==l||l(o,{event:"select",selected:h,node:n,selectedNodes:p,nativeEvent:t.nativeEvent})})),(0,k.A)((0,fo.A)(e),"onNodeCheck",(function(t,n,o){var i,r=e.state,s=r.keyEntities,a=r.checkedKeys,l=r.halfCheckedKeys,c=e.props,u=c.checkStrictly,d=c.onCheck,h=n.key,p={event:"check",node:n,checked:o,nativeEvent:t.nativeEvent};if(u){var m=o?Yn(a,h):qn(a,h);i={checked:m,halfChecked:qn(l,h)},p.checkedNodes=m.map((function(e){return On(s,e)})).filter(Boolean).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:m})}else{var g=ro([].concat((0,tt.A)(a),[h]),!0,s),f=g.checkedKeys,b=g.halfCheckedKeys;if(!o){var v=new Set(f);v.delete(h);var w=ro(Array.from(v),{checked:!1,halfCheckedKeys:b},s);f=w.checkedKeys,b=w.halfCheckedKeys}i=f,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=b,f.forEach((function(e){var t=On(s,e);if(t){var n=t.node,o=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:o})}})),e.setUncontrolledState({checkedKeys:f},!1,{halfCheckedKeys:b})}null==d||d(i,p)})),(0,k.A)((0,fo.A)(e),"onNodeLoad",(function(t){var n,o=t.key,i=On(e.state.keyEntities,o);if(null==i||null===(n=i.children)||void 0===n||!n.length){var r=new Promise((function(n,i){e.setState((function(r){var s=r.loadedKeys,a=void 0===s?[]:s,l=r.loadingKeys,c=void 0===l?[]:l,u=e.props,d=u.loadData,h=u.onLoad;return!d||a.includes(o)||c.includes(o)?null:(d(t).then((function(){var i=Yn(e.state.loadedKeys,o);null==h||h(i,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:i}),e.setState((function(e){return{loadingKeys:qn(e.loadingKeys,o)}})),n()})).catch((function(t){if(e.setState((function(e){return{loadingKeys:qn(e.loadingKeys,o)}})),e.loadingRetryTimes[o]=(e.loadingRetryTimes[o]||0)+1,e.loadingRetryTimes[o]>=10){var r=e.state.loadedKeys;(0,P.Ay)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:Yn(r,o)}),n()}i(t)})),{loadingKeys:Yn(c,o)})}))}));return r.catch((function(){})),r}})),(0,k.A)((0,fo.A)(e),"onNodeMouseEnter",(function(t,n){var o=e.props.onMouseEnter;null==o||o({event:t,node:n})})),(0,k.A)((0,fo.A)(e),"onNodeMouseLeave",(function(t,n){var o=e.props.onMouseLeave;null==o||o({event:t,node:n})})),(0,k.A)((0,fo.A)(e),"onNodeContextMenu",(function(t,n){var o=e.props.onRightClick;o&&(t.preventDefault(),o({event:t,node:n}))})),(0,k.A)((0,fo.A)(e),"onFocus",(function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];null==t||t.apply(void 0,o)})),(0,k.A)((0,fo.A)(e),"onBlur",(function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];null==t||t.apply(void 0,o)})),(0,k.A)((0,fo.A)(e),"getTreeNodeRequiredProps",(function(){var t=e.state;return{expandedKeys:t.expandedKeys||[],selectedKeys:t.selectedKeys||[],loadedKeys:t.loadedKeys||[],loadingKeys:t.loadingKeys||[],checkedKeys:t.checkedKeys||[],halfCheckedKeys:t.halfCheckedKeys||[],dragOverNodeKey:t.dragOverNodeKey,dropPosition:t.dropPosition,keyEntities:t.keyEntities}})),(0,k.A)((0,fo.A)(e),"setExpandedKeys",(function(t){var n=e.state,o=zn(n.treeData,t,n.fieldNames);e.setUncontrolledState({expandedKeys:t,flattenNodes:o},!0)})),(0,k.A)((0,fo.A)(e),"onNodeExpand",(function(t,n){var o=e.state.expandedKeys,i=e.state,r=i.listChanging,s=i.fieldNames,a=e.props,l=a.onExpand,c=a.loadData,u=n.expanded,d=n[s.key];if(!r){var h=o.includes(d),p=!u;if((0,P.Ay)(u&&h||!u&&!h,"Expand state not sync with index check"),o=p?Yn(o,d):qn(o,d),e.setExpandedKeys(o),null==l||l(o,{node:n,expanded:p,nativeEvent:t.nativeEvent}),p&&c){var m=e.onNodeLoad(n);m&&m.then((function(){var t=zn(e.state.treeData,o,s);e.setUncontrolledState({flattenNodes:t})})).catch((function(){var t=qn(e.state.expandedKeys,d);e.setExpandedKeys(t)}))}}})),(0,k.A)((0,fo.A)(e),"onListChangeStart",(function(){e.setUncontrolledState({listChanging:!0})})),(0,k.A)((0,fo.A)(e),"onListChangeEnd",(function(){setTimeout((function(){e.setUncontrolledState({listChanging:!1})}))})),(0,k.A)((0,fo.A)(e),"onActiveChange",(function(t){var n=e.state.activeKey,o=e.props,i=o.onActiveChange,r=o.itemScrollOffset,s=void 0===r?0:r;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t,offset:s}),null==i||i(t))})),(0,k.A)((0,fo.A)(e),"getActiveItem",(function(){var t=e.state,n=t.activeKey,o=t.flattenNodes;return null===n?null:o.find((function(e){return e.key===n}))||null})),(0,k.A)((0,fo.A)(e),"offsetActiveKey",(function(t){var n=e.state,o=n.flattenNodes,i=n.activeKey,r=o.findIndex((function(e){return e.key===i}));-1===r&&t<0&&(r=o.length);var s=o[r=(r+t+o.length)%o.length];if(s){var a=s.key;e.onActiveChange(a)}else e.onActiveChange(null)})),(0,k.A)((0,fo.A)(e),"onKeyDown",(function(t){var n=e.state,o=n.activeKey,i=n.expandedKeys,r=n.checkedKeys,s=n.fieldNames,a=e.props,l=a.onKeyDown,c=a.checkable,u=a.selectable;switch(t.which){case Ls.UP:e.offsetActiveKey(-1),t.preventDefault();break;case Ls.DOWN:e.offsetActiveKey(1),t.preventDefault()}var d=e.getActiveItem();if(d&&d.data){var h=e.getTreeNodeRequiredProps(),p=!1===d.data.isLeaf||!!(d.data[s.children]||[]).length,m=jn((0,A.A)((0,A.A)({},Bn(o,h)),{},{data:d.data,active:!0}));switch(t.which){case Ls.LEFT:p&&i.includes(o)?e.onNodeExpand({},m):d.parent&&e.onActiveChange(d.parent.key),t.preventDefault();break;case Ls.RIGHT:p&&!i.includes(o)?e.onNodeExpand({},m):d.children&&d.children.length&&e.onActiveChange(d.children[0].key),t.preventDefault();break;case Ls.ENTER:case Ls.SPACE:!c||m.disabled||!1===m.checkable||m.disableCheckbox?c||!u||m.disabled||!1===m.selectable||e.onNodeSelect({},m):e.onNodeCheck({},m,!r.includes(o))}}null==l||l(t)})),(0,k.A)((0,fo.A)(e),"setUncontrolledState",(function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var i=!1,r=!0,s={};Object.keys(t).forEach((function(n){e.props.hasOwnProperty(n)?r=!1:(i=!0,s[n]=t[n])})),!i||n&&!r||e.setState((0,A.A)((0,A.A)({},s),o))}})),(0,k.A)((0,fo.A)(e),"scrollTo",(function(t){e.listRef.current.scrollTo(t)})),e}return(0,ye.A)(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset,o=void 0===n?0:n;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:o}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t=this.state,n=t.focused,i=t.flattenNodes,r=t.keyEntities,s=t.draggingNodeKey,a=t.activeKey,l=t.dropLevelOffset,c=t.dropContainerKey,u=t.dropTargetKey,d=t.dropPosition,h=t.dragOverNodeKey,p=t.indent,m=this.props,f=m.prefixCls,b=m.className,v=m.style,w=m.showLine,y=m.focusable,C=m.tabIndex,x=void 0===C?0:C,E=m.selectable,A=m.showIcon,R=m.icon,T=m.switcherIcon,I=m.draggable,P=m.checkable,O=m.checkStrictly,D=m.disabled,N=m.motion,H=m.loadData,L=m.filterTreeNode,$=m.height,_=m.itemHeight,z=m.scrollWidth,F=m.virtual,B=m.titleRender,j=m.dropIndicatorRender,W=m.onContextMenu,V=m.onScroll,G=m.direction,K=m.rootClassName,U=m.rootStyle,q=_e(this.props,{aria:!0,data:!0});I&&(e="object"===(0,S.A)(I)?I:"function"==typeof I?{nodeDraggable:I}:{});var Y={prefixCls:f,selectable:E,showIcon:A,icon:R,switcherIcon:T,draggable:e,draggingNodeKey:s,checkable:P,checkStrictly:O,disabled:D,keyEntities:r,dropLevelOffset:l,dropContainerKey:c,dropTargetKey:u,dropPosition:d,dragOverNodeKey:h,indent:p,direction:G,dropIndicatorRender:j,loadData:H,filterTreeNode:L,titleRender:B,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return o.createElement(Mn.Provider,{value:Y},o.createElement("div",{className:M()(f,b,K,(0,k.A)((0,k.A)((0,k.A)({},"".concat(f,"-show-line"),w),"".concat(f,"-focused"),n),"".concat(f,"-active-focused"),null!==a)),style:U},o.createElement(Ef,(0,g.A)({ref:this.listRef,prefixCls:f,style:v,data:i,disabled:D,selectable:E,checkable:!!P,motion:N,dragging:null!==s,height:$,itemHeight:_,virtual:F,focusable:y,focused:n,tabIndex:x,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:W,onScroll:V,scrollWidth:z},this.getTreeNodeRequiredProps(),q))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,o=t.prevProps,i={prevProps:e};function r(t){return!o&&e.hasOwnProperty(t)||o&&o[t]!==e[t]}var s=t.fieldNames;if(r("fieldNames")&&(s=$n(e.fieldNames),i.fieldNames=s),r("treeData")?n=e.treeData:r("children")&&((0,P.Ay)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=_n(e.children)),n){i.treeData=n;var a=Fn(n,{fieldNames:s});i.keyEntities=(0,A.A)((0,k.A)({},ff,vf),a.keyEntities)}var l,c=i.keyEntities||t.keyEntities;if(r("expandedKeys")||o&&r("autoExpandParent"))i.expandedKeys=e.autoExpandParent||!o&&e.defaultExpandParent?no(e.expandedKeys,c):e.expandedKeys;else if(!o&&e.defaultExpandAll){var u=(0,A.A)({},c);delete u[ff];var d=[];Object.keys(u).forEach((function(e){var t=u[e];t.children&&t.children.length&&d.push(t.key)})),i.expandedKeys=d}else!o&&e.defaultExpandedKeys&&(i.expandedKeys=e.autoExpandParent||e.defaultExpandParent?no(e.defaultExpandedKeys,c):e.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,n||i.expandedKeys){var h=zn(n||t.treeData,i.expandedKeys||t.expandedKeys,s);i.flattenNodes=h}if(e.selectable&&(r("selectedKeys")?i.selectedKeys=eo(e.selectedKeys,e):!o&&e.defaultSelectedKeys&&(i.selectedKeys=eo(e.defaultSelectedKeys,e))),e.checkable&&(r("checkedKeys")?l=to(e.checkedKeys)||{}:!o&&e.defaultCheckedKeys?l=to(e.defaultCheckedKeys)||{}:n&&(l=to(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),l)){var p=l,m=p.checkedKeys,g=void 0===m?[]:m,f=p.halfCheckedKeys,b=void 0===f?[]:f;if(!e.checkStrictly){var v=ro(g,!0,c);g=v.checkedKeys,b=v.halfCheckedKeys}i.checkedKeys=g,i.halfCheckedKeys=b}return r("loadedKeys")&&(i.loadedKeys=e.loadedKeys),i}}]),n}(o.Component);(0,k.A)(Sf,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var t=e.dropPosition,n=e.dropLevelOffset,i=e.indent,r={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:r.top=0,r.left=-n*i;break;case 1:r.bottom=0,r.left=-n*i;break;case 0:r.bottom=0,r.left=i}return o.createElement("div",{style:r})},allowDrop:function(){return!0},expandAction:!1}),(0,k.A)(Sf,"TreeNode",Un);const Af=Sf,kf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};var Rf=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:kf}))};const Mf=o.forwardRef(Rf),Tf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};var If=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Tf}))};const Pf=o.forwardRef(If),Of={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};var Df=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Of}))};const Nf=o.forwardRef(Df),Hf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};var Lf=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Hf}))};const $f=o.forwardRef(Lf),_f=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:o,motionDurationMid:i,borderRadius:r,controlItemBgHover:s})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${i}`,content:'""',borderRadius:r},"&:hover:before":{background:s}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{[`${e}-switcher, ${e}-draggable-icon`]:{color:o},[`${e}-node-content-wrapper`]:{color:o,background:"transparent","&:before, &:hover:before":{background:n}}}}}),zf=new go.Mo("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Ff=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),Bf=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${(0,go.zA)(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),jf=(e,t)=>{const{treeCls:n,treeNodeCls:o,treeNodePadding:i,titleHeight:r,indentSize:s,nodeSelectedBg:a,nodeHoverBg:l,colorTextQuaternary:c,controlItemBgActiveDisabled:u}=t;return{[n]:Object.assign(Object.assign({},(0,Do.dF)(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${n}-active-focused)`]:Object.assign({},(0,Do.jk)(t)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${o}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:zf,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[o]:{display:"flex",alignItems:"flex-start",marginBottom:i,lineHeight:(0,go.zA)(r),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:i},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${n}-checkbox-disabled + ${n}-node-selected,&${o}-disabled${o}-selected ${n}-node-content-wrapper`]:{backgroundColor:u},[`${n}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${o}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${o}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:500},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:r,textAlign:"center",visibility:"visible",color:c},[`&${o}-disabled ${n}-draggable-icon`]:{visibility:"hidden"}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:s}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(r).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:Object.assign(Object.assign({},Ff(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:r,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:r,height:r,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(r).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(r).div(2).equal()).mul(.8).equal(),height:t.calc(r).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:r,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},Bf(e,t)),{"&:hover":{backgroundColor:l},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:a},[`${n}-iconEle`]:{display:"inline-block",width:r,height:r,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${o}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(r).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${o}-leaf-last ${n}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${(0,go.zA)(t.calc(r).div(2).equal())} !important`}})}},Wf=(e,t,n=!0)=>{const o=`.${e}`,i=`${o}-treenode`,r=t.calc(t.paddingXS).div(2).equal(),s=Ro(t,{treeCls:o,treeNodeCls:i,treeNodePadding:r});return[jf(e,s),n&&_f(s)].filter(Boolean)},Vf=Ho("Tree",((e,{prefixCls:t})=>[{[e.componentCls]:Fr(`${t}-checkbox`,e)},Wf(t,e),Xc(e)]),(e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},(e=>{const{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:o}=e;return{titleHeight:t,indentSize:t,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:o,nodeSelectedColor:e.colorText}})(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})})),Gf=function(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:i,indent:r,direction:s="ltr"}=e,a="ltr"===s?"left":"right",l="ltr"===s?"right":"left",c={[a]:-n*r+4,[l]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[a]=r+4}return o.createElement("div",{style:c,className:`${i}-drop-indicator`})},Kf={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};var Uf=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Kf}))};const qf=o.forwardRef(Uf),Yf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};var Xf=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Yf}))};const Qf=o.forwardRef(Xf),Jf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};var Zf=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:Jf}))};const eb=o.forwardRef(Zf),tb=e=>{const{prefixCls:t,switcherIcon:n,treeNodeProps:i,showLine:r,switcherLoadingIcon:s}=e,{isLeaf:a,expanded:l,loading:c}=i;if(c)return o.isValidElement(s)?s:o.createElement(Ku,{className:`${t}-switcher-loading-icon`});let u;if(r&&"object"==typeof r&&(u=r.showLeafIcon),a){if(!r)return null;if("boolean"!=typeof u&&u){const e="function"==typeof u?u(i):u,n=`${t}-switcher-line-custom-icon`;return o.isValidElement(e)?mo(e,{className:M()(e.props.className||"",n)}):e}return u?o.createElement(Mf,{className:`${t}-switcher-line-icon`}):o.createElement("span",{className:`${t}-switcher-leaf-line`})}const d=`${t}-switcher-icon`,h="function"==typeof n?n(i):n;return o.isValidElement(h)?mo(h,{className:M()(h.props.className||"",d)}):void 0!==h?h:r?l?o.createElement(Qf,{className:`${t}-switcher-line-icon`}):o.createElement(eb,{className:`${t}-switcher-line-icon`}):o.createElement(qf,{className:d})},nb=o.forwardRef(((e,t)=>{var n;const{getPrefixCls:i,direction:r,virtual:s,tree:a}=o.useContext(ho.QO),{prefixCls:l,className:c,showIcon:u=!1,showLine:d,switcherIcon:h,switcherLoadingIcon:p,blockNode:m=!1,children:g,checkable:f=!1,selectable:b=!0,draggable:v,motion:w,style:y}=e,C=i("tree",l),x=i(),E=null!=w?w:Object.assign(Object.assign({},tc(x)),{motionAppear:!1}),S=Object.assign(Object.assign({},e),{checkable:f,selectable:b,showIcon:u,motion:E,blockNode:m,showLine:Boolean(d),dropIndicatorRender:Gf}),[A,k,R]=Vf(C),[,T]=(0,No.Ay)(),I=T.paddingXS/2+((null===(n=T.Tree)||void 0===n?void 0:n.titleHeight)||T.controlHeightSM),P=o.useMemo((()=>{if(!v)return!1;let e={};switch(typeof v){case"function":e.nodeDraggable=v;break;case"object":e=Object.assign({},v)}return!1!==e.icon&&(e.icon=e.icon||o.createElement($f,null)),e}),[v]);return A(o.createElement(Af,Object.assign({itemHeight:I,ref:t,virtual:s},S,{style:Object.assign(Object.assign({},null==a?void 0:a.style),y),prefixCls:C,className:M()({[`${C}-icon-hide`]:!u,[`${C}-block-node`]:m,[`${C}-unselectable`]:!b,[`${C}-rtl`]:"rtl"===r},null==a?void 0:a.className,c,k,R),direction:r,checkable:f?o.createElement("span",{className:`${C}-checkbox-inner`}):f,selectable:b,switcherIcon:e=>o.createElement(tb,{prefixCls:C,switcherIcon:h,switcherLoadingIcon:p,treeNodeProps:e,showLine:d}),draggable:P}),g))})),ob=nb;function ib(e,t,n){const{key:o,children:i}=n;e.forEach((function(e){const r=e[o],s=e[i];!1!==t(r,e)&&ib(s||[],t,n)}))}function rb(e,t,n){const o=(0,tt.A)(t),i=[];return ib(e,((e,t)=>{const n=o.indexOf(e);return-1!==n&&(i.push(t),o.splice(n,1)),!!o.length}),$n(n)),i}var sb=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};function ab(e){const{isLeaf:t,expanded:n}=e;return t?o.createElement(Mf,null):n?o.createElement(Pf,null):o.createElement(Nf,null)}function lb({treeData:e,children:t}){return e||_n(t)}const cb=(e,t)=>{var{defaultExpandAll:n,defaultExpandParent:i,defaultExpandedKeys:r}=e,s=sb(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const a=o.useRef(null),l=o.useRef(null),[c,u]=o.useState(s.selectedKeys||s.defaultSelectedKeys||[]),[d,h]=o.useState((()=>(()=>{const{keyEntities:e}=Fn(lb(s));let t;return t=n?Object.keys(e):i?no(s.expandedKeys||r||[],e):s.expandedKeys||r||[],t})()));o.useEffect((()=>{"selectedKeys"in s&&u(s.selectedKeys)}),[s.selectedKeys]),o.useEffect((()=>{"expandedKeys"in s&&h(s.expandedKeys)}),[s.expandedKeys]);const{getPrefixCls:p,direction:m}=o.useContext(ho.QO),{prefixCls:g,className:f,showIcon:b=!0,expandAction:v="click"}=s,w=sb(s,["prefixCls","className","showIcon","expandAction"]),y=p("tree",g),C=M()(`${y}-directory`,{[`${y}-directory-rtl`]:"rtl"===m},f);return o.createElement(ob,Object.assign({icon:ab,ref:t,blockNode:!0},w,{showIcon:b,expandAction:v,prefixCls:y,className:C,expandedKeys:d,selectedKeys:c,onSelect:(e,t)=>{var n;const{multiple:o,fieldNames:i}=s,{node:r,nativeEvent:c}=t,{key:h=""}=r,p=lb(s),m=Object.assign(Object.assign({},t),{selected:!0}),g=(null==c?void 0:c.ctrlKey)||(null==c?void 0:c.metaKey),f=null==c?void 0:c.shiftKey;let b;o&&g?(b=e,a.current=h,l.current=b,m.selectedNodes=rb(p,b,i)):o&&f?(b=Array.from(new Set([].concat((0,tt.A)(l.current||[]),(0,tt.A)(function({treeData:e,expandedKeys:t,startKey:n,endKey:o,fieldNames:i}){const r=[];let s=0;return n&&n===o?[n]:n&&o?(ib(e,(e=>{if(2===s)return!1;if(function(e){return e===n||e===o}(e)){if(r.push(e),0===s)s=1;else if(1===s)return s=2,!1}else 1===s&&r.push(e);return t.includes(e)}),$n(i)),r):[]}({treeData:p,expandedKeys:d,startKey:h,endKey:a.current,fieldNames:i}))))),m.selectedNodes=rb(p,b,i)):(b=[h],a.current=h,l.current=b,m.selectedNodes=rb(p,b,i)),null===(n=s.onSelect)||void 0===n||n.call(s,b,m),"selectedKeys"in s||u(b)},onExpand:(e,t)=>{var n;return"expandedKeys"in s||h(e),null===(n=s.onExpand)||void 0===n?void 0:n.call(s,e,t)}}))},ub=o.forwardRef(cb),db=ob;db.DirectoryTree=ub,db.TreeNode=Un;const hb=db;function pb(e,t,n){var o=t.cloneNode(!0),i=Object.create(e,{target:{value:o},currentTarget:{value:o}});return o.value=n,"number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd&&(o.selectionStart=t.selectionStart,o.selectionEnd=t.selectionEnd),o.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function mb(e,t,n,o){if(n){var i=t;"click"!==t.type?"file"===e.type||void 0===o?n(i):n(i=pb(t,e,o)):n(i=pb(t,e,""))}}var gb=o.forwardRef((function(e,t){var n,i,r,s=e.inputElement,a=e.children,l=e.prefixCls,c=e.prefix,u=e.suffix,d=e.addonBefore,h=e.addonAfter,p=e.className,m=e.style,f=e.disabled,b=e.readOnly,v=e.focused,w=e.triggerFocus,y=e.allowClear,C=e.value,x=e.handleReset,E=e.hidden,R=e.classes,T=e.classNames,I=e.dataAttrs,P=e.styles,O=e.components,D=e.onClear,N=null!=a?a:s,H=(null==O?void 0:O.affixWrapper)||"span",L=(null==O?void 0:O.groupWrapper)||"span",$=(null==O?void 0:O.wrapper)||"span",_=(null==O?void 0:O.groupAddon)||"span",z=(0,o.useRef)(null),F=function(e){return!!(e.prefix||e.suffix||e.allowClear)}(e),B=(0,o.cloneElement)(N,{value:C,className:M()(null===(n=N.props)||void 0===n?void 0:n.className,!F&&(null==T?void 0:T.variant))||null}),j=(0,o.useRef)(null);if(o.useImperativeHandle(t,(function(){return{nativeElement:j.current||z.current}})),F){var W=null;if(y){var V=!f&&!b&&C,G="".concat(l,"-clear-icon"),K="object"===(0,S.A)(y)&&null!=y&&y.clearIcon?y.clearIcon:"✖";W=o.createElement("button",{type:"button",tabIndex:-1,onClick:function(e){null==x||x(e),null==D||D()},onMouseDown:function(e){return e.preventDefault()},className:M()(G,(0,k.A)((0,k.A)({},"".concat(G,"-hidden"),!V),"".concat(G,"-has-suffix"),!!u))},K)}var U="".concat(l,"-affix-wrapper"),q=M()(U,(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({},"".concat(l,"-disabled"),f),"".concat(U,"-disabled"),f),"".concat(U,"-focused"),v),"".concat(U,"-readonly"),b),"".concat(U,"-input-with-clear-btn"),u&&y&&C),null==R?void 0:R.affixWrapper,null==T?void 0:T.affixWrapper,null==T?void 0:T.variant),Y=(u||y)&&o.createElement("span",{className:M()("".concat(l,"-suffix"),null==T?void 0:T.suffix),style:null==P?void 0:P.suffix},W,u);B=o.createElement(H,(0,g.A)({className:q,style:null==P?void 0:P.affixWrapper,onClick:function(e){var t;null!==(t=z.current)&&void 0!==t&&t.contains(e.target)&&(null==w||w())}},null==I?void 0:I.affixWrapper,{ref:z}),c&&o.createElement("span",{className:M()("".concat(l,"-prefix"),null==T?void 0:T.prefix),style:null==P?void 0:P.prefix},c),B,Y)}if(function(e){return!(!e.addonBefore&&!e.addonAfter)}(e)){var X="".concat(l,"-group"),Q="".concat(X,"-addon"),J="".concat(X,"-wrapper"),Z=M()("".concat(l,"-wrapper"),X,null==R?void 0:R.wrapper,null==T?void 0:T.wrapper),ee=M()(J,(0,k.A)({},"".concat(J,"-disabled"),f),null==R?void 0:R.group,null==T?void 0:T.groupWrapper);B=o.createElement(L,{className:ee,ref:j},o.createElement($,{className:Z},d&&o.createElement(_,{className:Q},d),B,h&&o.createElement(_,{className:Q},h)))}return o.cloneElement(B,{className:M()(null===(i=B.props)||void 0===i?void 0:i.className,p)||null,style:(0,A.A)((0,A.A)({},null===(r=B.props)||void 0===r?void 0:r.style),m),hidden:E})}));const fb=gb;var bb=["show"],vb=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],wb=(0,o.forwardRef)((function(e,t){var n=e.autoComplete,i=e.onChange,r=e.onFocus,s=e.onBlur,l=e.onPressEnter,c=e.onKeyDown,u=e.onKeyUp,d=e.prefixCls,h=void 0===d?"rc-input":d,p=e.disabled,m=e.htmlSize,f=e.className,b=e.maxLength,v=e.suffix,w=e.showCount,y=e.count,C=e.type,x=void 0===C?"text":C,E=e.classes,R=e.classNames,T=e.styles,I=e.onCompositionStart,P=e.onCompositionEnd,O=(0,F.A)(e,vb),D=(0,o.useState)(!1),N=(0,a.A)(D,2),H=N[0],L=N[1],$=(0,o.useRef)(!1),_=(0,o.useRef)(!1),z=(0,o.useRef)(null),B=(0,o.useRef)(null),j=function(e){z.current&&function(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var o=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}}(z.current,e)},W=(0,so.A)(e.defaultValue,{value:e.value}),V=(0,a.A)(W,2),G=V[0],K=V[1],U=null==G?"":String(G),q=(0,o.useState)(null),Y=(0,a.A)(q,2),X=Y[0],Q=Y[1],J=function(e,t){return o.useMemo((function(){var n={};t&&(n.show="object"===(0,S.A)(t)&&t.formatter?t.formatter:!!t);var o=n=(0,A.A)((0,A.A)({},n),e),i=o.show,r=(0,F.A)(o,bb);return(0,A.A)((0,A.A)({},r),{},{show:!!i,showFormatter:"function"==typeof i?i:void 0,strategy:r.strategy||function(e){return e.length}})}),[e,t])}(y,w),Z=J.max||b,ee=J.strategy(U),te=!!Z&&ee>Z;(0,o.useImperativeHandle)(t,(function(){var e;return{focus:j,blur:function(){var e;null===(e=z.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,n){var o;null===(o=z.current)||void 0===o||o.setSelectionRange(e,t,n)},select:function(){var e;null===(e=z.current)||void 0===e||e.select()},input:z.current,nativeElement:(null===(e=B.current)||void 0===e?void 0:e.nativeElement)||z.current}})),(0,o.useEffect)((function(){_.current&&(_.current=!1),L((function(e){return(!e||!p)&&e}))}),[p]);var ne=function(e,t,n){var o,r,s=t;if(!$.current&&J.exceedFormatter&&J.max&&J.strategy(t)>J.max)t!==(s=J.exceedFormatter(t,{max:J.max}))&&Q([(null===(o=z.current)||void 0===o?void 0:o.selectionStart)||0,(null===(r=z.current)||void 0===r?void 0:r.selectionEnd)||0]);else if("compositionEnd"===n.source)return;K(s),z.current&&mb(z.current,e,i,s)};(0,o.useEffect)((function(){var e;X&&(null===(e=z.current)||void 0===e||e.setSelectionRange.apply(e,(0,tt.A)(X)))}),[X]);var oe,ie=te&&"".concat(h,"-out-of-range");return o.createElement(fb,(0,g.A)({},O,{prefixCls:h,className:M()(f,ie),handleReset:function(e){K(""),j(),z.current&&mb(z.current,e,i)},value:U,focused:H,triggerFocus:j,suffix:function(){var e=Number(Z)>0;if(v||J.show){var t=J.showFormatter?J.showFormatter({value:U,count:ee,maxLength:Z}):"".concat(ee).concat(e?" / ".concat(Z):"");return o.createElement(o.Fragment,null,J.show&&o.createElement("span",{className:M()("".concat(h,"-show-count-suffix"),(0,k.A)({},"".concat(h,"-show-count-has-suffix"),!!v),null==R?void 0:R.count),style:(0,A.A)({},null==T?void 0:T.count)},t),v)}return null}(),disabled:p,classes:E,classNames:R,styles:T,ref:B}),(oe=Dn(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]),o.createElement("input",(0,g.A)({autoComplete:n},oe,{onChange:function(e){ne(e,e.target.value,{source:"change"})},onFocus:function(e){L(!0),null==r||r(e)},onBlur:function(e){_.current&&(_.current=!1),L(!1),null==s||s(e)},onKeyDown:function(e){l&&"Enter"===e.key&&!_.current&&(_.current=!0,l(e)),null==c||c(e)},onKeyUp:function(e){"Enter"===e.key&&(_.current=!1),null==u||u(e)},className:M()(h,(0,k.A)({},"".concat(h,"-disabled"),p),null==R?void 0:R.input),style:null==T?void 0:T.input,ref:z,size:m,type:x,onCompositionStart:function(e){$.current=!0,null==I||I(e)},onCompositionEnd:function(e){$.current=!1,ne(e,e.currentTarget.value,{source:"compositionEnd"}),null==P||P(e)}}))))}));const yb=wb;const Cb=(0,o.forwardRef)(((e,t)=>{const{prefixCls:n,bordered:i=!0,status:r,size:s,disabled:a,onBlur:l,onFocus:c,suffix:u,allowClear:d,addonAfter:h,addonBefore:p,className:m,style:g,styles:b,rootClassName:v,onChange:w,classNames:y,variant:C}=e,x=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:E,direction:S,allowClear:A,autoComplete:k,className:R,style:T,classNames:I,styles:P}=(0,ho.TP)("input"),O=E("input",n),D=(0,o.useRef)(null),N=vi(O),[H,L,$]=Ag(O,v),[_]=kg(O,N),{compactSize:z,compactItemClassnames:F}=yc(O,S),B=pc((e=>{var t;return null!==(t=null!=s?s:z)&&void 0!==t?t:e})),j=o.useContext(bi.A),W=null!=a?a:j,{status:V,hasFeedback:G,feedbackIcon:K}=(0,o.useContext)(Hr),U=am(V,r),q=function(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}(e)||!!G;(0,o.useRef)(q);const Y=function(e){const t=(0,o.useRef)([]),n=()=>{t.current.push(setTimeout((()=>{var t,n,o,i;(null===(t=e.current)||void 0===t?void 0:t.input)&&"password"===(null===(n=e.current)||void 0===n?void 0:n.input.getAttribute("type"))&&(null===(o=e.current)||void 0===o?void 0:o.input.hasAttribute("value"))&&(null===(i=e.current)||void 0===i||i.input.removeAttribute("value"))})))};return(0,o.useEffect)((()=>(n(),()=>t.current.forEach((e=>{e&&clearTimeout(e)})))),[]),n}(D),X=(G||u)&&o.createElement(o.Fragment,null,u,G&&K),Q=(e=>{let t;return"object"==typeof e&&(null==e?void 0:e.clearIcon)?t=e:e&&(t={clearIcon:o.createElement(zm,null)}),t})(null!=d?d:A),[J,Z]=lm("input",C,i);return H(_(o.createElement(yb,Object.assign({ref:(0,f.K4)(t,D),prefixCls:O,autoComplete:k},x,{disabled:W,onBlur:e=>{Y(),null==l||l(e)},onFocus:e=>{Y(),null==c||c(e)},style:Object.assign(Object.assign({},T),g),styles:Object.assign(Object.assign({},P),b),suffix:X,allowClear:Q,className:M()(m,v,$,N,F,R),onChange:e=>{Y(),null==w||w(e)},addonBefore:p&&o.createElement(Ec,{form:!0,space:!0},p),addonAfter:h&&o.createElement(Ec,{form:!0,space:!0},h),classNames:Object.assign(Object.assign(Object.assign({},y),I),{input:M()({[`${O}-sm`]:"small"===B,[`${O}-lg`]:"large"===B,[`${O}-rtl`]:"rtl"===S},null==y?void 0:y.input,I.input,L),variant:M()({[`${O}-${J}`]:Z},sm(O,U)),affixWrapper:M()({[`${O}-affix-wrapper-sm`]:"small"===B,[`${O}-affix-wrapper-lg`]:"large"===B,[`${O}-affix-wrapper-rtl`]:"rtl"===S},L),wrapper:M()({[`${O}-group-rtl`]:"rtl"===S},L),groupWrapper:M()({[`${O}-group-wrapper-sm`]:"small"===B,[`${O}-group-wrapper-lg`]:"large"===B,[`${O}-group-wrapper-rtl`]:"rtl"===S,[`${O}-group-wrapper-${J}`]:Z},sm(`${O}-group-wrapper`,U,G),L)})}))))})),xb=Cb,Eb=e=>{const{value:t,filterSearch:n,tablePrefixCls:i,locale:r,onChange:s}=e;return n?o.createElement("div",{className:`${i}-filter-dropdown-search`},o.createElement(xb,{prefix:o.createElement(Gm,null),placeholder:r.filterSearchPlaceholder,onChange:s,value:t,htmlSize:1,className:`${i}-filter-dropdown-search-input`})):null},Sb=e=>{const{keyCode:t}=e;t===Ls.ENTER&&e.stopPropagation()},Ab=o.forwardRef(((e,t)=>o.createElement("div",{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:Sb,ref:t},e.children)));function kb(e){let t=[];return(e||[]).forEach((({value:e,children:n})=>{t.push(e),n&&(t=[].concat((0,tt.A)(t),(0,tt.A)(kb(n))))})),t}function Rb(e,t){return("string"==typeof t||"number"==typeof t)&&(null==t?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()))}function Mb({filters:e,prefixCls:t,filteredKeys:n,filterMultiple:i,searchValue:r,filterSearch:s}){return e.map(((e,a)=>{const l=String(e.value);if(e.children)return{key:l||a,label:e.text,popupClassName:`${t}-dropdown-submenu`,children:Mb({filters:e.children,prefixCls:t,filteredKeys:n,filterMultiple:i,searchValue:r,filterSearch:s})};const c=i?qr:xh,u={key:void 0!==e.value?l:a,label:o.createElement(o.Fragment,null,o.createElement(c,{checked:n.includes(l)}),o.createElement("span",null,e.text))};return r.trim()?"function"==typeof s?s(r,e)?u:null:Rb(r,e.text)?u:null:u}))}function Tb(e){return e||[]}const Ib=e=>{var t,n,i,r;const{tablePrefixCls:s,prefixCls:a,column:l,dropdownPrefixCls:c,columnKey:d,filterOnClose:h,filterMultiple:p,filterMode:m="menu",filterSearch:g=!1,filterState:f,triggerFilter:b,locale:v,children:w,getPopupContainer:y,rootClassName:C}=e,{filterResetToDefaultFilteredValue:x,defaultFilteredValue:E,filterDropdownProps:S={},filterDropdownOpen:A,filterDropdownVisible:k,onFilterDropdownVisibleChange:R,onFilterDropdownOpenChange:T}=l,[I,P]=o.useState(!1),O=!(!f||!(null===(t=f.filteredKeys)||void 0===t?void 0:t.length)&&!f.forceFiltered),D=e=>{var t;P(e),null===(t=S.onOpenChange)||void 0===t||t.call(S,e),null==T||T(e),null==R||R(e)},N=null!==(r=null!==(i=null!==(n=S.open)&&void 0!==n?n:A)&&void 0!==i?i:k)&&void 0!==r?r:I,H=null==f?void 0:f.filteredKeys,[L,$]=function(e){const t=o.useRef(e),n=jh();return[()=>t.current,e=>{t.current=e,n()}]}(Tb(H)),_=({selectedKeys:e})=>{$(e)},z=(e,{node:t,checked:n})=>{_(p?{selectedKeys:e}:{selectedKeys:n&&t.key?[t.key]:[]})};o.useEffect((()=>{I&&_({selectedKeys:Tb(H)})}),[H]);const[F,B]=o.useState([]),j=e=>{B(e)},[W,V]=o.useState(""),G=e=>{const{value:t}=e.target;V(t)};o.useEffect((()=>{I||V("")}),[I]);const K=e=>{const t=(null==e?void 0:e.length)?e:null;return null!==t||f&&f.filteredKeys?(0,u.A)(t,null==f?void 0:f.filteredKeys,!0)?null:void b({column:l,key:d,filteredKeys:t}):null},U=()=>{D(!1),K(L())},q=({confirm:e,closeDropdown:t}={confirm:!1,closeDropdown:!1})=>{e&&K([]),t&&D(!1),V(""),$(x?(E||[]).map((e=>String(e))):[])},Y=M()({[`${c}-menu-without-submenu`]:(X=l.filters||[],!X.some((({children:e})=>e)))});var X;const Q=e=>{if(e.target.checked){const e=kb(null==l?void 0:l.filters).map((e=>String(e)));$(e)}else $([])},J=({filters:e})=>(e||[]).map(((e,t)=>{const n=String(e.value),o={title:e.text,key:void 0!==e.value?n:String(t)};return e.children&&(o.children=J({filters:e.children})),o})),Z=e=>{var t;return Object.assign(Object.assign({},e),{text:e.title,value:e.key,children:(null===(t=e.children)||void 0===t?void 0:t.map((e=>Z(e))))||[]})};let ee;const{direction:te,renderEmpty:ne}=o.useContext(ho.QO);if("function"==typeof l.filterDropdown)ee=l.filterDropdown({prefixCls:`${c}-custom`,setSelectedKeys:e=>_({selectedKeys:e}),selectedKeys:L(),confirm:({closeDropdown:e}={closeDropdown:!0})=>{e&&D(!1),K(L())},clearFilters:q,filters:l.filters,visible:N,close:()=>{D(!1)}});else if(l.filterDropdown)ee=l.filterDropdown;else{const e=L()||[],t=()=>{var t,n;const i=null!==(t=null==ne?void 0:ne("Table.filter"))&&void 0!==t?t:o.createElement(Fh,{image:Fh.PRESENTED_IMAGE_SIMPLE,description:v.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if(0===(l.filters||[]).length)return i;if("tree"===m)return o.createElement(o.Fragment,null,o.createElement(Eb,{filterSearch:g,value:W,onChange:G,tablePrefixCls:s,locale:v}),o.createElement("div",{className:`${s}-filter-dropdown-tree`},p?o.createElement(qr,{checked:e.length===kb(l.filters).length,indeterminate:e.length>0&&e.length<kb(l.filters).length,className:`${s}-filter-dropdown-checkall`,onChange:Q},null!==(n=null==v?void 0:v.filterCheckall)&&void 0!==n?n:null==v?void 0:v.filterCheckAll):null,o.createElement(hb,{checkable:!0,selectable:!1,blockNode:!0,multiple:p,checkStrictly:!p,className:`${c}-menu`,onCheck:z,checkedKeys:e,selectedKeys:e,showIcon:!1,treeData:J({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:W.trim()?e=>"function"==typeof g?g(W,Z(e)):Rb(W,e.title):void 0})));const r=Mb({filters:l.filters||[],filterSearch:g,prefixCls:a,filteredKeys:L(),filterMultiple:p,searchValue:W}),u=r.every((e=>null===e));return o.createElement(o.Fragment,null,o.createElement(Eb,{filterSearch:g,value:W,onChange:G,tablePrefixCls:s,locale:v}),u?i:o.createElement(Su,{selectable:!0,multiple:p,prefixCls:`${c}-menu`,className:Y,onSelect:_,onDeselect:_,selectedKeys:e,getPopupContainer:y,openKeys:F,onOpenChange:j,items:r}))},n=()=>x?(0,u.A)((E||[]).map((e=>String(e))),e,!0):0===e.length;ee=o.createElement(o.Fragment,null,t(),o.createElement("div",{className:`${a}-dropdown-btns`},o.createElement(Ud,{type:"link",size:"small",disabled:n(),onClick:()=>q()},v.filterReset),o.createElement(Ud,{type:"primary",size:"small",onClick:U},v.filterConfirm)))}l.filterDropdown&&(ee=o.createElement(Uc,{selectable:void 0},ee)),ee=o.createElement(Ab,{className:`${a}-dropdown`},ee);const oe=af({trigger:["click"],placement:"rtl"===te?"bottomLeft":"bottomRight",children:(()=>{let e;return e="function"==typeof l.filterIcon?l.filterIcon(O):l.filterIcon?l.filterIcon:o.createElement(sf,null),o.createElement("span",{role:"button",tabIndex:-1,className:M()(`${a}-trigger`,{active:O}),onClick:e=>{e.stopPropagation()}},e)})(),getPopupContainer:y},Object.assign(Object.assign({},S),{rootClassName:M()(C,S.rootClassName),open:N,onOpenChange:(e,t)=>{"trigger"===t.source&&(e&&void 0!==H&&$(Tb(H)),D(e),e||l.filterDropdown||!h||U())},popupRender:()=>"function"==typeof(null==S?void 0:S.dropdownRender)?S.dropdownRender(ee):ee}));return o.createElement("div",{className:`${a}-column`},o.createElement("span",{className:`${s}-column-title`},w),o.createElement(rh,Object.assign({},oe)))},Pb=(e,t,n)=>{let o=[];return(e||[]).forEach(((e,i)=>{var r;const s=tf(i,n),a=void 0!==e.filterDropdown;if(e.filters||a||"onFilter"in e)if("filteredValue"in e){let t=e.filteredValue;a||(t=null!==(r=null==t?void 0:t.map(String))&&void 0!==r?r:t),o.push({column:e,key:ef(e,s),filteredKeys:t,forceFiltered:e.filtered})}else o.push({column:e,key:ef(e,s),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});"children"in e&&(o=[].concat((0,tt.A)(o),(0,tt.A)(Pb(e.children,t,s))))})),o};function Ob(e,t,n,i,r,s,a,l,c){return n.map(((n,u)=>{const d=tf(u,l),{filterOnClose:h=!0,filterMultiple:p=!0,filterMode:m,filterSearch:g}=n;let f=n;if(f.filters||f.filterDropdown){const l=ef(f,d),u=i.find((({key:e})=>l===e));f=Object.assign(Object.assign({},f),{title:i=>o.createElement(Ib,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:f,columnKey:l,filterState:u,filterOnClose:h,filterMultiple:p,filterMode:m,filterSearch:g,triggerFilter:s,locale:r,getPopupContainer:a,rootClassName:c},nf(n.title,i))})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:Ob(e,t,f.children,i,r,s,a,d,c)})),f}))}const Db=e=>{const t={};return e.forEach((({key:e,filteredKeys:n,column:o})=>{const i=e,{filters:r,filterDropdown:s}=o;if(s)t[i]=n||null;else if(Array.isArray(n)){const e=kb(r);t[i]=e.filter((e=>n.includes(String(e))))}else t[i]=null})),t},Nb=(e,t,n)=>t.reduce(((e,o)=>{const{column:{onFilter:i,filters:r},filteredKeys:s}=o;return i&&s&&s.length?e.map((e=>Object.assign({},e))).filter((e=>s.some((o=>{const s=kb(r),a=s.findIndex((e=>String(e)===String(o))),l=-1!==a?s[a]:o;return e[n]&&(e[n]=Nb(e[n],t,n)),i(l,e)})))):e}),e),Hb=e=>e.flatMap((e=>"children"in e?[e].concat((0,tt.A)(Hb(e.children||[]))):[e])),Lb=e=>{const{prefixCls:t,dropdownPrefixCls:n,mergedColumns:i,onFilterChange:r,getPopupContainer:s,locale:a,rootClassName:l}=e,c=((0,ao.rJ)("Table"),o.useMemo((()=>Hb(i||[])),[i])),[u,d]=o.useState((()=>Pb(c,!0))),h=o.useMemo((()=>{const e=Pb(c,!1);if(0===e.length)return e;let t=!0,n=!0;if(e.forEach((({filteredKeys:e})=>{void 0!==e?t=!1:n=!1})),t){const e=(c||[]).map(((e,t)=>ef(e,tf(t))));return u.filter((({key:t})=>e.includes(t))).map((t=>{const n=c[e.findIndex((e=>e===t.key))];return Object.assign(Object.assign({},t),{column:Object.assign(Object.assign({},t.column),n),forceFiltered:n.filtered})}))}return e}),[c,u]),p=o.useMemo((()=>Db(h)),[h]),m=e=>{const t=h.filter((({key:t})=>t!==e.key));t.push(e),d(t),r(Db(t),t)};return[e=>Ob(t,n,e,h,a,m,s,void 0,l),h,p]};const $b=10,_b=function(e,t,n){const i=n&&"object"==typeof n?n:{},{total:r=0}=i,s=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(i,["total"]),[a,l]=(0,o.useState)((()=>({current:"defaultCurrent"in s?s.defaultCurrent:1,pageSize:"defaultPageSize"in s?s.defaultPageSize:$b}))),c=af(a,s,{total:r>0?r:e}),u=Math.ceil((r||e)/c.pageSize);c.current>u&&(c.current=u||1);const d=(e,t)=>{l({current:null!=e?e:1,pageSize:t||c.pageSize})};return!1===n?[{},()=>{}]:[Object.assign(Object.assign({},c),{onChange:(e,o)=>{var i;n&&(null===(i=n.onChange)||void 0===i||i.call(n,e,o)),d(e,o),t(e,o||(null==c?void 0:c.pageSize))}}),d]},zb={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};var Fb=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:zb}))};const Bb=o.forwardRef(Fb),jb={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};var Wb=function(e,t){return o.createElement(An,(0,g.A)({},e,{ref:t,icon:jb}))};const Vb=o.forwardRef(Wb),Gb="ascend",Kb="descend",Ub=e=>"object"==typeof e.sorter&&"number"==typeof e.sorter.multiple&&e.sorter.multiple,qb=e=>"function"==typeof e?e:!(!e||"object"!=typeof e||!e.compare)&&e.compare,Yb=(e,t,n)=>{let o=[];const i=(e,t)=>{o.push({column:e,key:ef(e,t),multiplePriority:Ub(e),sortOrder:e.sortOrder})};return(e||[]).forEach(((e,r)=>{const s=tf(r,n);e.children?("sortOrder"in e&&i(e,s),o=[].concat((0,tt.A)(o),(0,tt.A)(Yb(e.children,t,s)))):e.sorter&&("sortOrder"in e?i(e,s):t&&e.defaultSortOrder&&o.push({column:e,key:ef(e,s),multiplePriority:Ub(e),sortOrder:e.defaultSortOrder}))})),o},Xb=(e,t,n,i,r,s,a,l)=>{const c=(t||[]).map(((t,c)=>{const u=tf(c,l);let d=t;if(d.sorter){const l=d.sortDirections||r,c=void 0===d.showSorterTooltip?a:d.showSorterTooltip,h=ef(d,u),p=n.find((({key:e})=>e===h)),m=p?p.sortOrder:null,g=((e,t)=>t?e[e.indexOf(t)+1]:e[0])(l,m);let f;if(t.sortIcon)f=t.sortIcon({sortOrder:m});else{const t=l.includes(Gb)&&o.createElement(Vb,{className:M()(`${e}-column-sorter-up`,{active:m===Gb})}),n=l.includes(Kb)&&o.createElement(Bb,{className:M()(`${e}-column-sorter-down`,{active:m===Kb})});f=o.createElement("span",{className:M()(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!(!t||!n)})},o.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},t,n))}const{cancelSort:b,triggerAsc:v,triggerDesc:w}=s||{};let y=b;g===Kb?y=w:g===Gb&&(y=v);const C="object"==typeof c?Object.assign({title:y},c):{title:y};d=Object.assign(Object.assign({},d),{className:M()(d.className,{[`${e}-column-sort`]:m}),title:n=>{const i=`${e}-column-sorters`,r=o.createElement("span",{className:`${e}-column-title`},nf(t.title,n)),s=o.createElement("div",{className:i},r,f);return c?"boolean"!=typeof c&&"sorter-icon"===(null==c?void 0:c.target)?o.createElement("div",{className:`${i} ${e}-column-sorters-tooltip-target-sorter`},r,o.createElement(Vc,Object.assign({},C),f)):o.createElement(Vc,Object.assign({},C),s):s},onHeaderCell:n=>{var o;const r=(null===(o=t.onHeaderCell)||void 0===o?void 0:o.call(t,n))||{},s=r.onClick,a=r.onKeyDown;r.onClick=e=>{i({column:t,key:h,sortOrder:g,multiplePriority:Ub(t)}),null==s||s(e)},r.onKeyDown=e=>{e.keyCode===Ls.ENTER&&(i({column:t,key:h,sortOrder:g,multiplePriority:Ub(t)}),null==a||a(e))};const l=(e=>{const t=nf(e,{});return"[object Object]"===Object.prototype.toString.call(t)?"":t})(t.title),c=null==l?void 0:l.toString();return m&&(r["aria-sort"]="ascend"===m?"ascending":"descending"),r["aria-label"]=c||"",r.className=M()(r.className,`${e}-column-has-sorters`),r.tabIndex=0,t.ellipsis&&(r.title=(null!=l?l:"").toString()),r}})}return"children"in d&&(d=Object.assign(Object.assign({},d),{children:Xb(e,d.children,n,i,r,s,a,u)})),d}));return c},Qb=e=>{const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},Jb=e=>{const t=e.filter((({sortOrder:e})=>e)).map(Qb);if(0===t.length&&e.length){const t=e.length-1;return Object.assign(Object.assign({},Qb(e[t])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},Zb=(e,t,n)=>{const o=t.slice().sort(((e,t)=>t.multiplePriority-e.multiplePriority)),i=e.slice(),r=o.filter((({column:{sorter:e},sortOrder:t})=>qb(e)&&t));return r.length?i.sort(((e,t)=>{for(let n=0;n<r.length;n+=1){const o=r[n],{column:{sorter:i},sortOrder:s}=o,a=qb(i);if(a&&s){const n=a(e,t,s);if(0!==n)return s===Gb?n:-n}}return 0})).map((e=>{const o=e[n];return o?Object.assign(Object.assign({},e),{[n]:Zb(o,t,n)}):e})):i},ev=(e,t)=>e.map((e=>{const n=Object.assign({},e);return n.title=nf(e.title,t),"children"in n&&(n.children=ev(n.children,t)),n})),tv=Rt(((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:o}=t;return n!==o})),nv=an(((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:o}=t;return n!==o})),ov=e=>{const{componentCls:t,lineWidth:n,lineType:o,tableBorderColor:i,tableHeaderBg:r,tablePaddingVertical:s,tablePaddingHorizontal:a,calc:l}=e,c=`${(0,go.zA)(n)} ${o} ${i}`,u=(e,o,i)=>({[`&${t}-${e}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${(0,go.zA)(l(o).mul(-1).equal())}\n ${(0,go.zA)(l(l(i).add(n)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:c,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:c,borderTop:c,[`\n > ${t}-content,\n > ${t}-header,\n > ${t}-body,\n > ${t}-summary\n `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:c},"> thead":{"> tr:not(:last-child) > th":{borderBottom:c},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:c}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${(0,go.zA)(l(s).mul(-1).equal())} ${(0,go.zA)(l(l(a).add(n)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:c,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`\n > tr${t}-expanded-row,\n > tr${t}-placeholder\n `]:{"> th, > td":{borderInlineEnd:0}}}}}},u("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),u("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:c,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${(0,go.zA)(n)} 0 ${(0,go.zA)(n)} ${r}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:c}}}},iv=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},Do.L9),{wordBreak:"keep-all",[`\n &${t}-cell-fix-left-last,\n &${t}-cell-fix-right-first\n `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},rv=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},sv=e=>{const{componentCls:t,antCls:n,motionDurationSlow:o,lineWidth:i,paddingXS:r,lineType:s,tableBorderColor:a,tableExpandIconBg:l,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:h,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:g,expandIconSize:f,expandIconHalfInner:b,expandIconScale:v,calc:w}=e,y=`${(0,go.zA)(i)} ${s} ${a}`,C=w(m).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:c},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},(0,Do.Y1)(e)),{position:"relative",float:"left",width:f,height:f,color:"inherit",lineHeight:(0,go.zA)(f),background:l,border:y,borderRadius:u,transform:`scale(${v})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${o} ease-out`,content:'""'},"&::before":{top:b,insetInlineEnd:C,insetInlineStart:C,height:i},"&::after":{top:C,bottom:C,insetInlineStart:b,width:i,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:g,marginInlineEnd:r},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:p}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${(0,go.zA)(w(d).mul(-1).equal())} ${(0,go.zA)(w(h).mul(-1).equal())}`,padding:`${(0,go.zA)(d)} ${(0,go.zA)(h)}`}}}},av=e=>{const{componentCls:t,antCls:n,iconCls:o,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:r,paddingXXS:s,paddingXS:a,colorText:l,lineWidth:c,lineType:u,tableBorderColor:d,headerIconColor:h,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:g,motionDurationSlow:f,colorIcon:b,colorPrimary:v,tableHeaderFilterActiveBg:w,colorTextDisabled:y,tableFilterDropdownBg:C,tableFilterDropdownHeight:x,controlItemBgHover:E,controlItemBgActive:S,boxShadowSecondary:A,filterDropdownMenuBg:k,calc:R}=e,M=`${n}-dropdown`,T=`${t}-filter-dropdown`,I=`${n}-tree`,P=`${(0,go.zA)(c)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:R(s).mul(-1).equal(),marginInline:`${(0,go.zA)(s)} ${(0,go.zA)(R(m).div(2).mul(-1).equal())}`,padding:`0 ${(0,go.zA)(s)}`,color:h,fontSize:p,borderRadius:g,cursor:"pointer",transition:`all ${f}`,"&:hover":{color:b,background:w},"&.active":{color:v}}}},{[`${n}-dropdown`]:{[T]:Object.assign(Object.assign({},(0,Do.dF)(e)),{minWidth:i,backgroundColor:C,borderRadius:g,boxShadow:A,overflow:"hidden",[`${M}-menu`]:{maxHeight:x,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:k,"&:empty::after":{display:"block",padding:`${(0,go.zA)(a)} 0`,color:y,fontSize:p,textAlign:"center",content:'"Not Found"'}},[`${T}-tree`]:{paddingBlock:`${(0,go.zA)(a)} 0`,paddingInline:a,[I]:{padding:0},[`${I}-treenode ${I}-node-content-wrapper:hover`]:{backgroundColor:E},[`${I}-treenode-checkbox-checked ${I}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:S}}},[`${T}-search`]:{padding:a,borderBottom:P,"&-input":{input:{minWidth:r},[o]:{color:y}}},[`${T}-checkall`]:{width:"100%",marginBottom:s,marginInlineStart:s},[`${T}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${(0,go.zA)(R(a).sub(c).equal())} ${(0,go.zA)(a)}`,overflow:"hidden",borderTop:P}})}},{[`${n}-dropdown ${T}, ${T}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:a,color:l},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},lv=e=>{const{componentCls:t,lineWidth:n,colorSplit:o,motionDurationSlow:i,zIndexTableFixed:r,tableBg:s,zIndexTableSticky:a,calc:l}=e,c=o;return{[`${t}-wrapper`]:{[`\n ${t}-cell-fix-left,\n ${t}-cell-fix-right\n `]:{position:"sticky !important",zIndex:r,background:s},[`\n ${t}-cell-fix-left-first::after,\n ${t}-cell-fix-left-last::after\n `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:l(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`\n ${t}-cell-fix-right-first::after,\n ${t}-cell-fix-right-last::after\n `]:{position:"absolute",top:0,bottom:l(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:l(a).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${c}`},[`\n ${t}-cell-fix-left-first::after,\n ${t}-cell-fix-left-last::after\n `]:{boxShadow:`inset 10px 0 8px -8px ${c}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${c}`},[`\n ${t}-cell-fix-right-first::after,\n ${t}-cell-fix-right-last::after\n `]:{boxShadow:`inset -10px 0 8px -8px ${c}`}},[`${t}-fixed-column-gapped`]:{[`\n ${t}-cell-fix-left-first::after,\n ${t}-cell-fix-left-last::after,\n ${t}-cell-fix-right-first::after,\n ${t}-cell-fix-right-last::after\n `]:{boxShadow:"none"}}}}},cv=e=>{const{componentCls:t,antCls:n,margin:o}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${(0,go.zA)(o)} 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},uv=e=>{const{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${(0,go.zA)(n)} ${(0,go.zA)(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${(0,go.zA)(n)} ${(0,go.zA)(n)}`}}}}},dv=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},hv=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSizeIcon:i,padding:r,paddingXS:s,headerIconColor:a,headerIconHoverColor:l,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:h,tablePaddingHorizontal:p,calc:m}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:c,[`&${t}-selection-col-with-dropdown`]:{width:m(c).add(i).add(m(r).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:m(c).add(m(s).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:m(c).add(i).add(m(r).div(4)).add(m(s).mul(2)).equal()}},[`\n table tr th${t}-selection-column,\n table tr td${t}-selection-column,\n ${t}-selection-column\n `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:(0,go.zA)(m(p).div(4).equal()),[o]:{color:a,fontSize:i,verticalAlign:"baseline","&:hover":{color:l}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:h}}}}}},pv=e=>{const{componentCls:t,tableExpandColumnWidth:n,calc:o}=e,i=(e,i,r,s)=>({[`${t}${t}-${e}`]:{fontSize:s,[`\n ${t}-title,\n ${t}-footer,\n ${t}-cell,\n ${t}-thead > tr > th,\n ${t}-tbody > tr > th,\n ${t}-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n `]:{padding:`${(0,go.zA)(i)} ${(0,go.zA)(r)}`},[`${t}-filter-trigger`]:{marginInlineEnd:(0,go.zA)(o(r).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${(0,go.zA)(o(i).mul(-1).equal())} ${(0,go.zA)(o(r).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:(0,go.zA)(o(i).mul(-1).equal()),marginInline:`${(0,go.zA)(o(n).sub(r).equal())} ${(0,go.zA)(o(r).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:(0,go.zA)(o(r).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},i("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),i("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},mv=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:o,headerIconColor:i,headerIconHoverColor:r}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`\n &${t}-cell-fix-left:hover,\n &${t}-cell-fix-right:hover\n `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:n,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:o,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:r}}}},gv=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:i,tableScrollThumbSize:r,tableScrollBg:s,zIndexTableSticky:a,stickyScrollBarBorderRadius:l,lineWidth:c,lineType:u,tableBorderColor:d}=e,h=`${(0,go.zA)(c)} ${u} ${d}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:a,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${(0,go.zA)(r)} !important`,zIndex:a,display:"flex",alignItems:"center",background:s,borderTop:h,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:r,backgroundColor:o,borderRadius:l,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},fv=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:o,calc:i}=e,r=`${(0,go.zA)(n)} ${e.lineType} ${o}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:r}}},[`div${t}-summary`]:{boxShadow:`0 ${(0,go.zA)(i(n).mul(-1).equal())} 0 ${o}`}}}},bv=e=>{const{componentCls:t,motionDurationMid:n,lineWidth:o,lineType:i,tableBorderColor:r,calc:s}=e,a=`${(0,go.zA)(o)} ${i} ${r}`,l=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`\n & > ${t}-row, \n & > div:not(${t}-row) > ${t}-row\n `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:a,transition:`background ${n}`},[`${t}-expanded-row`]:{[`${l}${l}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${(0,go.zA)(o)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:a,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:a,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:s(o).mul(-1).equal(),borderInlineStart:a}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:a,borderBottom:a}}}}}},vv=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:o,tablePaddingHorizontal:i,tableExpandColumnWidth:r,lineWidth:s,lineType:a,tableBorderColor:l,tableFontSize:c,tableBg:u,tableRadius:d,tableHeaderTextColor:h,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:g,tableFooterTextColor:f,tableFooterBg:b,calc:v}=e,w=`${(0,go.zA)(s)} ${a} ${l}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Do.t6)()),{[t]:Object.assign(Object.assign({},(0,Do.dF)(e)),{fontSize:c,background:u,borderRadius:`${(0,go.zA)(d)} ${(0,go.zA)(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${(0,go.zA)(d)} ${(0,go.zA)(d)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`\n ${t}-cell,\n ${t}-thead > tr > th,\n ${t}-tbody > tr > th,\n ${t}-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n `]:{position:"relative",padding:`${(0,go.zA)(o)} ${(0,go.zA)(i)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${(0,go.zA)(o)} ${(0,go.zA)(i)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:m,borderBottom:w,transition:`background ${p} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:g,transform:"translateY(-50%)",transition:`background-color ${p}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${p}, border-color ${p}`,borderBottom:w,[`\n > ${t}-wrapper:only-child,\n > ${t}-expanded-row-fixed > ${t}-wrapper:only-child\n `]:{[t]:{marginBlock:(0,go.zA)(v(o).mul(-1).equal()),marginInline:`${(0,go.zA)(v(r).sub(i).equal())}\n ${(0,go.zA)(v(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:m,borderBottom:w,transition:`background ${p} ease`}}},[`${t}-footer`]:{padding:`${(0,go.zA)(o)} ${(0,go.zA)(i)}`,color:f,background:b}})}},wv=Ho("Table",(e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:o,controlInteractiveSize:i,headerBg:r,headerColor:s,headerSortActiveBg:a,headerSortHoverBg:l,bodySortBg:c,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:h,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:g,cellPaddingBlockMD:f,cellPaddingInlineMD:b,cellPaddingBlockSM:v,cellPaddingInlineSM:w,borderColor:y,footerBg:C,footerColor:x,headerBorderRadius:E,cellFontSize:S,cellFontSizeMD:A,cellFontSizeSM:k,headerSplitColor:R,fixedHeaderSortActiveBg:M,headerFilterHoverBg:T,filterDropdownBg:I,expandIconBg:P,selectionColumnWidth:O,stickyScrollBarBg:D,calc:N}=e,H=Ro(e,{tableFontSize:S,tableBg:o,tableRadius:E,tablePaddingVertical:m,tablePaddingHorizontal:g,tablePaddingVerticalMiddle:f,tablePaddingHorizontalMiddle:b,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:w,tableBorderColor:y,tableHeaderTextColor:s,tableHeaderBg:r,tableFooterTextColor:x,tableFooterBg:C,tableHeaderCellSplitColor:R,tableHeaderSortBg:a,tableHeaderSortHoverBg:l,tableBodySortBg:c,tableFixedHeaderSortActiveBg:M,tableHeaderFilterActiveBg:T,tableFilterDropdownBg:I,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:h,zIndexTableFixed:2,zIndexTableSticky:N(2).add(1).equal({unit:!1}),tableFontSizeMiddle:A,tableFontSizeSmall:k,tableSelectionColumnWidth:O,tableExpandIconBg:P,tableExpandColumnWidth:N(i).add(N(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:D,tableScrollThumbBgHover:t,tableScrollBg:n});return[vv(H),cv(H),fv(H),mv(H),av(H),ov(H),uv(H),sv(H),fv(H),rv(H),hv(H),lv(H),gv(H),iv(H),pv(H),dv(H),bv(H)]}),(e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:o,colorFillSecondary:i,colorFillContent:r,controlItemBgActive:s,controlItemBgActiveHover:a,padding:l,paddingSM:c,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:h,controlHeight:p,colorTextPlaceholder:m,fontSize:g,fontSizeSM:f,lineHeight:b,lineWidth:v,colorIcon:w,colorIconHover:y,opacityLoading:C,controlInteractiveSize:x}=e,E=new Yc.Y(i).onBackground(n).toHexString(),S=new Yc.Y(r).onBackground(n).toHexString(),A=new Yc.Y(t).onBackground(n).toHexString(),k=new Yc.Y(w),R=new Yc.Y(y),M=x/2-v,T=2*M+3*v;return{headerBg:A,headerColor:o,headerSortActiveBg:E,headerSortHoverBg:S,bodySortBg:A,rowHoverBg:A,rowSelectedBg:s,rowSelectedHoverBg:a,rowExpandedBg:t,cellPaddingBlock:l,cellPaddingInline:l,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:h,footerBg:A,footerColor:o,cellFontSize:g,cellFontSizeMD:g,cellFontSizeSM:g,headerSplitColor:d,fixedHeaderSortActiveBg:E,headerFilterHoverBg:r,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(g*b-3*v)/2-Math.ceil((1.4*f-3*v)/2),headerIconColor:k.clone().setA(k.a*C).toRgbString(),headerIconHoverColor:R.clone().setA(R.a*C).toRgbString(),expandIconHalfInner:M,expandIconSize:T,expandIconScale:x/T}}),{unitless:{expandIconScale:!0}}),yv=[],Cv=(e,t)=>{var n,i;const{prefixCls:r,className:a,rootClassName:l,style:c,size:u,bordered:d,dropdownPrefixCls:h,dataSource:p,pagination:m,rowSelection:g,rowKey:f="key",rowClassName:b,columns:v,children:w,childrenColumnName:y,onChange:C,getPopupContainer:x,loading:E,expandIcon:S,expandable:A,expandedRowRender:k,expandIconColumnIndex:R,indentSize:T,scroll:I,sortDirections:P,locale:O,showSorterTooltip:D={target:"full-header"},virtual:N}=e;(0,ao.rJ)("Table");const H=o.useMemo((()=>v||ut(w)),[v,w]),L=o.useMemo((()=>H.some((e=>e.responsive))),[H]),$=Gh(L),_=o.useMemo((()=>{const e=new Set(Object.keys($).filter((e=>$[e])));return H.filter((t=>!t.responsive||t.responsive.some((t=>e.has(t)))))}),[H,$]),z=Dn(e,["className","style","columns"]),{locale:F=Ph.A,direction:B,table:j,renderEmpty:W,getPrefixCls:V,getPopupContainer:G}=o.useContext(ho.QO),K=pc(u),U=Object.assign(Object.assign({},F.Table),O),q=p||yv,Y=V("table",r),X=V("dropdown",h),[,Q]=(0,No.Ay)(),J=vi(Y),[Z,ee,te]=wv(Y,J),ne=Object.assign(Object.assign({childrenColumnName:y,expandIconColumnIndex:R},A),{expandIcon:null!==(n=null==A?void 0:A.expandIcon)&&void 0!==n?n:null===(i=null==j?void 0:j.expandable)||void 0===i?void 0:i.expandIcon}),{childrenColumnName:oe="children"}=ne,ie=o.useMemo((()=>q.some((e=>null==e?void 0:e[oe]))?"nest":k||(null==A?void 0:A.expandedRowRender)?"row":null),[q]),re={body:o.useRef(null)},se=function(e){return(t,n)=>{const o=t.querySelector(`.${e}-container`);let i=n;if(o){const e=getComputedStyle(o);i=n-parseInt(e.borderLeftWidth,10)-parseInt(e.borderRightWidth,10)}return i}}(Y),ae=o.useRef(null),le=o.useRef(null);!function(e,t){(0,o.useImperativeHandle)(e,(()=>{const e=t(),{nativeElement:n}=e;return"undefined"!=typeof Proxy?new Proxy(n,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)}):(i=e,(o=n)._antProxy=o._antProxy||{},Object.keys(i).forEach((e=>{if(!(e in o._antProxy)){const t=o[e];o._antProxy[e]=t,o[e]=i[e]}})),o);var o,i}))}(t,(()=>Object.assign(Object.assign({},le.current),{nativeElement:ae.current})));const ce=o.useMemo((()=>"function"==typeof f?f:e=>null==e?void 0:e[f]),[f]),[ue]=((e,t,n)=>{const i=o.useRef({});return[function(o){var r;if(!i.current||i.current.data!==e||i.current.childrenColumnName!==t||i.current.getRowKey!==n){const s=new Map;function a(e){e.forEach(((e,o)=>{const i=n(e,o);s.set(i,e),e&&"object"==typeof e&&t in e&&a(e[t]||[])}))}a(e),i.current={data:e,childrenColumnName:t,kvMap:s,getRowKey:n}}return null===(r=i.current.kvMap)||void 0===r?void 0:r.get(o)}]})(q,oe,ce),de={},he=(e,t,n=!1)=>{var o,i,r,s;const a=Object.assign(Object.assign({},de),e);n&&(null===(o=de.resetPagination)||void 0===o||o.call(de),(null===(i=a.pagination)||void 0===i?void 0:i.current)&&(a.pagination.current=1),m&&(null===(r=m.onChange)||void 0===r||r.call(m,1,null===(s=a.pagination)||void 0===s?void 0:s.pageSize))),I&&!1!==I.scrollToFirstRowOnChange&&re.body.current&&function(e,t={}){const{getContainer:n=()=>window,callback:o,duration:i=450}=t,r=n(),s=(e=>{var t,n;if("undefined"==typeof window)return 0;let o=0;return Th(e)?o=e.pageYOffset:e instanceof Document?o=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(o=e.scrollTop),e&&!Th(e)&&"number"!=typeof o&&(o=null===(n=(null!==(t=e.ownerDocument)&&void 0!==t?t:e).documentElement)||void 0===n?void 0:n.scrollTop),o})(r),a=Date.now(),l=()=>{const t=Date.now()-a,n=function(e,t,n,o){const i=n-t;return(e/=o/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}(t>i?i:t,s,e,i);Th(r)?r.scrollTo(window.pageXOffset,n):r instanceof Document||"HTMLDocument"===r.constructor.name?r.documentElement.scrollTop=n:r.scrollTop=n,t<i?(0,bt.A)(l):"function"==typeof o&&o()};(0,bt.A)(l)}(0,{getContainer:()=>re.body.current}),null==C||C(a.pagination,a.filters,a.sorter,{currentDataSource:Nb(Zb(q,a.sorterStates,oe),a.filterStates,oe),action:t})},[pe,me,ge,fe]=(e=>{const{prefixCls:t,mergedColumns:n,sortDirections:i,tableLocale:r,showSorterTooltip:s,onSorterChange:a}=e,[l,c]=o.useState((()=>Yb(n,!0))),u=(e,t)=>{const n=[];return e.forEach(((e,o)=>{const i=tf(o,t);if(n.push(ef(e,i)),Array.isArray(e.children)){const t=u(e.children,i);n.push.apply(n,(0,tt.A)(t))}})),n},d=o.useMemo((()=>{let e=!0;const t=Yb(n,!1);if(!t.length){const e=u(n);return l.filter((({key:t})=>e.includes(t)))}const o=[];function i(t){e?o.push(t):o.push(Object.assign(Object.assign({},t),{sortOrder:null}))}let r=null;return t.forEach((t=>{null===r?(i(t),t.sortOrder&&(!1===t.multiplePriority?e=!1:r=!0)):(r&&!1!==t.multiplePriority||(e=!1),i(t))})),o}),[n,l]),h=o.useMemo((()=>{var e,t;const n=d.map((({column:e,sortOrder:t})=>({column:e,order:t})));return{sortColumns:n,sortColumn:null===(e=n[0])||void 0===e?void 0:e.column,sortOrder:null===(t=n[0])||void 0===t?void 0:t.order}}),[d]),p=e=>{let t;t=!1!==e.multiplePriority&&d.length&&!1!==d[0].multiplePriority?[].concat((0,tt.A)(d.filter((({key:t})=>t!==e.key))),[e]):[e],c(t),a(Jb(t),t)};return[e=>Xb(t,e,d,p,i,r,s),d,h,()=>Jb(d)]})({prefixCls:Y,mergedColumns:_,onSorterChange:(e,t)=>{he({sorter:e,sorterStates:t},"sort",!1)},sortDirections:P||["ascend","descend"],tableLocale:U,showSorterTooltip:D}),be=o.useMemo((()=>Zb(q,me,oe)),[q,me]);de.sorter=fe(),de.sorterStates=me;const[ve,we,ye]=Lb({prefixCls:Y,locale:U,dropdownPrefixCls:X,mergedColumns:_,onFilterChange:(e,t)=>{he({filters:e,filterStates:t},"filter",!0)},getPopupContainer:x||G,rootClassName:M()(l,J)}),Ce=Nb(be,we,oe);de.filters=ye,de.filterStates=we;const xe=o.useMemo((()=>{const e={};return Object.keys(ye).forEach((t=>{null!==ye[t]&&(e[t]=ye[t])})),Object.assign(Object.assign({},ge),{filters:e})}),[ge,ye]),[Ee]=(e=>[o.useCallback((t=>ev(t,e)),[e])])(xe),[Se,Ae]=_b(Ce.length,((e,t)=>{he({pagination:Object.assign(Object.assign({},de.pagination),{current:e,pageSize:t})},"paginate")}),m);de.pagination=!1===m?{}:function(e,t){const n={current:e.current,pageSize:e.pageSize},o=t&&"object"==typeof t?t:{};return Object.keys(o).forEach((t=>{const o=e[t];"function"!=typeof o&&(n[t]=o)})),n}(Se,m),de.resetPagination=Ae;const ke=o.useMemo((()=>{if(!1===m||!Se.pageSize)return Ce;const{current:e=1,total:t,pageSize:n=$b}=Se;return Ce.length<t?Ce.length>n?Ce.slice((e-1)*n,e*n):Ce:Ce.slice((e-1)*n,e*n)}),[!!m,Ce,null==Se?void 0:Se.current,null==Se?void 0:Se.pageSize,null==Se?void 0:Se.total]),[Re,Me]=((e,t)=>{const{preserveSelectedRowKeys:n,selectedRowKeys:i,defaultSelectedRowKeys:r,getCheckboxProps:s,onChange:a,onSelect:l,onSelectAll:c,onSelectInvert:u,onSelectNone:d,onSelectMultiple:h,columnWidth:p,type:m,selections:g,fixed:f,renderCell:b,hideSelectAll:v,checkStrictly:w=!0}=t||{},{prefixCls:y,data:C,pageData:x,getRecordByKey:E,getRowKey:S,expandType:A,childrenColumnName:k,locale:R,getPopupContainer:T}=e,I=(0,ao.rJ)("Table"),[P,O]=function(){const[e,t]=(0,o.useState)(null);return[(0,o.useCallback)(((n,o,i)=>{const r=null!=e?e:n,s=Math.min(r||0,n),a=Math.max(r||0,n),l=o.slice(s,a+1).map((e=>e)),c=l.some((e=>!i.has(e))),u=[];return l.forEach((e=>{c?(i.has(e)||u.push(e),i.add(e)):(i.delete(e),u.push(e))})),t(c?a:null),u}),[e]),e=>{t(e)}]}(),[D,N]=(0,so.A)(i||r||Rh,{value:i}),H=o.useRef(new Map),L=(0,o.useCallback)((e=>{if(n){const t=new Map;e.forEach((e=>{let n=E(e);!n&&H.current.has(e)&&(n=H.current.get(e)),t.set(e,n)})),H.current=t}}),[E,n]);o.useEffect((()=>{L(D)}),[D]);const $=(0,o.useMemo)((()=>Mh(k,x)),[k,x]),{keyEntities:_}=(0,o.useMemo)((()=>{if(w)return{keyEntities:null};let e=C;if(n){const t=new Set($.map(((e,t)=>S(e,t)))),n=Array.from(H.current).reduce(((e,[n,o])=>t.has(n)?e:e.concat(o)),[]);e=[].concat((0,tt.A)(e),(0,tt.A)(n))}return Fn(e,{externalGetKey:S,childrenPropName:k})}),[C,S,w,k,n,$]),z=(0,o.useMemo)((()=>{const e=new Map;return $.forEach(((t,n)=>{const o=S(t,n),i=(s?s(t):null)||{};e.set(o,i)})),e}),[$,S,s]),F=(0,o.useCallback)((e=>{const t=S(e);let n;return n=z.has(t)?z.get(S(e)):s?s(e):void 0,!!(null==n?void 0:n.disabled)}),[z,S]),[B,j]=(0,o.useMemo)((()=>{if(w)return[D||[],[]];const{checkedKeys:e,halfCheckedKeys:t}=ro(D,!0,_,F);return[e||[],t]}),[D,w,_,F]),W=(0,o.useMemo)((()=>{const e="radio"===m?B.slice(0,1):B;return new Set(e)}),[B,m]),V=(0,o.useMemo)((()=>"radio"===m?new Set:new Set(j)),[j,m]);o.useEffect((()=>{t||N(Rh)}),[!!t]);const G=(0,o.useCallback)(((e,t)=>{let o,i;L(e),n?(o=e,i=e.map((e=>H.current.get(e)))):(o=[],i=[],e.forEach((e=>{const t=E(e);void 0!==t&&(o.push(e),i.push(t))}))),N(o),null==a||a(o,i,{type:t})}),[N,E,a,n]),K=(0,o.useCallback)(((e,t,n,o)=>{if(l){const i=n.map((e=>E(e)));l(E(e),t,i,o)}G(n,"single")}),[l,E,G]),U=(0,o.useMemo)((()=>!g||v?null:(!0===g?[Sh,Ah,kh]:g).map((e=>e===Sh?{key:"all",text:R.selectionAll,onSelect(){G(C.map(((e,t)=>S(e,t))).filter((e=>{const t=z.get(e);return!(null==t?void 0:t.disabled)||W.has(e)})),"all")}}:e===Ah?{key:"invert",text:R.selectInvert,onSelect(){const e=new Set(W);x.forEach(((t,n)=>{const o=S(t,n),i=z.get(o);(null==i?void 0:i.disabled)||(e.has(o)?e.delete(o):e.add(o))}));const t=Array.from(e);u&&(I.deprecated(!1,"onSelectInvert","onChange"),u(t)),G(t,"invert")}}:e===kh?{key:"none",text:R.selectNone,onSelect(){null==d||d(),G(Array.from(W).filter((e=>{const t=z.get(e);return null==t?void 0:t.disabled})),"none")}}:e)).map((e=>Object.assign(Object.assign({},e),{onSelect:(...t)=>{var n,o;null===(o=e.onSelect)||void 0===o||(n=o).call.apply(n,[e].concat(t)),O(null)}})))),[g,W,x,S,u,G]),q=(0,o.useCallback)((e=>{var n;if(!t)return e.filter((e=>e!==Eh));let i=(0,tt.A)(e);const r=new Set(W),s=$.map(S).filter((e=>!z.get(e).disabled)),a=s.every((e=>r.has(e))),l=s.some((e=>r.has(e))),u=()=>{const e=[];a?s.forEach((t=>{r.delete(t),e.push(t)})):s.forEach((t=>{r.has(t)||(r.add(t),e.push(t))}));const t=Array.from(r);null==c||c(!a,t.map((e=>E(e))),e.map((e=>E(e)))),G(t,"all"),O(null)};let d,C,x;if("radio"!==m){let e;if(U){const t={getPopupContainer:T,items:U.map(((e,t)=>{const{key:n,text:o,onSelect:i}=e;return{key:null!=n?n:t,onClick:()=>{null==i||i(s)},label:o}}))};e=o.createElement("div",{className:`${y}-selection-extra`},o.createElement(rh,{menu:t,getPopupContainer:T},o.createElement("span",null,o.createElement(Rn,null))))}const t=$.map(((e,t)=>{const n=S(e,t),o=z.get(n)||{};return Object.assign({checked:r.has(n)},o)})).filter((({disabled:e})=>e)),n=!!t.length&&t.length===$.length,i=n&&t.every((({checked:e})=>e)),c=n&&t.some((({checked:e})=>e));C=o.createElement(qr,{checked:n?i:!!$.length&&a,indeterminate:n?!i&&c:!a&&l,onChange:u,disabled:0===$.length||n,"aria-label":e?"Custom selection":"Select all",skipGroup:!0}),d=!v&&o.createElement("div",{className:`${y}-selection`},C,e)}if(x="radio"===m?(e,t,n)=>{const i=S(t,n),s=r.has(i),a=z.get(i);return{node:o.createElement(xh,Object.assign({},a,{checked:s,onClick:e=>{var t;e.stopPropagation(),null===(t=null==a?void 0:a.onClick)||void 0===t||t.call(a,e)},onChange:e=>{var t;r.has(i)||K(i,!0,[i],e.nativeEvent),null===(t=null==a?void 0:a.onChange)||void 0===t||t.call(a,e)}})),checked:s}}:(e,t,n)=>{var i;const a=S(t,n),l=r.has(a),c=V.has(a),u=z.get(a);let d;return d="nest"===A?c:null!==(i=null==u?void 0:u.indeterminate)&&void 0!==i?i:c,{node:o.createElement(qr,Object.assign({},u,{indeterminate:d,checked:l,skipGroup:!0,onClick:e=>{var t;e.stopPropagation(),null===(t=null==u?void 0:u.onClick)||void 0===t||t.call(u,e)},onChange:e=>{var t;const{nativeEvent:n}=e,{shiftKey:o}=n,i=s.findIndex((e=>e===a)),c=B.some((e=>s.includes(e)));if(o&&w&&c){const e=P(i,s,r),t=Array.from(r);null==h||h(!l,t.map((e=>E(e))),e.map((e=>E(e)))),G(t,"multiple")}else{const e=B;if(w){const t=l?qn(e,a):Yn(e,a);K(a,!l,t,n)}else{const t=ro([].concat((0,tt.A)(e),[a]),!0,_,F),{checkedKeys:o,halfCheckedKeys:i}=t;let r=o;if(l){const e=new Set(o);e.delete(a),r=ro(Array.from(e),{checked:!1,halfCheckedKeys:i},_,F).checkedKeys}K(a,!l,r,n)}}O(l?null:i),null===(t=null==u?void 0:u.onChange)||void 0===t||t.call(u,e)}})),checked:l}},!i.includes(Eh))if(0===i.findIndex((e=>{var t;return"EXPAND_COLUMN"===(null===(t=e[Je])||void 0===t?void 0:t.columnType)}))){const[e,...t]=i;i=[e,Eh].concat((0,tt.A)(t))}else i=[Eh].concat((0,tt.A)(i));const k=i.indexOf(Eh);i=i.filter(((e,t)=>e!==Eh||t===k));const R=i[k-1],I=i[k+1];let D=f;void 0===D&&(void 0!==(null==I?void 0:I.fixed)?D=I.fixed:void 0!==(null==R?void 0:R.fixed)&&(D=R.fixed)),D&&R&&"EXPAND_COLUMN"===(null===(n=R[Je])||void 0===n?void 0:n.columnType)&&void 0===R.fixed&&(R.fixed=D);const N=M()(`${y}-selection-col`,{[`${y}-selection-col-with-dropdown`]:g&&"checkbox"===m}),H={fixed:D,width:p,className:`${y}-selection-column`,title:(null==t?void 0:t.columnTitle)?"function"==typeof t.columnTitle?t.columnTitle(C):t.columnTitle:d,render:(e,t,n)=>{const{node:o,checked:i}=x(e,t,n);return b?b(i,t,n,o):o},onCell:t.onCell,align:t.align,[Je]:{className:N}};return i.map((e=>e===Eh?H:e))}),[S,$,t,B,W,V,p,U,A,z,h,K,F]);return[q,W]})({prefixCls:Y,data:Ce,pageData:ke,getRowKey:ce,getRecordByKey:ue,expandType:ie,childrenColumnName:oe,locale:U,getPopupContainer:x||G},g);ne.__PARENT_RENDER_ICON__=ne.expandIcon,ne.expandIcon=ne.expandIcon||S||function(e){return t=>{const{prefixCls:n,onExpand:i,record:r,expanded:s,expandable:a}=t,l=`${n}-row-expand-icon`;return o.createElement("button",{type:"button",onClick:e=>{i(r,e),e.stopPropagation()},className:M()(l,{[`${l}-spaced`]:!a,[`${l}-expanded`]:a&&s,[`${l}-collapsed`]:a&&!s}),"aria-label":s?e.collapse:e.expand,"aria-expanded":s})}}(U),"nest"===ie&&void 0===ne.expandIconColumnIndex?ne.expandIconColumnIndex=g?1:0:ne.expandIconColumnIndex>0&&g&&(ne.expandIconColumnIndex-=1),"number"!=typeof ne.indentSize&&(ne.indentSize="number"==typeof T?T:15);const Te=o.useCallback((e=>Ee(Re(ve(pe(e))))),[pe,ve,Re]);let Ie,Pe,Oe;if(!1!==m&&(null==Se?void 0:Se.total)){let e;e=Se.size?Se.size:"small"===K||"middle"===K?"small":void 0;const t=t=>o.createElement(Fg,Object.assign({},Se,{className:M()(`${Y}-pagination ${Y}-pagination-${t}`,Se.className),size:e})),n="rtl"===B?"left":"right",{position:i}=Se;if(null!==i&&Array.isArray(i)){const e=i.find((e=>e.includes("top"))),o=i.find((e=>e.includes("bottom"))),r=i.every((e=>"none"==`${e}`));e||o||r||(Pe=t(n)),e&&(Ie=t(e.toLowerCase().replace("top",""))),o&&(Pe=t(o.toLowerCase().replace("bottom","")))}else Pe=t(n)}"boolean"==typeof E?Oe={spinning:E}:"object"==typeof E&&(Oe=Object.assign({spinning:!0},E));const De=M()(te,J,`${Y}-wrapper`,null==j?void 0:j.className,{[`${Y}-wrapper-rtl`]:"rtl"===B},a,l,ee),Ne=Object.assign(Object.assign({},null==j?void 0:j.style),c),He=void 0!==(null==O?void 0:O.emptyText)?O.emptyText:(null==W?void 0:W("Table"))||o.createElement(Bh,{componentName:"Table"}),Le=N?nv:tv,$e={},_e=o.useMemo((()=>{const{fontSize:e,lineHeight:t,lineWidth:n,padding:o,paddingXS:i,paddingSM:r}=Q,s=Math.floor(e*t);switch(K){case"middle":return 2*r+s+n;case"small":return 2*i+s+n;default:return 2*o+s+n}}),[Q,K]);return N&&($e.listItemHeight=_e),Z(o.createElement("div",{ref:ae,className:De,style:Ne},o.createElement(Zg,Object.assign({spinning:!1},Oe),Ie,o.createElement(Le,Object.assign({},$e,z,{ref:le,columns:_,direction:B,expandable:ne,prefixCls:Y,className:M()({[`${Y}-middle`]:"middle"===K,[`${Y}-small`]:"small"===K,[`${Y}-bordered`]:d,[`${Y}-empty`]:0===q.length},te,J,ee),data:ke,rowKey:ce,rowClassName:(e,t,n)=>{let o;return o="function"==typeof b?M()(b(e,t,n)):M()(b),M()({[`${Y}-row-selected`]:Me.has(ce(e,t))},o)},emptyText:He,internalHooks:s,internalRefs:re,transformColumns:Te,getContainerWidth:se})),Pe)))},xv=o.forwardRef(Cv),Ev=(e,t)=>{const n=o.useRef(0);return n.current+=1,o.createElement(xv,Object.assign({},e,{ref:t,_renderTimes:n.current}))},Sv=o.forwardRef(Ev);Sv.SELECTION_COLUMN=Eh,Sv.EXPAND_COLUMN=r,Sv.SELECTION_ALL=Sh,Sv.SELECTION_INVERT=Ah,Sv.SELECTION_NONE=kh,Sv.Column=e=>null,Sv.ColumnGroup=e=>null,Sv.Summary=G;const Av=Sv},7350:(e,t,n)=>{var o=n(38221),i=n(23805);e.exports=function(e,t,n){var r=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),o(e,t,{leading:r,maxWait:t,trailing:s})}},8719:(e,t,n)=>{"use strict";n.d(t,{A9:()=>g,H3:()=>m,K4:()=>u,Xf:()=>c,f3:()=>h,xK:()=>d});var o=n(82284),i=n(96540),r=n(66351),s=n(28104),a=n(76288),l=Number(i.version.split(".")[0]),c=function(e,t){"function"==typeof e?e(t):"object"===(0,o.A)(e)&&e&&"current"in e&&(e.current=t)},u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t.filter(Boolean);return o.length<=1?o[0]:function(e){t.forEach((function(t){c(t,e)}))}},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.A)((function(){return u.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))},h=function(e){var t,n;if(!e)return!1;if(p(e)&&l>=19)return!0;var o=(0,r.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof o||null!==(t=o.prototype)&&void 0!==t&&t.render||o.$$typeof===r.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===r.ForwardRef)};function p(e){return(0,i.isValidElement)(e)&&!(0,a.A)(e)}var m=function(e){return p(e)&&h(e)},g=function(e){if(e&&p(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null}},9325:(e,t,n)=>{var o=n(34840),i="object"==typeof self&&self&&self.Object===Object&&self,r=o||i||Function("return this")();e.exports=r},9553:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var o=n(58296);function i(e){return o.A}},10124:(e,t,n)=>{var o=n(9325);e.exports=function(){return o.Date.now()}},10786:(e,t,n)=>{"use strict";n.d(t,{AV:()=>f,DW:()=>s,EJ:()=>d,Ks:()=>l,P$:()=>v,YW:()=>g,lj:()=>p,nt:()=>a,p1:()=>u,tm:()=>m,tw:()=>b,uP:()=>h});var o=n(31216),i=n(60957);const r=e=>e.items,s=(0,o.M)(r,(e=>e.loading)),a=(0,o.M)(r,(e=>e.error)),l=(0,o.M)(r,(e=>e.itemMetaLookup)),c=[],u=(0,o.M)([r,(e,t)=>t],((e,t)=>e.itemOrderedChildrenIdsLookup[t??i.T2]??c)),d=(0,o.M)([r,(e,t)=>t],((e,t)=>e.itemModelLookup[t])),h=(0,o.M)([l,(e,t)=>t],((e,t)=>e[t??i.T2]??null)),p=(0,o.M)([l,(e,t)=>t],i.gE),m=(0,o.M)([r,h],((e,t)=>null==t?-1:e.itemChildrenIndexesLookup[t.parentId??i.T2][t.id])),g=(0,o.M)([h],(e=>e?.parentId??null)),f=(0,o.M)([h],(e=>e?.depth??0)),b=(0,o.M)([r],(e=>e.disabledItemsFocusable)),v=(0,o.M)([b,p],((e,t)=>!!e||!t))},12533:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(5544),i=n(26956),r=n(30981),s=n(1233);function a(e){return void 0!==e}function l(e,t){var n=t||{},l=n.defaultValue,c=n.value,u=n.onChange,d=n.postState,h=(0,s.A)((function(){return a(c)?c:a(l)?"function"==typeof l?l():l:"function"==typeof e?e():e})),p=(0,o.A)(h,2),m=p[0],g=p[1],f=void 0!==c?c:m,b=d?d(f):f,v=(0,i.A)(u),w=(0,s.A)([f]),y=(0,o.A)(w,2),C=y[0],x=y[1];return(0,r.o)((function(){var e=C[0];m!==e&&v(m,e)}),[C]),(0,r.o)((function(){a(c)||g(c)}),[c]),[b,(0,i.A)((function(e,t){g(e,t),x([f],t)}))]}},12897:(e,t,n)=>{var o=n(43693);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},15265:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(77132),i=n(45748),r=n(50723),s=n(2616);var a=n(94925);const l=(e,t)=>new s.Y(e).setA(t).toRgbString(),c=(e,t)=>new s.Y(e).darken(t).toHexString(),u=e=>{const t=(0,i.cM)(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},d=(e,t)=>{const n=e||"#fff",o=t||"#000";return{colorBgBase:n,colorTextBase:o,colorText:l(o,.88),colorTextSecondary:l(o,.65),colorTextTertiary:l(o,.45),colorTextQuaternary:l(o,.25),colorFill:l(o,.15),colorFillSecondary:l(o,.06),colorFillTertiary:l(o,.04),colorFillQuaternary:l(o,.02),colorBgSolid:l(o,1),colorBgSolidHover:l(o,.75),colorBgSolidActive:l(o,.95),colorBgLayout:c(n,4),colorBgContainer:c(n,0),colorBgElevated:c(n,0),colorBgSpotlight:l(o,.85),colorBgBlur:"transparent",colorBorder:c(n,15),colorBorderSecondary:c(n,6)}},h=(0,o.an)((function(e){i.uy.pink=i.uy.magenta,i.UA.pink=i.UA.magenta;const t=Object.keys(r.r).map((t=>{const n=e[t]===i.uy[t]?i.UA[t]:(0,i.cM)(e[t]);return Array.from({length:10},(()=>1)).reduce(((e,o,i)=>(e[`${t}-${i+1}`]=n[i],e[`${t}${i+1}`]=n[i],e)),{})})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),function(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:o,colorWarning:i,colorError:r,colorInfo:a,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=t(l),h=t(o),p=t(i),m=t(r),g=t(a),f=n(c,u),b=t(e.colorLink||e.colorInfo),v=new s.Y(m[1]).mix(new s.Y(m[3]),50).toHexString();return Object.assign(Object.assign({},f),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:h[1],colorSuccessBgHover:h[2],colorSuccessBorder:h[3],colorSuccessBorderHover:h[4],colorSuccessHover:h[4],colorSuccess:h[6],colorSuccessActive:h[7],colorSuccessTextHover:h[8],colorSuccessText:h[9],colorSuccessTextActive:h[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:v,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new s.Y("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}(e,{generateColorPalettes:u,generateNeutralColorPalettes:d})),(e=>{const t=(0,a.A)(e),n=t.map((e=>e.size)),o=t.map((e=>e.lineHeight)),i=n[1],r=n[0],s=n[2],l=o[1],c=o[0],u=o[2];return{fontSizeSM:r,fontSize:i,fontSizeLG:s,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:l,lineHeightLG:u,lineHeightSM:c,fontHeight:Math.round(l*i),fontHeightLG:Math.round(u*s),fontHeightSM:Math.round(c*r),lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}})(e.fontSize)),function(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}(e)),(e=>{const{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}})(e)),function(e){const{motionUnit:t,motionBase:n,borderRadius:o,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+2*t).toFixed(1)}s`,motionDurationSlow:`${(n+3*t).toFixed(1)}s`,lineWidthBold:i+1},(e=>{let t=e,n=e,o=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?o=1:e>=6&&(o=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:o,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:i}})(o))}(e))})),p=h},15411:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(31601),i=n.n(o),r=n(76314),s=n.n(r)()(i());s.push([e.id,'.tabulator{background-color:#888;border:1px solid #999;font-size:14px;overflow:hidden;position:relative;text-align:left;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableholder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select,.tabulator.tabulator-ranges .tabulator-cell:not(.tabulator-editing){user-select:none}.tabulator .tabulator-header{background-color:#e6e6e6;border-bottom:1px solid #999;box-sizing:border-box;color:#555;font-weight:700;outline:none;overflow:hidden;position:relative;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;white-space:nowrap;width:100%}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-header-contents{overflow:hidden;position:relative}.tabulator .tabulator-header .tabulator-header-contents .tabulator-headers{display:inline-block}.tabulator .tabulator-header .tabulator-col{background:#e6e6e6;border-right:1px solid #aaa;box-sizing:border-box;display:inline-flex;flex-direction:column;justify-content:flex-start;overflow:hidden;position:relative;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{background:#cdcdcd;border:1px solid #999;pointer-events:none;position:absolute}.tabulator .tabulator-header .tabulator-col.tabulator-range-highlight{background-color:#d6d6d6;color:#000}.tabulator .tabulator-header .tabulator-col.tabulator-range-selected{background-color:#3876ca;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;padding:4px;position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-popup-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-popup-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap;width:100%}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title.tabulator-col-title-wrap{text-overflow:clip;white-space:normal}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{background:#fff;border:1px solid #999;box-sizing:border-box;padding:1px;width:100%}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-popup-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{align-items:center;bottom:0;display:flex;position:absolute;right:4px;top:0}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:6px solid #bbb;border-left:6px solid transparent;border-right:6px solid transparent;height:0;width:0}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{border-top:1px solid #aaa;display:flex;margin-right:-1px;overflow:hidden;position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{box-sizing:border-box;margin-top:2px;position:relative;text-align:center;width:100%}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{height:0;width:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-header .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover{background-color:#cdcdcd;cursor:pointer}}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter.tabulator-col-sorter-element .tabulator-arrow:hover{border-bottom:6px solid #555;cursor:pointer}}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:6px solid #bbb;border-top:none}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=ascending] .tabulator-col-content .tabulator-col-sorter{color:#666}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=ascending] .tabulator-col-content .tabulator-col-sorter.tabulator-col-sorter-element .tabulator-arrow:hover{border-bottom:6px solid #555;cursor:pointer}}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=ascending] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:6px solid #666;border-top:none}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=descending] .tabulator-col-content .tabulator-col-sorter{color:#666}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=descending] .tabulator-col-content .tabulator-col-sorter.tabulator-col-sorter-element .tabulator-arrow:hover{border-top:6px solid #555;cursor:pointer}}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=descending] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{align-items:center;display:flex;justify-content:center;text-orientation:mixed;writing-mode:vertical-rl}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-bottom:20px;padding-right:0}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{bottom:auto;justify-content:center;left:0;right:0;top:4px}.tabulator .tabulator-header .tabulator-frozen{left:0;position:sticky;z-index:11}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;box-sizing:border-box;display:inline-block}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{display:inline-block}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableholder{-webkit-overflow-scrolling:touch;overflow:auto;position:relative;white-space:nowrap;width:100%}.tabulator .tabulator-tableholder:focus{outline:none}.tabulator .tabulator-tableholder .tabulator-placeholder{align-items:center;box-sizing:border-box;display:flex;justify-content:center;min-width:100%;width:100%}.tabulator .tabulator-tableholder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%}.tabulator .tabulator-tableholder .tabulator-placeholder .tabulator-placeholder-contents{color:#ccc;display:inline-block;font-size:20px;font-weight:700;padding:10px;text-align:center;white-space:normal}.tabulator .tabulator-tableholder .tabulator-table{background-color:#fff;color:#333;display:inline-block;overflow:visible;position:relative;white-space:nowrap}.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-calcs{background:#e2e2e2!important;font-weight:700}.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-tableholder .tabulator-range-overlay{inset:0;pointer-events:none;position:absolute;z-index:10}.tabulator .tabulator-tableholder .tabulator-range-overlay .tabulator-range{border:1px solid #2975dd;box-sizing:border-box;position:absolute}.tabulator .tabulator-tableholder .tabulator-range-overlay .tabulator-range.tabulator-range-active:after{background-color:#2975dd;border-radius:999px;bottom:-3px;content:"";height:6px;position:absolute;right:-3px;width:6px}.tabulator .tabulator-tableholder .tabulator-range-overlay .tabulator-range-cell-active{border:2px solid #2975dd;box-sizing:border-box;position:absolute}.tabulator .tabulator-footer{background-color:#e6e6e6;border-top:1px solid #999;color:#555;font-weight:700;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;white-space:nowrap}.tabulator .tabulator-footer .tabulator-footer-contents{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:5px 10px}.tabulator .tabulator-footer .tabulator-footer-contents:empty{display:none}.tabulator .tabulator-footer .tabulator-spreadsheet-tabs{margin-top:-5px;overflow-x:auto}.tabulator .tabulator-footer .tabulator-spreadsheet-tabs .tabulator-spreadsheet-tab{border:1px solid #999;border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-top:none;display:inline-block;font-size:.9em;padding:5px}.tabulator .tabulator-footer .tabulator-spreadsheet-tabs .tabulator-spreadsheet-tab:hover{cursor:pointer;opacity:.7}.tabulator .tabulator-footer .tabulator-spreadsheet-tabs .tabulator-spreadsheet-tab.tabulator-spreadsheet-tab-active{background:#fff}.tabulator .tabulator-footer .tabulator-calcs-holder{background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;box-sizing:border-box;overflow:hidden;text-align:left;width:100%}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important;display:inline-block}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{border-bottom:none;margin-bottom:-5px}.tabulator .tabulator-footer>*+.tabulator-page-counter{margin-left:10px}.tabulator .tabulator-footer .tabulator-page-counter{font-weight:400}.tabulator .tabulator-footer .tabulator-paginator{color:#555;flex:1;font-family:inherit;font-size:inherit;font-weight:inherit;text-align:right}.tabulator .tabulator-footer .tabulator-page-size{border:1px solid #aaa;border-radius:3px;display:inline-block;margin:0 5px;padding:2px 5px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{background:hsla(0,0%,100%,.2);border:1px solid #aaa;border-radius:3px;display:inline-block;margin:0 2px;padding:2px 5px}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-footer .tabulator-page:not(disabled):hover{background:rgba(0,0,0,.2);color:#fff;cursor:pointer}}.tabulator .tabulator-col-resize-handle{display:inline-block;margin-left:-3px;margin-right:-3px;position:relative;vertical-align:middle;width:6px;z-index:11}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}}.tabulator .tabulator-col-resize-handle:last-of-type{margin-right:0;width:3px}.tabulator .tabulator-col-resize-guide{background-color:#999;height:100%;margin-left:-.5px;opacity:.5;position:absolute;top:0;width:4px}.tabulator .tabulator-row-resize-guide{background-color:#999;height:4px;left:0;margin-top:-.5px;opacity:.5;position:absolute;width:100%}.tabulator .tabulator-alert{align-items:center;background:rgba(0,0,0,.4);display:flex;height:100%;left:0;position:absolute;text-align:center;top:0;width:100%;z-index:100}.tabulator .tabulator-alert .tabulator-alert-msg{background:#fff;border-radius:10px;display:inline-block;font-size:16px;font-weight:700;margin:0 auto;padding:10px 20px}.tabulator .tabulator-alert .tabulator-alert-msg.tabulator-alert-state-msg{border:4px solid #333;color:#000}.tabulator .tabulator-alert .tabulator-alert-msg.tabulator-alert-state-error{border:4px solid #d00;color:#590000}.tabulator-row{background-color:#fff;box-sizing:border-box;min-height:22px;position:relative}.tabulator-row.tabulator-row-even{background-color:#efefef}@media (hover:hover) and (pointer:fine){.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}}.tabulator-row.tabulator-selected{background-color:#9abcea}@media (hover:hover) and (pointer:fine){.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}}.tabulator-row.tabulator-row-moving{background:#fff;border:1px solid #000}.tabulator-row.tabulator-moving{border-bottom:1px solid #aaa;border-top:1px solid #aaa;pointer-events:none;position:absolute;z-index:15}.tabulator-row.tabulator-range-highlight .tabulator-cell.tabulator-range-row-header{background-color:#d6d6d6;color:#000}.tabulator-row.tabulator-range-highlight.tabulator-range-selected .tabulator-cell.tabulator-range-row-header,.tabulator-row.tabulator-range-selected .tabulator-cell.tabulator-range-row-header{background-color:#3876ca;color:#fff}.tabulator-row .tabulator-row-resize-handle{bottom:0;height:5px;left:0;position:absolute;right:0}.tabulator-row .tabulator-row-resize-handle.prev{bottom:auto;top:0}@media (hover:hover) and (pointer:fine){.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}}.tabulator-row .tabulator-responsive-collapse{border-bottom:1px solid #aaa;border-top:1px solid #aaa;box-sizing:border-box;padding:5px}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{border-right:1px solid #aaa;box-sizing:border-box;display:inline-block;outline:none;overflow:hidden;padding:4px;position:relative;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.tabulator-row .tabulator-cell.tabulator-row-header{background:#e6e6e6;border-bottom:1px solid #aaa;border-right:1px solid #999}.tabulator-row .tabulator-cell.tabulator-frozen{background-color:inherit;display:inline-block;left:0;position:sticky;z-index:11}.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{background:transparent;border:1px;outline:none}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{background:transparent;border:1px;color:#d00}.tabulator-row .tabulator-cell.tabulator-row-handle{align-items:center;display:inline-flex;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{background:#666;height:3px;margin-top:2px;width:100%}.tabulator-row .tabulator-cell.tabulator-range-selected:not(.tabulator-range-only-cell-selected):not(.tabulator-range-row-header){background-color:#9abcea}.tabulator-row .tabulator-cell .tabulator-data-tree-branch-empty{display:inline-block;width:7px}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{border-bottom:2px solid #aaa;border-bottom-left-radius:1px;border-left:2px solid #aaa;display:inline-block;height:9px;margin-right:5px;margin-top:-9px;vertical-align:middle;width:7px}.tabulator-row .tabulator-cell .tabulator-data-tree-control{align-items:center;background:rgba(0,0,0,.1);border:1px solid #333;border-radius:2px;display:inline-flex;height:11px;justify-content:center;margin-right:5px;overflow:hidden;vertical-align:middle;width:11px}@media (hover:hover) and (pointer:fine){.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{background:rgba(0,0,0,.2);cursor:pointer}}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{background:transparent;display:inline-block;height:7px;position:relative;width:1px}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{background:#333;content:"";height:1px;left:-3px;position:absolute;top:3px;width:7px}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{background:#333;display:inline-block;height:7px;position:relative;width:1px}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{background:#333;content:"";height:1px;left:-3px;position:absolute;top:3px;width:7px}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{align-items:center;background:#666;border-radius:20px;color:#fff;display:inline-flex;font-size:1.1em;font-weight:700;height:15px;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;width:15px}@media (hover:hover) and (pointer:fine){.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{cursor:pointer;opacity:.7}}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open{display:none}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle svg{stroke:#fff}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{border-radius:14px;display:inline-block;height:14px;width:14px}.tabulator-row.tabulator-group{background:#ccc;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;box-sizing:border-box;font-weight:700;min-width:100%;padding:5px 5px 5px 10px}@media (hover:hover) and (pointer:fine){.tabulator-row.tabulator-group:hover{background-color:rgba(0,0,0,.1);cursor:pointer}}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{border-bottom:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;margin-right:10px}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{border-bottom:6px solid transparent;border-left:6px solid #666;border-right:0;border-top:6px solid transparent;display:inline-block;height:0;margin-right:16px;vertical-align:middle;width:0}.tabulator-row.tabulator-group span{color:#d00;margin-left:10px}.tabulator-toggle{background:#dcdcdc;border:1px solid #ccc;box-sizing:border-box;display:flex;flex-direction:row}.tabulator-toggle.tabulator-toggle-on{background:#1c6cc2}.tabulator-toggle .tabulator-toggle-switch{background:#fff;border:1px solid #ccc;box-sizing:border-box}.tabulator-popup-container{-webkit-overflow-scrolling:touch;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);box-sizing:border-box;display:inline-block;font-size:14px;overflow-y:auto;position:absolute;z-index:10000}.tabulator-popup{border-radius:3px;padding:5px}.tabulator-tooltip{border-radius:2px;box-shadow:none;font-size:12px;max-width:Min(500px,100%);padding:3px 5px;pointer-events:none}.tabulator-menu .tabulator-menu-item{box-sizing:border-box;padding:5px 10px;position:relative;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}@media (hover:hover) and (pointer:fine){.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{background:#efefef;cursor:pointer}}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{border-color:#aaa;border-style:solid;border-width:1px 1px 0 0;content:"";display:inline-block;height:7px;position:absolute;right:10px;top:calc(5px + .4em);transform:rotate(45deg);vertical-align:top;width:7px}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-list{-webkit-overflow-scrolling:touch;font-size:14px;max-height:200px;overflow-y:auto}.tabulator-edit-list .tabulator-edit-list-item{color:#333;outline:none;padding:4px}.tabulator-edit-list .tabulator-edit-list-item.active{background:#1d68cd;color:#fff}.tabulator-edit-list .tabulator-edit-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-list .tabulator-edit-list-item.focused{outline:1px solid #1d68cd}@media (hover:hover) and (pointer:fine){.tabulator-edit-list .tabulator-edit-list-item:hover{background:#1d68cd;color:#fff;cursor:pointer}}.tabulator-edit-list .tabulator-edit-list-placeholder{color:#333;padding:4px;text-align:center}.tabulator-edit-list .tabulator-edit-list-group{border-bottom:1px solid #aaa;color:#333;font-weight:700;padding:6px 4px 4px}.tabulator-edit-list .tabulator-edit-list-group.tabulator-edit-list-group-level-2,.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-group-level-2{padding-left:12px}.tabulator-edit-list .tabulator-edit-list-group.tabulator-edit-list-group-level-3,.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-group-level-3{padding-left:20px}.tabulator-edit-list .tabulator-edit-list-group.tabulator-edit-list-group-level-4,.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-group-level-4{padding-left:28px}.tabulator-edit-list .tabulator-edit-list-group.tabulator-edit-list-group-level-5,.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-group-level-5{padding-left:36px}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{direction:rtl;text-align:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{border-left:1px solid #aaa;border-right:initial;text-align:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-left:-1px;margin-right:0}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-left:25px;padding-right:0}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-tableholder .tabulator-range-overlay .tabulator-range.tabulator-range-active:after{background-color:#2975dd;border-radius:999px;bottom:-3px;content:"";height:6px;left:-3px;position:absolute;right:auto;width:6px}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa;margin-left:5px;margin-right:0}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-left:5px;margin-right:0}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left{border-left:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-right{border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-col-resize-handle:last-of-type{margin-left:0;margin-right:-3px;width:3px}.tabulator.tabulator-rtl .tabulator-footer .tabulator-calcs-holder{text-align:initial}.tabulator-print-fullscreen{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-data-tree-branch{border-bottom:2px solid #aaa;border-bottom-left-radius:1px;border-left:2px solid #aaa;display:inline-block;height:9px;margin-right:5px;margin-top:-9px;vertical-align:middle;width:7px}.tabulator-print-table .tabulator-print-table-group{background:#ccc;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;box-sizing:border-box;font-weight:700;min-width:100%;padding:5px 5px 5px 10px}@media (hover:hover) and (pointer:fine){.tabulator-print-table .tabulator-print-table-group:hover{background-color:rgba(0,0,0,.1);cursor:pointer}}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{border-bottom:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;margin-right:10px}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{border-bottom:6px solid transparent;border-left:6px solid #666;border-right:0;border-top:6px solid transparent;display:inline-block;height:0;margin-right:16px;vertical-align:middle;width:0}.tabulator-print-table .tabulator-print-table-group span{color:#d00;margin-left:10px}.tabulator-print-table .tabulator-data-tree-control{align-items:center;background:rgba(0,0,0,.1);border:1px solid #333;border-radius:2px;display:inline-flex;height:11px;justify-content:center;margin-right:5px;overflow:hidden;vertical-align:middle;width:11px}@media (hover:hover) and (pointer:fine){.tabulator-print-table .tabulator-data-tree-control:hover{background:rgba(0,0,0,.2);cursor:pointer}}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{background:transparent;display:inline-block;height:7px;position:relative;width:1px}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{background:#333;content:"";height:1px;left:-3px;position:absolute;top:3px;width:7px}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{background:#333;display:inline-block;height:7px;position:relative;width:1px}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{background:#333;content:"";height:1px;left:-3px;position:absolute;top:3px;width:7px}',""]);const a=s},16300:(e,t,n)=>{"use strict";function o(e,t){for(var n=e,o=0;o<t.length;o+=1){if(null==n)return;n=n[t[o]]}return n}n.d(t,{A:()=>o})},18877:(e,t,n)=>{"use strict";n.d(t,{_n:()=>r,rJ:()=>s});var o=n(96540);function i(){}n(68210);const r=o.createContext({}),s=()=>{const e=()=>{};return e.deprecated=i,e}},19268:(e,t,n)=>{"use strict";n.d(t,{P:()=>r,y:()=>i});var o=n(96540);const i=o.createContext({classes:{},slots:{},slotProps:{}}),r=()=>o.useContext(i)},20488:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,h:()=>h});var o=n(82284),i=n(89379),r=n(60436),s=n(87695),a=n(16300);function l(e,t,n,o){if(!t.length)return n;var a,c=(0,s.A)(t),u=c[0],d=c.slice(1);return a=e||"number"!=typeof u?Array.isArray(e)?(0,r.A)(e):(0,i.A)({},e):[],o&&void 0===n&&1===d.length?delete a[u][d[0]]:a[u]=l(a[u],d,n,o),a}function c(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&o&&void 0===n&&!(0,a.A)(e,t.slice(0,-1))?e:l(e,t,n,o)}function u(e){return Array.isArray(e)?[]:{}}var d="undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=u(t[0]);return t.forEach((function(e){!function t(n,s){var l,h=new Set(s),p=(0,a.A)(e,n),m=Array.isArray(p);if(m||(l=p,"object"===(0,o.A)(l)&&null!==l&&Object.getPrototypeOf(l)===Object.prototype)){if(!h.has(p)){h.add(p);var g=(0,a.A)(i,n);m?i=c(i,n,[]):g&&"object"===(0,o.A)(g)||(i=c(i,n,u(p))),d(p).forEach((function(e){t([].concat((0,r.A)(n),[e]),h)}))}}else i=c(i,n,p)}([])})),i}},20998:(e,t,n)=>{"use strict";function o(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,{A:()=>o})},21124:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(46343),i=n(14921);function r({props:e,name:t,defaultTheme:n,themeId:r}){let s=(0,i.A)(n);return r&&(s=s[r]||s),(0,o.A)({theme:s,name:t,props:e})}},21942:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,t:()=>r});var o=n(96148),i=n(1908);function r(e){return(0,i.Ay)("MuiDialogTitle",e)}const s=(0,o.A)("MuiDialogTitle",["root"])},23029:(e,t,n)=>{"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>o})},23805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},24994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},25149:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});const o=(0,n(31216).M)((e=>e.id),(e=>e.treeId))},25371:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=function(e){return+setTimeout(e,16)},i=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(o=function(e){return window.requestAnimationFrame(e)},i=function(e){return window.cancelAnimationFrame(e)});var r=0,s=new Map;function a(e){s.delete(e)}var l=function(e){var t=r+=1;return function n(i){if(0===i)a(t),e();else{var r=o((function(){n(i-1)}));s.set(t,r)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};l.cancel=function(e){var t=s.get(e);return a(e),i(t)};const c=l},25418:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var o=n(96540),i=n(34164),r=n(21362),s=n(26739),a=n(39241),l=n(20439),c=n(96148),u=n(1908);function d(e){return(0,u.Ay)("MuiDialogContent",e)}(0,c.A)("MuiDialogContent",["root","dividers"]);var h=n(21942),p=n(74848);const m=(0,s.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,a.A)((({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${h.A.root} + &`]:{paddingTop:0}}}]})))),g=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiDialogContent"}),{className:o,dividers:s=!1,...a}=n,c={...n,dividers:s},u=(e=>{const{classes:t,dividers:n}=e,o={root:["root",n&&"dividers"]};return(0,r.A)(o,d,t)})(c);return(0,p.jsx)(m,{className:(0,i.A)(u.root,o),ownerState:c,ref:t,...a})}))},25905:(e,t,n)=>{"use strict";n.d(t,{K8:()=>d,L9:()=>i,Nk:()=>s,Y1:()=>p,av:()=>l,dF:()=>r,jk:()=>u,jz:()=>h,t6:()=>a,vj:()=>c});var o=n(77132);const i={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},r=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),s=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),a=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),l=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),c=(e,t,n,o)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,r=n?`.${n}`:i,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let a={};return!1!==o&&(a={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[r]:Object.assign(Object.assign(Object.assign({},a),s),{[i]:s})}},u=(e,t)=>({outline:`${(0,o.zA)(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:null!=t?t:1,transition:"outline-offset 0s, outline 0s"}),d=(e,t)=>({"&:focus-visible":Object.assign({},u(e,t))}),h=e=>({[`.${e}`]:Object.assign(Object.assign({},s()),{[`.${e} .${e}-icon`]:{display:"block"}})}),p=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},d(e)),{"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}})},26773:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var o=n(96540),i=n(34164),r=n(21362),s=n(91092),a=n(39407),l=n(41558),c=n(99798),u=n(49565),d=n(96148),h=n(1908);function p(e){return(0,h.Ay)("MuiDialog",e)}const m=(0,d.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var g=n(58503),f=n(30016),b=n(26739),v=n(53356),w=n(39241),y=n(20439),C=n(85078),x=n(74848);const E=(0,b.Ay)(f.A,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),S=(0,b.Ay)(l.A,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),A=(0,b.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,a.A)(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),k=(0,b.Ay)(u.A,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,a.A)(n.scroll)}`],t[`paperWidth${(0,a.A)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,w.A)((({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${m.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter((e=>"xs"!==e)).map((t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${m.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}}))),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${m.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]})))),R=o.forwardRef((function(e,t){const n=(0,y.b)({props:e,name:"MuiDialog"}),l=(0,v.A)(),d={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{"aria-describedby":h,"aria-labelledby":m,"aria-modal":f=!0,BackdropComponent:b,BackdropProps:w,children:R,className:M,disableEscapeKeyDown:T=!1,fullScreen:I=!1,fullWidth:P=!1,maxWidth:O="sm",onClick:D,onClose:N,open:H,PaperComponent:L=u.A,PaperProps:$={},scroll:_="paper",slots:z={},slotProps:F={},TransitionComponent:B=c.A,transitionDuration:j=d,TransitionProps:W,...V}=n,G={...n,disableEscapeKeyDown:T,fullScreen:I,fullWidth:P,maxWidth:O,scroll:_},K=(e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:i,fullScreen:s}=e,l={root:["root"],container:["container",`scroll${(0,a.A)(n)}`],paper:["paper",`paperScroll${(0,a.A)(n)}`,`paperWidth${(0,a.A)(String(o))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return(0,r.A)(l,p,t)})(G),U=o.useRef(),q=(0,s.A)(m),Y=o.useMemo((()=>({titleId:q})),[q]),X={slots:{transition:B,...z},slotProps:{transition:W,paper:$,backdrop:w,...F}},[Q,J]=(0,C.A)("root",{elementType:S,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:G,className:(0,i.A)(K.root,M),ref:t}),[Z,ee]=(0,C.A)("backdrop",{elementType:E,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:G}),[te,ne]=(0,C.A)("paper",{elementType:k,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:G,className:(0,i.A)(K.paper,$.className)}),[oe,ie]=(0,C.A)("container",{elementType:A,externalForwardedProps:X,ownerState:G,className:K.container}),[re,se]=(0,C.A)("transition",{elementType:c.A,externalForwardedProps:X,ownerState:G,additionalProps:{appear:!0,in:H,timeout:j,role:"presentation"}});return(0,x.jsx)(Q,{closeAfterTransition:!0,slots:{backdrop:Z},slotProps:{backdrop:{transitionDuration:j,as:b,...ee}},disableEscapeKeyDown:T,onClose:N,open:H,onClick:e=>{D&&D(e),U.current&&(U.current=null,N&&N(e,"backdropClick"))},...J,...V,children:(0,x.jsx)(re,{...se,children:(0,x.jsx)(oe,{onMouseDown:e=>{U.current=e.target===e.currentTarget},...ie,children:(0,x.jsx)(te,{as:L,elevation:24,role:"dialog","aria-describedby":h,"aria-labelledby":q,"aria-modal":f,...ne,children:(0,x.jsx)(g.A.Provider,{value:Y,children:R})})})})})}))},26956:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(96540);function i(e){var t=o.useRef();t.current=e;var n=o.useCallback((function(){for(var e,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(o))}),[]);return n}},27668:(e,t,n)=>{"use strict";n.d(t,{QQ:()=>l,Rt:()=>c,cP:()=>u,js:()=>a,l$:()=>s});var o=n(31216),i=n(10786);const r=e=>e.expansion,s=(0,o.M)([r],(e=>e.expandedItems)),a=(0,o.M)([s],(e=>{const t=new Map;return e.forEach((e=>{t.set(e,!0)})),t})),l=(0,o.M)([a,(e,t)=>t],((e,t)=>e.has(t))),c=(0,o.M)([i.uP],(e=>e?.expandable??!1)),u=(0,o.M)([r],(e=>e.expansionTrigger))},27800:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(43145);function i(e,t){if(e){if("string"==typeof e)return(0,o.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,o.A)(e,t):void 0}}},28104:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(96540);function i(e,t,n){var i=o.useRef({});return"value"in i.current&&!n(i.current.condition,t)||(i.current.value=e(),i.current.condition=t),i.current.value}},28540:(e,t,n)=>{"use strict";n.d(t,{F1:()=>c,HG:()=>l,HZ:()=>p,XR:()=>u,c2:()=>d,eI:()=>s,ig:()=>a,nz:()=>h});var o=n(27668),i=n(10786);const r=(e,t)=>{let n=t.length-1;for(;n>=0&&!(0,i.P$)(e,t[n]);)n-=1;if(-1!==n)return t[n]},s=(e,t)=>{const n=(0,i.uP)(e,t);if(!n)return null;const a=(0,i.p1)(e,n.parentId),l=(0,i.tm)(e,t);if(0===l)return n.parentId;let c=l-1;for(;!(0,i.P$)(e,a[c])&&c>=0;)c-=1;if(-1===c)return null==n.parentId?null:s(e,n.parentId);let u=a[c],d=r(e,(0,i.p1)(e,u));for(;(0,o.QQ)(e,u)&&null!=d;)u=d,d=r(e,(0,i.p1)(e,u));return u},a=(e,t)=>{if((0,o.QQ)(e,t)){const n=(0,i.p1)(e,t).find((t=>(0,i.P$)(e,t)));if(null!=n)return n}let n=(0,i.uP)(e,t);for(;null!=n;){const t=(0,i.p1)(e,n.parentId),o=(0,i.tm)(e,n.id);if(o<t.length-1){let n=o+1;for(;!(0,i.P$)(e,t[n])&&n<t.length-1;)n+=1;if((0,i.P$)(e,t[n]))return t[n]}n=(0,i.uP)(e,n.parentId)}return null},l=e=>{let t=null;for(;null==t||(0,o.QQ)(e,t);){const n=(0,i.p1)(e,t),o=r(e,n);if(null==o)return t;t=o}return t},c=e=>(0,i.p1)(e,null).find((t=>(0,i.P$)(e,t))),u=(e,t,n)=>{if(t===n)return[t,n];const o=(0,i.uP)(e,t),r=(0,i.uP)(e,n);if(!o||!r)return[t,n];if(o.parentId===r.id||r.parentId===o.id)return r.parentId===o.id?[o.id,r.id]:[r.id,o.id];const s=[o.id],a=[r.id];let l=o.parentId,c=r.parentId,u=-1!==a.indexOf(l),d=-1!==s.indexOf(c),h=!0,p=!0;for(;!d&&!u;)h&&(s.push(l),u=-1!==a.indexOf(l),h=null!==l,!u&&h&&(l=(0,i.YW)(e,l))),p&&!u&&(a.push(c),d=-1!==s.indexOf(c),p=null!==c,!d&&p&&(c=(0,i.YW)(e,c)));const m=u?l:c,g=(0,i.p1)(e,m),f=s[s.indexOf(m)-1],b=a[a.indexOf(m)-1];return g.indexOf(f)<g.indexOf(b)?[t,n]:[n,t]},d=(e,t,n)=>{const r=t=>{if((0,o.Rt)(e,t)&&(0,o.QQ)(e,t))return(0,i.p1)(e,t)[0];let n=(0,i.uP)(e,t);for(;null!=n;){const t=(0,i.p1)(e,n.parentId),o=(0,i.tm)(e,n.id);if(o<t.length-1)return t[o+1];n=n.parentId?(0,i.uP)(e,n.parentId):null}throw new Error("Invalid range")},[s,a]=u(e,t,n),l=[s];let c=s;for(;c!==a;)c=r(c),(0,i.lj)(e,c)||l.push(c);return l},h=e=>{let t=c(e);const n=[];for(;null!=t;)n.push(t),t=a(e,t);return n},p=(e,t)=>t!==e.closest('*[role="treeitem"]')},29401:(e,t,n)=>{"use strict";n.d(t,{d:()=>r});var o=n(78418);const i=Object.is,r=(e,t,n=void 0,r=i)=>(0,o.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,(e=>t(e,n)),r)},29677:(e,t,n)=>{"use strict";n.d(t,{F:()=>i,i:()=>r});var o=n(96540);const i=o.createContext(null),r=()=>{const e=o.useContext(i);if(null==e)throw new Error(["MUI X: Could not find the Tree View context.","It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.","This can also happen if you are bundling multiple versions of the Tree View."].join("\n"));return e}},30237:(e,t,n)=>{"use strict";n(6469)("flatMap")},30531:(e,t,n)=>{"use strict";var o=n(46518),i=n(69565),r=n(79306),s=n(28551),a=n(1767),l=n(48646),c=n(19462),u=n(9539),d=n(96395),h=n(30684),p=n(84549),m=!d&&!h("flatMap",(function(){})),g=!d&&!m&&p("flatMap",TypeError),f=d||m||g,b=c((function(){for(var e,t,n=this.iterator,o=this.mapper;;){if(t=this.inner)try{if(!(e=s(i(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){u(n,"throw",e)}if(e=s(i(this.next,n)),this.done=!!e.done)return;try{this.inner=l(o(e.value,this.counter++),!1)}catch(e){u(n,"throw",e)}}}));o({target:"Iterator",proto:!0,real:!0,forced:f},{flatMap:function(e){s(this);try{r(e)}catch(e){u(this,"throw",e)}return g?i(g,this,e):new b(a(this),{mapper:e,inner:null})}})},30670:(e,t,n)=>{"use strict";n(30531)},30981:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,o:()=>s});var o=n(96540),i=(0,n(20998).A)()?o.useLayoutEffect:o.useEffect,r=function(e,t){var n=o.useRef(!0);i((function(){return e(n.current)}),t),i((function(){return n.current=!1,function(){n.current=!0}}),[])},s=function(e,t){r((function(t){if(!t)return e()}),t)};const a=r},31216:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var o=n(25508);const i=(0,o.Ad)({memoize:o.i5,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),r=new WeakMap,s=(...e)=>(t,n)=>{const o=t.cacheKey;let s=r.get(o);s||(s=new Map,r.set(o,s));const a=s.get(e);if(a)return a(t,n);const l=i(...e);return s.set(e,l),l(t,n)}},31418:(e,t,n)=>{"use strict";n.d(t,{I$:()=>d,L6:()=>u,U_:()=>c,hc:()=>l});var o=n(31216),i=n(64938),r=n(10786),s=n(60957),a=n(27668);const l=(0,o.M)([i.Go,a.js,r.Ks,r.tw,e=>(0,r.p1)(e,null)],((e,t,n,o,i)=>{const r=e.find((e=>{if(!o&&(0,s.gE)(n,e))return!1;const i=n[e];return i&&(null==i.parentId||t.has(i.parentId))}));if(null!=r)return r;const a=i.find((e=>o||!(0,s.gE)(n,e)));return null!=a?a:null})),c=(0,o.M)([l,(e,t)=>t],((e,t)=>e===t)),u=(0,o.M)((e=>e.focus),(e=>e.focusedItemId)),d=(0,o.M)([u,(e,t)=>t],((e,t)=>e===t))},31524:(e,t,n)=>{"use strict";n.d(t,{sH:()=>q});var o=n(96540),i=n(40961),r=n(84389),s=n(54950),a=n(11080),l=null;function c(){var e;"undefined"!=typeof console&&(e=console).warn.apply(e,arguments)}function u(e){return d(e,"hot-renderer")?(c("Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead."),!0):!!d(e,"hot-editor")&&(c("Providing a component-based editor using `hot-editor`-annotated component is no longer supported. Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead."),!0)}function d(e,t){return o.Children.toArray(e).some((function(e){return void 0!==e.props[t]}))}function h(e,t){if(!e||!t||"boolean"==typeof t)return null;var n=o.createElement(t,null),r=p({},!1);return r.className="".concat("hot-wrapper-editor-container"," ").concat(r.className),i.createPortal(o.createElement("div",Object.assign({},r),n),e.body)}function p(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{id:e.id||(t?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,C(o.key),o)}}function b(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function C(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function x(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}var E=function(){return b((function e(){g(this,e)}),null,[{key:"getSettings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prevProps,o=void 0===n?{}:n,i=t.isInit,r=void 0!==i&&i,s=t.initOnlySettingKeys,a=void 0===s?[]:s,l=function(t){return!(r||!a.includes(t))&&o[t]===e[t]},c={};for(var u in e)"children"!==u&&!l(u)&&e.hasOwnProperty(u)&&(c[u]=e[u]);return c}}])}(),S=(0,o.createContext)(void 0),A=function(e){var t=e.children,n=(0,o.useRef)([]),r=(0,o.useCallback)((function(e,t){n.current[t]=e}),[]),s=(0,o.useRef)(new Map),a=(0,o.useRef)(new Map),c=(0,o.useCallback)((function(){return a.current.clear()}),[]),u=(0,o.useRef)(new Map),d=(0,o.useCallback)((function(){return u.current.clear()}),[]),h=(0,o.useRef)(new Map),p=(0,o.useCallback)((function(e){return function(t,n,r,s,c,d,p){var m="".concat(r,"-").concat(s),g=t.guid,f="".concat(g,"-").concat(m),b="".concat(m,"-").concat(g);if(a.current.has(m)&&(n.innerHTML=a.current.get(m).innerHTML),n&&!n.getAttribute("ghost-table")){for(var v=u.current.get(b),w=h.current.get(f);n.firstChild;)n.removeChild(n.firstChild);if(v&&w)n.appendChild(w);else{var y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;t||(t=document),l||(l=t.createDocumentFragment());var r=null!=o?o:t.createElement("DIV");return l.appendChild(r),{portal:i.createPortal(e,r,n),portalContainer:r}}(o.createElement(e,{instance:t,TD:n,row:r,col:s,prop:c,value:d,cellProperties:p}),n.ownerDocument,b,w),C=y.portal,x=y.portalContainer;h.current.set(f,x),n.appendChild(x),u.current.set(b,C)}}return a.current.set("".concat(r,"-").concat(s),n),n}}),[]),g=(0,o.useRef)((function(){})),f=(0,o.useCallback)((function(e){g.current=e}),[]),b=(0,o.useCallback)((function(){var e;g.current(function(e){if(Array.isArray(e))return m(e)}(e=u.current.values())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}),[]),v=(0,o.useMemo)((function(){return{componentRendererColumns:s.current,columnsSettings:n.current,emitColumnSettings:r,getRendererWrapper:p,clearPortalCache:d,clearRenderedCellCache:c,setRenderersPortalManagerRef:f,pushCellPortalsIntoPortalManager:b}}),[r,p,c,f,b]);return o.createElement(S.Provider,{value:v},t)};function k(){return(0,o.useContext)(S)}var R=(0,o.createContext)(void 0),M=function(e){var t=e.columnIndex,n=e.getOwnerDocument,i=e.children,r=(0,o.useMemo)((function(){return{columnIndex:t,getOwnerDocument:n}}),[t,n]);return o.createElement(R.Provider,{value:r},i)},T=["close","focus","open"],I=["getValue","setValue"],P={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function O(e,t){return function(n){function o(n){var i,s,a,l;return g(this,o),s=this,l=[n],a=v(a=o),i=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(s,w()?Reflect.construct(a,l||[],v(s).constructor):a.apply(s,l)),t.current=i,Object.getOwnPropertyNames(r.Ay.editors.BaseEditor.prototype).forEach((function(t){if("constructor"!==t&&!I.includes(t)){var n=r.Ay.editors.BaseEditor.prototype[t];o.prototype[t]=function(){for(var o,i,r,s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return T.includes(t)||(i=n.call.apply(n,[this].concat(a))),P[t]&&null!==(o=e.current)&&void 0!==o&&o[P[t]]&&(i=(r=e.current[P[t]]).call.apply(r,[this].concat(a))),i}.bind(i)}})),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(o,n),b(o,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e){this.value=e}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(r.Ay.editors.BaseEditor)}var D=(0,o.createContext)(void 0),N=function(e){var t=e.hooksRef,n=e.hotCustomEditorInstanceRef,i=e.children;return o.createElement(D.Provider,{value:{hooksRef:t,hotCustomEditorInstanceRef:n}},i)},H=function(e){return e.type===$},L=["_columnIndex","_getOwnerDocument","children"],$=function(e){var t=k(),n=t.componentRendererColumns,i=t.emitColumnSettings,r=t.getRendererWrapper,s=(0,o.useContext)(R),a=s.columnIndex,l=s.getOwnerDocument,d=(0,o.useRef)(null),p=(0,o.useRef)(null);(0,o.useEffect)((function(){var t,s=function(){var t=E.getSettings(Object.keys(e).filter((function(e){return!L.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}));return e.renderer?(t.renderer=r(e.renderer),n.set(a,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),e.editor?t.editor=O(d,p):e.hotEditor&&(t.editor=e.hotEditor),t}();i(s,a),u(e.children)||(t=e.children,o.Children.toArray(t).length&&c("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children."))}));var m=h(l(),e.editor);return o.createElement(N,{hooksRef:d,hotCustomEditorInstanceRef:p},m)},_=(0,o.forwardRef)((function(e,t){var n,i,r=(n=(0,o.useState)([]),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t);else for(;!(l=(o=r.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(n,i)||x(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=r[0],a=r[1];return(0,o.useImperativeHandle)(t,(function(){return a})),o.createElement(o.Fragment,null,s)}));function z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var F,B,j,W,V={exports:{}};V.exports=function(){if(W)return j;W=1;var e=B?F:(B=1,F="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,j=function(){function o(t,n,o,i,r,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function i(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return r.PropTypes=r,r}}()();var G=z(V.exports),K=(0,o.forwardRef)((function(e,t){var n,i,l=(0,o.useRef)(null),d=(0,o.useRef)(null),m=(0,o.useRef)(null),g=(0,o.useRef)(null),f=(0,o.useRef)(),b=k(),v=(0,o.useCallback)((function(){return l.current&&l.current.isDestroyed?(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null):l.current}),[l]),w=(0,o.useCallback)((function(){return!l.current||l.current.isDestroyed}),[l]),y=(0,o.useCallback)((function(){b.clearRenderedCellCache(),b.componentRendererColumns.clear()}),[b]),C=(0,o.useCallback)((function(){return"undefined"!=typeof window?d.current?d.current.ownerDocument:document:null}),[d]),x=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=w()?[]:(null===(t=v())||void 0===t||null===(t=t.getSettings())||void 0===t?void 0:t._initOnlySettings)||[],r=E.getSettings(e,{prevProps:o,isInit:n,initOnlySettingKeys:i});return r.columns=b.columnsSettings.length?b.columnsSettings:r.columns,e.renderer?(r.renderer=b.getRendererWrapper(e.renderer),b.componentRendererColumns.set("global",!0)):r.renderer=e.hotRenderer||(0,s.gB)("text"),e.editor?r.editor=O(m,g):r.editor=e.hotEditor||(0,a.M8)("text"),r},S=function(e){var t,n;e&&(null!==(t=e.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=e.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&b.componentRendererColumns.size>0&&c("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")};(0,o.useEffect)((function(){var t,n,i=x(!0);return f.current=e,l.current=new r.Ay.Core(d.current,i),l.current.addHook("beforeViewRender",(function(){b.clearPortalCache(),b.clearRenderedCellCache()})),l.current.addHook("afterViewRender",(function(){b.pushCellPortalsIntoPortalManager()})),l.current.init(),S(l.current),u(e.children)||(t=e.children,n=$,o.Children.toArray(t).some((function(e){return e.type!==n}))&&c("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e;y(),null===(e=v())||void 0===e||e.destroy()}}),[]),n=function(){y();var t=v(),n=x(!1,f.current);f.current=e,null==t||t.updateSettings(n,!1),S(t),u(e.children)},i=o.useRef(!1),(0,o.useEffect)((function(){if(i.current)return n();i.current=!0}),undefined),(0,o.useImperativeHandle)(t,(function(){return{get hotElementRef(){return d.current},get hotInstance(){return v()}}}));var A=o.Children.toArray(e.children).filter(H).map((function(e,t){return o.createElement(M,{columnIndex:t,getOwnerDocument:C,key:t},e)})),R=p(e),T=h(C(),e.editor);return o.createElement(o.Fragment,null,o.createElement("div",Object.assign({ref:d},R),A),o.createElement(_,{ref:b.setRenderersPortalManagerRef}),o.createElement(N,{hooksRef:m,hotCustomEditorInstanceRef:g},T))}));K.propTypes={style:G.object,id:G.string,className:G.string};var U=["children"],q=(0,o.forwardRef)((function(e,t){var n,i=e.children,r=function(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,U),s=null!==(n=r.id)&&void 0!==n?n:(0,o.useId)();return o.createElement(A,null,o.createElement(K,Object.assign({id:s},r,{ref:t}),i))}));q.version="15.3.0"},31800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},34477:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var o=n(96540),i=n(34164),r=n(49649),s=n(95548),a=n(57514),l=n(14921),c=n(74848),u=n(61626),d=n(28040),h=n(31355);const p=(0,n(96148).A)("MuiBox",["root"]),m=(0,d.A)(),g=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:u="MuiBox-root",generateClassName:d}=e,h=(0,r.Ay)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(s.A);return o.forwardRef((function(e,o){const r=(0,l.A)(n),{className:s,component:p="div",...m}=(0,a.A)(e);return(0,c.jsx)(h,{as:p,ref:o,className:(0,i.A)(s,d?d(u):u),theme:t&&r[t]||r,...m})}))}({themeId:h.A,defaultTheme:m,defaultClassName:p.root,generateClassName:u.A.generate}),f=g},34552:(e,t,n)=>{"use strict";n.d(t,{m6:()=>m,BD:()=>g});var o=n(89379),i=n(20998),r="data-rc-order",s="data-rc-priority",a="rc-util-key",l=new Map;function c(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):a}function u(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function d(e){return Array.from((l.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,i.A)())return null;var n=t.csp,o=t.prepend,a=t.priority,l=void 0===a?0:a,c=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(o),h="prependQueue"===c,p=document.createElement("style");p.setAttribute(r,c),h&&l&&p.setAttribute(s,"".concat(l)),null!=n&&n.nonce&&(p.nonce=null==n?void 0:n.nonce),p.innerHTML=e;var m=u(t),g=m.firstChild;if(o){if(h){var f=(t.styles||d(m)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(r)))return!1;var t=Number(e.getAttribute(s)||0);return l>=t}));if(f.length)return m.insertBefore(p,f[f.length-1].nextSibling),p}m.insertBefore(p,g)}else m.appendChild(p);return p}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u(t);return(t.styles||d(n)).find((function(n){return n.getAttribute(c(t))===e}))}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=p(e,t);n&&u(t).removeChild(n)}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=u(n),r=d(i),s=(0,o.A)((0,o.A)({},n),{},{styles:r});!function(e,t){var n=l.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var o=h("",t),i=o.parentNode;l.set(e,i),e.removeChild(o)}}(i,s);var a,m,g,f=p(t,s);if(f)return null!==(a=s.csp)&&void 0!==a&&a.nonce&&f.nonce!==(null===(m=s.csp)||void 0===m?void 0:m.nonce)&&(f.nonce=null===(g=s.csp)||void 0===g?void 0:g.nonce),f.innerHTML!==e&&(f.innerHTML=e),f;var b=h(e,s);return b.setAttribute(c(s),t),b}},34840:(e,t,n)=>{var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},37237:(e,t,n)=>{"use strict";n.d(t,{um:()=>ox}),n(16280),n(44114),n(98992),n(54520),n(72577),n(8872);var o=n(95239),i=n(20091),r=n(25155),s=n(32919),a=n(79720);const l="handsontableEditor";class c extends o.t{static get EDITOR_TYPE(){return"handsontable"}open(){super.open();const e=this.htContainer.style;this.htEditor&&(this.htEditor.destroy(),e.width="",e.height="",e.overflow=""),"none"===e.display&&(e.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,i.vZ)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,n,o,i,r){super.prepare(e,t,n,o,i,r);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,themeName:this.hot.getCurrentThemeName(),afterOnCellMouseDown(e,t){const n=this.getSourceData(t.row,t.col);void 0!==n&&a.setValue(n),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,s.X$)(l,r.handsontable),this.htOptions=l}beginEditing(e,t){const n=this.hot.getSettings().onBeginEditing;n&&!1===n()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,n){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,n)}getHeight(){return this.htEditor.view.getTableHeight()+1}getWidth(){return this.htEditor.view.getTableWidth()}assignHooks(){this.hot.addHook("afterDestroy",(()=>{var e;null===(e=this.htEditor)||void 0===e||e.destroy()})),this.hot.addHook("afterSetTheme",((e,t)=>{var n;t||null===(n=this.htEditor)||void 0===n||n.useTheme(e)}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:l,relativeToGroup:a.b,position:"before"},n=(e,t)=>{const n=this.htEditor;if(void 0!==e&&(e<0||n.flipped&&e>n.countRows()-1?n.deselectCell():n.selectCell(e,0),n.getData().length))return t.preventDefault(),(0,r.CA)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let o,i;return!t.getSelectedLast()&&t.flipped?o=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(i=t.getSelectedLast()[0],o=Math.max(0,i-1)):(i=t.getSelectedLast()[0],o=i-1)),n(o,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let o,i;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)o=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;i=t.getSelectedLast()[0],o=Math.min(e,i+1)}}else o=0;return n(o,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}var u=n(77325),d=n(65615),h=n(24360),p=n(38419),m=n(92182),g=n(66422),f=n(83986);function b(e,t,n){v(e,t),t.set(e,n)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){return e.get(C(e,t))}function C(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var x=new WeakMap,E=new WeakMap,S=new WeakSet;class A extends c{constructor(){var e;super(...arguments),v(this,e=S),e.add(this),w(this,"query",null),w(this,"strippedChoices",[]),w(this,"rawChoices",[]),b(this,x,this.hot.guid.slice(0,9)),b(this,E,(0,f.sg)((()=>{this.focus()}),100)),w(this,"sortByRelevance",(function(e,t,n){const o=[],i=[],r=e.length;let s,a,l,c,u=t.length;if(0===r){for(l=0;l<u;l++)i.push(l);return i}for(l=0;l<u;l++){if(a=(0,h.Kq)((0,d.As)(t[l])),n)c=a.indexOf(e);else{const t=this.cellProperties.locale;c=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(s=a.length-c-r,o.push({baseIndex:l,index:c,charsLeft:s,value:a}))}for(o.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),l=0,u=o.length;l<u;l++)i.push(o[l].baseIndex);return i}))}static get EDITOR_TYPE(){return"autocomplete"}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,d.O9)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,i.iQ)(this.htContainer,"autocompleteEditor"),(0,i.iQ)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,i.Bq)(this.TEXTAREA,[(0,g.ZW)(),(0,g.B6)(),(0,g.wP)("listbox"),(0,g.gq)()])}prepare(e,t,n,o,r,s){super.prepare(e,t,n,o,r,s),this.hot.getSettings().ariaTags&&(0,i.Bq)(this.TEXTAREA,[(0,g.dV)("false"),(0,g.Ku)(`${y(x,this)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,n=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,o=null==n?void 0:n.length,{row:r,col:s}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.addHook("afterScroll",y(E,this)),this.htEditor.updateSettings({colWidths:e?[(0,i.Gq)(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(e,r,s,a,l,c,u)=>{(0,m.F)(e,r,s,a,l,c,u);const{filteringCaseSensitive:h,allowHtml:p,locale:f}=this.cellProperties,b=this.query;let v,w,y=(0,d.As)(c);y&&!p&&(v=!0===h?y.indexOf(b):y.toLocaleLowerCase(f).indexOf(b.toLocaleLowerCase(f)),-1!==v&&(w=y.substr(v,b.length),y=y.replace(w,`<strong>${w}</strong>`))),t&&(0,i.Bq)(r,[(0,g.n)(),...n?[(0,g.DY)(o)]:[],...n?[(0,g.Vy)(n.indexOf(c)+1)]:[],["id",`${this.htEditor.rootElement.id}_${s}-${a}`]]),r.innerHTML=y},afterSelectionEnd:(e,n)=>{if(t){const t=e=>{(0,i.Bq)(e,[(0,g.H0)()]),(0,i.Bq)(this.TEXTAREA,...(0,g.VN)(e.id))},o=this.htEditor.getCell(e,n,!0);null!==o?t(o):this.htEditor.addHookOnce("afterScrollVertically",(()=>{const o=this.htEditor.getCell(e,n,!0);t(o)}))}}}),t&&((0,i.Bq)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,g.gg)()),(0,i.Bq)(this.htEditor.rootElement,[(0,g.$o)(),(0,g.S2)("polite"),(0,g.rE)("text"),["id",`${y(x,this)}-listbox-${r}-${s}`]]),(0,i.Bq)(this.TEXTAREA,...(0,g.dV)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,i.Bq)(this.TEXTAREA,[(0,g.dV)("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,i.JC)(this.TEXTAREA),n=(0,i.Xu)(this.TEXTAREA),o=this.cellProperties.sortByRelevance,r=this.cellProperties.filter;let s=null,a=null,l=e;o&&(s=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));const c=Array.isArray(s)?s.length:0;if(!1===r)c&&(a=s[0]);else{const e=[];for(let t=0,n=l.length;t<n&&!(o&&c<=t);t++)c?e.push(l[s[t]]):e.push(l[t]);a=0,l=e}this.strippedChoices=l,0===l.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData((0,u.h9)([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),(0,i.vZ)(this.TEXTAREA,t,t===n?void 0:n)}flipDropdownIfNeeded(){const e=this.getEditedCellRect(),t=e.height;let n=e.top;if(this.hot.view.isVerticallyScrollableByWindow()){const e=this.hot.view.getTableOffset().top-this.hot.rootWindow.scrollY;n=Math.max(n+e,0)}const o=this.getHeight(),i=this.hot.view.getWorkspaceHeight()-n-t,r=o>i&&n>i+t;return r?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(r?n:i,o),r}limitDropdownIfNeeded(e,t){if(t>e){let n=0,o=0,i=0,r=null;do{i=this.htEditor.getRowHeight(o)||this.htEditor.view.getDefaultRowHeight(),n+=i,o+=1}while(n<e);r=n-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-r+"px"),this.setDropdownHeight(n-i)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownDimensions(){this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),C(S,this,k).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),C(S,this,k).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getHeight(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderTopWidth,10)+parseInt(e.borderBottomWidth,10),n=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length);return Array.from({length:n},((e,t)=>t)).reduce(((e,t)=>e+(this.htEditor.getRowHeight(t)||this.htEditor.view.getDefaultRowHeight())),0)+t+1}getWidth(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderInlineStartWidth,10)+parseInt(e.borderInlineEndWidth,10);return this.htEditor.getColWidth(0)+t}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,n=(0,u.YD)(e,(e=>(0,d.As)(e)));return(0,u.YD)(n,(e=>t?e:(0,h.Kq)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),n=t?t.from.row:-1;let o=!1;return e===p.Lb.ARROW_DOWN&&n>0&&n<this.htEditor.countRows()-1&&(o=!0),e===p.Lb.ARROW_UP&&n>-1&&(o=!0),o}onBeforeKeyDown(e){if((0,p.aE)(e.keyCode)||e.keyCode===p.Lb.BACKSPACE||e.keyCode===p.Lb.DELETE||e.keyCode===p.Lb.INSERT){let t=10;if(e.keyCode===p.Lb.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}function k(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getWidth()+(0,i.XJ)(this.hot.rootDocument)})}var R=n(32564);class M extends R.b7{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');(0,i.nB)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var T=n(95093);const I=()=>window,P=()=>window.document,O=(e,t)=>window.setTimeout(e,t),D=function(e,t,n,o){e.addEventListener(t,n,!!o)},N=function(e,t,n,o){e.removeEventListener(t,n,!!o)},H=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},L=function(e,t){H(e,t)||(e.className=""===e.className?t:e.className+" "+t)},$=function(e,t){var n;e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},_=function(e){return/Array/.test(Object.prototype.toString.call(e))},z=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},F=function(e){let t=e.getDay();return 0===t||6===t},B=function(e){return e%4==0&&e%100!=0||e%400==0},j=function(e,t){return[31,B(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},W=function(e){z(e)&&e.setHours(0,0,0,0)},V=function(e,t){return e.getTime()===t.getTime()},G=function(e,t,n){let o,i;for(o in t)i=void 0!==e[o],i&&"object"==typeof t[o]&&null!==t[o]&&void 0===t[o].nodeName?z(t[o])?n&&(e[o]=new Date(t[o].getTime())):_(t[o])?n&&(e[o]=t[o].slice(0)):e[o]=G({},t[o],n):!n&&i||(e[o]=t[o]);return e},K=function(e,t,n){let o=P().createEvent("HTMLEvents");o.initEvent(t,!0,!1),o=G(o,n),e.dispatchEvent(o)},U=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},q={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},Y=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},X=function(e){let t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},Q=function(e,t,n,o,i){let r=new Date(o,n,t),s=e.hasMoment?e.moment(r).isoWeek():function(e,t){e.setHours(0,0,0,0);let n=e.getDate(),o=e.getDay(),i=t,r=i-1,s=function(e){return(e+7-1)%7};e.setDate(n+r-s(o));let a=new Date(e.getFullYear(),0,i),l=(e.getTime()-a.getTime())/864e5;return 1+Math.round((l-r+s(a.getDay()))/7)}(r,i);return'<td class="pika-week">'+s+"</td>"},J=function(e,t,n,o){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(o?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"},Z=function(e,t,n,o,i,r){let s,a,l,c,u,d=e._o,h=n===d.minYear,p=n===d.maxYear,m='<div id="'+r+'" class="pika-title" role="heading" aria-live="polite">',g=!0,f=!0;for(l=[],s=0;s<12;s++)l.push('<option value="'+(n===i?s-t:12+s-t)+'"'+(s===o?' selected="selected"':"")+(h&&s<d.minMonth||p&&s>d.maxMonth?' disabled="disabled"':"")+">"+d.i18n.months[s]+"</option>");for(c='<div class="pika-label">'+d.i18n.months[o]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",_(d.yearRange)?(s=d.yearRange[0],a=d.yearRange[1]+1):(s=n-d.yearRange,a=1+n+d.yearRange),l=[];s<a&&s<=d.maxYear;s++)s>=d.minYear&&l.push('<option value="'+s+'"'+(s===n?' selected="selected"':"")+">"+s+"</option>");return u='<div class="pika-label">'+n+d.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",d.showMonthAfterYear?m+=u+c:m+=c+u,h&&(0===o||d.minMonth>=o)&&(g=!1),p&&(11===o||d.maxMonth<=o)&&(f=!1),0===t&&(m+='<button class="pika-prev'+(g?"":" is-disabled")+'" type="button">'+d.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(m+='<button class="pika-next'+(f?"":" is-disabled")+'" type="button">'+d.i18n.nextMonth+"</button>"),m+"</div>"};function ee(e){let t=this,n=t.config(e);t._onMouseDown=function(e){if(!t._v)return;let o=(e=e||I().event).target||e.srcElement;if(o)if(H(o,"is-disabled")||(!H(o,"pika-button")||H(o,"is-empty")||H(o.parentNode,"is-disabled")?H(o,"pika-prev")?t.prevMonth():H(o,"pika-next")&&t.nextMonth():(t.setDate(new Date(o.getAttribute("data-pika-year"),o.getAttribute("data-pika-month"),o.getAttribute("data-pika-day"))),n.bound&&O((function(){t.hide(),n.blurFieldOnSelect&&n.field&&n.field.blur()}),100))),H(o,"pika-select"))t._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}},t._onChange=function(e){let n=(e=e||I().event).target||e.srcElement;n&&(H(n,"pika-select-month")?t.gotoMonth(n.value):H(n,"pika-select-year")&&t.gotoYear(n.value))},t._onKeyChange=function(e){if(e=e||I().event,t.isVisible())switch(e.keyCode){case 13:case 27:n.field&&n.field.blur();break;case 37:t.adjustDate("subtract",1);break;case 38:t.adjustDate("subtract",7);break;case 39:t.adjustDate("add",1);break;case 40:t.adjustDate("add",7);break;case 8:case 46:t.setDate(null)}},t._parseFieldValue=function(){if(n.parse)return n.parse(n.field.value,n.format);if(this.hasMoment){let e=this.moment(n.field.value,n.format,n.formatStrict);return e&&e.isValid()?e.toDate():null}return new Date(Date.parse(n.field.value))},t._onInputChange=function(e){let n;e.firedBy!==t&&(n=t._parseFieldValue(),z(n)&&t.setDate(n),t._v||t.show())},t._onInputFocus=function(){t.show()},t._onInputClick=function(){t.show()},t._onInputBlur=function(){let e=P().activeElement;do{if(H(e,"pika-single"))return}while(e=e.parentNode);t._c||(t._b=O((function(){t.hide()}),50)),t._c=!1},t._onClick=function(e){let o=(e=e||I().event).target||e.srcElement,i=o;if(o){!hasEventListeners&&H(o,"pika-select")&&(o.onchange||(o.setAttribute("onchange","return;"),D(o,"change",t._onChange)));do{if(H(i,"pika-single")||i===n.trigger)return}while(i=i.parentNode);t._v&&o!==n.trigger&&i!==n.trigger&&t.hide()}},t.el=P().createElement("div"),t.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:""),D(t.el,"mousedown",t._onMouseDown,!0),D(t.el,"touchend",t._onMouseDown,!0),D(t.el,"change",t._onChange),n.keyboardInput&&D(P(),"keydown",t._onKeyChange),n.field&&(n.container?n.container.appendChild(t.el):n.bound?P().body.appendChild(t.el):n.field.parentNode.insertBefore(t.el,n.field.nextSibling),D(n.field,"change",t._onInputChange),n.defaultDate||(n.defaultDate=t._parseFieldValue(),n.setDefaultDate=!0));let o=n.defaultDate;z(o)?n.setDefaultDate?t.setDate(o,!0):t.gotoDate(o):t.gotoDate(new Date),n.bound?(this.hide(),t.el.className+=" is-bound",D(n.trigger,"click",t._onInputClick),D(n.trigger,"focus",t._onInputFocus),D(n.trigger,"blur",t._onInputBlur)):this.show()}ee.prototype={config:function(e){this._o||(this._o=G({},q,!0));let t=G(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;let n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,z(t.minDate)||(t.minDate=!1),z(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),_(t.yearRange)){let e=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||e,t.yearRange[1]=parseInt(t.yearRange[1],10)||e}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||q.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(e){return e=e||this._o.format,z(this._d)?this._o.toString?this._o.toString(this._d,e):this.hasMoment?this.moment(this._d).format(e):this._d.toDateString():""},getMoment:function(){return this.hasMoment?this.moment(this._d):null},setMoment:function(e,t){this.hasMoment&&this.moment.isMoment(e)&&this.setDate(e.toDate(),t)},useMoment:function(e){this.hasMoment=!0,this.moment=e},getDate:function(){return z(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",K(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),!z(e))return;let n=this._o.minDate,o=this._o.maxDate;z(n)&&e<n?e=n:z(o)&&e>o&&(e=o),this._d=new Date(e.getTime()),W(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),K(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())},clear:function(){this.setDate(null)},gotoDate:function(e){let t=!0;if(z(e)){if(this.calendars){let n=new Date(this.calendars[0].year,this.calendars[0].month,1),o=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();o.setMonth(o.getMonth()+1),o.setDate(o.getDate()-1),t=i<n.getTime()||o.getTime()<i}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(e,t){let n,o=this.getDate()||new Date,i=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(o.valueOf()+i):"subtract"===e&&(n=new Date(o.valueOf()-i)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=U(this.calendars[0]);for(let e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=U({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(W(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=q.minDate,this._o.minYear=q.minYear,this._o.minMonth=q.minMonth,this._o.startRange=q.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(W(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=q.maxDate,this._o.maxYear=q.maxYear,this._o.maxMonth=q.maxMonth,this._o.endRange=q.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(!this._v&&!e)return;let t,n=this._o,o=n.minYear,i=n.maxYear,r=n.minMonth,s=n.maxMonth,a="";this._y<=o&&(this._y=o,!isNaN(r)&&this._m<r&&(this._m=r)),this._y>=i&&(this._y=i,!isNaN(s)&&this._m>s&&(this._m=s));for(let e=0;e<n.numberOfMonths;e++)t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),a+='<div class="pika-lendar">'+Z(this,e,this.calendars[e].year,this.calendars[e].month,this.calendars[0].year,t)+this.render(this.calendars[e].year,this.calendars[e].month,t)+"</div>";this.el.innerHTML=a,n.bound&&"hidden"!==n.field.type&&O((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)},adjustPosition:function(){let e,t,n,o,i,r,s,a,l,c,u;this._o.container||(this.el.style.position="absolute",e=this._o.trigger,t=this.el.offsetWidth,n=this.el.offsetHeight,o=I().innerWidth||P().documentElement.clientWidth,i=I().innerHeight||P().documentElement.clientHeight,r=P().body.scrollTop||P().documentElement.scrollTop,c=!0,u=!0,l=e.getBoundingClientRect(),s=l.left+I().pageXOffset,a=l.bottom+I().pageYOffset,(this._o.reposition&&s+t>o||this._o.position.indexOf("right")>-1&&s-t+e.offsetWidth>0)&&(s=s-t+e.offsetWidth,c=!1),(this._o.reposition&&a+n>i+r||this._o.position.indexOf("top")>-1&&a-n-e.offsetHeight>0)&&(a=a-n-e.offsetHeight,u=!1),s<0&&(s=0),a<0&&(a=0),this.el.style.left=s+"px",this.el.style.top=a+"px",L(this.el,c?"left-aligned":"right-aligned"),L(this.el,u?"bottom-aligned":"top-aligned"),$(this.el,c?"right-aligned":"left-aligned"),$(this.el,u?"top-aligned":"bottom-aligned"))},render:function(e,t,n){let o=this._o,i=new Date,r=j(e,t),s=new Date(e,t,1).getDay(),a=[],l=[];W(i),o.firstDay>0&&(s-=o.firstDay,s<0&&(s+=7));let c=0===t?11:t-1,u=11===t?0:t+1,d=0===t?e-1:e,h=11===t?e+1:e,p=j(d,c),m=r+s,g=m;for(;g>7;)g-=7;m+=7-g;let f=!1;for(let n=0,g=0;n<m;n++){let m=new Date(e,t,n-s+1),b=!!z(this._d)&&V(m,this._d),v=V(m,i),w=-1!==o.events.indexOf(m.toDateString()),y=n<s||n>=r+s,C=n-s+1,x=t,E=e,S=o.startRange&&V(o.startRange,m),A=o.endRange&&V(o.endRange,m),k=o.startRange&&o.endRange&&o.startRange<m&&m<o.endRange;y&&(n<s?(C=p+C,x=c,E=d):(C-=r,x=u,E=h));let R={day:C,month:x,year:E,hasEvent:w,isSelected:b,isToday:v,isDisabled:o.minDate&&m<o.minDate||o.maxDate&&m>o.maxDate||o.disableWeekends&&F(m)||o.disableDayFn&&o.disableDayFn(m),isEmpty:y,isStartRange:S,isEndRange:A,isInRange:k,showDaysInNextAndPreviousMonths:o.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:o.enableSelectionDaysInNextAndPreviousMonths};o.pickWholeWeek&&b&&(f=!0),l.push(X(R)),7===++g&&(o.showWeekNumber&&l.unshift(Q(this,n-s,t,e,o.firstWeekOfYearMinDays)),a.push(J(l,o.isRTL,o.pickWholeWeek,f)),l=[],g=0,f=!1)}return function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){let t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+Y(e,t)+'">'+Y(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+"<tbody>"+t.join("")+"</tbody></table>"}(o,a,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),$(this.el,"is-hidden"),this._o.bound&&(D(P(),"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){let e=this._v;!1!==e&&(this._o.bound&&N(P(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),L(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){let e=this._o;this.hide(),N(this.el,"mousedown",this._onMouseDown,!0),N(this.el,"touchend",this._onMouseDown,!0),N(this.el,"change",this._onChange),e.keyboardInput&&N(P(),"keydown",this._onKeyChange),e.field&&(N(e.field,"change",this._onInputChange),e.bound&&(N(e.trigger,"click",this._onInputClick),N(e.trigger,"focus",this._onInputFocus),N(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};var te=n(58002);function ne(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ie="date",re="dateEditor";var se=new WeakSet;class ae extends o.t{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=se),t.add(e),ne(this,"parentDestroyed",!1),ne(this,"$datePicker",null)}static get EDITOR_TYPE(){return ie}init(){if("function"!=typeof T)throw new Error("You need to include moment.js to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()})),this.hot.addHook("afterSetTheme",((e,t)=>{t||((0,i.vy)(this.datePicker,/ht-theme-.*/g),(0,i.iQ)(this.datePicker,e))}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,i.iQ)(this.datePicker,"htDatepickerHolder");const e=this.hot.getCurrentThemeName();(0,i.vy)(this.datePicker,/ht-theme-.*/g),(0,i.iQ)(this.datePicker,e),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,i.nB)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,n,o,i,r){super.prepare(e,t,n,o,i,r)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");this.showDatepicker(e),super.open(),t.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:re})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{const e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()})),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(re),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=oe(se,this,le).call(this),n=this.hot.view.isMouseDown(),o=!!e&&(0,p.Yf)(e.keyCode);let i;this.datePicker.style.display="block",this.$datePicker=new ee(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(T),this.$datePicker._onInputFocus=function(){},this.originalValue?(i=this.originalValue,T(i,t,!0).isValid()&&this.$datePicker.setMoment(T(i,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),o||n||this.setValue("")):this.cellProperties.defaultDate?(i=this.cellProperties.defaultDate,T(i,t,!0).isValid()&&this.$datePicker.setMoment(T(i,t),!0),o||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){var e;const t=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,s.zw)(n,this.cellProperties.datePickerConfig);const o=n.onSelect,i=n.onClose;return n.field=t,n.trigger=t,n.container=this.datePicker,n.bound=!1,n.keyboardInput=!1,n.format=null!==(e=n.format)&&void 0!==e?e:oe(se,this,le).call(this),n.reposition=n.reposition||!1,n.isRTL=!1,n.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=T(t).format(oe(se,this,le).call(this))),this.setValue(t),o&&o(),(0,te.rr)()&&this.hideDatepicker()},n.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),i&&i()},n}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==R._T.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:n,columnIndexMapper:o}=this.hot,{wtOverlays:r}=this.hot.view._wt,{wtTable:s}=null!==(t=r.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,a=n.getVisualFromRenderableIndex(s.getFirstPartiallyVisibleRow()),l=n.getVisualFromRenderableIndex(s.getLastPartiallyVisibleRow()),c=o.getVisualFromRenderableIndex(s.getFirstPartiallyVisibleColumn()),u=o.getVisualFromRenderableIndex(s.getLastPartiallyVisibleColumn());if(this.row>=a&&this.row<=l&&this.col>=c&&this.col<=u){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+e.top+(0,i.DK)(this.TD)}px`;let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-(0,i.Gq)(this.datePicker):t+=e.left,this.datePickerStyle.left=`${t}px`}else this.hideDatepicker()}}function le(){var e;return null!==(e=this.cellProperties.dateFormat)&&void 0!==e?e:"DD/MM/YYYY"}class ce extends A{static get EDITOR_TYPE(){return"dropdown"}prepare(e,t,n,o,i,r){r.filter=!1,r.strict=!0,super.prepare(e,t,n,o,i,r)}}class ue extends o.t{static get EDITOR_TYPE(){return"numeric"}}var de=n(83023);class he extends o.t{constructor(){var e,t,n;super(...arguments),e=this,t="autoResize",n=(0,de.j)(this.hot.rootDocument,{textContent:e=>"•".repeat(e.value.length)}),(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}static get EDITOR_TYPE(){return"password"}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,i.Ie)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}const pe="ht_editor_visible",me="selectEditor";class ge extends R.b7{static get EDITOR_TYPE(){return"select"}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.selectWrapper.style.display="none";const e=this.hot.rootDocument.createElement("DIV"),t=this.hot.getSettings().ariaTags;e.className="htAutocompleteArrow",t&&e.setAttribute(...(0,g.MG)()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),(0,i.iQ)(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(e,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.selectWrapper.style.display="",this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.selectWrapper.style.display="none",(0,i.nB)(this.selectWrapper,pe)&&(0,i.vy)(this.selectWrapper,pe),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,n,o,r,a){super.prepare(e,t,n,o,r,a);const l=this.cellProperties.selectOptions;let c;c="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,i.Ie)(this.select),(0,s.v4)(c,((e,t)=>{const n=this.hot.rootDocument.createElement("OPTION");n.value=t,(0,i.Mv)(n,e),this.select.appendChild(n)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let n=0,o=e.length;n<o;n++)t[e[n]]=e[n];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==R._T.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:n,height:o}=this.getEditedCellRect(),r=this.selectWrapper.style;r.height=`${o}px`,r.width=`${n}px`,r.top=`${e}px`,r[this.hot.isRtl()?"right":"left"]=`${t}px`,r.margin="0px",(0,i.iQ)(this.selectWrapper,pe)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:me};this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(me)}}class fe extends o.t{static get EDITOR_TYPE(){return"time"}prepare(e,t,n,o,i,r){super.prepare(e,t,n,o,i,r),this.TEXTAREA.dir="ltr"}}var be=n(11080),ve=n(69478);function we(e,t,n,o,r,s,a){ve.j.apply(this,[e,t,n,o,r,s,a]),(0,i.Mv)(t,null==s?"":s,!1)}we.RENDERER_TYPE="html";var ye=n(28061);function Ce(e,t,n,o,r,s,a){const{rootDocument:l}=e,c=a.allowHtml?we:m.F,u=l.createElement("DIV"),d=e.getSettings().ariaTags;if(u.className="htAutocompleteArrow",d&&u.setAttribute(...(0,g.MG)()),u.appendChild(l.createTextNode(String.fromCharCode(9660))),c.apply(this,[e,t,n,o,r,s,a]),t.firstChild||t.appendChild(l.createTextNode(String.fromCharCode(160))),t.insertBefore(u,t.firstChild),(0,i.iQ)(t,"htAutocomplete"),!e.acArrowListener){const r=new ye.A(e);e.acArrowListener=function(r){(0,i.nB)(r.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(n,o),t)},r.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{r.destroy()}))}}function xe(e,t,n,o,i,r,s){Ce.apply(this,[e,t,n,o,i,r,s])}Ce.RENDERER_TYPE="autocomplete",xe.RENDERER_TYPE="dropdown",n(23215),n(81454);var Ee=n(63487),Se=n(49138);const Ae=new WeakMap,ke=new WeakMap,Re="htBadValue",Me="data-row",Te="data-col",Ie="checkboxRenderer",Pe="checkbox";function Oe(e,t,n,o,r,s,l){const{rootDocument:c}=e,u=e.getSettings().ariaTags;ve.j.apply(this,[e,t,n,o,r,s,l]),function(e){let t=ke.get(e);if(!t){const{rootElement:n}=e;t=new ye.A(e),t.addEventListener(n,"click",(t=>function(e,t){const{target:n}=e;if(!De(n))return;if(!n.hasAttribute(Me)||!n.hasAttribute(Te))return;const o=parseInt(n.getAttribute(Me),10),i=parseInt(n.getAttribute(Te),10);t.getCellMeta(o,i).readOnly&&e.preventDefault()}(t,e))),t.addEventListener(n,"mouseup",(t=>function(e,t){const{target:n}=e;De(n)&&n.hasAttribute(Me)&&n.hasAttribute(Te)&&setTimeout(t.listen,10)}(t,e))),t.addEventListener(n,"change",(t=>function(e,t){const{target:n}=e;if(!De(n))return;if(!n.hasAttribute(Me)||!n.hasAttribute(Te))return;const o=parseInt(n.getAttribute(Me),10),i=parseInt(n.getAttribute(Te),10),r=t.getCellMeta(o,i);if(!r.readOnly){let n=null;n=e.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,t.setDataAtCell(o,i,n)}}(t,e))),ke.set(e,t)}}(e);let h=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(c);const p=l.label;let m=!1;if(void 0===l.checkedTemplate&&(l.checkedTemplate=!0),void 0===l.uncheckedTemplate&&(l.uncheckedTemplate=!1),(0,i.Ie)(t),s===l.checkedTemplate||(0,d.As)(s).toLocaleLowerCase(l.locale)===(0,d.As)(l.checkedTemplate).toLocaleLowerCase(l.locale)?h.checked=!0:s===l.uncheckedTemplate||(0,d.As)(s).toLocaleLowerCase(l.locale)===(0,d.As)(l.uncheckedTemplate).toLocaleLowerCase(l.locale)?h.checked=!1:(0,d.Im)(s)?(0,i.iQ)(h,"noValue"):(h.style.display="none",(0,i.iQ)(h,Re),m=!0),(0,i.Bq)(h,[[Me,n],[Te,o]]),u&&(0,i.Bq)(h,[(0,g.SM)(h.checked?e.getTranslatedPhrase(Se.CHECKBOX_CHECKED):e.getTranslatedPhrase(Se.CHECKBOX_UNCHECKED)),(0,g.Xq)(h.checked),(0,g.Pk)()]),!m&&p){let i="";if(p.value)i="function"==typeof p.value?p.value.call(this,n,o,r,s):p.value;else if(p.property){const t=e.getDataAtRowProp(n,p.property);i=null!==t?t:""}const a=function(e,t,n){const o=e.createElement("label");o.className="htCheckboxRendererLabel "+(n?"fullWidth":"");const i=e.createTextNode(t);if(n){const t=e.createElement("span");t.appendChild(i),o.appendChild(t)}else o.appendChild(i);return o.cloneNode(!0)}(c,i,!0!==p.separated);"before"===p.position?p.separated?(t.appendChild(a),t.appendChild(h)):(a.appendChild(h),h=a):p.position&&"after"!==p.position||(p.separated?(t.appendChild(h),t.appendChild(a)):(a.insertBefore(h,a.firstChild),h=a))}function f(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=e.getSelectedRange(),o=[],i=new Map;let r=[],s=0;if(n){for(let a=0;a<n.length;a++){const{row:l,col:c}=n[a].getTopStartCorner(),{row:u,col:d}=n[a].getBottomEndCorner();for(let n=l;n<=u;n+=1)for(let a=c;a<=d;a+=1){const l=e.getCellMeta(n,a);if(l.hidden)continue;const c={checkedTemplate:l.checkedTemplate,uncheckedTemplate:l.uncheckedTemplate};if("checkbox"!==l.type){!0!==t||l.readOnly||(i.has(o.length)?i.set(o.length,[...i.get(o.length),[n,a,null]]):i.set(o.length,[[n,a,null]]));continue}if(!0===l.readOnly)continue;void 0===l.checkedTemplate&&(l.checkedTemplate=!0),void 0===l.uncheckedTemplate&&(l.uncheckedTemplate=!1);const u=e.getDataAtCell(n,a);!1===t?[l.checkedTemplate,l.checkedTemplate.toString()].includes(u)?r.push([n,a,l.uncheckedTemplate,c]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(u)&&r.push([n,a,l.checkedTemplate,c]):r.push([n,a,l.uncheckedTemplate,c]),s+=1}o.push(s),s=0}r=r.every((e=>{let[,,t]=e;return t===r[0][2]}))?r.map((e=>{let[t,n,o]=e;return[t,n,o]})):r.map((e=>{let[t,n,,o]=e;return[t,n,o.checkedTemplate]})),r.length>0&&o.forEach(((t,n)=>{let o=r.splice(0,t);i.size&&i.has(n)&&(o=[...o,...i.get(n)]),e.setDataAtCell(o)}))}}function b(){const t=e.getSelectedRange();if(t){for(let n=0;n<t.length;n++){const o=t[n].getTopStartCorner(),r=t[n].getBottomEndCorner();for(let t=o.row;t<=r.row;t++)for(let n=o.col;n<=r.col;n++){if(e.getCellMeta(t,n).readOnly)continue;const o=e.getCell(t,n);if((0,i.sb)(o)&&o.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}(!p||p&&!p.separated)&&t.appendChild(h),m&&t.appendChild(c.createTextNode("#bad-value#")),Ae.has(e)||(Ae.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),n={group:Ie,relativeToGroup:a.b,position:"before"};t.addShortcuts([{keys:[["space"]],callback:()=>(f(),!b()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}},{keys:[["enter"]],callback:()=>(f(),!b()),runOnlyIf:()=>{const t=e.getSelectedRangeLast();return e.getSettings().enterBeginsEditing&&(null==t?void 0:t.highlight.isCell())&&!e.selection.isMultiple()}},{keys:[["delete"],["backspace"]],callback:()=>(f(!0),!b()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}}],n)}())}function De(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}function Ne(e,t,n,o,i,r,s){Ce.apply(this,[e,t,n,o,i,r,s])}Ee.R.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,n){const{label:o,type:i,row:r,column:s,prop:a}=t;if(i===Pe){if(o){const{value:t,property:i}=o;let l=n;if(t)l="function"==typeof t?t(r,s,a,n):t;else if(i){const e=this.getDataAtRowProp(r,i);l=null!==e?e:n}e=l}return e}})),Oe.RENDERER_TYPE=Pe,Ne.RENDERER_TYPE="handsontable";var He,Le,$e,_e,ze,Fe,Be="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function We(){return Le||(Le=1,He={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),He}function Ve(){if(_e)return $e;_e=1;const e=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function n(o,i,r,s,a,l,c){if(!isNaN(+o))return+o;let u="",d=o.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==o)return-1*n(d,i,r,s,a,l);for(let t=0;t<e.length;t++){let c=e[t];if(u=o.replace(RegExp(`([0-9 ])(${c.key})$`),"$1"),u!==o)return n(u,i,r,s,a,l)*c.factor}if(u=o.replace("%",""),u!==o)return n(u,i,r,s,a,l)/100;let h=parseFloat(o);if(isNaN(h))return;let p=s(h);if(p&&"."!==p&&(u=o.replace(new RegExp(`${t(p)}$`),""),u!==o))return n(u,i,r,s,a,l);let m={};Object.keys(l).forEach((e=>{m[l[e]]=e}));let g=Object.keys(m).sort().reverse(),f=g.length;for(let e=0;e<f;e++){let t=g[e],c=m[t];if(u=o.replace(t,""),u!==o){let e;switch(c){case"thousand":e=Math.pow(10,3);break;case"million":e=Math.pow(10,6);break;case"billion":e=Math.pow(10,9);break;case"trillion":e=Math.pow(10,12)}return n(u,i,r,s,a,l)*e}}}function o(e,o,i="",r,s,a,l){if(""===e)return;if(e===s)return 0;let c=function(e,n,o){let i=e.replace(o,"");return i=i.replace(new RegExp(`([0-9])${t(n.thousands)}([0-9])`,"g"),"$1$2"),i=i.replace(n.decimal,"."),i}(e,o,i);return n(c,o,i,r,s,a)}return $e={unformat:function(e,t){const n=Ye();let i,r=n.currentDelimiters(),s=n.currentCurrency().symbol,a=n.currentOrdinal(),l=n.getZeroFormat(),c=n.currentAbbreviations();if("string"==typeof e)i=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;let n=e.split(":");if(3!==n.length)return!1;let o=+n[0],i=+n[1],r=+n[2];return!isNaN(o)&&!isNaN(i)&&!isNaN(r)}(e,r)?function(e){let t=e.split(":"),n=+t[0],o=+t[1];return+t[2]+60*o+3600*n}(e):o(e,r,s,a,l,c);else{if("number"!=typeof e)return;i=e}if(void 0!==i)return i}},$e}function Ge(){if(Fe)return ze;Fe=1;let e=Ve();const t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},o={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function i(t){return void 0!==e.unformat(t)}function r(e,t,o,i=!1){let s=Object.keys(e).map((i=>{if(!t[i])return console.error(`${o} Invalid key: ${i}`),!1;let s=e[i],a=t[i];if("string"==typeof a&&(a={type:a}),"format"===a.type){if(!r(s,n,`[Validate ${i}]`,!0))return!1}else if(typeof s!==a.type)return console.error(`${o} ${i} type mismatched: "${a.type}" expected, "${typeof s}" provided`),!1;if(a.restrictions&&a.restrictions.length){let t=a.restrictions.length;for(let n=0;n<t;n++){let{restriction:t,message:r}=a.restrictions[n];if(!t(s,e))return console.error(`${o} ${i} invalid value: ${r}`),!1}}return a.restriction&&!a.restriction(s,e)?(console.error(`${o} ${i} invalid value: ${a.message}`),!1):a.validValues&&-1===a.validValues.indexOf(s)?(console.error(`${o} ${i} invalid value: must be among ${JSON.stringify(a.validValues)}, "${s}" provided`),!1):!(a.children&&!r(s,a.children,`[Validate ${i}]`))}));return i||s.push(...Object.keys(t).map((n=>{let i=t[n];if("string"==typeof i&&(i={type:i}),i.mandatory){let t=i.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${o} Missing mandatory key "${n}"`),!1}return!0}))),s.reduce(((e,t)=>e&&t),!0)}function s(e){return r(e,n,"[Validate format]")}return ze={validate:function(e,t){let n=i(e),o=s(t);return n&&o},validateFormat:s,validateInput:i,validateLanguage:function(e){return r(e,o,"[Validate language]")}},ze}var Ke,Ue,qe={parseFormat:function(e,t={}){return"string"!=typeof e?e:(e=function(e,t){let n=e.match(/^{([^}]*)}/);return n?(t.prefix=n[1],e.slice(n[0].length)):e}(e,t),e=function(e,t){let n=e.match(/{([^}]*)}$/);return n?(t.postfix=n[1],e.slice(0,-n[0].length)):e}(e,t),function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",void(t.base="general")):-1!==e.indexOf("b")?(t.output="byte",void(t.base="binary")):-1!==e.indexOf("d")?(t.output="byte",void(t.base="decimal")):void(-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time");t.output="percent"}else t.output="currency"}(e,t),function(e,t){let n=e.match(/[1-9]+[0-9]*/);n&&(t.totalLength=+n[0])}(e,t),function(e,t){let n=e.split(".")[0].match(/0+/);n&&(t.characteristic=n[0].length)}(e,t),function(e,t){if(-1!==e.indexOf(".")){let n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,t),function(e,t){-1!==e.indexOf("a")&&(t.average=!0)}(e,t),function(e,t){-1!==e.indexOf("K")?t.forceAverage="thousand":-1!==e.indexOf("M")?t.forceAverage="million":-1!==e.indexOf("B")?t.forceAverage="billion":-1!==e.indexOf("T")&&(t.forceAverage="trillion")}(e,t),function(e,t){let n=e.split(".")[1];if(n){let e=n.match(/0+/);e&&(t.mantissa=e[0].length)}}(e,t),function(e,t){e.match(/\[\.]/)?t.optionalMantissa=!0:e.match(/\./)&&(t.optionalMantissa=!1)}(e,t),function(e,t){const n=e.split(".")[1];n&&(t.trimMantissa=-1!==n.indexOf("["))}(e,t),function(e,t){-1!==e.indexOf(",")&&(t.thousandSeparated=!0)}(e,t),function(e,t){-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0))}(e,t),function(e,t){e.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),e.match(/^\+?-/)&&(t.negative="sign")}(e,t),function(e,t){e.match(/^\+/)&&(t.forceSign=!0)}(e,t),t)}};function Ye(){if(Ue)return Ke;Ue=1;const e=We(),t=Ge(),n=qe;let o,i={},r={},s=null,a={};function l(e){o=e}function c(){return r[o]}return i.languages=()=>Object.assign({},r),i.currentLanguage=()=>o,i.currentBytes=()=>c().bytes||{},i.currentCurrency=()=>c().currency,i.currentAbbreviations=()=>c().abbreviations,i.currentDelimiters=()=>c().delimiters,i.currentOrdinal=()=>c().ordinal,i.currentDefaults=()=>Object.assign({},c().defaults,a),i.currentOrdinalDefaultFormat=()=>Object.assign({},i.currentDefaults(),c().ordinalFormat),i.currentByteDefaultFormat=()=>Object.assign({},i.currentDefaults(),c().byteFormat),i.currentPercentageDefaultFormat=()=>Object.assign({},i.currentDefaults(),c().percentageFormat),i.currentCurrencyDefaultFormat=()=>Object.assign({},i.currentDefaults(),c().currencyFormat),i.currentTimeDefaultFormat=()=>Object.assign({},i.currentDefaults(),c().timeFormat),i.setDefaults=e=>{e=n.parseFormat(e),t.validateFormat(e)&&(a=e)},i.getZeroFormat=()=>s,i.setZeroFormat=e=>s="string"==typeof e?e:null,i.hasZeroFormat=()=>null!==s,i.languageData=e=>{if(e){if(r[e])return r[e];throw new Error(`Unknown tag "${e}"`)}return c()},i.registerLanguage=(e,n=!1)=>{if(!t.validateLanguage(e))throw new Error("Invalid language data");r[e.languageTag]=e,n&&l(e.languageTag)},i.setLanguage=(t,n=e.languageTag)=>{if(!r[t]){let e=t.split("-")[0],o=Object.keys(r).find((t=>t.split("-")[0]===e));return r[o]?void l(o):void l(n)}l(t)},i.registerLanguage(e),o=e.languageTag,Ke=i}var Xe,Qe={exports:{}};Xe=Qe,function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,r="[BigNumber Error] ",s=r+"Number primitive has more than 15 significant digits: ",a=1e14,l=14,c=9007199254740991,u=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,h=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function m(e){for(var t,n,o=1,i=e.length,r=e[0]+"";o<i;){for(t=e[o++]+"",n=l-t.length;n--;t="0"+t);r+=t}for(i=r.length;48===r.charCodeAt(--i););return r.slice(0,i+1||1)}function g(e,t){var n,o,i=e.c,r=t.c,s=e.s,a=t.s,l=e.e,c=t.e;if(!s||!a)return null;if(n=i&&!i[0],o=r&&!r[0],n||o)return n?o?0:-a:s;if(s!=a)return s;if(n=s<0,o=l==c,!i||!r)return o?0:!i^n?1:-1;if(!o)return l>c^n?1:-1;for(a=(l=i.length)<(c=r.length)?l:c,s=0;s<a;s++)if(i[s]!=r[s])return i[s]>r[s]^n?1:-1;return l==c?0:l>c^n?1:-1}function f(e,t,n,o){if(e<t||e>n||e!==i(e))throw Error(r+(o||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var t=e.c.length-1;return p(e.e/l)==t&&e.c[t]%2!=0}function v(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,n){var o,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(o=e.length)){for(i=n,t-=o;--t;i+=n);e+=i}else t<o&&(e=e.slice(0,t)+"."+e.slice(t));return e}t=function e(t){var y,C,x,E,S,A,k,R,M,T,I=V.prototype={constructor:V,toString:null,valueOf:null},P=new V(1),O=20,D=4,N=-7,H=21,L=-1e7,$=1e7,_=!1,z=1,F=0,B={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz",W=!0;function V(e,t){var o,r,a,u,d,h,p,m,g=this;if(!(g instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>$?g.c=g.e=null:e.e<L?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,d=e;d>=10;d/=10,u++);return void(u>$?g.c=g.e=null:(g.e=u,g.c=[e]))}m=String(e)}else{if(!n.test(m=String(e)))return x(g,m,h);g.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(u=m.indexOf("."))>-1&&(m=m.replace(".","")),(d=m.search(/e/i))>0?(u<0&&(u=d),u+=+m.slice(d+1),m=m.substring(0,d)):u<0&&(u=m.length)}else{if(f(t,2,j.length,"Base"),10==t&&W)return q(g=new V(e),O+g.e+1,D);if(m=String(e),h="number"==typeof e){if(0*e!=0)return x(g,m,h,t);if(g.s=1/e<0?(m=m.slice(1),-1):1,V.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else g.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(o=j.slice(0,t),u=d=0,p=m.length;d<p;d++)if(o.indexOf(r=m.charAt(d))<0){if("."==r){if(d>u){u=p;continue}}else if(!a&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){a=!0,d=-1,u=0;continue}return x(g,String(e),h,t)}h=!1,(u=(m=C(m,t,10,g.s)).indexOf("."))>-1?m=m.replace(".",""):u=m.length}for(d=0;48===m.charCodeAt(d);d++);for(p=m.length;48===m.charCodeAt(--p););if(m=m.slice(d,++p)){if(p-=d,h&&V.DEBUG&&p>15&&(e>c||e!==i(e)))throw Error(s+g.s*e);if((u=u-d-1)>$)g.c=g.e=null;else if(u<L)g.c=[g.e=0];else{if(g.e=u,g.c=[],d=(u+1)%l,u<0&&(d+=l),d<p){for(d&&g.c.push(+m.slice(0,d)),p-=l;d<p;)g.c.push(+m.slice(d,d+=l));d=l-(m=m.slice(d)).length}else d-=p;for(;d--;m+="0");g.c.push(+m)}}else g.c=[g.e=0]}function G(e,t,n,o){var i,r,s,a,l;if(null==n?n=D:f(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)l=m(e.c),l=1==o||2==o&&(s<=N||s>=H)?v(l,s):w(l,s,"0");else if(r=(e=q(new V(e),t,n)).e,a=(l=m(e.c)).length,1==o||2==o&&(t<=r||r<=N)){for(;a<t;l+="0",a++);l=v(l,r)}else if(t-=s,l=w(l,r,"0"),r+1>a){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=r-a)>0)for(r+1==a&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function K(e,t){for(var n,o,i=1,r=new V(e[0]);i<e.length;i++)(!(o=new V(e[i])).s||(n=g(r,o))===t||0===n&&r.s===t)&&(r=o);return r}function U(e,t,n){for(var o=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,o++);return(n=o+n*l-1)>$?e.c=e.e=null:n<L?e.c=[e.e=0]:(e.e=n,e.c=t),e}function q(e,t,n,r){var s,c,d,h,p,m,g,f=e.c,b=u;if(f){e:{for(s=1,h=f[0];h>=10;h/=10,s++);if((c=t-s)<0)c+=l,d=t,p=f[m=0],g=i(p/b[s-d-1]%10);else if((m=o((c+1)/l))>=f.length){if(!r)break e;for(;f.length<=m;f.push(0));p=g=0,s=1,d=(c%=l)-l+1}else{for(p=h=f[m],s=1;h>=10;h/=10,s++);g=(d=(c%=l)-l+s)<0?0:i(p/b[s-d-1]%10)}if(r=r||t<0||null!=f[m+1]||(d<0?p:p%b[s-d-1]),r=n<4?(g||r)&&(0==n||n==(e.s<0?3:2)):g>5||5==g&&(4==n||r||6==n&&(c>0?d>0?p/b[s-d]:0:f[m-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=b[(l-t%l)%l],e.e=-t||0):f[0]=e.e=0,e;if(0==c?(f.length=m,h=1,m--):(f.length=m+1,h=b[l-c],f[m]=d>0?i(p/b[s-d]%b[d])*h:0),r)for(;;){if(0==m){for(c=1,d=f[0];d>=10;d/=10,c++);for(d=f[0]+=h,h=1;d>=10;d/=10,h++);c!=h&&(e.e++,f[0]==a&&(f[0]=1));break}if(f[m]+=h,f[m]!=a)break;f[m--]=0,h=1}for(c=f.length;0===f[--c];f.pop());}e.e>$?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function Y(e){var t,n=e.e;return null===n?e.toString():(t=m(e.c),t=n<=N||n>=H?v(t,n):w(t,n,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(r+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(f(n=e[t],0,h,t),O=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(f(n=e[t],0,8,t),D=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(f(n[0],-h,0,t),f(n[1],0,h,t),N=n[0],H=n[1]):(f(n,-h,h,t),N=-(H=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)f(n[0],-h,-1,t),f(n[1],1,h,t),L=n[0],$=n[1];else{if(f(n,-h,h,t),!n)throw Error(r+t+" cannot be zero: "+n);L=-($=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(r+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw _=!n,Error(r+"crypto unavailable");_=n}else _=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(f(n=e[t],0,9,t),z=n),e.hasOwnProperty(t="POW_PRECISION")&&(f(n=e[t],0,h,t),F=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(r+t+" not an object: "+n);B=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(r+t+" invalid: "+n);W="0123456789"==n.slice(0,10),j=n}}return{DECIMAL_PLACES:O,ROUNDING_MODE:D,EXPONENTIAL_AT:[N,H],RANGE:[L,$],CRYPTO:_,MODULO_MODE:z,POW_PRECISION:F,FORMAT:B,ALPHABET:j}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,n,o=e.c,s=e.e,c=e.s;e:if("[object Array]"=={}.toString.call(o)){if((1===c||-1===c)&&s>=-h&&s<=h&&s===i(s)){if(0===o[0]){if(0===s&&1===o.length)return!0;break e}if((t=(s+1)%l)<1&&(t+=l),String(o[0]).length==t){for(t=0;t<o.length;t++)if((n=o[t])<0||n>=a||n!==i(n))break e;if(0!==n)return!0}}}else if(null===o&&null===s&&(null===c||1===c||-1===c))return!0;throw Error(r+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return K(arguments,-1)},V.minimum=V.min=function(){return K(arguments,1)},V.random=(E=9007199254740992,S=Math.random()*E&2097151?function(){return i(Math.random()*E)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,s,a,c,d=0,p=[],m=new V(P);if(null==e?e=O:f(e,0,h),a=o(e/l),_)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));d<a;)(c=131072*t[d]+(t[d+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[d]=n[0],t[d+1]=n[1]):(p.push(c%1e14),d+=2);d=a/2}else{if(!crypto.randomBytes)throw _=!1,Error(r+"crypto unavailable");for(t=crypto.randomBytes(a*=7);d<a;)(c=281474976710656*(31&t[d])+1099511627776*t[d+1]+4294967296*t[d+2]+16777216*t[d+3]+(t[d+4]<<16)+(t[d+5]<<8)+t[d+6])>=9e15?crypto.randomBytes(7).copy(t,d):(p.push(c%1e14),d+=7);d=a/7}if(!_)for(;d<a;)(c=S())<9e15&&(p[d++]=c%1e14);for(a=p[--d],e%=l,a&&e&&(c=u[l-e],p[d]=i(a/c)*c);0===p[d];p.pop(),d--);if(d<0)p=[s=0];else{for(s=-1;0===p[0];p.splice(0,1),s-=l);for(d=1,c=p[0];c>=10;c/=10,d++);d<l&&(s-=l-d)}return m.e=s,m.c=p,m}),V.sum=function(){for(var e=1,t=arguments,n=new V(t[0]);e<t.length;)n=n.plus(t[e++]);return n},C=function(){var e="0123456789";function t(e,t,n,o){for(var i,r,s=[0],a=0,l=e.length;a<l;){for(r=s.length;r--;s[r]*=t);for(s[0]+=o.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(n,o,i,r,s){var a,l,c,u,d,h,p,g,f=n.indexOf("."),b=O,v=D;for(f>=0&&(u=F,F=0,n=n.replace(".",""),h=(g=new V(o)).pow(n.length-f),F=u,g.c=t(w(m(h.c),h.e,"0"),10,i,e),g.e=g.c.length),c=u=(p=t(n,o,i,s?(a=j,e):(a=e,j))).length;0==p[--u];p.pop());if(!p[0])return a.charAt(0);if(f<0?--c:(h.c=p,h.e=c,h.s=r,p=(h=y(h,g,b,v,i)).c,d=h.r,c=h.e),f=p[l=c+b+1],u=i/2,d=d||l<0||null!=p[l+1],d=v<4?(null!=f||d)&&(0==v||v==(h.s<0?3:2)):f>u||f==u&&(4==v||d||6==v&&1&p[l-1]||v==(h.s<0?8:7)),l<1||!p[0])n=d?w(a.charAt(1),-b,a.charAt(0)):a.charAt(0);else{if(p.length=l,d)for(--i;++p[--l]>i;)p[l]=0,l||(++c,p=[1].concat(p));for(u=p.length;!p[--u];);for(f=0,n="";f<=u;n+=a.charAt(p[f++]));n=w(n,c,a.charAt(0))}return n}}(),y=function(){function e(e,t,n){var o,i,r,s,a=0,l=e.length,c=t%d,u=t/d|0;for(e=e.slice();l--;)a=((i=c*(r=e[l]%d)+(o=u*r+(s=e[l]/d|0)*c)%d*d+a)/n|0)+(o/d|0)+u*s,e[l]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,o){var i,r;if(n!=o)r=n>o?1:-1;else for(i=r=0;i<n;i++)if(e[i]!=t[i]){r=e[i]>t[i]?1:-1;break}return r}function n(e,t,n,o){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*o+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(o,r,s,c,u){var d,h,m,g,f,b,v,w,y,C,x,E,S,A,k,R,M,T=o.s==r.s?1:-1,I=o.c,P=r.c;if(!(I&&I[0]&&P&&P[0]))return new V(o.s&&r.s&&(I?!P||I[0]!=P[0]:P)?I&&0==I[0]||!P?0*T:T/0:NaN);for(y=(w=new V(T)).c=[],T=s+(h=o.e-r.e)+1,u||(u=a,h=p(o.e/l)-p(r.e/l),T=T/l|0),m=0;P[m]==(I[m]||0);m++);if(P[m]>(I[m]||0)&&h--,T<0)y.push(1),g=!0;else{for(A=I.length,R=P.length,m=0,T+=2,(f=i(u/(P[0]+1)))>1&&(P=e(P,f,u),I=e(I,f,u),R=P.length,A=I.length),S=R,x=(C=I.slice(0,R)).length;x<R;C[x++]=0);M=P.slice(),M=[0].concat(M),k=P[0],P[1]>=u/2&&k++;do{if(f=0,(d=t(P,C,R,x))<0){if(E=C[0],R!=x&&(E=E*u+(C[1]||0)),(f=i(E/k))>1)for(f>=u&&(f=u-1),v=(b=e(P,f,u)).length,x=C.length;1==t(b,C,v,x);)f--,n(b,R<v?M:P,v,u),v=b.length,d=1;else 0==f&&(d=f=1),v=(b=P.slice()).length;if(v<x&&(b=[0].concat(b)),n(C,b,x,u),x=C.length,-1==d)for(;t(P,C,R,x)<1;)f++,n(C,R<x?M:P,x,u),x=C.length}else 0===d&&(f++,C=[0]);y[m++]=f,C[0]?C[x++]=I[S]||0:(C=[I[S]],x=1)}while((S++<A||null!=C[0])&&T--);g=null!=C[0],y[0]||y.splice(0,1)}if(u==a){for(m=1,T=y[0];T>=10;T/=10,m++);q(w,s+(w.e=m+h*l-1)+1,c,g)}else w.e=h,w.r=+g;return w}}(),A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,k=/^([^.]+)\.$/,R=/^\.([^.]+)$/,M=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g,x=function(e,t,n,o){var i,s=n?t:t.replace(T,"");if(M.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!n&&(s=s.replace(A,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,o&&o!=i?e:t})),o&&(i=o,s=s.replace(k,"$1").replace(R,"0.$1")),t!=s))return new V(s,i);if(V.DEBUG)throw Error(r+"Not a"+(o?" base "+o:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return g(this,new V(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,o,i,r=this;if(null!=e)return f(e,0,h),null==t?t=D:f(t,0,8),q(new V(r),e+r.e+1,t);if(!(n=r.c))return null;if(o=((i=n.length-1)-p(this.e/l))*l,i=n[i])for(;i%10==0;i/=10,o--);return o<0&&(o=0),o},I.dividedBy=I.div=function(e,t){return y(this,new V(e,t),O,D)},I.dividedToIntegerBy=I.idiv=function(e,t){return y(this,new V(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,s,a,c,u,d,h,p,m=this;if((e=new V(e)).c&&!e.isInteger())throw Error(r+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new V(t)),u=e.e>14,!m.c||!m.c[0]||1==m.c[0]&&!m.e&&1==m.c.length||!e.c||!e.c[0])return p=new V(Math.pow(+Y(m),u?e.s*(2-b(e)):+Y(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(s=!d&&m.isInteger()&&t.isInteger())&&(m=m.mod(t))}else{if(e.e>9&&(m.e>0||m.e<-1||(0==m.e?m.c[0]>1||u&&m.c[1]>=24e7:m.c[0]<8e13||u&&m.c[0]<=9999975e7)))return c=m.s<0&&b(e)?-0:0,m.e>-1&&(c=1/c),new V(d?1/c:c);F&&(c=o(F/l+2))}for(u?(n=new V(.5),d&&(e.s=1),h=b(e)):h=(a=Math.abs(+Y(e)))%2,p=new V(P);;){if(h){if(!(p=p.times(m)).c)break;c?p.c.length>c&&(p.c.length=c):s&&(p=p.mod(t))}if(a){if(0===(a=i(a/2)))break;h=a%2}else if(q(e=e.times(n),e.e+1,1),e.e>14)h=b(e);else{if(0===(a=+Y(e)))break;h=a%2}m=m.times(m),c?m.c&&m.c.length>c&&(m.c.length=c):s&&(m=m.mod(t))}return s?p:(d&&(p=P.div(p)),t?p.mod(t):c?q(p,F,D,void 0):p)},I.integerValue=function(e){var t=new V(this);return null==e?e=D:f(e,0,8),q(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===g(this,new V(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return g(this,new V(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=g(this,new V(e,t)))||0===t},I.isInteger=function(){return!!this.c&&p(this.e/l)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return g(this,new V(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=g(this,new V(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var n,o,i,r,s=this,c=s.s;if(t=(e=new V(e,t)).s,!c||!t)return new V(NaN);if(c!=t)return e.s=-t,s.plus(e);var u=s.e/l,d=e.e/l,h=s.c,m=e.c;if(!u||!d){if(!h||!m)return h?(e.s=-t,e):new V(m?s:NaN);if(!h[0]||!m[0])return m[0]?(e.s=-t,e):new V(h[0]?s:3==D?-0:0)}if(u=p(u),d=p(d),h=h.slice(),c=u-d){for((r=c<0)?(c=-c,i=h):(d=u,i=m),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(o=(r=(c=h.length)<(t=m.length))?c:t,c=t=0;t<o;t++)if(h[t]!=m[t]){r=h[t]<m[t];break}if(r&&(i=h,h=m,m=i,e.s=-e.s),(t=(o=m.length)-(n=h.length))>0)for(;t--;h[n++]=0);for(t=a-1;o>c;){if(h[--o]<m[o]){for(n=o;n&&!h[--n];h[n]=t);--h[n],h[o]+=a}h[o]-=m[o]}for(;0==h[0];h.splice(0,1),--d);return h[0]?U(e,h,d):(e.s=3==D?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var n,o,i=this;return e=new V(e,t),!i.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||i.c&&!i.c[0]?new V(i):(9==z?(o=e.s,e.s=1,n=y(i,e,0,3),e.s=o,n.s*=o):n=y(i,e,0,z),(e=i.minus(n.times(e))).c[0]||1!=z||(e.s=i.s),e)},I.multipliedBy=I.times=function(e,t){var n,o,i,r,s,c,u,h,m,g,f,b,v,w,y,C=this,x=C.c,E=(e=new V(e,t)).c;if(!(x&&E&&x[0]&&E[0]))return!C.s||!e.s||x&&!x[0]&&!E||E&&!E[0]&&!x?e.c=e.e=e.s=null:(e.s*=C.s,x&&E?(e.c=[0],e.e=0):e.c=e.e=null),e;for(o=p(C.e/l)+p(e.e/l),e.s*=C.s,(u=x.length)<(g=E.length)&&(v=x,x=E,E=v,i=u,u=g,g=i),i=u+g,v=[];i--;v.push(0));for(w=a,y=d,i=g;--i>=0;){for(n=0,f=E[i]%y,b=E[i]/y|0,r=i+(s=u);r>i;)n=((h=f*(h=x[--s]%y)+(c=b*h+(m=x[s]/y|0)*f)%y*y+v[r]+n)/w|0)+(c/y|0)+b*m,v[r--]=h%w;v[r]=n}return n?++o:v.splice(0,1),U(e,v,o)},I.negated=function(){var e=new V(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,o=this,i=o.s;if(t=(e=new V(e,t)).s,!i||!t)return new V(NaN);if(i!=t)return e.s=-t,o.minus(e);var r=o.e/l,s=e.e/l,c=o.c,u=e.c;if(!r||!s){if(!c||!u)return new V(i/0);if(!c[0]||!u[0])return u[0]?e:new V(c[0]?o:0*i)}if(r=p(r),s=p(s),c=c.slice(),i=r-s){for(i>0?(s=r,n=u):(i=-i,n=c),n.reverse();i--;n.push(0));n.reverse()}for((i=c.length)-(t=u.length)<0&&(n=u,u=c,c=n,t=i),i=0;t;)i=(c[--t]=c[t]+u[t]+i)/a|0,c[t]=a===c[t]?0:c[t]%a;return i&&(c=[i].concat(c),++s),U(e,c,s)},I.precision=I.sd=function(e,t){var n,o,i,r=this;if(null!=e&&e!==!!e)return f(e,1,h),null==t?t=D:f(t,0,8),q(new V(r),e,t);if(!(n=r.c))return null;if(o=(i=n.length-1)*l+1,i=n[i]){for(;i%10==0;i/=10,o--);for(i=n[0];i>=10;i/=10,o++);}return e&&r.e+1>o&&(o=r.e+1),o},I.shiftedBy=function(e){return f(e,-9007199254740991,c),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,n,o,i,r=this,s=r.c,a=r.s,l=r.e,c=O+4,u=new V("0.5");if(1!==a||!s||!s[0])return new V(!a||a<0&&(!s||s[0])?NaN:s?r:1/0);if(0==(a=Math.sqrt(+Y(r)))||a==1/0?(((t=m(s)).length+l)%2==0&&(t+="0"),a=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),n=new V(t=a==1/0?"5e"+l:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new V(a+""),n.c[0])for((a=(l=n.e)+c)<3&&(a=0);;)if(i=n,n=u.times(i.plus(y(r,i,c,1))),m(i.c).slice(0,a)===(t=m(n.c)).slice(0,a)){if(n.e<l&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(q(n,n.e+O+2,1),e=!n.times(n).eq(r));break}if(!o&&(q(i,i.e+O+2,0),i.times(i).eq(r))){n=i;break}c+=4,a+=4,o=1}return q(n,n.e+O+1,D,e)},I.toExponential=function(e,t){return null!=e&&(f(e,0,h),e++),G(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(f(e,0,h),e=e+this.e+1),G(this,e,t)},I.toFormat=function(e,t,n){var o,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=B;else if("object"!=typeof n)throw Error(r+"Argument not an object: "+n);if(o=i.toFixed(e,t),i.c){var s,a=o.split("."),l=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",d=a[0],h=a[1],p=i.s<0,m=p?d.slice(1):d,g=m.length;if(c&&(s=l,l=c,c=s,g-=s),l>0&&g>0){for(s=g%l||l,d=m.substr(0,s);s<g;s+=l)d+=u+m.substr(s,l);c>0&&(d+=u+m.slice(s)),p&&(d="-"+d)}o=h?d+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):d}return(n.prefix||"")+o+(n.suffix||"")},I.toFraction=function(e){var t,n,o,i,s,a,c,d,h,p,g,f,b=this,v=b.c;if(null!=e&&(!(c=new V(e)).isInteger()&&(c.c||1!==c.s)||c.lt(P)))throw Error(r+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+Y(c));if(!v)return new V(b);for(t=new V(P),h=n=new V(P),o=d=new V(P),f=m(v),s=t.e=f.length-b.e-1,t.c[0]=u[(a=s%l)<0?l+a:a],e=!e||c.comparedTo(t)>0?s>0?t:h:c,a=$,$=1/0,c=new V(f),d.c[0]=0;p=y(c,t,0,1),1!=(i=n.plus(p.times(o))).comparedTo(e);)n=o,o=i,h=d.plus(p.times(i=h)),d=i,t=c.minus(p.times(i=t)),c=i;return i=y(e.minus(n),o,0,1),d=d.plus(i.times(h)),n=n.plus(i.times(o)),d.s=h.s=b.s,g=y(h,o,s*=2,D).minus(b).abs().comparedTo(y(d,n,s,D).minus(b).abs())<1?[h,o]:[d,n],$=a,g},I.toNumber=function(){return+Y(this)},I.toPrecision=function(e,t){return null!=e&&f(e,1,h),G(this,e,t,2)},I.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=N||i>=H?v(m(n.c),i):w(m(n.c),i,"0"):10===e&&W?t=w(m((n=q(new V(n),O+i+1,D)).c),n.e,"0"):(f(e,2,j.length,"Base"),t=C(w(m(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return Y(this)},I._isBigNumber=!0,null!=t&&V.set(t),V}(),t.default=t.BigNumber=t,Xe.exports?Xe.exports=t:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=t)}(Be);var Je=Qe.exports;const Ze=Ye(),et=Ge(),tt=qe,nt=Je,ot={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},it={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:rt,decimalSuffixes:st}=Ze.currentBytes(),at={general:{scale:1024,suffixes:st,marker:"bd"},binary:{scale:1024,suffixes:rt,marker:"b"},decimal:{scale:1e3,suffixes:st,marker:"d"}};function lt(e,t,n){let o=t[0],i=Math.abs(e);if(i>=n){for(let r=1;r<t.length;++r){let s=Math.pow(n,r),a=Math.pow(n,r+1);if(i>=s&&i<a){o=t[r],e/=s;break}}o===t[0]&&(e/=Math.pow(n,t.length-1),o=t[t.length-1])}return{value:e,suffix:o}}function ct(e){let t="";for(let n=0;n<e;n++)t+="0";return t}function ut({instance:e,providedFormat:t,state:n=Ze,decimalSeparator:o,defaults:i=n.currentDefaults()}){let r=e._value;if(0===r&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(r))return r.toString();let s=Object.assign({},it,i,t),a=s.totalLength,l=a?0:s.characteristic,c=s.optionalCharacteristic,u=s.forceAverage,d=s.lowPrecision,h=!!a||!!u||s.average,p=a?-1:h&&void 0===t.mantissa?0:s.mantissa,m=!a&&(void 0===t.optionalMantissa?-1===p:s.optionalMantissa),g=s.trimMantissa,f=s.thousandSeparated,b=s.spaceSeparated,v=s.negative,w=s.forceSign,y=s.exponential,C=s.roundingFunction,x="";if(h){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:o,spaceSeparated:i=!1,totalLength:r=0,roundingFunction:s=Math.round}){let a="",l=Math.abs(e),c=-1;if(t&&o[t]&&ot[t]?(a=o[t],e/=ot[t]):l>=ot.trillion||n&&1===s(l/ot.trillion)?(a=o.trillion,e/=ot.trillion):l<ot.trillion&&l>=ot.billion||n&&1===s(l/ot.billion)?(a=o.billion,e/=ot.billion):l<ot.billion&&l>=ot.million||n&&1===s(l/ot.million)?(a=o.million,e/=ot.million):(l<ot.million&&l>=ot.thousand||n&&1===s(l/ot.thousand))&&(a=o.thousand,e/=ot.thousand),a&&(a=(i?" ":"")+a),r){let t=e<0,n=e.toString().split(".")[0],o=t?n.length-1:n.length;c=Math.max(r-o,0)}return{value:e,abbreviation:a,mantissaPrecision:c}}({value:r,forceAverage:u,lowPrecision:d,abbreviations:n.currentAbbreviations(),spaceSeparated:b,roundingFunction:C,totalLength:a});r=e.value,x+=e.abbreviation,a&&(p=e.mantissaPrecision)}if(y){let e=function({value:e,characteristicPrecision:t}){let[n,o]=e.toExponential().split("e"),i=+n;return t?(1<t&&(i*=Math.pow(10,t-1),o=+o-(t-1),o=o>=0?`+${o}`:o),{value:i,abbreviation:`e${o}`}):{value:i,abbreviation:`e${o}`}}({value:r,characteristicPrecision:l});r=e.value,x=e.abbreviation+x}let E=function(e,t,n,o,i,r){if(-1===o)return e;let s=function(e,t,n=Math.round){return-1!==e.toString().indexOf("e")?function(e,t){let n=e.toString(),[o,i]=n.split("e"),[r,s=""]=o.split(".");if(+i>0)n=r+s+ct(i-s.length);else{let e=".";e=+r<0?`-0${e}`:`0${e}`;let o=(ct(-i-1)+Math.abs(r)+s).substr(0,t);o.length<t&&(o+=ct(t-o.length)),n=e+o}return+i>0&&t>0&&(n+=`.${ct(t)}`),n}(e,t):new nt(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,o,r),[a,l=""]=s.toString().split(".");if(l.match(/^0+$/)&&(n||i))return a;let c=l.match(/0+$/);return i&&c?`${a}.${l.toString().slice(0,c.index)}`:s.toString()}(r.toString(),r,m,p,g,C);return E=function(e,t,n,o){let i=e,[r,s]=i.toString().split(".");if(r.match(/^-?0$/)&&n)return s?`${r.replace("0","")}.${s}`:r.replace("0","");const a=t<0&&0===r.indexOf("-");if(a&&(r=r.slice(1),i=i.slice(1)),r.length<o){let e=o-r.length;for(let t=0;t<e;t++)i=`0${i}`}return a&&(i=`-${i}`),i.toString()}(E,r,c,l),E=function(e,t,n,o,i){let r=o.currentDelimiters(),s=r.thousands;i=i||r.decimal;let a=r.thousandsSize||3,l=e.toString(),c=l.split(".")[0],u=l.split(".")[1];const d=t<0&&0===c.indexOf("-");if(n){d&&(c=c.slice(1));let e=function(e,t){let n=[],o=0;for(let i=e;i>0;i--)o===t&&(n.unshift(i),o=0),o++;return n}(c.length,a);e.forEach(((e,t)=>{c=c.slice(0,e+t)+s+c.slice(e+t)})),d&&(c=`-${c}`)}return l=u?c+i+u:c,l}(E,r,f,n,o),(h||y)&&(E=function(e,t){return e+t}(E,x)),(w||r<0)&&(E=function(e,t,n){return 0===t?e:0===+e?e.replace("-",""):t>0?`+${e}`:"sign"===n?e:`(${e.replace("-","")})`}(E,r,v)),E}function dt(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}const ht=Je;function pt(e,t,n){let o=new ht(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new ht(i),e._value=o.minus(i).toNumber(),e}const mt=Ye(),gt=Ge(),ft=(e=>({loadLanguagesInNode:t=>function(e,t){e.forEach((e=>{let n;try{n=function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}n&&t.registerLanguage(n)}))}(t,e)}))(Et),bt=Ve();let vt=(e=>({format:(...t)=>function(e,t={},n){if("string"==typeof t&&(t=tt.parseFormat(t)),!et.validateFormat(t))return"ERROR: invalid format";let o=t.prefix||"",i=t.postfix||"",r=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){const o=n.currentCurrency();let i,r=Object.assign({},t),s=Object.assign({},it,r),a="",l=!!s.totalLength||!!s.forceAverage||s.average,c=r.currencyPosition||o.position,u=r.currencySymbol||o.symbol;const d=void 0!==s.spaceSeparatedCurrency?s.spaceSeparatedCurrency:s.spaceSeparated;void 0===r.lowPrecision&&(r.lowPrecision=!1),d&&(a=" "),"infix"===c&&(i=a+u+a);let h=ut({instance:e,providedFormat:r,state:n,decimalSeparator:i});return"prefix"===c&&(h=e._value<0&&"sign"===s.negative?`-${a}${u}${h.slice(1)}`:e._value>0&&s.forceSign?`+${a}${u}${h.slice(1)}`:u+a+h),c&&"postfix"!==c||(a=!s.spaceSeparatedAbbreviation&&l?"":a,h=h+a+u),h}(e,t=dt(t,Ze.currentCurrencyDefaultFormat()),Ze);case"percent":return function(e,t,n,o){let i=t.prefixSymbol,r=ut({instance:o(100*e._value),providedFormat:t,state:n}),s=Object.assign({},it,t);return i?`%${s.spaceSeparated?" ":""}${r}`:`${r}${s.spaceSeparated?" ":""}%`}(e,t=dt(t,Ze.currentPercentageDefaultFormat()),Ze,n);case"byte":return function(e,t,n,o){let i=t.base||"binary",r=Object.assign({},it,t);const{binarySuffixes:s,decimalSuffixes:a}=n.currentBytes();let l={general:{scale:1024,suffixes:a||st,marker:"bd"},binary:{scale:1024,suffixes:s||rt,marker:"b"},decimal:{scale:1e3,suffixes:a||st,marker:"d"}}[i],{value:c,suffix:u}=lt(e._value,l.suffixes,l.scale);return`${ut({instance:o(c),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()})}${r.spaceSeparated?" ":""}${u}`}(e,t=dt(t,Ze.currentByteDefaultFormat()),Ze,n);case"time":return t=dt(t,Ze.currentTimeDefaultFormat()),function(e){let t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),o=Math.round(e._value-60*t*60-60*n);return`${t}:${n<10?"0":""}${n}:${o<10?"0":""}${o}`}(e);case"ordinal":return function(e,t,n){let o=n.currentOrdinal(),i=Object.assign({},it,t),r=ut({instance:e,providedFormat:t,state:n}),s=o(e._value);return`${r}${i.spaceSeparated?" ":""}${s}`}(e,t=dt(t,Ze.currentOrdinalDefaultFormat()),Ze);default:return ut({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return r=function(e,t){return t+e}(r,o),r=function(e,t){return e+t}(r,i),r}(...t,e),getByteUnit:(...t)=>function(e){let t=at.general;return lt(e._value,t.suffixes,t.scale).suffix}(...t,e),getBinaryByteUnit:(...t)=>function(e){let t=at.binary;return lt(e._value,t.suffixes,t.scale).suffix}(...t,e),getDecimalByteUnit:(...t)=>function(e){let t=at.decimal;return lt(e._value,t.suffixes,t.scale).suffix}(...t,e),formatOrDefault:dt}))(Et),wt=(e=>({add:(t,n)=>function(e,t,n){let o=new ht(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new ht(i),e._value=o.plus(i).toNumber(),e}(t,n,e),subtract:(t,n)=>pt(t,n,e),multiply:(t,n)=>function(e,t,n){let o=new ht(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new ht(i),e._value=o.times(i).toNumber(),e}(t,n,e),divide:(t,n)=>function(e,t,n){let o=new ht(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new ht(i),e._value=o.dividedBy(i).toNumber(),e}(t,n,e),set:(t,n)=>function(e,t,n){let o=t;return n.isNumbro(t)&&(o=t._value),e._value=o,e}(t,n,e),difference:(t,n)=>function(e,t,n){let o=n(e._value);return pt(o,t,n),Math.abs(o._value)}(t,n,e),BigNumber:ht}))(Et);const yt=qe;class Ct{constructor(e){this._value=e}clone(){return Et(this._value)}format(e={}){return vt.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=yt.parseFormat(e)),(e=vt.formatOrDefault(e,mt.currentCurrencyDefaultFormat())).output="currency",vt.format(this,e)}formatTime(e={}){return e.output="time",vt.format(this,e)}binaryByteUnits(){return vt.getBinaryByteUnit(this)}decimalByteUnits(){return vt.getDecimalByteUnit(this)}byteUnits(){return vt.getByteUnit(this)}difference(e){return wt.difference(this,e)}add(e){return wt.add(this,e)}subtract(e){return wt.subtract(this,e)}multiply(e){return wt.multiply(this,e)}divide(e){return wt.divide(this,e)}set(e){return wt.set(this,xt(e))}value(){return this._value}valueOf(){return this._value}}function xt(e){let t=e;return Et.isNumbro(e)?t=e._value:"string"==typeof e?t=Et.unformat(e):isNaN(e)&&(t=NaN),t}function Et(e){return new Ct(xt(e))}Et.version="2.5.0",Et.isNumbro=function(e){return e instanceof Ct},Et.language=mt.currentLanguage,Et.registerLanguage=mt.registerLanguage,Et.setLanguage=mt.setLanguage,Et.languages=mt.languages,Et.languageData=mt.languageData,Et.zeroFormat=mt.setZeroFormat,Et.defaultFormat=mt.currentDefaults,Et.setDefaults=mt.setDefaults,Et.defaultCurrencyFormat=mt.currentCurrencyDefaultFormat,Et.validate=gt.validate,Et.loadLanguagesInNode=ft.loadLanguagesInNode,Et.unformat=bt.unformat,Et.BigNumber=wt.BigNumber;var St=je(Et),At=n(71409);function kt(e,t){if((0,At.kf)(e)){const n=t.numericFormat,o=n&&n.culture||"-",i=n&&n.pattern;if(void 0!==o&&!St.languages()[o]){const e=o.replace("-",""),t=St.allLanguages?St.allLanguages[o]:St[e];t&&St.registerLanguage(t)}St.setLanguage(o),e=St(e).format(i||"0")}return e}function Rt(e,t,n,o,i,r,s){let a=r;if((0,At.kf)(a)){let e=[];if(Array.isArray(s.className))e=s.className;else{var l;const t=null!==(l=s.className)&&void 0!==l?l:"";t.length&&(e=t.split(" "))}a=kt(a,s),e.indexOf("htLeft")<0&&e.indexOf("htCenter")<0&&e.indexOf("htRight")<0&&e.indexOf("htJustify")<0&&e.push("htRight"),e.indexOf("htNumeric")<0&&e.push("htNumeric"),s.className=e.join(" "),t.dir="ltr"}(0,m.F)(e,t,n,o,i,a,s)}function Mt(e,t,n,o,r,s,a){m.F.apply(this,[e,t,n,o,r,s,a]);const l=a.hashLength||t.innerHTML.length,c=a.hashSymbol||"*";let u="";(0,At.Ti)(l-1,(()=>{u+=c})),(0,i.Mv)(t,u)}function Tt(e,t,n,o,i,r,s){m.F.apply(this,[e,t,n,o,i,r,s])}function It(e,t,n,o,i,r,s){m.F.apply(this,[e,t,n,o,i,r,s]),t.dir="ltr"}Rt.RENDERER_TYPE="numeric",Mt.RENDERER_TYPE="password",Tt.RENDERER_TYPE="select",It.RENDERER_TYPE="time";var Pt=n(54950);function Ot(e,t){let n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(n,Dt(n,t)):Dt(n,t)(this.source):t(!0)}function Dt(e,t){const n=e;return function(e){let o=!1;for(let t=0,i=e.length;t<i;t++)if(n===e[t]){o=!0;break}t(o)}}function Nt(e,t){const n=(0,be.L3)(ie,this.instance);let o=e,i=!0;null==o&&(o="");let r=T(o,this.dateFormat||n.defaultDateFormat,!0).isValid(),s=T(new Date(o)).isValid()||r;if(this.allowEmpty&&""===o&&(s=!0,r=!0),s||(i=!1),!s&&r&&(i=!0),s&&!r)if(!0===this.correctFormat){const e=function(e,t){const n=T(function(e){const t=new Date(e);return isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}(e)),o=T(e,t),i=e.search(/[A-Za-z]/g)>-1;let r;return r=n.isValid()&&n.format("x")===o.format("x")||!o.isValid()||i?n:o,r.format(t)}(o,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),i=!0}else i=!1;t(i)}function Ht(e,t){Ot.apply(this,[e,t])}function Lt(e,t){let n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&(0,At.kf)(e))}Ot.VALIDATOR_TYPE="autocomplete",Nt.VALIDATOR_TYPE="date",Ht.VALIDATOR_TYPE="dropdown",Lt.VALIDATOR_TYPE="numeric";const $t=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];function _t(e,t){const n=this.timeFormat||"h:mm:ss a";let o=!0,i=e;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const r=/^\d{1,2}$/.test(i);r&&(i+=":00");const s=T(i,$t,!0).isValid()?T(i):T(i,n);let a=s.isValid(),l=T(i,n,!0).isValid()&&!r;if(this.allowEmpty&&""===i&&(a=!0,l=!0),a||(o=!1),!a&&l&&(o=!0),a&&!l)if(!0===this.correctFormat){const e=s.format(n);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),o=!0}else o=!1;t(o)}_t.VALIDATOR_TYPE="time";var zt=n(82993);const Ft={CELL_TYPE:"autocomplete",editor:A,renderer:Ce,validator:Ot},Bt={CELL_TYPE:"checkbox",editor:M,renderer:Oe};function jt(e,t,n,o,i,r,s){Ce.apply(this,[e,t,n,o,i,r,s])}jt.RENDERER_TYPE="date";const Wt={CELL_TYPE:"date",editor:ae,renderer:jt,validator:Nt},Vt={CELL_TYPE:"dropdown",editor:ce,renderer:xe,validator:Ht,filter:!1,strict:!0},Gt={CELL_TYPE:"handsontable",editor:c,renderer:Ne},Kt={CELL_TYPE:"numeric",editor:ue,renderer:Rt,validator:Lt,dataType:"number"},Ut={CELL_TYPE:"password",editor:he,renderer:Mt,copyable:!1},qt={CELL_TYPE:"select",editor:ge,renderer:Tt};var Yt=n(34675);const Xt={CELL_TYPE:"time",editor:fe,renderer:It,validator:_t};var Qt=n(87979);n(3949);var Jt=n(6833);function Zt(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function en(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tn(e,t){return e.get(nn(e,t))}function nn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const on=new Map([["plugin",Jt.Mt],["cell-type",Qt.L4],["editor",be.aZ],["renderer",Pt.sl],["validator",zt.tR]]),rn=Symbol("mainSetting"),sn=[];let an=null;var ln=new WeakMap,cn=new WeakSet;class un{static get PLUGIN_KEY(){return"base"}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}static get DEFAULT_SETTINGS(){return{}}constructor(e){var t;Zt(this,t=cn),t.add(this),en(this,"eventManager",new ye.A(this)),en(this,"pluginName",null),en(this,"pluginsInitializedCallbacks",[]),en(this,"isPluginsReady",!1),en(this,"enabled",!1),en(this,"initialized",!1),function(e,t){Zt(e,t),t.set(e,{})}(this,ln),(0,s.LH)(this,"hot",e,{writable:!1}),an=null,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(e=>this.onUpdateSettings(e))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach((t=>{const[n,o]=t.split(":");if(!on.has(n))throw new Error(`Unknown plugin dependency type "${n}" was found.`);on.get(n)(o)||e.push(` - ${o} (${n})`)})),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,`${e.join("\n")}\n`].join("");sn.push(t)}}if(an||(an=(0,Jt.f4)()),an.indexOf(this.pluginName)>=0&&an.splice(an.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()})),0===an.length){if(sn.length>0){const e=[`${sn.join("\n")}\n`,"You have to import and register them manually."].join("");throw sn.length=0,new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}getSetting(e){const t=this.hot.getSettings()[this.constructor.PLUGIN_KEY];if(void 0===e)return t;const n=this.constructor.DEFAULT_SETTINGS;var o,i;return(Array.isArray(t)||(0,s.Gv)(t))&&n[rn]===e?Array.isArray(t)?t:null!==(o=t[e])&&void 0!==o?o:n[e]:(0,s.Gv)(t)&&null!==(i=t[e])&&void 0!==i?i:n[e]}addHook(e,t,n){tn(ln,this)[e]=tn(ln,this)[e]||[];const o=tn(ln,this)[e];this.hot.addHook(e,t,n),o.push(t),tn(ln,this)[e]=o}removeHooks(e){(0,u.z0)(tn(ln,this)[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=tn(ln,this);(0,s.v4)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,u.z0)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=nn(cn,this,dn).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),(0,s.v4)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}function dn(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"==typeof t)return t;for(let n=0;n<t.length;n++)if(void 0!==e[t[n]])return!0;return!1}var hn=n(13968);function pn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mn=class{constructor(e){pn(this,"hot",null),pn(this,"container",null),pn(this,"injected",!1),pn(this,"rows",[]),pn(this,"columns",[]),pn(this,"samples",null),pn(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),0===e&&(0,i.iQ)(this.table.table,"htGhostTableFirstRow"),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}addColumnHeadersRow(e){if(null!=this.hot.getColHeader(0)){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th,void 0,-1),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}getHeights(e){this.injected||this.injectTable(),(0,u.z0)(this.rows,(t=>{const{height:n}=t.table.getBoundingClientRect();e(t.row,Math.ceil(n))}))}getWidths(e){this.injected||this.injectTable(),(0,u.z0)(this.columns,(t=>{const{width:n}=t.table.getBoundingClientRect();e(t.col,Math.ceil(n))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach((n=>{(0,u.z0)(n.strings,(n=>{t.appendChild(this.createColElement(n.col,e))}))})),t}createRow(e){const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),o=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,o),n.appendChild(o)),this.samples.forEach((o=>{(0,u.z0)(o.strings,(o=>{const i=o.col,r=this.hot.getCellMeta(e,i),s=this.hot.getCellRenderer(r),a=t.createElement("td");a.setAttribute("ghost-table",1),s(this.hot,a,e,i,this.hot.colToProp(i),o.value,r),n.appendChild(a)}))})),n}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),n=[];if(this.hot.hasRowHeaders()){const o=e.createElement("th");n.push([-1,o]),t.appendChild(o)}this.samples.forEach((o=>{(0,u.z0)(o.strings,(o=>{const i=o.col,r=e.createElement("th");n.push([i,r]),t.appendChild(r)}))})),this.table.tHead.appendChild(t),(0,u.z0)(n,(e=>{const[t,n]=e;this.hot.view.appendColHeader(t,n)}))}createCol(e){const{rootDocument:t}=this.hot,n=t.createDocumentFragment();return this.samples.forEach((o=>{(0,u.z0)(o.strings,(o=>{const i=o.row,r=this.hot.getCellMeta(i,e),s=this.hot.getCellRenderer(r),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),s(this.hot,a,i,e,this.hot.colToProp(e),o.value,r),l.appendChild(a),n.appendChild(l)}))})),n}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const n=this.hot.rootDocument.createElement("col");let o=0;t>=0&&e>=0&&(o=this.hot.getCellMeta(t,e).colspan);let i=this.hot.getColWidth(e);if(o>1)for(let t=e+1;t<e+o;t++)i+=this.hot.getColWidth(t);return n.style.width=`${i}px`,n}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),o=t.createElement("table"),r=t.createElement("thead"),s=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),c=t.createElement("th");return this.isVertical()&&o.appendChild(a),this.isHorizontal()&&(l.appendChild(c),r.appendChild(l),o.style.tableLayout="auto",o.style.width="auto"),o.appendChild(r),this.isVertical()&&s.appendChild(l),o.appendChild(s),(0,i.iQ)(o,e),n.appendChild(o),{fragment:n,table:o,tHead:r,tBody:s,colGroup:a,tr:l,th:c}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),o=t.createElement("div"),r=`htGhostTable htAutoSize ${e.trim()}`;return(0,i.iQ)(o,r),n.appendChild(o),{fragment:n,container:o}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}};function gn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class fn{static get SAMPLE_COUNT(){return 3}constructor(e){gn(this,"samples",null),gn(this,"dataFactory",null),gn(this,"customSampleCount",null),gn(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:fn.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,n){const o=new Map,{from:i,to:r}="number"==typeof n?{from:n,to:n}:n;return(0,At.Ti)(i,r,(n=>{const i=this.generateSample(e,t,n);o.set(n,i)})),o}generateSample(e,t,n){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const o=new Map,i="row"===e?"col":"row",r=[];return(0,At.Ti)(t.from,t.to,(t=>{const a="row"===e?this.dataFactory(n,t):this.dataFactory(t,n);if(!1===a)return;const{value:l,bundleSeed:c}=a,u="string"==typeof c&&c.length>0;let h;h=u?c:(0,s.Gv)(l)?`${Object.keys(l).length}`:Array.isArray(l)?`${l.length}`:`${(0,d.As)(l).length}`,o.has(h)||o.set(h,{needed:this.getSampleCount(),strings:[]});const p=o.get(h);p.needed&&(!(r.indexOf(l)>-1)||this.allowDuplicates||u)&&(p.strings.push({value:l,[i]:t}),r.push(l),p.needed-=1)})),o}}const bn=fn;var vn=n(94726),wn=n(48386);function yn(e,t,n){Cn(e,t),t.set(e,n)}function Cn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function En(e,t){return e.get(An(e,t))}function Sn(e,t,n){return e.set(An(e,t),n),n}function An(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("modifyAutoColumnSizeSeed");const kn="autoColumnSize";var Rn=new WeakMap,Mn=new WeakMap,Tn=new WeakMap,In=new WeakSet;class Pn extends un{static get PLUGIN_KEY(){return kn}static get PLUGIN_PRIORITY(){return 10}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){var t;super(e),Cn(this,t=In),t.add(this),xn(this,"ghostTable",new mn(this.hot)),xn(this,"samplesGenerator",new bn(((e,t)=>{const n=this.hot.toPhysicalRow(e),o=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(o))return!1;const i=this.hot.getCellMeta(e,t);let r="";i.spanned||(r=this.hot.getDataAtCell(e,t));let s="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(s=this.hot.runHooks("modifyAutoColumnSizeSeed",s,i,r)),{value:r,bundleSeed:s}}))),xn(this,"inProgress",!1),xn(this,"measuredColumns",0),xn(this,"columnWidthsMap",new wn._),yn(this,Rn,!1),yn(this,Mn,[]),yn(this,Tn,[]),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,n)=>An(In,this,_n).call(this,e,t,n)))}isEnabled(){return!1!==this.hot.getSettings()[kn]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;this.ghostTable.setSetting("useHeaders",this.getSetting("useHeaders")),this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const t=this.getSetting("samplingRatio");t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return An(In,e,Ln).call(e,...n)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return An(In,e,$n).call(e,...n)})),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return An(In,e,Fn).call(e,...n)})),this.addHook("beforeRender",(()=>An(In,this,Hn).call(this))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("init",(()=>An(In,this,zn).call(this))),super.enablePlugin()}updatePlugin(){Sn(Tn,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,n)=>An(In,this,_n).call(this,e,t,n)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.getFirstVisibleColumn(),t=this.getLastVisibleColumn();if(-1===e||-1===t)return;const n=this.hot.forceFullRender;this.calculateColumnsWidth({from:e,to:t},void 0,n)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o="number"==typeof e?{from:e,to:e}:e,i="number"==typeof t?{from:t,to:t}:t;(0,At.Ti)(o.from,o.to,(e=>{let t=this.hot.toPhysicalColumn(e);null===t&&(t=e),(n||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t))&&An(In,this,Dn).call(this,e,i)})),this.ghostTable.columns.length&&(An(In,this,Nn).call(this),this.measuredColumns=o.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const o=this.hot.countCols()-1;let i=null;this.inProgress=!0;const r=()=>{if(!this.hot)return(0,hn.uU)(i),void(this.inProgress=!1);this.calculateColumnsWidth({from:n,to:Math.min(n+Pn.CALCULATION_STEP,o)},e,t),n=n+Pn.CALCULATION_STEP+1,n<o?i=(0,hn.xi)(r):((0,hn.uU)(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();s>=0&&(this.calculateColumnsWidth({from:0,to:s},e,t),n=s+1),n<o?r():this.inProgress=!1}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[kn];let t=Pn.SYNC_CALCULATION_LIMIT;const n=this.hot.countCols()-1;return(0,s.Gv)(e)&&(t=e.syncLimit,(0,h.Pi)(t)?t=(0,At.B5)(n,t):t>>=0),Math.min(t,n)}getColumnWidth(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=t;return void 0===o&&(o=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),n&&"number"==typeof o&&(o=Math.max(o,vn.j))),o}getFirstVisibleColumn(){var e;return null!==(e=this.hot.getFirstRenderedVisibleColumn())&&void 0!==e?e:-1}getLastVisibleColumn(){var e;return null!==(e=this.hot.getLastRenderedVisibleColumn())&&void 0!==e?e:-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce(((e,t,n)=>{const o=En(Mn,this).length;return(o-1<n||En(Mn,this)[n]!==t)&&e.push(this.hot.toVisualColumn(n)),o-1<n?En(Mn,this).push(t):En(Mn,this)[n]=t,e}),[])}clearCache(e){Array.isArray(e)?this.hot.batchExecution((()=>{e.forEach((e=>{this.columnWidthsMap.setValueAtIndex(e,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter((e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function On(e){const t={from:0,to:this.hot.countRows()-1};e.forEach((e=>{const n=this.hot.toPhysicalColumn(e);null!==n&&(this.hot._getColWidthFromSettings(n)||An(In,this,Dn).call(this,e,t))})),this.ghostTable.columns.length&&(An(In,this,Nn).call(this),this.ghostTable.clean())}function Dn(e,t){this.samplesGenerator.generateColumnSamples(e,t).forEach(((e,t)=>this.ghostTable.addColumn(t,e)))}function Nn(){this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const n=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(n,t)}))}),!0)}function Hn(){this.calculateVisibleColumnsWidth(),this.inProgress||(An(In,this,On).call(this,En(Tn,this)),Sn(Tn,this,[]))}function Ln(e,t){t||this.recalculateAllColumnsWidth()}function $n(e){const t=e.reduce(((e,t)=>{let[,n]=t;const o=this.hot.propToCol(n);return Number.isInteger(o)&&-1===e.indexOf(o)&&e.push(o),e}),[]);En(Tn,this).push(...t)}function _n(e,t,n){let o=e;return n&&(this.calculateColumnsWidth(t,void 0,!0),o=this.getColumnWidth(t,void 0,!1)),o}function zn(){Sn(Mn,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth(),Sn(Rn,this,!0)}function Fn(e){if(!En(Rn,this))return;const t=e.reduce(((e,t)=>{var n;const o=null===(n=t.address)||void 0===n?void 0:n.col;if(Number.isInteger(o)){const t=this.hot.toVisualColumn(o);-1===e.indexOf(t)&&e.push(t)}return e}),[]);En(Tn,this).push(...t)}const Bn={horizontal:"horizontal",vertical:"vertical"};function jn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("modifyAutofillRange"),Ee.R.getSingleton().register("beforeAutofill"),Ee.R.getSingleton().register("afterAutofill");const Vn="autofill",Gn=["fillHandle"];var Kn=new WeakSet;class Un extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Kn),t.add(e),jn(this,"addingStarted",!1),jn(this,"mouseDownOnCellCorner",!1),jn(this,"mouseDragOutside",!1),jn(this,"handleDraggedCells",0),jn(this,"directions",[]),jn(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return Vn}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[Vn,...Gn]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>Wn(Kn,this,Yn).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>Wn(Kn,this,qn).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>Wn(Kn,this,Xn).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:n}=e.getTopStartCorner(),{row:o,col:i}=e.getBottomEndCorner(),r=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:n,endRow:o,endCol:i}]),s=[],a=[],l=[];return(0,u.z0)(r,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===s.indexOf(t)&&s.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)})),(0,u.z0)(s,(e=>{const t=[];(0,u.z0)(a,(n=>{t.push(this.hot.getCopyableData(e,n))})),l.push(t)})),l}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,n,o]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast(),r=i.getTopStartCorner(),s=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[r.row,r.col,s.row,s.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(r.row,e),Math.min(r.col,t),Math.max(s.row,n),Math.max(s.col,o)],a),{directionOfDrag:c,startOfDragCoords:u,endOfDragCoords:d}=function(e,t,n){let o,i,r;return t[0]===e[0]&&t[1]<e[1]?(r="left",o=n(t[0],t[1]),i=n(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(r="right",o=n(t[0],e[3]+1),i=n(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(r="up",o=n(t[0],t[1]),i=n(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(r="down",o=n(e[2]+1,t[1]),i=n(t[2],t[3])),o&&o.normalize(),i&&i.normalize(),{directionOfDrag:r,startOfDragCoords:o,endOfDragCoords:i}}(a,l,((e,t)=>this.hot._createCellCoords(e,t)));if(u&&u.row>-1&&u.col>-1){const e=this.getSelectionData(),t=i.clone(),n=this.hot._createCellRange(u,u,d),o=this.hot.runHooks("beforeAutofill",e,t,n,c);if(!1===o)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let r=o;const s=o;if(["up","left"].indexOf(c)>-1&&(1!==s.length||0!==s[0].length))if(r=[],"up"===c){const e=d.row-u.row+1,t=e%s.length;for(let n=0;n<e;n++)r.push(s[(n+(s.length-t))%s.length])}else{const e=d.col-u.col+1,t=e%s[0].length;for(let n=0;n<s.length;n++){r.push([]);for(let o=0;o<e;o++)r[n].push(s[n][(o+(s[n].length-t))%s[n].length])}}this.hot.populateFromArray(u.row,u.col,r,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",r,t,n,c),this.hot.render()}else this.hot.view.render();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),n=t.getBottomEndCorner();let o=e;if(this.directions.includes(Bn.vertical)&&this.directions.includes(Bn.horizontal)){const i=t.getTopStartCorner();(n.col<=e.col||i.col>=e.col)&&(o=this.hot._createCellCoords(n.row,e.col)),(n.row<e.row||i.row>e.row)&&(o=this.hot._createCellCoords(e.row,n.col))}else if(this.directions.includes(Bn.vertical))o=this.hot._createCellCoords(e.row,n.col);else{if(!this.directions.includes(Bn.horizontal))return;o=this.hot._createCellCoords(n.row,e.col)}return this.reduceSelectionAreaIfNeeded(o)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),n=this.hot.countRows();e[2]<n-1&&t[2]===n-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),n=this.hot.countRows();let o;for(let i=e[2]+1;i<n;i++){for(let n=e[1];n<=e[3];n++){const e=t[i][n];if(!(0,d.Im)(e))return-1}const n=t[i][e[1]-1],r=t[i][e[3]+1];(0,d.Im)(n)&&(0,d.Im)(r)||(o=i)}return o}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...(0,u.YD)(e,(e=>Math.max(e,0))),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,n=(0,i.cY)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,i.DK)(this.hot.table),o=(0,i.cY)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,i.Gq)(this.hot.table);return e.clientY>n&&e.clientX<=o}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>Wn(Kn,this,Qn).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>Wn(Kn,this,Jn).call(this,e)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=function(e){const t={};return!0===e?(t.directions=Object.keys(Bn),t.autoInsertRow=!0):(0,s.Gv)(e)?((0,d.O9)(e.autoInsertRow)?e.direction===Bn.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,d.O9)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(Bn)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function qn(){this.selectAdjacent()&&this.fillIn()}function Yn(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function Xn(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function Qn(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function Jn(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}function Zn(e,t,n){eo(e,t),t.set(e,n)}function eo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function to(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function no(e,t,n){return e.set(io(e,t),n),n}function oo(e,t){return e.get(io(e,t))}function io(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ro="autoRowSize";var so=new WeakMap,ao=new WeakMap,lo=new WeakSet;class co extends un{static get PLUGIN_KEY(){return ro}static get PLUGIN_PRIORITY(){return 40}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){var t;super(e),eo(this,t=lo),t.add(this),to(this,"headerHeight",null),to(this,"ghostTable",new mn(this.hot)),to(this,"samplesGenerator",new bn(((e,t)=>{const n=this.hot.toPhysicalRow(e),o=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(o))return!1;if(e>=0&&t>=0&&this.hot.getCellMeta(e,t).hidden)return!1;let i;return e>=0?i=this.hot.getDataAtCell(e,t):-1===e&&(i=this.hot.getColHeader(t)),{value:i}}))),to(this,"inProgress",!1),to(this,"measuredRows",0),to(this,"rowHeightsMap",new wn._),Zn(this,so,[]),Zn(this,ao,!1),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,n)=>io(lo,this,po).call(this,e,t,n)))}isEnabled(){const e=this.hot.getSettings()[ro];return!0===e||(0,s.Gv)(e)}enablePlugin(){var e=this;if(this.enabled)return;this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const t=this.getSetting("samplingRatio");t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return io(lo,e,mo).call(e,...n)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return io(lo,e,go).call(e,...n)})),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return io(lo,e,bo).call(e,...n)})),this.addHook("beforeRender",(()=>io(lo,this,ho).call(this))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("init",(()=>io(lo,this,fo).call(this))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin()}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,n)=>io(lo,this,po).call(this,e,t,n)))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const e=this.getFirstVisibleRow(),t=this.getLastVisibleRow();if(-1===e||-1===t)return;const n=this.hot.forceFullRender;this.calculateRowsHeight({from:e,to:t},void 0,n)}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o="number"==typeof e?{from:e,to:e}:e,i="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,At.Ti)(o.from,o.to,(e=>{let t=this.hot.toPhysicalRow(e);null===t&&(t=e),(n||null===this.rowHeightsMap.getValueAtIndex(t))&&this.samplesGenerator.generateRowSamples(e,i).forEach(((e,t)=>this.ghostTable.addRow(t,e)))})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)}))}),!0),this.measuredRows=o.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const o=this.hot.countRows()-1;let i=null;this.inProgress=!0;const r=()=>{if(!this.hot)return(0,hn.uU)(i),void(this.inProgress=!1);this.calculateRowsHeight({from:n,to:Math.min(n+co.CALCULATION_STEP,o)},e,t),n=n+co.CALCULATION_STEP+1,n<o?i=(0,hn.xi)(r):((0,hn.uU)(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();s>=0&&(this.calculateRowsHeight({from:0,to:s},e,t),n=s+1),n<o?r():(this.inProgress=!1,this.hot.view.adjustElementsSize())}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[ro];let t=co.SYNC_CALCULATION_LIMIT;const n=this.hot.countRows()-1;return(0,s.Gv)(e)&&(t=e.syncLimit,(0,h.Pi)(t)?t=(0,At.B5)(n,t):t>>=0),Math.min(t,n)}getRowHeight(e,t){const n=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let o=t;return null!==n&&n>(t||0)&&(o=n),o}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){var e;return null!==(e=this.hot.getFirstRenderedVisibleRow())&&void 0!==e?e:-1}getLastVisibleRow(){var e;return null!==(e=this.hot.getLastRenderedVisibleRow())&&void 0!==e?e:-1}clearCache(e){this.headerHeight=null,Array.isArray(e)?this.hot.batchExecution((()=>{e.forEach((e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0):this.rowHeightsMap.clear()}clearCacheByRange(e){const{from:t,to:n}="number"==typeof e?{from:e,to:e}:e;this.hot.batchExecution((()=>{(0,At.Ti)(Math.min(t,n),Math.max(t,n),(e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter((e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function uo(e){const t={from:0,to:this.hot.countCols()-1};e.forEach((e=>{this.samplesGenerator.generateRowSamples(e,t).forEach(((e,t)=>this.ghostTable.addRow(t,e)))})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{const n=this.hot.toPhysicalRow(e);this.rowHeightsMap.setValueAtIndex(n,t)}))}),!0),this.ghostTable.clean())}function ho(){this.calculateVisibleRowsHeight(),this.inProgress||(io(lo,this,uo).call(this,oo(so,this)),no(so,this,[]))}function po(e,t,n){let o=e;return n&&(this.calculateRowsHeight(t,void 0,!0),o=this.getRowHeight(t)),o}function mo(e,t){t||this.recalculateAllRowsHeight()}function go(e){const t=e.reduce(((e,t)=>{let[n]=t;return-1===e.indexOf(n)&&e.push(n),e}),[]);oo(so,this).push(...t)}function fo(){this.recalculateAllRowsHeight(),no(ao,this,!0)}function bo(e){if(!oo(ao,this))return;const t=e.reduce(((e,t)=>{var n;const o=null===(n=t.address)||void 0===n?void 0:n.row;if(Number.isInteger(o)){const t=this.hot.toVisualRow(o);-1===e.indexOf(t)&&e.push(t)}return e}),[]);oo(so,this).push(...t)}var vo=n(48046),wo=n(77792);const yo=new Map([["indexesSequence",{getListWithInsertedItems:vo.N,getListWithRemovedItems:vo.H}],["physicallyIndexed",{getListWithInsertedItems:wo.N,getListWithRemovedItems:wo.H}]]),Co=e=>{if(!1===yo.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return yo.get(e)};var xo=n(41895),Eo=n(13317);const{getListWithInsertedItems:So,getListWithRemovedItems:Ao}=Co("physicallyIndexed");class ko extends xo.n{constructor(){super((e=>e))}insert(e,t){const n=(0,Eo.z)(this.indexedValues,t);this.indexedValues=So(n,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=Ao(this.indexedValues,e);this.indexedValues=(0,Eo.v)(t,e),super.remove(e)}}const Ro=ko,{getListWithInsertedItems:Mo,getListWithRemovedItems:To}=Co("physicallyIndexed");class Io extends xo.n{constructor(){super((e=>e))}insert(e,t){this.indexedValues=Mo(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=To(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}const Po="bindRowsWithHeaders",Oo=new Map([["loose",Ro],["strict",Io]]);var Do=new WeakSet;class No extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Do),t.add(e),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"headerIndexes",null)}static get PLUGIN_KEY(){return Po}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[Po]}enablePlugin(){var e;if(this.enabled)return;const t=null!==(e=Oo.get(this.getSetting()))&&void 0!==e?e:Oo.get("loose");this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(Do,this,Ho).call(this,e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function Ho(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}var Lo=n(82617);function $o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _o(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zo(e,t){return e.get(Bo(e,t))}function Fo(e,t,n){return e.set(Bo(e,t),n),n}function Bo(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const jo="collapsibleColumns",Wo=["nestedHeaders"],Vo="collapsibleIndicator",Go=jo,Ko=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var Uo=new WeakMap,qo=new WeakSet;class Yo extends un{constructor(){var e;super(...arguments),$o(this,e=qo),e.add(this),_o(this,"nestedHeadersPlugin",null),_o(this,"headerStateManager",null),function(e,t){$o(e,t),t.set(e,null)}(this,Uo)}static get PLUGIN_KEY(){return jo}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[jo,...Wo]}isEnabled(){return!!this.hot.getSettings()[jo]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,Lo.R8)("You need to configure the Nested Headers plugin in order to use collapsible headers."),Fo(Uo,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>Bo(qo,this,Jo).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Bo(qo,e,Zo).call(e,...n)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Bo(qo,e,Xo).call(e,...n)})),this.addHook("beforeOnCellMouseDown",((e,t,n)=>Bo(qo,this,Qo).call(this,e,t,n))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager.mapState((e=>({collapsible:e.origColspan>1}))):Array.isArray(e)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),Fo(Uo,this,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:n}=this.hot.getSelectedRangeLast().highlight,{collapsible:o,isCollapsed:i,columnIndex:r}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,n))&&void 0!==e?e:{};if(o)return i?this.expandSection({row:t,col:r}):this.collapseSection({row:t,col:r}),!1},runOnlyIf:()=>{var e,t;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingle())&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader())},group:Go,relativeToGroup:a.b,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Go)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,i=function(e){e&&e.parentNode.removeChild(e)};(0,At.Ti)(0,e-1,(e=>{const r=t.childNodes[e],s=n.childNodes[e],a=o?o.childNodes[e]:null;(0,At.Ti)(0,r.childNodes.length-1,(e=>{let t=r.childNodes[e].querySelector(`.${Vo}`);i(t),s&&s.childNodes[e]&&(t=s.childNodes[e].querySelector(`.${Vo}`),i(t)),o&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${Vo}`),i(t))}))}),!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes((t=>{const{collapsible:n,origColspan:o,headerLevel:i,columnIndex:r,isCollapsed:s}=t;if(!0===n&&o>1&&(s&&"expand"===e||!s&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(i),col:r}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!Ko.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const n=(0,u.y0)(e,(e=>{let{row:t}=e;return t<0}));let o=n.length>0;(0,u.z0)(n,(e=>{var n;let{row:i,col:r}=e;const{collapsible:s,isCollapsed:a}=null!==(n=this.headerStateManager.getHeaderSettings(i,r))&&void 0!==n?n:{};if(!s||a&&"collapse"===t||!a&&"expand"===t)return o=!1,!1}));const i=[],r=[];o&&(0,u.z0)(n,(e=>{let{row:n,col:o}=e;const{colspanCompensation:s,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,n,o);s>0&&(r.push(...a),i.push(l))}));const s=this.getCollapsedColumns();let a=[];"collapse"===t?a=(0,u.jF)([...s,...r]):"expand"===t&&(a=(0,u.y0)(s,(e=>!r.includes(e))));const l=Ko.get(t);if(!1===this.hot.runHooks(l.beforeHook,s,a,o))return void(0,u.z0)(i,(e=>{e()}));this.hot.batchExecution((()=>{(0,u.z0)(r,(e=>{zo(Uo,this).setValueAtIndex(this.hot.toPhysicalColumn(e),l.hideColumn)}))}),!0);const c=this.getCollapsedColumns().length!==s.length,d=this.hot.getSelectedRangeLast();if("collapse"===t&&c&&d){const{row:e,col:t}=d.highlight;if((this.hot.rowIndexMapper.isHidden(e)||this.hot.columnIndexMapper.isHidden(t))&&r.includes(t)){const n=e>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(e,1,!0):e,o=t>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(t,1,!0):t;null!==n&&null!==o&&this.hot.selectCell(n,o)}}this.hot.runHooks(l.afterHook,s,a,o,c),this.hot.render(),this.hot.view.adjustElementsSize()}getCollapsedColumns(){return zo(Uo,this).getHiddenIndexes()}destroy(){Fo(Uo,this,null),super.destroy()}}function Xo(e,t,n){var o;const{collapsible:r,origColspan:s,isCollapsed:a}=null!==(o=this.headerStateManager.getHeaderSettings(n,e))&&void 0!==o?o:{},l=r&&s>1&&e>=this.hot.getSettings().fixedColumnsStart,c=this.hot.getSettings().ariaTags;let u=t.querySelector(`.${Vo}`);var d;(0,i.De)(t,[(0,g.dV)("")[0]]),l?(u||(u=this.hot.rootDocument.createElement("div"),(0,i.iQ)(u,Vo),t.querySelector("div:first-child").appendChild(u)),(0,i.vy)(u,["collapsed","expanded"]),a?((0,i.iQ)(u,"collapsed"),(0,i.c6)(u,"+"),c&&(0,i.Bq)(t,...(0,g.dV)(!1))):((0,i.iQ)(u,"expanded"),(0,i.c6)(u,"-"),c&&(0,i.Bq)(t,...(0,g.dV)(!0))),c&&(0,i.Bq)(u,...(0,g.MG)())):null===(d=u)||void 0===d||d.remove()}function Qo(e,t){(0,i.nB)(e.target,Vo)&&((0,i.nB)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,i.nB)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,r.CA)(e))}function Jo(){this.updatePlugin()}function Zo(e,t){t||this.updatePlugin()}var ei=n(85408),ti=n(31803);function ni(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oi=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];class ii{constructor(e,t){ni(this,"hot",void 0),ni(this,"sortingStates",new ti.z),ni(this,"sortEmptyCells",!1),ni(this,"indicator",!0),ni(this,"headerAction",!0),ni(this,"compareFunctionFactory",void 0),ni(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,s.Gv)(e)&&(0,s.v4)(e,((e,t)=>{oi.includes(t)&&(this[t]=e)}))}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex((t=>{let[n]=t;return n===e}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return(0,s.Gv)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){return null===this.sortingStates?[]:this.sortingStates.getEntries().map((e=>{let[t,n]=e;return{column:this.hot.toVisualColumn(t),...n}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,d.O9)(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}function ri(e,t,n){const o=t.locale;return function(t,i){const{sortEmptyCells:r}=n;return"string"==typeof t&&(t=t.toLocaleLowerCase(o)),"string"==typeof i&&(i=i.toLocaleLowerCase(o)),t===i?mi:(0,d.Im)(t)?(0,d.Im)(i)?mi:r&&"asc"===e?gi:fi:(0,d.Im)(i)?r&&"asc"===e?fi:gi:isNaN(t)&&!isNaN(i)?"asc"===e?fi:gi:!isNaN(t)&&isNaN(i)?"asc"===e?gi:fi:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?gi:fi:t>i?"asc"===e?fi:gi:mi)}}n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(37550);const si="default";var ai=n(34647);const{register:li,getItem:ci,hasItem:ui}=(0,ai.A)("sorting.compareFunctionFactory"),{register:di,getItem:hi}=(0,ai.A)("sorting.mainSortComparator");function pi(e){return ui(e)?ci(e):ci(si)}li("checkbox",(function(e,t,n){const o=t.checkedTemplate,i=t.uncheckedTemplate,{sortEmptyCells:r}=n;return function(s,a){const l=(0,d.Im)(s),c=(0,d.Im)(a),u=l?i:s,h=c?i:a,p=u===i||u===o,m=h===i||h===o;if(!1===r){if(l&&!1===c)return fi;if(!1===l&&c)return gi}return!1===p&&m?"asc"===e?gi:fi:p&&!1===m?"asc"===e?fi:gi:!1===p&&!1===m?ri(e,t,n)(s,a):u===i&&h===o?"asc"===e?gi:fi:u===o&&h===i?"asc"===e?fi:gi:mi}})),li("date",(function(e,t,n){return Ai(e,t.dateFormat,n)})),li(si,ri),li("numeric",(function(e,t,n){return function(t,o){const i=parseFloat(t),r=parseFloat(o),{sortEmptyCells:s}=n;if(i===r||isNaN(i)&&isNaN(r))return mi;if(s){if((0,d.Im)(t))return"asc"===e?gi:fi;if((0,d.Im)(o))return"asc"===e?fi:gi}return isNaN(i)?fi:isNaN(r)?gi:i<r?"asc"===e?gi:fi:i>r?"asc"===e?fi:gi:mi}})),li("time",(function(e,t,n){return Ai(e,t.timeFormat,n)}));const mi=0,gi=-1,fi=1;var bi=n(85975);const vi="asc",wi="desc",yi="colHeader";function Ci(e){if(e!==wi)return e===vi?wi:vi}function xi(e){return e.querySelector(`.${yi}`)}function Ei(e,t){if(e<0||!t.parentNode)return!1;const n=t.parentNode.parentNode.childNodes;return-1===Array.from(n).indexOf(t.parentNode)-n.length}function Si(e,t,n){return-1===e&&t>=0&&!1===(0,r.nO)(n)}function Ai(e,t,n){return function(o,i){const{sortEmptyCells:r}=n;if(o===i)return mi;if((0,d.Im)(o))return(0,d.Im)(i)?mi:r&&"asc"===e?gi:fi;if((0,d.Im)(i))return r&&"asc"===e?fi:gi;const s=T(o,t),a=T(i,t);return s.isValid()?a.isValid()?a.isAfter(s)?"asc"===e?gi:fi:a.isBefore(s)?"asc"===e?fi:gi:mi:gi:fi}}const ki="indicatorDisabled",Ri="columnSorting",Mi="sortAction",Ti=new Map([[vi,"ascending"],[wi,"descending"]]);function Ii(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Oi="columnSorting",Di="append",Ni=Oi;di(Oi,(function(e,t){return function(n,o){const[,...i]=n,[,...r]=o;return function(){const n=e[0],o=t[0],s=i[0],a=r[0],l=o.columnSorting;return(l.compareFunctionFactory?l.compareFunctionFactory:pi(o.type))(n,o,l)(s,a)}()}})),Ee.R.getSingleton().register("beforeColumnSort"),Ee.R.getSingleton().register("afterColumnSort");const Hi=new WeakMap;var Li=new WeakSet;class $i extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Li),t.add(e),Ii(this,"columnStatesManager",null),Ii(this,"columnMetaCache",null),Ii(this,"pluginKey",Oi),Ii(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return Oi}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e,t,n=this;if(Hi.has(this.hot)&&Hi.get(this.hot)!==this.pluginKey)return this.hot.updateSettings({[this.pluginKey]:!1}),e=Hi.get(this.hot),t=this.pluginKey,void(0,Lo.R8)(bi.O`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
  3. Only \`${e}\` will work. The \`${t}\` plugin will remain disabled.`);this.enabled||(Hi.set(this.hot,this.pluginKey),this.columnStatesManager=new ii(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new wn._((e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((e,t)=>Pi(Li,this,zi).call(this,e,t))),this.addHook("beforeOnCellMouseDown",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return Pi(Li,n,Bi).call(n,...t)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>Pi(Li,this,_i).call(this))),this.addHook("afterLoadData",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return Pi(Li,n,Fi).call(n,...t)})),this.hot.view&&Pi(Li,this,_i).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const n=xi(t);!1!==Ei(e,t)&&null!==n&&this.updateHeaderClasses(n)};Hi.delete(this.hot),this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",e)})),this.hot.batchExecution((()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey),this.indexesSequenceCache=null)}),!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return this.sort(this.getColumnNextConfig(e.col)),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.row&&n.col>=0},relativeToGroup:a.b,position:"before",group:Ni})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Ni)}sort(e){const t=this.getSortConfig(),n=this.getNormalizedSortConfigs(e),o=this.areValidSortConfigs(n);!1!==this.hot.runHooks("beforeColumnSort",t,n,o)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new ei.K),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),o&&(this.columnStatesManager.setSortStates(n),this.sortByPresetSortStates(n),this.saveAllSortSettings(n)),this.hot.runHooks("afterColumnSort",t,o?n:t,o),o&&this.hot.render())}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,d.O9)(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return function(e){if(e.some((e=>!1===function(e){if(!1===(0,s.Gv)(e))return!1;const{column:t,sortOrder:n}=e;return Number.isInteger(t)&&[vi,wi].includes(n)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length}(e)&&e.every((e=>{let{column:n}=e;return n<=t&&n>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,u.YD)(e,(e=>{let{column:t,...n}=e;return{column:this.hot.toPhysicalColumn(t),...n}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value;return(0,d.O9)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,u.YD)(t.initialConfig,(e=>{let{column:t,...n}=e;return{column:this.hot.toVisualColumn(t),...n}}))),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,d.O9)(t)){const n=Ci(t);return(0,d.O9)(n)?{column:e,sortOrder:n}:void 0}const n=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<n)return{column:e,sortOrder:Ci()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Di;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(e),o=-1!==n,i=this.getSortConfig(),r=this.getColumnNextConfig(e);if(o){if((0,d.b0)(r))return[...i.slice(0,n),...i.slice(n+1)];if(t===Di)return[...i.slice(0,n),...i.slice(n+1),r];if("replace"===t)return[...i.slice(0,n),r,...i.slice(n+1)]}return(0,d.O9)(r)?i.concat(r):i}getPluginColumnConfig(e){if((0,s.Gv)(e)){const t=e[this.pluginKey];if((0,s.Gv)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],n=this.columnStatesManager.getAllColumnsProperties(),o=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(o);return Array.isArray(i.columns)?Object.assign(n,t,this.getPluginColumnConfig(i.columns[e])):(0,f.Tn)(i.columns)?Object.assign(n,t,this.getPluginColumnConfig(i.columns(e))):Object.assign(n,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),n=Object.create(t);return n[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),n}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),0===e.length)return;const t=[],n=this.hot.countRows(),o=t=>(0,u.YD)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(n);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(o(e)));const i=(0,u.YD)(t,(e=>e[0]));!function(e,t){const n=hi(t);for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];e.sort(n(...i))}(t,this.pluginKey,(0,u.YD)(e,(e=>e.sortOrder)),(0,u.YD)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<n;e+=1)t.push([e].concat(o(e)));const r=(0,u.YD)(t,(e=>e[0])),s=new Map((0,u.YD)(i,((e,t)=>[e,r[t]]))),a=(0,u.YD)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>s.has(e)?s.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if((0,s.Gv)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,s.Gv)(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if((0,i.vy)(e,Array.from(Ti.values()).concat(Mi,ki,Ri)),!1!==this.enabled){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];(0,i.iQ)(e,function(e,t,n,o){const i=[Ri];if(o&&i.push(Mi),!1===n)return i.push(ki),i;const r=e.getSortOrderOfColumn(t);return(0,d.O9)(r)&&i.push(Ti.get(r)),i}(...n))}}onUpdateSettings(e){super.onUpdateSettings(e),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,d.O9)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&(0,i.nB)(e.target,yi)}onAfterOnCellMouseDown(e,t){if(!1!==Si(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)){this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col));const e=this.hot.getActiveEditor(),n=this.getColumnNextConfig(t.col);null!=e&&e.isOpened()&&this.hot.getCellValidator(e.row,e.col)?this.hot.addHookOnce("postAfterValidate",(()=>{this.sort(n)})):this.sort(n)}}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function _i(){const e=this.getAllSavedSortSettings();if((0,s.Gv)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function zi(e,t){const n=xi(t);if(!1===Ei(e,t)||null===n)return;const o=this.getFirstCellSettings(e)[this.pluginKey],r=o.indicator,s=o.headerAction;if(this.updateHeaderClasses(n,this.columnStatesManager,e,r,s),this.hot.getSettings().ariaTags){const n=this.columnStatesManager.getSortOrderOfColumn(e);(0,i.Bq)(t,...(0,g._h)(n?`${n}ending`:"none"))}}function Fi(e){!0===e&&this.hot.view&&Pi(Li,this,_i).call(this)}function Bi(e,t,n,o){!1!==Si(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(o.column=!0)}function ji(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Wi=class{constructor(e,t){ji(this,"plugin",void 0),ji(this,"hot",void 0),ji(this,"endpoints",[]),ji(this,"settings",void 0),ji(this,"settingsType","array"),ji(this,"currentEndpoint",null),ji(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let n=e;if(n||"function"!=typeof this.settings)return n||(n=this.settings),(0,u.z0)(n,(e=>{const n={};this.assignSetting(e,n,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,n,"reversedRowCoords",!1),this.assignSetting(e,n,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,n,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,n,"sourceColumn",e.destinationColumn),this.assignSetting(e,n,"type","sum"),this.assignSetting(e,n,"forceNumeric",!1),this.assignSetting(e,n,"suppressDataTypeErrors",!0),this.assignSetting(e,n,"customFunction",null),this.assignSetting(e,n,"readOnly",!0),this.assignSetting(e,n,"roundFloat",!1),t.push(n)})),t;this.settingsType="function"}assignSetting(e,t,n,o){if("ranges"!==n||void 0!==e[n]){if("ranges"!==n||0!==e[n].length)if(void 0===e[n]){if(o instanceof Error)throw o;t[n]=o}else"destinationRow"===n&&t.reversedRowCoords?t[n]=this.hot.countRows()-e[n]-1:t[n]=e[n]}else t[n]=o}resetSetupBeforeStructureAlteration(e,t,n){if("function"!==this.settingsType)return;const o=e.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();(0,u.z0)(i,(i=>{"row"===o&&i.destinationRow>=t&&("insert_row"===e?i.alterRowOffset=n:"remove_row"===e&&(i.alterRowOffset=-1*n)),"col"===o&&i.destinationColumn>=t&&("insert_col"===e?i.alterColumnOffset=n:"remove_col"===e&&(i.alterColumnOffset=-1*n))})),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(e,t,n,o,i){let r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const s=e.indexOf("row")>-1?"row":"col",a=e.indexOf("remove")>-1?-1:1,l=this.getAllEndpoints(),c=0===e.indexOf("move_row"),d=t;(0,u.z0)(l,(e=>{"row"===s&&e.destinationRow>=d&&(e.alterRowOffset=a*n),"col"===s&&e.destinationColumn>=d&&(e.alterColumnOffset=a*n)})),this.resetAllEndpoints(l,!c),c?(0,u.z0)(l,(e=>{this.extendEndpointRanges(e,d,o[0],o.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,u.z0)(l,(e=>{this.shiftEndpointCoordinates(e,d)})),r&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,n,o){(0,u.z0)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?n>e[1]?e[1]+=o:n<e[0]&&(e[0]-=o):n>=e[0]&&n<=e[1]&&(e[1]-=o,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,n=[],o=[];(0,u.z0)(t,(e=>{const t=[];if(e[1])for(let n=e[0];n<=e[1];n++)t.push(this.hot.toPhysicalRow(n));else t.push(this.hot.toPhysicalRow(e[0]));o.push(t)})),(0,u.z0)(o,(e=>{let t=[];(0,u.z0)(e,((o,i)=>{0===i?t.push(o):e[i]!==e[i-1]+1&&(t.push(e[i-1]),n.push(t),t=[],t.push(o)),i===e.length-1&&(t.push(o),n.push(t))}))})),e.ranges=n}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,u.z0)(e.ranges,(n=>{(0,u.z0)(n,((o,i)=>{o>=t&&(n[i]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,n=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+n>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,u.z0)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,u.z0)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,u.z0)(e,((e,n,o)=>{`${e[2]||""}`!=`${e[3]}`&&(0,u.z0)(this.getAllEndpoints(),((e,i)=>{this.hot.propToCol(o[n][1])===e.sourceColumn&&-1===t.indexOf(i)&&t.push(i)}))})),(0,u.z0)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach((e=>{const t=this.hot.toVisualRow(e.destinationRow);if(null!==t){const n=this.hot.getCellMeta(t,e.destinationColumn);n.readOnly=e.readOnly,n.className="columnSummaryResult"}}))}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.alterRowOffset||0,o=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?n:0)),this.hot.toVisualColumn(e.destinationColumn+(t?o:0)),""])}setEndpointValue(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const i=this.hot.toVisualRow(e.destinationRow);if(null!==i){const n=this.hot.getCellMeta(i,e.destinationColumn);"init"!==t&&n.readOnly===e.readOnly||(n.readOnly=e.readOnly,n.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let n=0;Number.isInteger(t)&&(n=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(n)}n?this.hot.setDataAtCell(o,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([o,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,Lo.R8)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}};function Vi(e){return null==e||isNaN(e)}function Gi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ki="columnSummary";var Ui=new WeakSet;class qi extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ui),t.add(e),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"endpoints",null)}static get PLUGIN_KEY(){return Ki}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[Ki]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[Ki],this.endpoints=new Wi(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Gi(Ui,e,Yi).call(e,...n)})),this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Gi(Ui,e,Qi).call(e,...n)})),this.addHook("afterUpdateSettings",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Gi(Ui,e,Xi).call(e,...n)})),this.addHook("beforeCreateRow",((e,t,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,n))),this.addHook("beforeCreateCol",((e,t,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,n))),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...n)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...n)})),this.addHook("afterCreateRow",((e,t,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,n))),this.addHook("afterCreateCol",((e,t,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,n))),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...n)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...n)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Gi(Ui,e,Ji).call(e,...n)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}calculateSum(e){let t=0;return(0,s.v4)(e.ranges,(n=>{t+=this.getPartialSum(n,e.sourceColumn)})),t}getPartialSum(e,t){let n=0,o=e[1]||e[0],i=null,r=0;do{if(i=this.getCellValue(o,t),i=Vi(i)?null:i,null!==i){const e=(`${i}`.split(".")[1]||[]).length||1;e>r&&(r=e)}n+=i||0,o-=1}while(o>=e[0]);return Math.round(n*10**r)/10**r}calculateMinMax(e,t){let n=null;return(0,s.v4)(e.ranges,(o=>{const i=this.getPartialMinMax(o,e.sourceColumn,t);if(null===n&&null!==i&&(n=i),null!==i)switch(t){case"min":n=Math.min(n,i);break;case"max":n=Math.max(n,i)}})),null===n?"Not enough data":n}getPartialMinMax(e,t,n){let o,i=null,r=e[1]||e[0];do{if(o=this.getCellValue(r,t),o=Vi(o)?null:o,null===i)i=o;else if(null!==o)switch(n){case"min":i=Math.min(i,o);break;case"max":i=Math.max(i,o)}r-=1}while(r>=e[0]);return i}countEmpty(e,t){let n,o=0,i=e[1]||e[0];do{n=this.getCellValue(i,t),n=Vi(n)?null:n,null===n&&(o+=1),i-=1}while(i>=e[0]);return o}countEntries(e){let t=0;const n=e.ranges;return(0,s.v4)(n,(n=>{const o=void 0===n[1]?1:n[1]-n[0]+1,i=this.countEmpty(n,e.sourceColumn);t+=o,t-=i})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const n=this.hot.toVisualRow(e),o=this.hot.toVisualColumn(t);let i=this.hot.getSourceDataAtCell(e,t),r="";if(null!==n&&null!==o&&(r=this.hot.getCellMeta(n,o).className||""),r.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof i&&(i=i.replace(/,/,".")),i=parseFloat(i)),isNaN(i)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(bi.O`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
  4. numeric format. Cannot do the calculation.`);return i}}function Yi(){this.endpoints.initEndpoints()}function Xi(e){void 0!==e.columns&&this.endpoints.refreshCellMetas()}function Qi(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function Ji(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}var Zi=n(77710);function er(e,t,n){tr(e,t),t.set(e,n)}function tr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nr(e,t){return e.get(ir(e,t))}function or(e,t,n){return e.set(ir(e,t),n),n}function ir(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var rr=new WeakMap,sr=new WeakMap,ar=new WeakMap,lr=new WeakSet;class cr{constructor(){var e;tr(this,e=lr),e.add(this),er(this,rr,!0),er(this,sr,null),er(this,ar,new ResizeObserver((e=>ir(lr,this,ur).call(this,e))))}setObservedElement(e){or(sr,this,e)}unobserve(){nr(ar,this).unobserve(nr(sr,this))}observe(){or(rr,this,!0),nr(ar,this).observe(nr(sr,this))}destroy(){nr(ar,this).disconnect()}}function ur(e){!nr(rr,this)&&Array.isArray(e)&&e.length?e.forEach((e=>{let{borderBoxSize:t}=e;const{inlineSize:n,blockSize:o}=t[0];this.runLocalHooks("resize",n,o)})):or(rr,this,!1)}function dr(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function hr(e,t){return e.get(mr(e,t))}function pr(e,t,n){return e.set(mr(e,t),n),n}function mr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(0,s.co)(cr,Zi.A);var gr=new WeakMap,fr=new WeakMap,br=new WeakMap,vr=new WeakMap,wr=new WeakMap,yr=new WeakMap,Cr=new WeakMap;class xr{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){var n=this;dr(this,gr,void 0),dr(this,fr,!1),dr(this,br,null),dr(this,vr,void 0),dr(this,wr,void 0),dr(this,yr,!0),dr(this,Cr,new cr),pr(gr,this,e),pr(fr,this,t),pr(vr,this,this.createEditor()),pr(wr,this,hr(vr,this).style),hr(Cr,this).setObservedElement(this.getInputElement()),hr(Cr,this).addLocalHook("resize",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n.runLocalHooks("resize",...t)})),this.hide()}setPosition(e,t){hr(wr,this).left=`${e}px`,hr(wr,this).top=`${t}px`}setSize(e,t){if(e&&t){const n=this.getInputElement();n.style.width=`${e}px`,n.style.height=`${t}px`}}getSize(){return{width:(0,i.Gq)(this.getInputElement()),height:(0,i.DK)(this.getInputElement())}}observeSize(){hr(Cr,this).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){hr(wr,this).display="block",pr(yr,this,!1)}hide(){hr(Cr,this).unobserve(),hr(yr,this)||(hr(wr,this).display="none"),pr(yr,this,!0)}isVisible(){return"block"===hr(wr,this).display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return hr(gr,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=hr(gr,this).createElement("div"),t=hr(gr,this).createElement("textarea");return e.style.display="none",pr(br,this,hr(gr,this).createElement("div")),hr(br,this).setAttribute("dir",hr(fr,this)?"rtl":"ltr"),(0,i.iQ)(hr(br,this),xr.CLASS_EDITOR_CONTAINER),hr(gr,this).body.appendChild(hr(br,this)),(0,i.iQ)(e,xr.CLASS_EDITOR),(0,i.iQ)(t,xr.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),hr(br,this).appendChild(e),e}getInputElement(){return hr(vr,this).querySelector(`.${xr.CLASS_INPUT}`)}getEditorElement(){return hr(vr,this)}destroy(){const e=hr(br,this)?hr(br,this).parentNode:null;hr(vr,this).parentNode.removeChild(hr(vr,this)),pr(vr,this,null),pr(wr,this,null),hr(Cr,this).destroy(),e&&e.removeChild(hr(br,this))}}(0,s.co)(xr,Zi.A);const Er=xr;function Sr(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ar{constructor(e){Sr(this,"wasLastActionShow",!0),Sr(this,"showDebounced",null),Sr(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,f.sg)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,s.co)(Ar,Zi.A);const kr=Ar,Rr="---------";function Mr(e,t){const n={};return(0,u.z0)(e,(e=>{e.forAll(((e,o)=>{e>=0&&o>=0&&(n[e]||(n[e]=[]),n[e][o]=t(e,o))}))})),n}function Tr(e,t,n,o,i){(0,u.z0)(e,(e=>{e.forAll(((e,r)=>{e>=0&&r>=0&&function(e,t,n,o,i,r){const s=i(e,t);let a=o;s.className&&(a="vertical"===n?function(e,t){return-1!==e.indexOf(t)?e:`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}(s.className,o):function(e,t){return-1!==e.indexOf(t)?e:`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}(s.className,o)),r(e,t,"className",a)}(e,r,t,n,o,i)}))}))}function Ir(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function Pr(e,t){let n=!1;return Array.isArray(e)&&(0,u.z0)(e,(e=>(e.forAll(((e,o)=>{if(e>=0&&o>=0&&t(e,o))return n=!0,!1})),n))),n}function Or(e,t){const n={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:o,left:i}=e.getBoundingClientRect();n.top=o,n.left=i}return n}function Dr(e,t,n){Nr(e,t),t.set(e,n)}function Nr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hr(e,t,n){return e.set($r(e,t),n),n}function Lr(e,t){return e.get($r(e,t))}function $r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const _r="comments",zr="comment",Fr="value",Br="style",jr="readOnly",Wr=_r,Vr=`plugin:${_r}`;var Gr=new WeakMap,Kr=new WeakMap,Ur=new WeakMap,qr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap,Qr=new WeakSet;class Jr extends un{constructor(){var e;super(...arguments),Nr(this,e=Qr),e.add(this),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"range",{}),Dr(this,Gr,null),Dr(this,Kr,null),Dr(this,Ur,!1),Dr(this,qr,!1),Dr(this,Yr,null),Dr(this,Xr,"")}static get PLUGIN_KEY(){return _r}static get PLUGIN_PRIORITY(){return 60}static get DEFAULT_SETTINGS(){return{displayDelay:250}}isEnabled(){return!!this.hot.getSettings()[_r]}enablePlugin(){var e=this;this.enabled||(Lr(Gr,this)||(Hr(Gr,this,new Er(this.hot.rootDocument,this.hot.isRtl())),Lr(Gr,this).addLocalHook("resize",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return $r(Qr,e,ss).call(e,...n)}))),Lr(Kr,this)||Hr(Kr,this,new kr(this.getSetting("displayDelay"))),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,n,o,i,r)=>$r(Qr,this,os).call(this,e,r))),this.addHook("afterScroll",(()=>$r(Qr,this,ls).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>$r(Qr,this,as).call(this,e))),this.addHook("beforeCompositionStart",(e=>$r(Qr,this,as).call(this,e))),this.addHook("afterSetTheme",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return $r(Qr,e,cs).call(e,...n)})),Lr(Kr,this).addLocalHook("hide",(()=>this.hide())),Lr(Kr,this).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){Lr(Kr,this).updateDelay(this.getSetting("displayDelay")),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),n=e.addContext(Vr);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();Hr(qr,this,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(Vr),this.hot._registerTimeout((()=>{Hr(qr,this,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell()},group:Wr}),n.addShortcut({keys:[["Escape"]],callback:()=>{Lr(Gr,this).setValue(Lr(Xr,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>Lr(Gr,this).isVisible()&&Lr(Gr,this).isFocused(),group:Wr}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>Lr(Gr,this).isVisible()&&Lr(Gr,this).isFocused(),group:Wr}),n.addShortcut({keys:[["Shift","Tab"],["Tab"]],forwardToContext:e.getContext("grid"),callback:()=>{Lr(Gr,this).setValue(Lr(Gr,this).getValue()),this.hide(),e.setActiveContextName("grid")},group:Wr})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Wr)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>$r(Qr,this,ts).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>$r(Qr,this,Zr).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>$r(Qr,this,ns).call(this))),this.eventManager.addEventListener(t,"focus",(()=>$r(Qr,this,rs).call(this))),this.eventManager.addEventListener(t,"blur",(()=>$r(Qr,this,is).call(this))),this.eventManager.addEventListener(this.getEditorInputElement(),"mousedown",(e=>$r(Qr,this,es).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,i.kp)(e.target,"TD","TBODY");return!!(t&&(0,i.nB)(t,"htCommentCell")&&(0,i.kp)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=Lr(Gr,this).getValue();let n="";null!=e?n=e:null!=t&&(n=t);const o=this.range.from.row,i=this.range.from.col;this.updateCommentMeta(o,i,{[Fr]:n}),this.hot.render()}setCommentAtCell(e,t,n){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(n)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,zr),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(n)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,Fr)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,Fr)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:n}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||n<0||n>this.hot.countSourceCols()-1)return!1;const o=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return Lr(Kr,this).cancelHiding(),Lr(Gr,this).setValue(null!==(e=o[zr]?o[zr][Fr]:null)&&void 0!==e?e:""),Lr(Gr,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){Lr(Gr,this).hide()}refreshEditor(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&Lr(Gr,this).isVisible()))return;const{rowIndexMapper:e,columnIndexMapper:t}=this.hot,{row:n,col:o}=this.range.from;let r=e.getRenderableFromVisualIndex(n),s=t.getRenderableFromVisualIndex(o);const a=null===r;Lr(Gr,this).setPosition(0,0),null===r&&(r=e.getRenderableFromVisualIndex(e.getNearestNotHiddenIndex(n,-1))),null===s&&(s=t.getRenderableFromVisualIndex(t.getNearestNotHiddenIndex(o,-1)));const l=null===r,c=null===s;r=null!=r?r:0,s=null!=s?s:0;const{rootWindow:u,view:{_wt:d}}=this.hot,{wtTable:h}=d,p=d.getCell({row:r,col:s},!0),m=this.getCommentMeta(n,o,Br);m?Lr(Gr,this).setSize(m.width,m.height):Lr(Gr,this).resetSize();const g=c?0:h.getColumnWidth(s),f=a&&!l?(0,i.DK)(p):0,{left:b,top:v,width:w,height:y}=p.getBoundingClientRect(),{width:C,height:x}=Lr(Gr,this).getSize(),{innerWidth:E,innerHeight:S}=this.hot.rootWindow,A=this.hot.rootDocument.documentElement,k=(0,i.XJ)(this.hot.rootDocument),R=(0,i.D1)(this.hot.rootWindow)?k:0,M=(0,i.zO)(this.hot.rootWindow)?k:0;let T=b+u.scrollX+g,I=v+u.scrollY+f;this.hot.isRtl()&&(T-=C+g),this.hot.isLtr()&&b+w+C>E-R?T=b+u.scrollX-C-1:this.hot.isRtl()&&T<-(A.scrollWidth-A.clientWidth)&&(T=b+u.scrollX+g+1),v+x>S-M&&(I-=x-y+1),Lr(Gr,this).setPosition(T,I),Lr(Gr,this).setReadOnlyState(this.getCommentMeta(n,o,jr)),Lr(Gr,this).observeSize()}focusEditor(){Lr(Gr,this).focus()}updateCommentMeta(e,t,n){const o=this.hot.getCellMeta(e,t)[zr];let i;o?(i=(0,s.Go)(o),(0,s.zw)(i,n)):i=n,this.hot.setCellMeta(e,t,zr,i)}getCommentMeta(e,t,n){const o=this.hot.getCellMeta(e,t);if(o[zr])return o[zr][n]}addToContextMenu(e){var t;e.items.push({name:Rr},(t=this,{key:"commentsAddEdit",name(){var e;const n=null===(e=this.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return null!=n&&n.isCell()&&t.getCommentAtCell(n.row,n.col)?this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const e=this.getSelectedRangeLast();t.setRange(e),t.show(),t.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}),function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,n)=>{t>=0&&n>=0&&e.removeCommentAtCell(t,n,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}(this),function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return Pr(this.getSelectedRange(),((t,n)=>e.getCommentMeta(t,n,jr)))?Ir(t):t},callback(){this.getSelectedRangeLast().forAll(((t,n)=>{if(t>=0&&n>=0){const o=!!e.getCommentMeta(t,n,jr);e.updateCommentMeta(t,n,{[jr]:!o})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}(this))}getEditorInputElement(){return Lr(Gr,this).getInputElement()}destroy(){var e,t;null===(e=Lr(Gr,this))||void 0===e||e.destroy(),null===(t=Lr(Kr,this))||void 0===t||t.destroy(),super.destroy()}}function Zr(e){if(this.hot.view&&this.hot.view._wt&&!Lr(Ur,this)&&!this.targetIsCommentTextArea(e)){const t=(0,i.kp)(e.target,"TD","TBODY");let n=null;t&&(n=this.hot.getCoords(t)),(!t||this.range.from&&n&&(this.range.from.row!==n.row||this.range.from.col!==n.col))&&this.hide()}}function es(e){e.stopPropagation()}function ts(e){const{rootDocument:t}=this.hot;if(!(Lr(Ur,this)||Lr(Gr,this).isFocused()||(0,i.nB)(e.target,"wtBorder")||Lr(Yr,this)===e.target)&&Lr(Gr,this))if(Hr(Yr,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));Lr(Kr,this).show(t)}else(0,i.aO)(e.target,t)&&!this.targetIsCommentTextArea(e)&&Lr(Kr,this).hide()}function ns(){Hr(Ur,this,!1)}function os(e,t){t[zr]&&t[zr][Fr]&&(0,i.iQ)(e,t.commentedCellClassName)}function is(){Hr(Xr,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function rs(){Hr(Xr,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(Vr)}function ss(e,t){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[Br]:{width:e,height:t}})}function as(e){Lr(Gr,this).isFocused()&&(0,r.CA)(e)}function ls(){Lr(qr,this)||this.hide()}function cs(){const e=Lr(Gr,this).getEditorElement();(0,i.vy)(e,/ht-theme-.*/g),(0,i.iQ)(e,this.hot.getCurrentThemeName())}function us(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(13609);class ds{constructor(e){us(this,"hot",void 0),us(this,"commands",{}),us(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];const i=e.split(":"),r=i[0],a=2===i.length?i[1]:null;let l=this.commands[r];if(!l)throw new Error(`Menu command '${r}' not exists.`);if(a&&l.submenu&&(l=function(e,t){let n;return(0,u.z0)(t,(t=>{const o=t.key?t.key.split(":"):null;if(Array.isArray(o)&&o[1]===e)return n=t,!1})),n}(a,l.submenu.items)),!0===l.disabled)return;if("function"==typeof l.disabled&&!0===l.disabled.call(this.hot))return;if((0,s.mQ)(l,"submenu"))return;const c=[];"function"==typeof l.callback&&c.push(l.callback),"function"==typeof this.commonCallback&&c.push(this.commonCallback),n.unshift(i.join(":")),(0,u.z0)(c,(e=>e.apply(this.hot,n)))}}const hs="alignment",ps="clear_column",ms="col_left",gs="col_right",fs="make_read_only",bs="redo";var vs=n(76396);const ws="remove_col",ys="remove_row",Cs="row_above",xs="row_below",Es="no_items",Ss="undo",As=[Cs,xs,ms,gs,ps,ys,ws,Ss,bs,fs,hs,Rr,Es],ks={[Rr]:function(){return{name:Rr}},[Es]:function(){return{key:Es,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}},[Cs]:function(){return{key:Cs,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();return!!(!e||this.selection.isSelectedByColumnHeader()||e.isSingleHeader()&&e.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)||!!this.selection.isSelectedByCorner()&&0===this.countRows()},hidden(){return!this.getSettings().allowInsertRow}}},[xs]:function(){return{key:xs,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!!(!e||this.selection.isSelectedByColumnHeader()||e.isSingleHeader()&&e.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)},hidden(){return!this.getSettings().allowInsertRow}}},[ms]:function(){return{key:ms,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!!(!e||this.selection.isSelectedByRowHeader()||e.isSingleHeader()&&e.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)||!!this.selection.isSelectedByCorner()&&0===this.countCols()},hidden(){return!this.getSettings().allowInsertColumn}}},[gs]:function(){return{key:gs,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!!(!e||this.selection.isSelectedByRowHeader()||e.isSingleHeader()&&e.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)},hidden(){return!this.getSettings().allowInsertColumn}}},[ps]:function(){return{key:ps,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const n=t[0].start.col,o=t[0].end.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(t[0].start.row,t[0].end.row),o,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();if(!e||e.isSingleHeader()&&e.highlight.col<0||!this.selection.isSelectedByColumnHeader())return!0;let t=!1;return e.forAll(((e,n)=>{if(e<0||n<0)return!0;const{readOnly:o}=this.getCellMeta(e,n);return!!o||(t=!0,!1)})),!t}}},[ys]:function(){return{key:ys,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[n,,o]=e[0];n-o!==0&&(t=1)}return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,vs.f7)(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}},[ws]:function(){return{key:ws,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,n,,o]=e[0];n-o!==0&&(t=1)}return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,vs.NB)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}},[Ss]:function(){return{key:Ss,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_UNDO)},callback(){this.getPlugin("undoRedo").undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}},[bs]:function(){return{key:bs,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_REDO)},callback(){this.getPlugin("undoRedo").redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}},[fs]:function(){return{key:fs,checkable:!0,ariaChecked(){return Pr(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))},ariaLabel(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_READ_ONLY)},name(){let e=this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_READ_ONLY);return Pr(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=Ir(e)),e},callback(){const e=this.getSelectedRange(),t=Pr(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,u.z0)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&this.setCellMeta(e,n,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!(e&&!e.isSingleHeader()&&!this.selection.isSelectedByCorner()&&0!==this.countRows()&&0!==this.countCols()&&this.getSelectedRange()&&0!==this.getSelectedRange().length)}}},[hs]:function(){return{key:hs,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:`${hs}:left`,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT)},callback(){const e=this.getSelectedRange(),t=Mr(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",o="htLeft";this.runHooks("beforeCellAlignment",t,e,n,o),Tr(e,n,o,((e,t)=>this.getCellMeta(e,t)),((e,t,n,o)=>this.setCellMeta(e,t,n,o))),this.render()},disabled:!1},{key:`${hs}:center`,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER)},callback(){const e=this.getSelectedRange(),t=Mr(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",o="htCenter";this.runHooks("beforeCellAlignment",t,e,n,o),Tr(e,n,o,((e,t)=>this.getCellMeta(e,t)),((e,t,n,o)=>this.setCellMeta(e,t,n,o))),this.render()},disabled:!1},{key:`${hs}:right`,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT)},callback(){const e=this.getSelectedRange(),t=Mr(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",o="htRight";this.runHooks("beforeCellAlignment",t,e,n,o),Tr(e,n,o,((e,t)=>this.getCellMeta(e,t)),((e,t,n,o)=>this.setCellMeta(e,t,n,o))),this.render()},disabled:!1},{key:`${hs}:justify`,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY)},callback(){const e=this.getSelectedRange(),t=Mr(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",o="htJustify";this.runHooks("beforeCellAlignment",t,e,n,o),Tr(e,n,o,((e,t)=>this.getCellMeta(e,t)),((e,t,n,o)=>this.setCellMeta(e,t,n,o))),this.render()},disabled:!1},{name:Rr},{key:`${hs}:top`,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ALIGNMENT_TOP)},callback(){const e=this.getSelectedRange(),t=Mr(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",o="htTop";this.runHooks("beforeCellAlignment",t,e,n,o),Tr(e,n,o,((e,t)=>this.getCellMeta(e,t)),((e,t,n,o)=>this.setCellMeta(e,t,n,o))),this.render()},disabled:!1},{key:`${hs}:middle`,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE)},callback(){const e=this.getSelectedRange(),t=Mr(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",o="htMiddle";this.runHooks("beforeCellAlignment",t,e,n,o),Tr(e,n,o,((e,t)=>this.getCellMeta(e,t)),((e,t,n,o)=>this.setCellMeta(e,t,n,o))),this.render()},disabled:!1},{key:`${hs}:bottom`,name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM)},callback(){const e=this.getSelectedRange(),t=Mr(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",o="htBottom";this.runHooks("beforeCellAlignment",t,e,n,o),Tr(e,n,o,((e,t)=>this.getCellMeta(e,t)),((e,t,n,o)=>this.setCellMeta(e,t,n,o))),this.render()},disabled:!1}]}}}};function Rs(){const e={};return(0,s.v4)(ks,((t,n)=>{e[n]=t()})),e}function Ms(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ts{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Ms(this,"hot",void 0),Ms(this,"predefinedItems",Rs()),Ms(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,s.v4)(e,((e,n)=>{let o="";e.name===Rr?(t[Rr]=e,o=Rr):isNaN(parseInt(n,10))?(e.key=void 0===e.key?n:e.key,t[n]=e,o=e.key):(t[e.key]=e,o=e.key),this.defaultOrderPattern.push(o)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=[];let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return o&&o.items?o=o.items:Array.isArray(o)||(o=e),(0,s.Gv)(o)?(0,s.v4)(o,((e,o)=>{let i=t["string"==typeof e?e:o];i||(i=e),(0,s.Gv)(e)?(0,s.X$)(i,e):"string"==typeof i&&(i={name:i}),void 0===i.key&&(i.key=o),n.push(i)})):(0,u.z0)(o,((e,o)=>{let i=t[e];!i&&As.indexOf(e)>=0||(i||(i={name:e,key:`${o}`}),(0,s.Gv)(e)&&(0,s.X$)(i,e),void 0===i.key&&(i.key=o),n.push(i))})),n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}function Is(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ps{constructor(e,t){Is(this,"top",void 0),Is(this,"topRelative",void 0),Is(this,"left",void 0),Is(this,"leftRelative",void 0),Is(this,"scrollTop",void 0),Is(this,"scrollLeft",void 0),Is(this,"cellHeight",void 0),Is(this,"cellWidth",void 0);const n=t.scrollY,o=t.scrollX;let i,r,s,a,l,c;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(i=parseInt(e.top,10),s=parseInt(e.left,10),l=e.height||0,c=e.width||0,r=i,a=s,i+=n,s+=o):"event"===this.type&&(i=parseInt(e.pageY,10),s=parseInt(e.pageX,10),l=e.target.clientHeight,c=e.target.clientWidth,r=i-n,a=s-o),this.top=i,this.topRelative=r,this.left=s,this.leftRelative=a,this.scrollTop=n,this.scrollLeft=o,this.cellHeight=l,this.cellWidth=c}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}function Os(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Ds(e,t){return e.get(Hs(e,t))}function Ns(e,t,n){return e.set(Hs(e,t),n),n}function Hs(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ls=new WeakMap,$s=new WeakMap,_s=new WeakMap,zs=new WeakMap,Fs=new WeakMap;class Bs{constructor(e){Os(this,Ls,void 0),Os(this,$s,void 0),Os(this,_s,void 0),Os(this,zs,!1),Os(this,Fs,{above:0,below:0,left:0,right:0}),Ns(zs,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Ds(Fs,this)[e]=t,this}setElement(e){return Ns(Ls,this,e),this}setParentElement(e){return Ns($s,this,e),this}updatePosition(e){Ns(_s,this,new Ps(e,Ds(Ls,this).ownerDocument.defaultView)),Ds(zs,this)?(Ds(_s,this).fitsBelow(Ds(Ls,this))?this.setPositionBelowCursor():Ds(_s,this).fitsAbove(Ds(Ls,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===Ds(Ls,this).dir?Ds(_s,this).fitsOnLeft(Ds(Ls,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():Ds(_s,this).fitsOnRight(Ds(Ls,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=Ds(Fs,this).above+Ds(_s,this).top-Ds(Ls,this).offsetHeight;if(Ds($s,this)){const t=Ds($s,this).ownerDocument.defaultView.getComputedStyle(Ds($s,this).querySelector(".ht_master")),n=Number.parseInt(t.paddingTop,10),o=Number.parseInt(t.borderTop,10);e=Ds(_s,this).top+Ds(_s,this).cellHeight-Ds(Ls,this).scrollHeight+n+o}Ds(Ls,this).style.top=`${e}px`}setPositionBelowCursor(){let e=Ds(Fs,this).below+Ds(_s,this).top+1;if(Ds($s,this)){const t=Ds($s,this).ownerDocument.defaultView.getComputedStyle(Ds($s,this).querySelector(".ht_master")),n=Number.parseInt(t.paddingTop,10),o=Number.parseInt(t.borderTop,10);e=Ds(_s,this).top-n-o-1}Ds(Ls,this).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=Ds(_s,this).left;if(Ds($s,this)){const t=Ds($s,this).ownerDocument.defaultView,n=Number.parseInt(t.getComputedStyle(Ds($s,this).querySelector(".htCore")).borderRightWidth,10);e+=Ds(_s,this).cellWidth+n}else e+=Ds(Fs,this).right;Ds(Ls,this).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=Ds(Fs,this).left+Ds(_s,this).left-Ds(Ls,this).offsetWidth;if(Ds($s,this)){const t=Ds($s,this).ownerDocument.defaultView;e-=Number.parseInt(t.getComputedStyle(Ds($s,this).querySelector(".htCore")).borderLeftWidth,10)}Ds(Ls,this).style.left=`${e}px`}}function js(e){let{initialPage:t=-1,size:n=()=>0,onItemSelect:o=()=>{},onClear:i=()=>{}}=e;const r=new Set;let s=(0,At.qE)(t,-1,l()-1);function a(e,t){const n=l()-1;return e<0&&(e=n),e>n&&(e=0),r.has(e)?-1:(r.add(e),!1===o(e,!1)&&(e=a(1===t?++e:--e,t)),e)}function l(){return Math.max(n(),0)}return{setCurrentPage:function(e){e>-1&&e<l()&&!1!==o(e,!0)&&(s=e)},getCurrentPage:function(){return s},toFirstItem:function(){l()>0&&(r.clear(),s=a(0,1))},toLastItem:function(){l()>0&&(r.clear(),s=a(l()-1,-1))},toNextItem:function(){l()>0&&(r.clear(),s=a(++s,1))},toPreviousItem:function(){l()>0&&(r.clear(),s=a(--s,-1))},getSize:l,clear:function(){r.clear(),s=t,i()}}}function Ws(e){return(0,s.mQ)(e,"submenu")}function Vs(e){return new RegExp(Rr,"i").test(e.name)}function Gs(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)}function Ks(e){return(0,s.mQ)(e,"disableSelection")}function Us(e,t){const n=e.slice(0);for(let e=0;e<n.length&&n[e].name===t;)n.shift();return n}const qs="menu",Ys=qs;function Xs(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Qs(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e,t,n){return e.set(ea(e,t),n),n}function Zs(e,t){return e.get(ea(e,t))}function ea(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ta=new WeakMap,na=new WeakMap,oa=new WeakMap;class ia{get tableBorderWidth(){return void 0===Zs(oa,this)&&this.hotMenu&&Js(oa,this,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),Zs(oa,this)}constructor(e,t){var n=this;Qs(this,"hot",void 0),Qs(this,"options",void 0),Qs(this,"eventManager",new ye.A(this)),Qs(this,"container",void 0),Qs(this,"positioner",void 0),Qs(this,"hotMenu",null),Qs(this,"hotSubMenus",{}),Qs(this,"parentMenu",void 0),Qs(this,"menuItems",null),Qs(this,"origOutsideClickDeselects",null),Xs(this,ta,void 0),Xs(this,na,void 0),Xs(this,oa,void 0),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new Bs(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n.parentMenu.runLocalHooks("afterSelectionChange",...t)})),this.hot.addHook("afterSetTheme",((e,t)=>{var n;t||null===(n=this.hotMenu)||void 0===n||n.useTheme(e)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"touchstart",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,i.Ly)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return Zs(ta,this)}getKeyboardShortcutsCtrl(){return Zs(na,this)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,f.sg)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let n=!1,o=(0,u.y0)(this.menuItems,(e=>(e.key===Es&&(n=!0),function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))}(e,this.hot))));if(o.length<1&&!n)o.push(Rs()[Es]);else if(0===o.length)return;o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rr,n=e.slice(0);return n=Us(n,t),n=function(e,t){let n=e.slice(0);return n.reverse(),n=Us(n,t),n.reverse(),n}(n,t),n=function(e){const t=[];return(0,u.z0)(e,((e,n)=>{n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(n),n}(o,Rr);let s=!1;const a={data:o,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,d.O9)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(l=this.hot,(e,t,n,o,r,s)=>{const a=e.getSourceDataAtRow(n),c=l.rootDocument.createElement("div"),u="function"==typeof s?s.call(l):s,d="function"==typeof a.ariaLabel?a.ariaLabel.call(l):a.ariaLabel,h="function"==typeof a.ariaChecked?a.ariaChecked.call(l):a.ariaChecked;if((0,i.Ie)(t),(0,i.iQ)(c,"htItemWrapper"),l.getSettings().ariaTags){const e=!Gs(a,l)&&!Ks(a)&&!Vs(a);(0,i.Bq)(t,[...(p=a,!0===p.checkable?[(0,g.pt)(),(0,g.SM)(d),(0,g.Xq)(h)]:[(0,g.ZA)(),(0,g.SM)(u)]),...e?[(0,g.vC)(-1)]:[],...Gs(a,l)?[(0,g._R)()]:[],...Ws(a)?[(0,g.dV)(!1)]:[]])}var p;t.className="",t.appendChild(c),Vs(a)?(0,i.iQ)(t,"htSeparator"):"function"==typeof a.renderer?((0,i.iQ)(t,"htCustomMenuRenderer"),t.appendChild(a.renderer(e,c,n,o,r,u))):(0,i.Mv)(c,u),Gs(a,l)?(0,i.iQ)(t,"htDisabled"):Ks(a)?(0,i.iQ)(t,"htSelectionDisabled"):Ws(a)&&(0,i.iQ)(t,"htSubmenu")})}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,themeName:this.hot.getCurrentThemeName(),beforeRefreshDimensions:()=>!1,beforeOnCellMouseOver:(e,t)=>{Zs(ta,this).setCurrentPage(t.row)},afterOnCellMouseOver:(t,n)=>{this.isAllSubMenusClosed()?e(n.row):this.openSubMenu(n.row)},afterOnCellContextMenu:e=>{e.preventDefault(),(0,te.Yh)()&&s&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,n,o,i)=>{this.hotMenu.view.isMouseDown()&&(i.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(s=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,te.Yh)()&&(0,r.nO)(e)||!s||!this.hasSelectedItem()||((0,te.rr)()||(0,te.zG)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};var l,c;this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,a),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),Js(ta,this,(c=this.hotMenu,js({size:()=>c.countRows(),onItemSelect(e,t){const n=c.getCell(e,0);if(!n||function(e){return(0,i.nB)(e,"htSeparator")}(n)||function(e){return(0,i.nB)(e,"htDisabled")}(n)||function(e){return(0,i.nB)(e,"htSelectionDisabled")}(n))return!1;c.selectCell(e,0,...t?[e,0,!1,!1]:[])},onClear(){c.deselectCell()}}))),Js(na,this,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];function o(e,t){s(t).addShortcuts(e,{group:qs})}function i(e,t){const i=s(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>i.removeShortcutsByKeys(e)))})),n.push({shortcuts:e,contextName:t}),o(e,t)}function r(e){return e?`${Ys}:${e}`:Ys}function s(t){var n;const o=e.hotMenu.getShortcutManager(),i=r(t);return null!==(n=o.getContext(i))&&void 0!==n?n:o.addContext(i)}return o(function(e){const{hot:t,hotMenu:n}=e;return[{keys:[["Control/Meta","A"]],forwardToContext:t.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(n,o)=>{const i=t.getSettings(),r="function"==typeof i.tabMoves?i.tabMoves(n):i.tabMoves;o.includes("shift")?t.selection.transformStart(-r.row,-r.col):t.selection.transformStart(r.row,r.col),e.close(!0)}},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[[t.isRtl()?"ArrowLeft":"ArrowRight"]],callback:()=>{const t=n.getSelectedLast();if(t){const n=e.openSubMenu(t[0]);n&&n.getNavigator().toFirstItem()}}},{keys:[[t.isRtl()?"ArrowRight":"ArrowLeft"]],callback:()=>{n.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const o=n.getSelectedLast();o&&(n.getSourceDataAtRow(o[0]).submenu?e.openSubMenu(o[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{n.getSelectedLast()?n.selection.transformStart(-n.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{n.getSelectedLast()?n.selection.transformStart(n.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}(e)),t.forEach((e=>{let{shortcuts:t,contextName:n}=e;i(t,n)})),{addCustomShortcuts:i,getCustomShortcuts:function(){return[...n]},getContext:s,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(r(t))}}}(this)),Zs(na,this).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if(Zs(ta,this).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,i.Bq)(t,[(0,g.dV)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!function(e){return(0,i.nB)(e,"htSubmenu")}(t))return!1;const n=this.hotMenu.getSourceDataAtRow(e),o=new ia(this.hot,{parent:this,name:n.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return o.setMenuItems(n.submenu.items),o.open(),o.setPosition(t.getBoundingClientRect()),this.hotSubMenus[n.key]=o,this.hot.getSettings().ariaTags&&(0,i.Bq)(t,[(0,g.dV)(!0)]),o}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];if(n){n.destroy(),delete this.hotSubMenus[t.key];const o=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,i.Bq)(o,[(0,g.dV)(!1)])}}closeAllSubMenus(){(0,u.z0)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const n=this.hot.getSelectedRange(),o=n?function(e){return(0,u.YD)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))}(n):[];this.runLocalHooks("executeCommand",t.key,o,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,o,e)}isCommandPassive(e){return!1===e.isCommand||Vs(e)||Gs(e,this.hot)||Ws(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}updateMenuDimensions(){const e=this.hotMenu.view.getStylesHandler(),{wtTable:t}=this.hotMenu.view._wt,n=this.hotMenu.getSettings().data,o=t.hider.style,r=t.holder.style,s=parseInt(o.width,10),a=(0,u.mu)(n,((e,t,n)=>{const o=this.hotMenu.getCell(n,0)?(0,i.DK)(this.hotMenu.getCell(n,0)):0;return e+(t.name===Rr?1:o)}),0);e.isClassicTheme()?(r.width=`${s+3}px`,r.height=`${a+3}px`):(r.width=`${s}px`,r.height=`${a}px`),o.height=r.height}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let n,o=e;return o&&((0,f.Tn)(o)&&(o=o.call(this.hot),o=null===o||(0,d.b0)(o)?"":o.toString()),o=o.replace(/[^A-Za-z0-9]/g,"_"),o=`${this.options.className}Sub_${o}`,n=t.querySelector(`.${this.options.className}.${o}`)),n||(n=t.createElement("div"),(0,i.iQ)(n,`htMenu handsontable ${this.options.className}`),o&&(0,i.iQ)(n,o),this.options.container.appendChild(n)),n}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&(0,i.Bq)(this.hotMenu.rootElement,[(0,g.nF)(),(0,g.vC)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,i.aO)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,i.aO)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,i.nB)(e.target,"htCore")&&(0,i.aO)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}function ra(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sa(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(0,s.co)(ia,Zi.A);const aa="contextMenu",la=aa;Ee.R.getSingleton().register("afterContextMenuDefaultOptions"),Ee.R.getSingleton().register("beforeContextMenuShow"),Ee.R.getSingleton().register("afterContextMenuShow"),Ee.R.getSingleton().register("afterContextMenuHide"),Ee.R.getSingleton().register("afterContextMenuExecute");var ca=new WeakSet;class ua extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=ca),t.add(e),ra(this,"commandExecutor",new ds(this.hot)),ra(this,"itemsFactory",null),ra(this,"menu",null)}static get PLUGIN_KEY(){return aa}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[Cs,xs,Rr,ms,gs,Rr,ys,ws,Rr,Ss,bs,Rr,fs,Rr,hs]}isEnabled(){return!!this.hot.getSettings()[aa]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[aa];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new ia(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>sa(ca,this,ha).call(this))),this.menu.addLocalHook("afterOpen",(()=>sa(ca,this,pa).call(this))),this.menu.addLocalHook("afterClose",(()=>sa(ca,this,ma).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.executeCommand.call(e,...n)})),this.addHook("afterOnCellContextMenu",(e=>sa(ca,this,da).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),n=Or(this.menu.container,this.hot.rootDocument);this.open({left:t.left+n.left,top:t.top+n.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:la})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(la)}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};if(null!==(t=this.menu)&&void 0!==t&&t.isOpened())return;this.prepareMenuItems(),this.menu.open();const o=this.menu.tableBorderWidth>0;(0,s.v4)(n,((e,t)=>{const n=["below","right"].includes(t)?e+1:e-1;this.menu.setOffset(t,o?e:n)})),this.menu.setPosition(e)}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];this.commandExecutor.execute(e,...n)}prepareMenuItems(){this.itemsFactory=new Ts(this.hot,ua.DEFAULT_ITEMS);const e=this.hot.getSettings()[aa],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const n=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",n),this.menu.setMenuItems(n),(0,u.z0)(n,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function da(e){const t=this.hot.getSettings(),n=t.rowHeaders,o=t.colHeaders,r=e.target;if(this.close(),(0,i.nB)(r,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!n&&!o&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(r)||(0,i.nB)(r,"current")&&(0,i.nB)(r,"wtBorder")))return;const s=Or(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+s.top,left:e.clientX+s.left})}function ha(){this.hot.runHooks("beforeContextMenuShow",this)}function pa(){this.hot.runHooks("afterContextMenuShow",this)}function ma(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}ua.SEPARATOR={name:Rr};var ga=n(13431);class fa{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}class ba{constructor(){this.clipboardData=new fa}preventDefault(){}composedPath(){return[]}}function va(e,t,n){wa(e,t),t.set(e,n)}function wa(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ya(e,t){return e.get(xa(e,t))}function Ca(e,t,n){return e.set(xa(e,t),n),n}function xa(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ea=new WeakMap,Sa=new WeakMap,Aa=new WeakMap,ka=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,Ta=new WeakSet;class Ia{constructor(e){let{countRows:t,countColumns:n,rowsLimit:o,columnsLimit:i,countColumnHeaders:r}=e;var s;wa(this,s=Ta),s.add(this),va(this,Ea,void 0),va(this,Sa,void 0),va(this,Aa,void 0),va(this,ka,void 0),va(this,Ra,void 0),va(this,Ma,void 0),Ca(Sa,this,t),Ca(Aa,this,n),Ca(ka,this,o),Ca(Ra,this,i),Ca(Ma,this,r)}setSelectedRange(e){Ca(Ea,this,e)}getCellsRange(){if(0===ya(Sa,this).call(this)||0===ya(Aa,this).call(this))return null;const{row:e,col:t}=ya(Ea,this).getTopStartCorner(),{row:n,col:o}=ya(Ea,this).getBottomEndCorner(),i=xa(Ta,this,Oa).call(this,e,n),r=xa(Ta,this,Pa).call(this,t,o);return{isRangeTrimmed:n!==i||o!==r,startRow:e,startCol:t,endRow:i,endCol:r}}getMostBottomColumnHeadersRange(){if(0===ya(Aa,this).call(this)||0===ya(Ma,this).call(this))return null;const{col:e}=ya(Ea,this).getTopStartCorner(),{col:t}=ya(Ea,this).getBottomEndCorner(),n=xa(Ta,this,Pa).call(this,e,t);return{isRangeTrimmed:t!==n,startRow:-1,startCol:e,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===ya(Aa,this).call(this)||0===ya(Ma,this).call(this))return null;const{col:e}=ya(Ea,this).getTopStartCorner(),{col:t}=ya(Ea,this).getBottomEndCorner(),n=xa(Ta,this,Pa).call(this,e,t);return{isRangeTrimmed:t!==n,startRow:-ya(Ma,this).call(this),startCol:e,endRow:-1,endCol:n}}}function Pa(e,t){return Math.min(t,Math.max(e+ya(Ra,this).call(this)-1,e))}function Oa(e,t){return Math.min(t,Math.max(e+ya(ka,this).call(this)-1,e))}function Da(e){const t=[],n=[];return(0,u.z0)(e,(e=>{const o=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);(0,At.Ti)(o,i,(e=>{-1===t.indexOf(e)&&t.push(e)}));const r=Math.min(e.startCol,e.endCol),s=Math.max(e.startCol,e.endCol);(0,At.Ti)(r,s,(e=>{-1===n.indexOf(e)&&n.push(e)}))})),{rows:t,columns:n}}var Na=n(22257);function Ha(e,t,n){La(e,t),t.set(e,n)}function La(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $a(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _a(e,t){return e.get(Fa(e,t))}function za(e,t,n){return e.set(Fa(e,t),n),n}function Fa(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("afterCopyLimit"),Ee.R.getSingleton().register("modifyCopyableRange"),Ee.R.getSingleton().register("beforeCut"),Ee.R.getSingleton().register("afterCut"),Ee.R.getSingleton().register("beforePaste"),Ee.R.getSingleton().register("afterPaste"),Ee.R.getSingleton().register("beforeCopy"),Ee.R.getSingleton().register("afterCopy");const Ba="copyPaste",ja=["fragmentSelection"],Wa=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var Va=new WeakMap,Ga=new WeakMap,Ka=new WeakMap,Ua=new WeakMap,qa=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,Ja=new WeakSet;class Za extends un{constructor(){var e;super(...arguments),La(this,e=Ja),e.add(this),$a(this,"columnsLimit",1/0),$a(this,"rowsLimit",1/0),$a(this,"pasteMode","overwrite"),$a(this,"uiContainer",this.hot.rootDocument.body),Ha(this,Va,!1),Ha(this,Ga,!1),Ha(this,Ka,!1),Ha(this,Ua,"cells-only"),Ha(this,qa,!1),Ha(this,Ya,!1),Ha(this,Xa,new Ia({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),Ha(this,Qa,!1),$a(this,"copyableRanges",[])}static get PLUGIN_KEY(){return Ba}static get SETTING_KEYS(){return[Ba,...ja]}static get PLUGIN_PRIORITY(){return 80}static get DEFAULT_SETTINGS(){return{pasteMode:"overwrite",rowsLimit:1/0,columnsLimit:1/0,copyColumnHeaders:!1,copyColumnGroupHeaders:!1,copyColumnHeadersOnly:!1}}isEnabled(){return!!this.hot.getSettings()[Ba]}enablePlugin(){var e,t,n=this;this.enabled||(this.pasteMode=null!==(e=this.getSetting("pasteMode"))&&void 0!==e?e:this.pasteMode,this.rowsLimit=isNaN(this.getSetting("rowsLimit"))?this.rowsLimit:this.getSetting("rowsLimit"),this.columnsLimit=isNaN(this.getSetting("columnsLimit"))?this.columnsLimit:this.getSetting("columnsLimit"),za(Va,this,this.getSetting("copyColumnHeaders")),za(Ga,this,this.getSetting("copyColumnGroupHeaders")),za(Ka,this,this.getSetting("copyColumnHeadersOnly")),this.uiContainer=null!==(t=this.getSetting("uiContainer"))&&void 0!==t?t:this.uiContainer,this.addHook("afterContextMenuDefaultOptions",(e=>Fa(Ja,this,il).call(this,e))),this.addHook("afterSelection",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return Fa(Ja,n,rl).call(n,...t)})),this.addHook("afterSelectionEnd",(()=>Fa(Ja,this,sl).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return n.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return n.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return n.onPaste(...arguments)})),(0,te.nr)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return Fa(Ja,n,al).call(n,...t)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return Fa(Ja,n,ll).call(n,...t)})),this.addHook("afterSelection",(()=>Fa(Ja,this,cl).call(this)))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){za(Ua,this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only"),za(qa,this,!0),Fa(Ja,this,el).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){za(Ya,this,!0),Fa(Ja,this,el).call(this,"cut")}getRangedCopyableData(e){return(0,ga.A)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:n,columns:o}=Da(e);return(0,u.z0)(n,(e=>{const n=[];(0,u.z0)(o,(t=>{e<0?n.push(this.hot.getColHeader(t,e)):n.push(this.hot.getCopyableData(e,t))})),t.push(n)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const n=new ba;e&&n.clipboardData.setData("text/plain",e),t&&n.clipboardData.setData("text/html",t),this.onPaste(n)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);_a(Xa,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===_a(Ua,this)?t.set("headers",_a(Xa,this).getMostBottomColumnHeadersRange()):("with-column-headers"===_a(Ua,this)?t.set("headers",_a(Xa,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===_a(Ua,this)&&t.set("headers",_a(Xa,this).getAllColumnHeadersRange()),t.set("cells",_a(Xa,this).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:n,endRow:o,endCol:i}=e;return{startRow:t,startCol:n,endRow:o,endCol:i}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const n=t.get("cells");if(null!==n&&n.isRangeTrimmed){const{startRow:e,startCol:t,endRow:o,endCol:i}=n;this.hot.runHooks("afterCopyLimit",o-e+1,i-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const n=e.length,o=e[0].length,i=[],{row:r,col:s}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let c=r,u=s,d=r,h=s;for(;i.length<n||c<=a;){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(c,s);if(c=a+1,!0===t)continue;d=a,u=s;const p=[],m=i.length%n;for(;p.length<o||u<=l;){const{skipColumnOnPaste:t,visualCol:n}=this.hot.getCellMeta(r,u);if(u=n+1,!0===t)continue;h=n;const i=p.length%o;p.push(e[m][i])}i.push(p)}return za(Qa,this,!0),this.hot.populateFromArray(r,s,i,void 0,void 0,"CopyPaste.paste",this.pasteMode),[r,s,d,h]}onCopy(e){const t=e.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),o=null==t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!_a(qa,this)||this.isEditorOpened()||(0,i.sb)(t)&&(o&&t!==n||!o&&t!==this.hot.rootDocument.body&&!(0,i.yq)(t,this.hot.rootElement)))return;e.preventDefault(),this.setCopyableText(),za(qa,this,!1);const r=this.getRangedData(this.copyableRanges),s=Fa(Ja,this,tl).call(this,this.copyableRanges);if(this.hot.runHooks("beforeCopy",r,this.copyableRanges,s)){const t=(0,ga.A)(r);if(e&&e.clipboardData){const n=(0,Na.ub)(r,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[Wa,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.runHooks("afterCopy",r,this.copyableRanges,s)}za(Ua,this,"cells-only")}onCut(e){const t=e.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),o=null==t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!_a(Ya,this)||this.isEditorOpened()||(0,i.sb)(t)&&(o&&t!==n||!o&&t!==this.hot.rootDocument.body&&!(0,i.yq)(t,this.hot.rootElement)))return;e.preventDefault(),this.setCopyableText(),za(Ya,this,!1);const r=this.getRangedData(this.copyableRanges);if(this.hot.runHooks("beforeCut",r,this.copyableRanges)){const t=(0,ga.A)(r);if(e&&e.clipboardData){const n=(0,Na.ub)(r,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[Wa,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",r,this.copyableRanges)}}onPaste(e){const t=e.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),o=null==t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||(0,i.sb)(t)&&(o&&t!==n||!o&&t!==this.hot.rootDocument.body&&!(0,i.yq)(t,this.hot.rootElement)))return;let r;if(e.preventDefault(),e&&void 0!==e.clipboardData){const t=(0,h.aj)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});r=t&&/(<table)|(<TABLE)/g.test(t)?(0,Na.oh)(t,this.hot.rootDocument).data:e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(r=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof r&&(r=(0,ga.q)(r)),void 0===r||r&&0===r.length)return;if(!1===this.hot.runHooks("beforePaste",r,this.copyableRanges))return;const[s,a,l,c]=this.populateValues(r);this.hot.selectCell(s,a,Math.min(this.hot.countRows()-1,l),Math.min(this.hot.countCols()-1,c)),this.hot.runHooks("afterPaste",r,this.copyableRanges)}destroy(){super.destroy()}}function el(e){if((0,te.nr)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:n,col:o}=t.highlight,r=this.hot.getCell(n,o,!0);r&&(0,i.C0)(r,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function tl(e){const{rows:t}=Da(e);let n=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)n+=1;return{columnHeadersCount:n}}function nl(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:n}=e.highlight,o=this.hot.getCell(t,n,!0);o&&(0,i.aM)(o)}}}function ol(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:n}=e.highlight,o=this.hot.getCell(t,n,!0);null!=o&&o.hasAttribute("contenteditable")&&(0,i.gj)(o)}}}function il(e){var t;e.items.push({name:"---------"},(t=this,{key:"copy",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_COPY)},callback(){t.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1})),_a(Va,this)&&e.items.push(function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,At.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}(this)),_a(Ga,this)&&e.items.push(function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,At.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}(this)),_a(Ka,this)&&e.items.push(function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,At.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}(this)),e.items.push(function(e){return{key:"cut",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}(this))}function rl(e,t,n,o,i){_a(Qa,this)&&(i.value=!0),za(Qa,this,!1)}function sl(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function al(){Fa(Ja,this,ol).call(this)}function ll(){Fa(Ja,this,nl).call(this)}function cl(){Fa(Ja,this,ol).call(this)}function ul(e,t){return`border_row${e}col${t}`}function dl(e){var t,n;return((0,d.O9)(e.start)||(0,d.O9)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left),((0,d.O9)(e.end)||(0,d.O9)(e.right))&&(e.end=null!==(n=e.end)&&void 0!==n?n:e.right),delete e.left,delete e.right,e}function hl(e){return(0,d.O9)(e.start)&&(e.left=e.start),(0,d.O9)(e.end)&&(e.right=e.end),e}function pl(e,t){return{id:ul(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}}function ml(e,t){let n=!1;return(0,u.z0)(e.getSelectedRange(),(o=>{o.forAll(((o,i)=>{if(o<0||i<0)return;const r=e.getCellMeta(o,i).borders;if(r){if(!t)return n=!0,!1;if(!(0,s.mQ)(r[t],"hide")||!1===r[t].hide)return n=!0,!1}}))})),n}function gl(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}const fl=new Map([["left","start"],["right","end"]]);function bl(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return ml(this,t)&&(e=gl(e)),e},callback(n,o){const i=ml(this,t);e.prepareBorder(o,t,i)}}}function vl(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return ml(this,"bottom")&&(e=gl(e)),e},callback(t,n){const o=ml(this,"bottom");e.prepareBorder(n,"bottom",o)}}}function wl(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_BORDERS_LEFT);return ml(this,t)&&(e=gl(e)),e},callback(n,o){const i=ml(this,t);e.prepareBorder(o,t,i)}}}function yl(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,n){e.prepareBorder(n,"noBorders")},disabled(){return!ml(this)}}}function Cl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const xl="customBorders";var El=new WeakSet;class Sl extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=El),t.add(e),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"savedBorders",[])}static get PLUGIN_KEY(){return xl}static get PLUGIN_PRIORITY(){return 90}isEnabled(){return!!this.hot.getSettings()[xl]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>Cl(El,this,Al).call(this,e))),this.addHook("init",(()=>Cl(El,this,kl).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let n=["top","bottom","start","end"],o=null;t&&(this.checkSettingsCohesion([t]),n=Object.keys(t),o=dl(t));const i=(0,vs.ML)(e),r=(0,vs._e)(i,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,u.z0)(e,(e=>{r(e).forAll(((e,t)=>{(0,u.z0)(n,(n=>{var i,r;this.prepareBorderFromCustomAdded(e,t,o,(i=n,null!==(r=fl.get(i))&&void 0!==r?r:i))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,vs.ML)(e),n=(0,vs._e)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),o=[];return(0,u.z0)(e,(e=>{n(e).forAll(((e,t)=>{(0,u.z0)(this.savedBorders,(n=>{n.row===e&&n.col===t&&o.push(hl(n))}))}))})),o}clearBorders(e){e?this.setBorders(e):((0,u.z0)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const n=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,n,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:n})}prepareBorderFromCustomAdded(e,t,n,o){const i=this.hot.countRows(),r=this.hot.countCols();if(e>=i||t>=r)return;let a=pl(e,t);var l,c;n&&(l=a,c=n,(0,s.mQ)(c,"border")&&c.border&&(l.border=c.border),(0,s.mQ)(c,"top")&&(0,d.O9)(c.top)&&(c.top?((0,s.Gv)(c.top)||(c.top={width:1,color:"#000"}),l.top=c.top):(c.top={hide:!0},l.top=c.top)),(0,s.mQ)(c,"bottom")&&(0,d.O9)(c.bottom)&&(c.bottom?((0,s.Gv)(c.bottom)||(c.bottom={width:1,color:"#000"}),l.bottom=c.bottom):(c.bottom={hide:!0},l.bottom=c.bottom)),(0,s.mQ)(c,"start")&&(0,d.O9)(c.start)&&(c.start?((0,s.Gv)(c.start)||(c.start={width:1,color:"#000"}),l.start=c.start):(c.start={hide:!0},l.start=c.start)),(0,s.mQ)(c,"end")&&(0,d.O9)(c.end)&&(c.end?((0,s.Gv)(c.end)||(c.end={width:1,color:"#000"}),l.end=c.end):(c.end={hide:!0},l.end=c.end)),a=l,(0,u.z0)(this.hot.selection.highlight.customSelections,(e=>{if(a.id===e.settings.id)return Object.assign(e.settings,n),a.id=e.settings.id,a.top=e.settings.top,a.bottom=e.settings.bottom,a.start=e.settings.start,a.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",hl(a)),this.insertBorderIntoSettings(a,o)}prepareBorderFromCustomAddedRange(e,t){const n=Math.min(e.to.row,this.hot.countRows()-1),o=Math.min(e.to.col,this.hot.countCols()-1);(0,At.Ti)(e.from.row,n,(n=>{(0,At.Ti)(e.from.col,o,(o=>{const i=pl(n,o);let r=0;n===e.from.row&&(0,s.mQ)(t,"top")&&(r+=1,i.top=t.top),n===e.to.row&&(0,s.mQ)(t,"bottom")&&(r+=1,i.bottom=t.bottom),o===e.from.col&&(0,s.mQ)(t,"start")&&(r+=1,i.start=t.start),o===e.to.col&&(0,s.mQ)(t,"end")&&(r+=1,i.end=t.end),r>0&&(this.hot.setCellMeta(n,o,"borders",hl(i)),this.insertBorderIntoSettings(i))}))}))}removeAllBorders(e,t){const n=ul(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,n,o){let i=this.hot.getCellMeta(e,t).borders;i=i&&void 0!==i.border?dl(i):pl(e,t),o?(i[n]={hide:!0},4===this.countHide(i)?this.removeAllBorders(e,t):(this.checkCustomSelectionsFromContextMenu(i,n,o)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",hl(i)))):(i[n]={width:1,color:"#000"},this.checkCustomSelectionsFromContextMenu(i,n,o)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",hl(i)))}prepareBorder(e,t,n){(0,u.z0)(e,(e=>{let{start:o,end:i}=e;if(o.row===i.row&&o.col===i.col)"noBorders"===t?this.removeAllBorders(o.row,o.col):this.setBorder(o.row,o.col,t,n);else switch(t){case"noBorders":(0,At.Ti)(o.col,i.col,(e=>{(0,At.Ti)(o.row,i.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,At.Ti)(o.col,i.col,(e=>{this.setBorder(o.row,e,t,n)}));break;case"bottom":(0,At.Ti)(o.col,i.col,(e=>{this.setBorder(i.row,e,t,n)}));break;case"start":(0,At.Ti)(o.row,i.row,(e=>{this.setBorder(e,o.col,t,n)}));break;case"end":(0,At.Ti)(o.row,i.row,(e=>{this.setBorder(e,i.col,t,n)}))}}))}createCustomBorders(e){(0,u.z0)(e,(e=>{const t=dl(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:n,start:o,end:i}=e,r=[t,n,o,i];return(0,u.mu)(r,((e,t)=>{let n=e;return t&&t.hide&&(n+=1),n}),0)}clearBordersFromSelectionSettings(e){const t=(0,u.YD)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,u.z0)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,u.z0)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,u.YD)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,u.z0)(this.savedBorders,((n,o)=>{if(e.id===n.id)return this.savedBorders[o]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,n){let o=!1;return(0,u.z0)(this.hot.selection.highlight.customSelections,(i=>{if(e.id===i.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(i);return(0,u.z0)(e,(e=>{e.toggleHiddenClass(t,n)})),o=!0,!1}})),o}checkCustomSelections(e,t,n){const o=this.countHide(e);let i=!1;return 4===o?(this.removeAllBorders(e.row,e.col),i=!0):(0,u.z0)(this.hot.selection.highlight.customSelections,(o=>{if(e.id===o.settings.id){if(o.visualCellRange=t,o.commit(),n){const t=this.hot.view._wt.selectionManager.getBorderInstances(o);(0,u.z0)(t,(t=>{t.changeBorderStyle(n,e)}))}return i=!0,!1}})),i}changeBorderSettings(){const e=this.hot.getSettings()[xl];if(Array.isArray(e)){const t=(0,s.Go)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=e.some((e=>(0,d.O9)(e.left)||(0,d.O9)(e.right))),n=e.some((e=>(0,d.O9)(e.start)||(0,d.O9)(e.end)));if(t&&n)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function Al(e){var t;this.hot.getSettings()[xl]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||!!e.isSingleHeader()||this.selection.isSelectedByCorner()},submenu:{items:[(t=this,{key:"borders:top",name(){let e=this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_BORDERS_TOP);return ml(this,"top")&&(e=gl(e)),e},callback(e,n){const o=ml(this,"top");t.prepareBorder(n,"top",o)}}),bl(this),vl(this),wl(this),yl(this)]}})}function kl(){this.changeBorderSettings()}function Rl(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ml(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Tl="dragToScroll";var Il=new WeakSet;class Pl extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Il),t.add(e),Rl(this,"boundaries",null),Rl(this,"callback",null),Rl(this,"listening",!1)}static get PLUGIN_KEY(){return Tl}static get PLUGIN_PRIORITY(){return 100}isEnabled(){return!!this.hot.getSettings()[Tl]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>Ml(Il,this,Ol).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>Ml(Il,this,Ol).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let n=0,o=0;t<this.boundaries.top?o=t-this.boundaries.top:t>this.boundaries.bottom&&(o=t-this.boundaries.bottom),e<this.boundaries.left?n=e-this.boundaries.left:e>this.boundaries.right&&(n=e-this.boundaries.right),this.callback(n,o)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,i.Ly)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function Ol(e){if((0,r.nO)(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback(((e,n)=>{var o,i;const r=null!==(o=t.scrollLeft)&&void 0!==o?o:t.scrollX,s=null!==(i=t.scrollTop)&&void 0!==i?i:t.scrollY;t.scroll(r+50*Math.sign(e),s+20*Math.sign(n))})),this.listen()}function Dl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nl(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hl(e,t,n){return e.set(Ll(e,t),n),n}function Ll(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("afterDropdownMenuDefaultOptions"),Ee.R.getSingleton().register("beforeDropdownMenuShow"),Ee.R.getSingleton().register("afterDropdownMenuShow"),Ee.R.getSingleton().register("afterDropdownMenuHide"),Ee.R.getSingleton().register("afterDropdownMenuExecute");const $l="dropdownMenu",_l="changeType",zl=$l;var Fl=new WeakMap,Bl=new WeakSet;class jl extends un{static get PLUGIN_KEY(){return $l}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[ms,gs,Rr,ws,Rr,ps,Rr,fs,Rr,hs]}constructor(e){var t;super(e),Dl(this,t=Bl),t.add(this),Nl(this,"commandExecutor",new ds(this.hot)),Nl(this,"itemsFactory",null),Nl(this,"menu",null),function(e,t){Dl(e,t),t.set(e,!1)}(this,Fl),this.hot.addHook("afterGetColHeader",((e,t)=>Ll(Bl,this,Gl).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[$l]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new Ts(this.hot,jl.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Ll(Bl,e,Ql).call(e,...n)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Ll(Bl,e,Xl).call(e,...n)}));const t=this.hot.getSettings()[$l],n={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",n),this.itemsFactory.setPredefinedItems(n.items);const o=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new ia(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",o),this.menu.setMenuItems(o),this.menu.addLocalHook("beforeOpen",(()=>Ll(Bl,this,Kl).call(this))),this.menu.addLocalHook("afterOpen",(()=>Ll(Bl,this,Ul).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>Ll(Bl,this,ql).call(this,e))),this.menu.addLocalHook("afterClose",(()=>Ll(Bl,this,Yl).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e.executeCommand.call(e,...n)})),(0,u.z0)(o,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),n=Or(this.menu.container,this.hot.rootDocument),o=this.hot.getCell(-1,t.col,!0).querySelector(`.${_l}`),i=o.getBoundingClientRect();this.open({left:i.left+n.left,top:i.top+o.offsetHeight+n.top},{left:i.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:zl},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:zl}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(zl)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>Ll(Bl,this,Vl).call(this,e)))}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,s.v4)(n,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];this.commandExecutor.execute(e,...n)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function Wl(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function Vl(e){if((0,i.nB)(e.target,_l)){const t=Or(this.menu.container,this.hot.rootDocument),n=e.target.getBoundingClientRect();e.stopPropagation(),Hl(Fl,this,!1),this.open({left:n.left+t.left,top:n.top+e.target.offsetHeight+t.top},{left:n.width,right:0,above:0,below:3})}}function Gl(e,t){const n=t.parentNode;if(!n)return;const o=n.parentNode.childNodes,r=Array.prototype.indexOf.call(o,n);if(e<0||r!==o.length-1)return;const s=t.querySelector(`.${_l}`);if(this.enabled&&s)return;if(!this.enabled)return void(s&&s.parentNode.removeChild(s));const a=this.hot.rootDocument.createElement("button");a.className=_l,a.type="button",a.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,i.Bq)(a,[(0,g.MG)(),(0,g.SM)(" ")]),(0,i.Bq)(t,[(0,g.wP)("menu")])),a.onclick=function(){return!1},t.firstChild.insertBefore(a,t.firstChild.firstChild)}function Kl(){this.hot.runHooks("beforeDropdownMenuShow",this)}function Ul(){this.hot.runHooks("afterDropdownMenuShow",this),Ll(Bl,this,Wl).call(this,this.menu)}function ql(e){Ll(Bl,this,Wl).call(this,e)}function Yl(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Xl(e){return(t=Fl).get(Ll(t,this))?null:e;var t}function Ql(e){(0,i.nB)(e.target,_l)&&Hl(Fl,this,!0)}function Jl(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}jl.SEPARATOR={name:Rr};const Zl=class{constructor(e){Jl(this,"hot",void 0),Jl(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:n,endCol:o}=this._getDataRange(),i=this.options,r=[];return(0,At.Ti)(e,n,(e=>{const n=[];!i.exportHiddenRows&&this._isHiddenRow(e)||((0,At.Ti)(t,o,(t=>{!i.exportHiddenColumns&&this._isHiddenColumn(t)||n.push(this.hot.getDataAtCell(e,t))})),r.push(n))})),r}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:n}=this._getDataRange(),o=this.hot.getRowHeader();(0,At.Ti)(t,n,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(o[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:n}=this._getDataRange(),o=this.hot.getColHeader();(0,At.Ti)(t,n,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(o[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[n=0,o=0,i=t,r=e]=this.options.range;return n=Math.max(n,0),o=Math.max(o,0),i=Math.min(i,t),r=Math.min(r,e),{startRow:n,startCol:o,endRow:i,endCol:r}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}};function ec(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class tc{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){ec(this,"dataProvider",void 0),ec(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,s.o8)(this.constructor.DEFAULT_OPTIONS);const n=new Date;return t=(0,s.X$)((0,s.o8)(tc.DEFAULT_OPTIONS),t),t=(0,s.X$)(t,e),t.filename=(0,h.V2)(t.filename,{YYYY:n.getFullYear(),MM:`${n.getMonth()+1}`.padStart(2,"0"),DD:`${n.getDate()}`.padStart(2,"0")}),t}}const nc=tc;function oc(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ic=String.fromCharCode(13),rc=String.fromCharCode(34),sc=String.fromCharCode(10),ac=String.fromCharCode(61),lc=String.fromCharCode(43),cc=String.fromCharCode(45),uc=String.fromCharCode(64),dc=String.fromCharCode(9);var hc=new WeakSet;function pc(e){return e.startsWith(ac)||e.startsWith(lc)||e.startsWith(cc)||e.startsWith(uc)||e.startsWith(dc)||e.startsWith(ic)?`'${e}`:e}function mc(e,t){return t.test(e)?`'${e}`:e}const gc="csv",fc={[gc]:class extends nc{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=hc),t.add(e)}static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n",sanitizeValues:!1}}export(){const e=this.options,t=this.dataProvider.getData();let n=this.dataProvider.getColumnHeaders();const o=n.length>0,i=this.dataProvider.getRowHeaders(),r=i.length>0;let s=e.bom?String.fromCharCode(65279):"";return o&&(n=(0,u.YD)(n,(t=>this._escapeCell(t,{force:!0,sanitizeValue:e.sanitizeValues}))),r&&(s+=e.columnDelimiter),s+=n.join(e.columnDelimiter),s+=e.rowDelimiter),(0,u.z0)(t,((t,n)=>{n>0&&(s+=e.rowDelimiter),r&&(s+=this._escapeCell(i[n],{sanitizeValue:e.sanitizeValues}),s+=e.columnDelimiter);const o=t.map((t=>this._escapeCell(t,{sanitizeValue:e.sanitizeValues}))).join(e.columnDelimiter);s+=o})),s}_escapeCell(e){let{force:t=!1,sanitizeValue:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,d.As)(e);return""===o||(n&&(t=!0),n instanceof RegExp?o=oc(hc,this,mc).call(this,o,n):"function"==typeof n?o=n(o):n&&(o=oc(hc,this,pc).call(this,o)),(t||o.indexOf(ic)>=0||o.indexOf(rc)>=0||o.indexOf(sc)>=0||o.indexOf(this.options.columnDelimiter)>=0)&&(o=o.replace(new RegExp('"',"g"),'""'),o=`"${o}"`)),o}}};class bc extends un{static get PLUGIN_KEY(){return"exportFile"}static get PLUGIN_PRIORITY(){return 240}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:n,rootWindow:o}=this.hot,i=this._createTypeFormatter(e,t),r=this._createBlob(i),s=o.URL||o.webkitURL,a=n.createElement("a"),l=`${i.options.filename}.${i.options.fileExtension}`;if(void 0!==a.download){const e=s.createObjectURL(r);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),n.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),n.body.removeChild(a),setTimeout((()=>{s.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(r,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!fc[e])throw new Error(`Export format type "${e}" is not supported.`);return function(e,t,n){return"function"==typeof fc[e]?new fc[e](t,n):null}(e,new Zl(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}function vc(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(93514);class wc{constructor(e,t){let{id:n,stateless:o=!0}=t;vc(this,"hot",void 0),vc(this,"id",void 0),vc(this,"elements",[]),vc(this,"hidden",!1),vc(this,"stateId",""),vc(this,"state",void 0),this.hot=e,this.id=n,this.stateId=`Filters.component.${this.id}`,this.state=o?null:this.hot.columnIndexMapper.registerMap(this.stateId,new ti.z)}getElements(){return this.elements}reset(){(0,u.z0)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,u.z0)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}(0,s.co)(wc,Zi.A);const yc={};function Cc(e,t){if(!yc[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:n,descriptor:o}=yc[e];let i=t;return o.inputValuesDecorator&&(i=o.inputValuesDecorator(i)),function(e){return n.apply(e.meta.instance,[].concat([e],[i]))}}function xc(e){if(!yc[e])throw Error(`Filter condition "${e}" does not exist.`);return yc[e].descriptor}function Ec(e,t,n){n.key=e,yc[e]={condition:t,descriptor:n}}const Sc="none";Ec(Sc,(function(){return!0}),{name:Se.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1});const Ac="empty";Ec(Ac,(function(e){return(0,d.Im)(e.value)}),{name:Se.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0});const kc="not_empty";Ec(kc,(function(e,t){return!Cc(Ac,t)(e)}),{name:Se.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0});const Rc="eq";Ec(Rc,(function(e,t){let[n]=t;return(0,d.As)(e.value).toLocaleLowerCase(e.meta.locale)===(0,d.As)(n)}),{name:Se.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0});const Mc="neq";Ec(Mc,(function(e,t){return!Cc(Rc,t)(e)}),{name:Se.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0}),Ec("gt",(function(e,t){let[n]=t,o=n;return"numeric"===e.meta.type&&(o=parseFloat(o,10)),e.value>o}),{name:Se.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0}),Ec("gte",(function(e,t){let[n]=t,o=n;return"numeric"===e.meta.type&&(o=parseFloat(o,10)),e.value>=o}),{name:Se.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0}),Ec("lt",(function(e,t){let[n]=t,o=n;return"numeric"===e.meta.type&&(o=parseFloat(o,10)),e.value<o}),{name:Se.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0}),Ec("lte",(function(e,t){let[n]=t,o=n;return"numeric"===e.meta.type&&(o=parseFloat(o,10)),e.value<=o}),{name:Se.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0});const Tc="date_after";Ec(Tc,(function(e,t){let[n]=t;const o=T(e.value,e.meta.dateFormat),i=T(n,e.meta.dateFormat);return!(!o.isValid()||!i.isValid())&&o.diff(i)>=0}),{name:Se.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0});const Ic="date_before";Ec(Ic,(function(e,t){let[n]=t;const o=T(e.value,e.meta.dateFormat),i=T(n,e.meta.dateFormat);return!(!o.isValid()||!i.isValid())&&o.diff(i)<=0}),{name:Se.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0});const Pc="between";Ec(Pc,(function(e,t){let[n,o]=t,i=n,r=o;if("numeric"===e.meta.type){const e=parseFloat(i,10),t=parseFloat(r,10);i=Math.min(e,t),r=Math.max(e,t)}else if("date"===e.meta.type){const t=Cc(Ic,[r]),n=Cc(Tc,[i]);return t(e)&&n(e)}return e.value>=i&&e.value<=r}),{name:Se.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0});const Oc="not_between";Ec(Oc,(function(e,t){return!Cc(Pc,t)(e)}),{name:Se.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0});const Dc="begins_with";Ec(Dc,(function(e,t){let[n]=t;return(0,d.As)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,d.As)(n))}),{name:Se.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0});const Nc="ends_with";Ec(Nc,(function(e,t){let[n]=t;return(0,d.As)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,d.As)(n))}),{name:Se.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0});const Hc="contains";Ec(Hc,(function(e,t){let[n]=t;return(0,d.As)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,d.As)(n))>=0}),{name:Se.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0});const Lc="not_contains";Ec(Lc,(function(e,t){return!Cc(Hc,t)(e)}),{name:Se.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0});const $c="date_tomorrow";Ec($c,(function(e){const t=T(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(T().subtract(-1,"days").startOf("day"),"d")}),{name:Se.FILTERS_CONDITIONS_TOMORROW,inputsCount:0});const _c="date_today";Ec(_c,(function(e){const t=T(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(T().startOf("day"),"d")}),{name:Se.FILTERS_CONDITIONS_TODAY,inputsCount:0});const zc="date_yesterday";Ec(zc,(function(e){const t=T(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(T().subtract(1,"days").startOf("day"),"d")}),{name:Se.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0});const Fc="numeric",Bc="text",jc="date",Wc={[Fc]:[Sc,Rr,Ac,kc,Rr,Rc,Mc,Rr,"gt","gte","lt","lte",Pc,Oc],[Bc]:[Sc,Rr,Ac,kc,Rr,Rc,Mc,Rr,Dc,Nc,Rr,Hc,Lc],[jc]:[Sc,Rr,Ac,kc,Rr,Rc,Mc,Rr,Ic,Tc,Pc,Rr,$c,_c,zc]};function Vc(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Gc="built",Kc="building",Uc=["click","input","keydown","keypress","keyup","focus","blur","change"];class qc{static get DEFAULTS(){return(0,s.o8)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){Vc(this,"hot",void 0),Vc(this,"eventManager",new ye.A(this)),Vc(this,"options",void 0),Vc(this,"_element",void 0),Vc(this,"buildState",void 0),this.hot=e,this.options=(0,s.X$)(qc.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===Kc?this._element:this.buildState===Gc?(this.update(),this._element):(this.buildState=Kc,this.build(),this.buildState=Gc,this._element)}isBuilt(){return this.buildState===Gc}translateIfPossible(e){return"string"==typeof e&&e.startsWith(Se.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,(e=>this.runLocalHooks(t,e,this)))};if(this.buildState||(this.buildState=Kc),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&(0,i.iQ)(this._element,this.options.className),this.options.children.length)(0,u.z0)(this.options.children,(e=>this._element.appendChild(e.element)));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),(0,s.v4)(this.options,((e,n)=>{void 0!==t[n]&&"className"!==n&&"tagName"!==n&&"children"!==n&&(t[n]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,u.z0)(Uc,(n=>e(t,n)))}else(0,u.z0)(Uc,(t=>e(this._element,t)))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}function Yc(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xc(e,t){return e.get(Qc(e,t))}function Qc(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(0,s.co)(qc,Zi.A);var Jc=new WeakMap,Zc=new WeakSet;class eu extends qc{static get DEFAULTS(){return(0,s.o8)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){var n;super(e,(0,s.X$)(eu.DEFAULTS,t)),Yc(this,n=Zc),n.add(this),function(e,t){Yc(e,t),t.set(e,void 0)}(this,Jc),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(e=>Qc(Zc,this,tu).call(this,e)))}build(){super.build();const e=this.hot.rootDocument.createElement("div");var t,n;t=Jc,n=this._element.firstChild,t.set(Qc(t,this),n),(0,i.iQ)(this._element,"htUIInput"),(0,i.iQ)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(Xc(Jc,this).type=this.options.type,Xc(Jc,this).placeholder=this.translateIfPossible(this.options.placeholder),Xc(Jc,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&Xc(Jc,this).focus()}}function tu(e){this.options.value=e.target.value}function nu(e,t,n){ou(e,t),t.set(e,n)}function ou(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function iu(e,t,n){return e.set(su(e,t),n),n}function ru(e,t){return e.get(su(e,t))}function su(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var au=new WeakMap,lu=new WeakMap,cu=new WeakMap,uu=new WeakMap,du=new WeakMap,hu=new WeakSet;class pu extends qc{static get DEFAULTS(){return(0,s.o8)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){var n;super(e,(0,s.X$)(pu.DEFAULTS,t)),ou(this,n=hu),n.add(this),nu(this,au,null),nu(this,lu,[]),nu(this,cu,void 0),nu(this,uu,void 0),nu(this,du,void 0),this.registerHooks()}getMenu(){return ru(au,this)}registerHooks(){this.addLocalHook("click",(()=>su(hu,this,fu).call(this)))}setItems(e){iu(lu,this,this.translateNames(e)),ru(au,this)&&ru(au,this).setMenuItems(ru(lu,this))}translateNames(e){return(0,u.z0)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),iu(au,this,new ia(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),ru(au,this).setMenuItems(ru(lu,this));const e=new qc(this.hot,{className:"htUISelectCaption"}),t=new qc(this.hot,{className:"htUISelectDropdown"});iu(cu,this,e),iu(uu,this,e.element),iu(du,this,t),this.hot.getSettings().ariaTags&&((0,i.Bq)(t.element,[(0,g.MG)()]),(0,i.Bq)(this._element,[(0,g.$o)()])),(0,u.z0)([e,t],(e=>this._element.appendChild(e.element))),ru(au,this).addLocalHook("select",(e=>su(hu,this,mu).call(this,e))),ru(au,this).addLocalHook("afterClose",(()=>su(hu,this,gu).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:ru(au,this).hot.getTranslatedPhrase(Se.FILTERS_CONDITIONS_NONE),ru(uu,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();ru(au,this)&&(ru(au,this).open(),ru(au,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),ru(au,this).getNavigator().toFirstItem(),ru(au,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){ru(au,this)&&ru(au,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){ru(au,this)&&(ru(au,this).destroy(),iu(au,this,null)),ru(cu,this)&&ru(cu,this).destroy(),ru(du,this)&&ru(du,this).destroy(),super.destroy()}}function mu(e){e.name!==Rr&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function gu(){this.runLocalHooks("afterClose")}function fu(){this.openOptions()}function bu(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var wu=new WeakSet;class yu extends wc{constructor(e,t){var n,o;super(e,{id:t.id,stateless:!1}),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,o=wu),o.add(n),bu(this,"name",""),bu(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new pu(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new eu(this.hot,{placeholder:Se.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new eu(this.hot,{placeholder:Se.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>vu(wu,this,Cu).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,u.z0)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>vu(wu,this,xu).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,s.o8)(e.command);t.name.startsWith(Se.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,u.z0)(e.args,((e,n)=>{if(n>t.inputsCount-1)return!1;const o=this.getInputElement(n);o.setValue(e),o[t.inputsCount>n?"show":"hide"](),n||this.hot._registerTimeout((()=>o.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||xc(Sc),t=[];return(0,u.z0)(this.getInputElements(),((n,o)=>{e.inputsCount>o&&t.push(n.getValue())})),{command:e,args:t}}updateState(e,t){const n=xc(e?e.name:Sc);this.state.setValueAtIndex(t,{command:n,args:e?e.args:[]}),e||(0,u.z0)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof pu))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof eu))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,o,r,s)=>{(0,i.iQ)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,i.iQ)(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return(0,i.iQ)(a,"htFiltersMenuLabel"),a.textContent=s,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||(0,u.z0)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[xc(Sc)];if(null!==e){const{visualIndex:n}=e;t=function(e){const t=[];let n=e;return Wc[n]||(n=Bc),(0,u.z0)(Wc[n],(e=>{let n;n=e===Rr?{name:Rr}:(0,s.o8)(xc(e)),t.push(n)})),t}(this.hot.getDataType(0,n,this.hot.countRows(),n))}(0,u.z0)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function Cu(e){(0,u.z0)(this.getInputElements(),((t,n)=>{t[e.inputsCount>n?"show":"hide"](),0===n&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function xu(e){(0,p.m0)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,r.CA)(e))}const Eu={};function Su(e,t,n){Eu[e]={name:t,func:n}}const Au="conjunction",ku=Se.FILTERS_LABELS_CONJUNCTION;Su(Au,ku,(function(e,t){return e.every((e=>e.func(t)))}));const Ru="disjunction",Mu=Se.FILTERS_LABELS_DISJUNCTION;Su(Ru,Mu,(function(e,t){return e.some((e=>e.func(t)))}));const Tu="disjunctionWithExtraCondition",Iu=Se.FILTERS_LABELS_DISJUNCTION;function Pu(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Ou(e,t){return e.get(Nu(e,t))}function Du(e,t,n){return e.set(Nu(e,t),n),n}function Nu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Su(Tu,Iu,(function(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some((e=>e.func(t)))&&e[e.length-1].func(t)}));var Hu=new WeakMap,Lu=new WeakMap;class $u extends qc{static get DEFAULTS(){return(0,s.o8)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,s.X$)($u.DEFAULTS,t)),Pu(this,Hu,void 0),Pu(this,Lu,void 0)}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),Du(Lu,this,e),Du(Hu,this,this._element.firstChild),Ou(Hu,this).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(Ou(Lu,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&Ou(Hu,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(Ou(Hu,this).checked=e)}focus(){this.isBuilt()&&Ou(Hu,this).focus()}}var _u=new WeakSet;class zu extends wc{constructor(e,t){var n,o;super(e,{id:t.id,stateless:!1}),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,o=_u),o.add(n),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,i.iQ)(t.parentNode,"htFiltersMenuOperators"),(0,u.z0)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[Au,Ru];(0,u.z0)(e,(t=>{const n=new $u(this.hot,{name:"operator",label:{htmlFor:t,textContent:(o=t,Eu[o].name)},value:t,checked:t===e[0],id:t});var o;n.addLocalHook("change",(e=>function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(_u,this,Fu).call(this,e))),this.elements.push(n)}))}setChecked(e){if(this.elements.length<e)throw Error(bi.O`Radio button with index ${e} doesn't exist.`);(0,u.z0)(this.elements,((t,n)=>{t.setChecked(n===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof $u&&e.isChecked()));return e?e.getValue():Au}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,u.z0)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>1?arguments[1]:void 0,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Au;t===Tu&&(t=Ru),this.state.setValueAtIndex(e,t)}reset(){this.setChecked(0)}}function Fu(e){this.setState(e.target.value)}function Bu(e,t){let n=e;return""===n&&(n=`(${t})`),n}function ju(e){const t=new Set(e);return function(e){return t.has(e)}}function Wu(e){return null==e?"":e}function Vu(e){return Array.from(new Set(e)).map((e=>Wu(e))).sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1))}function Gu(e,t,n,o){const i=[],r=e===t;let s;return r||(s=ju(t)),e.forEach((e=>{let t=!1;(r||s(e))&&(t=!0);const a={checked:t,value:e,visualValue:Bu(e,n)};o&&o(a),i.push(a)})),i}(0,hn.II)();var Ku=n(85874);function Uu(e,t){return e.get(qu(e,t))}function qu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Yu=new WeakMap;class Xu extends qc{static get DEFAULTS(){return(0,s.o8)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){var n,o,i;super(e,(0,s.X$)(Xu.DEFAULTS,t)),i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,o=Yu),o.set(n,i)}build(){var e,t;super.build(),e=Yu,t=this._element.firstChild,e.set(qu(e,this),t)}update(){this.isBuilt()&&(Uu(Yu,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&Uu(Yu,this).focus()}activate(){Uu(Yu,this).click()}}function Qu(e,t,n){Ju(e,t),t.set(e,n)}function Ju(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Zu(e,t){return e.get(td(e,t))}function ed(e,t,n){return e.set(td(e,t),n),n}function td(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const nd="multipleSelect.itemBox";var od=new WeakMap,id=new WeakMap,rd=new WeakMap,sd=new WeakMap,ad=new WeakMap,ld=new WeakMap,cd=new WeakSet;class ud extends qc{static get DEFAULTS(){return(0,s.o8)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){var n;super(e,(0,s.X$)(ud.DEFAULTS,t)),Ju(this,n=cd),n.add(this),Qu(this,od,[]),Qu(this,id,void 0),Qu(this,rd,void 0),Qu(this,sd,void 0),Qu(this,ad,void 0),Qu(this,ld,void 0),ed(sd,this,new eu(this.hot,{placeholder:Se.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),ed(ad,this,new Xu(this.hot,{textContent:Se.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),ed(ld,this,new Xu(this.hot,{textContent:Se.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return Zu(id,this)}registerHooks(){Zu(sd,this).addLocalHook("keydown",(e=>td(cd,this,hd).call(this,e))),Zu(sd,this).addLocalHook("input",(e=>td(cd,this,dd).call(this,e))),Zu(ad,this).addLocalHook("click",(e=>td(cd,this,pd).call(this,e))),Zu(ld,this).addLocalHook("click",(e=>td(cd,this,md).call(this,e)))}setItems(e){var t;ed(od,this,e),null===(t=Zu(id,this))||void 0===t||t.loadData(Zu(od,this))}setLocale(e){ed(rd,this,e)}getLocale(){return Zu(rd,this)}getItems(){return[...Zu(od,this)]}getValue(){return function(e){const t=[];return e.forEach((e=>{e.checked&&t.push(e.value)})),t}(Zu(od,this))}getSearchInputElement(){return Zu(sd,this)}getSelectAllElement(){return Zu(ad,this)}getClearAllElement(){return Zu(ld,this)}isSelectedAllValues(){return Zu(od,this).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),n=new qc(this.hot,{className:"htUISelectionControls",children:[Zu(ad,this),Zu(ld,this)]});this._element.appendChild(Zu(sd,this).element),this._element.appendChild(n.element),this._element.appendChild(t);const o=t=>{var n;if(!this._element)return;null===(n=Zu(id,this))||void 0===n||n.destroy(),(0,i.iQ)(t,"htUIMultipleSelectHot"),ed(id,this,new this.hot.constructor(t,{data:Zu(od,this),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,n,o,i,r)=>{e.title=r.instance.getDataAtRowProp(t,r.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{Zu(id,this).listen()},modifyColWidth:t=>{const n=Zu(id,this).container.scrollWidth-(0,i.XJ)(e);return void 0!==t&&t<n?n:t},maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},themeName:this.hot.getCurrentThemeName(),layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),Zu(id,this).init(),this.hot.addHook("afterSetTheme",((e,t)=>{t||Zu(id,this).useTheme(e)}));const o=Zu(id,this).getShortcutManager().getContext("grid");o.removeShortcutsByKeys(["Tab"]),o.removeShortcutsByKeys(["Shift","Tab"]),o.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:nd}),o.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{Zu(id,this).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:nd})};o(t),this.hot._registerTimeout((()=>o(t)),100)}focus(){this.isBuilt()&&Zu(id,this).listen()}reset(){Zu(sd,this).reset(),Zu(ad,this).reset(),Zu(ld,this).reset()}update(){this.isBuilt()&&(Zu(id,this).loadData(function(e,t){const n=ju(t);return e.map((e=>(e.checked=n(e.value),e)))}(Zu(od,this),this.options.value)),super.update())}destroy(){var e;null===(e=Zu(id,this))||void 0===e||e.destroy(),Zu(sd,this).destroy(),Zu(ld,this).destroy(),Zu(ad,this).destroy(),ed(sd,this,null),ed(ld,this,null),ed(ad,this,null),ed(id,this,null),ed(od,this,null),super.destroy()}}function dd(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let n;n=""===t?[...Zu(od,this)]:Zu(od,this).filter((e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),Zu(id,this).loadData(n)}function hd(e){this.runLocalHooks("keydown",e,this),(0,f.OH)(p.m0,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,r.CA)(e),Zu(id,this).listen(),Zu(id,this).selectCell(0,0))}function pd(e){const t=[];e.preventDefault(),Zu(id,this).getSourceData().forEach(((e,n)=>{e.checked=!0,t.push((0,Ku.Wm)(e,n)[0])})),Zu(id,this).setSourceDataAtCell(t)}function md(e){const t=[];e.preventDefault(),Zu(id,this).getSourceData().forEach(((e,n)=>{e.checked=!1,t.push((0,Ku.Wm)(e,n)[0])})),Zu(id,this).setSourceDataAtCell(t)}const gd="by_value";function fd(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ec(gd,(function(e,t){let[n]=t;return n(e.value)}),{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[ju(t)]},showOperators:!1});var bd,vd=new WeakSet;class wd extends wc{constructor(e,t){var n,o;super(e,{id:t.id,stateless:!1}),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,o=vd),o.add(n),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"name",""),this.name=t.name,this.elements.push(new ud(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>fd(vd,this,yd).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e))),this.hot.addHook("modifyFiltersMultiSelectValue",((e,t)=>fd(vd,this,xd).call(this,e,t)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===gd){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?Sc:gd},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,n,o,i,r)=>{const[s]=(0,u.y0)(n,(e=>e.name===gd)),a={},l=this.hot.getTranslatedPhrase(Se.FILTERS_VALUES_BLANK_CELLS);if(s){const n=i(t,r),c=(0,u.YD)(n,(e=>e.value)),d=new Map(n.map((e=>[e.value,this.hot.getCellMeta(e.meta.visualRow,e.meta.visualCol)]))),h=Vu(c);o&&(s.args[0]=o);const p=[],m=Gu(h,s.args[0],l,(e=>{e.checked&&p.push(e.value),fd(vd,this,Cd).call(this,e,d)})),g=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,g).locale,a.args=[p],a.command=xc(gd),a.itemsSnapshot=m}else a.args=[],a.command=xc(Sc);this.state.setValueAtIndex(t,a)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof ud))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,o,r,s)=>{(0,i.iQ)(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return(0,i.iQ)(a,"htFiltersMenuLabel"),a.textContent=s,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||(0,u.z0)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(Se.FILTERS_VALUES_BLANK_CELLS),t=this._getColumnVisibleValues(),n=t.map((e=>e.value)),o=new Map(t.map((e=>[e.value,e.meta]))),i=Vu(n),r=Gu(i,i,e,(e=>{fd(vd,this,Cd).call(this,e,o)}));this.getMultipleSelectElement().setItems(r),super.reset(),this.getMultipleSelectElement().setValue(i);const s=this.hot.getPlugin("filters").getSelectedColumn();null!==s&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,s.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,u.YD)(this.hot.getDataAtCol(e.visualIndex),((t,n)=>({value:Wu(t),meta:this.hot.getCellMeta(n,e.visualIndex)})))}}function yd(e){(0,p.m0)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,r.CA)(e))}function Cd(e,t){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(e.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",e.visualValue,t.get(e.value)))}function xd(e,t){return"numeric"===t.type?kt(e,t):e}var Ed=new WeakSet;class Sd extends wc{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){var n,o;super(e,{id:t.id,stateless:!0}),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,o=Ed),o.add(n),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"name",""),this.name=t.name,this.elements.push(new eu(this.hot,{type:"button",value:Se.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:Sd.BUTTON_OK})),this.elements.push(new eu(this.hot,{type:"button",value:Se.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:Sd.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,u.z0)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(Ed,this,Ad).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,i.iQ)(t.parentNode,"htFiltersMenuActionBar"),(0,u.z0)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function Ad(e,t){t.options.identifier===bd.BUTTON_OK?this.accept():this.cancel()}function kd(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}bd=Sd;const Rd="ConditionCollection.filteringStates";class Md{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];kd(this,"hot",void 0),kd(this,"isMapRegistrable",void 0),kd(this,"filteringStates",new ti.z),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(Rd,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var n;const o=this.filteringStates.getValueAtIndex(t),i=null!==(n=null==o?void 0:o.conditions)&&void 0!==n?n:[],r=null==o?void 0:o.operation;return this.isMatchInConditions(i,e,r)}isMatchInConditions(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Au;return!e.length||function(e){if(!Eu[e])throw Error(`Operation with id "${e}" does not exist.`);const t=Eu[e].func;return function(e,n){return t(e,n)}}(n)(e,t)}addCondition(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Au,o=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,e).locale,r=t.args.map((e=>"string"==typeof e?e.toLocaleLowerCase(i):e)),s=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const a=this.getOperation(e);if(a){if(a!==n)throw Error(bi.O`The column of index ${e} has been already applied with a \`${a}\`\x20
  5. filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
  6. Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
  7. use it consequently for a particular column).`)}else if((0,d.b0)(Eu[n]))throw new Error(bi.O`Unexpected operation named \`${n}\`. Possible ones are\x20
  8. \`disjunction\` and \`conjunction\`.`);const l=this.getConditions(e);0===l.length?this.filteringStates.setValueAtIndex(e,{operation:n,conditions:[{name:s,args:r,func:Cc(s,r)}]},o):l.push({name:s,args:r,func:Cc(s,r)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,n;return null!==(t=null===(n=this.filteringStates.getValueAtIndex(e))||void 0===n?void 0:n.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map((e=>{let[t]=e;return t}))}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return this.filteringStates.getEntries().reduce(((e,t)=>{let[n,{operation:o,conditions:i}]=t;return e.push({column:n,operation:o,conditions:i.map((e=>{let{name:t,args:n}=e;return{name:t,args:[...n]}}))}),e}),[])}importAllConditions(e){this.clean(),e.forEach((e=>{e.conditions.forEach((t=>this.addCondition(e.column,t)))}))}removeConditions(e){this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const n=this.getConditions(e);return t?n.some((e=>e.name===t)):n.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(Rd),this.filteringStates=null,this.clearLocalHooks()}}(0,s.co)(Md,Zi.A);const Td=Md;function Id(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pd=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];Id(this,"conditionCollection",void 0),Id(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,u.z0)(this.conditionCollection.getFilteredColumns(),((t,n)=>{let o=this.columnDataFactory(t);n&&(o=this._getIntersectData(o,e)),e=this.filterByColumn(t,o)})),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];return(0,u.z0)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&n.push(t)})),n}_getIntersectData(e,t){const n=[];return(0,u.z0)(t,(t=>{const o=t.meta.visualRow;void 0!==e[o]&&(n[o]=e[o])})),n}};function Od(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dd(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Nd=new WeakSet;class Hd{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];var o,i;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(o=this,i=Nd),i.add(o),Od(this,"hot",void 0),Od(this,"conditionCollection",void 0),Od(this,"columnDataFactory",void 0),Od(this,"changes",[]),Od(this,"grouping",!1),Od(this,"latestEditedColumnPosition",-1),Od(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=n,this.conditionCollection.addLocalHook("beforeRemove",(e=>Dd(Nd,this,Ld).call(this,e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>Dd(Nd,this,$d).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>Dd(Nd,this,_d).call(this)))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,u.z0)(this.changes,(e=>{this.updateStatesAtColumn(e)})),this.changes.length=0}updateStatesAtColumn(e,t){var n=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const o=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(e);-1===i&&(i=this.latestEditedColumnPosition);const r=o.slice(0,i),s=o.slice(i);s.length&&s[0].column===e&&s.shift();const a=(0,f.cF)((function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new Td(n.hot,!1),r=[].concat(e,o);i.importAllConditions(r);const s=n.columnDataFactory(t);let a;a=i.isEmpty()?s:new Pd(i,(e=>n.columnDataFactory(e))).filter(),a=(0,u.YD)(a,(e=>e.meta.visualRow));const l=ju(a);return i.destroy(),(0,u.y0)(s,(e=>l(e.meta.visualRow)))}))(r),l=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:l},dependentConditionStacks:s,filteredRowsFactory:a,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),(0,s.v4)(this,((e,t)=>{this[t]=null}))}}function Ld(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function $d(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function _d(){(0,u.z0)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}(0,s.co)(Hd,Zi.A);const zd=Hd,Fd="filters";var Bd=n(41496);function jd(e,t,n){Wd(e,t),t.set(e,n)}function Wd(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vd(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gd(e,t,n){return e.set(Ud(e,t),n),n}function Kd(e,t){return e.get(Ud(e,t))}function Ud(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const qd="filters",Yd=qd;var Xd=new WeakMap,Qd=new WeakMap,Jd=new WeakMap,Zd=new WeakSet;class eh extends un{static get PLUGIN_KEY(){return qd}static get PLUGIN_PRIORITY(){return 250}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){var t,n;super(e),t=this,Wd(this,n=Zd),n.add(this),Vd(this,"dropdownMenuPlugin",null),Vd(this,"conditionCollection",null),Vd(this,"conditionUpdateObserver",null),Vd(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),Vd(this,"filtersRowsMap",null),jd(this,Xd,void 0),jd(this,Qd,new WeakSet),jd(this,Jd,[]),this.hot.addHook("afterGetColHeader",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Ud(Zd,t,ch).call(t,...n)}))}isEnabled(){return!!this.hot.getSettings()[qd]}enablePlugin(){var e=this;if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new Bd.q),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const t=this.hot.getSettings().dropdownMenu,n=t&&t.uiContainer||this.hot.rootDocument.body,o=e=>(e.addLocalHook("accept",(()=>Ud(Zd,this,sh).call(this,"accept"))),e.addLocalHook("cancel",(()=>Ud(Zd,this,sh).call(this,"cancel"))),e.addLocalHook("change",(t=>Ud(Zd,this,ah).call(this,e,t))),e),r=()=>`${this.hot.getTranslatedPhrase(Se.FILTERS_DIVS_FILTER_BY_CONDITION)}:`;if(!this.components.get("filter_by_condition")){const e=new yu(this.hot,{id:"filter_by_condition",name:r,addSeparator:!1,menuContainer:n});e.addLocalHook("afterClose",(()=>Ud(Zd,this,lh).call(this))),this.components.set("filter_by_condition",o(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new zu(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new yu(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:n});e.addLocalHook("afterClose",(()=>Ud(Zd,this,lh).call(this))),this.components.set("filter_by_condition2",o(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",o(new wd(this.hot,{id:"filter_by_value",name:()=>`${this.hot.getTranslatedPhrase(Se.FILTERS_DIVS_FILTER_BY_VALUE)}:`}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new Sd(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new Td(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new zd(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>Ud(Zd,this,uh).call(this,e)))),this.components.forEach((e=>e.show())),this.addHook("afterDropdownMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Ud(Zd,e,rh).call(e,...n)})),this.addHook("beforeDropdownMenuShow",(()=>Ud(Zd,this,ih).call(this))),this.addHook("afterDropdownMenuShow",(()=>Ud(Zd,this,nh).call(this))),this.addHook("afterDropdownMenuHide",(()=>Ud(Zd,this,oh).call(this))),this.addHook("afterChange",(e=>Ud(Zd,this,th).call(this,e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!Kd(Xd,this)&&this.dropdownMenuPlugin.enabled){const e=[{focus:()=>{const e=Kd(Xd,this).getMenu(),t=e.getNavigator(),n=Kd(Xd,this).getLastMenuPage();e.focus(),n>0?t.setCurrentPage(n):t.toFirstItem()}},...Array.from(this.components).map((e=>{let[,t]=e;return t.getElements()})).flat()];Gd(Xd,this,function(e,t){let n,o=-1;const r=(s=t,js({initialPage:0,size:()=>s.length,onItemSelect:(e,t)=>{const n=s[e];return n instanceof ud?t:!(n.element&&!(0,i.zN)(n.element))&&void n.focus()}}));var s;const a=e=>()=>{n.isOpened()&&n.getKeyboardShortcutsCtrl().listen(Fd),r.setCurrentPage(t.indexOf(e))};function l(e){const i=n.getKeyboardShortcutsCtrl(),s=e.getKeyboardShortcutsCtrl();r.clear(),s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:i.getContext(Fd),callback:()=>{e.isSubMenu()&&e.close(),i.listen(Fd)}}]),e.isSubMenu()||i.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{const t=n.getNavigator();t.getCurrentPage()>-1&&(o=t.getCurrentPage()),t.clear(),e.shiftKey?r.toPreviousItem():r.toNextItem()}},{keys:[["Escape"]],callback:()=>{n.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const n=t[r.getCurrentPage()];n instanceof pu&&(n.openOptions(),e.preventDefault()),n instanceof Xu&&(n.activate(),e.preventDefault()),n instanceof qc||e.preventDefault()}}],Fd)}function c(e){e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||r.clear()})),e.addLocalHook("afterSubmenuOpen",l),e.addLocalHook("afterOpen",l),n=e}return t.forEach((e=>{e instanceof qc&&(e.addLocalHook("click",a(e)),e.addLocalHook("focus",a(e)),e.addLocalHook("afterClose",a(e)))})),c(e),{...r,listen:function(){n.focus(),n.getKeyboardShortcutsCtrl().listen(Fd)},setMenu:c,getMenu:function(){return n},getLastMenuPage:function(){return o}}}(this.dropdownMenuPlugin.menu,e));const t=e=>{Kd(Xd,this).listen(),e.preventDefault(),(0,p.m0)(e.keyCode,"TAB")&&(e.shiftKey?Kd(Xd,this).toPreviousItem():Kd(Xd,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",t),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",t)}this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((e,t)=>{e.destroy(),this.components.set(t,null)})),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName)),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:Yd})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Yd)}addCondition(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Au;const i=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(i,{command:{key:t},args:n},o)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}importConditions(e){this.conditionCollection.importAllConditions(e)}exportConditions(){return this.conditionCollection.exportAllConditions()}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),n=!this.conditionCollection.isEmpty();let o=[];const i=this.exportConditions(),r=this.hot.runHooks("beforeFilter",i,Kd(Jd,this));if(!1!==r&&n){const n=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),o=(0,u.YD)(t.filter(),(e=>e.meta.visualRow));const e=ju(o);(0,At.Ti)(this.hot.countSourceRows()-1,(t=>{e(t)||n.push(t)})),(0,u.z0)(n,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),e||o.length||this.hot.deselectCell(),Gd(Jd,this,this.exportConditions())}else!1===r||n?this.importConditions(Kd(Jd,this)):(Gd(Jd,this,this.exportConditions()),this.filtersRowsMap.clear());this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col),!1!==r&&(this.hot.runHooks("afterFilter",i),this.hot.view.adjustElementsSize(),this.hot.render())}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),n=[];return(0,u.z0)(this.hot.getSourceDataAtCol(t),((e,o)=>{var i;const{row:r,col:s,visualCol:a,visualRow:l,type:c,instance:u,dateFormat:d,locale:h}=this.hot.getCellMeta(o,t),p=null!==(i=this.hot.getDataAtCell(this.hot.toVisualRow(o),t))&&void 0!==i?i:e;n.push({meta:{row:r,col:s,visualCol:a,visualRow:l,type:c,instance:u,dateFormat:d,locale:h},value:Wu(p)})})),n}updateValueComponentCondition(e){const t=Vu(this.hot.getDataAtCol(e));this.conditionUpdateObserver.updateStatesAtColumn(e,t)}restoreComponents(e){var t;const n=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach((e=>{e.isHidden()||e.restoreState(n)})),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,n,o){let i=e;return i===Ru&&t.command.key!==Sc&&n.command.key!==Sc&&o.command.key!==Sc?i=Tu:o.command.key!==Sc&&(t.command.key!==Sc&&n.command.key!==Sc||(i=Au)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),n=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...n):this.hideComponents(...n)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new Pd(e,(e=>this.getDataMapAtColumn(e)))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return(0,u.z0)(o,(n=>{(0,u.z0)(t.menuItems,((t,o)=>{t.key===n.getMenuItemDescriptor().key&&e.push(o)}))})),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu.hotMenu,n=t.getPlugin("hiddenRows");for(var o=arguments.length,i=new Array(o>1?o-1:0),r=1;r<o;r++)i[r-1]=arguments[r];const s=this.getIndexesOfComponents(...i);e?n.showRows(s):n.hideRows(s),t.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach(((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))})),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function th(e){e&&(0,u.z0)(e,(e=>{const[,t]=e,n=this.hot.propToCol(t);this.conditionCollection.hasConditions(n)&&this.updateValueComponentCondition(n)}))}function nh(){const e=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),e.updateMenuDimensions()}function oh(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function ih(){const e=this.dropdownMenuPlugin.menu;Kd(Qd,this).has(e)||Kd(Xd,this).setMenu(e),Kd(Qd,this).add(e)}function rh(e){e.items.push({name:Rr}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}function sh(e){var t;if("accept"===e){const e=this.getSelectedColumn();var n;if(null===e)return void(null===(n=this.dropdownMenuPlugin)||void 0===n||n.close());const{physicalIndex:t}=e,o=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),r=this.components.get("filter_by_value").getState(),s=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),o,i,r);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),o.command.key!==Sc&&(this.conditionCollection.addCondition(t,o,s,a),i.command.key!==Sc&&this.conditionCollection.addCondition(t,i,s,a)),r.command.key!==Sc&&this.conditionCollection.addCondition(t,r,s,a),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function ah(e,t){const n=this.dropdownMenuPlugin.menu;this.updateDependentComponentsVisibility(),e.constructor!==yu||t.inputsCount||this.setListeningDropdownMenu(),n.updateMenuDimensions()}function lh(){this.setListeningDropdownMenu()}function ch(e,t,n){const o=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(o)&&n===this.hot.view.getColumnHeadersCount()-1?(0,i.iQ)(t,"htFiltersActive"):(0,i.vy)(t,"htFiltersActive")}function uh(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:n,column:o},conditionArgsChange:i}=e;Array.isArray(i)&&Gd(Jd,this,Kd(Jd,this).map((e=>(e.column===o&&n.length>0&&e.conditions.forEach((e=>{"by_value"===e.name&&(e.args=[[...i]])})),e))));const r=n.filter((e=>e.name===gd)),s=n.filter((e=>e.name!==gd));if(r.length>=2||s.length>=3)(0,Lo.R8)(bi.O`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
  9. The overall amount of conditions exceed the capability of the dropdown menu.\x20
  10. For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(o);this.components.get("filter_by_condition").updateState(s[0],o),this.components.get("filter_by_condition2").updateState(s[1],o),this.components.get("filter_operators").updateState(t,o),this.components.get("filter_by_value").updateState(e)}}n(33110);const dh="internal-use-in-handsontable",hh={licenseKey:dh,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function ph(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[tp])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function mh(e){return Object.keys(e).reduce(((t,n)=>("hyperformula"!==n&&(t[n]=e[n]),t)),{})}function gh(){const e="engine_relationship",t=(0,ai.A)(tp);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function fh(){const e="shared_engine_usage",t=(0,ai.A)(tp);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function bh(e){var t;const n=gh(),o=0===n.size?[]:Array.from(null!==(t=n.get(e))&&void 0!==t?t:[]);return new Map(o.map((e=>[e.getPlugin("formulas").sheetId,e])))}function vh(e,t){if(e){const n=gh(),o=n.get(e),i=fh(),r=i.get(e);o&&o.includes(t)&&(o.splice(o.indexOf(t),1),0===o.length&&n.delete(e)),r&&r.includes(t.guid)&&(r.splice(r.indexOf(t.guid),1),0===r.length&&(i.delete(e),e.destroy()))}}const wh="DD/MM/YYYY";function yh(e,t){return"string"==typeof e&&"date"===t}function Ch(e,t){return T(e,t,!0).isValid()}function xh(e,t){return T(e,t,!0).format(wh)}function Eh(e,t){const n=new Date(Date.UTC(0,0,e+-1));return T(n).format(t)}function Sh(e,t,n){const o=function(e,t){const n=[];return e.forEach((e=>{const o={from:e,to:t};n.forEach((e=>{const t=e.from>e.to,n=e.to<=o.from;e.from>o.from&&n&&t&&(o.from+=1)})),o.from>=t&&(t+=1),n.push(o)})),n}(e,function(e,t,n){const o=Array.from(Array(n).keys()).filter((t=>!1===e.includes(t)));var i;return 0===t?null!==(i=o[t])&&void 0!==i?i:0:o[t-1]+1}(e,t,n));return function(e){return e.forEach(((t,n)=>{e.slice(n+1).forEach((e=>{const n=e.from<e.to;e.from>t.from&&n&&(e.from-=1)}))})),e}(o)}function Ah(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function kh(e,t){return e.get(Mh(e,t))}function Rh(e,t,n){return e.set(Mh(e,t),n),n}function Mh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Th=new WeakMap,Ih=new WeakMap,Ph=new WeakMap,Oh=new WeakMap,Dh=new WeakMap,Nh=new WeakMap,Hh=new WeakMap;const Lh=class{constructor(e,t,n){Ah(this,Th,void 0),Ah(this,Ih,void 0),Ah(this,Ph,void 0),Ah(this,Oh,[]),Ah(this,Dh,[]),Ah(this,Nh,void 0),Ah(this,Hh,[]),Rh(Th,this,e),Rh(Ih,this,t),Rh(Ph,this,n)}setRemovedHfIndexes(e){return Rh(Hh,this,e.map((e=>{const t=kh(Ih,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),kh(Hh,this)}getRemovedHfIndexes(){return kh(Hh,this)}getHfIndexFromVisualIndex(e){const t=kh(Ih,this).getIndexesSequence(),n=kh(Ih,this).getNotTrimmedIndexes();return t.indexOf(n[e],e)}syncMoves(e){const t=`move${(0,h.Ob)(kh(Th,this))}s`;kh(Ph,this).getEngine().batch((()=>{e.forEach((e=>{const n=e.from!==e.to,o=e.from+1!==e.to;n&&o&&kh(Ph,this).getEngine()[t](kh(Ph,this).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,n){!1!==n&&(Rh(Dh,this,e.map((e=>this.getHfIndexFromVisualIndex(e)))),Rh(Nh,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(kh(Ph,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const n=Sh(kh(Dh,this),kh(Nh,this),kh(Ih,this).getNumberOfIndexes());null===kh(Ph,this).getSheetId()?kh(Ph,this).getPostponeAction((()=>this.syncMoves(n))):this.syncMoves(n)}getIndexesChangeSyncMethod(){const e=`set${(0,h.Ob)(kh(Th,this))}Order`;return t=>{if(kh(Ph,this).isPerformingUndoRedo())return;const n=kh(Ih,this).getIndexesSequence();if("update"===t&&n.length>0){const t=kh(Oh,this).map((e=>n.indexOf(e))),o=kh(Ph,this).getEngine().getSheetDimensions(kh(Ph,this).getSheetId());let i;i="row"===kh(Th,this)?o.height:o.width;for(let e=t.length;e<i;e+=1)t.push(e);kh(Ph,this).getEngine()[e](kh(Ph,this).getSheetId(),t)}Rh(Oh,this,n)}}init(){Rh(Oh,this,kh(Ih,this).getIndexesSequence())}};function $h(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function _h(e,t){return e.get(Fh(e,t))}function zh(e,t,n){return e.set(Fh(e,t),n),n}function Fh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Bh=new WeakMap,jh=new WeakMap,Wh=new WeakMap,Vh=new WeakMap,Gh=new WeakMap,Kh=new WeakMap,Uh=new WeakMap;const qh=class{constructor(e,t,n){$h(this,Bh,void 0),$h(this,jh,void 0),$h(this,Wh,void 0),$h(this,Vh,!1),$h(this,Gh,!1),$h(this,Kh,null),$h(this,Uh,null),zh(Bh,this,new Lh("row",e,this)),zh(jh,this,new Lh("column",t,this)),zh(Wh,this,n)}getForAxis(e){return _h("row"===e?Bh:jh,this)}setPerformUndo(e){zh(Vh,this,e)}setPerformRedo(e){zh(Gh,this,e)}isPerformingUndoRedo(){return _h(Vh,this)||_h(Gh,this)}getSheetId(){return _h(Uh,this)}getEngine(){return _h(Kh,this)}getPostponeAction(){return _h(Wh,this)}setupSyncEndpoint(e,t){zh(Kh,this,e),zh(Uh,this,t),_h(Bh,this).init(),_h(jh,this).init()}};function Yh(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xh(e,t,n){Qh(e,t),t.set(e,n)}function Qh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jh(e,t,n){return e.set(ep(e,t),n),n}function Zh(e,t){return e.get(ep(e,t))}function ep(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const tp="formulas",np=["maxRows","maxColumns","language"];Ee.R.getSingleton().register("afterNamedExpressionAdded"),Ee.R.getSingleton().register("afterNamedExpressionRemoved"),Ee.R.getSingleton().register("afterSheetAdded"),Ee.R.getSingleton().register("afterSheetRemoved"),Ee.R.getSingleton().register("afterSheetRenamed"),Ee.R.getSingleton().register("afterFormulasValuesUpdate");const op=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var ip=new WeakMap,rp=new WeakMap,sp=new WeakMap,ap=new WeakSet;class lp extends un{constructor(){var e,t;super(...arguments),e=this,Qh(this,t=ap),t.add(this),Xh(this,ip,!1),Xh(this,rp,!1),Xh(this,sp,[["valuesUpdated",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ep(ap,e,Mp).call(e,...n)}],["namedExpressionAdded",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ep(ap,e,Tp).call(e,...n)}],["namedExpressionRemoved",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ep(ap,e,Ip).call(e,...n)}],["sheetAdded",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ep(ap,e,Pp).call(e,...n)}],["sheetRenamed",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ep(ap,e,Op).call(e,...n)}],["sheetRemoved",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ep(ap,e,Dp).call(e,...n)}]]),Yh(this,"staticRegister",(0,ai.A)("formulas")),Yh(this,"engine",null),Yh(this,"sheetId",null),Yh(this,"sheetName",null),Yh(this,"indexSyncer",null),Yh(this,"rowAxisSyncer",null),Yh(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return tp}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[tp,...np]}isEnabled(){return!!this.hot.getSettings()[tp]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=function(e){const t=e.getSettings(),n=t[tp],o=null==n?void 0:n.engine;if(!0===n)return null;if((0,d.b0)(o))return null;var i;if("function"==typeof o.hyperformula||"function"==typeof o)return function(e,t,n){const o=t[tp],i=function(e){var t;const n=e[tp],o=mh(null!=n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=ph(e);return{...hh,...o,...i}}(t),r=gh(),s=fh();(function(e,t){t&&t.forEach((t=>{const{name:n,plugin:o,translations:i}=t;try{e.registerFunction(n,o,i)}catch(e){(0,Lo.R8)(e.message)}}))})(e,o.functions),function(e,t){if(t){const{langCode:n}=t;try{e.registerLanguage(n,t)}catch(e){(0,Lo.R8)(e.message)}}}(e,o.language);const a=e.buildEmpty(i);return r.set(a,[n]),s.set(a,[n.guid]),function(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:n,expression:o,scope:i,options:r}=t;try{e.addNamedExpression(n,o,i,r)}catch(e){(0,Lo.R8)(e.message)}})),e.resumeEvaluation())}(a,o.namedExpressions),a.on("sheetAdded",(()=>{a.rebuildAndRecalculate()})),a.on("sheetRemoved",(()=>{a.rebuildAndRecalculate()})),a}(null!==(i=o.hyperformula)&&void 0!==i?i:o,t,e);if("object"==typeof o&&(0,d.b0)(o.hyperformula)){const t=gh(),n=fh().get(o);return t.has(o)||t.set(o,[]),t.get(o).push(e),n&&n.push(e.guid),o.getConfig().licenseKey||o.updateConfig({licenseKey:dh}),o.getConfig().leapYear1900===hh.leapYear1900&&!1!==(0,s.wU)(o.getConfig().nullDate,hh.nullDate)||(0,Lo.R8)(bi.O`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
  11. settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),o}return null}(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&ep(ap,this,cp).call(this,e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,hp).call(t,...n)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,mp).call(t,...n)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,hp).call(t,...n)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,mp).call(t,...n)})),this.addHook("modifyData",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,gp).call(t,...n)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,fp).call(t,...n)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,up).call(t,...n)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,vp).call(t,...n)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,bp).call(t,...n)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,bp).call(t,...n)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,wp).call(t,...n)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,yp).call(t,...n)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,Ep).call(t,...n)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,Sp).call(t,...n)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,Cp).call(t,...n)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,xp).call(t,...n)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,Ap).call(t,...n)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,kp).call(t,...n)})),this.indexSyncer=new qh(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(e=>{this.hot.addHookOnce("init",(()=>{e()}))})),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",((e,t,n,o)=>{this.rowAxisSyncer.storeMovesInformation(e,t,o)})),this.hot.addHook("beforeColumnMove",((e,t,n,o)=>{this.columnAxisSyncer.storeMovesInformation(e,t,o)})),this.hot.addHook("afterRowMove",((e,t,n,o,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(o,i)})),this.hot.addHook("afterColumnMove",((e,t,n,o,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(o,i)})),this.hot.addHook("beforeColumnFreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)})),this.hot.addHook("afterColumnFreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.hot.addHook("beforeColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)})),this.hot.addHook("afterColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,pp).call(t,...n)})),this.addHook("beforeUndo",(()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()})),this.addHook("beforeRedo",(()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformUndo(!1)})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformRedo(!1)})),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,Rp).call(t,...n)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ep(ap,t,dp).call(t,...n)})),Zh(sp,this).forEach((e=>{let[t,n]=e;return this.engine.on(t,n)})),super.enablePlugin()}else(0,Lo.R8)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){Zh(sp,this).forEach((e=>{let[t,n]=e;return this.engine.off(t,n)})),vh(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=function(e){var t;const n=e[tp];return{...mh(null!=n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),...ph(e)}}(this.hot.getSettings());(function(e,t){return Object.keys(t).some((n=>void 0!==t[n]&&t[n]!==e[n]))})(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const n=this.hot.getSettings()[tp];if((0,d.O9)(n)&&(0,d.O9)(n.sheetName)&&n.sheetName!==this.sheetName&&this.switchSheet(n.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[tp].sheetName;if(e&&this.engine.doesSheetExist(e))this.switchSheet(this.sheetName);else{const t=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray());ep(ap,this,cp).call(this,t)}}super.updatePlugin(e)}destroy(){Zh(sp,this).forEach((e=>{var t;let[n,o]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(n,o)})),Jh(sp,this,null),vh(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,d.O9)(t)&&!(0,Ku.ZI)(t))return(0,Lo.R8)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,Lo.R8)("Sheet with the provided name already exists."),!1;try{const n=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(n),t),n}catch(e){return(0,Lo.R8)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,Lo.z3)(`The sheet named \`${e}\` does not exist, switch aborted.`);ep(ap,this,cp).call(this,e);const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,h.Ob)(tp)}.switchSheet`)}getCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const o=this.hot.toPhysicalRow(e),i=this.hot.toPhysicalColumn(t);return null!==o&&null!==i?this.engine.getCellType({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Set;e.forEach((e=>{var t;const o=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==o&&(n.has(o)||n.add(o))})),bh(this.engine).forEach(((e,o)=>{var i;(t||o!==this.sheetId)&&n.has(o)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:n,col:o,sheet:i}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,d.O9)(i)?`${i}:${n}x${o}`:""},n=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var o,i;const{row:r,col:s}=null!==(o=e.address)&&void 0!==o?o:{};if(!1===(0,d.O9)(r)||!1===(0,d.O9)(s)||r>=this.hot.countRows()||s>=this.hot.countCols())return;const a=null==e||null===(i=e.address)||void 0===i?void 0:i.sheet,l=t(e);if(void 0!==a&&!n.has(l)){const e=bh(this.engine).get(a);if(!e)return;e.validateCell(e.getDataAtCell(r,s),e.getCellMeta(r,s),(()=>{}))}}))}syncChangeWithEngine(e,t,n){const o={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(o))return void(0,Lo.R8)(`Not possible to set cell data at ${JSON.stringify(o)}`);const i=this.hot.getCellMeta(e,t);var r;return yh(n,i.type)&&(Ch(n,i.dateFormat)?n=xh(n,i.dateFormat):!1===("string"==typeof(r=n)&&r.startsWith("="))&&(n=`'${n}`)),this.engine.setCellContents(o,n)}}function cp(e){this.sheetName=e,this.sheetId=this.engine.getSheetId(this.sheetName)}function up(e,t,n){const o=this.hot.propToCol(n);if(this.isFormulaCellType(t,o)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId},n=this.hot.getCellMeta(t,o);let i=this.engine.getCellValue(e);return"date"===n.type&&(0,At.kf)(i)&&(i=Eh(i,n.dateFormat)),"object"==typeof i&&null!==i?i.value:i}return e}function dp(e,t,n){const{row:o,col:i}=t.getTopStartCorner(),{row:r,col:s}=t.getBottomEndCorner(),{row:a,col:l}=n.getTopStartCorner(),{row:c,col:u}=n.getBottomEndCorner(),d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(o),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId}},h={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(c),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(u),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(h))return!1;const p=this.engine.getFillRangeData(d,h),{row:m,col:g}=d.start,{row:f,col:b}=d.end,v=f-m+1,w=b-g+1;for(let e=0;e<p.length;e+=1)for(let t=0;t<p[e].length;t+=1){const n=p[e][t],o=m+e%v,i=g+t%w,r=this.hot.getCellMeta(o,i);yh(n,r.type)&&(n.startsWith("'")?p[e][t]=n.slice(1):!1===this.isFormulaCellType(o,i,this.sheetId)&&(p[e][t]=(y=n,C=r.dateFormat,T(y,wh,!0).format(C))))}var y,C;return p}function hp(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,h.Ob)(tp))||Jh(rp,this,(0,d.b0)(this.hot.getSettings().data))}function pp(){if(Zh(rp,this))return void this.switchSheet(this.sheetName);const e=this.hot.getSourceDataArray();e.forEach(((t,n)=>{t.forEach(((t,o)=>{const i=this.hot.getCellMeta(n,o,{skipMetaExtension:!0}),r=i.dateFormat;yh(t,i.type)&&(Ch(t,r)?e[n][o]=xh(t,r):t.startsWith("=")||(e[n][o]=`'${t}`))}))})),Jh(ip,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),Jh(ip,this,!1)}function mp(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n.includes((0,h.Ob)(tp)))return;const o=function(e,t){return!(0,d.b0)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t)),t}(this.engine,this.hot.getSettings()[tp].sheetName);if(ep(ap,this,cp).call(this,o),"updateSettings"!==n)if(Zh(rp,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){Jh(ip,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),Jh(ip,this,!1)}}}function gp(e,t,n,o){if("get"!==o||Zh(ip,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e);if(null===i||null===t)return;const r=this.getCellType(i,t);if("VALUE"===r||"EMPTY"===r)return void(n.value=(s=n.value,function(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}(s)?s.substr(1):s));var s;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let l=this.engine.getCellValue(a);const c=this.hot.getCellMeta(i,t,{skipMetaExtension:!0});"date"===c.type&&(0,At.kf)(l)&&(l=Eh(l,c.dateFormat)),n.value="object"==typeof l&&null!==l?l.value:l}function fp(e,t,n,o){if("get"!==o||Zh(ip,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e),r=this.hot.propToCol(t);if(null===i||null===r)return;const s=this.getCellType(i,r);if("VALUE"===s||"EMPTY"===s)return;const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===a.width&&0===a.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};n.value=this.engine.getCellSerialized(l)}function bp(e,t){if(op(t))return;const n=[],o=[],i=this.engine.batch((()=>{e.forEach((e=>{let[t,i,,r]=e;const s=this.hot.propToCol(i),a=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(s),c={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};null!==a&&null!==l?this.syncChangeWithEngine(t,s,r):n.push([t,s,r]),o.push({address:c})}))}));n.length&&this.hot.addHookOnce("afterChange",(()=>{const e=this.engine.batch((()=>{n.forEach((e=>{let[t,n,o]=e;this.syncChangeWithEngine(t,n,o)}))}));this.renderDependentSheets(e,!0)})),this.renderDependentSheets(i),this.validateDependentCells(i,o)}function vp(e,t){if(op(t))return;const n=[],o=[];e.forEach((e=>{let[t,i,,r]=e;const s=this.hot.propToCol(i);if(!(0,At.kf)(s))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(o.push({address:a}),n.push(...this.engine.setCellContents(a,r))):(0,Lo.R8)(`Not possible to set source cell data at ${JSON.stringify(a)}`)})),this.renderDependentSheets(n),this.validateDependentCells(n,o)}function wp(e,t){let n=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(n=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[n,t]))return!1}function yp(e,t){let n=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(n=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[n,t]))return!1}function Cp(e,t,n){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(n).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}function xp(e,t,n){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(n).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}function Ep(e,t,n){if(op(n))return;const o=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(o)}function Sp(e,t,n){if(op(n))return;const o=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(o)}function Ap(e,t,n,o){if(op(o))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),r=this.engine.batch((()=>{i.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}function kp(e,t,n,o){if(op(o))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),r=this.engine.batch((()=>{i.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}function Rp(e,t,n){var o;Jh(ip,this,!0);const i=this.hot.getSourceDataArray(n,0,n+((null===(o=t.__children)||void 0===o?void 0:o.length)||0),this.hot.countSourceCols());Jh(ip,this,!1),i.forEach(((e,t)=>{e.forEach(((e,o)=>{this.engine.setCellContents({col:o,row:n+t,sheet:this.sheetId},[[e]])}))}))}function Mp(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function Tp(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function Ip(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function Pp(e){this.hot.runHooks("afterSheetAdded",e)}function Op(e,t){ep(ap,this,cp).call(this,t),this.hot.runHooks("afterSheetRenamed",e,t)}function Dp(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}var Np=n(52246);function Hp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lp(e,t){return e.get(_p(e,t))}function $p(e,t,n){return e.set(_p(e,t),n),n}function _p(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("beforeHideColumns"),Ee.R.getSingleton().register("afterHideColumns"),Ee.R.getSingleton().register("beforeUnhideColumns"),Ee.R.getSingleton().register("afterUnhideColumns");const zp="hiddenColumns";var Fp=new WeakMap,Bp=new WeakSet;class jp extends un{constructor(){var e;super(...arguments),Hp(this,e=Bp),e.add(this),function(e,t){Hp(e,t),t.set(e,null)}(this,Fp)}static get PLUGIN_KEY(){return zp}static get PLUGIN_PRIORITY(){return 310}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,columns:[]}}isEnabled(){return!!this.hot.getSettings()[zp]}enablePlugin(){var e=this;this.enabled||($p(Fp,this,new Np.o),Lp(Fp,this).addLocalHook("init",(()=>_p(Bp,this,qp).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,Lp(Fp,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return _p(Bp,e,Up).call(e,...n)})),this.addHook("afterGetCellMeta",((e,t,n)=>_p(Bp,this,Vp).call(this,e,t,n))),this.addHook("modifyColWidth",((e,t)=>_p(Bp,this,Wp).call(this,e,t)),2),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return _p(Bp,e,Kp).call(e,...n)})),this.addHook("modifyCopyableRange",(e=>_p(Bp,this,Gp).call(this,e))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let o=t;const i=Lp(Fp,this).getValues().slice(),r=e.length>0;if(n&&r){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,u.z0)(t,(e=>{i[e]=!1})),o=(0,u.mu)(i,((e,t,n)=>(t&&e.push(this.hot.toVisualColumn(n)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,o,n&&r)&&(n&&r&&Lp(Fp,this).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,o,n&&r,n&&o.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let o=t;n&&(o=Array.from(new Set(t.concat(e)))),!1!==this.hot.runHooks("beforeHideColumns",t,o,n)&&(n&&this.hot.batchExecution((()=>{(0,u.z0)(e,(e=>{Lp(Fp,this).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)}))}),!0),this.hot.runHooks("afterHideColumns",t,o,n,n&&o.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideColumns(t)}getHiddenColumns(){return(0,u.YD)(Lp(Fp,this).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return Lp(Fp,this).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,u.z0)(this.hot.getCellsMeta(),(e=>{e.skipColumnOnPaste=!1}))}destroy(){$p(Fp,this,null),super.destroy()}}function Wp(e,t){return this.isHidden(t)?0:this.getSetting("indicators")&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}function Vp(e,t,n){if(!1===this.getSetting("copyPasteEnabled")&&this.isHidden(t)&&(n.skipColumnOnPaste=!0),this.isHidden(t-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenColumn")&&(n.className+=" afterHiddenColumn");else if(n.className){const e=n.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),n.className=e.join(" ")}}}function Gp(e){if(this.getSetting("copyPasteEnabled"))return e;const t=[],n=(e,n,o,i)=>{t.push({startRow:e,endRow:n,startCol:o,endCol:i})};return(0,u.z0)(e,(e=>{let t=!0,o=0;(0,At.Ti)(e.startCol,e.endCol,(i=>{this.isHidden(i)?(t||n(e.startRow,e.endRow,o,i-1),t=!0):(t&&(o=i),i===e.endCol&&n(e.startRow,e.endRow,o,i),t=!1)}))})),t}function Kp(e,t){if(!this.getSetting("indicators")||e<0)return;const n=[];e>=1&&this.isHidden(e-1)&&n.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&n.push("beforeHiddenColumn"),(0,i.iQ)(t,n)}function Up(e){var t;e.items.push({name:Rr},(t=this,{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,n,,o]=e;n-o!==0&&(t=1)}return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:e,to:n}=this.getSelectedRangeLast(),o=Math.max(Math.min(e.col,n.col),0),i=Math.max(e.col,n.col),r=[];for(let e=o;e<=i;e+=1)r.push(e);t.hideColumns(r);const s=r[r.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(s,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}),function(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var n,o;if(0===t.length)return;let i=t[0],r=t[t.length-1];i=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,r=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==o?o:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(),r-i+1===this.countCols()||this.selectColumns(i,r)},disabled:!1,hidden(){const n=(0,u.YD)(e.getHiddenColumns(),(e=>this.toPhysicalColumn(e)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;t.length=0;const o=this.getSelectedRangeLast(),i=o.getTopStartCorner().col,r=o.getBottomEndCorner().col,s=this.columnIndexMapper,a=s.getRenderableFromVisualIndex(i),l=s.getRenderableFromVisualIndex(r),c=s.getNotTrimmedIndexes(),d=[];if(i!==r){if(r-i+1>l-a+1){const e=c.slice(i,r+1);d.push(...e.filter((e=>n.includes(e))))}}else if(0===a&&a<i)d.push(...c.slice(0,i));else if(null===a)d.push(...c.slice(0,this.countCols()));else{const e=this.countCols()-1;l===s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,-1))&&e>r&&d.push(...c.slice(r+1))}return(0,u.z0)(d,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}}(this))}function qp(){const e=this.getSetting("columns");Array.isArray(e)&&this.hideColumns(e)}function Yp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xp(e,t){return e.get(Jp(e,t))}function Qp(e,t,n){return e.set(Jp(e,t),n),n}function Jp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("beforeHideRows"),Ee.R.getSingleton().register("afterHideRows"),Ee.R.getSingleton().register("beforeUnhideRows"),Ee.R.getSingleton().register("afterUnhideRows");const Zp="hiddenRows";var em=new WeakMap,tm=new WeakSet;class nm extends un{constructor(){var e;super(...arguments),Yp(this,e=tm),e.add(this),function(e,t){Yp(e,t),t.set(e,null)}(this,em)}static get PLUGIN_KEY(){return Zp}static get PLUGIN_PRIORITY(){return 320}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,rows:[]}}isEnabled(){return!!this.hot.getSettings()[Zp]}enablePlugin(){var e=this;this.enabled||(Qp(em,this,new Np.o),Xp(em,this).addLocalHook("init",(()=>Jp(tm,this,lm).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,Xp(em,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Jp(tm,e,am).call(e,...n)})),this.addHook("afterGetCellMeta",((e,t,n)=>Jp(tm,this,im).call(this,e,t,n))),this.addHook("modifyRowHeight",((e,t)=>Jp(tm,this,om).call(this,e,t))),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Jp(tm,e,sm).call(e,...n)})),this.addHook("modifyCopyableRange",(e=>Jp(tm,this,rm).call(this,e))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let o=t;const i=Xp(em,this).getValues().slice(),r=e.length>0;if(n&&r){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,u.z0)(t,(e=>{i[e]=!1})),o=(0,u.mu)(i,((e,t,n)=>(t&&e.push(this.hot.toVisualRow(n)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,o,n&&r)&&(n&&r&&Xp(em,this).setValues(i),this.hot.runHooks("afterUnhideRows",t,o,n&&r,n&&o.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let o=t;n&&(o=Array.from(new Set(t.concat(e)))),!1!==this.hot.runHooks("beforeHideRows",t,o,n)&&(n&&this.hot.batchExecution((()=>{(0,u.z0)(e,(e=>{Xp(em,this).setValueAtIndex(this.hot.toPhysicalRow(e),!0)}))}),!0),this.hot.runHooks("afterHideRows",t,o,n,n&&o.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideRows(t)}getHiddenRows(){return(0,u.YD)(Xp(em,this).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return Xp(em,this).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,u.z0)(this.hot.getCellsMeta(),(e=>{e.skipRowOnPaste=!1}))}destroy(){Qp(em,this,null),super.destroy()}}function om(e,t){return this.isHidden(t)?0:e}function im(e,t,n){if(!1===this.getSetting("copyPasteEnabled")&&this.isHidden(e)&&(n.skipRowOnPaste=!0),this.isHidden(e-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenRow")&&(n.className+=" afterHiddenRow");else if(n.className){const e=n.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),n.className=e.join(" ")}}}function rm(e){if(this.getSetting("copyPasteEnabled"))return e;const t=[],n=(e,n,o,i)=>{t.push({startRow:e,endRow:n,startCol:o,endCol:i})};return(0,u.z0)(e,(e=>{let t=!0,o=0;(0,At.Ti)(e.startRow,e.endRow,(i=>{this.isHidden(i)?(t||n(o,i-1,e.startCol,e.endCol),t=!0):(t&&(o=i),i===e.endRow&&n(o,i,e.startCol,e.endCol),t=!1)}))})),t}function sm(e,t){if(!this.getSetting("indicators")||e<0)return;const n=[];e>=1&&this.isHidden(e-1)&&n.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&n.push("beforeHiddenRow"),(0,i.iQ)(t,n)}function am(e){var t;e.items.push({name:Rr},(t=this,{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[n,,o]=e;n-o!==0&&(t=1)}return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:e,to:n}=this.getSelectedRangeLast(),o=Math.max(Math.min(e.row,n.row),0),i=Math.max(e.row,n.row),r=[];for(let e=o;e<=i;e+=1)r.push(e);t.hideRows(r);const s=r[r.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(s,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}),function(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var n,o;if(0===t.length)return;let i=t[0],r=t[t.length-1];i=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,r=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==o?o:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(),r-i+1===this.countRows()||this.selectRows(i,r)},disabled:!1,hidden(){const n=(0,u.YD)(e.getHiddenRows(),(e=>this.toPhysicalRow(e)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;t.length=0;const o=this.getSelectedRangeLast(),i=o.getTopStartCorner().row,r=o.getBottomEndCorner().row,s=this.rowIndexMapper,a=s.getRenderableFromVisualIndex(i),l=s.getRenderableFromVisualIndex(r),c=s.getNotTrimmedIndexes(),d=[];if(i!==r){if(r-i+1>l-a+1){const e=c.slice(i,r+1);d.push(...e.filter((e=>n.includes(e))))}}else if(0===a&&a<i)d.push(...c.slice(0,i));else if(null===a)d.push(...c.slice(0,this.countRows()));else{const e=this.countRows()-1;l===s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,-1))&&e>r&&d.push(...c.slice(r+1))}return(0,u.z0)(d,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}}(this))}function lm(){const e=this.getSetting("rows");Array.isArray(e)&&this.hideRows(e)}function cm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function um(e,t){return e.get(hm(e,t))}function dm(e,t,n){return e.set(hm(e,t),n),n}function hm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("beforeColumnFreeze"),Ee.R.getSingleton().register("afterColumnFreeze"),Ee.R.getSingleton().register("beforeColumnUnfreeze"),Ee.R.getSingleton().register("afterColumnUnfreeze");const pm="manualColumnFreeze";var mm=new WeakMap,gm=new WeakSet;class fm extends un{constructor(){var e;super(...arguments),cm(this,e=gm),e.add(this),function(e,t){cm(e,t),t.set(e,!1)}(this,mm)}static get PLUGIN_KEY(){return pm}static get PLUGIN_PRIORITY(){return 110}isEnabled(){return!!this.hot.getSettings()[pm]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>hm(gm,this,bm).call(this,e))),this.addHook("beforeColumnMove",((e,t)=>hm(gm,this,vm).call(this,e,t))),super.enablePlugin())}disablePlugin(){dm(mm,this,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),n=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;um(mm,this)||dm(mm,this,!0),!1!==this.hot.runHooks("beforeColumnFreeze",e,n)&&(n&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,n))}unfreezeColumn(e){const t=this.hot.getSettings(),n=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;um(mm,this)||dm(mm,this,!0),!1!==this.hot.runHooks("beforeColumnUnfreeze",e,n)&&(n&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,n))}}function bm(e){var t;e.items.push({name:"---------"},(t=this,{key:"freeze_column",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(e,n){const[{start:{col:o}}]=n;t.freezeColumn(o),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}),function(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(t,n){const[{start:{col:o}}]=n;e.unfreezeColumn(o),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}}(this))}function vm(e,t){if(um(mm,this)){const n=this.hot.getSettings().fixedColumnsStart;if(t<n)return!1;if(e.some((e=>e<n)))return!1}}function wm(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ym="px",Cm=class{constructor(e){wm(this,"hot",void 0),wm(this,"_element",null),wm(this,"state",0),wm(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,At.kf)(e)&&(this._element.style.top=e+ym),(0,At.kf)(t)&&(this._element.style[this.inlineProperty]=t+ym)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){(0,At.kf)(e)&&(this._element.style.width=e+ym),(0,At.kf)(t)&&(this._element.style.height=t+ym)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){(0,At.kf)(e)&&(this._element.style.marginTop=e+ym),(0,At.kf)(t)&&(this._element.style[`margin${(0,h.Ob)(this.inlineProperty)}`]=t+ym)}getOffset(){const e=this._element.style,t=`margin${(0,h.Ob)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}},xm=class extends Cm{build(){super.build(),(0,i.iQ)(this._element,"ht__manualColumnMove--backlight")}},Em=class extends Cm{build(){super.build(),(0,i.iQ)(this._element,"ht__manualColumnMove--guideline")}};function Sm(e,t,n){Am(e,t),t.set(e,n)}function Am(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function km(e,t,n){return e.set(Mm(e,t),n),n}function Rm(e,t){return e.get(Mm(e,t))}function Mm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("beforeColumnMove"),Ee.R.getSingleton().register("afterColumnMove");const Tm="manualColumnMove",Im="ht__manualColumnMove",Pm="show-ui",Om="on-moving--columns",Dm="after-selection--columns";var Nm=new WeakMap,Hm=new WeakMap,Lm=new WeakMap,$m=new WeakMap,_m=new WeakMap,zm=new WeakMap,Fm=new WeakMap,Bm=new WeakMap,jm=new WeakMap,Wm=new WeakMap,Vm=new WeakMap,Gm=new WeakSet;class Km extends un{constructor(){var e;super(...arguments),Am(this,e=Gm),e.add(this),Sm(this,Nm,new xm(this.hot)),Sm(this,Hm,new Em(this.hot)),Sm(this,Lm,[]),Sm(this,$m,0),Sm(this,_m,!1),Sm(this,zm,{}),Sm(this,Fm,void 0),Sm(this,Bm,void 0),Sm(this,jm,void 0),Sm(this,Wm,void 0),Sm(this,Vm,void 0)}static get PLUGIN_KEY(){return Tm}static get PLUGIN_PRIORITY(){return 120}isEnabled(){return!!this.hot.getSettings()[Tm]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Mm(Gm,e,Um).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Mm(Gm,e,Ym).call(e,...n)})),this.addHook("afterScrollVertically",(()=>Mm(Gm,this,Qm).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Mm(Gm,e,Jm).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),(0,i.iQ)(this.hot.rootElement,Im),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,i.vy)(this.hot.rootElement,Im),this.unregisterEvents(),Rm(Nm,this).destroy(),Rm(Hm,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const n=Rm(Fm,this),o=this.isMovePossible(e,t),i=this.hot.runHooks("beforeColumnMove",e,t,n,o);if(km(Fm,this,void 0),!1===i)return;o&&this.hot.columnIndexMapper.moveIndexes(e,t);const r=o&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,n,o,r),r}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const n=this.countFinalIndex(e,t);return km(Fm,this,t),this.moveColumns(e,n)}isMovePossible(e,t){const n=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),o=e.length+t>n,i=t<0,r=e.some((e=>e<0)),s=e.some((e=>e>=n));return!(o||i||r||s)}isColumnOrderChanged(e,t){return e.some(((e,n)=>e-n!==t))}countFinalIndex(e,t){const n=(0,u.mu)(e,((e,n)=>(n<t&&(e+=1),e)),0);return t-n}getColumnsWidth(e,t){const n=this.hot.columnIndexMapper;let o=0;for(let i=e;i<=t;i+=1){const e=n.getRenderableFromVisualIndex(i);i<0?o+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(o+=this.hot.view._wt.wtTable.getColumnWidth(e)||0)}return o}moveBySettingsOrLoad(){const e=this.hot.getSettings()[Tm];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const n=[];return(0,At.Ti)(e,t,(e=>{n.push(e)})),n}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(Rm(Bm,this))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,n=this.hot.view._wt.wtOverlays.scrollableElement,o="number"==typeof n.scrollX?n.scrollX:n.scrollLeft;let r=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,Rm(Bm,this)-1);const s=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=Rm(Nm,this).getOffset().start,c=Rm(Nm,this).getSize().width;let u=0,d=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=(0,i.Gq)(this.hot.rootElement),r=e.innerWidth-Rm(jm,this)-t;d=e.innerWidth-Rm(zm,this).eventPageX-r-(void 0===n.scrollX?o:0)}else d=Rm(zm,this).eventPageX-(Rm(jm,this)-(void 0===n.scrollX?o:0));if(Rm(Wm,this)&&(u=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(Rm(Bm,this))&&(r+=o),r+=u,Rm(Bm,this)<0)Rm(Vm,this)>0?Rm(zm,this).col=0:Rm(zm,this).col=e>0?e-1:e;else if(Rm(zm,this).TD.offsetWidth/2+r<=d){const e=Rm(Bm,this)>=Rm($m,this)?Rm($m,this)-1:Rm(Bm,this);Rm(zm,this).col=e+1,r+=Rm(zm,this).TD.offsetWidth}else Rm(zm,this).col=Rm(Bm,this);let h=d,p=r;d+c+l>=s?h=s-c-l:d+l<a+u&&(h=a+u+Math.abs(l)),r>=s-1?p=s-1:0===p?p=1:void 0!==n.scrollX&&Rm(Bm,this)<Rm(Vm,this)&&(p-=Rm(jm,this)<=n.scrollX?Rm(jm,this):0),Rm(Nm,this).setPosition(null,h),Rm(Hm,this).setPosition(null,p)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>Mm(Gm,this,qm).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>Mm(Gm,this,Xm).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Rm(Nm,this).build(),Rm(Hm,this).build()}destroy(){Rm(Nm,this).destroy(),Rm(Hm,this).destroy(),super.destroy()}}function Um(e,t,n,o){const s=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),c=(0,i.nB)(e.target,"sortAction");if(!l||!a||Rm(_m,this)||0!==e.button||c)return km(_m,this,!1),Rm(Lm,this).length=0,void(0,i.vy)(this.hot.rootElement,[Om,Pm]);const u=Rm(Hm,this).isBuilt()&&!Rm(Hm,this).isAppended(),d=Rm(Nm,this).isBuilt()&&!Rm(Nm,this).isAppended();u&&d&&(Rm(Hm,this).appendTo(s.hider),Rm(Nm,this).appendTo(s.hider));const{from:h,to:p}=l,m=Math.min(h.col,p.col),g=Math.max(h.col,p.col);if(t.row<0&&t.col>=m&&t.col<=g){o.column=!0,km(_m,this,!0);const a=n.firstChild?(0,r.zg)(e,n.firstChild).x:e.offsetX;Rm(zm,this).eventPageX=e.pageX,km(Bm,this,t.col),Rm(zm,this).TD=n,Rm(zm,this).col=t.col,km(Lm,this,this.prepareColumnsToMoving(m,g)),km(Wm,this,!!this.hot.getSettings().rowHeaders),km($m,this,this.hot.countCols()),km(Vm,this,this.hot.getSettings().fixedColumnsStart),km(jm,this,(0,i.cY)(this.hot.rootElement).left);const l=Rm(Wm,this)?-1:0,c=s.holder.scrollTop+s.getColumnHeaderHeight(0)+1,u=t.col<Rm(Vm,this),d=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),h=Math.abs(a-(this.hot.isRtl()?n.offsetWidth:0)),p=this.getColumnsWidth(m,t.col-1)+h,f=this.getColumnsWidth(l,m-1)+(u?d:0)+p;Rm(Nm,this).setPosition(c,f),Rm(Nm,this).setSize(this.getColumnsWidth(m,g),s.hider.offsetHeight-c),Rm(Nm,this).setOffset(null,-p),(0,i.iQ)(this.hot.rootElement,Om)}else(0,i.vy)(this.hot.rootElement,Dm),km(_m,this,!1),Rm(Lm,this).length=0}function qm(e){Rm(_m,this)&&(Rm(zm,this).eventPageX=e.pageX,this.refreshPositions())}function Ym(e,t,n,o){this.hot.getSelectedRangeLast()&&Rm(_m,this)&&(Rm(Lm,this).indexOf(t.col)>-1?(0,i.vy)(this.hot.rootElement,Pm):(0,i.iQ)(this.hot.rootElement,Pm),o.row=!0,o.column=!0,o.cell=!0,km(Bm,this,t.col),Rm(zm,this).TD=n)}function Xm(){const e=Rm(zm,this).col,t=Rm(Lm,this).length;if(km(Bm,this,void 0),km(_m,this,!1),(0,i.vy)(this.hot.rootElement,[Om,Pm,Dm]),this.hot.selection.isSelectedByColumnHeader()&&(0,i.iQ)(this.hot.rootElement,Dm),t<1||void 0===e)return;const n=Rm(Lm,this)[0],o=this.hot.toPhysicalColumn(n),r=this.dragColumns(Rm(Lm,this),e);if(Rm(Lm,this).length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualColumn(o),n=e+t-1;this.hot.selectColumns(e,n)}}function Qm(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;Rm(Nm,this).setPosition(t),Rm(Nm,this).setSize(null,e.hider.offsetHeight-t)}function Jm(){this.moveBySettingsOrLoad()}function Zm(e,t,n){eg(e,t),t.set(e,n)}function eg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tg(e,t,n){return e.set(og(e,t),n),n}function ng(e,t){return e.get(og(e,t))}function og(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ig="manualColumnResize",rg="manualColumnWidths";var sg=new WeakMap,ag=new WeakMap,lg=new WeakMap,cg=new WeakMap,ug=new WeakMap,dg=new WeakMap,hg=new WeakMap,pg=new WeakMap,mg=new WeakMap,gg=new WeakMap,fg=new WeakMap,bg=new WeakMap,vg=new WeakMap,wg=new WeakMap,yg=new WeakMap,Cg=new WeakMap,xg=new WeakSet;class Eg extends un{static get PLUGIN_KEY(){return ig}static get PLUGIN_PRIORITY(){return 130}constructor(e){var t;super(e),eg(this,t=xg),t.add(this),Zm(this,sg,null),Zm(this,ag,null),Zm(this,lg,[]),Zm(this,cg,null),Zm(this,ug,null),Zm(this,dg,null),Zm(this,hg,null),Zm(this,pg,null),Zm(this,mg,this.hot.rootDocument.createElement("DIV")),Zm(this,gg,this.hot.rootDocument.createElement("DIV")),Zm(this,fg,null),Zm(this,bg,!1),Zm(this,vg,0),Zm(this,wg,null),Zm(this,yg,void 0),Zm(this,Cg,void 0),(0,i.iQ)(ng(mg,this),"manualColumnResizer"),(0,i.iQ)(ng(gg,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[ig]}enablePlugin(){var e=this;this.enabled||(tg(yg,this,new wn._),ng(yg,this).addLocalHook("init",(()=>og(xg,this,Sg).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,ng(yg,this)),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return og(xg,e,Ig).call(e,...n)}),1),this.addHook("beforeStretchingColumnWidth",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return og(xg,e,Pg).call(e,...n)}),1),this.addHook("beforeColumnResize",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return og(xg,e,Og).call(e,...n)})),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){tg(Cg,this,ng(yg,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",rg,ng(yg,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",rg,e),e.value}setManualSize(e,t){const n=Math.max(t,20),o=this.hot.toPhysicalColumn(e);return ng(yg,this).setValueAtIndex(o,n),n}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);ng(yg,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;tg(sg,this,e);const{_wt:t}=this.hot.view,n=t.wtTable.getCoords(ng(sg,this)),o=n.col;if(o<0)return;const r=(0,i.DK)(ng(sg,this)),s=ng(sg,this).getBoundingClientRect();let a;o<t.getSetting("fixedColumnsStart")&&(a=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(ng(sg,this),n.row,n.col)),a||(a=t.wtOverlays.topOverlay.getRelativeCellPosition(ng(sg,this),n.row,n.col)),tg(ag,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(o)),tg(lg,this,[]);const l=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&l){const e=this.hot.getSelectedRange();(0,u.z0)(e,(e=>{const t=e.getTopStartCorner().col,n=e.getBottomEndCorner().col;(0,At.Ti)(t,n,(e=>{ng(lg,this).includes(e)||ng(lg,this).push(e)}))}))}ng(lg,this).includes(ng(ag,this))||tg(lg,this,[ng(ag,this)]),tg(pg,this,a.start-6),tg(hg,this,parseInt(s.width,10)),ng(mg,this).style.top=`${a.top}px`,ng(mg,this).style[this.inlineDir]=`${ng(pg,this)+ng(hg,this)}px`,ng(mg,this).style.height=`${r}px`,this.hot.rootElement.appendChild(ng(mg,this))}refreshHandlePosition(){ng(mg,this).style[this.inlineDir]=`${ng(pg,this)+ng(cg,this)}px`}setupGuidePosition(){const e=parseInt((0,i.DK)(ng(mg,this)),10),t=parseInt(ng(mg,this).style.top,10)+e,n=this.hot.view.getTableHeight();(0,i.iQ)(ng(mg,this),"active"),(0,i.iQ)(ng(gg,this),"active"),ng(gg,this).style.top=`${t}px`,this.refreshGuidePosition(),ng(gg,this).style.height=n-e+"px",this.hot.rootElement.appendChild(ng(gg,this))}refreshGuidePosition(){ng(gg,this).style[this.inlineDir]=ng(mg,this).style[this.inlineDir]}hideHandleAndGuide(){(0,i.vy)(ng(mg,this),"active"),(0,i.vy)(ng(gg,this),"active")}checkIfColumnHeader(e){const t=(0,i.kp)(e,["THEAD"],this.hot.rootElement),{topOverlay:n,topInlineStartCornerOverlay:o}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.THEAD,o.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const o=this.hot.runHooks("beforeColumnResize",ng(ug,this),t,!0);void 0!==o&&tg(ug,this,o),this.setManualSize(t,ng(ug,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",ng(ug,this),t,!0),n&&e()};ng(vg,this)>=2&&(ng(lg,this).length>1?((0,u.z0)(ng(lg,this),(e=>{t(e)})),e()):(0,u.z0)(ng(lg,this),(e=>{t(e,!0)}))),tg(vg,this,0),tg(wg,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>og(xg,this,Ag).call(this,e))),this.eventManager.addEventListener(t,"mousedown",(e=>og(xg,this,kg).call(this,e))),this.eventManager.addEventListener(e,"mousemove",(e=>og(xg,this,Rg).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>og(xg,this,Mg).call(this))),this.eventManager.addEventListener(ng(mg,this),"contextmenu",(()=>og(xg,this,Tg).call(this)))}destroy(){super.destroy()}}function Sg(){const e=this.hot.getSettings()[ig],t=this.loadManualColumnWidths();void 0!==t?this.hot.batchExecution((()=>{t.forEach(((e,t)=>{ng(yg,this).setValueAtIndex(t,e)}))}),!0):Array.isArray(e)?(this.hot.batchExecution((()=>{e.forEach(((e,t)=>{ng(yg,this).setValueAtIndex(t,e)}))}),!0),tg(Cg,this,e)):!0===e&&Array.isArray(ng(Cg,this))&&this.hot.batchExecution((()=>{ng(Cg,this).forEach(((e,t)=>{ng(yg,this).setValueAtIndex(t,e)}))}),!0)}function Ag(e){if(!(0,i.$w)(e.target)&&!0!==ng(bg,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const n=t.getAttribute("colspan");!t||null!==n&&"1"!==n||ng(fg,this)||this.setupHandlePosition(t)}}function kg(e){e.target.parentNode===this.hot.rootElement&&(0,i.nB)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(ng(sg,this)),this.setupGuidePosition(),tg(fg,this,!0),null===ng(wg,this)&&(tg(wg,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(ng(wg,this))),tg(vg,this,ng(vg,this)+1),this.startX=e.pageX,tg(ug,this,ng(hg,this)))}function Rg(e){if(ng(fg,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();tg(cg,this,ng(hg,this)+t),(0,u.z0)(ng(lg,this),(e=>{tg(ug,this,this.setManualSize(e,ng(cg,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function Mg(){const e=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeColumnResize",ng(ug,this),t,!1),n&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",ng(ug,this),t,!1)};ng(fg,this)&&(this.hideHandleAndGuide(),tg(fg,this,!1),ng(ug,this)!==ng(hg,this)&&(ng(lg,this).length>1?((0,u.z0)(ng(lg,this),(e=>{t(e)})),e()):(0,u.z0)(ng(lg,this),(e=>{t(e,!0)}))),this.setupHandlePosition(ng(sg,this)))}function Tg(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(ng(mg,this)),this.hot.rootElement.removeChild(ng(gg,this)),tg(fg,this,!1),tg(bg,this,!0),this.hot._registerImmediate((()=>{tg(bg,this,!1)}))}function Ig(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),o=ng(yg,this).getValueAtIndex(e);this.hot.getSettings()[ig]&&o&&(n=o)}return n}function Pg(e,t){const n=ng(yg,this).getValueAtIndex(this.hot.toPhysicalColumn(t));return"number"==typeof n?n:e}function Og(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function Dg(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ng="px",Hg=class{constructor(e){Dg(this,"hot",void 0),Dg(this,"_element",null),Dg(this,"state",0),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+Ng),void 0!==t&&(this._element.style.left=t+Ng)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+Ng),t&&(this._element.style.height=t+Ng)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+Ng),t&&(this._element.style.marginLeft=t+Ng)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}},Lg=class extends Hg{build(){super.build(),(0,i.iQ)(this._element,"ht__manualRowMove--backlight")}},$g=class extends Hg{build(){super.build(),(0,i.iQ)(this._element,"ht__manualRowMove--guideline")}};function _g(e,t,n){zg(e,t),t.set(e,n)}function zg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fg(e,t,n){return e.set(jg(e,t),n),n}function Bg(e,t){return e.get(jg(e,t))}function jg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("beforeRowMove"),Ee.R.getSingleton().register("afterRowMove");const Wg="manualRowMove",Vg="ht__manualRowMove",Gg="show-ui",Kg="on-moving--rows",Ug="after-selection--rows";var qg=new WeakMap,Yg=new WeakMap,Xg=new WeakMap,Qg=new WeakMap,Jg=new WeakMap,Zg=new WeakMap,ef=new WeakSet;class tf extends un{constructor(){var e;super(...arguments),zg(this,e=ef),e.add(this),_g(this,qg,new Lg(this.hot)),_g(this,Yg,new $g(this.hot)),_g(this,Xg,[]),_g(this,Qg,void 0),_g(this,Jg,{}),_g(this,Zg,void 0)}static get PLUGIN_KEY(){return Wg}static get PLUGIN_PRIORITY(){return 140}isEnabled(){return!!this.hot.getSettings()[Wg]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return jg(ef,e,nf).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return jg(ef,e,rf).call(e,...n)})),this.addHook("afterScrollHorizontally",(()=>jg(ef,this,af).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return jg(ef,e,lf).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),(0,i.iQ)(this.hot.rootElement,Vg),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,i.vy)(this.hot.rootElement,Vg),this.unregisterEvents(),Bg(qg,this).destroy(),Bg(Yg,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const n=Bg(Zg,this),o=this.isMovePossible(e,t),i=this.hot.runHooks("beforeRowMove",e,t,n,o);if(Fg(Zg,this,void 0),!1===i)return;o&&this.hot.rowIndexMapper.moveIndexes(e,t);const r=o&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,n,o,r),r}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const n=this.countFinalIndex(e,t);return Fg(Zg,this,t),this.moveRows(e,n)}isMovePossible(e,t){const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),o=e.length+t>n,i=t<0,r=e.some((e=>e<0)),s=e.some((e=>e>=n));return!(o||i||r||s)}isRowOrderChanged(e,t){return e.some(((e,n)=>e-n!==t))}countFinalIndex(e,t){const n=(0,u.mu)(e,((e,n)=>(n<t&&(e+=1),e)),0);return t-n}getRowsHeight(e,t){const n=this.hot.rowIndexMapper;let o=0;for(let i=e;i<=t;i++){const e=n.getRenderableFromVisualIndex(i);null!==e&&(o+=this.hot.view._wt.wtTable.getRowHeight(e)||this.hot.view.getDefaultRowHeight())}return o}moveBySettingsOrLoad(){const e=this.hot.getSettings()[Wg];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:n,to:o}=e,i=Math.min(n.row,o.row),r=Math.max(n.row,o.row);return(0,At.Ti)(i,r,(e=>{t.push(e)})),t}refreshPositions(){const e=Bg(Jg,this).coords,t=this.hot.getFirstFullyVisibleRow(),n=this.hot.getLastFullyVisibleRow(),o=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&n<o&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(n+1,1),void 0,!0);const r=this.hot.view._wt.wtTable,s=Bg(Jg,this).TD,a=this.hot.rootElement,l=(0,i.cY)(a),c=(0,i.fX)(a),u=r.holder.scrollTop,d=this.hot.rootWindow!==c?c.scrollTop:0,h=l.top-d,p=Bg(Jg,this).eventPageY-h+u,m=r.hider.offsetHeight,g=r.TBODY.offsetTop,f=Bg(qg,this).getOffset().top,b=Bg(qg,this).getSize().height,v=s.offsetHeight/2,w=s.offsetHeight;let y=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const C=p>=y+v;this.isFixedRowTop(e.row)&&(y+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?Bg(Jg,this).row=t>0?t-1:t:C?(Bg(Jg,this).row=e.row+1,y+=0===e.row?w-1:w):Bg(Jg,this).row=e.row;let x=p,E=y;p+b+f>=m?x=m-b-f:p+f<g&&(x=g+Math.abs(f)),y>=m-1&&(E=m-1),Bg(qg,this).setPosition(x),Bg(Yg,this).setPosition(E)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>jg(ef,this,of).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>jg(ef,this,sf).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Bg(qg,this).build(),Bg(Yg,this).build()}destroy(){Bg(qg,this).destroy(),Bg(Yg,this).destroy(),super.destroy()}}function nf(e,t,n,o){const{wtTable:r,wtViewport:s}=this.hot.view._wt,a=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeLast();if(!l||!a||Bg(Qg,this)||0!==e.button)return Fg(Qg,this,!1),Bg(Xg,this).length=0,void(0,i.vy)(this.hot.rootElement,[Kg,Gg]);const c=Bg(Yg,this).isBuilt()&&!Bg(Yg,this).isAppended(),u=Bg(qg,this).isBuilt()&&!Bg(qg,this).isAppended();c&&u&&(Bg(Yg,this).appendTo(r.hider),Bg(qg,this).appendTo(r.hider));const{from:d,to:h}=l,p=Math.min(d.row,h.row),m=Math.max(d.row,h.row);if(t.col<0&&t.row>=p&&t.row<=m){o.row=!0,Fg(Qg,this,!0),Bg(Jg,this).eventPageY=e.pageY,Bg(Jg,this).coords=t,Bg(Jg,this).TD=n,Fg(Xg,this,this.prepareRowsToMoving());const a=r.holder.scrollLeft+s.getRowHeaderWidth(),l=this.getRowsHeight(p,t.row-1)+(e.clientY-n.getBoundingClientRect().top);Bg(qg,this).setPosition(null,a),Bg(qg,this).setSize(r.hider.offsetWidth-a,this.getRowsHeight(p,m)),Bg(qg,this).setOffset(-l,null),(0,i.iQ)(this.hot.rootElement,Kg),this.refreshPositions()}else(0,i.vy)(this.hot.rootElement,Ug),Fg(Qg,this,!1),Bg(Xg,this).length=0}function of(e){Bg(Qg,this)&&(Bg(Jg,this).eventPageY=e.pageY,this.refreshPositions())}function rf(e,t,n,o){this.hot.getSelectedRangeLast()&&Bg(Qg,this)&&(Bg(Xg,this).indexOf(t.row)>-1?(0,i.vy)(this.hot.rootElement,Gg):(0,i.iQ)(this.hot.rootElement,Gg),o.row=!0,o.column=!0,o.cell=!0,Bg(Jg,this).coords=t,Bg(Jg,this).TD=n)}function sf(){const e=Bg(Jg,this).row,t=Bg(Xg,this).length;if(Fg(Qg,this,!1),(0,i.vy)(this.hot.rootElement,[Kg,Gg,Ug]),this.hot.selection.isSelectedByRowHeader()&&(0,i.iQ)(this.hot.rootElement,Ug),t<1||void 0===e)return;const n=Bg(Xg,this)[0],o=this.hot.toPhysicalRow(n),r=this.dragRows(Bg(Xg,this),e);if(Bg(Xg,this).length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualRow(o),n=e+t-1;this.hot.selectRows(e,n)}}function af(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;Bg(qg,this).setPosition(null,t),Bg(qg,this).setSize(e.hider.offsetWidth-t)}function lf(){this.moveBySettingsOrLoad()}function cf(e,t,n){uf(e,t),t.set(e,n)}function uf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function df(e,t,n){return e.set(pf(e,t),n),n}function hf(e,t){return e.get(pf(e,t))}function pf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const mf="manualRowResize",gf="manualRowHeights";var ff=new WeakMap,bf=new WeakMap,vf=new WeakMap,wf=new WeakMap,yf=new WeakMap,Cf=new WeakMap,xf=new WeakMap,Ef=new WeakMap,Sf=new WeakMap,Af=new WeakMap,kf=new WeakMap,Rf=new WeakMap,Mf=new WeakMap,Tf=new WeakMap,If=new WeakMap,Pf=new WeakMap,Of=new WeakSet;class Df extends un{static get PLUGIN_KEY(){return mf}static get PLUGIN_PRIORITY(){return 30}constructor(e){var t;super(e),uf(this,t=Of),t.add(this),cf(this,ff,null),cf(this,bf,null),cf(this,vf,[]),cf(this,wf,null),cf(this,yf,null),cf(this,Cf,null),cf(this,xf,null),cf(this,Ef,null),cf(this,Sf,this.hot.rootDocument.createElement("DIV")),cf(this,Af,this.hot.rootDocument.createElement("DIV")),cf(this,kf,!1),cf(this,Rf,!1),cf(this,Mf,0),cf(this,Tf,null),cf(this,If,void 0),cf(this,Pf,void 0),(0,i.iQ)(hf(Sf,this),"manualRowResizer"),(0,i.iQ)(hf(Af,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[mf]}enablePlugin(){this.enabled||(df(If,this,new wn._),hf(If,this).addLocalHook("init",(()=>pf(Of,this,Ff).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,hf(If,this)),this.addHook("modifyRowHeight",((e,t)=>pf(Of,this,zf).call(this,e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){df(Pf,this,hf(If,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",gf,hf(If,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",gf,e),e.value}setManualSize(e,t){const n=this.hot.toPhysicalRow(e),o=Math.max(t,this.hot.view.getDefaultRowHeight());return hf(If,this).setValueAtIndex(n,o),o}getLastDesiredRowHeight(){return hf(wf,this)}setupHandlePosition(e){df(ff,this,e);const{view:t}=this.hot,{_wt:n}=t,o=n.wtTable.getCoords(hf(ff,this)),r=o.row;if(r<0)return;const s=(0,i.Gq)(hf(ff,this)),a=hf(ff,this).getBoundingClientRect(),l=r<n.getSetting("fixedRowsTop"),c=r>=t.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let d;l?d=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(hf(ff,this),o.row,o.col):c&&(d=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(hf(ff,this),o.row,o.col)),d||(d=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(hf(ff,this),o.row,o.col)),df(bf,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(r)),df(vf,this,[]);const h=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&h){const e=this.hot.getSelectedRange();(0,u.z0)(e,(e=>{const t=e.getTopStartCorner().row,n=e.getBottomStartCorner().row;(0,At.Ti)(t,n,(e=>{hf(vf,this).includes(e)||hf(vf,this).push(e)}))}))}hf(vf,this).includes(hf(bf,this))||df(vf,this,[hf(bf,this)]),df(Ef,this,d.top-6),df(xf,this,parseInt(a.height,10)),hf(Sf,this).style.top=`${hf(Ef,this)+hf(xf,this)}px`,hf(Sf,this).style[this.inlineDir]=`${d.start}px`,hf(Sf,this).style.width=`${s}px`,this.hot.rootElement.appendChild(hf(Sf,this))}refreshHandlePosition(){hf(Sf,this).style.top=`${hf(Ef,this)+hf(wf,this)}px`}setupGuidePosition(){const e=parseInt((0,i.Gq)(hf(Sf,this)),10),t=parseInt(hf(Sf,this).style[this.inlineDir],10)+e,n=this.hot.view.getTableWidth();(0,i.iQ)(hf(Sf,this),"active"),(0,i.iQ)(hf(Af,this),"active"),hf(Af,this).style.top=hf(Sf,this).style.top,hf(Af,this).style[this.inlineDir]=`${t}px`,hf(Af,this).style.width=n-e+"px",this.hot.rootElement.appendChild(hf(Af,this))}refreshGuidePosition(){hf(Af,this).style.top=hf(Sf,this).style.top}hideHandleAndGuide(){(0,i.vy)(hf(Sf,this),"active"),(0,i.vy)(hf(Af,this),"active")}checkIfRowHeader(e){const t=(0,i.kp)(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:n,topInlineStartCornerOverlay:o,bottomInlineStartCornerOverlay:r}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.TBODY,o.clone.wtTable.TBODY,r.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&hf(yf,this)<t?t:hf(yf,this)}afterMouseDownTimeout(){const e=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const o=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==o&&df(yf,this,o),this.setManualSize(t,hf(yf,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),n&&e()};hf(Mf,this)>=2&&(hf(vf,this).length>1?((0,u.z0)(hf(vf,this),(e=>{t(e)})),e()):(0,u.z0)(hf(vf,this),(e=>{t(e,!0)}))),df(Mf,this,0),df(Tf,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>pf(Of,this,Nf).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>pf(Of,this,Hf).call(this,e))),this.eventManager.addEventListener(t,"mousemove",(e=>pf(Of,this,Lf).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(()=>pf(Of,this,$f).call(this))),this.eventManager.addEventListener(hf(Sf,this),"contextmenu",(()=>pf(Of,this,_f).call(this)))}destroy(){super.destroy()}}function Nf(e){if(!(0,i.$w)(e.target)&&!0!==hf(Rf,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(hf(kf,this)||this.setupHandlePosition(t))}}function Hf(e){(0,i.nB)(e.target,"manualRowResizer")&&(this.setupHandlePosition(hf(ff,this)),this.setupGuidePosition(),df(kf,this,!0),null===hf(Tf,this)&&(df(Tf,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(hf(Tf,this))),df(Mf,this,hf(Mf,this)+1),df(Cf,this,e.pageY),df(yf,this,hf(xf,this)))}function Lf(e){hf(kf,this)&&(df(wf,this,hf(xf,this)+(e.pageY-hf(Cf,this))),(0,u.z0)(hf(vf,this),(e=>{df(yf,this,this.setManualSize(e,hf(wf,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function $f(){const e=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),n&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};hf(kf,this)&&(this.hideHandleAndGuide(),df(kf,this,!1),hf(yf,this)!==hf(xf,this)&&(hf(vf,this).length>1?((0,u.z0)(hf(vf,this),(e=>{t(e)})),e()):(0,u.z0)(hf(vf,this),(e=>{t(e,!0)}))),this.setupHandlePosition(hf(ff,this)))}function _f(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(hf(Sf,this)),this.hot.rootElement.removeChild(hf(Af,this)),df(kf,this,!1),df(Rf,this,!0),this.hot._registerImmediate((()=>{df(Rf,this,!1)}))}function zf(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),o=hf(If,this).getValueAtIndex(e);this.hot.getSettings()[mf]&&o&&(n=o)}return n}function Ff(){const e=this.hot.getSettings()[mf],t=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==t?t.forEach(((e,t)=>{hf(If,this).setValueAtIndex(t,e)})):Array.isArray(e)?(e.forEach(((e,t)=>{hf(If,this).setValueAtIndex(t,e)})),df(Pf,this,e)):!0===e&&Array.isArray(hf(Pf,this))&&hf(Pf,this).forEach(((e,t)=>{hf(If,this).setValueAtIndex(t,e)}))}),!0)}function Bf(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jf(e,t){return e.get(Vf(e,t))}function Wf(e,t,n){return e.set(Vf(e,t),n),n}function Vf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n(30237),n(30670);var Gf=new WeakMap;const Kf=class{constructor(e,t,n,o,i,r){var s,a,l;Bf(this,"row",void 0),Bf(this,"col",void 0),Bf(this,"rowspan",void 0),Bf(this,"colspan",void 0),Bf(this,"removed",!1),Bf(this,"cellCoordsFactory",void 0),Bf(this,"cellRangeFactory",void 0),l=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(s=this,a=Gf),a.set(s,l),this.row=e,this.col=t,this.rowspan=n,this.colspan=o,this.cellCoordsFactory=i,this.cellRangeFactory=r}static NEGATIVE_VALUES_WARNING(e){let{row:t,col:n,rowspan:o,colspan:i}=e;return bi.O`The merged cell declared with {row: ${t}, col: ${n},\x20
  12. rowspan: ${o}, colspan: ${i}} contains negative values, which is\x20
  13. not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){let{row:t,col:n}=e;return bi.O`The merged cell declared at [${t}, ${n}] is positioned\x20
  14. (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(e){let{row:t,col:n}=e;return bi.O`The merged cell declared at [${t}, ${n}] has both "rowspan"\x20
  15. and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(e){let{row:t,col:n}=e;return bi.O`The merged cell declared at [${t}, ${n}] has "rowspan"\x20
  16. or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(e){let{row:t,col:n,rowspan:o,colspan:i}=e;return t<0||n<0||o<0||i<0}static isSingleCell(e){let{rowspan:t,colspan:n}=e;return 1===n&&1===t}static containsZeroSpan(e){let{rowspan:t,colspan:n}=e;return 0===n||0===t}static isOutOfBounds(e,t,n){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}normalize(e){const t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col),Wf(Gf,this,null)}includes(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}includesHorizontally(e){return this.col<=e&&this.col+this.colspan-1>=e}includesVertically(e){return this.row<=e&&this.row+this.rowspan-1>=e}shift(e,t){const n=e[0]||e[1],o=t+Math.abs(e[0]||e[1])-1,i=e[0]?"colspan":"rowspan",r=e[0]?"col":"row",s=Math.min(t,o),a=Math.max(t,o),l=this[r],c=this[r]+this[i]-1;if(l>=t&&(this[r]+=n),n>0)t<=c&&t>l&&(this[i]+=n);else if(n<0){if(s<=l&&a>=c)return this.removed=!0,Wf(Gf,this,null),!1;if(l>=s&&l<=a){const e=a-l+1,t=Math.abs(n)-e;this[r]-=t+n,this[i]-=e}else if(l<=s&&c>=a)this[i]+=n;else if(l<=s&&c>=s&&c<a){const e=c-s+1;this[i]-=e}}return Wf(Gf,this,null),!0}isFarther(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return jf(Gf,this)||Wf(Gf,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),jf(Gf,this)}};function Uf(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Yf=new WeakSet;class Xf{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Yf),n.add(t),Uf(this,"plugin",void 0),Uf(this,"mergedCells",[]),Uf(this,"mergedCellsMatrix",new Map),Uf(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){let{row:t,col:n}=e;return bi.O`The merged cell declared at [${t}, ${n}], overlaps\x20
  17. with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
  18. fix your setup.`}get(e,t){var n;return!!this.mergedCellsMatrix.has(e)&&null!==(n=this.mergedCellsMatrix.get(e).get(t))&&void 0!==n&&n}getByRange(e){const{row:t,col:n}=e.getTopStartCorner(),{row:o,col:i}=e.getBottomEndCorner(),r=this.mergedCells.length;let s=!1;for(let e=0;e<r;e++){const r=this.mergedCells[e],{row:a,col:l,rowspan:c,colspan:u}=r;if(a>=t&&a+c-1<=o&&l>=n&&l+u-1<=i){s=r;break}}return s}filterOverlappingMergeCells(e){const t=new Set;return this.mergedCells.forEach((e=>{const{row:n,col:o,colspan:i,rowspan:r}=e;for(let e=n;e<n+r;e++)for(let n=o;n<o+i;n++)t.add(`r${e},c${n}`)})),e.filter((e=>{const{row:n,col:o,colspan:i,rowspan:r}=e,s=new Set;let a=!1;for(let l=n;l<n+r;l++){for(let n=o;n<o+i;n++){const o=`r${l},c${n}`;if(t.has(o)){(0,Lo.R8)(Xf.IS_OVERLAPPING_WARNING(e)),a=!0;break}s.add(o)}if(a)break}return a||t.add(...s),!a}))}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:n,col:o}=e.getTopStartCorner(),{row:i,col:r}=e.getBottomEndCorner(),s=[];for(let e=n;e<=i;e++)for(let n=o;n<=r;n++){const o=this.get(e,n);o&&(t||!t&&o.row===e&&o.col===n)&&s.push(o)}return s}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.row,o=e.col,i=e.rowspan,r=e.colspan,s=new Kf(n,o,i,r,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,o),l=!t&&this.isOverlapping(s);return a||l?(l&&(0,Lo.R8)(Xf.IS_OVERLAPPING_WARNING(s)),!1):(this.hot&&s.normalize(this.hot),this.mergedCells.push(s),qf(Yf,this,Jf).call(this,s),s)}remove(e,t){const n=this.get(e,t),o=n?this.mergedCells.indexOf(n):-1;return!(!n||-1===o)&&(this.mergedCells.splice(o,1),qf(Yf,this,Zf).call(this,n),n)}clear(){(0,u.z0)(this.mergedCells,(e=>{let{row:t,col:n,rowspan:o,colspan:i}=e;(0,At.Ti)(t,t+o,(e=>{(0,At.Ti)(n,n+i,(t=>{const n=this.hot.getCell(e,t);n&&(n.removeAttribute("rowspan"),n.removeAttribute("colspan"),n.style.display="")}))}))})),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(e){const t=e.getRange();for(let e=0;e<this.mergedCells.length;e++)if(this.mergedCells[e].getRange().overlaps(t))return!0;return!1}isFirstRenderableMergedCell(e,t){const n=this.get(e,t);if(!n)return!1;const{row:o,col:i,rowspan:r,colspan:s}=n,a=this.hot.view.getActiveOverlayName(),l=["top","top_inline_start_corner"].includes(a)?0:this.hot.getFirstRenderedVisibleRow(),c=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(a)?0:this.hot.getFirstRenderedVisibleColumn(),u=(0,At.qE)(l,o,o+r-1),d=(0,At.qE)(c,i,i+s-1);return this.hot.rowIndexMapper.getNearestNotHiddenIndex(u,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(d,1)===t}getFirstRenderableCoords(e,t){const n=this.get(e,t);if(!n||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const o=this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1),i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1);return this.hot._createCellCoords(o,i)}getStartMostColumnIndex(e,t){const n=qf(Yf,this,Qf).call(this,e,"col",-1);let o=t;for(let e=0;e<n.length;e++)if(n[e]<=t){o=n[e];break}return o}getEndMostColumnIndex(e,t){const n=qf(Yf,this,Qf).call(this,e,"col",1);let o=t;for(let e=0;e<n.length;e++)if(n[e]>=t){o=n[e];break}return o}getTopMostRowIndex(e,t){const n=qf(Yf,this,Qf).call(this,e,"row",-1);let o=t;for(let e=0;e<n.length;e++)if(n[e]<=t){o=n[e];break}return o}getBottomMostRowIndex(e,t){const n=qf(Yf,this,Qf).call(this,e,"row",1);let o=t;for(let e=0;e<n.length;e++)if(n[e]>=t){o=n[e];break}return o}shiftCollections(e,t,n){const o=[0,0];switch(e){case"right":o[0]+=n;break;case"left":o[0]-=n;break;case"down":o[1]+=n;break;case"up":o[1]-=n}const i=[];this.mergedCells.forEach((e=>{e.shift(o,t),e.removed&&i.push(e)})),i.forEach((e=>{this.mergedCells.splice(this.mergedCells.indexOf(e),1)})),this.mergedCellsMatrix.clear(),this.mergedCells.forEach((e=>{qf(Yf,this,Jf).call(this,e)}))}}function Qf(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=new Map,i=1===n?e.getTopStartCorner():e.getBottomEndCorner(),r=1===n?e.getBottomEndCorner():e.getTopStartCorner();for(let e=i.row;1===n?e<=r.row:e>=r.row;e+=n)for(let s=i.col;1===n?s<=r.col:s>=r.col;s+=n){const i="row"===t?e:s,r=this.get(e,s);let a=i;r&&(a=1===n?r[t]+r[`${t}span`]-1:r[t]),o.has(i)||o.set(i,new Set),o.get(i).add(a)}return Array.from(new Set(Array.from(o.entries()).filter((e=>{let[,t]=e;return 1===t.size})).flatMap((e=>{let[,t]=e;return Array.from(t)}))))}function Jf(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let n=e.col;n<e.col+e.colspan;n++)this.mergedCellsMatrix.has(t)||this.mergedCellsMatrix.set(t,new Map),this.mergedCellsMatrix.get(t).set(n,e)}function Zf(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let n=e.col;n<e.col+e.colspan;n++)this.mergedCellsMatrix.get(t).delete(n)}const eb=Xf;function tb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const nb=class{constructor(e){tb(this,"plugin",void 0),tb(this,"mergedCellsCollection",void 0),tb(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}getDirection(e,t){let n=null;return n=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",n}snapDragArea(e,t,n,o){const i=t.slice(0),r=this.getAutofillSize(e,t,n),[s,a,l,c]=e,u=["up","down"].indexOf(n)>-1?l-s+1:c-a+1,d=r-Math.floor(r/u)*u,h=this.getFarthestCollection(e,t,n,o);if(h)if("down"===n){const e=h.row+h.rowspan-s-d;i[2]+e>=this.plugin.hot.countRows()?i[2]-=d:i[2]+=d?e:0}else if("right"===n){const e=h.col+h.colspan-a-d;i[3]+e>=this.plugin.hot.countCols()?i[3]-=d:i[3]+=d?e:0}else if("up"===n){const e=l-d-h.row+1;i[0]+e<0?i[0]+=d:i[0]-=d?e:0}else if("left"===n){const e=c-d-h.col+1;i[1]+e<0?i[1]+=d:i[1]-=d?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:o,fillSize:r,dragArea:i,cycleLength:u}),i}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,s.X$)(this.currentFillData,e)}getAutofillSize(e,t,n){const[o,i,r,s]=e,[a,l,c,u]=t;switch(n){case"up":return o-a;case"down":return c-r;case"left":return i-l;case"right":return u-s;default:return null}}getDragArea(e,t,n){const[o,i,r,s]=e,[a,l,c,u]=t;switch(n){case"up":return[a,l,o-1,s];case"down":{const e=this.mergedCellsCollection.get(c,s);return[r+1,i,c+(e?e.rowspan-1:0),s]}case"left":return[a,l,r,i-1];case"right":{const e=this.mergedCellsCollection.get(c,s);return[o,s+(e?e.colspan-1:0),c,u]}default:return null}}getFarthestCollection(e,t,n,o){const[i,r,s,a]=e,l=["up","down"].indexOf(n)>-1,c=l?s:a,d=l?i:r,h=this.getAutofillSize(e,t,n),p=l?s-i+1:a-r+1,m=h-Math.floor(h/p)*p;let g=null,f=null,b=null;switch(n){case"up":g="includesVertically",b=c-m+1;break;case"left":g="includesHorizontally",b=c-m+1;break;case"down":g="includesVertically",b=d+m-1;break;case"right":g="includesHorizontally",b=d+m-1}return(0,u.z0)(o,(e=>{e[g](b)&&e.isFarther(f,n)&&(f=e)})),f}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,o=this.currentFillData.dragDirection,i=(e,n)=>{switch(o){case"up":return e.row-n>=t.from.row;case"down":return e.row+e.rowspan-1+n<=t.to.row;case"left":return e.col-n>=t.from.column;case"right":return e.col+e.colspan-1+n<=t.to.column;default:return null}};let r=0,s=null,a=1;do{for(let e=0;e<n.length;e+=1){if(s=n[e],r=a*this.currentFillData.cycleLength,i(s,r))switch(o){case"up":this.plugin.mergedCellsCollection.add({row:s.row-r,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"down":this.plugin.mergedCellsCollection.add({row:s.row+r,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"left":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col-r,colspan:s.colspan},!0);break;case"right":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col+r,colspan:s.colspan},!0)}e===n.length-1&&(a+=1)}}while(i(s,r));this.currentFillData=null,this.plugin.hot.render(),n.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},n={min:null,max:null};return(0,u.z0)(e,(e=>{const o=e[0],i=this.plugin.hot.propToCol(e[1]);(null===t.min||o<t.min)&&(t.min=o),(null===t.max||o>t.max)&&(t.max=o),(null===n.min||i<n.min)&&(n.min=i),(null===n.max||i>n.max)&&(n.max=i)})),{from:{row:t.min,column:n.min},to:{row:t.max,column:n.max}}}dragAreaOverlapsCollections(e,t,n){const o=this.getDragArea(e,t,n),[i,r,s,a]=o,l=this.plugin.hot._createCellCoords(i,r),c=this.plugin.hot._createCellCoords(s,a),u=this.plugin.hot._createCellRange(l,l,c);if(0===this.mergedCellsCollection.getWithinRange(u,!0).length)return!1;const d=this.mergedCellsCollection.getWithinRange(u,!1);return 0===d.length||("up"===n||"down"===n?!d.every((e=>{let{colspan:t}=e;return t===u.getWidth()})):!d.every((e=>{let{rowspan:t}=e;return t===u.getHeight()})))}};function ob(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ib=class{constructor(e){ob(this,"plugin",void 0),ob(this,"hot",void 0),ob(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}getSelectedMergedCellClassName(e,t,n,o){const i=Math.min(n[0],n[2]),r=Math.min(n[1],n[3]),s=Math.max(n[0],n[2]),a=Math.max(n[1],n[3]);if(void 0===o)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const l=this.plugin.mergedCellsCollection.get(e,t);if(!l)return;const c=l.getLastRow(),u=l.getLastColumn();return i<=l.row&&r<=l.col&&s>=c&&a>=u?`${this.fullySelectedMergedCellClassName}-${o}`:this.isMergeCellFullySelected(l,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const n=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let o=0;o<e.colspan;o+=1)n.push(this.hot._createCellCoords(e.row+t,e.col+o));for(let e=0;e<n.length;e+=1){const o=[];for(let i=0;i<t.length;i+=1)o[i]=t[i].includes(n[e]);if(!o.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}};function rb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class sb{constructor(e){rb(this,"data",void 0),rb(this,"next",null),rb(this,"prev",null),this.data=e}}const ab=class{constructor(){rb(this,"first",null),rb(this,"last",null)}push(e){const t=new sb(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.last;this.last=t,t.prev=e,e.next=t}return t}unshift(e){const t=new sb(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.first;this.first=t,t.next=e,e.prev=t}}inorder(e){let t=this.first;for(;t;){const n=e(t);if(t===this.last||!0===n)break;t=t.next}}remove(e){if(null===this.first)return!1;let t,n,o=this.first;for(;o;){if(o.data===e)return t=o.next,n=o.prev,t&&(t.prev=n),n&&(n.next=t),o===this.first&&(this.first=t),o===this.last&&(this.last=n),!0;o=o.next}return!1}hasCycle(){let e=this.first,t=this.first;for(;;){if(null===e)return!1;if(e=e.next,null===e)return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(null===this.last)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(null===this.first)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){if(!this.first)return;!function e(t,n){n&&(e(n,n.next),n.next=t)}(this.first,this.first.next),this.first.next=null;const e=this.first;this.first=this.last,this.last=e}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,n=this.first;for(;t;)e=t.next,t.next=n,n.prev=t,n=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=n,this.last=e}};function lb(e,t,n){cb(e,t),t.set(e,n)}function cb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ub(e,t){return e.get(hb(e,t))}function db(e,t,n){return e.set(hb(e,t),n),n}function hb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var pb=new WeakMap,mb=new WeakMap,gb=new WeakMap,fb=new WeakMap,bb=new WeakMap,vb=new WeakMap,wb=new WeakMap,yb=new WeakSet;class Cb{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:n,columnIndexMapper:o}=e;var i;cb(this,i=yb),i.add(this),lb(this,pb,new ab),lb(this,mb,new ab),lb(this,gb,null),lb(this,fb,null),lb(this,bb,null),lb(this,vb,null),lb(this,wb,null),db(bb,this,t),db(vb,this,n),db(wb,this,o)}getCurrentVerticalNode(){return ub(fb,this).data}getFirstVerticalNode(){return ub(mb,this).first.data}getNextVerticalNode(){return ub(fb,this).next.data}getPrevVerticalNode(){return ub(fb,this).prev.data}getCurrentHorizontalNode(){return ub(gb,this).data}getFirstHorizontalNode(){return ub(pb,this).first.data}getNextHorizontalNode(){return ub(gb,this).next.data}getPrevHorizontalNode(){return ub(gb,this).prev.data}setPrevNodeAsActive(){db(fb,this,ub(fb,this).prev),db(gb,this,ub(gb,this).prev)}setNextNodeAsActive(){db(fb,this,ub(fb,this).next),db(gb,this,ub(gb,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),n=e.getBottomEndCorner(),o=new WeakSet;db(pb,this,new ab);for(let i=t.row;i<=n.row;i++)if(!ub(vb,this).isHidden(i))for(let r=t.col;r<=n.col;r++){if(ub(wb,this).isHidden(r))continue;const t=hb(yb,this,xb).call(this,e,ub(pb,this),o,i,r);t&&db(gb,this,t)}ub(pb,this).first&&(ub(pb,this).first.prev=ub(pb,this).last,ub(pb,this).last.next=ub(pb,this).first);const i=new WeakSet;db(mb,this,new ab);for(let o=t.col;o<=n.col;o++)if(!ub(wb,this).isHidden(o))for(let r=t.row;r<=n.row;r++){if(ub(vb,this).isHidden(r))continue;const t=hb(yb,this,xb).call(this,e,ub(mb,this),i,r,o);t&&db(fb,this,t)}ub(mb,this).first&&(ub(mb,this).first.prev=ub(mb,this).last,ub(mb,this).last.next=ub(mb,this).first)}setActiveNode(e,t){return ub(pb,this).inorder((n=>{const{rowStart:o,rowEnd:i,colStart:r,colEnd:s}=n.data;if(e>=o&&e<=i&&t>=r&&t<=s)return db(gb,this,n),!1})),ub(mb,this).inorder((n=>{const{rowStart:o,rowEnd:i,colStart:r,colEnd:s}=n.data;if(e>=o&&e<=i&&t>=r&&t<=s)return db(fb,this,n),!1})),this}}function xb(e,t,n,o,i){const r=e.getTopStartCorner(),s=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),l=ub(bb,this).call(this,o,i);if(l&&n.has(l))return null;const c={colStart:i,colEnd:i,rowStart:o,rowEnd:o};if(l){if(n.add(l),l.row<r.row||l.row+l.rowspan-1>s.row||l.col<r.col||l.col+l.colspan-1>s.col)return null;c.colStart=l.col,c.colEnd=l.col+l.colspan-1,c.rowStart=l.row,c.rowEnd=l.row+l.rowspan-1}const u=t.push(c);return o===a.row&&i===a.col||l&&a.row>=l.row&&a.row<=l.row+l.rowspan-1&&a.col>=l.col&&a.col<=l.col+l.colspan-1?u:null}function Eb(e,t,n){const{view:o,rowIndexMapper:i}=e,r=o.getStylesHandler(),s=o.getDefaultRowHeight();let a=0;for(let o=t;o<t+n;o++){var l;i.isHidden(o)||(a+=null!==(l=e.getRowHeight(o))&&void 0!==l?l:s,0!==o||r.isClassicTheme()||(a+=1))}return a}function Sb(e,t,n){Ab(e,t),t.set(e,n)}function Ab(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rb(e,t,n){return e.set(Tb(e,t),n),n}function Mb(e,t){return e.get(Tb(e,t))}function Tb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ee.R.getSingleton().register("beforeMergeCells"),Ee.R.getSingleton().register("afterMergeCells"),Ee.R.getSingleton().register("beforeUnmergeCells"),Ee.R.getSingleton().register("afterUnmergeCells");const Ib="mergeCells",Pb=Ib;var Ob=new WeakMap,Db=new WeakMap,Nb=new WeakMap,Hb=new WeakMap,Lb=new WeakSet;class $b extends un{constructor(){var e;super(...arguments),Ab(this,e=Lb),e.add(this),kb(this,"mergedCellsCollection",null),kb(this,"autofillCalculations",null),kb(this,"selectionCalculations",null),Sb(this,Ob,null),Sb(this,Db,{row:0,col:0}),Sb(this,Nb,new Cb({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),Sb(this,Hb,function(e){const{hot:t}=e,{rowIndexMapper:n,columnIndexMapper:o}=t,i=new Map;return{before:function(){},after:function(r,a,l){const c=e.mergedCellsCollection.get(a,l);if(!(0,s.Gv)(c))return r.removeAttribute("rowspan"),r.removeAttribute("colspan"),(0,te.nr)()&&i.has(a)&&!t.getSettings().rowHeaders&&(r.style.height=`${i.get(a)}px`,i.delete(a)),void(r.style.display="");const{row:u,col:d,colspan:h,rowspan:p}=c,[m,g]=e.translateMergedCellToRenderable(u,p,d,h),f=e.getSetting("virtualized");if((0,te.nr)()&&0===d&&!t.getSettings().rowHeaders){const e=Eb(t,u,p);i.set(a,e/p)}const b=m-n.getRenderableFromVisualIndex(a)+1,v=g-o.getRenderableFromVisualIndex(l)+1;let w=n.getNearestNotHiddenIndex(u,1),y=o.getNearestNotHiddenIndex(d,1);if(f){const e=t.view.getActiveOverlayName();["top","top_inline_start_corner"].includes(e)||(w=Math.max(w,t.getFirstRenderedVisibleRow())),["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(e)||(y=Math.max(y,t.getFirstRenderedVisibleColumn()))}const C=Math.min(p,b),x=Math.min(h,v);w===a&&y===l?(r.setAttribute("rowspan",C),r.setAttribute("colspan",x)):(r.removeAttribute("rowspan"),r.removeAttribute("colspan"),r.style.display="none")}}}(this))}static get PLUGIN_KEY(){return Ib}static get PLUGIN_PRIORITY(){return 150}static get DEFAULT_SETTINGS(){return{[rn]:"cells",virtualized:!1,cells:[]}}isEnabled(){return!!this.hot.getSettings()[Ib]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new eb(this),this.autofillCalculations=new nb(this),this.selectionCalculations=new ib(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,_b).call(e,...n)})),this.addHook("modifyTransformFocus",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Fb).call(e,...n)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Bb).call(e,...n)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,jb).call(e,...n)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Wb).call(e,...n)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Kb).call(e,...n)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Kb).call(e,...n)})),this.addHook("beforeSelectionFocusSet",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Ub).call(e,...n)})),this.addHook("afterSelectionFocusSet",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,qb).call(e,...n)})),this.addHook("afterSelectionEnd",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Yb).call(e,...n)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Vb).call(e,...n)})),this.addHook("modifyGetCoordsElement",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Vb).call(e,...n)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,zb).call(e,...n)})),this.addHook("afterRenderer",(function(){return Mb(Hb,e).after(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Gb).call(e,...n)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Xb).call(e,...n)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Qb).call(e,...n)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Jb).call(e,...n)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,Zb).call(e,...n)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,ev).call(e,...n)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,tv).call(e,...n)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,nv).call(e,...n)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,ov).call(e,...n)})),this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,iv).call(e,...n)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,rv).call(e,...n)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,sv).call(e,...n)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,av).call(e,...n)})),this.addHook("beforeBeginEditing",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,lv).call(e,...n)})),this.addHook("modifyRowHeightByOverlayName",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Tb(Lb,e,cv).call(e,...n)})),this.addHook("beforeUndoStackChange",((e,t)=>{if("MergeCells"===t)return!1})),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,te.H8)())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach((e=>{const{row:n,rowspan:o}=e;for(let e=n+1;e<n+o;e++)t.push(e)})),t=[...new Set(t)],t.forEach((t=>{const n=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map((e=>"master"===(null==e?void 0:e.name)?e:e.clone.wtTable)).forEach((t=>{const o=t.getRow(n);o&&(o.style.background=(0,i.gd)(o,"backgroundColor").replace(")",", 0.99)"),e.push(o))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{var t;e.style.background=null===(t=(0,i.gd)(e,"backgroundColor"))||void 0===t?void 0:t.replace(", 0.99)",")")}))}),1)}validateSetting(e){return!(!e||(Kf.containsNegativeValues(e)?((0,Lo.R8)(Kf.NEGATIVE_VALUES_WARNING(e)),1):Kf.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,Lo.R8)(Kf.IS_OUT_OF_BOUNDS_WARNING(e)),1):Kf.isSingleCell(e)?((0,Lo.R8)(Kf.IS_SINGLE_CELL(e)),1):Kf.containsZeroSpan(e)&&((0,Lo.R8)(Kf.ZERO_SPAN_WARNING(e)),1)))}generateFromSettings(){const e=this.getSetting("cells").filter((e=>this.validateSetting(e))),t=this.mergedCellsCollection.filterOverlappingMergeCells(e),n=[];t.forEach((e=>{const{row:t,col:o,rowspan:i,colspan:r}=e,s=this.hot._createCellCoords(t,o),a=this.hot._createCellCoords(t+i-1,o+r-1),l=this.hot._createCellRange(s,s,a);this.mergeRange(l,!0,!0);for(let e=t;e<t+i;e++)for(let i=o;i<o+r;i++)e===t&&i===o||n.push([e,i,null])})),0!==n.length&&this.hot.setDataAtCell(n,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:n}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:n}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=e.getTopStartCorner(),i=e.getBottomEndCorner(),r={row:o.row,col:o.col,rowspan:i.row-o.row+1,colspan:i.col-o.col+1},s=[];let a=null;return!!this.canMergeRange(r,t)&&(this.hot.runHooks("beforeMergeCells",e,t),(0,At.Ti)(0,r.rowspan-1,(e=>{(0,At.Ti)(0,r.colspan-1,(t=>{let n=null;s[e]||(s[e]=[]),0===e&&0===t?n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r.row),this.hot.toPhysicalColumn(r.col)):this.hot.setCellMeta(r.row+e,r.col+t,"hidden",!0),s[e][t]=n}))})),this.hot.setCellMeta(r.row,r.col,"spanned",!0),!this.mergedCellsCollection.add(r,t)||(n?a=[r.row,r.col,s]:this.hot.populateFromArray(r.row,r.col,s,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,r,t),a))}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.mergedCellsCollection.getWithinRange(e);0!==n.length&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,u.z0)(n,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,At.Ti)(0,e.rowspan-1,(t=>{(0,At.Ti)(0,e.colspan-1,(n=>{this.hot.removeCellMeta(e.row+t,e.col+n,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+n,"copyable")}))})),this.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const{from:t,to:n}=e.clone().normalize(),o=this.mergedCellsCollection.get(t.row,t.col);o.row===t.row&&o.col===t.col&&o.row+o.rowspan-1===n.row&&o.col+o.colspan-1===n.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,n,o){const i=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(n,o);this.mergeRange(this.hot._createCellRange(i,i,r))}unmerge(e,t,n,o){const i=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(n,o);this.unmergeRange(this.hot._createCellRange(i,i,r))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:Pb})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Pb)}modifyViewportRowStart(e,t){const n=this.hot.rowIndexMapper,o=n.getVisualFromRenderableIndex(e.startRow);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(o,i);if((0,s.Gv)(r)){const o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r.row,1));if(o<e.startRow)return e.startRow=o,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const n=this.hot.rowIndexMapper,o=n.getVisualFromRenderableIndex(e.endRow);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(o,i);if((0,s.Gv)(r)){const o=r.row+r.rowspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,-1));if(i>e.endRow)return e.endRow=i,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const n=this.hot.columnIndexMapper,o=n.getVisualFromRenderableIndex(e.startColumn);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(i,o);if((0,s.Gv)(r)){const o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r.col,1));if(o<e.startColumn)return e.startColumn=o,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const n=this.hot.columnIndexMapper,o=n.getVisualFromRenderableIndex(e.endColumn);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(i,o);if((0,s.Gv)(r)){const o=r.col+r.colspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,-1));if(i>e.endColumn)return e.endColumn=i,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,n,o){const{rowIndexMapper:i,columnIndexMapper:r}=this.hot;let s,a;return s=0===t?i.getNearestNotHiddenIndex(e,1):i.getNearestNotHiddenIndex(e+t-1,-1),a=0===o?r.getNearestNotHiddenIndex(n,1):r.getNearestNotHiddenIndex(n+o-1,-1),[e>=0?i.getRenderableFromVisualIndex(s):e,n>=0?r.getRenderableFromVisualIndex(a):n]}}function _b(){this.generateFromSettings(),this.hot.render()}function zb(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner(),o=t.getBottomEndCorner();for(let t=0;t<e.length;t+=1)if(n.row===e[t].row&&n.col===e[t].col&&o.row===e[t].row+e[t].rowspan-1&&o.col===e[t].col+e[t].colspan-1)return!1}return e}function Fb(e){Mb(Db,this).row=e.row,Mb(Db,this).col=e.col}function Bb(e){const t=this.hot.getSelectedRangeLast(),{highlight:n}=t,{columnIndexMapper:o,rowIndexMapper:i}=this.hot;Mb(Ob,this)&&(null!==i.getRenderableFromVisualIndex(Mb(Ob,this).row)&&(n.row=Mb(Ob,this).row),null!==o.getRenderableFromVisualIndex(Mb(Ob,this).col)&&(n.col=Mb(Ob,this).col),Rb(Ob,this,null));const r=this.mergedCellsCollection.get(n.row,n.col);if(!r)return;const s=r.col,a=r.col+r.colspan-1;if(e.col<0){const t=n.col>=s&&n.col<=a?s-1:a,i=o.getNearestNotHiddenIndex(t,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,n.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,n.col)-1,1)}else if(e.col>0){const t=n.col>=s&&n.col<=a?a+1:s,i=o.getNearestNotHiddenIndex(t,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(n.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(n.col,i)-1,1)}const l=r.row,c=r.row+r.rowspan-1;if(e.row<0){const t=n.row>=l&&n.row<=c?l-1:c,o=i.getNearestNotHiddenIndex(t,-1);e.row=null===o?-this.hot.view.countRenderableRowsInRange(0,n.row):-Math.max(this.hot.view.countRenderableRowsInRange(o,n.row)-1,1)}else if(e.row>0){const t=n.row>=l&&n.row<=c?c+1:l,o=i.getNearestNotHiddenIndex(t,1);e.row=null===o?this.hot.view.countRenderableRowsInRange(n.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(n.row,o)-1,1)}}function jb(e){const t=this.hot.getSelectedRangeLast(),n=t.clone(),{to:o}=t,{columnIndexMapper:i,rowIndexMapper:r}=this.hot,s=(e,t)=>{n.expand(this.hot._createCellCoords(e,t));for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1)n.expandByRange(this.mergedCellsCollection.mergedCells[e].getRange())};if(e.col<0){let r=this.mergedCellsCollection.getStartMostColumnIndex(t,o.col)+e.col;s(o.row,r),"E-W"===t.getHorizontalDirection()&&"E-W"===n.getHorizontalDirection()&&(r=n.getTopStartCorner().col);const a=i.getNearestNotHiddenIndex(r,1);null!==a&&(e.col=-Math.max(this.hot.view.countRenderableColumnsInRange(a,o.col)-1,1))}else if(e.col>0){let r=this.mergedCellsCollection.getEndMostColumnIndex(t,o.col)+e.col;s(o.row,r),"W-E"===t.getHorizontalDirection()&&"W-E"===n.getHorizontalDirection()&&(r=n.getBottomEndCorner().col);const a=i.getNearestNotHiddenIndex(r,-1);null!==a&&(e.col=Math.max(this.hot.view.countRenderableColumnsInRange(o.col,a)-1,1))}if(e.row<0){let i=this.mergedCellsCollection.getTopMostRowIndex(t,o.row)+e.row;s(i,o.col),"S-N"===t.getVerticalDirection()&&"S-N"===n.getVerticalDirection()&&(i=n.getTopStartCorner().row);const a=r.getNearestNotHiddenIndex(i,1);null!==a&&(e.row=-Math.max(this.hot.view.countRenderableRowsInRange(a,o.row)-1,1))}else if(e.row>0){let i=this.mergedCellsCollection.getBottomMostRowIndex(t,o.row)+e.row;s(i,o.col),"N-S"===t.getVerticalDirection()&&"N-S"===n.getVerticalDirection()&&(i=n.getBottomStartCorner().row);const a=r.getNearestNotHiddenIndex(i,-1);null!==a&&(e.row=Math.max(this.hot.view.countRenderableRowsInRange(o.row,a)-1,1))}}function Wb(){const e=this.hot.getSelectedRangeLast(),{highlight:t}=e;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void Rb(Ob,this,t.clone());for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange(),!1);for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange(),!1);const n=this.mergedCellsCollection.get(t.row,t.col);Rb(Ob,this,t.clone()),n&&t.assign(n)}function Vb(e,t,n,o){if(e<0||t<0)return;const i=this.mergedCellsCollection.get(e,t);if(!i)return;const{row:r,col:s,colspan:a,rowspan:l}=i,c=r,u=s,d=r+l-1,h=s+a-1;if("render"===o&&this.getSetting("virtualized")){const e=this.hot.view.getActiveOverlayName(),t=["top","top_inline_start_corner"].includes(e)?0:this.hot.getFirstRenderedVisibleRow(),n=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(e)?0:this.hot.getFirstRenderedVisibleColumn();return[(0,At.qE)(t,c,d),(0,At.qE)(n,u,h),(0,At.qE)(this.hot.getLastRenderedVisibleRow(),c,d),(0,At.qE)(this.hot.getLastRenderedVisibleColumn(),u,h)]}return[c,u,d,h]}function Gb(e){var t;e.items.push({name:"---------"},(t=this,{key:"mergeCells",name(){const e=this.getSelectedLast();if(e){const n=t.mergedCellsCollection.get(e[0],e[1]);if(n.row===e[0]&&n.col===e[1]&&n.row+n.rowspan-1===e[2]&&n.col+n.colspan-1===e[3])return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){const e=this.getSelectedRangeLast();if(!e)return;e.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:n,to:o}=e;t.toggleMerge(e),this.selectCell(n.row,n.col,o.row,o.col,!1)},disabled(){const e=this.getSelectedLast();return!e||Kf.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}))}function Kb(){Rb(Ob,this,null)}function Ub(){if(Mb(Ob,this).isCell())return;const e=this.hot.getSelectedRangeLast(),t=e.getVerticalDirection(),n=e.getHorizontalDirection(),o=Mb(Ob,this).clone().normalize();Mb(Nb,this).setActiveNode(o.row,o.col),Mb(Db,this).row>0||Mb(Db,this).col>0?Mb(Nb,this).setPrevNodeAsActive():("E-W"===n&&Mb(Db,this).col<0||"S-N"===t&&Mb(Db,this).row<0)&&Mb(Nb,this).setNextNodeAsActive()}function qb(e,t){const n=this.hot.getSelectedRangeLast(),{columnIndexMapper:o,rowIndexMapper:i}=this.hot;let r=null,s=null;if(Mb(Db,this).col<0){const{rowEnd:e,colEnd:t}=Mb(Nb,this).getPrevHorizontalNode();s=o.getNearestNotHiddenIndex(t,-1),r=i.getNearestNotHiddenIndex(e,-1)}else if(Mb(Db,this).col>0){const{rowStart:e,colStart:t}=Mb(Nb,this).getNextHorizontalNode();s=o.getNearestNotHiddenIndex(t,1),r=i.getNearestNotHiddenIndex(e,1)}else if(Mb(Db,this).row<0){const{rowEnd:e,colEnd:t}=Mb(Nb,this).getPrevVerticalNode();s=o.getNearestNotHiddenIndex(t,-1),r=i.getNearestNotHiddenIndex(e,-1)}else if(Mb(Db,this).row>0){const{rowStart:e,colStart:t}=Mb(Nb,this).getNextVerticalNode();s=o.getNearestNotHiddenIndex(t,1),r=i.getNearestNotHiddenIndex(e,1)}if(null!==r||null!==s){const o=this.hot._createCellCoords(r,s),i=this.mergedCellsCollection.get(o.row,o.col),a=this.hot.selection.highlight.getFocus();e=o.row,t=o.col,i?n.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(i.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(i.col,1)}):n.highlight.assign(o),a.clear(),a.add(o).commit()}Mb(Nb,this).setActiveNode(e,t),Rb(Db,this,{row:0,col:0})}function Yb(){this.hot.getSelectedRangeLast().isHeader()||Mb(Nb,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function Xb(e,t,n){const o=this.mergedCellsCollection.get(e,t);o&&(o.row!==e||o.col!==t?n.copyable=!1:(n.rowspan=o.rowspan,n.colspan=o.colspan))}function Qb(e){if(this.getSetting("virtualized"))return;const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function Jb(e){if(this.getSetting("virtualized"))return;const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function Zb(e,t){const n=this.autofillCalculations.getDirection(t,e);if(this.autofillCalculations.dragAreaOverlapsCollections(t,e,n))return t;const o=this.hot._createCellCoords(t[0],t[1]),i=this.hot._createCellCoords(t[2],t[3]),r=this.hot._createCellRange(o,o,i),s=this.mergedCellsCollection.getWithinRange(r);return 0===s.length?e:this.autofillCalculations.snapDragArea(t,e,n,s)}function ev(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function tv(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function nv(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}function ov(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function iv(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function rv(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),n=this.mergedCellsCollection.getWithinRange(t);(0,u.z0)(n,(n=>{t.getBottomEndCorner().row===n.getLastRow()&&t.getBottomEndCorner().col===n.getLastColumn()&&(e[2]=n.row,e[3]=n.col)}))}}function sv(e,t,n,o){if(n)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,o)}function av(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function lv(e,t,n,o){if(!(o instanceof MouseEvent))return;const i=this.hot.getSelectedRangeLast(),r=this.mergedCellsCollection.getByRange(i);if(!r)return;const s=this.hot._createCellCoords(r.row,r.col),a=this.hot._createCellCoords(r.row+r.rowspan-1,r.col+r.colspan-1);return 0===this.hot.selection.getLayerLevel()&&i.isEqual(this.hot._createCellRange(s,s,a))}function cv(e,t,n){if(this.hot.getSettings().rowHeaders||"bottom"===n||"bottom_inline_start_corner"===n)return e;let o,i;if("master"===n)o=this.hot.getFirstRenderedVisibleColumn(),i=this.hot.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(n);o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getFirstRenderedColumn()),i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getLastRenderedColumn())}if(!this.mergedCellsCollection.get(t,o))return e;const r=this.hot._createCellCoords(t,o),s=this.hot._createCellCoords(t,i),a=this.hot._createCellRange(r,r,s),l=this.mergedCellsCollection.getWithinRange(a,!0),c=l.reduce(((e,t)=>{let{rowspan:n}=t;return Math.max(e,n)}),1);let u=0;return l.length>1&&l[0].rowspan<c&&(u=c-l[0].rowspan),l.forEach((o=>{let{rowspan:i}=o,r=0;r="top"===n||"top_inline_start_corner"===n?Math.min(c,this.hot.view.countNotHiddenFixedRowsTop()-t):i-u,e=Math.max(null!=e?e:0,Eb(this.hot,t,r))})),e}const uv="sort";const dv="multiColumnSorting",hv=dv;di(dv,(function(e,t){return function(n,o){const[,...i]=n,[,...r]=o;return function n(o){const s=e[o],a=t[o],l=i[o],c=r[o],u=a.multiColumnSorting,d=(u.compareFunctionFactory?u.compareFunctionFactory:pi(a.type))(s,a,u)(l,c);if(d===mi){const e=o+1;if(void 0!==t[e])return n(e)}return d}(0)}}));class pv extends $i{constructor(){var e,t,n;super(...arguments),e=this,n=dv,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="pluginKey"))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}static get PLUGIN_KEY(){return dv}static get PLUGIN_PRIORITY(){return 170}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,Di)),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&n.isHeader()},relativeToGroup:a.b,position:"before",group:hv})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(hv)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];super.updateHeaderClasses(e,...n),(0,i.vy)(e,function(e){const t=e.className.split(" "),n=new RegExp(`^${uv}-[0-9]{1,2}$`);return t.filter((e=>n.test(e)))}(e)),!1!==this.enabled&&(0,i.iQ)(e,function(e,t,n){const o=[];return!1===n||e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&o.push(`${uv}-${e.getIndexOfColumnInSortQueue(t)+1}`),o}(...n))}onAfterOnCellMouseDown(e,t){!1!==Si(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,Di))):this.sort(this.getColumnNextConfig(t.col)))}}function mv(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class gv extends un{constructor(){super(...arguments),mv(this,"dragged",[]),mv(this,"lastSetCell",null)}static get PLUGIN_KEY(){return"multipleSelectionHandles"}static get PLUGIN_PRIORITY(){return 160}isEnabled(){return(0,te.rr)()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function n(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;const n=e.dragged.indexOf(t);if(-1===n)return!1;0===n?e.dragged=e.dragged.slice(0,1):1===n&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",(t=>{let n;return(0,i.nB)(t.target,"topSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("top"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):(0,i.nB)(t.target,"bottomSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("bottom"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):void 0})),this.eventManager.addEventListener(t,"touchend",(t=>(0,i.nB)(t.target,"topSelectionHandle-HitArea")?(n.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):(0,i.nB)(t.target,"bottomSelectionHandle-HitArea")?(n.call(e,"bottom"),e.touchStartRange=void 0,t.preventDefault(),!1):void 0)),this.eventManager.addEventListener(t,"touchmove",(t=>{const{rootDocument:n}=this.hot;let o,i,r,s,a,l;if(0===e.dragged.length)return;const c=n.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);c&&c!==e.lastSetCell&&("TD"!==c.nodeName&&"TH"!==c.nodeName||(o=e.hot.getCoords(c),-1===o.col&&(o.col=0),i=e.hot.getSelectedRangeLast(),r=i.getWidth(),s=i.getHeight(),a=i.getDirection(),1===r&&1===s&&e.hot.selection.setRangeEnd(o),l=e.getCurrentRangeCoords(i,o,e.touchStartRange.direction,a,e.dragged[0]),null!==l.start&&e.hot.selection.setRangeStart(l.start),e.hot.selection.setRangeEnd(l.end),e.lastSetCell=c),t.preventDefault())}))}getCurrentRangeCoords(e,t,n,o,i){const r=e.getTopStartCorner(),s=e.getBottomEndCorner(),a=e.getBottomStartCorner(),l=e.getTopEndCorner();let c={start:null,end:null};switch(n){case"NE-SW":switch(o){case"NE-SW":case"NW-SE":c="top"===i?{start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,r.col)};break;case"SE-NW":"bottom"===i&&(c={start:this.hot._createCellCoords(s.row,t.col),end:this.hot._createCellCoords(t.row,r.col)})}break;case"NW-SE":switch(o){case"NE-SW":"top"===i?c={start:t,end:a}:c.end=t;break;case"NW-SE":"top"===i?c={start:t,end:s}:c.end=t;break;case"SE-NW":"top"===i?c={start:t,end:r}:c.end=t;break;case"SW-NE":"top"===i?c={start:t,end:l}:c.end=t}break;case"SW-NE":switch(o){case"NW-SE":c="bottom"===i?{start:this.hot._createCellCoords(t.row,r.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(r.row,t.col),end:this.hot._createCellCoords(t.row,s.col)};break;case"SW-NE":c="top"===i?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,s.col)}:{start:this.hot._createCellCoords(t.row,r.col),end:this.hot._createCellCoords(r.row,t.col)};break;case"SE-NW":"bottom"===i?c={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(r.row,t.col)}:"top"===i&&(c={start:a,end:t})}break;case"SE-NW":switch(o){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(c.end=t);break;case"SE-NW":"top"===i?c.end=t:c={start:t,end:r}}}return c}isDragged(){return this.dragged.length>0}}var fv=n(50192);function bv(){let{label:e="",colspan:t=1,origColspan:n=1,collapsible:o=!1,crossHiddenColumns:i=[],isCollapsed:r=!1,isHidden:s=!1,isRoot:a=!1,isPlaceholder:l=!1,headerClassNames:c=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:n,collapsible:o,isCollapsed:r,crossHiddenColumns:i,isHidden:s,isRoot:a,isPlaceholder:l,headerClassNames:c}}function vv(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function wv(e,t){return e.get(Cv(e,t))}function yv(e,t,n){return e.set(Cv(e,t),n),n}function Cv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const xv=["label","collapsible"];var Ev=new WeakMap,Sv=new WeakMap,Av=new WeakMap;class kv{constructor(){vv(this,Ev,[]),vv(this,Sv,0),vv(this,Av,1/0)}setColumnsLimit(e){yv(Av,this,e)}setData(){yv(Ev,this,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=[];if(0===t)return n;(0,u.z0)(e,(e=>{const o=[];let i=0;n.push(o),(0,u.z0)(e,(e=>{const n=bv();if((0,s.Gv)(e)){const{label:t,colspan:o,headerClassName:i}=e;n.label=(0,d.As)(t),"number"==typeof o&&o>1&&(n.colspan=o,n.origColspan=o),"string"==typeof i&&(n.headerClassNames=[...i.split(" ")])}else n.label=(0,d.As)(e);i+=n.origColspan;let r=!1;if(i>=t&&(n.colspan=n.origColspan-(i-t),n.origColspan=n.colspan,r=!0),o.push(n),n.colspan>1)for(let e=0;e<n.colspan-1;e++)o.push({label:"",isPlaceholder:!0});return!r}))}));const o=Math.max(...(0,u.YD)(n,(e=>e.length)));return(0,u.z0)(n,(e=>{if(e.length<o){const t=(0,u.YD)(new Array(o-e.length),(()=>bv()));e.splice(e.length,0,...t)}})),n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],wv(Av,this))),yv(Sv,this,wv(Ev,this).length)}getData(){return wv(Ev,this)}mergeWith(e){(0,u.z0)(e,(e=>{let{row:t,col:n,...o}=e;const i=this.getHeaderSettings(t,n);null!==i&&(0,s.X$)(i,o,xv)}))}map(e){(0,u.z0)(wv(Ev,this),(t=>{(0,u.z0)(t,(t=>{const n=e({...t});(0,s.Gv)(n)&&(0,s.X$)(t,n,xv)}))}))}getHeaderSettings(e,t){var n;if(e>=wv(Sv,this)||e<0)return null;const o=wv(Ev,this)[e];return!1===Array.isArray(o)||t>=o.length?null:null!==(n=o[t])&&void 0!==n?n:null}getHeadersSettings(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=[];if(e>=wv(Sv,this)||e<0)return o;const i=wv(Ev,this)[e];let r=0;for(let e=t;e<i.length;e++){const t=i[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(r+=t.colspan,o.push(t),t.colspan>1&&(e+=t.colspan-1),r===n)break;if(r>n)throw new Error("The last column settings cannot overlap the other header layers")}return o}getLayersCount(){return wv(Sv,this)}getColumnsCount(){return wv(Sv,this)>0?wv(Ev,this)[0].length:0}clear(){yv(Ev,this,[]),yv(Sv,this,0)}}function Rv(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Mv="DF-pre-order",Tv=new Map([[Mv,function e(t,n){let o=t.call(n,this);for(let i=0;i<this.childs.length;i++){if(!1===o)return!1;o=e.call(this.childs[i],t,n)}return o}],["DF-post-order",function e(t,n){for(let o=0;o<this.childs.length;o++)if(!1===e.call(this.childs[o],t,n))return!1;return t.call(n,this)}],["BF",function(e,t){const n=[this];!function o(){if(0===n.length)return;const i=n.shift();n.push(...i.childs),!1!==e.call(t,i)&&o()}()}]]);class Iv{constructor(e){Rv(this,"data",{}),Rv(this,"parent",null),Rv(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new Iv({...e.data});for(let n=0;n<e.childs.length;n++)t.addChild(this.cloneTree(e.childs[n]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BF";if(!Tv.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);Tv.get(t).call(this,e,this)}walkUp(e){const t=this,n=o=>{!1!==e.call(t,o)&&null!==o.parent&&n(o.parent)};n(this)}}function Pv(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Ov(e,t){return e.get(Dv(e,t))}function Dv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Nv=new WeakMap,Hv=new WeakMap,Lv=new WeakMap;class $v{constructor(e){var t,n;Pv(this,Nv,new Map),Pv(this,Hv,new Map),Pv(this,Lv,null),n=e,(t=Lv).set(Dv(t,this),n)}getRoots(){return Array.from(Ov(Nv,this).values())}getRootByColumn(e){let t;return Ov(Hv,this).has(e)&&(t=Ov(Nv,this).get(Ov(Hv,this).get(e))),t}getNode(e,t){const n=this.getRootByColumn(t);if(!n)return;const o=t-Ov(Hv,this).get(t);let i,r=0;return n.walkDown((n=>{const{data:{origColspan:s,headerLevel:a}}=n;if(e===a){if(o>=r&&o<=r+s-1)return i=n,i.data.isRoot=t===i.data.columnIndex,!1;r+=s}})),i}rebuildTreeIndex(){let e=0;Ov(Hv,this).clear(),(0,u.z0)(Ov(Nv,this),(t=>{let[,{data:{colspan:n}}]=t;for(let t=e;t<e+n;t++)Ov(Hv,this).set(t,e);e+=n}))}buildTree(){this.clear();const e=Ov(Lv,this).getColumnsCount();let t=0;for(;t<e;){const e=Ov(Lv,this).getHeaderSettings(0,t),n=new Iv;Ov(Nv,this).set(t,n),this.buildLeaves(n,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=Ov(Lv,this).getHeadersSettings(n,t,o);n+=1,(0,u.z0)(i,(o=>{const i={...o,headerLevel:n-1,columnIndex:t};let r;1===n?(e.data=i,r=e):(r=new Iv(i),e.addChild(r)),n<Ov(Lv,this).getLayersCount()&&this.buildLeaves(r,t,n,o.origColspan),t+=o.origColspan}))}clear(){Ov(Nv,this).clear(),Ov(Hv,this).clear()}}function _v(e,t){e.walkDown((e=>{let{data:n,childs:o}=e;if(!n.isHidden&&(t(n.columnIndex),0===o.length))for(let e=1;e<n.colspan;e++)t(n.columnIndex+e)}))}function zv(e,t){let{childs:n}=e;if(0!==n.length)return n[0].data[t]}function Fv(e){return zv(e,"origColspan")===e.data.origColspan}function Bv(e){const{data:t,childs:n}=e;if(!t.isCollapsed||t.isHidden||t.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(Fv(e))return Bv(n[0]);t.isCollapsed=!1;const o=n.slice(1),i=new Set;let r=0;if(o.length>0)(0,u.z0)(o,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;r+=t.colspan,_v(e,(e=>{i.add(e)}))}));else{const{colspan:e,origColspan:n,columnIndex:o}=t;r=n-e;for(let e=1;e<n;e++)i.add(o+e)}return e.walkUp((e=>{const{data:t}=e;t.colspan+=r,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):Fv(e)&&(t.isCollapsed=zv(e,"isCollapsed"))})),{rollbackModification:()=>jv(e),affectedColumns:Array.from(i),colspanCompensation:r}}function jv(e){var t;const{data:n,childs:o}=e;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(Fv(e))return jv(o[0]);n.isCollapsed=!0;const i=o.slice(1),r=new Set;if(i.length>0)(0,u.z0)(i,(e=>{_v(e,(e=>{r.add(e)})),e.data.clonedTree=e.cloneTree(),e.walkDown((e=>{let{data:t}=e;t.isHidden=!0}))}));else{const{origColspan:e,columnIndex:t}=n;for(let n=1;n<e;n++){const e=t+n;r.add(e)}}const s=n.colspan-(null!==(t=zv(e,"colspan"))&&void 0!==t?t:1);return e.walkUp((e=>{const{data:t}=e;t.colspan-=s,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):Fv(e)&&(t.isCollapsed=zv(e,"isCollapsed"))})),{rollbackModification:()=>Bv(e),affectedColumns:Array.from(r),colspanCompensation:s}}const Wv=new Map([["collapse",jv],["expand",Bv],["hide-column",function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(bi.O`The passed node is not the last node on the tree. Only for\x20
  19. the last node, the hide column modification can be applied.`);const{crossHiddenColumns:n}=e.data;if(n.includes(t))return;let o=!1;e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return o=!0,!1})),o||e.walkUp((e=>{const{data:n}=e;n.crossHiddenColumns.push(t),n.colspan>1?n.colspan-=1:n.isHidden=!0}))}],["show-column",function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(bi.O`The passed node is not the last node on the tree. Only for\x20
  20. the last node, the show column modification can be applied.`);const{crossHiddenColumns:n}=e.data;if(!n.includes(t))return;let o=!1;e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return o=!0,!1})),o||e.walkUp((e=>{const{data:n}=e;n.crossHiddenColumns.splice(n.crossHiddenColumns.indexOf(t),1),!n.isHidden&&n.colspan<n.origColspan&&(n.colspan+=1),n.isHidden=!1}))}]]);function Vv(e){const t=[];return(0,u.z0)(e,(e=>{e.walkDown((e=>{const n=e.data,{origColspan:o,columnIndex:i,headerLevel:r,crossHiddenColumns:s}=n,a=function(e,t){let n;return Array.isArray(e[t])?n=e[t]:(n=[],e[t]=n),n}(t,r);let l=!1;for(let e=i;e<i+o;e++)if(s.includes(e)||l)a.push({label:"",isPlaceholder:!0});else{const e=Gv(n);e.isRoot=!0,a.push(e),l=!0}}))})),t}function Gv(e){const{crossHiddenColumns:t,...n}=bv(e);return n}function Kv(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Uv(e,t,n){return e.set(Yv(e,t),n),n}function qv(e,t){return e.get(Yv(e,t))}function Yv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Xv=new WeakMap,Qv=new WeakMap,Jv=new WeakMap;class Zv{constructor(){Kv(this,Xv,new kv),Kv(this,Qv,new $v(qv(Xv,this))),Kv(this,Jv,[[]])}setState(e){qv(Xv,this).setData(e);let t=!1;try{qv(Qv,this).buildTree()}catch(e){qv(Qv,this).clear(),qv(Xv,this).clear(),t=!0}return Uv(Jv,this,Vv(qv(Qv,this).getRoots())),t}setColumnsLimit(e){qv(Xv,this).setColumnsLimit(e)}mergeStateWith(e){const t=(0,u.YD)(e,(e=>{let{row:t,...n}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...n}}));qv(Xv,this).mergeWith(t),qv(Qv,this).buildTree(),Uv(Jv,this,Vv(qv(Qv,this).getRoots()))}mapState(e){qv(Xv,this).map(e),qv(Qv,this).buildTree(),Uv(Jv,this,Vv(qv(Qv,this).getRoots()))}mapNodes(e){return(0,u.mu)(qv(Qv,this).getRoots(),((t,n)=>(n.walkDown((n=>{const o=e(n.data);void 0!==o&&t.push(o)})),t)),[])}triggerNodeModification(e,t,n){t<0&&(t=this.rowCoordsToLevel(t));const o=qv(Qv,this).getNode(t,n);let i;return o&&(i=function(e,t,n){if(!Wv.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return Wv.get(e)(t,n)}(e,o,n),Uv(Jv,this,Vv(qv(Qv,this).getRoots()))),i}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var n,o;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(n=null===(o=qv(Jv,this)[e])||void 0===o?void 0:o[t])&&void 0!==n?n:null}getHeaderTreeNodeData(e,t){const n=this.getHeaderTreeNode(e,t);return n?{...n.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;return qv(Qv,this).getNode(e,t)||null}findTopMostEntireHeaderLevel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=t-e+1;let o=!1,i=null;for(let r=e;r<=t;r++){const s=qv(Qv,this).getRootByColumn(r);if(!s)break;o=!0,s.walkDown((o=>{const{columnIndex:r,headerLevel:s,origColspan:a,isHidden:l}=o.data;l||a<=n&&r>=e&&r+a-1<=t&&(null===i||s<i)&&(i=s)}),Mv)}return o&&null===i?-1:this.levelToRowCoords(null!=i?i:0)}findLeftMostColumnIndex(e,t){var n;const{isRoot:o}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0};if(o)return t;let i=t-1;for(;i>=0;){var r;const{isRoot:t}=null!==(r=this.getHeaderSettings(e,i))&&void 0!==r?r:{isRoot:!0};if(t)break;i-=1}return i}findRightMostColumnIndex(e,t){var n;const{isRoot:o,origColspan:i}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0,origColspan:1};if(o)return t+i-1;let r=t+1;for(;r<this.getColumnsCount();){var s;const{isRoot:t}=null!==(s=this.getHeaderSettings(e,r))&&void 0!==s?s:{isRoot:!0};if(t)break;r+=1}return r-1}getLayersCount(){return qv(Xv,this).getLayersCount()}getColumnsCount(){return qv(Xv,this).getColumnsCount()}clear(){Uv(Jv,this,[]),qv(Xv,this).clear(),qv(Qv,this).clear()}}function ew(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const tw=class{constructor(e,t){ew(this,"hot",void 0),ew(this,"nestedHeaderSettingsGetter",void 0),ew(this,"layersCount",0),ew(this,"container",void 0),ew(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){const e=this.hot.getCurrentThemeName();this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),e&&this.container.classList.add(e),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const t=this.container.querySelectorAll("tr:last-of-type th"),n=t.length;this.widthsMap.clear();for(let e=0;e<n;e++){const n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e),o=this.hot.toPhysicalColumn(n);this.widthsMap.setValueAtIndex(o,t[e].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:n}=this.hot,o=t.createDocumentFragment(),r=t.createElement("table"),s=!!this.hot.getSettings().dropdownMenu,a=n.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const o=t.createElement("tr");for(let r=0;r<a;r++){let a=n.getVisualFromRenderableIndex(r);null===a&&(a=r);const l=t.createElement("th"),c=this.nestedHeaderSettingsGetter(e,a);if(c&&(!c.isPlaceholder||c.isHidden)){let e=c.label;s&&(e+='<button class="changeType"></button>'),(0,i.Mv)(l,e),l.colSpan=c.colspan,o.appendChild(l)}}r.appendChild(o)}o.appendChild(r),e.appendChild(o)}clear(){this.widthsMap.clear(),this.container=null}};function nw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ow(e,t,n){iw(e,t),t.set(e,n)}function iw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rw(e,t,n){return e.set(aw(e,t),n),n}function sw(e,t){return e.get(aw(e,t))}function aw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const lw="nestedHeaders";var cw=new WeakMap,uw=new WeakMap,dw=new WeakMap,hw=new WeakMap,pw=new WeakMap,mw=new WeakSet;class gw extends un{constructor(){var e;super(...arguments),iw(this,e=mw),e.add(this),ow(this,cw,new Zv),ow(this,uw,null),ow(this,dw,null),ow(this,hw,!1),ow(this,pw,null),nw(this,"ghostTable",new tw(this.hot,((e,t)=>this.getHeaderSettings(e,t)))),nw(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return lw}static get PLUGIN_PRIORITY(){return 280}isEnabled(){return!!this.hot.getSettings()[lw]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||(0,Lo.R8)(bi.O`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
  21. passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>aw(mw,this,Ow).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Dw).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,yw).call(e,...n)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Cw).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,xw).call(e,...n)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Ew).call(e,...n)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Sw).call(e,...n)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Aw).call(e,...n)})),this.addHook("afterSelection",(()=>aw(mw,this,fw).call(this))),this.addHook("afterSelectionFocusSet",(()=>aw(mw,this,fw).call(this))),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,bw).call(e,...n)})),this.addHook("afterGetColumnHeaderRenderers",(e=>aw(mw,this,Rw).call(this,e))),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Tw).call(e,...n)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Iw).call(e,...n)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,vw).call(e,...n)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,ww).call(e,...n)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,kw).call(e,...n)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Mw).call(e,...n)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return aw(mw,e,Pw).call(e,...n)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>aw(mw,this,fw).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>aw(mw,this,fw).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();sw(cw,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=sw(cw,this).setState(e)),this.detectedOverlappedHeaders&&(0,Lo.R8)(bi.O`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
  22. is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const n=!0===e?"hide-column":"show-column";sw(cw,this).triggerColumnModification(n,t)})),!sw(uw,this)&&this.enabled&&rw(uw,this,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe((e=>{e.forEach((e=>{let{op:t,index:n,newValue:o}=e;if("replace"===t){const e=!0===o?"hide-column":"show-column";sw(cw,this).triggerColumnModification(e,n)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),sw(cw,this).clear(),sw(uw,this).unsubscribe(),rw(uw,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return sw(cw,this)}getLayersCount(){return sw(cw,this).getLayersCount()}getHeaderSettings(e,t){return sw(cw,this).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,n=e.wtTable.THEAD,o=e.wtOverlays.topOverlay.clone.wtTable.THEAD,r=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let e=0;e<t;e++){const t=n.childNodes[e];if(!t)break;const s=o.childNodes[e],a=r?r.childNodes[e]:null;for(let e=0,n=t.childNodes.length;e<n;e++)t.childNodes[e].removeAttribute("colspan"),(0,i.vy)(t.childNodes[e],"hiddenHeader"),s&&s.childNodes[e]&&(s.childNodes[e].removeAttribute("colspan"),(0,i.vy)(s.childNodes[e],"hiddenHeader")),r&&a&&a.childNodes[e]&&(a.childNodes[e].removeAttribute("colspan"),(0,i.vy)(a.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const n=this.hot.view._wt.getSetting("fixedColumnsStart");return(o,r)=>{var s;const{columnIndexMapper:a,view:l}=this.hot;let c=a.getVisualFromRenderableIndex(o);null===c&&(c=o),r.removeAttribute("colspan"),(0,i.vy)(r,"hiddenHeader"),(0,i.vy)(r,"hiddenHeaderText");const{colspan:u,isHidden:d,isPlaceholder:h,headerClassNames:p}=null!==(s=sw(cw,this).getHeaderSettings(e,c))&&void 0!==s?s:{label:""};if(h||d)(0,i.iQ)(r,"hiddenHeader");else if(u>1){var m,g,f;const{wtOverlays:e}=l._wt,t=null===(m=e.topInlineStartCornerOverlay)||void 0===m?void 0:m.clone.wtTable.THEAD.contains(r),s=null===(g=e.inlineStartOverlay)||void 0===g?void 0:g.clone.wtTable.THEAD.contains(r);(null===(f=e.topOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(r))&&c<n&&(0,i.iQ)(r,"hiddenHeaderText");const a=t||s?Math.min(u,n-o):u;a>1&&r.setAttribute("colspan",a)}if(this.hot.view.appendColHeader(c,r,(function(){return t.getColumnHeaderValue(...arguments)}),e),!h&&!d){const e=r.querySelector("div.relative");e&&p&&p.length>0&&((0,i.vy)(e,this.hot.getColumnMeta(c).headerClassName),(0,i.iQ)(e,p))}}}getColumnHeaderValue(e,t){var n;const{isHidden:o,isPlaceholder:i}=null!==(n=sw(cw,this).getHeaderSettings(t,e))&&void 0!==n?n:{};return i||o?"":this.hot.getColHeader(e,t)}destroy(){rw(cw,this,null),null!==sw(uw,this)&&(sw(uw,this).unsubscribe(),rw(uw,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return sw(cw,this).getHeaderTreeNodeData(e.row,e.col)}}function fw(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:n}=t;if(n.isHeader()&&n.col>=0){const e=sw(cw,this).findLeftMostColumnIndex(n.row,n.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function bw(e,t){var n;const o=this.hot.getSelectedRangeLast();if(!o)return e;const{highlight:i}=o,{navigableHeaders:r}=this.hot.getSettings(),s=this.hot.selection.isSelectedByColumnHeader(),a=r?i.row:null===(n=sw(pw,this))||void 0===n?void 0:n.row,l=s?e:i.col,c=a<0&&l>=0;if(rw(pw,this,null),!c)return e;const u=this.hot.getFirstFullyVisibleColumn(),d=this.hot.getLastFullyVisibleColumn(),h=d-u+1,p=sw(cw,this).findLeftMostColumnIndex(a,l),m=sw(cw,this).findRightMostColumnIndex(a,l),g=m-p+1;if(p<u&&m>d)return p;if(s){let e=null;return p>=u&&m>d?g>h?(t.value="start",e=p):(t.value="end",e=m):p<u&&m<=d&&(g>h?(t.value="end",e=m):(t.value="start",e=p)),e}return p<=u?p:m}function vw(e,t,n){const o=sw(cw,this).getHeaderTreeNodeData(t,e);if(!o)return e;const{columnCursor:i,selectionType:r,selectionWidth:s}=n,{isRoot:a,colspan:l}=sw(cw,this).getHeaderSettings(t,e);if(r===fv.PP){if(!a)return o.columnIndex}else if(r===fv.E6&&(l>s-i||!a))return null;return e}function ww(e,t,n){let{columnHeadersCount:o}=n;if(0!==o)for(let n=0;n<t.length;n++){const{startRow:o,startCol:r,endRow:s,endCol:a}=t[n],l=s-o+1;if(o>=0||1==r-a+1)break;for(let t=r;t<=a;t++)for(let n=o;n<=s;n++){var i;const o=l+n,s=t-r;0!==s&&(!1===(null===(i=sw(cw,this).getHeaderTreeNodeData(n,t))||void 0===i?void 0:i.isRoot)&&(e[o][s]=""))}}}function yw(e,t,n,o){this._getHeaderTreeNodeDataByCoords(t)&&(o.column=!0)}function Cw(e,t){const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;rw(dw,this,t.clone()),rw(hw,this,!0);const{selection:o}=this.hot,i=o.isSelected()?o.getSelectedRange().current():null,s=[],{columnIndex:a,origColspan:l}=n,c=!o.inInSelection(t);e.shiftKey&&i?t.col<i.from.col?s.push(i.getTopEndCorner().col,a,t.row):t.col>i.from.col?s.push(i.getTopStartCorner().col,a+l-1,t.row):s.push(a,a+l-1,t.row):((0,r.Ml)(e)||(0,r.nO)(e)&&c||(0,r.kH)(e))&&s.push(a,a+l-1,t.row),o.selectColumns(...s)}function xw(e,t,n,o){if(!this.hot.view.isMouseDown()||o.column)return;const i=this._getHeaderTreeNodeDataByCoords(t);if(!i)return;const{columnIndex:r,origColspan:s}=i,a=this.hot.getSelectedRangeLast(),l=a.getTopStartCorner(),c=a.getBottomEndCorner(),{from:u}=a;o.column=!0,o.cell=!0;const d=[],h=(0,At.qE)(t.row,-1/0,-1);t.col<u.col?d.push(c.col,r,h):t.col>u.col?d.push(l.col,r+s-1,h):d.push(r,r+s-1,h),this.hot.selection.selectColumns(...d)}function Ew(){rw(hw,this,!1)}function Sw(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!sw(hw,this)||!e)return;const t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner().col,o=t.getBottomEndCorner().col,{columnIndex:i,origColspan:r}=sw(cw,this).getHeaderTreeNodeData(sw(dw,this).row,sw(dw,this).col);if(t.setHighlight(sw(dw,this)),r>t.getWidth()||i<n||i+r-1>o){const e=sw(cw,this).findTopMostEntireHeaderLevel((0,At.qE)(n,i,i+r-1),(0,At.qE)(o,i,i+r-1));t.highlight.row=e,t.highlight.col=t.from.col}}function Aw(e){const{highlight:t}=this.hot.getSelectedRangeLast(),n=this.hot._createCellCoords(t.row+e.row,t.col+e.col);if(!(n.isHeader()&&n.col>=0))return;const o=sw(cw,this).findLeftMostColumnIndex(n.row,n.col),i=sw(cw,this).findRightMostColumnIndex(n.row,n.col);if(e.col<0){const n=t.col>=o&&t.col<=i?o-1:i,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,-1);e.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,t.col)-1,1)}else if(e.col>0){const n=t.col>=o&&t.col<=i?i+1:o,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1);e.col=null===r?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,r)-1,1)}}function kw(e,t,n){const o=e.row,i=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col}),r=this._getHeaderTreeNodeDataByCoords({row:o,col:t.col});rw(pw,this,n.clone()),t.col<e.col?(i&&(e.col=i.columnIndex+i.origColspan-1),r&&(t.col=r.columnIndex)):t.col>=e.col&&(i&&(e.col=i.columnIndex),r&&(t.col=r.columnIndex+r.origColspan-1))}function Rw(e){if(sw(cw,this).getLayersCount()>0){e.length=0;for(let t=0;t<sw(cw,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}}function Mw(e){const t=sw(cw,this).getLayersCount();let n=e.startColumn,o=!!t;for(let i=0;i<t;i++){const t=sw(cw,this).findLeftMostColumnIndex(i,e.startColumn),r=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(o=!1),(0,At.kf)(r)&&r<e.startColumn){n=r;break}}e.startColumn=o?sw(cw,this).getHeaderTreeNodeData(0,n).columnIndex:n}function Tw(e,t){const n=this.ghostTable.getWidth(t);return e>n?e:n}function Iw(e,t,n){var o;const{label:i}=null!==(o=sw(cw,this).getHeaderTreeNodeData(n,t))&&void 0!==o?o:{label:""};return i}function Pw(e,t){if(e<0)return this.hot.getCell(e,sw(cw,this).findLeftMostColumnIndex(e,t),!0)}function Ow(){this.updatePlugin()}function Dw(e,t){t||this.updatePlugin()}function Nw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Hw=class{constructor(e,t){Nw(this,"hot",void 0),Nw(this,"data",null),Nw(this,"plugin",void 0),Nw(this,"parentReference",new WeakMap),Nw(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,At.Ti)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,n){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:n,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,u.z0)(e.__children,(n=>{this.cacheNode(n,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,n,o){let i=!1,r=t;if(isNaN(r)&&r.end)return r;let s=e;return s||(s={__children:this.data},i=!0,r-=1),null!=n&&r===n?{result:s,end:!0}:null!=o&&s===o?{result:r,end:!0}:(r+=1,s.__children&&(0,u.z0)(s.__children,(e=>{if(this.parentReference.set(e,i?null:s),r=this.readTreeNodes(e,r,n,o),isNaN(r)&&r.end)return!1})),r)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,s.v4)(this.data[0],((t,n)=>{e[n]=null})),e}getRowIndex(e){return null==e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const n=this.getRowParent(e);return null==n?this.data.indexOf(t):n.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,n=e;return isNaN(n)||(n=this.getDataObject(n)),n&&n.__children?((0,u.z0)(n.__children,(e=>{t+=1,e.__children&&(t+=this.countChildren(e))})),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"==typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null==e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var n;return(null===(n=e.__children)||void 0===n?void 0:n[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let n=e;return isNaN(n)||(n=this.getDataObject(n)),n&&!!n.__children&&0!==(null===(t=n.__children)||void 0===t?void 0:t.length)}addChild(e,t){let n=t;this.hot.runHooks("beforeAddChild",e,n);let o=null;e&&(o=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",o+this.countChildren(e)+1,1);let i=e;e||(i=this.mockParent()),i.__children||(i.__children=[]),n||(n=this.mockNode()),i.__children.push(n),this.rewriteCache();const r=this.getRowIndex(n);this.hot.rowIndexMapper.insertIndexes(r,1),this.hot.runHooks("afterCreateRow",r,1),this.hot.runHooks("afterAddChild",e,n)}addChildAtIndex(e,t,n){let o,i=n;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",e,i,t),e){const n=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",n,1),e.__children.splice(t,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(n,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",n,1),o=n}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),o=this.getRowIndex(this.data[t]);i=this.getDataObject(o),this.hot.runHooks("afterAddChild",e,i,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const n=this.translateTrimmedRow(e),o=this.getRowParent(n),i=this.getRowIndexWithinParent(n);switch(t){case"below":this.addChildAtIndex(o,i+1,null);break;case"above":this.addChildAtIndex(o,i,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;const o=[];Array.isArray(e)?((0,At.Ti)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);o.push(this.getDataObject(t))})),(0,At.Ti)(0,o.length-2,(e=>{this.detachFromParent(o[e],!1)})),n=o[o.length-1]):n=e;const i=this.getRowIndex(n),r=this.countChildren(n),s=this.getRowIndexWithinParent(n),a=this.getRowParent(n),l=this.getRowParent(a),c=this.getRowIndex(l);let u=null;if(this.hot.runHooks("beforeDetachChild",a,n),null!=s){const e=Array.from(new Array(i+r+1).keys()).splice(-1*(r+1));if(this.hot.runHooks("beforeRemoveRow",i,r+1,e,this.plugin.pluginName),a.__children.splice(s,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,r+1,e,this.plugin.pluginName),l){u=c+this.countChildren(l);const e=this.getChild(l,this.countChildren(l)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,r+1,this.plugin.pluginName),l.__children.push(n)}else u=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",u-2,r+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",u-2,r+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,n,this.getRowIndex(n)),t&&this.hot.render()}filterData(e,t,n){const o=[];(0,u.z0)(n,(e=>{o.push(this.getDataObject(e))})),(0,u.z0)(o,(e=>{const t=this.getRowIndexWithinParent(e),n=this.getRowParent(e);null===n?this.data.splice(t,1):n.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,n){const o=this.getDataObject(e-1);let i=null,r=e;o&&o.__children&&0===o.__children.length?(i=o,r=0):e<this.countAllRows()&&(i=this.getRowParent(e),r=this.getRowIndexWithinParent(e)),i?n?i.__children.splice(r,t,...n):i.__children.splice(r,t):n?this.data.splice(r,t,...n):this.data.splice(r,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,n=t;do{n=this.getRowParent(n),null!==n&&(t=n)}while(null!==n);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,n,o){const i=t===this.hot.countRows(),r=this.getRowParent(e),s=this.getRowIndexWithinParent(e),a=r.__children.slice(s,s+1),l=e>t;let c=i?this.getRowParent(t-1):this.getRowParent(t);null==c&&(c=this.getRowParent(t-1)),null==c&&(c=this.getDataObject(t-1)),c?c.__children||(c.__children=[]):(c=this.getDataObject(t),c.__children=[]);const u=i||n||o?c.__children.length:this.getRowIndexWithinParent(t),d=r===c;c.__children.splice(u,0,a[0]),r.__children.splice(s+(l&&d?1:0),1),this.syncRowWithRawSource(r),d||this.syncRowWithRawSource(c)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}};function Lw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const $w=class{constructor(e,t){Lw(this,"hot",void 0),Lw(this,"plugin",void 0),this.hot=t,this.plugin=e}};class _w extends $w{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const n=this.hot.toPhysicalRow(e),o=this.dataManager.getRowLevel(n),r=this.dataManager.getDataObject(n),s=t.getElementsByTagName("DIV")[0],a=s.querySelector("span.rowHeader"),l=s.querySelectorAll('[class^="ht_nesting"]'),c=this.hot.getSettings().ariaTags;if((0,u.z0)(l,(e=>{e&&s.removeChild(e)})),(0,i.iQ)(t,_w.CSS_CLASSES.indicatorContainer),o){const{rootDocument:e}=this.hot,t=a.cloneNode(!0);s.innerHTML="",(0,At.Ti)(0,o-1,(()=>{const t=e.createElement("SPAN");(0,i.iQ)(t,_w.CSS_CLASSES.emptyIndicator),s.appendChild(t)})),s.appendChild(t)}if(this.dataManager.hasChildren(r)){const e=this.hot.rootDocument.createElement("DIV");c&&(0,i.Bq)(e,[(0,g.MG)()]),(0,i.iQ)(t,_w.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?((0,i.iQ)(e,`${_w.CSS_CLASSES.button} ${_w.CSS_CLASSES.expandButton}`),c&&(0,i.Bq)(t,[(0,g.dV)(!1)])):((0,i.iQ)(e,`${_w.CSS_CLASSES.button} ${_w.CSS_CLASSES.collapseButton}`),c&&(0,i.Bq)(t,[(0,g.dV)(!0)])),s.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount);const n=this.hot.view.getStylesHandler();let o=11;n.isClassicTheme()||(o=2*n.getCSSVariableValue("cell-horizontal-padding")),this.rowHeaderWidthCache=Math.max(50,o+10*t+25),this.hot.render()}}const zw=_w,Fw=class extends $w{constructor(e,t){var n;super(e,t),n=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n.lastCollapsedRows=n.collapsedRows.slice(0),n.expandMultipleChildren(n.lastCollapsedRows,e)},shiftStash:function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,u.z0)(n.lastCollapsedRows,((i,r)=>{i>=e&&i<t&&(n.lastCollapsedRows[r]=i+o)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.collapseMultipleChildren(n.lastCollapsedRows,e),n.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,At.Ti)(e,e+t-1,(e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)}))}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=[];let i=null,r=null,s=null;return isNaN(e)?(i=e,r=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(e),r=e),this.dataManager.hasChildren(i)&&(0,u.z0)(i.__children,(e=>{o.push(this.dataManager.getRowIndex(e))})),s=this.collapseRows(o,!0,!1),n&&this.trimRows(s),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(r)&&this.collapsedRows.push(r),s}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=[];(0,u.z0)(e,(e=>{o.push(...this.collapseChildren(e,!1,!1))})),n&&this.trimRows(o),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];return(0,u.z0)(e,(e=>{o.push(e),t&&this.collapseChildRows(e,o)})),n&&this.trimRows(o),o}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const n=this.dataManager.getDataObject(e);(0,u.z0)(n.__children,(e=>{const n=this.dataManager.getRowIndex(e);t.push(n),this.collapseChildRows(n,t)}))}n&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];return(0,u.z0)(e,(e=>{o.push(e),t&&this.expandChildRows(e,o)})),n&&this.untrimRows(o),o}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const n=this.dataManager.getDataObject(e);(0,u.z0)(n.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const n=this.dataManager.getRowIndex(e);t.push(n),this.expandChildRows(n,t)}}))}n&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=[];let i=null,r=null,s=null;return isNaN(e)?(i=e,r=this.dataManager.getRowIndex(e)):(i=this.dataManager.getDataObject(e),r=e),this.collapsedRows.splice(this.collapsedRows.indexOf(r),1),this.dataManager.hasChildren(i)&&(0,u.z0)(i.__children,(e=>{const t=this.dataManager.getRowIndex(e);o.push(t)})),s=this.expandRows(o,!0,!1),n&&this.untrimRows(s),t&&this.renderAndAdjust(),s}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=[];(0,u.z0)(e,(e=>{o.push(...this.expandChildren(e,!1,!1))})),n&&this.untrimRows(o),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,u.z0)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,u.z0)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,u.z0)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,u.z0)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),n=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,u.z0)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return n=!1,!1})),n}isAnyParentCollapsed(e){let t=e;for(;null!==t;){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const n=this.translateTrimmedRow(t.row);(0,i.nB)(e.target,zw.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),(0,r.CA)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}};var Bw=new WeakMap;const jw=class extends $w{constructor(){var e,t,n;super(...arguments),e=this,t="dataManager",n=this.plugin.dataManager,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Bw,{row_above:(e,t)=>{const n=t[t.length-1];this.dataManager.addSibling(n.start.row,"above")},row_below:(e,t)=>{const n=t[t.length-1];this.dataManager.addSibling(n.start.row,"below")}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(Se.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,At.Ti)(0,e.items.length-1,(n=>{if(0===n)return(0,u.z0)(t,((t,o)=>{e.items.splice(n+o,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,At.Ti)(0,e.items.length-1,(t=>{const n=(o=Bw,i=this,o.get(function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(o,i)))[e.items[t].key];var o,i;null!=n&&(e.items[t].callback=n)})),e}};function Ww(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Vw{constructor(e){Ww(this,"plugin",void 0),Ww(this,"hot",void 0),Ww(this,"dataManager",void 0),Ww(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,n,o){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:n,movePossible:o}))return!1;this.movedToCollapsed=!1;const i=n===this.hot.countRows(),r=i?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(n);let s=!0;const a=e.map((e=>{if(!s)return!1;const t=this.dataManager.translateTrimmedRow(e);return s=this.shouldAllowMoving(t,r),t})),l=-1===a.indexOf(r);if(!s||!l)return!1;const c=this.getBaseParent(a),u=this.getTargetParent(i,r),d=c===u;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(u),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,r,d),this.moveRows(a,r,u),this.dataManager.rewriteCache(),this.moveCellsMeta(a,r),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,n,o,o&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,n),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:n,dropIndex:o,movePossible:i}=e;let r=!1;return(0,d.b0)(o)&&((0,Lo.R8)(bi.O`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
  23. when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,n,o,i,!1),r=!0),r}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let n=this.dataManager.getRowParent(e?t-1:t);return null==n&&(n=this.dataManager.getRowParent(t-1)),n}shiftCollapsibleParentsLocations(e,t,n){n||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,n){const o=t===this.dataManager.getRowIndex(n)+this.dataManager.countChildren(n)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,o)}))}))}moveCellsMeta(e,t){const n=[],o=Math.max(...e)<t;e.forEach((e=>{n.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(o?n.length:0),0,...n)}selectCells(e,t){const n=e.length;let o=0,i=0;if(this.movedToCollapsed){let r=null;r=e[n-1]<t?this.dataManager.translateTrimmedRow(t-n):this.dataManager.translateTrimmedRow(t);const s=this.dataManager.getRowParent(null===r?this.hot.countSourceRows()-1:r-1),a=this.dataManager.getRowIndex(s);o=this.dataManager.untranslateTrimmedRow(a),i=o}else e[n-1]<t?(i=t-1,o=i-n+1):(o=t,i=o+n-1);this.hot.selectCells([[o,0,i,this.hot.countCols()-1]],!1)}isRowOrderChanged(e,t){return e.some(((e,n)=>e-n!==t))}}function Gw(e,t,n){Kw(e,t),t.set(e,n)}function Kw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Uw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qw(e,t){return e.get(Xw(e,t))}function Yw(e,t,n){return e.set(Xw(e,t),n),n}function Xw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Qw="nestedRows",Jw=Qw;var Zw=new WeakMap,ey=new WeakMap,ty=new WeakSet;class ny extends un{constructor(){var e;super(...arguments),Kw(this,e=ty),e.add(this),Uw(this,"dataManager",null),Uw(this,"headersUI",null),Uw(this,"collapsedRowsMap",null),Gw(this,Zw,!1),Gw(this,ey,!1)}static get PLUGIN_KEY(){return Qw}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[Qw]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new Bd.q),this.dataManager=new Hw(this,this.hot),this.collapsingUI=new Fw(this,this.hot),this.headersUI=new zw(this,this.hot),this.contextMenuUI=new jw(this,this.hot),this.rowMoveController=new Vw(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,fy).call(e,...n)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,by).call(e,...n)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,ry).call(e,...n)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,sy).call(e,...n)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,ay).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,iy).call(e,...n)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,uy).call(e,...n)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,cy).call(e,...n)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,dy).call(e,...n)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,hy).call(e,...n)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,py).call(e,...n)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,my).call(e,...n)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,ly).call(e,...n)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,gy).call(e,...n)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xw(ty,e,oy).call(e,...n)})),this.addHook("beforeLoadData",(e=>Xw(ty,this,vy).call(this,e))),this.addHook("beforeUpdateData",(e=>Xw(ty,this,vy).call(this,e))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast(),t=this.collapsingUI.translateTrimmedRow(e.row);return this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.col&&n.row>=0},group:Jw,relativeToGroup:a.b,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Jw)}disableCoreAPIModifiers(){Yw(ey,this,!0)}enableCoreAPIModifiers(){Yw(ey,this,!1)}onModifyRowData(e){if(!qw(ey,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!qw(ey,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,n){return!(!qw(ey,this)&&!this.dataManager.isRowHighestLevel(e)&&(this.dataManager.spliceData(e,t,n),1))}destroy(){super.destroy()}}function oy(e,t,n,o){return this.rowMoveController.onBeforeRowMove(e,t,n,o)}function iy(e,t,n){this.collapsingUI.toggleState(e,t,n)}function ry(e,t,n){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(n[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(n[0],null,-1*t),this.dataManager.filterData(e,t,n),Yw(Zw,this,!0),this.dataManager.getData().slice()}function sy(e){return this.contextMenuUI.appendOptions(e)}function ay(e,t){this.headersUI.appendLevelIndicators(e,t)}function ly(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function cy(e,t,n,o){o!==this.pluginName&&this.hot._registerTimeout((()=>{Yw(Zw,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function uy(e,t,n){const o=Array.from(n.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const n=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(n)&&n.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));n.length=0,n.push(...o)}function dy(){this.collapsingUI.collapsedRowsStash.stash()}function hy(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function py(){this.collapsingUI.collapsedRowsStash.stash()}function my(e,t,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function gy(){this.dataManager.rewriteCache()}function fy(){this.headersUI.updateRowHeaderWidth()}function by(e,t){qw(Zw,this)&&(t.skipRender=!0)}function vy(e){if(!(0,Ku.DJ)(e))return(0,Lo.z3)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[Qw]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}function wy(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yy=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;wy(this,"rootWindow",void 0),wy(this,"prefix",void 0),wy(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const n=void 0===e?t:e,o=this.rootWindow.localStorage.getItem(`${this.prefix}_${n}`);return null===o?void 0:JSON.parse(o)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,u.z0)(this.savedKeys,((e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)})),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}};Ee.R.getSingleton().register("persistentStateSave"),Ee.R.getSingleton().register("persistentStateLoad"),Ee.R.getSingleton().register("persistentStateReset");const Cy="persistentState";class xy extends un{constructor(){var e,t,n;super(...arguments),e=this,n=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="storage"))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}static get PLUGIN_KEY(){return Cy}static get PLUGIN_PRIORITY(){return 0}isEnabled(){return!!this.hot.getSettings()[Cy]}enablePlugin(){this.enabled||(this.storage||(this.storage=new yy(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((e,t)=>this.saveValue(e,t))),this.addHook("persistentStateLoad",((e,t)=>this.loadValue(e,t))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}function Ey(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ay="search",ky=function(e,t,n,o,i){e.getCellMeta(t,n).isSearchResult=i},Ry=function(e,t,n){return!((0,d.b0)(e)||null===e||!e.toLocaleLowerCase||0===e.length||(0,d.b0)(t)||null===t||-1===t.toString().toLocaleLowerCase(n.locale).indexOf(e.toLocaleLowerCase(n.locale)))};var My=new WeakSet;class Ty extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=My),t.add(e),Ey(this,"callback",ky),Ey(this,"queryMethod",Ry),Ey(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return Ay}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return this.hot.getSettings()[Ay]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Ay];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Sy(My,e,Iy).call(e,...n)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Sy(My,e,Iy).call(e,...n)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",t)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const o=this.hot.countRows(),i=this.hot.countCols(),r=[],s=this.hot;return(0,At.Ti)(0,o-1,(o=>{(0,At.Ti)(0,i-1,(i=>{const a=this.hot.getDataAtCell(o,i),l=this.hot.getCellMeta(o,i),c=l.search.callback||t,u=(l.search.queryMethod||n)(e,a,l);if(u){const e={row:o,col:i,data:a};r.push(e)}c&&c(s,o,i,a,u)}))})),r}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){(0,s.Gv)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function Iy(e,t,n,o,i,r){const s=r.className||[];let a=[];"string"==typeof s?a=s.split(" "):a.push(...s),this.isEnabled()&&r.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),r.className=a.join(" ")}function Py(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Oy{constructor(e){Py(this,"viewportWidth",void 0),Py(this,"overwriteColumnWidthFn",void 0),Py(this,"baseWidths",new Map),Py(this,"stretchedWidths",new Map),this.overwriteColumnWidthFn=e}prepare(e){let{viewportWidth:t}=e;this.viewportWidth=t,this.baseWidths.clear(),this.stretchedWidths.clear()}setColumnBaseWidth(e,t){this.baseWidths.set(e,t)}calculate(){}getWidths(){return Array.from(this.stretchedWidths)}}class Dy extends Oy{calculate(){const e=Array.from(this.baseWidths).reduce(((e,t)=>{let[,n]=t;return e+n}),0);if(this.viewportWidth-e<0)return void this.stretchedWidths.clear();const t=this.viewportWidth/e,n=[],o=[];let i=this.viewportWidth,r=0;if(this.baseWidths.forEach(((e,s)=>{const a=Math.round(e*t),l=this.overwriteColumnWidthFn(a,s);a===l&&a>=vn.j?(n.push([s,l]),r+=l):a!==l&&(n.push([s,l]),o.push(s),i-=l)})),i<=vn.j)return void this.stretchedWidths.clear();const s=i/r;let a=-1,l=0;n.forEach(((e,t)=>{let[i,r]=e,c=r;o.includes(i)||(c=Math.round(r*s)),this.stretchedWidths.set(i,c),a=i,t<n.length-1&&(l+=c)})),this.stretchedWidths.size>1&&this.stretchedWidths.set(a,Math.round(this.viewportWidth-l))}}function Ny(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Hy(e,t){return e.get($y(e,t))}function Ly(e,t,n){return e.set($y(e,t),n),n}function $y(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var _y=new WeakMap,zy=new WeakMap;class Fy extends Oy{constructor(){super(...arguments),Ny(this,_y,0),Ny(this,zy,-1)}prepare(e){super.prepare(e),Ly(_y,this,0),Ly(zy,this,-1)}setColumnBaseWidth(e,t){super.setColumnBaseWidth(e,t),Ly(zy,this,e),Ly(_y,this,t)}calculate(){if(-1===Hy(zy,this))return;const e=Array.from(this.baseWidths).reduce(((e,t)=>{let[,n]=t;return e+n}),0),t=Math.max(this.viewportWidth-e+Hy(_y,this),0);this.stretchedWidths.set(Hy(zy,this),t)}}function By(e,t,n){jy(e,t),t.set(e,n)}function jy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wy(e,t){return e.get(Gy(e,t))}function Vy(e,t,n){return e.set(Gy(e,t),n),n}function Gy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ky=new WeakMap,Uy=new WeakMap,qy=new WeakMap,Yy=new WeakMap,Xy=new WeakSet;class Qy{constructor(e){var t;jy(this,t=Xy),t.add(this),By(this,Ky,void 0),By(this,Uy,void 0),By(this,qy,new Map([["all",new Dy(Gy(Xy,this,eC).bind(this))],["last",new Fy(Gy(Xy,this,eC).bind(this))]])),By(this,Yy,"none"),Vy(Ky,this,e),Vy(Uy,this,Wy(Ky,this).columnIndexMapper.createAndRegisterIndexMap("stretchColumns","physicalIndexToValue"))}useStrategy(e){Vy(Yy,this,Wy(qy,this).has(e)?e:"none")}refreshStretching(){"none"!==Wy(Yy,this)?Wy(Ky,this).batchExecution((()=>{Wy(Uy,this).clear();const e=Wy(qy,this).get(Wy(Yy,this));let t=Wy(Ky,this).view.getViewportWidth();Gy(Xy,this,Jy).call(this)&&(t-=(0,i.XJ)(Wy(Ky,this).rootDocument)),e.prepare({viewportWidth:t});for(let t=0;t<Wy(Ky,this).countCols();t++)Wy(Ky,this).columnIndexMapper.isHidden(Wy(Ky,this).toPhysicalColumn(t))||e.setColumnBaseWidth(t,Gy(Xy,this,Zy).call(this,t));e.calculate(),e.getWidths().forEach((e=>{let[t,n]=e;Wy(Uy,this).setValueAtIndex(Wy(Ky,this).toPhysicalColumn(t),n)}))}),!0):Wy(Uy,this).clear()}getStretchedWidth(e){return Wy(Uy,this).getValueAtIndex(Wy(Ky,this).toPhysicalColumn(e))}}function Jy(){const{view:e}=Wy(Ky,this);if(e.isVerticallyScrollableByWindow())return!1;const t=e.getViewportHeight(),n=Wy(Ky,this).countRows(),o=e.getStylesHandler().getDefaultRowHeight();let i=0,r=!1;for(let e=0;e<n;e++){var s;if(i+=(null!==(s=Wy(Ky,this).getRowHeight(e))&&void 0!==s?s:o)+(0===e?1:0),i>t){r=!0;break}}return r}function Zy(e){var t;return null!==(t=Wy(Ky,this).getColWidth(e,"StretchColumns"))&&void 0!==t?t:vn.j}function eC(e,t){return Wy(Ky,this).runHooks("beforeStretchingColumnWidth",e,t)}function tC(e,t,n){nC(e,t),t.set(e,n)}function nC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oC(e,t,n){return e.set(rC(e,t),n),n}function iC(e,t){return e.get(rC(e,t))}function rC(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var sC=new WeakMap,aC=new WeakMap,lC=new WeakMap,cC=new WeakSet;class uC extends un{constructor(){var e;super(...arguments),nC(this,e=cC),e.add(this),tC(this,sC,new Qy(this.hot)),tC(this,aC,null),tC(this,lC,new ResizeObserver((e=>{requestAnimationFrame((()=>{var t;null!==(t=this.hot)&&void 0!==t&&t.view.isHorizontallyScrollableByWindow()&&e.forEach((e=>{let{contentRect:t}=e;null!==iC(aC,this)&&iC(aC,this)!==t.width&&(this.hot.refreshDimensions(),this.hot.view.adjustElementsSize()),oC(aC,this,t.width)}))}))})))}static get PLUGIN_KEY(){return"stretchColumns"}static get PLUGIN_PRIORITY(){return 155}static get SETTING_KEYS(){return!0}isEnabled(){return["all","last"].includes(this.hot.getSettings().stretchH)}enablePlugin(){var e=this;this.enabled||(iC(sC,this).useStrategy(this.hot.getSettings().stretchH),iC(lC,this).observe(this.hot.rootElement),this.addHook("beforeRender",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return rC(cC,e,hC).call(e,...n)})),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return rC(cC,e,dC).call(e,...n)}),10),super.enablePlugin())}updatePlugin(){iC(sC,this).useStrategy(this.hot.getSettings().stretchH),super.updatePlugin()}disablePlugin(){super.disablePlugin(),iC(lC,this).unobserve(this.hot.rootElement)}getColumnWidth(e){return iC(sC,this).getStretchedWidth(e)}destroy(){iC(lC,this).disconnect(),oC(lC,this,null),oC(sC,this,null),super.destroy()}}function dC(e,t,n){if(n===this.pluginName)return;const o=this.getColumnWidth(t);return"number"==typeof o?o:e}function hC(e){e&&iC(sC,this).refreshStretching()}function pC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mC(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var gC=new WeakSet;class fC extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=gC),t.add(e),pC(this,"scrollbars",[]),pC(this,"clones",[]),pC(this,"lockedCollection",!1),pC(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return"touchScroll"}static get PLUGIN_PRIORITY(){return 200}static get SETTING_KEYS(){return!0}isEnabled(){return(0,hn.yd)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>mC(gC,this,bC).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>mC(gC,this,vC).call(this))),this.addHook("afterMomentumScroll",(()=>mC(gC,this,wC).call(this)))}}function bC(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:n,topInlineStartCornerOverlay:o,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(n),o&&this.scrollbars.push(o),i&&i.clone&&this.scrollbars.push(i),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),o&&this.clones.push(o.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function vC(){this.freezeOverlays=!0,(0,u.z0)(this.clones,(e=>{(0,i.iQ)(e,"hide-tween")}))}function wC(){this.freezeOverlays=!1,(0,u.z0)(this.clones,(e=>{(0,i.vy)(e,"hide-tween"),(0,i.iQ)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,u.z0)(this.clones,(e=>{(0,i.vy)(e,"show-tween")}))}),400),(0,u.z0)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}const yC="trimRows";var CC=new WeakSet;class xC extends un{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=CC),t.add(e),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return yC}static get PLUGIN_PRIORITY(){return 330}isEnabled(){return!!this.hot.getSettings()[yC]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new Bd.q),this.trimmedRowsMap.addLocalHook("init",(()=>function(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}(CC,this,EC).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[yC];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,u.z0)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),n=this.isValidConfig(e);let o=t;n&&(o=Array.from(new Set(t.concat(e)))),!1!==this.hot.runHooks("beforeTrimRow",t,o,n)&&(n&&this.hot.batchExecution((()=>{(0,u.z0)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,o,n,n&&o.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),n=this.isValidConfig(e);let o=t;const i=this.trimmedRowsMap.getValues().slice(),r=e.length>0;n&&r&&((0,u.z0)(e,(e=>{i[e]=!1})),o=(0,u.mu)(i,((e,t,n)=>(t&&e.push(n),e)),[])),!1!==this.hot.runHooks("beforeUntrimRow",t,o,n&&r)&&(n&&r&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",t,o,n&&r,n&&o.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}destroy(){super.destroy()}}function EC(){const e=this.hot.getSettings()[yC];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,u.z0)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}class SC{constructor(e){var t,n,o;t=this,o="",(n=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n="actionType"))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,this.actionType=e}undo(){throw new Error("Not implemented")}redo(){throw new Error("Not implemented")}}function AC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class kC extends SC{constructor(e){let{stateBefore:t,range:n,type:o,alignment:i}=e;super("cell_alignment"),AC(this,"stateBefore",void 0),AC(this,"range",void 0),AC(this,"type",void 0),AC(this,"alignment",void 0),this.stateBefore=t,this.range=n,this.type=o,this.alignment=i}static startRegisteringEvents(e,t){e.addHook("beforeCellAlignment",((e,n,o,i)=>{t.done((()=>new kC({stateBefore:e,range:n,type:o,alignment:i})))}))}undo(e,t){(0,u.z0)(this.range,(t=>{t.forAll(((t,n)=>{t>=0&&n>=0&&e.setCellMeta(t,n,"className",this.stateBefore[t][n]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()}redo(e,t){Tr(this.range,this.type,this.alignment,((t,n)=>e.getCellMeta(t,n)),((t,n,o,i)=>e.setCellMeta(t,n,o,i))),e.addHookOnce("afterViewRender",t),e.render()}}function RC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class MC extends SC{constructor(e){let{columns:t,finalIndex:n}=e;super("col_move"),RC(this,"columns",void 0),RC(this,"finalColumnIndex",void 0),this.columns=t.slice(),this.finalColumnIndex=n}static startRegisteringEvents(e,t){e.addHook("beforeColumnMove",((e,n)=>{!1!==e&&t.done((()=>new MC({columns:e,finalIndex:n})))}))}undo(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),Sh(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes()).reverse().forEach((e=>{let{from:t,to:o}=e;t<o&&(o-=1),n.moveColumn(o,t)})),e.render(),e.deselectCell(),e.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)}redo(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),n.moveColumns(this.columns.slice(),this.finalColumnIndex),e.render(),e.deselectCell(),e.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)}}function TC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class IC extends SC{constructor(e){let{currentSortState:t,newSortState:n}=e;super("col_sort"),TC(this,"previousSortState",void 0),TC(this,"nextSortState",void 0),this.previousSortState=t,this.nextSortState=n}static startRegisteringEvents(e,t){e.addHook("beforeColumnSort",((e,n,o)=>{o&&t.done((()=>new IC({currentSortState:e,newSortState:n})))}))}undo(e,t){const n=e.getPlugin("columnSorting"),o=e.getPlugin("multiColumnSorting"),i=o.isEnabled()?o:n;this.previousSortState.length?i.sort(this.previousSortState):i.clearSort(),t()}redo(e,t){const n=e.getPlugin("columnSorting"),o=e.getPlugin("multiColumnSorting");(o.isEnabled()?o:n).sort(this.nextSortState),t()}}function PC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class OC extends SC{constructor(e){let{index:t,amount:n}=e;super("insert_col"),PC(this,"index",void 0),PC(this,"amount",void 0),this.index=t,this.amount=n}static startRegisteringEvents(e,t){e.addHook("afterCreateCol",((e,n,o)=>{t.done((()=>new OC({index:e,amount:n})),o)}))}undo(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")}}function DC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class NC extends SC{constructor(e){let{index:t,amount:n}=e;super("insert_row"),DC(this,"index",void 0),DC(this,"amount",void 0),this.index=t,this.amount=n}static startRegisteringEvents(e,t){e.addHook("afterCreateRow",((e,n,o)=>{t.done((()=>new NC({index:e,amount:n})),o)}))}undo(e,t){const n=e.countRows(),o=e.getSettings().minSpareRows;this.index>=n&&this.index-o<n&&(this.index-=o),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")}}function HC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class LC extends SC{constructor(e){let{changes:t,selected:n,countCols:o,countRows:i}=e;super("change"),HC(this,"changes",void 0),HC(this,"selected",void 0),HC(this,"countCols",void 0),HC(this,"countRows",void 0),this.changes=t,this.selected=n,this.countCols=o,this.countRows=i}static startRegisteringEvents(e,t){e.addHook("beforeChange",(function(n,o){const i=n&&n.length;i&&n.find((e=>{const[,,t,n]=e;return t!==n}))&&t.done((()=>{const t=n.reduce(((e,t)=>(e.push([...t]),e)),[]);t.forEach((t=>{t[1]=e.propToCol(t[1])}));const o=i>1?this.getSelected():[[t[0][0],t[0][1]]];return new LC({changes:t,selected:o,countCols:e.countCols(),countRows:e.countRows()})}),o)}))}undo(e,t){const n=(0,s.Go)(this.changes);for(let e=0,t=n.length;e<t;e++)n[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.undo");const o=e.countRows()-this.countRows;o>0&&e.alter("remove_row",null,o,"UndoRedo.undo");const i=e.countCols()-this.countCols;i>0&&e.isColumnModificationAllowed()&&e.alter("remove_col",null,i,"UndoRedo.undo"),e.scrollToFocusedCell(),e.selectCells(this.selected,!1,!1)}redo(e,t){const n=(0,s.Go)(this.changes);for(let e=0,t=n.length;e<t;e++)n[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)}}function $C(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class _C extends SC{constructor(e){let{conditionsStack:t,previousConditionsStack:n}=e;super("filter"),$C(this,"conditionsStack",void 0),$C(this,"previousConditionsStack",void 0),this.conditionsStack=t,this.previousConditionsStack=n}static startRegisteringEvents(e,t){e.addHook("beforeFilter",((e,n)=>{t.done((()=>new _C({conditionsStack:e,previousConditionsStack:n})))}))}undo(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.importConditions(this.previousConditionsStack),n.filter()}redo(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.importConditions(this.conditionsStack),n.filter()}}class zC extends SC{constructor(e){let{data:t,cellRange:n}=e;var o,i,r;super("merge_cells"),o=this,r=void 0,(i=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(i="cellRange"))in o?Object.defineProperty(o,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[i]=r,this.cellRange=n,this.data=t}static startRegisteringEvents(e,t){e.addHook("beforeMergeCells",((n,o)=>{if(o)return;const i=n.getTopStartCorner(),r=n.getBottomEndCorner(),s=e.getData(i.row,i.col,r.row,r.col);t.done((()=>new zC({data:s,cellRange:n})))}))}undo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.unmergeRange(this.cellRange,!0);const o=this.cellRange.getTopStartCorner();e.populateFromArray(o.row,o.col,this.data,void 0,void 0,"MergeCells")}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange)}}function FC(e,t,n,o,i){const r=["visualRow","visualCol","row","col","prop"],s=r.length,a=[];return(0,At.Ti)(o,i,(o=>{(0,At.Ti)(t,n,(t=>{const n=e.getCellMeta(t,o);if(Object.keys(n).length!==s){const e=Object.fromEntries(Object.entries(n).filter((e=>{let[t]=e;return!1===r.includes(t)})));a.push([n.visualRow,n.visualCol,e])}}))})),a}function BC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(53921);class jC extends SC{constructor(e){let{index:t,indexes:n,data:o,amount:i,headers:r,columnPositions:s,rowPositions:a,fixedColumnsStart:l,removedCellMetas:c}=e;super("remove_col"),BC(this,"index",void 0),BC(this,"indexes",void 0),BC(this,"data",void 0),BC(this,"amount",void 0),BC(this,"headers",void 0),BC(this,"columnPositions",void 0),BC(this,"rowPositions",void 0),BC(this,"fixedColumnsStart",void 0),BC(this,"removedCellMetas",void 0),this.index=t,this.indexes=n,this.data=o,this.amount=i,this.headers=r,this.columnPositions=s.slice(0),this.rowPositions=a.slice(0),this.fixedColumnsStart=l,this.removedCellMetas=c}static startRegisteringEvents(e,t){e.addHook("beforeRemoveCol",((n,o,i,r)=>{t.done((()=>{const t=e.getSourceDataArray(),i=(e.countCols()+n)%e.countCols(),r=i+o-1,s=[],a=[],l=[];return(0,At.Ti)(t.length-1,(n=>{const o=[],a=t[n];(0,At.Ti)(i,r,(t=>{o.push(a[e.toPhysicalColumn(t)])})),s.push(o)})),(0,At.Ti)(o-1,(t=>{l.push(e.toPhysicalColumn(i+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,At.Ti)(o-1,(t=>{a.push(e.getSettings().colHeaders[e.toPhysicalColumn(i+t)]||null)})),new jC({index:i,indexes:l,data:s,amount:o,headers:a,columnPositions:e.columnIndexMapper.getIndexesSequence(),rowPositions:e.rowIndexMapper.getIndexesSequence(),fixedColumnsStart:e.getSettings().fixedColumnsStart,removedCellMetas:FC(e,0,e.countRows(),i,r)})}),r)}))}undo(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const n=this.indexes.slice(0).sort(),o=(e,t,o)=>o[this.indexes.indexOf(n[t])],i=this.data.length,r=[];for(let e=0;e<i;e++)r.push((0,u.YD)(this.data[e],o));const s=(0,u.YD)(this.headers,o),a=[];e.columnIndexMapper.setIndexesSequence(this.columnPositions),e.alter("insert_col_start",e.toVisualColumn(this.indexes[0]),this.indexes.length,"UndoRedo.undo"),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),(0,u.z0)(e.getSourceDataArray(),((e,t)=>{(0,u.z0)(n,((n,o)=>{e[n]=r[t][o],a.push([t,n,e[n]])}))})),void 0!==this.headers&&(0,u.z0)(s,((t,o)=>{e.getSettings().colHeaders[n[o]]=t})),this.removedCellMetas.forEach((t=>{let[n,o,i]=t;e.setCellMetaObject(n,o,i)})),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(a,null,null,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")}}function WC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class VC extends SC{constructor(e){let{index:t,data:n,fixedRowsBottom:o,fixedRowsTop:i,rowIndexesSequence:r,removedCellMetas:s}=e;super("remove_row"),WC(this,"index",void 0),WC(this,"data",void 0),WC(this,"fixedRowsBottom",void 0),WC(this,"fixedRowsTop",void 0),WC(this,"rowIndexesSequence",void 0),WC(this,"removedCellMetas",void 0),this.index=t,this.data=n,this.fixedRowsBottom=o,this.fixedRowsTop=i,this.rowIndexesSequence=r,this.removedCellMetas=s}static startRegisteringEvents(e,t){e.addHook("beforeRemoveRow",((n,o,i,r)=>{t.done((()=>{const t=e.toPhysicalRow(n),i=t+o-1,r=(0,s.Go)(e.getSourceData(t,0,t+o-1,e.countSourceCols()-1));return new VC({index:t,data:r,fixedRowsBottom:e.getSettings().fixedRowsBottom,fixedRowsTop:e.getSettings().fixedRowsTop,rowIndexesSequence:e.rowIndexMapper.getIndexesSequence(),removedCellMetas:FC(e,t,i,0,e.countCols()-1)})}),r)}))}undo(e,t){const n=e.getSettings(),o=[];n.fixedRowsBottom=this.fixedRowsBottom,n.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((n=>{const i=parseInt(n,10);o.push([this.index+t,isNaN(i)?n:i,e[n]])}))})),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),e.alter("insert_row_above",e.toVisualRow(this.index),this.data.length,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),this.removedCellMetas.forEach((t=>{let[n,o,i]=t;e.setCellMetaObject(n,o,i)})),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(o,null,null,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",e.toVisualRow(this.index),this.data.length,"UndoRedo.redo")}}function GC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class KC extends SC{constructor(e){let{rows:t,finalIndex:n}=e;super("row_move"),GC(this,"rows",void 0),GC(this,"finalRowIndex",void 0),this.rows=t.slice(),this.finalRowIndex=n}static startRegisteringEvents(e,t){e.addHook("beforeRowMove",((e,n)=>{!1!==e&&t.done((()=>new KC({rows:e,finalIndex:n})))}))}undo(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),Sh(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes()).reverse().forEach((e=>{let{from:t,to:o}=e;t<o&&(o-=1),n.moveRow(o,t)})),e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)}redo(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),n.moveRows(this.rows.slice(),this.finalRowIndex),e.render(),e.deselectCell(),e.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)}}class UC extends SC{constructor(e){let{cellRange:t}=e;var n,o,i;super("unmerge_cells"),n=this,i=void 0,(o=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(o="cellRange"))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,this.cellRange=t}static startRegisteringEvents(e,t){e.addHook("afterUnmergeCells",((e,n)=>{n||t.done((()=>new UC({cellRange:e})))}))}undo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange,!0)}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.unmergeRange(this.cellRange,!0),e.render()}}function qC(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YC(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const XC="undoRedo";Ee.R.getSingleton().register("beforeUndo"),Ee.R.getSingleton().register("afterUndo"),Ee.R.getSingleton().register("beforeRedo"),Ee.R.getSingleton().register("afterRedo");const QC=new Set;var JC=new WeakSet;class ZC extends un{static get PLUGIN_KEY(){return"undoRedo"}static get PLUGIN_PRIORITY(){return 1e3}static get SETTING_KEYS(){return!0}constructor(e){var t,n,o,i;super(e),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,i=JC),i.add(o),qC(this,"doneActions",[]),qC(this,"undoneActions",[]),qC(this,"ignoreNewActions",!1),t=e,n=this,[kC,MC,IC,OC,NC,LC,_C,zC,jC,VC,KC,UC].forEach((e=>e.startRegisteringEvents(t,n)))}isEnabled(){return!!this.hot.getSettings().undo}enablePlugin(){var e=this;this.enabled||(this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YC(JC,e,ex).call(e,...n)})),this.registerShortcuts(),YC(JC,this,tx).call(this),super.enablePlugin())}disablePlugin(){super.disablePlugin(),this.clear(),this.unregisterShortcuts(),YC(JC,this,nx).call(this)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:XC};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(XC)}done(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const n=this.doneActions.slice();if(!1===this.hot.runHooks("beforeUndoStackChange",n,t))return;const o=e(),i=this.undoneActions.slice();this.doneActions.push(o),this.hot.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.hot.runHooks("beforeRedoStackChange",i),this.undoneActions.length=0,this.hot.runHooks("afterRedoStackChange",i,this.undoneActions.slice())}undo(){if(!this.isUndoAvailable())return;const e=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.hot.runHooks("afterUndoStackChange",e,this.doneActions.slice());const n=(0,s.Go)(t);if(!1===this.hot.runHooks("beforeUndo",n))return;this.ignoreNewActions=!0;const o=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",o),t.undo(this.hot,(()=>{this.ignoreNewActions=!1,this.undoneActions.push(t)})),this.hot.runHooks("afterRedoStackChange",o,this.undoneActions.slice()),this.hot.runHooks("afterUndo",n)}redo(){if(!this.isRedoAvailable())return;const e=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.hot.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const n=(0,s.Go)(t);if(!1===this.hot.runHooks("beforeRedo",n))return;this.ignoreNewActions=!0;const o=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",o),t.redo(this.hot,(()=>{this.ignoreNewActions=!1,this.doneActions.push(t)})),this.hot.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.hot.runHooks("afterRedo",n)}isUndoAvailable(){return this.doneActions.length>0}isRedoAvailable(){return this.undoneActions.length>0}clear(){this.doneActions.length=0,this.undoneActions.length=0}destroy(){this.clear(),this.doneActions=null,this.undoneActions=null,super.destroy()}}function ex(e,t){"loadData"===t&&this.clear()}function tx(){const e=e=>{QC.has(e)||((0,Lo.R8)(bi.O`The "${e}" method is deprecated and it will be removed\x20
  24. from the Core API in the future. Please use the method from the UndoRedo plugin\x20
  25. (e.g. \`hotInstance.getPlugin("undoRedo").${e}()\`).`),QC.add(e))};this.hot.undo=()=>{e("undo"),this.undo()},this.hot.redo=()=>{e("redo"),this.redo()},this.hot.isUndoAvailable=()=>(e("isUndoAvailable"),this.isUndoAvailable()),this.hot.isRedoAvailable=()=>(e("isRedoAvailable"),this.isRedoAvailable()),this.hot.clearUndo=()=>{e("clear"),this.clear()},this.hot.undoRedo=this}function nx(){delete this.hot.undo,delete this.hot.redo,delete this.hot.isUndoAvailable,delete this.hot.isRedoAvailable,delete this.hot.clearUndo,delete this.hot.undoRedo}function ox(){(0,be.VA)(R.b7),(0,be.VA)(A),(0,be.VA)(M),(0,be.VA)(ae),(0,be.VA)(ce),(0,be.VA)(c),(0,be.VA)(ue),(0,be.VA)(he),(0,be.VA)(ge),(0,be.VA)(o.t),(0,be.VA)(fe),(0,Pt.TS)(Ce),(0,Pt.TS)(ve.j),(0,Pt.TS)(Oe),(0,Pt.TS)(xe),(0,Pt.TS)(Ne),(0,Pt.TS)(we),(0,Pt.TS)(Rt),(0,Pt.TS)(Mt),(0,Pt.TS)(Tt),(0,Pt.TS)(m.F),(0,Pt.TS)(It),(0,zt.qV)(Ot),(0,zt.qV)(Ht),(0,zt.qV)(Nt),(0,zt.qV)(Lt),(0,zt.qV)(_t),(0,Qt.Gk)(Ft),(0,Qt.Gk)(Bt),(0,Qt.Gk)(Wt),(0,Qt.Gk)(Vt),(0,Qt.Gk)(Gt),(0,Qt.Gk)(Kt),(0,Qt.Gk)(Ut),(0,Qt.Gk)(qt),(0,Qt.Gk)(Yt.Y),(0,Qt.Gk)(Xt),(0,Jt.F3)(Pn),(0,Jt.F3)(Un),(0,Jt.F3)(co),(0,Jt.F3)(No),(0,Jt.F3)(Yo),(0,Jt.F3)($i),(0,Jt.F3)(qi),(0,Jt.F3)(Jr),(0,Jt.F3)(ua),(0,Jt.F3)(Za),(0,Jt.F3)(Sl),(0,Jt.F3)(Pl),(0,Jt.F3)(jl),(0,Jt.F3)(bc),(0,Jt.F3)(eh),(0,Jt.F3)(lp),(0,Jt.F3)(jp),(0,Jt.F3)(nm),(0,Jt.F3)(fm),(0,Jt.F3)(Km),(0,Jt.F3)(Eg),(0,Jt.F3)(tf),(0,Jt.F3)(Df),(0,Jt.F3)($b),(0,Jt.F3)(pv),(0,Jt.F3)(gv),(0,Jt.F3)(gw),(0,Jt.F3)(ny),(0,Jt.F3)(xy),(0,Jt.F3)(Ty),(0,Jt.F3)(uC),(0,Jt.F3)(fC),(0,Jt.F3)(xC),(0,Jt.F3)(ZC)}},37786:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var o=n(96540),i=n(34164),r=n(21362),s=n(26739),a=n(39241),l=n(20439),c=n(96148),u=n(1908);function d(e){return(0,u.Ay)("MuiAccordionDetails",e)}(0,c.A)("MuiAccordionDetails",["root"]);var h=n(74848);const p=(0,s.Ay)("div",{name:"MuiAccordionDetails",slot:"Root"})((0,a.A)((({theme:e})=>({padding:e.spacing(1,2,2)})))),m=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiAccordionDetails"}),{className:o,...s}=n,a=n,c=(e=>{const{classes:t}=e;return(0,r.A)({root:["root"]},d,t)})(a);return(0,h.jsx)(p,{className:(0,i.A)(c.root,o),ref:t,ownerState:a,...s})}))},38221:(e,t,n)=>{var o=n(23805),i=n(10124),r=n(99374),s=Math.max,a=Math.min;e.exports=function(e,t,n){var l,c,u,d,h,p,m=0,g=!1,f=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=l,o=c;return l=c=void 0,m=t,d=e.apply(o,n)}function w(e){var n=e-p;return void 0===p||n>=t||n<0||f&&e-m>=u}function y(){var e=i();if(w(e))return C(e);h=setTimeout(y,function(e){var n=t-(e-p);return f?a(n,u-(e-m)):n}(e))}function C(e){return h=void 0,b&&l?v(e):(l=c=void 0,d)}function x(){var e=i(),n=w(e);if(l=arguments,c=this,p=e,n){if(void 0===h)return function(e){return m=e,h=setTimeout(y,t),g?v(e):d}(p);if(f)return clearTimeout(h),h=setTimeout(y,t),v(p)}return void 0===h&&(h=setTimeout(y,t)),d}return t=r(t)||0,o(n)&&(g=!!n.leading,u=(f="maxWait"in n)?s(r(n.maxWait)||0,t):u,b="trailing"in n?!!n.trailing:b),x.cancel=function(){void 0!==h&&clearTimeout(h),m=0,l=p=c=h=void 0},x.flush=function(){return void 0===h?d:C(i())},x}},39319:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>v,Is:()=>m});var o=n(96540),i=n(77132);const r="5.26.1";var s=n(49806),a=n(15265),l=n(50723),c=n(2616),u=n(85045),d=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};function h(e){const{override:t}=e,n=d(e,["override"]),o=Object.assign({},t);Object.keys(l.A).forEach((e=>{delete o[e]}));const i=Object.assign(Object.assign({},n),o);if(!1===i.motion){const e="0s";i.motionDurationFast=e,i.motionDurationMid=e,i.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:(0,u.A)(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:(0,u.A)(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:(0,u.A)(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:3*i.lineWidth,lineWidth:i.lineWidth,controlOutlineWidth:2*i.lineWidth,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:(0,u.A)(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:1200,screenXLMin:1200,screenXLMax:1599,screenXXL:1600,screenXXLMin:1600,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`\n 0 1px 2px -2px ${new c.Y("rgba(0, 0, 0, 0.16)").toRgbString()},\n 0 3px 6px 0 ${new c.Y("rgba(0, 0, 0, 0.12)").toRgbString()},\n 0 5px 12px 4px ${new c.Y("rgba(0, 0, 0, 0.09)").toRgbString()}\n `,boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),o)}var p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};const m={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},g={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},f={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},b=(e,t,n)=>{const o=n.getDerivativeToken(e),{override:i}=t,r=p(t,["override"]);let s=Object.assign(Object.assign({},o),{override:i});return s=h(s),r&&Object.entries(r).forEach((([e,t])=>{const{theme:n}=t,o=p(t,["theme"]);let i=o;n&&(i=b(Object.assign(Object.assign({},s),o),{override:o},n)),s[e]=i})),s};function v(){const{token:e,hashed:t,theme:n,override:c,cssVar:u}=o.useContext(s.vG),d=`${r}-${t||""}`,p=n||a.A,[v,w,y]=(0,i.hV)(p,[l.A,e],{salt:d,override:c,getComputedToken:b,formatToken:h,cssVar:u&&{prefix:u.prefix,key:u.key,unitless:m,ignore:g,preserve:f}});return[p,y,t?w:"",v,u]}},40346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},41519:(e,t,n)=>{"use strict";n.d(t,{j:()=>c});var o=n(58168),i=n(3576),r=n(96540),s=n(29677),a=n(29401),l=n(81326);const c=({store:e,params:t})=>{const n=t=>{(null===t||(0,l.pF)(e.value,t))&&e.update((e=>(0,o.A)({},e,{label:(0,o.A)({},e.label,{editedItemId:t})})))},r=(n,i)=>{if(!i)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","The label of an item cannot be empty.",n].join("\n"));e.update((e=>{const t=e.items.itemMetaLookup[n];return t.label!==i?(0,o.A)({},e,{items:(0,o.A)({},e.items,{itemMetaLookup:(0,o.A)({},e.items.itemMetaLookup,{[n]:(0,o.A)({},t,{label:i})})})}):e})),t.onItemLabelChange&&t.onItemLabelChange(n,i)};return(0,i.A)((()=>{e.update((e=>(0,o.A)({},e,{label:(0,o.A)({},e.label,{isItemEditable:t.isItemEditable})})))}),[e,t.isItemEditable]),{instance:{setEditedItem:n,updateItemLabel:r},publicAPI:{setEditedItem:n,updateItemLabel:r}}};c.itemPlugin=({props:e})=>{const{store:t}=(0,s.i)(),{label:n,itemId:o}=e,[i,c]=r.useState(n),u=(0,a.d)(t,l.pF,o),d=(0,a.d)(t,l.XG,o);return r.useEffect((()=>{d||c(n)}),[d,n]),{propsEnhancers:{label:()=>({editable:u}),labelInput:({externalEventHandlers:e,interactions:t})=>u?{value:i??"","data-element":"labelInput",onChange:t=>{e.onChange?.(t),c(t.target.value)},onKeyDown:n=>{if(e.onKeyDown?.(n),n.defaultMuiPrevented)return;const o=n.target;"Enter"===n.key&&o.value?t.handleSaveItemLabel(n,o.value):"Escape"===n.key&&t.handleCancelItemLabelEditing(n)},onBlur:n=>{e.onBlur?.(n),n.defaultMuiPrevented||n.target.value&&t.handleSaveItemLabel(n,n.target.value)},autoFocus:!0,type:"text"}:{}}}},c.applyDefaultValuesToParams=({params:e})=>(0,o.A)({},e,{isItemEditable:e.isItemEditable??!1}),c.getInitialState=e=>({label:{isItemEditable:e.isItemEditable,editedItemId:null}}),c.params={onItemLabelChange:!0,isItemEditable:!0}},41702:(e,t,n)=>{"use strict";var o=n(24994).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(83009));t.default=i.default},42030:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var o=n(96540),i=n(34164),r=n(37353),s=n(32350),a=n(21362),l=n(26739),c=n(53356),u=n(39241),d=n(20439),h=n(21234),p=n(24337),m=n(30301),g=n(96148),f=n(1908);function b(e){return(0,f.Ay)("MuiCollapse",e)}(0,g.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var v=n(74848);const w=(0,l.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((0,u.A)((({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>"exited"===e.state&&!e.in&&"0px"===e.collapsedSize,style:{visibility:"hidden"}}]})))),y=(0,l.Ay)("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),C=(0,l.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),x=o.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiCollapse"}),{addEndListener:l,children:u,className:g,collapsedSize:f="0px",component:x,easing:E,in:S,onEnter:A,onEntered:k,onEntering:R,onExit:M,onExited:T,onExiting:I,orientation:P="vertical",style:O,timeout:D=h.p0.standard,TransitionComponent:N=r.Ay,...H}=n,L={...n,orientation:P,collapsedSize:f},$=(e=>{const{orientation:t,classes:n}=e,o={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,a.A)(o,b,n)})(L),_=(0,c.A)(),z=(0,s.A)(),F=o.useRef(null),B=o.useRef(),j="number"==typeof f?`${f}px`:f,W="horizontal"===P,V=W?"width":"height",G=o.useRef(null),K=(0,m.A)(t,G),U=e=>t=>{if(e){const n=G.current;void 0===t?e(n):e(n,t)}},q=()=>F.current?F.current[W?"clientWidth":"clientHeight"]:0,Y=U(((e,t)=>{F.current&&W&&(F.current.style.position="absolute"),e.style[V]=j,A&&A(e,t)})),X=U(((e,t)=>{const n=q();F.current&&W&&(F.current.style.position="");const{duration:o,easing:i}=(0,p.c)({style:O,timeout:D,easing:E},{mode:"enter"});if("auto"===D){const t=_.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,B.current=t}else e.style.transitionDuration="string"==typeof o?o:`${o}ms`;e.style[V]=`${n}px`,e.style.transitionTimingFunction=i,R&&R(e,t)})),Q=U(((e,t)=>{e.style[V]="auto",k&&k(e,t)})),J=U((e=>{e.style[V]=`${q()}px`,M&&M(e)})),Z=U(T),ee=U((e=>{const t=q(),{duration:n,easing:o}=(0,p.c)({style:O,timeout:D,easing:E},{mode:"exit"});if("auto"===D){const n=_.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,B.current=n}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[V]=j,e.style.transitionTimingFunction=o,I&&I(e)}));return(0,v.jsx)(N,{in:S,onEnter:Y,onEntered:Q,onEntering:X,onExit:J,onExited:Z,onExiting:ee,addEndListener:e=>{"auto"===D&&z.start(B.current||0,e),l&&l(G.current,e)},nodeRef:G,timeout:"auto"===D?null:D,...H,children:(e,{ownerState:t,...n})=>(0,v.jsx)(w,{as:x,className:(0,i.A)($.root,g,{entered:$.entered,exited:!S&&"0px"===j&&$.hidden}[e]),style:{[W?"minWidth":"minHeight"]:j,...O},ref:K,ownerState:{...L,state:e},...n,children:(0,v.jsx)(y,{ownerState:{...L,state:e},className:$.wrapper,ref:F,children:(0,v.jsx)(C,{ownerState:{...L,state:e},className:$.wrapperInner,children:u})})})})}));x&&(x.muiSupportAuto=!0);const E=x},42049:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});const o=n(96540).createContext((()=>-1))},43145:(e,t,n)=>{"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}n.d(t,{A:()=>o})},43210:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(82284),i=n(68210);const r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=r.has(t);if((0,i.Ay)(!l,"Warning: There may be circular references"),l)return!1;if(t===s)return!0;if(n&&a>1)return!1;r.add(t);var c=a+1;if(Array.isArray(t)){if(!Array.isArray(s)||t.length!==s.length)return!1;for(var u=0;u<t.length;u++)if(!e(t[u],s[u],c))return!1;return!0}if(t&&s&&"object"===(0,o.A)(t)&&"object"===(0,o.A)(s)){var d=Object.keys(t);return d.length===Object.keys(s).length&&d.every((function(n){return e(t[n],s[n],c)}))}return!1}(e,t)}},43693:(e,t,n)=>{var o=n(77736);e.exports=function(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},44394:(e,t,n)=>{var o=n(72552),i=n(40346);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==o(e)}},45748:(e,t,n)=>{"use strict";n.d(t,{z1:()=>A,cM:()=>g,UA:()=>I,uy:()=>f});var o=n(2616),i=2,r=.16,s=.05,a=.05,l=.15,c=5,u=4,d=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function h(e,t,n){var o;return(o=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-i*t:Math.round(e.h)+i*t:n?Math.round(e.h)+i*t:Math.round(e.h)-i*t)<0?o+=360:o>=360&&(o-=360),o}function p(e,t,n){return 0===e.h&&0===e.s?e.s:((o=n?e.s-r*t:t===u?e.s+r:e.s+s*t)>1&&(o=1),n&&t===c&&o>.1&&(o=.1),o<.06&&(o=.06),Math.round(100*o)/100);var o}function m(e,t,n){var o;return o=n?e.v+a*t:e.v-l*t,o=Math.max(0,Math.min(1,o)),Math.round(100*o)/100}function g(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],i=new o.Y(e),r=i.toHsv(),s=c;s>0;s-=1){var a=new o.Y({h:h(r,s,!0),s:p(r,s,!0),v:m(r,s,!0)});n.push(a)}n.push(i);for(var l=1;l<=u;l+=1){var g=new o.Y({h:h(r,l),s:p(r,l),v:m(r,l)});n.push(g)}return"dark"===t.theme?d.map((function(e){var i=e.index,r=e.amount;return new o.Y(t.backgroundColor||"#141414").mix(n[i],r).toHexString()})):n.map((function(e){return e.toHexString()}))}var f={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},b=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];b.primary=b[5];var v=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];v.primary=v[5];var w=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];w.primary=w[5];var y=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];y.primary=y[5];var C=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];C.primary=C[5];var x=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];x.primary=x[5];var E=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];E.primary=E[5];var S=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];S.primary=S[5];var A=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];A.primary=A[5];var k=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];k.primary=k[5];var R=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];R.primary=R[5];var M=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];M.primary=M[5];var T=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];T.primary=T[5];var I={red:b,volcano:v,orange:w,gold:y,yellow:C,lime:x,green:E,cyan:S,blue:A,geekblue:k,purple:R,magenta:M,grey:T},P=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];P.primary=P[5];var O=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];O.primary=O[5];var D=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];D.primary=D[5];var N=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];N.primary=N[5];var H=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];H.primary=H[5];var L=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];L.primary=L[5];var $=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];$.primary=$[5];var _=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];_.primary=_[5];var z=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];z.primary=z[5];var F=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];F.primary=F[5];var B=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];B.primary=B[5];var j=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];j.primary=j[5];var W=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];W.primary=W[5]},46942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},47510:(e,t,n)=>{"use strict";n.d(t,{K:()=>je});var o=n(58168),i=n(98587),r=n(96540),s=n(34164),a=n(21362),l=n(82777),c=n(26739),u=n(39241),d=n(20439),h=n(85078),p=n(39407),m=n(1321),g=n(49565),f=n(96148),b=n(1908);function v(e){return(0,b.Ay)("MuiAlert",e)}const w=(0,f.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var y=n(37768),C=n(9792),x=n(74848);const E=(0,C.A)((0,x.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),S=(0,C.A)((0,x.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),A=(0,C.A)((0,x.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),k=(0,C.A)((0,x.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");var R=n(37523);const M=(0,c.Ay)(g.A,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,p.A)(n.color||n.severity)}`]]}})((0,u.A)((({theme:e})=>{const t="light"===e.palette.mode?l.e$:l.a,n="light"===e.palette.mode?l.a:l.e$;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter((0,m.A)(["light"])).map((([o])=>({props:{colorSeverity:o,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${o}Color`]:t(e.palette[o].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${o}StandardBg`]:n(e.palette[o].light,.9),[`& .${w.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}}}))),...Object.entries(e.palette).filter((0,m.A)(["light"])).map((([n])=>({props:{colorSeverity:n,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${w.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}}))),...Object.entries(e.palette).filter((0,m.A)(["dark"])).map((([t])=>({props:{colorSeverity:t,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}})))]}}))),T=(0,c.Ay)("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),I=(0,c.Ay)("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),P=(0,c.Ay)("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),O={success:(0,x.jsx)(E,{fontSize:"inherit"}),warning:(0,x.jsx)(S,{fontSize:"inherit"}),error:(0,x.jsx)(A,{fontSize:"inherit"}),info:(0,x.jsx)(k,{fontSize:"inherit"})},D=r.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiAlert"}),{action:o,children:i,className:r,closeText:l="Close",color:c,components:u={},componentsProps:m={},icon:g,iconMapping:f=O,onClose:b,role:w="alert",severity:C="success",slotProps:E={},slots:S={},variant:A="standard",...k}=n,D={...n,color:c,severity:C,variant:A,colorSeverity:c||C},N=(e=>{const{variant:t,color:n,severity:o,classes:i}=e,r={root:["root",`color${(0,p.A)(n||o)}`,`${t}${(0,p.A)(n||o)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,a.A)(r,v,i)})(D),H={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...S},slotProps:{...m,...E}},[L,$]=(0,h.A)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,s.A)(N.root,r),elementType:M,externalForwardedProps:{...H,...k},ownerState:D,additionalProps:{role:w,elevation:0}}),[_,z]=(0,h.A)("icon",{className:N.icon,elementType:T,externalForwardedProps:H,ownerState:D}),[F,B]=(0,h.A)("message",{className:N.message,elementType:I,externalForwardedProps:H,ownerState:D}),[j,W]=(0,h.A)("action",{className:N.action,elementType:P,externalForwardedProps:H,ownerState:D}),[V,G]=(0,h.A)("closeButton",{elementType:y.A,externalForwardedProps:H,ownerState:D}),[K,U]=(0,h.A)("closeIcon",{elementType:R.A,externalForwardedProps:H,ownerState:D});return(0,x.jsxs)(L,{...$,children:[!1!==g?(0,x.jsx)(_,{...z,children:g||f[C]||O[C]}):null,(0,x.jsx)(F,{...B,children:i}),null!=o?(0,x.jsx)(j,{...W,children:o}):null,null==o&&b?(0,x.jsx)(j,{...W,children:(0,x.jsx)(V,{size:"small","aria-label":l,title:l,color:"inherit",onClick:b,...G,children:(0,x.jsx)(K,{fontSize:"small",...U})})}):null]})}));var N=n(35124),H=n(53948);function L(e){return(0,b.Ay)("MuiRichTreeView",e)}(0,f.A)("MuiRichTreeView",["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox","itemLabelInput"]);var $=n(9553),_=n(24902);class z{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,n={}){let o=this.events[e];o||(o={highPriority:new Map,regular:new Map},this.events[e]=o),n.isFirst?o.highPriority.set(t,!0):o.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const n=this.events[e];if(!n)return;const o=Array.from(n.highPriority.keys()),i=Array.from(n.regular.keys());for(let e=o.length-1;e>=0;e-=1){const i=o[e];n.highPriority.has(i)&&i.apply(this,t)}for(let e=0;e<i.length;e+=1){const o=i[e];n.regular.has(o)&&o.apply(this,t)}}once(e,t){const n=this;this.on(e,(function o(...i){n.removeListener(e,o),t.apply(n,i)}))}}const F=()=>{const[e]=r.useState((()=>new z));return{instance:{$$publishEvent:r.useCallback(((...t)=>{const[n,o,i={}]=t;i.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(i)&&i.isPropagationStopped()||e.emit(n,o,i)}),[e]),$$subscribeEvent:r.useCallback(((t,n)=>(e.on(t,n),()=>{e.removeListener(t,n)})),[e])}}};F.params={};const B=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};B.params={};var j=n(29401),W=n(25149),V=n(80886);const G=({params:e,store:t})=>{r.useEffect((()=>{t.update((t=>e.id===t.id.providedTreeId&&void 0!==t.id.treeId?t:(0,o.A)({},t,{id:(0,o.A)({},t.id,{treeId:e.id??(0,V.Y)()})})))}),[t,e.id]);const n=(0,j.d)(t,W.U);return{getRootProps:()=>({id:n})}};G.params={id:!0},G.getInitialState=({id:e})=>({id:{treeId:void 0,providedTreeId:e}});const K=[F,B,G],U=["apiRef"];class q{constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{const t=e(this.value);t!==this.value&&(this.value=t,this.listeners.forEach((e=>e(t))))},this.value=e,this.listeners=new Set}}let Y=0;var X=n(29677),Q=n(19268);const J={};function Z(e){const{contextValue:t,classes:n=J,slots:o=J,slotProps:i=J,children:s}=e,a=r.useMemo((()=>({classes:n,slots:{collapseIcon:o.collapseIcon,expandIcon:o.expandIcon,endIcon:o.endIcon},slotProps:{collapseIcon:i.collapseIcon,expandIcon:i.expandIcon,endIcon:i.endIcon}})),[n,o.collapseIcon,o.expandIcon,o.endIcon,i.collapseIcon,i.expandIcon,i.endIcon]);return(0,x.jsx)(X.F.Provider,{value:t,children:(0,x.jsx)(Q.y.Provider,{value:a,children:t.wrapRoot({children:s})})})}var ee=n(78854);const te=(e,t,n)=>{e.$$publishEvent(t,n)};var ne=n(60957),oe=n(42049),ie=n(10786);const re=({disabledItemsFocusable:e,items:t,isItemDisabled:n,getItemLabel:o,getItemChildren:i,getItemId:r,initialDepth:s=0,initialParentId:a=null,getChildrenCount:l,ignoreChildren:c=!1})=>{const u={},d={},h={[ne.T2]:[]},p=(e,t,s)=>{const a=r?r(e):e.id;((e,t,n)=>{if(null==e)throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.","An item was provided without id in the `items` prop:",JSON.stringify(t)].join("\n"));if(null!=n[e])throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.","Alternatively, you can use the `getItemId` prop to specify a custom id for each item.",`Two items were provided with the same id in the \`items\` prop: "${e}"`].join("\n"))})(a,e,u);const m=o?o(e):e.label;if(null==m)throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.","Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.","An item was provided without label in the `items` prop:",JSON.stringify(e)].join("\n"));const g=i?i(e):e.children;u[a]={id:a,label:m,parentId:s,idAttribute:void 0,expandable:l?l(e)>0:!!g?.length,disabled:!!n&&n(e),depth:t},d[a]=e;const f=s??ne.T2;h[f]||(h[f]=[]),h[f].push(a),c||g?.forEach((e=>p(e,t+1,a)))};t?.forEach((e=>p(e,s,a)));const m={};return Object.keys(h).forEach((e=>{m[e]=(0,ne.vB)(h[e])})),{disabledItemsFocusable:e,itemMetaLookup:u,itemModelLookup:d,itemOrderedChildrenIdsLookup:h,itemChildrenIndexesLookup:m}},se=({instance:e,params:t,store:n})=>{const i=r.useCallback((e=>(0,ie.EJ)(n.value,e)),[n]),s=r.useCallback((e=>{const t=(0,ie.uP)(n.value,e);return t?.parentId||null}),[n]),a=(0,ee.A)((e=>{n.update((t=>(0,o.A)({},t,{items:(0,o.A)({},t.items,{loading:e})})))})),l=(0,ee.A)((e=>{n.update((t=>(0,o.A)({},t,{items:(0,o.A)({},t.items,{error:e})})))})),c=(0,ee.A)((({itemId:e,shouldBeDisabled:t})=>{n.update((n=>{if(!n.items.itemMetaLookup[e])return n;const i=(0,o.A)({},n.items.itemMetaLookup);return i[e]=(0,o.A)({},i[e],{disabled:t??!i[e].disabled}),(0,o.A)({},n,{items:(0,o.A)({},n.items,{itemMetaLookup:i})})}))})),u=r.useCallback((()=>{const e=t=>{const o=(0,ie.EJ)(n.value,t),i=(0,ie.p1)(n.value,t);return i.length>0?o.children=i.map(e):delete o.children,o};return(0,ie.p1)(n.value,null).map(e)}),[n]),d=r.useCallback((e=>(0,ie.p1)(n.value,e)),[n]),h=e=>{const t=(0,ie.uP)(n.value,e);if(null==t)return null;const o=(0,V.Q)({treeId:(0,W.U)(n.value),itemId:e,id:t.idAttribute});return document.getElementById(o)},p=r.useRef(!1),m=r.useCallback((()=>{p.current=!0}),[]),g=r.useCallback((()=>p.current),[]);return r.useEffect((()=>{e.areItemUpdatesPrevented()||n.update((n=>{const i=re({disabledItemsFocusable:t.disabledItemsFocusable,items:t.items,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel,getItemChildren:t.getItemChildren});return Object.values(n.items.itemMetaLookup).forEach((t=>{i.itemMetaLookup[t.id]||te(e,"removeItem",{id:t.id})})),(0,o.A)({},n,{items:(0,o.A)({},n.items,i)})}))}),[e,n,t.items,t.disabledItemsFocusable,t.isItemDisabled,t.getItemId,t.getItemLabel,t.getItemChildren]),{getRootProps:()=>({style:{"--TreeView-itemChildrenIndentation":"number"==typeof t.itemChildrenIndentation?`${t.itemChildrenIndentation}px`:t.itemChildrenIndentation}}),publicAPI:{getItem:i,getItemDOMElement:h,getItemTree:u,getItemOrderedChildrenIds:d,setIsItemDisabled:c,getParentId:s},instance:{getItemDOMElement:h,preventItemUpdates:m,areItemUpdatesPrevented:g,addItems:({items:i,parentId:r,depth:s,getChildrenCount:a})=>{if(i){const l=re({disabledItemsFocusable:t.disabledItemsFocusable,items:i,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel,getItemChildren:t.getItemChildren,getChildrenCount:a,initialDepth:s,initialParentId:r,ignoreChildren:!0});n.update((t=>{let n;return n=r?{itemModelLookup:(0,o.A)({},t.items.itemModelLookup,l.itemModelLookup),itemMetaLookup:(0,o.A)({},t.items.itemMetaLookup,l.itemMetaLookup),itemOrderedChildrenIdsLookup:(0,o.A)({},l.itemOrderedChildrenIdsLookup,t.items.itemOrderedChildrenIdsLookup),itemChildrenIndexesLookup:(0,o.A)({},l.itemChildrenIndexesLookup,t.items.itemChildrenIndexesLookup)}:{itemModelLookup:l.itemModelLookup,itemMetaLookup:l.itemMetaLookup,itemOrderedChildrenIdsLookup:l.itemOrderedChildrenIdsLookup,itemChildrenIndexesLookup:l.itemChildrenIndexesLookup},Object.values(t.items.itemMetaLookup).forEach((t=>{l.itemMetaLookup[t.id]||te(e,"removeItem",{id:t.id})})),(0,o.A)({},t,{items:(0,o.A)({},t.items,n)})}))}},setTreeViewLoading:a,setTreeViewError:l,removeChildren:t=>{n.update((n=>{if(!t)return(0,o.A)({},n,{items:(0,o.A)({},n.items,{itemMetaLookup:{},itemOrderedChildrenIdsLookup:{},itemChildrenIndexesLookup:{}})});const i=Object.keys(n.items.itemMetaLookup).reduce(((i,r)=>{const s=n.items.itemMetaLookup[r];return s.parentId===t?(te(e,"removeItem",{id:s.id}),i):(0,o.A)({},i,{[s.id]:s})}),{}),r=n.items.itemOrderedChildrenIdsLookup,s=n.items.itemChildrenIndexesLookup;return delete s[t],delete r[t],(0,o.A)({},n,{items:(0,o.A)({},n.items,{itemMetaLookup:i,itemOrderedChildrenIdsLookup:r,itemChildrenIndexesLookup:s})})}))},handleItemClick:(0,ee.A)(((e,n)=>{t.onItemClick&&t.onItemClick(e,n)}))}}};se.getInitialState=e=>({items:(0,o.A)({},re({disabledItemsFocusable:e.disabledItemsFocusable,items:e.items,isItemDisabled:e.isItemDisabled,getItemId:e.getItemId,getItemLabel:e.getItemLabel,getItemChildren:e.getItemChildren}),{loading:!1,error:null})}),se.applyDefaultValuesToParams=({params:e})=>(0,o.A)({},e,{disabledItemsFocusable:e.disabledItemsFocusable??!1,itemChildrenIndentation:e.itemChildrenIndentation??"12px"}),se.wrapRoot=({children:e})=>(0,x.jsx)(oe.z.Provider,{value:ie.AV,children:e}),se.params={disabledItemsFocusable:!0,items:!0,isItemDisabled:!0,getItemLabel:!0,getItemChildren:!0,getItemId:!0,onItemClick:!0,itemChildrenIndentation:!0};var ae=n(3576),le=n(27668);const ce=({isItemEditable:e,expansionTrigger:t})=>t||(e?"iconContainer":"content"),ue=({instance:e,store:t,params:n})=>{n.expandedItems,n.defaultExpandedItems,(0,ae.A)((()=>{t.update((e=>{const t=ce({isItemEditable:n.isItemEditable,expansionTrigger:n.expansionTrigger});return e.expansion.expansionTrigger===t?e:(0,o.A)({},e,{expansion:(0,o.A)({},e.expansion,{expansionTrigger:t})})}))}),[t,n.isItemEditable,n.expansionTrigger]);const i=(e,i)=>{void 0===n.expandedItems&&t.update((e=>(0,o.A)({},e,{expansion:(0,o.A)({},e.expansion,{expandedItems:i})}))),n.onExpandedItemsChange?.(e,i)},r=(0,ee.A)((({itemId:e,event:o,shouldBeExpanded:r})=>{const s=(0,le.l$)(t.value);let a;a=r?[e].concat(s):s.filter((t=>t!==e)),n.onItemExpansionToggle&&n.onItemExpansionToggle(o,e,r),i(o,a)})),s=(0,ee.A)((({itemId:n,event:o=null,shouldBeExpanded:i})=>{const r=(0,le.QQ)(t.value,n),s=i??!r;if(r===s)return;const a={isExpansionPrevented:!1,shouldBeExpanded:s,event:o,itemId:n};te(e,"beforeItemToggleExpansion",a),a.isExpansionPrevented||e.applyItemExpansion({itemId:n,event:o,shouldBeExpanded:s})}));return(0,ae.A)((()=>{const e=n.expandedItems;void 0!==e&&t.update((t=>(0,o.A)({},t,{expansion:(0,o.A)({},t.expansion,{expandedItems:e})})))}),[t,n.expandedItems]),{publicAPI:{setItemExpansion:s},instance:{setItemExpansion:s,applyItemExpansion:r,expandAllSiblings:(e,o)=>{const r=(0,ie.uP)(t.value,o);if(null==r)return;const s=(0,ie.p1)(t.value,r.parentId).filter((e=>(0,le.Rt)(t.value,e)&&!(0,le.QQ)(t.value,e))),a=(0,le.l$)(t.value).concat(s);s.length>0&&(n.onItemExpansionToggle&&s.forEach((t=>{n.onItemExpansionToggle(e,t,!0)})),i(e,a))}}}},de=[];ue.applyDefaultValuesToParams=({params:e})=>(0,o.A)({},e,{defaultExpandedItems:e.defaultExpandedItems??de}),ue.getInitialState=e=>({expansion:{expandedItems:void 0===e.expandedItems?e.defaultExpandedItems:e.expandedItems,expansionTrigger:ce(e)}}),ue.params={expandedItems:!0,defaultExpandedItems:!0,onExpandedItemsChange:!0,onItemExpansionToggle:!0,expansionTrigger:!0};var he=n(28540),pe=n(64938);const me=e=>{const t={};return e.forEach((e=>{t[e]=!0})),t},ge=({store:e,oldModel:t,newModel:n})=>{const o=new Map;return n.forEach((e=>{o.set(e,!0)})),{added:n.filter((t=>!(0,pe.cs)(e.value,t))),removed:t.filter((e=>!o.has(e)))}},fe=Object.is;function be(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,o=0;for(const o in e){if(n+=1,!fe(e[o],t[o]))return!1;if(!(o in t))return!1}for(const e in t)o+=1;return n===o}function ve(e,t){const n=(0,pe.Ye)(e),o=(0,pe.AJ)(e,t);if((0,pe.cs)(e,t))return{disabled:!o,visible:n,indeterminate:!1,checked:!0};if(0===(0,ie.p1)(e,t).length)return{disabled:!o,visible:n,indeterminate:!1,checked:!1};let i=!1,r=!1;const s=n=>{n!==t&&((0,pe.cs)(e,n)?i=!0:r=!0),(0,ie.p1)(e,n).forEach(s)};return s(t),{disabled:!o,visible:n,indeterminate:i&&r,checked:!!(0,pe.Fj)(e).parents&&i&&!r}}const we=({store:e,params:t})=>{t.selectedItems,t.defaultSelectedItems;const n=r.useRef(null),i=r.useRef({}),s=(n,i,r)=>{const s=(0,pe.T)(e.value);let a;const l=(0,pe.UK)(e.value);if(a=l&&(t.selectionPropagation.descendants||t.selectionPropagation.parents)?(({store:e,selectionPropagation:t,newModel:n,oldModel:o,additionalItemsToPropagate:i})=>{if(!t.descendants&&!t.parents)return n;let r=!1;const s=me(n),a=ge({store:e,newModel:n,oldModel:o});return i?.forEach((e=>{s[e]?a.added.includes(e)||a.added.push(e):a.removed.includes(e)||a.removed.push(e)})),a.added.forEach((n=>{if(t.descendants){const t=o=>{o!==n&&(r=!0,s[o]=!0),(0,ie.p1)(e.value,o).forEach(t)};t(n)}if(t.parents){const t=n=>!!s[n]&&(0,ie.p1)(e.value,n).every(t),o=n=>{const i=(0,ie.YW)(e.value,n);null!=i&&(0,ie.p1)(e.value,i).every(t)&&(r=!0,s[i]=!0,o(i))};o(n)}})),a.removed.forEach((n=>{if(t.parents){let t=(0,ie.YW)(e.value,n);for(;null!=t;)s[t]&&(r=!0,delete s[t]),t=(0,ie.YW)(e.value,t)}if(t.descendants){const t=o=>{o!==n&&(r=!0,delete s[o]),(0,ie.p1)(e.value,o).forEach(t)};t(n)}})),r?Object.keys(s):n})({store:e,selectionPropagation:t.selectionPropagation,newModel:i,oldModel:s,additionalItemsToPropagate:r}):i,t.onItemSelectionToggle)if(l){const o=ge({store:e,newModel:a,oldModel:s});t.onItemSelectionToggle&&(o.added.forEach((e=>{t.onItemSelectionToggle(n,e,!0)})),o.removed.forEach((e=>{t.onItemSelectionToggle(n,e,!1)})))}else t.onItemSelectionToggle&&a!==s&&(null!=s&&t.onItemSelectionToggle(n,s,!1),null!=a&&t.onItemSelectionToggle(n,a,!0));void 0===t.selectedItems&&e.update((e=>(0,o.A)({},e,{selection:(0,o.A)({},e.selection,{selectedItems:a})}))),t.onSelectedItemsChange?.(n,a)},a=({itemId:t,event:o=null,keepExistingSelection:r=!1,shouldBeSelected:a})=>{if(!(0,pe.BF)(e.value))return;let l;const c=(0,pe.UK)(e.value);if(r){const n=(0,pe.Go)(e.value),o=(0,pe.cs)(e.value,t);l=!o||!1!==a&&null!=a?o||!0!==a&&null!=a?n:[t].concat(n):n.filter((e=>e!==t))}else l=!1===a||null==a&&(0,pe.cs)(e.value,t)?c?[]:null:c?[t]:t;s(o,l,[t]),n.current=t,i.current={}},l=(t,[n,o])=>{if(!(0,pe.UK)(e.value))return;let r=(0,pe.Go)(e.value).slice();Object.keys(i.current).length>0&&(r=r.filter((e=>!i.current[e])));const a=me(r),l=(0,he.c2)(e.value,n,o),c=l.filter((e=>!a[e]));r=r.concat(c),s(t,r),i.current=me(l)};return(0,ae.A)((()=>{e.update((e=>(0,o.A)({},e,{selection:{selectedItems:void 0===t.selectedItems?e.selection.selectedItems:t.selectedItems,isEnabled:!t.disableSelection,isMultiSelectEnabled:t.multiSelect,isCheckboxSelectionEnabled:t.checkboxSelection,selectionPropagation:{descendants:t.selectionPropagation.descendants,parents:t.selectionPropagation.parents}}})))}),[e,t.selectedItems,t.multiSelect,t.checkboxSelection,t.disableSelection,t.selectionPropagation.descendants,t.selectionPropagation.parents]),{getRootProps:()=>({"aria-multiselectable":t.multiSelect}),publicAPI:{setItemSelection:a},instance:{setItemSelection:a,selectAllNavigableItems:t=>{if(!(0,pe.UK)(e.value))return;const n=(0,he.nz)(e.value);s(t,n),i.current=me(n)},expandSelectionRange:(t,o)=>{if(null!=n.current){const[i,r]=(0,he.XR)(e.value,o,n.current);l(t,[i,r])}},selectRangeFromStartToItem:(t,n)=>{l(t,[(0,he.F1)(e.value),n])},selectRangeFromItemToEnd:(t,n)=>{l(t,[n,(0,he.HG)(e.value)])},selectItemFromArrowNavigation:(t,n,o)=>{if(!(0,pe.UK)(e.value))return;let r=(0,pe.Go)(e.value).slice();0===Object.keys(i.current).length?(r.push(o),i.current={[n]:!0,[o]:!0}):(i.current[n]||(i.current={}),i.current[o]?(r=r.filter((e=>e!==n)),delete i.current[n]):(r.push(o),i.current[o]=!0)),s(t,r)}}}};we.itemPlugin=({props:e})=>{const{itemId:t}=e,{store:n}=(0,X.i)(),i=(0,j.d)(n,ve,t,be);return{propsEnhancers:{checkbox:({externalEventHandlers:e,interactions:r})=>(0,o.A)({tabIndex:-1,onChange:o=>{e.onChange?.(o),o.defaultMuiPrevented||(0,pe.AJ)(n.value,t)&&r.handleCheckboxSelection(o)}},i)}}};const ye=[],Ce={};we.applyDefaultValuesToParams=({params:e})=>(0,o.A)({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?ye:null),selectionPropagation:e.selectionPropagation??Ce}),we.getInitialState=e=>({selection:{selectedItems:void 0===e.selectedItems?e.defaultSelectedItems:e.selectedItems,isEnabled:!e.disableSelection,isMultiSelectEnabled:e.multiSelect,isCheckboxSelectionEnabled:e.checkboxSelection,selectionPropagation:e.selectionPropagation}}),we.params={disableSelection:!0,multiSelect:!0,checkboxSelection:!0,defaultSelectedItems:!0,selectedItems:!0,onSelectedItemsChange:!0,onItemSelectionToggle:!0,selectionPropagation:!0};class xe{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,n){this.timeouts||(this.timeouts=new Map);const o=setTimeout((()=>{"function"==typeof t&&t(),this.timeouts.delete(n.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(n.cleanupToken,o)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach(((e,t)=>{this.unregister({cleanupToken:t})})),this.timeouts=void 0)}}class Ee{constructor(){this.registry=new FinalizationRegistry((e=>{"function"==typeof e&&e()}))}register(e,t,n){this.registry.register(e,t,n)}unregister(e){this.registry.unregister(e)}reset(){}}class Se{}const Ae=function(e){let t=0;return function(n,o,i){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new Ee:new xe);const[s]=r.useState(new Se),a=r.useRef(null),l=r.useRef(void 0);l.current=i;const c=r.useRef(null);if(!a.current&&l.current){const i=(e,t)=>{t.defaultMuiPrevented||l.current?.(e,t)};a.current=n.$$subscribeEvent(o,i),t+=1,c.current={cleanupToken:t},e.registry.register(s,(()=>{a.current?.(),a.current=null,c.current=null}),c.current)}else!l.current&&a.current&&(a.current(),a.current=null,c.current&&(e.registry.unregister(c.current),c.current=null));r.useEffect((()=>{if(!a.current&&l.current){const e=(e,t)=>{t.defaultMuiPrevented||l.current?.(e,t)};a.current=n.$$subscribeEvent(o,e)}return c.current&&e.registry&&(e.registry.unregister(c.current),c.current=null),()=>{a.current?.(),a.current=null}}),[n,o])}}({registry:null});var ke=n(31418);const Re=({instance:e,params:t,store:n})=>{const i=(0,ee.A)((e=>{n.update((t=>(0,ke.L6)(t)===e?t:(0,o.A)({},t,{focus:(0,o.A)({},t.focus,{focusedItemId:e})})))})),r=(n,o)=>{const r=e.getItemDOMElement(o);r&&r.focus(),i(o),t.onItemFocus&&t.onItemFocus(n,o)},s=(0,ee.A)(((e,t)=>{(e=>{const t=(0,ie.uP)(n.value,e);return t&&(null==t.parentId||(0,le.QQ)(n.value,t.parentId))})(t)&&r(e,t)})),a=(0,ee.A)((()=>{const t=(0,ke.L6)(n.value);if(null!=t){if((0,ie.uP)(n.value,t)){const n=e.getItemDOMElement(t);n&&n.blur()}i(null)}}));Ae(e,"removeItem",(({id:e})=>{const t=(0,ke.L6)(n.value),o=(0,ke.hc)(n.value);t===e&&null!=o&&r(null,o)}));const l=e=>t=>{if(e.onFocus?.(t),t.defaultMuiPrevented)return;const o=(0,ke.hc)(n.value);t.target===t.currentTarget&&null!=o&&r(t,o)},c=e=>t=>{e.onBlur?.(t),t.defaultMuiPrevented||i(null)};return{getRootProps:e=>({onFocus:l(e),onBlur:c(e)}),publicAPI:{focusItem:s},instance:{focusItem:s,removeFocusedItem:a}}};Re.getInitialState=()=>({focus:{focusedItemId:null}}),Re.params={onItemFocus:!0};var Me=n(411),Te=n(65658),Ie=n(41519),Pe=n(81326);const Oe=({instance:e,store:t,params:n})=>{const o=(0,Me.I)(),i=r.useRef({}),s=(0,ee.A)((e=>{i.current=e(i.current)})),a=(0,j.d)(t,ie.Ks);r.useEffect((()=>{if(e.areItemUpdatesPrevented())return;const t={};Object.values(a).forEach((e=>{t[e.id]=e.label.substring(0,1).toLowerCase()})),i.current=t}),[a,n.getItemId,e]);const l=e=>(0,pe.BF)(t.value)&&!(0,ie.lj)(t.value,e),c=e=>!(0,ie.lj)(t.value,e)&&(0,le.Rt)(t.value,e);return{instance:{updateFirstCharMap:s,handleItemKeyDown:async(n,r)=>{if(n.defaultMuiPrevented)return;if(n.altKey||(0,he.HZ)(n.target,n.currentTarget))return;const s=n.ctrlKey||n.metaKey,a=n.key,u=(0,pe.UK)(t.value);switch(!0){case" "===a&&l(r):n.preventDefault(),u&&n.shiftKey?e.expandSelectionRange(n,r):e.setItemSelection({event:n,itemId:r,keepExistingSelection:u,shouldBeSelected:void 0});break;case"Enter"===a:(0,Te.M)(e,Ie.j)&&(0,Pe.pF)(t.value,r)&&!(0,Pe.XG)(t.value,r)?e.setEditedItem(r):c(r)?(e.setItemExpansion({event:n,itemId:r}),n.preventDefault()):l(r)&&(u?(n.preventDefault(),e.setItemSelection({event:n,itemId:r,keepExistingSelection:!0})):(0,pe.cs)(t.value,r)||(e.setItemSelection({event:n,itemId:r}),n.preventDefault()));break;case"ArrowDown"===a:{const o=(0,he.ig)(t.value,r);o&&(n.preventDefault(),e.focusItem(n,o),u&&n.shiftKey&&l(o)&&e.selectItemFromArrowNavigation(n,r,o));break}case"ArrowUp"===a:{const o=(0,he.eI)(t.value,r);o&&(n.preventDefault(),e.focusItem(n,o),u&&n.shiftKey&&l(o)&&e.selectItemFromArrowNavigation(n,r,o));break}case"ArrowRight"===a&&!o||"ArrowLeft"===a&&o:if(s)return;if((0,le.QQ)(t.value,r)){const o=(0,he.ig)(t.value,r);o&&(e.focusItem(n,o),n.preventDefault())}else c(r)&&(e.setItemExpansion({event:n,itemId:r}),n.preventDefault());break;case"ArrowLeft"===a&&!o||"ArrowRight"===a&&o:if(s)return;if(c(r)&&(0,le.QQ)(t.value,r))e.setItemExpansion({event:n,itemId:r}),n.preventDefault();else{const o=(0,ie.YW)(t.value,r);o&&(e.focusItem(n,o),n.preventDefault())}break;case"Home"===a:l(r)&&u&&s&&n.shiftKey?e.selectRangeFromStartToItem(n,r):e.focusItem(n,(0,he.F1)(t.value)),n.preventDefault();break;case"End"===a:l(r)&&u&&s&&n.shiftKey?e.selectRangeFromItemToEnd(n,r):e.focusItem(n,(0,he.HG)(t.value)),n.preventDefault();break;case"*"===a:e.expandAllSiblings(n,r),n.preventDefault();break;case"A"===String.fromCharCode(n.keyCode)&&s&&u&&(0,pe.BF)(t.value):e.selectAllNavigableItems(n),n.preventDefault();break;case!(s||n.shiftKey||(d=a,!d||1!==d.length||!d.match(/\S/))):{const o=((e,n)=>{const o=n.toLowerCase(),r=e=>{const n=(0,he.ig)(t.value,e);return null===n?(0,he.F1)(t.value):n};let s=null,a=r(e);const l={};for(;null==s&&!l[a];)i.current[a]===o?s=a:(l[a]=!0,a=r(a));return s})(r,a);null!=o&&(e.focusItem(n,o),n.preventDefault());break}}var d}}}};Oe.params={};const De=[se,ue,we,Re,Oe,Ie.j];var Ne=n(63543);const He=["ownerState"],Le=r.createContext(null),$e=r.memo((function({itemSlot:e,itemSlotProps:t,itemId:n}){const s=r.useContext(Le),{store:a}=(0,X.i)(),l=(0,j.d)(a,ie.uP,n),c=(0,j.d)(a,ie.p1,n),u=e??Ne.yh,d=(0,H.A)({elementType:u,externalSlotProps:t,additionalProps:{label:l?.label,id:l?.idAttribute,itemId:n},ownerState:{itemId:n,label:l?.label}}),h=(0,i.A)(d,He);return(0,x.jsx)(u,(0,o.A)({},h,{children:c?.map(s)}))}),be);function _e(e){const{slots:t,slotProps:n}=e,{store:o}=(0,X.i)(),i=t?.item,s=n?.item,a=(0,j.d)(o,ie.p1,null),l=r.useCallback((e=>(0,x.jsx)($e,{itemSlot:i,itemSlotProps:s,itemId:e},e)),[i,s]);return(0,x.jsx)(Le.Provider,{value:l,children:a.map(l)})}const ze=["slots","slotProps"],Fe=(0,$.h)("MuiRichTreeView"),Be=(0,c.Ay)("ul",{name:"MuiRichTreeView",slot:"Root"})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),je=r.forwardRef((function(e,t){const n=Fe({props:e,name:"MuiRichTreeView"}),{slots:s,slotProps:l}=n,c=(0,i.A)(n,ze),{getRootProps:u,contextValue:d}=(({plugins:e,rootRef:t,props:n})=>{const s=r.useMemo((()=>[...K,...e]),[e]),{pluginParams:a,forwardedProps:l,apiRef:c}=(e=>{let{props:{apiRef:t},plugins:n}=e,o=(0,i.A)(e.props,U);const s=r.useMemo((()=>{const e={};return n.forEach((t=>{Object.assign(e,t.params)})),e}),[n]),{forwardedProps:a,pluginParams:l}=r.useMemo((()=>{const e={},t={};Object.keys(o).forEach((n=>{const i=o[n];s[n]?e[n]=i:t[n]=i}));const i=n.reduce(((e,t)=>t.applyDefaultValuesToParams?t.applyDefaultValuesToParams({params:e}):e),e);return{forwardedProps:t,pluginParams:i}}),[n,o,s]);return{forwardedProps:a,pluginParams:l,apiRef:t}})({plugins:s,props:n}),u=r.useRef({}).current,d=function(e){const t=r.useRef({});return e?function(e){return null==e.current&&(e.current={}),e}(e):t}(c),h=r.useRef(null),p=(0,_.A)(h,t),m=r.useRef(null);if(null==m.current){Y+=1;const e={cacheKey:{id:Y}};s.forEach((t=>{t.getInitialState&&Object.assign(e,t.getInitialState(a))})),m.current=new q(e)}const g=(e=>{const{plugins:t,instance:n,publicAPI:o,store:i,rootRef:s}=e,a=r.useCallback((e=>{let n=null,o=null;const i=[],r={};t.forEach((t=>{if(!t.itemPlugin)return;const s=t.itemPlugin({props:e,rootRef:n,contentRef:o});s?.rootRef&&(n=s.rootRef),s?.contentRef&&(o=s.contentRef),s?.propsEnhancers&&(i.push(s.propsEnhancers),Object.keys(s.propsEnhancers).forEach((e=>{r[e]=!0})))}));const s=Object.fromEntries(Object.keys(r).map((e=>{return[e,(t=e,e=>{const n={};return i.forEach((o=>{const i=o[t];null!=i&&Object.assign(n,i(e))})),n})];var t})));return{contentRef:o,rootRef:n,propsEnhancers:s}}),[t]),l=r.useCallback((({itemId:e,children:o,idAttribute:i})=>{let r=o;for(let o=t.length-1;o>=0;o-=1){const s=t[o];s.wrapItem&&(r=s.wrapItem({instance:n,itemId:e,children:r,idAttribute:i}))}return r}),[t,n]),c=r.useCallback((({children:e})=>{let n=e;for(let e=t.length-1;e>=0;e-=1){const o=t[e];o.wrapRoot&&(n=o.wrapRoot({children:n}))}return n}),[t]);return r.useMemo((()=>({runItemPlugins:a,wrapItem:l,wrapRoot:c,instance:n,publicAPI:o,store:i,rootRef:s})),[a,l,c,n,o,i,s])})({plugins:s,instance:u,publicAPI:d.current,store:m.current,rootRef:h}),f=[];return s.forEach((e=>{const t=e({instance:u,params:a,rootRef:h,plugins:s,store:m.current});t.getRootProps&&f.push(t.getRootProps),t.publicAPI&&Object.assign(d.current,t.publicAPI),t.instance&&Object.assign(u,t.instance)})),{getRootProps:(e={})=>{const t=(0,o.A)({role:"tree"},l,e,{ref:p});return f.forEach((n=>{Object.assign(t,n(e))})),t},rootRef:p,contextValue:g}})({plugins:De,rootRef:t,props:c}),h=(0,j.d)(d.store,ie.DW),p=(0,j.d)(d.store,ie.nt),m=(e=>{const{classes:t}=e;return r.useMemo((()=>(0,a.A)({root:["root"],item:["item"],itemContent:["itemContent"],itemGroupTransition:["itemGroupTransition"],itemIconContainer:["itemIconContainer"],itemLabel:["itemLabel"],itemLabelInput:["itemLabelInput"],itemCheckbox:["itemCheckbox"]},L,t)),[t])})(n),g=s?.root??Be,f=(0,H.A)({elementType:g,externalSlotProps:l?.root,className:m.root,getSlotProps:u,ownerState:n});return h?(0,x.jsx)(N.A,{children:"Loading..."}):p?(0,x.jsx)(D,{severity:"error",children:p.message}):(0,x.jsx)(Z,{contextValue:d,classes:m,slots:s,slotProps:l,children:(0,x.jsx)(g,(0,o.A)({},f,{children:(0,x.jsx)(_e,{slots:s,slotProps:l})}))})}))},48224:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,c:()=>r});var o=n(96540);const i=o.createContext(void 0),r=({children:e,size:t})=>{const n=o.useContext(i);return o.createElement(i.Provider,{value:t||n},e)},s=i},48646:(e,t,n)=>{"use strict";var o=n(69565),i=n(28551),r=n(1767),s=n(50851);e.exports=function(e,t){t&&"string"==typeof e||i(e);var n=s(e);return r(i(void 0!==n?o(n,e):e))}},49640:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(53954),i=n(52176),r=n(82284),s=n(9417);function a(e){var t=(0,i.A)();return function(){var n,i=(0,o.A)(e);if(t){var a=(0,o.A)(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"==(0,r.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,s.A)(e)}(this,n)}}},49806:(e,t,n)=>{"use strict";n.d(t,{sb:()=>r,vG:()=>s});var o=n(96540),i=n(50723);const r={token:i.A,override:{override:i.A},hashed:!0},s=o.createContext(r)},50723:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,r:()=>o});const o={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},i=Object.assign(Object.assign({},o),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'",fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0})},51873:(e,t,n)=>{var o=n(9325).Symbol;e.exports=o},52176:(e,t,n)=>{"use strict";function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}n.d(t,{A:()=>o})},52764:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(9792),i=n(74848);const r=(0,o.A)((0,i.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},53830:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var o=n(96540),i=n(34164),r=n(836),s=n(1908),a=n(21362),l=n(14808),c=n(21124),u=n(57514),d=n(65387),h=n(7196),p=n(93781),m=n(74848);const g=(0,d.A)(),f=(0,l.A)("div",{name:"MuiStack",slot:"Root"});function b(e){return(0,c.A)({props:e,name:"MuiStack",defaultTheme:g})}function v(e,t){const n=o.Children.toArray(e).filter(Boolean);return n.reduce(((e,i,r)=>(e.push(i),r<n.length-1&&e.push(o.cloneElement(t,{key:`separator-${r}`})),e)),[])}const w=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...(0,h.NI)({theme:t},(0,h.kW)({values:e.direction,breakpoints:t.breakpoints.values}),(e=>({flexDirection:e})))};if(e.spacing){const o=(0,p.LX)(t),i=Object.keys(t.breakpoints.values).reduce(((t,n)=>(("object"==typeof e.spacing&&null!=e.spacing[n]||"object"==typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t)),{}),s=(0,h.kW)({values:e.direction,base:i}),a=(0,h.kW)({values:e.spacing,base:i});"object"==typeof s&&Object.keys(s).forEach(((e,t,n)=>{if(!s[e]){const o=t>0?s[n[t-1]]:"column";s[e]=o}}));const l=(t,n)=>{return e.useFlexGap?{gap:(0,p._W)(o,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${i=n?s[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]}`]:(0,p._W)(o,t)}};var i};n=(0,r.A)(n,(0,h.NI)({theme:t},a,l))}return n=(0,h.iZ)(t.breakpoints,n),n};var y=n(26739),C=n(20439);const x=function(e={}){const{createStyledComponent:t=f,useThemeProps:n=b,componentName:r="MuiStack"}=e,l=t(w),c=o.forwardRef((function(e,t){const o=n(e),c=(0,u.A)(o),{component:d="div",direction:h="column",spacing:p=0,divider:g,children:f,className:b,useFlexGap:w=!1,...y}=c,C={direction:h,spacing:p,useFlexGap:w},x=(0,a.A)({root:["root"]},(e=>(0,s.Ay)(r,e)),{});return(0,m.jsx)(l,{as:d,ownerState:C,ref:t,className:(0,i.A)(x.root,b),...y,children:g?v(f,g):f})}));return c}({createStyledComponent:(0,y.Ay)("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>(0,C.b)({props:e,name:"MuiStack"})}),E=x},53954:(e,t,n)=>{"use strict";function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}n.d(t,{A:()=>o})},54128:(e,t,n)=>{var o=n(31800),i=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(i,""):e}},56301:(e,t,n)=>{"use strict";n.d(t,{A:()=>W});var o=n(96540),i=n(34164),r=n(21362),s=n(411),a=n(53948),l=n(26739),c=n(53356),u=n(39241),d=n(20439),h=n(65418);function p(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var m=n(37313),g=n(41538),f=n(74848);const b={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var v=n(56536),w=n(1883),y=n(38329),C=n(96148),x=n(1908);function E(e){return(0,x.Ay)("MuiTabScrollButton",e)}const S=(0,C.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),A=(0,l.Ay)(y.A,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${S.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),k=o.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:l={},slotProps:c={},direction:u,orientation:h,disabled:p,...m}=n,g=(0,s.I)(),b={isRtl:g,...n},y=(e=>{const{classes:t,orientation:n,disabled:o}=e,i={root:["root",n,o&&"disabled"]};return(0,r.A)(i,E,t)})(b),C=l.StartScrollButtonIcon??v.A,x=l.EndScrollButtonIcon??w.A,S=(0,a.A)({elementType:C,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:b}),k=(0,a.A)({elementType:x,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:b});return(0,f.jsx)(A,{component:"div",className:(0,i.A)(y.root,o),ref:t,role:null,ownerState:b,tabIndex:null,...m,style:{...m.style,..."vertical"===h&&{"--TabScrollButton-svgRotate":`rotate(${g?-90:90}deg)`}},children:"left"===u?(0,f.jsx)(C,{...S}):(0,f.jsx)(x,{...k})})}));var R=n(54403);function M(e){return(0,x.Ay)("MuiTabs",e)}const T=(0,C.A)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var I=n(33983),P=n(85078);const O=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,D=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,N=(e,t,n)=>{let o=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(o)return;o=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},H=(0,l.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${T.scrollButtons}`]:t.scrollButtons},{[`& .${T.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((0,u.A)((({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${T.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]})))),L=(0,l.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),$=(0,l.Ay)("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),_=(0,l.Ay)("span",{name:"MuiTabs",slot:"Indicator"})((0,u.A)((({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]})))),z=(0,l.Ay)((function(e){const{onChange:t,...n}=e,i=o.useRef(),r=o.useRef(null),s=()=>{i.current=r.current.offsetHeight-r.current.clientHeight};return(0,m.A)((()=>{const e=(0,h.A)((()=>{const e=i.current;s(),e!==i.current&&t(i.current)})),n=(0,g.A)(r.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),o.useEffect((()=>{s(),t(i.current)}),[t]),(0,f.jsx)("div",{style:b,...n,ref:r})}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),F={},B=o.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiTabs"}),l=(0,c.A)(),u=(0,s.I)(),{"aria-label":m,"aria-labelledby":b,action:v,centered:w=!1,children:y,className:C,component:x="div",allowScrollButtonsMobile:E=!1,indicatorColor:S="primary",onChange:A,orientation:T="horizontal",ScrollButtonComponent:B,scrollButtons:j="auto",selectionFollowsFocus:W,slots:V={},slotProps:G={},TabIndicatorProps:K={},TabScrollButtonProps:U={},textColor:q="primary",value:Y,variant:X="standard",visibleScrollbar:Q=!1,...J}=n,Z="scrollable"===X,ee="vertical"===T,te=ee?"scrollTop":"scrollLeft",ne=ee?"top":"left",oe=ee?"bottom":"right",ie=ee?"clientHeight":"clientWidth",re=ee?"height":"width",se={...n,component:x,allowScrollButtonsMobile:E,indicatorColor:S,orientation:T,vertical:ee,scrollButtons:j,textColor:q,variant:X,visibleScrollbar:Q,fixed:!Z,hideScrollbar:Z&&!Q,scrollableX:Z&&!ee,scrollableY:Z&&ee,centered:w&&!Z,scrollButtonsHideMobile:!E},ae=(e=>{const{vertical:t,fixed:n,hideScrollbar:o,scrollableX:i,scrollableY:s,centered:a,scrollButtonsHideMobile:l,classes:c}=e,u={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",o&&"hideScrollbar",i&&"scrollableX",s&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[o&&"hideScrollbar"]};return(0,r.A)(u,M,c)})(se),le=(0,a.A)({elementType:V.StartScrollButtonIcon,externalSlotProps:G.startScrollButtonIcon,ownerState:se}),ce=(0,a.A)({elementType:V.EndScrollButtonIcon,externalSlotProps:G.endScrollButtonIcon,ownerState:se}),[ue,de]=o.useState(!1),[he,pe]=o.useState(F),[me,ge]=o.useState(!1),[fe,be]=o.useState(!1),[ve,we]=o.useState(!1),[ye,Ce]=o.useState({overflow:"hidden",scrollbarWidth:0}),xe=new Map,Ee=o.useRef(null),Se=o.useRef(null),Ae={slots:V,slotProps:{indicator:K,scrollButton:U,...G}},ke=()=>{const e=Ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==Y){const e=Se.current.children;if(e.length>0){const t=e[xe.get(Y)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},Re=(0,R.A)((()=>{const{tabsMeta:e,tabMeta:t}=ke();let n,o=0;ee?(n="top",t&&e&&(o=t.top-e.top+e.scrollTop)):(n=u?"right":"left",t&&e&&(o=(u?-1:1)*(t[n]-e[n]+e.scrollLeft)));const i={[n]:o,[re]:t?t[re]:0};if("number"!=typeof he[n]||"number"!=typeof he[re])pe(i);else{const e=Math.abs(he[n]-i[n]),t=Math.abs(he[re]-i[re]);(e>=1||t>=1)&&pe(i)}})),Me=(e,{animation:t=!0}={})=>{t?function(e,t,n,o={},i=()=>{}){const{ease:r=p,duration:s=300}=o;let a=null;const l=t[e];let c=!1;const u=o=>{if(c)return void i(new Error("Animation cancelled"));null===a&&(a=o);const d=Math.min(1,(o-a)/s);t[e]=r(d)*(n-l)+l,d>=1?requestAnimationFrame((()=>{i(null)})):requestAnimationFrame(u)};l===n?i(new Error("Element already at target position")):requestAnimationFrame(u)}(te,Ee.current,e,{duration:l.transitions.duration.standard}):Ee.current[te]=e},Te=e=>{let t=Ee.current[te];t+=ee?e:e*(u?-1:1),Me(t)},Ie=()=>{const e=Ee.current[ie];let t=0;const n=Array.from(Se.current.children);for(let o=0;o<n.length;o+=1){const i=n[o];if(t+i[ie]>e){0===o&&(t=e);break}t+=i[ie]}return t},Pe=()=>{Te(-1*Ie())},Oe=()=>{Te(Ie())},[De,{onChange:Ne,...He}]=(0,P.A)("scrollbar",{className:(0,i.A)(ae.scrollableX,ae.hideScrollbar),elementType:z,shouldForwardComponentProp:!0,externalForwardedProps:Ae,ownerState:se}),Le=o.useCallback((e=>{Ne?.(e),Ce({overflow:null,scrollbarWidth:e})}),[Ne]),[$e,_e]=(0,P.A)("scrollButtons",{className:(0,i.A)(ae.scrollButtons,U.className),elementType:k,externalForwardedProps:Ae,ownerState:se,additionalProps:{orientation:T,slots:{StartScrollButtonIcon:V.startScrollButtonIcon||V.StartScrollButtonIcon,EndScrollButtonIcon:V.endScrollButtonIcon||V.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:le,endScrollButtonIcon:ce}}}),ze=(0,R.A)((e=>{const{tabsMeta:t,tabMeta:n}=ke();if(n&&t)if(n[ne]<t[ne]){const o=t[te]+(n[ne]-t[ne]);Me(o,{animation:e})}else if(n[oe]>t[oe]){const o=t[te]+(n[oe]-t[oe]);Me(o,{animation:e})}})),Fe=(0,R.A)((()=>{Z&&!1!==j&&we(!ve)}));o.useEffect((()=>{const e=(0,h.A)((()=>{Ee.current&&Re()}));let t;const n=(0,g.A)(Ee.current);let o;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Se.current.children).forEach((e=>{t.observe(e)}))),"undefined"!=typeof MutationObserver&&(o=new MutationObserver((n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{t?.unobserve(e)})),e.addedNodes.forEach((e=>{t?.observe(e)}))})),e(),Fe()})),o.observe(Se.current,{childList:!0})),()=>{e.clear(),n.removeEventListener("resize",e),o?.disconnect(),t?.disconnect()}}),[Re,Fe]),o.useEffect((()=>{const e=Array.from(Se.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&Z&&!1!==j){const n=e[0],o=e[t-1],i={root:Ee.current,threshold:.99},r=new IntersectionObserver((e=>{ge(!e[0].isIntersecting)}),i);r.observe(n);const s=new IntersectionObserver((e=>{be(!e[0].isIntersecting)}),i);return s.observe(o),()=>{r.disconnect(),s.disconnect()}}}),[Z,j,ve,y?.length]),o.useEffect((()=>{de(!0)}),[]),o.useEffect((()=>{Re()})),o.useEffect((()=>{ze(F!==he)}),[ze,he]),o.useImperativeHandle(v,(()=>({updateIndicator:Re,updateScrollButtons:Fe})),[Re,Fe]);const[Be,je]=(0,P.A)("indicator",{className:(0,i.A)(ae.indicator,K.className),elementType:_,externalForwardedProps:Ae,ownerState:se,additionalProps:{style:he}}),We=(0,f.jsx)(Be,{...je});let Ve=0;const Ge=o.Children.map(y,(e=>{if(!o.isValidElement(e))return null;const t=void 0===e.props.value?Ve:e.props.value;xe.set(t,Ve);const n=t===Y;return Ve+=1,o.cloneElement(e,{fullWidth:"fullWidth"===X,indicator:n&&!ue&&We,selected:n,selectionFollowsFocus:W,onChange:A,textColor:q,value:t,...1!==Ve||!1!==Y||e.props.tabIndex?{}:{tabIndex:0}})})),Ke=(()=>{const e={};e.scrollbarSizeListener=Z?(0,f.jsx)(De,{...He,onChange:Le}):null;const t=Z&&("auto"===j&&(me||fe)||!0===j);return e.scrollButtonStart=t?(0,f.jsx)($e,{direction:u?"right":"left",onClick:Pe,disabled:!me,..._e}):null,e.scrollButtonEnd=t?(0,f.jsx)($e,{direction:u?"left":"right",onClick:Oe,disabled:!fe,..._e}):null,e})(),[Ue,qe]=(0,P.A)("root",{ref:t,className:(0,i.A)(ae.root,C),elementType:H,externalForwardedProps:{...Ae,...J,component:x},ownerState:se}),[Ye,Xe]=(0,P.A)("scroller",{ref:Ee,className:ae.scroller,elementType:L,externalForwardedProps:Ae,ownerState:se,additionalProps:{style:{overflow:ye.overflow,[ee?"margin"+(u?"Left":"Right"):"marginBottom"]:Q?void 0:-ye.scrollbarWidth}}}),[Qe,Je]=(0,P.A)("list",{ref:Se,className:(0,i.A)(ae.list,ae.flexContainer),elementType:$,externalForwardedProps:Ae,ownerState:se,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;const t=Se.current,n=(0,I.A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let o="horizontal"===T?"ArrowLeft":"ArrowUp",i="horizontal"===T?"ArrowRight":"ArrowDown";switch("horizontal"===T&&u&&(o="ArrowRight",i="ArrowLeft"),e.key){case o:e.preventDefault(),N(t,n,D);break;case i:e.preventDefault(),N(t,n,O);break;case"Home":e.preventDefault(),N(t,null,O);break;case"End":e.preventDefault(),N(t,null,D)}})(t),e.onKeyDown?.(t)}})});return(0,f.jsxs)(Ue,{...qe,children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,(0,f.jsxs)(Ye,{...Xe,children:[(0,f.jsx)(Qe,{"aria-label":m,"aria-labelledby":b,"aria-orientation":"vertical"===T?"vertical":null,role:"tablist",...Je,children:Ge}),ue&&We]}),Ke.scrollButtonEnd]})}));var j=n(65836);const W=o.forwardRef((function(e,t){const{children:n,...i}=e,r=(0,j.QM)();if(null===r)throw new TypeError("No TabContext provided");const s=o.Children.map(n,(e=>o.isValidElement(e)?o.cloneElement(e,{"aria-controls":(0,j.eR)(r,e.props.value),id:(0,j.vU)(r,e.props.value)}):null));return(0,f.jsx)(B,{...i,ref:t,value:r.value,children:s})}))},57536:(e,t,n)=>{"use strict";var o=n(24994).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(12897)),r=n(89569),s=(0,i.default)((0,i.default)({},r.commonLocale),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});t.default=s},57787:(e,t)=>{"use strict";var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.ForwardRef=u,t.isMemo=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case s:case r:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case m:case p:case a:return e;default:return t}}case o:return t}}}(e)===p}},58296:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(21124),i=n(4894),r=n(31355);function s({props:e,name:t}){return(0,o.A)({props:e,name:t,defaultTheme:i.A,themeId:r.A})}},58503:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(96540).createContext({})},59350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},59636:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var o=n(96540),i=n(34164),r=n(21362),s=n(26739),a=n(39241),l=n(20439),c=n(38329),u=n(90729),d=n(96148),h=n(1908);function p(e){return(0,h.Ay)("MuiAccordionSummary",e)}const m=(0,d.A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]);var g=n(85078),f=n(74848);const b=(0,s.Ay)(c.A,{name:"MuiAccordionSummary",slot:"Root"})((0,a.A)((({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",width:"100%",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${m.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${m.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${m.disabled})`]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{[`&.${m.expanded}`]:{minHeight:64}}}]}}))),v=(0,s.Ay)("span",{name:"MuiAccordionSummary",slot:"Content"})((0,a.A)((({theme:e})=>({display:"flex",textAlign:"start",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${m.expanded}`]:{margin:"20px 0"}}}]})))),w=(0,s.Ay)("span",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper"})((0,a.A)((({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${m.expanded}`]:{transform:"rotate(180deg)"}})))),y=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiAccordionSummary"}),{children:s,className:a,expandIcon:c,focusVisibleClassName:d,onClick:h,slots:m,slotProps:y,...C}=n,{disabled:x=!1,disableGutters:E,expanded:S,toggle:A}=o.useContext(u.A),k={...n,expanded:S,disabled:x,disableGutters:E},R=(e=>{const{classes:t,expanded:n,disabled:o,disableGutters:i}=e,s={root:["root",n&&"expanded",o&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,r.A)(s,p,t)})(k),M={slots:m,slotProps:y},[T,I]=(0,g.A)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,i.A)(R.root,a),elementType:b,externalForwardedProps:{...M,...C},ownerState:k,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:x,"aria-expanded":S,focusVisibleClassName:(0,i.A)(R.focusVisible,d)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),(e=>{A&&A(e),h&&h(e)})(t)}})}),[P,O]=(0,g.A)("content",{className:R.content,elementType:v,externalForwardedProps:M,ownerState:k}),[D,N]=(0,g.A)("expandIconWrapper",{className:R.expandIconWrapper,elementType:w,externalForwardedProps:M,ownerState:k});return(0,f.jsxs)(T,{...I,children:[(0,f.jsx)(P,{...O,children:s}),c&&(0,f.jsx)(D,{...N,children:c})]})}))},60436:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(43145),i=n(73893),r=n(27800);function s(e){return function(e){if(Array.isArray(e))return(0,o.A)(e)}(e)||(0,i.A)(e)||(0,r.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},60685:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=(0,n(96540).createContext)(void 0)},60957:(e,t,n)=>{"use strict";n.d(t,{T2:()=>o,gE:()=>r,vB:()=>i});const o="__TREE_VIEW_ROOT_PARENT_ID__",i=e=>{const t={};return e.forEach(((e,n)=>{t[e]=n})),t},r=(e,t)=>{if(null==t)return!1;let n=e[t];if(!n)return!1;if(n.disabled)return!0;for(;null!=n.parentId;){if(n=e[n.parentId],!n)return!1;if(n.disabled)return!0}return!1}},61053:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=(0,n(96540).createContext)({})},62279:(e,t,n)=>{"use strict";n.d(t,{QO:()=>a,TP:()=>u,lJ:()=>s,pM:()=>r,yH:()=>i});var o=n(96540);const i="ant",r="anticon",s=["outlined","borderless","filled","underlined"],a=o.createContext({getPrefixCls:(e,t)=>t||(e?`${i}-${e}`:i),iconPrefixCls:r}),{Consumer:l}=a,c={};function u(e){const t=o.useContext(a),{getPrefixCls:n,direction:i,getPopupContainer:r}=t,s=t[e];return Object.assign(Object.assign({classNames:c,styles:c},s),{getPrefixCls:n,direction:i,getPopupContainer:r})}},63518:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(9792),i=n(74848);const r=(0,o.A)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},63543:(e,t,n)=>{"use strict";n.d(t,{yh:()=>se});var o=n(98587),i=n(58168),r=n(96540),s=n(34164),a=n(8861),l=n(82777),c=n(42030),u=n(27629),d=n(53948),h=n(63248),p=n(21362),m=n(9553),g=n(26739),f=n(52658),b=n(24902),v=n(29677),w=n(41519),y=n(65658),C=n(29401),x=n(27668),E=n(31418),S=n(10786),A=n(64938),k=n(31216);const R=(0,k.M)([e=>e.lazyLoading],(e=>e.dataSource)),M=(0,k.M)([e=>e.lazyLoading],(e=>!!e?.enabled)),T=(0,k.M)([R,(e,t)=>t],((e,t)=>e.loading[t]||!1)),I=(0,k.M)([R,(e,t)=>t],((e,t)=>e.errors[t]||null));var P=n(81326);const O=e=>Array.isArray(e)?e.length>0&&e.some(O):Boolean(e);var D=n(42049),N=n(28540),H=n(80886),L=n(25149);var $=n(65348),_=n(33044),z=n(19268),F=n(9792),B=n(74848);const j=(0,F.A)((0,B.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"TreeViewExpandIcon"),W=(0,F.A)((0,B.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"TreeViewCollapseIcon");function V(e){const{slots:t,slotProps:n,status:o}=e,{slots:r,slotProps:s}=(0,z.P)(),a={collapseIcon:t?.collapseIcon??r.collapseIcon??W,expandIcon:t?.expandIcon??r.expandIcon??j,endIcon:t?.endIcon??r.endIcon,icon:t?.icon};let l;l=a?.icon?"icon":o.expandable?o.expanded?"collapseIcon":"expandIcon":"endIcon";const c=a[l],u=(0,d.A)({elementType:c,externalSlotProps:e=>(0,i.A)({},(0,_.A)(s[l],e),(0,_.A)(n?.[l],e)),ownerState:{}});return c?(0,B.jsx)(c,(0,i.A)({},u)):null}const G=(0,g.Ay)("div",{name:"MuiTreeItemDragAndDropOverlay",slot:"Root",shouldForwardProp:e=>(0,h.MC)(e)&&"action"!==e})((({theme:e})=>({position:"absolute",left:0,display:"flex",top:0,bottom:0,right:0,pointerEvents:"none",variants:[{props:{action:"make-child"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderRadius:e.shape.borderRadius,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})`:(0,l.X4)(e.palette.primary.dark,e.palette.action.focusOpacity)}},{props:{action:"reorder-above"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderTop:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"reorder-below"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}},{props:{action:"move-to-parent"},style:{marginLeft:"calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",borderBottom:`1px solid ${(e.vars||e).palette.action.active}`}}]})));function K(e){return null==e.action?null:(0,B.jsx)(G,(0,i.A)({},e))}function U(e){const{children:t,itemId:n,id:o}=e,{wrapItem:i,instance:s,store:a}=(0,v.i)(),l=(0,C.d)(a,L.U),c=(0,H.Q)({itemId:n,treeId:l,id:o});return(0,B.jsx)(r.Fragment,{children:i({children:t,itemId:n,instance:s,idAttribute:c})})}const q=(0,g.Ay)("input",{name:"MuiTreeItem",slot:"LabelInput"})((({theme:e})=>(0,i.A)({},e.typography.body1,{width:"100%",backgroundColor:(e.vars||e).palette.background.paper,borderRadius:e.shape.borderRadius,border:"none",padding:"0 2px",boxSizing:"border-box","&:focus":{outline:`1px solid ${(e.vars||e).palette.primary.main}`}}))),Y=["visible"],X=["id","itemId","label","disabled","children","slots","slotProps","classes"],Q=(0,m.h)("MuiTreeItem"),J=(0,g.Ay)("li",{name:"MuiTreeItem",slot:"Root"})({listStyle:"none",margin:0,padding:0,outline:0}),Z=(0,g.Ay)("div",{name:"MuiTreeItem",slot:"Content",shouldForwardProp:e=>(0,h.MC)(e)&&"status"!==e})((({theme:e})=>({padding:e.spacing(.5,1),paddingLeft:`calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`,borderRadius:e.shape.borderRadius,width:"100%",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",gap:e.spacing(1),cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&[data-disabled]":{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},"&[data-focused]":{backgroundColor:(e.vars||e).palette.action.focus},"&[data-selected]":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},"&[data-selected][data-focused]":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}))),ee=(0,g.Ay)("div",{name:"MuiTreeItem",slot:"Label",shouldForwardProp:e=>(0,h.MC)(e)&&"editable"!==e})((({theme:e})=>(0,i.A)({width:"100%",boxSizing:"border-box",minWidth:0,position:"relative",overflow:"hidden"},e.typography.body1,{variants:[{props:({editable:e})=>e,style:{paddingLeft:"2px"}}]}))),te=(0,g.Ay)("div",{name:"MuiTreeItem",slot:"IconContainer"})({width:16,display:"flex",flexShrink:0,justifyContent:"center",position:"relative","& svg":{fontSize:18}}),ne=(0,g.Ay)(c.A,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition})({margin:0,padding:0}),oe=(0,g.Ay)("div",{name:"MuiTreeItem",slot:"ErrorIcon"})({position:"absolute",right:-3,width:7,height:7,borderRadius:"50%",backgroundColor:"red"}),ie=(0,g.Ay)(a.A,{name:"MuiTreeItem",slot:"LoadingIcon"})({color:"text.primary"}),re=(0,g.Ay)(r.forwardRef(((e,t)=>{const{visible:n}=e,r=(0,o.A)(e,Y);return n?(0,B.jsx)(u.A,(0,i.A)({},r,{ref:t})):null})),{name:"MuiTreeItem",slot:"Checkbox"})({padding:0}),se=r.forwardRef((function(e,t){const n=Q({props:e,name:"MuiTreeItem"}),{id:a,itemId:l,label:c,disabled:u,children:h,slots:m={},slotProps:g={},classes:k}=n,R=(0,o.A)(n,X),{getContextProviderProps:_,getRootProps:F,getContentProps:j,getIconContainerProps:W,getCheckboxProps:G,getLabelProps:Y,getGroupTransitionProps:se,getLabelInputProps:ae,getDragAndDropOverlayProps:le,getErrorContainerProps:ce,getLoadingContainerProps:ue,status:de}=(e=>{const{runItemPlugins:t,instance:n,publicAPI:o,store:s}=(0,v.i)(),a=r.useContext(D.z),l=(0,C.d)(s,((...e)=>"function"==typeof a?a(...e):a),e.itemId),{id:c,itemId:u,label:d,children:h,rootRef:p}=e,{rootRef:m,contentRef:g,propsEnhancers:k}=t(e),{interactions:R,status:$}=(({itemId:e,children:t})=>{const{instance:n,store:o,publicAPI:i}=(0,v.i)(),r=(0,C.d)(o,x.Rt,e),s=(0,C.d)(o,M),a=(0,C.d)(o,A.UK),l=(0,C.d)(o,(t=>!!s&&T(t,e))),c=(0,C.d)(o,(t=>!!s&&Boolean(I(t,e)))),u=O(t)||r,d=(0,C.d)(o,x.QQ,e),h=(0,C.d)(o,E.I$,e),p=(0,C.d)(o,A.cs,e),m=(0,C.d)(o,S.lj,e),g=(0,C.d)(o,P.XG,e),f=(0,C.d)(o,P.pF,e),b={expandable:u,expanded:d,focused:h,selected:p,disabled:m,editing:g,editable:f,loading:l,error:c},k=()=>{(0,y.M)(n,w.j)&&(g?n.setEditedItem(null):n.setEditedItem(e))};return{interactions:{handleExpansion:t=>{if(b.disabled)return;b.focused||n.focusItem(t,e);const i=a&&(t.shiftKey||t.ctrlKey||t.metaKey);!b.expandable||i&&(0,x.QQ)(o.value,e)||n.setItemExpansion({event:t,itemId:e})},handleSelection:t=>{b.disabled||(b.focused||b.editing||n.focusItem(t,e),a&&(t.shiftKey||t.ctrlKey||t.metaKey)?t.shiftKey?n.expandSelectionRange(t,e):n.setItemSelection({event:t,itemId:e,keepExistingSelection:!0}):n.setItemSelection({event:t,itemId:e,shouldBeSelected:!0}))},handleCheckboxSelection:t=>{const o=t.nativeEvent.shiftKey;a&&o?n.expandSelectionRange(t,e):n.setItemSelection({event:t,itemId:e,keepExistingSelection:a,shouldBeSelected:t.target.checked})},toggleItemEditing:k,handleSaveItemLabel:(t,i)=>{(0,y.M)(n,w.j)&&(0,P.XG)(o.value,e)&&(n.updateItemLabel(e,i),k(),n.focusItem(t,e))},handleCancelItemLabelEditing:t=>{(0,y.M)(n,w.j)&&(0,P.XG)(o.value,e)&&(k(),n.focusItem(t,e))}},status:b,publicAPI:i}})({itemId:u,children:h}),_=r.useRef(null),z=r.useRef(null),F=(0,b.A)(p,m,_),B=(0,b.A)(g,z),j=r.useRef(null),W=(0,C.d)(s,L.U),V=(0,C.d)(s,A.AJ,u),G=(0,C.d)(s,A.Ye),K=(0,H.Q)({itemId:u,treeId:W,id:c}),U=(0,C.d)(s,E.U_,u),q={rootRefObject:_,contentRefObject:z,interactions:R},Y=e=>t=>{if(e.onBlur?.(t),t.defaultMuiPrevented)return;const o=n.getItemDOMElement(u);$.editing||t.relatedTarget&&(0,N.HZ)(t.relatedTarget,o)&&(t.target&&"labelInput"===t.target?.dataset?.element&&(0,N.HZ)(t.target,o)||"labelInput"===t.relatedTarget?.dataset?.element)||n.removeFocusedItem()},X=e=>t=>{e.onKeyDown?.(t),t.defaultMuiPrevented||"labelInput"===t.target?.dataset?.element||n.handleItemKeyDown(t,u)},Q=e=>t=>{e.onMouseDown?.(t),t.defaultMuiPrevented||(t.shiftKey||t.ctrlKey||t.metaKey||$.disabled)&&t.preventDefault()};return{getContextProviderProps:()=>({itemId:u,id:c}),getRootProps:(t={})=>{const o=(0,i.A)({},(0,f.A)(e),(0,f.A)(t));let r;r=!!$.selected||!V&&void 0;const a=(0,i.A)({},o,{ref:F,role:"treeitem",tabIndex:U?0:-1,id:K,"aria-expanded":$.expandable?$.expanded:void 0,"aria-selected":r,"aria-disabled":$.disabled||void 0},t,{style:(0,i.A)({},t.style??{},{"--TreeView-itemDepth":l}),onFocus:(c=o,e=>{c.onFocus?.(e),e.defaultMuiPrevented||!$.focused&&(0,S.P$)(s.value,u)&&e.currentTarget===e.target&&n.focusItem(e,u)}),onBlur:Y(o),onKeyDown:X(o)});var c;const d=k.root?.((0,i.A)({},q,{externalEventHandlers:o}))??{};return(0,i.A)({},a,d)},getContentProps:(e={})=>{const t=(0,f.A)(e),o=(0,i.A)({},t,e,{ref:B,onClick:(r=t,e=>{r.onClick?.(e),n.handleItemClick(e,u),e.defaultMuiPrevented||j.current?.contains(e.target)||("content"===(0,x.cP)(s.value)&&R.handleExpansion(e),G||R.handleSelection(e))}),onMouseDown:Q(t),status:$});var r;["expanded","selected","focused","disabled","editing","editable"].forEach((e=>{$[e]&&(o[`data-${e}`]="")}));const a=k.content?.((0,i.A)({},q,{externalEventHandlers:t}))??{};return(0,i.A)({},o,a)},getGroupTransitionProps:(e={})=>{const t=(0,f.A)(e);return(0,i.A)({},t,{unmountOnExit:!0,component:"ul",role:"group",in:$.expanded,children:h},e)},getIconContainerProps:(e={})=>{const t=(0,f.A)(e);return(0,i.A)({},t,e,{onClick:(n=t,e=>{n.onClick?.(e),e.defaultMuiPrevented||"iconContainer"===(0,x.cP)(s.value)&&R.handleExpansion(e)})});var n},getCheckboxProps:(e={})=>{const t=(0,f.A)(e),n=(0,i.A)({},t,{ref:j},e),o=k.checkbox?.((0,i.A)({},q,{externalEventHandlers:t}))??{};return(0,i.A)({},n,o)},getLabelProps:(e={})=>{const t=(0,i.A)({},(0,f.A)(e)),n=(0,i.A)({},t,{children:d},e,{onDoubleClick:(o=t,e=>{o.onDoubleClick?.(e),e.defaultMuiPrevented||R.toggleItemEditing()})});var o;const r=k.label?.((0,i.A)({},q,{externalEventHandlers:t}))??{};return(0,i.A)({},r,n)},getLabelInputProps:(e={})=>{const t=(0,f.A)(e),n=k.labelInput?.((0,i.A)({},q,{externalEventHandlers:t}))??{};return(0,i.A)({},e,n)},getDragAndDropOverlayProps:(e={})=>{const t=(0,f.A)(e),n=k.dragAndDropOverlay?.((0,i.A)({},q,{externalEventHandlers:t}))??{};return(0,i.A)({},e,n)},getErrorContainerProps:(e={})=>{const t=(0,f.A)(e);return(0,i.A)({},t,e)},getLoadingContainerProps:(e={})=>{const t=(0,f.A)(e);return(0,i.A)({size:"12px",thickness:6},t,e)},rootRef:F,status:$,publicAPI:o}})({id:a,itemId:l,children:h,label:c,disabled:u}),he=(e=>{const{classes:t}=(0,z.P)(),n=(0,i.A)({},e,{root:(0,s.A)(e?.root,t.root),content:(0,s.A)(e?.content,t.itemContent),iconContainer:(0,s.A)(e?.iconContainer,t.itemIconContainer),checkbox:(0,s.A)(e?.checkbox,t.itemCheckbox),label:(0,s.A)(e?.label,t.itemLabel),groupTransition:(0,s.A)(e?.groupTransition,t.itemGroupTransition),labelInput:(0,s.A)(e?.labelInput,t.itemLabelInput),dragAndDropOverlay:(0,s.A)(e?.dragAndDropOverlay,t.itemDragAndDropOverlay),errorIcon:(0,s.A)(e?.errorIcon,t.itemErrorIcon),loadingIcon:(0,s.A)(e?.loadingIcon,t.itemLoadingIcon)});return(0,p.A)({root:["root"],content:["content"],iconContainer:["iconContainer"],checkbox:["checkbox"],label:["label"],groupTransition:["groupTransition"],labelInput:["labelInput"],dragAndDropOverlay:["dragAndDropOverlay"],errorIcon:["errorIcon"],loadingIcon:["loadingIcon"],expanded:["expanded"],editing:["editing"],editable:["editable"],selected:["selected"],focused:["focused"],disabled:["disabled"]},$.K,n)})(k),pe=m.root??J,me=(0,d.A)({elementType:pe,getSlotProps:F,externalForwardedProps:R,externalSlotProps:g.root,additionalProps:{ref:t},ownerState:{},className:he.root}),ge=m.content??Z,fe=(0,d.A)({elementType:ge,getSlotProps:j,externalSlotProps:g.content,ownerState:{},className:(0,s.A)(he.content,de.expanded&&he.expanded,de.selected&&he.selected,de.focused&&he.focused,de.disabled&&he.disabled,de.editing&&he.editing,de.editable&&he.editable)}),be=m.iconContainer??te,ve=(0,d.A)({elementType:be,getSlotProps:W,externalSlotProps:g.iconContainer,ownerState:{},className:he.iconContainer}),we=m.label??ee,ye=(0,d.A)({elementType:we,getSlotProps:Y,externalSlotProps:g.label,ownerState:{},className:he.label}),Ce=m.checkbox??re,xe=(0,d.A)({elementType:Ce,getSlotProps:G,externalSlotProps:g.checkbox,ownerState:{},className:he.checkbox}),Ee=m.groupTransition??void 0,Se=(0,d.A)({elementType:Ee,getSlotProps:se,externalSlotProps:g.groupTransition,ownerState:{},className:he.groupTransition}),Ae=m.labelInput??q,ke=(0,d.A)({elementType:Ae,getSlotProps:ae,externalSlotProps:g.labelInput,ownerState:{},className:he.labelInput}),Re=m.dragAndDropOverlay??K,Me=(0,d.A)({elementType:Re,getSlotProps:le,externalSlotProps:g.dragAndDropOverlay,ownerState:{},className:he.dragAndDropOverlay}),Te=m.errorIcon??oe,Ie=(0,d.A)({elementType:Te,getSlotProps:ce,externalSlotProps:g.errorIcon,ownerState:{},className:he.errorIcon}),Pe=m.loadingIcon??ie,Oe=(0,d.A)({elementType:Pe,getSlotProps:ue,externalSlotProps:g.loadingIcon,ownerState:{},className:he.loadingIcon});return(0,B.jsx)(U,(0,i.A)({},_(),{children:(0,B.jsxs)(pe,(0,i.A)({},me,{children:[(0,B.jsxs)(ge,(0,i.A)({},fe,{children:[(0,B.jsxs)(be,(0,i.A)({},ve,{children:[de.error&&(0,B.jsx)(Te,(0,i.A)({},Ie)),de.loading?(0,B.jsx)(Pe,(0,i.A)({},Oe)):(0,B.jsx)(V,{status:de,slots:m,slotProps:g})]})),(0,B.jsx)(Ce,(0,i.A)({},xe)),de.editing?(0,B.jsx)(Ae,(0,i.A)({},ke)):(0,B.jsx)(we,(0,i.A)({},ye)),(0,B.jsx)(Re,(0,i.A)({},Me))]})),h&&(0,B.jsx)(ne,(0,i.A)({as:Ee},Se))]}))}))}))},64467:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(20816);function i(e,t,n){return(t=(0,o.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},64562:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(9792),i=n(74848);const r=(0,o.A)((0,i.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel")},64938:(e,t,n)=>{"use strict";n.d(t,{AJ:()=>p,BF:()=>d,Fj:()=>m,Go:()=>a,T:()=>s,UK:()=>u,Ye:()=>h,cs:()=>c});var o=n(31216),i=n(10786);const r=e=>e.selection,s=(0,o.M)([r],(e=>e.selectedItems)),a=(0,o.M)([s],(e=>Array.isArray(e)?e:null!=e?[e]:[])),l=(0,o.M)([a],(e=>{const t=new Map;return e.forEach((e=>{t.set(e,!0)})),t})),c=(0,o.M)([l,(e,t)=>t],((e,t)=>e.has(t))),u=(0,o.M)([r],(e=>e.isEnabled&&e.isMultiSelectEnabled)),d=(0,o.M)([r],(e=>e.isEnabled)),h=(0,o.M)([r],(e=>e.isCheckboxSelectionEnabled)),p=(0,o.M)([i.lj,d],((e,t)=>t&&!e)),m=(0,o.M)([r],(e=>e.selectionPropagation))},64951:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var o=n(96540),i=n(34164),r=n(21362),s=n(38329),a=n(39407),l=n(26739),c=n(39241),u=n(20439),d=n(96148),h=n(1908);function p(e){return(0,h.Ay)("MuiTab",e)}const m=(0,d.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]);var g=n(74848);const f=(0,l.Ay)(s.A,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,a.A)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${m.iconWrapper}`]:t.iconWrapper},{[`& .${m.icon}`]:t.icon}]}})((0,c.A)((({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${m.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${m.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${m.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${m.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${m.selected}`]:{opacity:1},[`&.${m.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${m.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${m.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${m.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${m.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]})))),b=o.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiTab"}),{className:s,disabled:l=!1,disableFocusRipple:c=!1,fullWidth:d,icon:h,iconPosition:m="top",indicator:b,label:v,onChange:w,onClick:y,onFocus:C,selected:x,selectionFollowsFocus:E,textColor:S="inherit",value:A,wrapped:k=!1,...R}=n,M={...n,disabled:l,disableFocusRipple:c,selected:x,icon:!!h,iconPosition:m,label:!!v,fullWidth:d,textColor:S,wrapped:k},T=(e=>{const{classes:t,textColor:n,fullWidth:o,wrapped:i,icon:s,label:l,selected:c,disabled:u}=e,d={root:["root",s&&l&&"labelIcon",`textColor${(0,a.A)(n)}`,o&&"fullWidth",i&&"wrapped",c&&"selected",u&&"disabled"],icon:["iconWrapper","icon"]};return(0,r.A)(d,p,t)})(M),I=h&&v&&o.isValidElement(h)?o.cloneElement(h,{className:(0,i.A)(T.icon,h.props.className)}):h;return(0,g.jsxs)(f,{focusRipple:!c,className:(0,i.A)(T.root,s),ref:t,role:"tab","aria-selected":x,disabled:l,onClick:e=>{!x&&w&&w(e,A),y&&y(e)},onFocus:e=>{E&&!x&&w&&w(e,A),C&&C(e)},ownerState:M,tabIndex:x?0:-1,...R,children:["top"===m||"start"===m?(0,g.jsxs)(o.Fragment,{children:[I,v]}):(0,g.jsxs)(o.Fragment,{children:[v,I]}),b]})}))},65348:(e,t,n)=>{"use strict";n.d(t,{K:()=>i,m:()=>r});var o=n(1908);function i(e){return(0,o.Ay)("MuiTreeItem",e)}const r=(0,n(96148).A)("MuiTreeItem",["root","content","groupTransition","iconContainer","label","checkbox","labelInput","dragAndDropOverlay","errorIcon","loadingIcon","expanded","selected","focused","disabled","editable","editing"])},65658:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});const o=(e,t)=>e.getAvailablePlugins().has(t)},65836:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,QM:()=>a,eR:()=>l,vU:()=>c});var o=n(96540),i=n(74848);const r=o.createContext(null);function s(e){const{children:t,value:n}=e,s=function(){const[e,t]=o.useState(null);return o.useEffect((()=>{t(`mui-p-${Math.round(1e5*Math.random())}`)}),[]),e}(),a=o.useMemo((()=>({idPrefix:s,value:n})),[s,n]);return(0,i.jsx)(r.Provider,{value:a,children:t})}function a(){return o.useContext(r)}function l(e,t){const{idPrefix:n}=e;return null===n?null:`${e.idPrefix}-P-${t}`}function c(e,t){const{idPrefix:n}=e;return null===n?null:`${e.idPrefix}-T-${t}`}},66351:(e,t,n)=>{"use strict";e.exports=n(57787)},66588:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,fk:()=>s,rb:()=>a});var o=n(82284),i=n(96540),r=n(40961);function s(e){return e instanceof HTMLElement||e instanceof SVGElement}function a(e){return e&&"object"===(0,o.A)(e)&&s(e.nativeElement)?e.nativeElement:s(e)?e:null}function l(e){var t;return a(e)||(e instanceof i.Component?null===(t=r.findDOMNode)||void 0===t?void 0:t.call(r,e):null)}},67018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"}},68210:(e,t,n)=>{"use strict";n.d(t,{$e:()=>r,Ay:()=>c});var o={},i=[];function r(e,t){}function s(e,t){}function a(e,t,n){t||o[n]||(e(!1,n),o[n]=!0)}function l(e,t){a(r,e,t)}l.preMessage=function(e){i.push(e)},l.resetWarned=function(){o={}},l.noteOnce=function(e,t){a(s,e,t)};const c=l},72552:(e,t,n)=>{var o=n(51873),i=n(659),r=n(59350),s=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):r(e)}},73738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},73893:(e,t,n)=>{"use strict";function o(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{A:()=>o})},76288:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(82284),i=Symbol.for("react.element"),r=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function a(e){return e&&"object"===(0,o.A)(e)&&(e.$$typeof===i||e.$$typeof===r)&&e.type===s}},76562:(e,t,n)=>{"use strict";function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>o})},77132:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>nt,J:()=>w,an:()=>R,Ki:()=>L,zA:()=>N,RC:()=>et,hV:()=>Q,IV:()=>Je});var o=n(64467),i=n(5544),r=n(60436),s=n(89379);const a=function(e){for(var t,n=0,o=0,i=e.length;i>=4;++o,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};var l=n(34552),c=n(96540),u=n.t(c,2),d=(n(28104),n(43210),n(23029)),h=n(92901),p="%";function m(e){return e.join(p)}const g=function(){function e(t){(0,d.A)(this,e),(0,o.A)(this,"instanceId",void 0),(0,o.A)(this,"cache",new Map),this.instanceId=t}return(0,h.A)(e,[{key:"get",value:function(e){return this.opGet(m(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(m(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();var f="data-token-hash",b="data-css-hash",v="__cssinjs_instance__";const w=c.createContext({hashPriority:"low",cache:function(){var e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(b,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[v]=t[v]||e,t[v]===e&&document.head.insertBefore(t,n)}));var o={};Array.from(document.querySelectorAll("style[".concat(b,"]"))).forEach((function(t){var n,i=t.getAttribute(b);o[i]?t[v]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):o[i]=!0}))}return new g(e)}(),defaultCache:!0});var y=n(82284),C=n(20998);new RegExp("CALC_UNIT","g");var x=function(){function e(){(0,d.A)(this,e),(0,o.A)(this,"cache",void 0),(0,o.A)(this,"keys",void 0),(0,o.A)(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return(0,h.A)(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach((function(e){var t;i=i?null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):void 0})),null!==(t=i)&&void 0!==t&&t.value&&o&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var o=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var r=this.keys.reduce((function(e,t){var n=(0,i.A)(e,2)[1];return o.internalGet(t)[1]<n?[t,o.internalGet(t)[1]]:e}),[this.keys[0],this.cacheCallTimes]),s=(0,i.A)(r,1)[0];this.delete(s)}this.keys.push(t)}var a=this.cache;t.forEach((function(e,i){if(i===t.length-1)a.set(e,{value:[n,o.cacheCallTimes++]});else{var r=a.get(e);r?r.map||(r.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}}))}},{key:"deleteByPath",value:function(e,t){var n,o=e.get(t[0]);if(1===t.length)return o.map?e.set(t[0],{map:o.map}):e.delete(t[0]),null===(n=o.value)||void 0===n?void 0:n[0];var i=this.deleteByPath(o.map,t.slice(1));return o.map&&0!==o.map.size||o.value||e.delete(t[0]),i}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter((function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)})),this.deleteByPath(this.cache,e)}}]),e}();(0,o.A)(x,"MAX_CACHE_SIZE",20),(0,o.A)(x,"MAX_CACHE_OFFSET",5);var E=n(68210),S=0,A=function(){function e(t){(0,d.A)(this,e),(0,o.A)(this,"derivatives",void 0),(0,o.A)(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=S,0===t.length&&(0,E.$e)(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),S+=1}return(0,h.A)(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),k=new x;function R(e){var t=Array.isArray(e)?e:[e];return k.has(t)||k.set(t,new A(t)),k.get(t)}var M=new WeakMap,T={},I=new WeakMap;function P(e){var t=I.get(e)||"";return t||(Object.keys(e).forEach((function(n){var o=e[n];t+=n,o instanceof A?t+=o.id:o&&"object"===(0,y.A)(o)?t+=P(o):t+=o})),t=a(t),I.set(e,t)),t}function O(e,t){return a("".concat(t,"_").concat(P(e)))}"random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var D=(0,C.A)();function N(e){return"number"==typeof e?"".concat(e,"px"):e}function H(e,t,n){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var a=(0,s.A)((0,s.A)({},r),{},(i={},(0,o.A)(i,f,t),(0,o.A)(i,b,n),i)),l=Object.keys(a).map((function(e){var t=a[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"<style ".concat(l,">").concat(e,"</style>")}var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},$=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!=n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=(0,i.A)(e,2),n=t[0],o=t[1];return"".concat(n,":").concat(o,";")})).join(""),"}"):""},_=function(e,t,n){var o={},r={};return Object.entries(e).forEach((function(e){var t,s,a=(0,i.A)(e,2),l=a[0],c=a[1];if(null!=n&&null!==(t=n.preserve)&&void 0!==t&&t[l])r[l]=c;else if(!("string"!=typeof c&&"number"!=typeof c||null!=n&&null!==(s=n.ignore)&&void 0!==s&&s[l])){var u,d=L(l,null==n?void 0:n.prefix);o[d]="number"!=typeof c||null!=n&&null!==(u=n.unitless)&&void 0!==u&&u[l]?String(c):"".concat(c,"px"),r[l]="var(".concat(d,")")}})),[r,$(o,t,{scope:null==n?void 0:n.scope})]},z=n(30981),F=(0,s.A)({},u).useInsertionEffect;const B=F?function(e,t,n){return F((function(){return e(),t()}),n)}:function(e,t,n){c.useMemo(e,n),(0,z.A)((function(){return t(!0)}),n)},j=void 0!==(0,s.A)({},u).useInsertionEffect?function(e){var t=[],n=!1;return c.useEffect((function(){return n=!1,function(){n=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){n||t.push(e)}}:function(){return function(e){e()}},W=function(){return!1};function V(e,t,n,o,s){var a=c.useContext(w).cache,l=m([e].concat((0,r.A)(t))),u=j([l]),d=(W(),function(e){a.opUpdate(l,(function(t){var o=t||[void 0,void 0],r=(0,i.A)(o,2),s=r[0],a=[void 0===s?0:s,r[1]||n()];return e?e(a):a}))});c.useMemo((function(){d()}),[l]);var h=a.opGet(l)[1];return B((function(){null==s||s(h)}),(function(e){return d((function(t){var n=(0,i.A)(t,2),o=n[0],r=n[1];return e&&0===o&&(null==s||s(h)),[o+1,r]})),function(){a.opUpdate(l,(function(t){var n=t||[],r=(0,i.A)(n,2),s=r[0],c=void 0===s?0:s,d=r[1];return 0==c-1?(u((function(){!e&&a.opGet(l)||null==o||o(d,!1)})),null):[c-1,d]}))}}),[l]),h}var G={},K="css",U=new Map,q=0;var Y=function(e,t,n,o){var i=n.getDerivativeToken(e),r=(0,s.A)((0,s.A)({},i),t);return o&&(r=o(r)),r},X="token";function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=(0,c.useContext)(w),u=o.cache.instanceId,d=o.container,h=n.salt,p=void 0===h?"":h,m=n.override,g=void 0===m?G:m,y=n.formatToken,C=n.getComputedToken,x=n.cssVar,E=function(e,n){for(var o=M,i=0;i<n.length;i+=1){var s=n[i];o.has(s)||o.set(s,new WeakMap),o=o.get(s)}return o.has(T)||o.set(T,Object.assign.apply(Object,[{}].concat((0,r.A)(t)))),o.get(T)}(0,t),S=P(E),A=P(g),k=x?P(x):"",R=V(X,[p,e.id,S,A,k],(function(){var t,n=C?C(E,g,e):Y(E,g,e,y),o=(0,s.A)({},n),r="";if(x){var l=_(n,x.key,{prefix:x.prefix,ignore:x.ignore,unitless:x.unitless,preserve:x.preserve}),c=(0,i.A)(l,2);n=c[0],r=c[1]}var u=O(n,p);n._tokenKey=u,o._tokenKey=O(o,p);var d=null!==(t=null==x?void 0:x.key)&&void 0!==t?t:u;n._themeKey=d,function(e){U.set(e,(U.get(e)||0)+1)}(d);var h="".concat(K,"-").concat(a(u));return n._hashId=h,[n,h,o,r,(null==x?void 0:x.key)||""]}),(function(e){!function(e,t){U.set(e,(U.get(e)||0)-1);var n=Array.from(U.keys()),o=n.filter((function(e){return(U.get(e)||0)<=0}));n.length-o.length>q&&o.forEach((function(e){!function(e,t){"undefined"!=typeof document&&document.querySelectorAll("style[".concat(f,'="').concat(e,'"]')).forEach((function(e){var n;e[v]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),U.delete(e)}))}(e[0]._themeKey,u)}),(function(e){var t=(0,i.A)(e,4),n=t[0],o=t[3];if(x&&o){var r=(0,l.BD)(o,a("css-variables-".concat(n._themeKey)),{mark:b,prepend:"queue",attachTo:d,priority:-999});r[v]=u,r.setAttribute(f,n._themeKey)}}));return R}var J=n(58168);const Z={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ee="comm",te="rule",ne="decl",oe="@import",ie="@namespace",re="@keyframes",se="@layer",ae=Math.abs,le=String.fromCharCode;function ce(e){return e.trim()}function ue(e,t,n){return e.replace(t,n)}function de(e,t,n){return e.indexOf(t,n)}function he(e,t){return 0|e.charCodeAt(t)}function pe(e,t,n){return e.slice(t,n)}function me(e){return e.length}function ge(e,t){return t.push(e),e}function fe(e,t){for(var n="",o=0;o<e.length;o++)n+=t(e[o],o,e,t)||"";return n}function be(e,t,n,o){switch(e.type){case se:if(e.children.length)break;case oe:case ie:case ne:return e.return=e.return||e.value;case ee:return"";case re:return e.return=e.value+"{"+fe(e.children,o)+"}";case te:if(!me(e.value=e.props.join(",")))return""}return me(n=fe(e.children,o))?e.return=e.value+"{"+n+"}":""}Object.assign;var ve=1,we=1,ye=0,Ce=0,xe=0,Ee="";function Se(e,t,n,o,i,r,s,a){return{value:e,root:t,parent:n,type:o,props:i,children:r,line:ve,column:we,length:s,return:"",siblings:a}}function Ae(){return xe=Ce>0?he(Ee,--Ce):0,we--,10===xe&&(we=1,ve--),xe}function ke(){return xe=Ce<ye?he(Ee,Ce++):0,we++,10===xe&&(we=1,ve++),xe}function Re(){return he(Ee,Ce)}function Me(){return Ce}function Te(e,t){return pe(Ee,e,t)}function Ie(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Pe(e){return ce(Te(Ce-1,Ne(91===e?e+2:40===e?e+1:e)))}function Oe(e){for(;(xe=Re())&&xe<33;)ke();return Ie(e)>2||Ie(xe)>3?"":" "}function De(e,t){for(;--t&&ke()&&!(xe<48||xe>102||xe>57&&xe<65||xe>70&&xe<97););return Te(e,Me()+(t<6&&32==Re()&&32==ke()))}function Ne(e){for(;ke();)switch(xe){case e:return Ce;case 34:case 39:34!==e&&39!==e&&Ne(xe);break;case 40:41===e&&Ne(e);break;case 92:ke()}return Ce}function He(e,t){for(;ke()&&e+xe!==57&&(e+xe!==84||47!==Re()););return"/*"+Te(t,Ce-1)+"*"+le(47===e?e:ke())}function Le(e){for(;!Ie(Re());)ke();return Te(e,Ce)}function $e(e){return function(e){return Ee="",e}(_e("",null,null,null,[""],e=function(e){return ve=we=1,ye=me(Ee=e),Ce=0,[]}(e),0,[0],e))}function _e(e,t,n,o,i,r,s,a,l){for(var c=0,u=0,d=s,h=0,p=0,m=0,g=1,f=1,b=1,v=0,w="",y=i,C=r,x=o,E=w;f;)switch(m=v,v=ke()){case 40:if(108!=m&&58==he(E,d-1)){-1!=de(E+=ue(Pe(v),"&","&\f"),"&\f",ae(c?a[c-1]:0))&&(b=-1);break}case 34:case 39:case 91:E+=Pe(v);break;case 9:case 10:case 13:case 32:E+=Oe(m);break;case 92:E+=De(Me()-1,7);continue;case 47:switch(Re()){case 42:case 47:ge(Fe(He(ke(),Me()),t,n,l),l),5!=Ie(m||1)&&5!=Ie(Re()||1)||!me(E)||" "===pe(E,-1,void 0)||(E+=" ");break;default:E+="/"}break;case 123*g:a[c++]=me(E)*b;case 125*g:case 59:case 0:switch(v){case 0:case 125:f=0;case 59+u:-1==b&&(E=ue(E,/\f/g,"")),p>0&&(me(E)-d||0===g&&47===m)&&ge(p>32?Be(E+";",o,n,d-1,l):Be(ue(E," ","")+";",o,n,d-2,l),l);break;case 59:E+=";";default:if(ge(x=ze(E,t,n,c,u,i,a,w,y=[],C=[],d,r),r),123===v)if(0===u)_e(E,t,x,x,y,r,d,a,C);else{switch(h){case 99:if(110===he(E,3))break;case 108:if(97===he(E,2))break;default:u=0;case 100:case 109:case 115:}u?_e(e,x,x,o&&ge(ze(e,x,x,0,0,i,a,w,i,y=[],d,C),C),i,C,d,a,o?y:C):_e(E,x,x,x,[""],C,0,a,C)}}c=u=p=0,g=b=1,w=E="",d=s;break;case 58:d=1+me(E),p=m;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==Ae())continue;switch(E+=le(v),v*g){case 38:b=u>0?1:(E+="\f",-1);break;case 44:a[c++]=(me(E)-1)*b,b=1;break;case 64:45===Re()&&(E+=Pe(ke())),h=Re(),u=d=me(w=E+=Le(Me())),v++;break;case 45:45===m&&2==me(E)&&(g=0)}}return r}function ze(e,t,n,o,i,r,s,a,l,c,u,d){for(var h=i-1,p=0===i?r:[""],m=function(e){return e.length}(p),g=0,f=0,b=0;g<o;++g)for(var v=0,w=pe(e,h+1,h=ae(f=s[g])),y=e;v<m;++v)(y=ce(f>0?p[v]+" "+w:ue(w,/&\f/g,p[v])))&&(l[b++]=y);return Se(e,t,n,0===i?te:a,l,c,u,d)}function Fe(e,t,n,o){return Se(e,t,n,ee,le(xe),pe(e,2,-2),0,o)}function Be(e,t,n,o,i){return Se(e,t,n,ne,pe(e,0,o),pe(e,o+1,-1),o,i)}var je,We="data-ant-cssinjs-cache-path",Ve="_FILE_STYLE__",Ge=!0;var Ke="_multi_value_";function Ue(e){return fe($e(e),be).replace(/\{%%%\:[^;];}/g,";")}var qe=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},a=o.root,l=o.injectHash,c=o.parentSelectors,u=n.hashId,d=n.layer,h=(n.path,n.hashPriority),p=n.transformers,m=void 0===p?[]:p,g=(n.linters,""),f={};function b(t){var o=t.getName(u);if(!f[o]){var r=e(t.style,n,{root:!1,parentSelectors:c}),s=(0,i.A)(r,1)[0];f[o]="@keyframes ".concat(t.getName(u)).concat(s)}}var v=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);return v.forEach((function(t){var o="string"!=typeof t||a?t:{};if("string"==typeof o)g+="".concat(o,"\n");else if(o._keyframe)b(o);else{var d=m.reduce((function(e,t){var n;return(null==t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),o);Object.keys(d).forEach((function(t){var o=d[t];if("object"!==(0,y.A)(o)||!o||"animationName"===t&&o._keyframe||function(e){return"object"===(0,y.A)(e)&&e&&("_skip_check_"in e||Ke in e)}(o)){var p;function k(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),o=t;Z[e]||"number"!=typeof o||0===o||(o="".concat(o,"px")),"animationName"===e&&null!=t&&t._keyframe&&(b(t),o=t.getName(u)),g+="".concat(n,":").concat(o,";")}var m=null!==(p=null==o?void 0:o.value)&&void 0!==p?p:o;"object"===(0,y.A)(o)&&null!=o&&o[Ke]&&Array.isArray(m)?m.forEach((function(e){k(t,e)})):k(t,m)}else{var v=!1,w=t.trim(),C=!1;(a||l)&&u?w.startsWith("@")?v=!0:w=function(e,t,n){if(!t)return e;var o=".".concat(t),i="low"===n?":where(".concat(o,")"):o;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),o=n[0]||"",s=(null===(t=o.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[o="".concat(s).concat(i).concat(o.slice(s.length))].concat((0,r.A)(n.slice(1))).join(" ")})).join(",")}("&"===w?"":t,u,h):!a||u||"&"!==w&&""!==w||(w="",C=!0);var x=e(o,n,{root:C,injectHash:v,parentSelectors:[].concat((0,r.A)(c),[w])}),E=(0,i.A)(x,2),S=E[0],A=E[1];f=(0,s.A)((0,s.A)({},f),A),g+="".concat(w).concat(S)}}))}})),a?d&&(g&&(g="@layer ".concat(d.name," {").concat(g,"}")),d.dependencies&&(f["@layer ".concat(d.name)]=d.dependencies.map((function(e){return"@layer ".concat(e,", ").concat(d.name,";")})).join("\n"))):g="{".concat(g,"}"),[g,f]};function Ye(e,t){return a("".concat(e.join("%")).concat(t))}function Xe(){return null}var Qe="style";function Je(e,t){var n=e.token,a=e.path,u=e.hashId,d=e.layer,h=e.nonce,p=e.clientOnly,m=e.order,g=void 0===m?0:m,y=c.useContext(w),x=y.autoClear,E=(y.mock,y.defaultCache),S=y.hashPriority,A=y.container,k=y.ssrInline,R=y.transformers,M=y.linters,T=y.cache,I=y.layer,P=n._tokenKey,O=[P];I&&O.push("layer"),O.push.apply(O,(0,r.A)(a));var N=D,H=V(Qe,O,(function(){var e=O.join("|");if(function(e){return function(){if(!je&&(je={},(0,C.A)())){var e=document.createElement("div");e.className=We,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=e.split(":"),n=(0,i.A)(t,2),o=n[0],r=n[1];je[o]=r}));var n,o=document.querySelector("style[".concat(We,"]"));o&&(Ge=!1,null===(n=o.parentNode)||void 0===n||n.removeChild(o)),document.body.removeChild(e)}}(),!!je[e]}(e)){var n=function(e){var t=je[e],n=null;if(t&&(0,C.A)())if(Ge)n=Ve;else{var o=document.querySelector("style[".concat(b,'="').concat(je[e],'"]'));o?n=o.innerHTML:delete je[e]}return[n,t]}(e),o=(0,i.A)(n,2),r=o[0],s=o[1];if(r)return[r,P,s,{},p,g]}var l=t(),c=qe(l,{hashId:u,hashPriority:S,layer:I?d:void 0,path:a.join("-"),transformers:R,linters:M}),h=(0,i.A)(c,2),m=h[0],f=h[1],v=Ue(m),w=Ye(O,v);return[v,P,w,f,p,g]}),(function(e,t){var n=(0,i.A)(e,3)[2];(t||x)&&D&&(0,l.m6)(n,{mark:b})}),(function(e){var t=(0,i.A)(e,4),n=t[0],o=(t[1],t[2]),r=t[3];if(N&&n!==Ve){var a={mark:b,prepend:!I&&"queue",attachTo:A,priority:g},c="function"==typeof h?h():h;c&&(a.csp={nonce:c});var u=[],d=[];Object.keys(r).forEach((function(e){e.startsWith("@layer")?u.push(e):d.push(e)})),u.forEach((function(e){(0,l.BD)(Ue(r[e]),"_layer-".concat(e),(0,s.A)((0,s.A)({},a),{},{prepend:!0}))}));var p=(0,l.BD)(n,o,a);p[v]=T.instanceId,p.setAttribute(f,P),d.forEach((function(e){(0,l.BD)(Ue(r[e]),"_effect-".concat(e),a)}))}})),L=(0,i.A)(H,3),$=L[0],_=L[1],z=L[2];return function(e){var t,n;return t=k&&!N&&E?c.createElement("style",(0,J.A)({},(n={},(0,o.A)(n,f,_),(0,o.A)(n,b,z),n),{dangerouslySetInnerHTML:{__html:$}})):c.createElement(Xe,null),c.createElement(c.Fragment,null,t,e)}}var Ze="cssVar";const et=function(e,t){var n=e.key,o=e.prefix,s=e.unitless,a=e.ignore,u=e.token,d=e.scope,h=void 0===d?"":d,p=(0,c.useContext)(w),m=p.cache.instanceId,g=p.container,y=u._tokenKey,C=[].concat((0,r.A)(e.path),[n,h,y]);return V(Ze,C,(function(){var e=t(),r=_(e,n,{prefix:o,unitless:s,ignore:a,scope:h}),l=(0,i.A)(r,2),c=l[0],u=l[1];return[c,u,Ye(C,u),n]}),(function(e){var t=(0,i.A)(e,3)[2];D&&(0,l.m6)(t,{mark:b})}),(function(e){var t=(0,i.A)(e,3),o=t[1],r=t[2];if(o){var s=(0,l.BD)(o,r,{mark:b,prepend:"queue",attachTo:g,priority:-999});s[v]=m,s.setAttribute(f,n)}}))};var tt;tt={},(0,o.A)(tt,Qe,(function(e,t,n){var o=(0,i.A)(e,6),r=o[0],s=o[1],a=o[2],l=o[3],c=o[4],u=o[5],d=(n||{}).plain;if(c)return null;var h=r,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=H(r,s,a,p,d),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=H(Ue(l[e]),s,"_effect-".concat(e),p,d);e.startsWith("@layer")?h=n+h:h+=n}})),[u,a,h]})),(0,o.A)(tt,X,(function(e,t,n){var o=(0,i.A)(e,5),r=o[2],s=o[3],a=o[4],l=(n||{}).plain;if(!s)return null;var c=r._tokenKey;return[-999,c,H(s,a,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]})),(0,o.A)(tt,Ze,(function(e,t,n){var o=(0,i.A)(e,4),r=o[1],s=o[2],a=o[3],l=(n||{}).plain;return r?[-999,s,H(r,a,s,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]:null}));const nt=function(){function e(t,n){(0,d.A)(this,e),(0,o.A)(this,"name",void 0),(0,o.A)(this,"style",void 0),(0,o.A)(this,"_keyframe",!0),this.name=t,this.style=n}return(0,h.A)(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function ot(e){return e.notSplit=!0,e}ot(["borderTop","borderBottom"]),ot(["borderTop"]),ot(["borderBottom"]),ot(["borderLeft","borderRight"]),ot(["borderLeft"]),ot(["borderRight"])},77722:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var o=n(96540),i=n(34164),r=n(21362),s=n(26739),a=n(39241),l=n(20439),c=n(42030),u=n(49565),d=n(90729),h=n(1152),p=n(85078),m=n(96148),g=n(1908);function f(e){return(0,g.Ay)("MuiAccordion",e)}const b=(0,m.A)("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]);var v=n(74848);const w=(0,s.Ay)(u.A,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${b.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})((0,a.A)((({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${b.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${b.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}})),(0,a.A)((({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${b.expanded}`]:{margin:"16px 0"}}}]})))),y=(0,s.Ay)("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),C=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiAccordion"}),{children:s,className:a,defaultExpanded:u=!1,disabled:m=!1,disableGutters:g=!1,expanded:b,onChange:C,square:x=!1,slots:E={},slotProps:S={},TransitionComponent:A,TransitionProps:k,...R}=n,[M,T]=(0,h.A)({controlled:b,default:u,name:"Accordion",state:"expanded"}),I=o.useCallback((e=>{T(!M),C&&C(e,!M)}),[M,C,T]),[P,...O]=o.Children.toArray(s),D=o.useMemo((()=>({expanded:M,disabled:m,disableGutters:g,toggle:I})),[M,m,g,I]),N={...n,square:x,disabled:m,disableGutters:g,expanded:M},H=(e=>{const{classes:t,square:n,expanded:o,disabled:i,disableGutters:s}=e,a={root:["root",!n&&"rounded",o&&"expanded",i&&"disabled",!s&&"gutters"],heading:["heading"],region:["region"]};return(0,r.A)(a,f,t)})(N),L={slots:{transition:A,...E},slotProps:{transition:k,...S}},[$,_]=(0,p.A)("root",{elementType:w,externalForwardedProps:{...L,...R},className:(0,i.A)(H.root,a),shouldForwardComponentProp:!0,ownerState:N,ref:t,additionalProps:{square:x}}),[z,F]=(0,p.A)("heading",{elementType:y,externalForwardedProps:L,className:H.heading,ownerState:N}),[B,j]=(0,p.A)("transition",{elementType:c.A,externalForwardedProps:L,ownerState:N});return(0,v.jsxs)($,{..._,children:[(0,v.jsx)(z,{...F,children:(0,v.jsx)(d.A.Provider,{value:D,children:P})}),(0,v.jsx)(B,{in:M,timeout:"auto",...j,children:(0,v.jsx)("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region",className:H.region,children:O})})]})}))},77736:(e,t,n)=>{var o=n(73738).default,i=n(89045);e.exports=function(e){var t=i(e,"string");return"symbol"==o(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},78418:(e,t,n)=>{"use strict";e.exports=n(85160)},80045:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(98587);function i(e,t){if(null==e)return{};var n,i,r=(0,o.A)(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}},80436:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var o=n(96069),i=n(89379);const r=(0,i.A)((0,i.A)({},{yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),s={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},a={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},r),timePickerLocale:Object.assign({},s)},l=a,c="${label} is not a valid ${type}",u={locale:"en",Pagination:o.A,DatePicker:a,TimePicker:s,Calendar:l,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:c,method:c,array:c,object:c,number:c,date:c,boolean:c,integer:c,float:c,regexp:c,email:c,url:c,hex:c},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}}},80886:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r,Y:()=>i});let o=0;const i=()=>(o+=1,`mui-tree-view-${o}`),r=({id:e,treeId:t="",itemId:n})=>null!=e?e:`${t}-${n}`},81326:(e,t,n)=>{"use strict";n.d(t,{XG:()=>a,pF:()=>s});var o=n(31216),i=n(10786);const r=e=>e.label,s=(0,o.M)([r,(e,t)=>(0,i.EJ)(e,t)],((e,t)=>!(!t||!e)&&("boolean"==typeof e.isItemEditable?e.isItemEditable:e.isItemEditable(t)))),a=(0,o.M)([r,(e,t)=>t],((e,t)=>!!t&&e?.editedItemId===t));(0,o.M)(r,(e=>!!e?.editedItemId))},81470:(e,t,n)=>{"use strict";n.d(t,{_q:()=>o.A});var o=n(26956);n(12533),n(8719),n(20488),n(68210)},82345:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>G});var o=n(96540),i=n.t(o,2),r=n(77132),s=n(61053),a=n(28104),l=n(20488),c=n(18877);const u=(0,o.createContext)(void 0);var d=n(80436);let h=Object.assign({},d.A.Modal),p=[];const m=()=>p.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),d.A.Modal);var g=n(60685);const f=e=>{const{locale:t={},children:n,_ANT_MARK__:i}=e;o.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return p.push(t),h=m(),()=>{p=p.filter((e=>e!==t)),h=m()}}h=Object.assign({},d.A.Modal)}(null==t?void 0:t.Modal);return e}),[t]);const r=o.useMemo((()=>Object.assign(Object.assign({},t),{exist:!0})),[t]);return o.createElement(g.A.Provider,{value:r},n)};var b=n(15265),v=n(49806),w=n(50723),y=n(62279),C=n(45748),x=n(2616),E=n(20998),S=n(34552);const A=`-ant-${Date.now()}-${Math.random()}`;var k=n(98119),R=n(48224);var M=n(43210);const T=Object.assign({},i),{useId:I}=T,P=void 0===I?()=>"":I;var O=n(90754),D=n(39319);const N=o.createContext(!0);function H(e){const t=o.useContext(N),{children:n}=e,[,i]=(0,D.Ay)(),{motion:r}=i,s=o.useRef(!1);return s.current||(s.current=t!==r),s.current?o.createElement(N.Provider,{value:r},o.createElement(O.Kq,{motion:r},n)):n}const L=()=>null;var $=n(25905);const _=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let z,F,B,j;const W=e=>{const{children:t,csp:n,autoInsertSpaceInButton:i,alert:h,anchor:p,form:m,locale:g,componentSize:C,direction:x,space:E,splitter:S,virtual:A,dropdownMatchSelectWidth:T,popupMatchSelectWidth:I,popupOverflow:O,legacyLocale:N,parentContext:z,iconPrefixCls:F,theme:B,componentDisabled:j,segmented:W,statistic:V,spin:G,calendar:K,carousel:U,cascader:q,collapse:Y,typography:X,checkbox:Q,descriptions:J,divider:Z,drawer:ee,skeleton:te,steps:ne,image:oe,layout:ie,list:re,mentions:se,modal:ae,progress:le,result:ce,slider:ue,breadcrumb:de,menu:he,pagination:pe,input:me,textArea:ge,empty:fe,badge:be,radio:ve,rate:we,switch:ye,transfer:Ce,avatar:xe,message:Ee,tag:Se,table:Ae,card:ke,tabs:Re,timeline:Me,timePicker:Te,upload:Ie,notification:Pe,tree:Oe,colorPicker:De,datePicker:Ne,rangePicker:He,flex:Le,wave:$e,dropdown:_e,warning:ze,tour:Fe,tooltip:Be,popover:je,popconfirm:We,floatButtonGroup:Ve,variant:Ge,inputNumber:Ke,treeSelect:Ue}=e,qe=o.useCallback(((t,n)=>{const{prefixCls:o}=e;if(n)return n;const i=o||z.getPrefixCls("");return t?`${i}-${t}`:i}),[z.getPrefixCls,e.prefixCls]),Ye=F||z.iconPrefixCls||y.pM,Xe=n||z.csp;((e,t)=>{const[n,o]=(0,D.Ay)();(0,r.IV)({theme:n,token:o,hashId:"",path:["ant-design-icons",e],nonce:()=>null==t?void 0:t.nonce,layer:{name:"antd"}},(()=>[(0,$.jz)(e)]))})(Ye,Xe);const Qe=function(e,t,n){var o;(0,c.rJ)("ConfigProvider");const i=e||{},r=!1!==i.inherit&&t?t:Object.assign(Object.assign({},v.sb),{hashed:null!==(o=null==t?void 0:t.hashed)&&void 0!==o?o:v.sb.hashed,cssVar:null==t?void 0:t.cssVar}),s=P();return(0,a.A)((()=>{var o,a;if(!e)return t;const l=Object.assign({},r.components);Object.keys(e.components||{}).forEach((t=>{l[t]=Object.assign(Object.assign({},l[t]),e.components[t])}));const c=`css-var-${s.replace(/:/g,"")}`,u=(null!==(o=i.cssVar)&&void 0!==o?o:r.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:null==n?void 0:n.prefixCls},"object"==typeof r.cssVar?r.cssVar:{}),"object"==typeof i.cssVar?i.cssVar:{}),{key:"object"==typeof i.cssVar&&(null===(a=i.cssVar)||void 0===a?void 0:a.key)||c});return Object.assign(Object.assign(Object.assign({},r),i),{token:Object.assign(Object.assign({},r.token),i.token),components:l,cssVar:u})}),[i,r],((e,t)=>e.some(((e,n)=>{const o=t[n];return!(0,M.A)(e,o,!0)}))))}(B,z.theme,{prefixCls:qe("")}),Je={csp:Xe,autoInsertSpaceInButton:i,alert:h,anchor:p,locale:g||N,direction:x,space:E,splitter:S,virtual:A,popupMatchSelectWidth:null!=I?I:T,popupOverflow:O,getPrefixCls:qe,iconPrefixCls:Ye,theme:Qe,segmented:W,statistic:V,spin:G,calendar:K,carousel:U,cascader:q,collapse:Y,typography:X,checkbox:Q,descriptions:J,divider:Z,drawer:ee,skeleton:te,steps:ne,image:oe,input:me,textArea:ge,layout:ie,list:re,mentions:se,modal:ae,progress:le,result:ce,slider:ue,breadcrumb:de,menu:he,pagination:pe,empty:fe,badge:be,radio:ve,rate:we,switch:ye,transfer:Ce,avatar:xe,message:Ee,tag:Se,table:Ae,card:ke,tabs:Re,timeline:Me,timePicker:Te,upload:Ie,notification:Pe,tree:Oe,colorPicker:De,datePicker:Ne,rangePicker:He,flex:Le,wave:$e,dropdown:_e,warning:ze,tour:Fe,tooltip:Be,popover:je,popconfirm:We,floatButtonGroup:Ve,variant:Ge,inputNumber:Ke,treeSelect:Ue},Ze=Object.assign({},z);Object.keys(Je).forEach((e=>{void 0!==Je[e]&&(Ze[e]=Je[e])})),_.forEach((t=>{const n=e[t];n&&(Ze[t]=n)})),void 0!==i&&(Ze.button=Object.assign({autoInsertSpace:i},Ze.button));const et=(0,a.A)((()=>Ze),Ze,((e,t)=>{const n=Object.keys(e),o=Object.keys(t);return n.length!==o.length||n.some((n=>e[n]!==t[n]))})),{layer:tt}=o.useContext(r.J),nt=o.useMemo((()=>({prefixCls:Ye,csp:Xe,layer:tt?"antd":void 0})),[Ye,Xe,tt]);let ot=o.createElement(o.Fragment,null,o.createElement(L,{dropdownMatchSelectWidth:T}),t);const it=o.useMemo((()=>{var e,t,n,o;return(0,l.h)((null===(e=d.A.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=et.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(o=et.form)||void 0===o?void 0:o.validateMessages)||{},(null==m?void 0:m.validateMessages)||{})}),[et,null==m?void 0:m.validateMessages]);Object.keys(it).length>0&&(ot=o.createElement(u.Provider,{value:it},ot)),g&&(ot=o.createElement(f,{locale:g,_ANT_MARK__:"internalMark"},ot)),(Ye||Xe)&&(ot=o.createElement(s.A.Provider,{value:nt},ot)),C&&(ot=o.createElement(R.c,{size:C},ot)),ot=o.createElement(H,null,ot);const rt=o.useMemo((()=>{const e=Qe||{},{algorithm:t,token:n,components:o,cssVar:i}=e,s=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}(e,["algorithm","token","components","cssVar"]),a=t&&(!Array.isArray(t)||t.length>0)?(0,r.an)(t):b.A,l={};Object.entries(o||{}).forEach((([e,t])=>{const n=Object.assign({},t);"algorithm"in n&&(!0===n.algorithm?n.theme=a:(Array.isArray(n.algorithm)||"function"==typeof n.algorithm)&&(n.theme=(0,r.an)(n.algorithm)),delete n.algorithm),l[e]=n}));const c=Object.assign(Object.assign({},w.A),n);return Object.assign(Object.assign({},s),{theme:a,token:c,components:l,override:Object.assign({override:c},l),cssVar:i})}),[Qe]);return B&&(ot=o.createElement(v.vG.Provider,{value:rt},ot)),et.warning&&(ot=o.createElement(c._n.Provider,{value:et.warning},ot)),void 0!==j&&(ot=o.createElement(k.X,{disabled:j},ot)),o.createElement(y.QO.Provider,{value:et},ot)},V=e=>{const t=o.useContext(y.QO),n=o.useContext(g.A);return o.createElement(W,Object.assign({parentContext:t,legacyLocale:n},e))};V.ConfigContext=y.QO,V.SizeContext=R.A,V.config=e=>{const{prefixCls:t,iconPrefixCls:n,theme:o,holderRender:i}=e;void 0!==t&&(z=t),void 0!==n&&(F=n),"holderRender"in e&&(j=i),o&&(function(e){return Object.keys(e).some((e=>e.endsWith("Color")))}(o)?function(e,t){const n=function(e,t){const n={},o=(e,t)=>{let n=e.clone();return n=(null==t?void 0:t(n))||n,n.toRgbString()},i=(e,t)=>{const i=new x.Y(e),r=(0,C.cM)(i.toRgbString());n[`${t}-color`]=o(i),n[`${t}-color-disabled`]=r[1],n[`${t}-color-hover`]=r[4],n[`${t}-color-active`]=r[6],n[`${t}-color-outline`]=i.clone().setA(.2).toRgbString(),n[`${t}-color-deprecated-bg`]=r[0],n[`${t}-color-deprecated-border`]=r[2]};if(t.primaryColor){i(t.primaryColor,"primary");const e=new x.Y(t.primaryColor),r=(0,C.cM)(e.toRgbString());r.forEach(((e,t)=>{n[`primary-${t+1}`]=e})),n["primary-color-deprecated-l-35"]=o(e,(e=>e.lighten(35))),n["primary-color-deprecated-l-20"]=o(e,(e=>e.lighten(20))),n["primary-color-deprecated-t-20"]=o(e,(e=>e.tint(20))),n["primary-color-deprecated-t-50"]=o(e,(e=>e.tint(50))),n["primary-color-deprecated-f-12"]=o(e,(e=>e.setA(.12*e.a)));const s=new x.Y(r[0]);n["primary-color-active-deprecated-f-30"]=o(s,(e=>e.setA(.3*e.a))),n["primary-color-active-deprecated-d-02"]=o(s,(e=>e.darken(2)))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),`\n :root {\n ${Object.keys(n).map((t=>`--${e}-${t}: ${n[t]};`)).join("\n")}\n }\n `.trim()}(e,t);(0,E.A)()&&(0,S.BD)(n,`${A}-dynamic-theme`)}(z||y.yH,o):B=o)},V.useConfig=function(){return{componentDisabled:(0,o.useContext)(k.A),componentSize:(0,o.useContext)(R.A)}},Object.defineProperty(V,"SizeContext",{get:()=>R.A});const G=V},82348:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]}},83009:(e,t,n)=>{"use strict";var o=n(24994).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(57536)),r=o(n(82348));const s={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},i.default),timePickerLocale:Object.assign({},r.default)};s.lang.ok="确定",t.default=s},84406:(e,t,n)=>{"use strict";n.d(t,{mu:()=>tt});class o{constructor(e){this.table=e}reloadData(e,t,n){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,n)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return void 0!==t&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,n){return this.table.deprecationAdvisor.check(e,t,n)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class i{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,n){var o,i=e?t.split(e):[t],r=i.length;for(let e=0;e<r&&(o=n=n[i[e]],n);e++);return o}static deepClone(e,t,n=[]){var o={}.__proto__,i=[].__proto__;for(var r in t||(t=Object.assign(Array.isArray(e)?[]:{},e)),e){let s,a,l=e[r];null==l||"object"!=typeof l||l.__proto__!==o&&l.__proto__!==i||(s=n.findIndex((e=>e.subject===l)),s>-1?t[r]=n[s].copy:(a=Object.assign(Array.isArray(l)?[]:{},l),n.unshift({subject:l,copy:a}),t[r]=this.deepClone(l,a,n)))}return t}}let r=class e extends o{constructor(e,t,n){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=n,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return"string"==typeof e?(e=document.querySelector(e))||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)"):!0===e&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t||!!t.parentNode&&this._checkContainerIsParent(e,t.parentNode)}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),n=t?e.touches[0].pageX:e.pageX,o=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let e=i.elOffset(this.container);n-=e.left,o-=e.top}return{x:n,y:o}}elementPositionCoords(e,t="right"){var n,o,r,s=i.elOffset(e);switch(this.container!==document.body&&(n=i.elOffset(this.container),s.left-=n.left,s.top-=n.top),t){case"right":o=s.left+e.offsetWidth,r=s.top-1;break;case"bottom":o=s.left,r=s.top+e.offsetHeight;break;case"left":o=s.left,r=s.top-1;break;case"top":o=s.left,r=s.top;break;case"center":o=s.left+e.offsetWidth/2,r=s.top+e.offsetHeight/2}return{x:o,y:r,offset:s}}show(e,t){var n,o,i,r,s;return this.destroyed||this.table.destroyed||(e instanceof HTMLElement?(i=e,r=(s=this.elementPositionCoords(e,t)).offset,n=s.x,o=s.y):"number"==typeof e?(r={top:0,left:0},n=e,o=t):(n=(s=this.containerEventCoords(e)).x,o=s.y,this.reversedX=!1),this.element.style.top=o+"px",this.element.style.left=n+"px",this.container.appendChild(this.element),"function"==typeof this.renderedCallback&&this.renderedCallback(),this._fitToScreen(n,o,i,r,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",(e=>{e.stopPropagation()}))),this}_fitToScreen(e,t,n,o,i){var r=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",this.element.style.right=n?this.container.offsetWidth-o.left+"px":this.container.offsetWidth-e+"px",this.reversedX=!0);let s=Math.max(this.container.offsetHeight,r?this.container.scrollHeight:0);t+this.element.offsetHeight>s&&(n?this.element.style.top="bottom"===i?parseInt(this.element.style.top)-this.element.offsetHeight-n.offsetHeight-1+"px":parseInt(this.element.style.top)-this.element.offsetHeight+n.offsetHeight+1+"px":this.element.style.height=s+"px")}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout((()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)}),100),this.blurCallback=e),this}_escapeCheck(e){27==e.keyCode&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(t){return this.childPopup&&this.childPopup.hide(),this.childPopup=new e(this.table,t,this),this.childPopup}};class s extends o{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){void 0===this.table[e]?this.table[e]=(...n)=>(this.table.initGuard(e),t(...n)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,n){return this.table.componentFunctionBinder.bind(e,t,n)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t,n=this.table.rowManager.displayRows.length-1;if(this._handler&&(t=this.table.rowManager.displayPipeline.findIndex((e=>e.handler===this._handler)))>-1&&(n=t),e&&(n+=e),this._handler)return n>-1?this.table.rowManager.getDisplayRows(n):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new r(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var a={rownum:function(e,t,n,o,i,r){return r.getPosition()}};class l extends s{static moduleName="accessor";static accessors=a;constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,n={};this.allowedTypes.forEach((o=>{var i,r="accessor"+(o.charAt(0).toUpperCase()+o.slice(1));e.definition[r]&&(i=this.lookupAccessor(e.definition[r]))&&(t=!0,n[r]={accessor:i,params:e.definition[r+"Params"]||{}})})),t&&(e.modules.accessor=n)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":l.accessors[e]?t=l.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e}return t}transformRow(e,t){var n="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),o=e.getComponent(),r=i.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var i,s,a,l;e.modules.accessor&&(s=e.modules.accessor[n]||e.modules.accessor.accessor||!1)&&"undefined"!=(i=e.getFieldValue(r))&&(l=e.getComponent(),a="function"==typeof s.params?s.params(i,r,t,l,o):s.params,e.setFieldValue(r,s.accessor(i,r,t,a,l,o)))})),r}}var c={method:"GET"};function u(e,t){var n=[];if(t=t||"",Array.isArray(e))e.forEach(((e,o)=>{n=n.concat(u(e,t?t+"["+o+"]":o))}));else if("object"==typeof e)for(var o in e)n=n.concat(u(e[o],t?t+"["+o+"]":o));else n.push({key:t,value:e});return n}function d(e){var t=u(e),n=[];return t.forEach((function(e){n.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))})),n.join("&")}function h(e,t,n){return e&&n&&Object.keys(n).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+d(n))),e}function p(e,t,n){var o;return new Promise(((i,r)=>{if(e=this.urlGenerator.call(this.table,e,t,n),"GET"!=t.method.toUpperCase())if(o="object"==typeof this.table.options.ajaxContentType?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType]){for(var s in o.headers)t.headers||(t.headers={}),void 0===t.headers[s]&&(t.headers[s]=o.headers[s]);t.body=o.body.call(this,e,t,n)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);e?(void 0===t.headers&&(t.headers={}),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),void 0===t.headers["X-Requested-With"]&&(t.headers["X-Requested-With"]="XMLHttpRequest"),void 0===t.mode&&(t.mode="cors"),"cors"==t.mode?(void 0===t.headers.Origin&&(t.headers.Origin=window.location.origin),void 0===t.credentials&&(t.credentials="same-origin")):void 0===t.credentials&&(t.credentials="include"),fetch(e,t).then((e=>{e.ok?e.json().then((e=>{i(e)})).catch((e=>{r(e),console.warn("Ajax Load Error - Invalid JSON returned",e)})):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),r(e))})).catch((e=>{console.error("Ajax Load Error - Connection Error: ",e),r(e)}))):(console.warn("Ajax Load Error - No URL Set"),i([]))}))}function m(e,t){var n=[];if(t=t||"",Array.isArray(e))e.forEach(((e,o)=>{n=n.concat(m(e,t?t+"["+o+"]":o))}));else if("object"==typeof e)for(var o in e)n=n.concat(m(e[o],t?t+"["+o+"]":o));else n.push({key:t,value:e});return n}var g={json:{headers:{"Content-Type":"application/json"},body:function(e,t,n){return JSON.stringify(n)}},form:{headers:{},body:function(e,t,n){var o=m(n),i=new FormData;return o.forEach((function(e){i.append(e.key,e.value)})),i}}};class f extends s{static moduleName="ajax";static defaultConfig=c;static defaultURLGenerator=h;static defaultLoaderPromise=p;static contentTypeFormatters=g;constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",(function(){})),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=f.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||f.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||f.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,n,o){var i=this.table.options.ajaxParams;return i&&("function"==typeof i&&(i=i.call(this.table)),o=Object.assign(Object.assign({},i),o)),o}requestDataCheck(e,t,n,o){return!((e||!this.url)&&"string"!=typeof e)}requestData(e,t,n,o,i){var r;return!i&&this.requestDataCheck(e)?(e&&this.setUrl(e),r=this.generateConfig(n),this.sendRequest(this.url,t,r)):i}setDefaultConfig(e={}){this.config=Object.assign({},f.defaultConfig),"string"==typeof e?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return"string"==typeof e?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,n){return!1!==this.table.options.ajaxRequesting.call(this.table,e,t)?this.loaderPromise(e,n,t).then((n=>(this.table.options.ajaxResponse&&(n=this.table.options.ajaxResponse.call(this.table,e,t,n)),n))):Promise.reject()}}var b={replace:function(e){return this.table.setData(e)},update:function(e){return this.table.updateOrAddData(e)},insert:function(e){return this.table.addData(e)}},v={table:function(e){var t=[],n=!0,o=this.table.columnManager.columns,i=[],r=[];return(e=e.split("\n")).forEach((function(e){t.push(e.split("\t"))})),!(!t.length||1===t.length&&t[0].length<2)&&(t[0].forEach((function(e){var t=o.find((function(t){return e&&t.definition.title&&e.trim()&&t.definition.title.trim()===e.trim()}));t?i.push(t):n=!1})),n||(n=!0,i=[],t[0].forEach((function(e){var t=o.find((function(t){return e&&t.field&&e.trim()&&t.field.trim()===e.trim()}));t?i.push(t):n=!1})),n||(i=this.table.columnManager.columnsByIndex)),n&&t.shift(),t.forEach((function(e){var t={};e.forEach((function(e,n){i[n]&&(t[i[n].field]=e)})),r.push(t)})),r)}},w={keybindings:{bindings:{copyToClipboard:["ctrl + 67","meta + 67"]},actions:{copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}}}};class y extends s{static moduleName="clipboard";static moduleExtensions=w;static pasteActions=b;static pasteParsers=v;constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",(e=>{var t,n,o;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(o=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),t=(n=this.table.modules.export.generateHTMLTable(o))?this.generatePlainContent(o):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),n=this.table.options.clipboardCopyFormatter("html",n))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),n&&e.clipboardData.setData("text/html",n)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),n&&e.originalEvent.clipboardData.setData("text/html",n)),this.dispatchExternal("clipboardCopied",t,n),this.reset())})),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",(e=>{this.paste(e)})),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach((e=>{var n=[];e.columns.forEach((t=>{var o="";if(t)if("group"===e.type&&(t.value=t.component.getKey()),null===t.value)o="";else switch(typeof t.value){case"object":o=JSON.stringify(t.value);break;case"undefined":o="";break;default:o=t.value}n.push(o)})),t.push(n.join("\t"))})),t.join("\n")}copy(e,t){var n,o;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=e||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?((e=document.createRange()).selectNodeContents(this.table.element),(n=window.getSelection()).toString()&&t&&(this.customSelection=n.toString()),n.removeAllRanges(),n.addRange(e)):void 0!==document.selection&&void 0!==document.body.createTextRange&&((o=document.body.createTextRange()).moveToElementText(this.table.element),o.select()),document.execCommand("copy"),n&&n.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=y.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=y.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e}}paste(e){var t,n,o;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),(n=this.pasteParser.call(this,t))?(e.preventDefault(),this.table.modExists("mutator")&&(n=this.mutateData(n)),o=this.pasteAction.call(this,n),this.dispatchExternal("clipboardPasted",t,n,o)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach((e=>{t.push(this.table.modules.mutator.transformRow(e,"clipboard"))})):t=e,t}checkPasteOrigin(e){var t=!0;return!this.confirm("clipboard-paste",[e])&&["DIV","SPAN"].includes(e.target.tagName)||(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}class C{constructor(e){return this._row=e,new Proxy(this,{get:function(e,t,n){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}getCell(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}_getSelf(){return this._row}}class x{constructor(e){return this._cell=e,new Proxy(this,{get:function(e,t,n){return void 0!==e[t]?e[t]:e._cell.table.componentFunctionBinder.handle("cell",e._cell,t)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){void 0===t&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class E extends o{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField();e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems={top:"flex-start",bottom:"flex-end",middle:"center"}[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent={left:"flex-start",right:"flex-end",center:"center"}[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass&&this.column.definition.cssClass.split(" ").forEach((t=>{e.classList.add(t)})),this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(typeof(e=this.chain("cell-format",this,null,(()=>this.element.innerHTML=this.value)))){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",null!=e&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,n){this.setValueProcessData(e,t,n)&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,n){var o=!1;return(this.value!==e||n)&&(o=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),o&&this.dispatch("cell-value-changed",this),o}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new x(this)),this.component}}class S{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(e,t,n){return void 0!==e[t]?e[t]:e._column.table.componentFunctionBinder.handle("column",e._column,t)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach((function(t){e.push(t.getComponent())})),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach((function(e){e.show()})):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach((function(e){e.hide()})):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach((function(t){e.push(t.getComponent())})),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var n=this._column.table.columnManager.findColumn(e);n?this._column.table.columnManager.moveColumn(this._column,n,t):console.warn("Move Error - No matching column found:",n)}getNextColumn(){var e=this._column.nextColumn();return!!e&&e.getComponent()}getPrevColumn(){var e=this._column.prevColumn();return!!e&&e.getComponent()}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var A={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class k extends o{static defaultOptionList=A;constructor(e,t,n){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=n,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach(((e,t)=>{var n=new k(e,this);this.attachColumn(n)})),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end"}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)void 0===this.definition[t]&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(k.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach((e=>{-1===k.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)}))}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach((function(e){e.reRegisterPosition()})):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;this.dispatch("column-layout",this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass&&e.cssClass.split(" ").forEach((e=>{this.element.classList.add(e)})),e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",(e=>{e.stopPropagation(),n.focus()})),n.addEventListener("mousedown",(e=>{e.stopPropagation()})),n.addEventListener("change",(()=>{e.title=n.value,this.dispatchExternal("columnTitleChanged",this.getComponent())})),t.appendChild(n),e.field?this.langBind("columns|"+e.field,(t=>{n.value=t||e.title||"&nbsp;"})):n.value=e.title||"&nbsp;"}else e.field?this.langBind("columns|"+e.field,(n=>{this._formatColumnHeaderTitle(t,n||e.title||"&nbsp;")})):this._formatColumnHeaderTitle(t,e.title||"&nbsp;");return t}_formatColumnHeaderTitle(e,t){var n=this.chain("column-format",[this,t,e],null,(()=>t));switch(typeof n){case"object":n instanceof Node?e.appendChild(n):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",n));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=n}}_buildGroupHeader(){this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass&&this.definition.cssClass.split(" ").forEach((e=>{this.element.classList.add(e)})),this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t,n=e,o=this.fieldStructure,i=o.length;for(let e=0;e<i&&(t=n=n[o[e]],n);e++);return t}_setFlatData(e,t){this.field&&(e[this.field]=t)}_setNestedData(e,t){var n=e,o=this.fieldStructure,i=o.length;for(let e=0;e<i;e++)if(e==i-1)n[o[e]]=t;else{if(!n[o[e]]){if(void 0===t)break;n[o[e]]={}}n=n[o[e]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,t){var n=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=n+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=n-this.contentElement.offsetHeight+"px"),this.columns.forEach((function(t){t.verticalAlign(e)}))}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach((function(e){e.clearVerticalAlign()})),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this}getLastColumn(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this}getColumns(e){var t=[];return e?this.columns.forEach((e=>{t.push(e),t=t.concat(e.getColumns(!0))})):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach((function(e){t.push(e.getDefinition(!0))})),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach((function(t){t.visible&&(e=!0)})),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.show()})),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(e){e.hide()})),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})),this.contentElement.style.maxWidth=e-1+"px",this.table.initialized&&(this.element.style.width=e+"px"),this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(e){e.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach((function(t){t.row.heightInitialized&&(null!==t.row.getElement().offsetParent?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)})),e.forEach((function(e){e.calcHeight()})),e.forEach((function(e){e.setCellHeight()}))}getWidth(){var e=0;return this.isGroup?this.columns.forEach((function(t){t.visible&&(e+=t.getWidth())})):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(e){e.setMinWidth()}))}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(e){e.setMaxWidth()}))}delete(){return new Promise(((e,t)=>{this.isGroup&&this.columns.forEach((function(e){e.delete()})),this.dispatch("column-delete",this);var n=this.cells.length;for(let e=0;e<n;e++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),this.dispatch("column-deleted",this),e()}))}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var t=new E(this,e);return this.cells.push(t),t}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._nextVisibleColumn(e+1)}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach((e=>{e.clearWidth()})));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach((e=>{var n=e.getWidth();n>t&&(t=n)})),t)){var n=t+1;e?this.setWidth(n):(this.maxInitialWidth&&!e&&(n=Math.min(n,this.maxInitialWidth)),this.setWidthActual(n))}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then((e=>(t.field==this.field&&(this.field=!1),this.delete().then((()=>e.getComponent()))))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new S(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof k&&this.parent.getComponent()}}class R{constructor(e){return this._row=e,new Proxy(this,{get:function(e,t,n){return void 0!==e[t]?e[t]:e._row.table.componentFunctionBinder.handle("row",e._row,t)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach((function(t){e.push(t.getComponent())})),e}getCell(e){var t=this._row.getCell(e);return!!t&&t.getComponent()}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e?e.getComponent():e}getPrevRow(){var e=this._row.prevRow();return e?e.getComponent():e}}class M extends o{constructor(e,t,n="row"){super(t.table),this.parent=t,this.data={},this.type=n,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach((e=>{e.cellRendered()}))}reinitializeHeight(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,n=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(n=this.calcMinHeight(),t=this.calcMaxHeight(),this.height=e?Math.max(t,n):this.manualHeight?this.height:Math.max(t,n)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach((function(t){var n=t.getHeight();n>e&&(e=n)})),e}setCellHeight(){this.cells.forEach((function(e){e.setHeight()})),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach((function(e){e.clearHeight()}))}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t,n=this.element&&i.elVisible(this.element),o={};return new Promise(((i,r)=>{"string"==typeof e&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(o=Object.assign(o,this.data),o=Object.assign(o,e)),t=this.chain("row-data-changing",[this,o,e],null,e);for(let e in t)this.data[e]=t[e];this.dispatch("row-data-save-after",this);for(let o in e)this.table.columnManager.getColumnsByFieldRoot(o).forEach((e=>{let o=this.getCell(e.getField());if(o){let i=e.getFieldValue(t);o.getValue()!==i&&(o.setValueProcessData(i),n&&o.cellRendered())}}));n?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,n,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),i()}))}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){return e=this.table.columnManager.findColumn(e),this.initialized||0!==this.cells.length||this.generateCells(),this.cells.find((function(t){return t.column===e}))}getCellIndex(e){return this.cells.findIndex((function(t){return t===e}))}findCell(e){return this.cells.find((t=>t.element===e))}getCells(){return this.initialized||0!==this.cells.length||this.generateCells(),this.cells}nextRow(){return this.table.rowManager.nextDisplayRow(this,!0)||!1}prevRow(){return this.table.rowManager.prevDisplayRow(this,!0)||!1}moveToRow(e,t){var n=this.table.rowManager.findRow(e);n?(this.table.rowManager.moveRowActual(this,n,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t<e;t++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return!!this.isDisplayed()&&this.position}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach((e=>{e(this.position)})))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new R(this)),this.component}}var T={avg:function(e,t,n){var o=0,i=void 0!==n.precision?n.precision:2;return e.length&&(o=e.reduce((function(e,t){return Number(e)+Number(t)})),o/=e.length,o=!1!==i?o.toFixed(i):o),parseFloat(o).toString()},max:function(e,t,n){var o=null,i=void 0!==n.precision&&n.precision;return e.forEach((function(e){((e=Number(e))>o||null===o)&&(o=e)})),null!==o?!1!==i?o.toFixed(i):o:""},min:function(e,t,n){var o=null,i=void 0!==n.precision&&n.precision;return e.forEach((function(e){((e=Number(e))<o||null===o)&&(o=e)})),null!==o?!1!==i?o.toFixed(i):o:""},sum:function(e,t,n){var o=0,i=void 0!==n.precision&&n.precision;return e.length&&e.forEach((function(e){e=Number(e),o+=isNaN(e)?0:Number(e)})),!1!==i?o.toFixed(i):o},concat:function(e,t,n){var o=0;return e.length&&(o=e.reduce((function(e,t){return String(e)+String(t)}))),o},count:function(e,t,n){var o=0;return e.length&&e.forEach((function(e){e&&o++})),o},unique:function(e,t,n){return e.filter(((t,n)=>(e||0===t)&&e.indexOf(t)===n)).length}};class I extends s{static moduleName="columnCalcs";static calculations=T;constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new k({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?("table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs||this.recalcActiveRows(),"table"!=this.table.options.columnCalcs&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,n={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":I.calculations[t.topCalc]?n.topCalc=I.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":n.topCalc=t.topCalc}n.topCalc&&(e.modules.columnCalcs=n,this.topCalcs.push(e),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":I.calculations[t.bottomCalc]?n.botCalc=I.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":n.botCalc=t.bottomCalc}n.botCalc&&(e.modules.columnCalcs=n,this.botCalcs.push(e),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,n;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),n=this.generateRow("top",t),this.topRow=n;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(n.getElement()),n.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),n=this.generateRow("bottom",t),this.botRow=n;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(n.getElement()),n.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){(this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalcActiveRows(),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs&&this.table.modules.groupRows.getChildGroups().forEach((e=>{this.recalcGroup(e)})))}recalcGroup(e){var t,n;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),n=this.generateRowData("bottom",t),e.calcs.bottom.updateData(n),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),n=this.generateRowData("top",t),e.calcs.top.updateData(n),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],n=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,o=this.table.modules.dataTree;return e.forEach((e=>{t.push(e.getData()),n&&e.modules.dataTree?.open&&this.rowsToData(o.getFilteredTreeChildren(e)).forEach((n=>{t.push(e)}))})),t}generateRow(e,t){var n,o=this.generateRowData(e,t);return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),n=new M(o,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),n.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),n.component=!1,n.getComponent=()=>(n.component||(n.component=new C(n)),n.component),n.generateCells=()=>{var t=[];this.table.columnManager.columnsByIndex.forEach((o=>{this.genColumn.setField(o.getField()),this.genColumn.hozAlign=o.hozAlign,o.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter(o.definition[e+"CalcFormatter"]),params:o.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=o.definition.cssClass;var i=new E(this.genColumn,n);i.getElement(),i.column=o,i.setWidth(),o.cells.push(i),t.push(i),o.visible||i.hide()})),n.cells=t},n}generateRowData(e,t){var n,o,i={},r="top"==e?this.topCalcs:this.botCalcs,s="top"==e?"topCalc":"botCalc";return r.forEach((function(e){var r=[];e.modules.columnCalcs&&e.modules.columnCalcs[s]&&(t.forEach((function(t){r.push(e.getFieldValue(t))})),o=s+"Params",n="function"==typeof e.modules.columnCalcs[o]?e.modules.columnCalcs[o](r,t):e.modules.columnCalcs[o],e.setFieldValue(i,e.modules.columnCalcs[s](r,t,n)))})),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.getGroups(!0).forEach((t=>{e[t.getKey()]=this.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),n=e.getSubGroups(),o={};return n.forEach((e=>{o[e.getKey()]=this.getGroupResults(e)})),{top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:o}}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}var P={csv:function(e,t={},n){var o=t.delimiter?t.delimiter:",",i=[],r=[];e.forEach((e=>{var t=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(((e,t)=>{e&&1===e.depth&&(r[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')}));break;case"row":e.columns.forEach((e=>{if(e){switch(typeof e.value){case"object":e.value=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":e.value=""}t.push('"'+String(e.value).split('"').join('""')+'"')}})),i.push(t.join(o))}})),r.length&&i.unshift(r.join(o)),i=i.join("\n"),t.bom&&(i="\ufeff"+i),n(i,"text/csv")},json:function(e,t,n){var o=[];e.forEach((e=>{var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((e=>{e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),o.push(t)}})),n(o=JSON.stringify(o,null,"\t"),"application/json")},jsonLines:function(e,t,n){const o=[];e.forEach((e=>{const t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach((e=>{e&&(t[e.component.getTitleDownload()||e.component.getField()]=e.value)})),o.push(JSON.stringify(t))}})),n(o.join("\n"),"application/x-ndjson")},pdf:function(e,t={},n){var o,i,r=[],s=[],a={},l=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},c=t.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},u=t.jsPDF||{},d=t.title?t.title:"";function h(e,t){var n=[];return e.columns.forEach((e=>{var o;if(e){switch(typeof e.value){case"object":e.value=null!==e.value?JSON.stringify(e.value):"";break;case"undefined":e.value=""}o={content:e.value,colSpan:e.width,rowSpan:e.height},t&&(o.styles=t),n.push(o)}})),n}u.orientation||(u.orientation=t.orientation||"landscape"),u.unit||(u.unit="pt"),e.forEach((e=>{switch(e.type){case"header":r.push(h(e));break;case"group":s.push(h(e,l));break;case"calc":s.push(h(e,c));break;case"row":s.push(h(e))}})),o=this.dependencyRegistry.lookup("jspdf","jsPDF"),i=new o(u),t.autoTable&&(a="function"==typeof t.autoTable?t.autoTable(i)||{}:t.autoTable),d&&(a.didDrawPage=function(e){i.text(d,40,30)}),a.head=r,a.body=s,i.autoTable(a),t.documentProcessing&&t.documentProcessing(i),n(i.output("arraybuffer"),"application/pdf")},xlsx:function(e,t,n){var i=t.sheetName||"Sheet1",r=this.dependencyRegistry.lookup("XLSX"),s=r.utils.book_new(),a=new o(this),l=!("compress"in t)||t.compress,c=t.writeOptions||{bookType:"xlsx",bookSST:!0,compression:l};function u(){var t=[],n=[],o={},i={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(((e,t)=>e+(t&&t.width?t.width:1)),0):0,r:e.length}};return e.forEach(((e,o)=>{var i=[];e.columns.forEach((function(e,t){e?(i.push(e.value instanceof Date||"object"!=typeof e.value?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&(e.height>1||e.width>1)&&n.push({s:{r:o,c:t},e:{r:o+e.height-1,c:t+e.width-1}})):i.push("")})),t.push(i)})),r.utils.sheet_add_aoa(o,t),o["!ref"]=r.utils.encode_range(i),n.length&&(o["!merges"]=n),o}if(c.type="binary",s.SheetNames=[],s.Sheets={},t.sheetOnly)n(u());else{if(t.sheets)for(var d in t.sheets)!0===t.sheets[d]?(s.SheetNames.push(d),s.Sheets[d]=u()):(s.SheetNames.push(d),a.commsSend(t.sheets[d],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(e){s.Sheets[d]=e}}));else s.SheetNames.push(i),s.Sheets[i]=u();t.documentProcessing&&(s=t.documentProcessing(s)),n(function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),o=0;o!=e.length;++o)n[o]=255&e.charCodeAt(o);return t}(r.write(s,c)),"application/octet-stream")}},html:function(e,t,n){this.modExists("export",!0)&&n(this.modules.export.generateHTMLTable(e),"text/html")}};class O extends s{static moduleName="download";static downloaders=P;constructor(e){super(e),this.registerTableOption("downloadEncoder",(function(e,t){return new Blob([e],{type:t})})),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){}downloadToTab(e,t,n,o){this.download(e,t,n,o,!0)}download(e,t,n,o,i){var r=!1;if("function"==typeof e?r=e:O.downloaders[e]?r=O.downloaders[e]:console.warn("Download Error - No such download type found: ",e),r){var s=this.generateExportList(o);r.call(this.table,s,n||{},function(n,o){i?!0===i?this.triggerDownload(n,o,e,t,!0):i(n):this.triggerDownload(n,o,e,t)}.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),n=this.table.options.groupHeaderDownload;return n&&!Array.isArray(n)&&(n=[n]),t.forEach((e=>{var t;"group"===e.type&&(t=e.columns[0],n&&n[e.indent]&&(t.value=n[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))})),t}triggerDownload(e,t,n,o,i){var r=document.createElement("a"),s=this.table.options.downloadEncoder(e,t);s&&(i?window.open(window.URL.createObjectURL(s)):(o=o||"Tabulator."+("function"==typeof n?"txt":n),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(s,o):(r.setAttribute("href",window.URL.createObjectURL(s)),r.setAttribute("download",o),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,n){"intercept"===t&&this.download(n.type,"",n.options,n.active,n.intercept)}}function D(e,t){var n=t.mask,o=void 0!==t.maskLetterChar?t.maskLetterChar:"A",i=void 0!==t.maskNumberChar?t.maskNumberChar:"9",r=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*";function s(t){var a=n[t];void 0!==a&&a!==r&&a!==o&&a!==i&&(e.value=e.value+""+a,s(t+1))}e.addEventListener("keydown",(t=>{var s=e.value.length,a=t.key;if(t.keyCode>46&&!t.ctrlKey&&!t.metaKey){if(s>=n.length)return t.preventDefault(),t.stopPropagation(),!1;switch(n[s]){case o:if(a.toUpperCase()==a.toLowerCase())return t.preventDefault(),t.stopPropagation(),!1;break;case i:if(isNaN(a))return t.preventDefault(),t.stopPropagation(),!1;break;case r:break;default:if(a!==n[s])return t.preventDefault(),t.stopPropagation(),!1}}})),e.addEventListener("keyup",(n=>{n.keyCode>46&&t.maskAutoFill&&s(e.value.length)})),e.placeholder||(e.placeholder=n),t.maskAutoFill&&s(e.value.length)}let N=class{constructor(e,t,n,o,i,r){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(r),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter="header"===t.getType(),this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:o,cancel:i},this._deprecatedOptionsCheck(),this._initializeValue(),n(this._onRendered.bind(this))}_deprecatedOptionsCheck(){}_initializeValue(){var e=this.cell.getValue();void 0===e&&void 0!==this.params.defaultValue&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(e){e.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),e.addEventListener("click",t),setTimeout((()=>{e.removeEventListener("click",t)}),1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(!0===this.params.maxWidth?this.listEl.style.maxWidth=e.offsetWidth+"px":"number"==typeof this.params.maxWidth?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&"object"==typeof e)for(let n in e)"+"==n.charAt(0)?(n=n.slice(1),t.setAttribute(n,t.getAttribute(n)+e["+"+n])):t.setAttribute(n,e[n]);return this.params.mask&&D(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t,n=["values","valuesURL","valuesLookup"];return(e=Object.assign({},e)).verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=void 0===e.placeholderLoading?"Searching ...":e.placeholderLoading,e.placeholderEmpty=void 0===e.placeholderEmpty?"No Results Found":e.placeholderEmpty,e.filterDelay=void 0===e.filterDelay?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",(t=Object.keys(e).filter((e=>n.includes(e))).length)?t>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&"function"!=typeof e.valuesLookup&&!e.valuesURL&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout((()=>{this.rebuildOptionsList()}),this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:this._keyTab(e);break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout((()=>{this.popup&&this.popup.restoreHide()}),10)}_preventBlur(){this.blurable=!1,setTimeout((()=>{this.blurable=!0}),10)}_keyTab(e){this.params.autocomplete&&"typing"===this.lastAction?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);("editor"==this.params.verticalNavigation||"hybrid"==this.params.verticalNavigation&&t<this.displayItems.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<this.displayItems.length-1&&(-1==t?this._focusItem(this.displayItems[0]):this._focusItem(this.displayItems[t+1])))}_keySide(e){this.params.autocomplete||(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}_keyEnter(e){this.params.autocomplete&&"typing"===this.lastAction?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem)}_keyEsc(e){this._cancel()}_keyHomeEnd(e){this.params.autocomplete&&e.stopImmediatePropagation()}_keySelectLetter(e){this.params.autocomplete||(e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var n=this.displayItems.find((e=>void 0!==e.label&&e.label.toLowerCase().startsWith(this.filterTerm)));n&&this._focusItem(n),this.filterTimeout=setTimeout((()=>{this.filterTerm=""}),800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch((e=>{Number.isInteger(e)||console.error("List generation error",e)}))}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],n=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):"function"==typeof this.params.valuesLookup?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then((e=>this.listIteration===n?this._parseList(e):Promise.reject(n)))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");"function"==typeof e&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){return e=h(e,{},this.params.filterRemote?{term:t}:{}),fetch(e).then((e=>e.ok?e.json().catch((e=>(console.warn("List Ajax Load Error - Invalid JSON returned",e),Promise.reject(e)))):(console.error("List Ajax Load Error - Connection Error: "+e.status,e.statusText),Promise.reject(e)))).catch((e=>(console.error("List Ajax Load Error - Connection Error: ",e),Promise.reject(e))))}_uniqueColumnValues(e){var t,n={},o=this.table.getData(this.params.valuesLookup);return(t=e?this.table.columnManager.getColumnByField(e):this.cell.getColumn()._getSelf())?o.forEach((e=>{var o=t.getFieldValue(e);this._emptyValueCheck(o)||(this.params.multiselect&&Array.isArray(o)?o.forEach((e=>{this._emptyValueCheck(e)||(n[e]=!0)})):n[o]=!0)})):(console.warn("unable to find matching column to create select lookup list:",e),n=[]),Object.keys(n)}_emptyValueCheck(e){return null==e||""===e}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map((([e,t])=>({label:t,value:e})))),e.forEach((e=>{"object"!=typeof e&&(e={label:e,value:e}),this._parseListItem(e,t,0)})),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,n){var o={};e.options?o=this._parseListGroup(e,n+1):(o={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:n,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(o,!0)),t.push(o)}_parseListGroup(e,t){var n={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach((e=>{this._parseListItem(e,n.options,t)})),n}_sortOptions(e){var t;return this.params.sort&&(t="function"==typeof this.params.sort?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort(((t,n)=>e(t.label,n.label,t.value,n.value,t.original,n.original))),t.forEach((t=>{t.group&&this._sortGroup(e,t.options)}))}_defaultSortFunction(e,t){var n,o,i,r,s,a=0,l=/(\d+)|(\D+)/g,c=/\d/,u=0;if("desc"===this.params.sort&&([e,t]=[t,e]),e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((n=String(e).toLowerCase())===(o=String(t).toLowerCase()))return 0;if(!c.test(n)||!c.test(o))return n>o?1:-1;for(n=n.match(l),o=o.match(l),s=n.length>o.length?o.length:n.length;a<s;)if((i=n[a])!==(r=o[a++]))return isFinite(i)&&isFinite(r)?("0"===i.charAt(0)&&(i="."+i),"0"===r.charAt(0)&&(r="."+r),i-r):i>r?1:-1;return n.length>o.length}u=1}else u=t||0===t?-1:0;return u}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach((n=>{this._filterItem(e,t,n)}))):this.filtered=!1,this.data}_filterItem(e,t,n){var o=!1;return n.group?(n.options.forEach((n=>{this._filterItem(e,t,n)&&(o=!0)})),n.visible=o):n.visible=e(t,n.label,n.value,n.original),n.visible}_defaultFilterFunc(e,t,n,o){return e=String(e).toLowerCase(),null!=t&&(String(t).toLowerCase().indexOf(e)>-1||String(n).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach((e=>{this._buildItem(e)})),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t,n=e.element;if(!this.filtered||e.visible){if(!n){if((n=document.createElement("div")).tabIndex=0,(t=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,n):e.label)instanceof HTMLElement?n.appendChild(t):n.innerHTML=t,e.group?n.classList.add("tabulator-edit-list-group"):n.classList.add("tabulator-edit-list-item"),n.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&"object"==typeof e.elementAttributes)for(let t in e.elementAttributes)"+"==t.charAt(0)?(t=t.slice(1),n.setAttribute(t,this.input.getAttribute(t)+e.elementAttributes["+"+t])):n.setAttribute(t,e.elementAttributes[t]);e.group?n.addEventListener("click",this._groupClick.bind(this,e)):n.addEventListener("click",this._itemClick.bind(this,e)),n.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=n}this._styleItem(e),this.listEl.appendChild(n),e.group?e.options.forEach((e=>{this._buildItem(e)})):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&""===this.input.value&&!this.params.listOnEmpty)return void(this.popup&&this.popup.hide(!0));this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout((()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))}),10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach((e=>{e.selected=!1,this._styleItem(e)})),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var n;this.typing=!1,this.params.multiselect?((n=this.currentItems.indexOf(e))>-1?(this.currentItems.splice(n,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map((e=>e.label)).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,n;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map((e=>e.value));else if(e&&this.params.autocomplete&&this.typing){if(!(this.params.freetext||this.params.allowEmpty&&""===this.input.value))return void this.actions.cancel();t=this.input.value}else t=this.currentItems[0]?this.currentItems[0].value:null==(n=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues)||""===n?n:this.params.emptyValue;""===t&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}};var H={input:function(e,t,n,o,i){var r=e.getValue(),s=document.createElement("input");if(s.setAttribute("type",i.search?"search":"text"),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),s.setAttribute(e,s.getAttribute(e)+i.elementAttributes["+"+e])):s.setAttribute(e,i.elementAttributes[e]);function a(e){null==r&&""!==s.value||s.value!==r?n(s.value)&&(r=s.value):o()}return s.value=void 0!==r?r:"",t((function(){"cell"===e.getType()&&(s.focus({preventScroll:!0}),s.style.height="100%",i.selectContents&&s.select())})),s.addEventListener("change",a),s.addEventListener("blur",a),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:a();break;case 27:o();break;case 35:case 36:e.stopPropagation()}})),i.mask&&D(s,i),s},textarea:function(e,t,n,o,i){var r=e.getValue(),s=i.verticalNavigation||"hybrid",a=String(null!=r?r:""),l=document.createElement("textarea"),c=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),l.setAttribute(e,l.getAttribute(e)+i.elementAttributes["+"+e])):l.setAttribute(e,i.elementAttributes[e]);function u(t){null==r&&""!==l.value||l.value!==r?(n(l.value)&&(r=l.value),setTimeout((function(){e.getRow().normalizeHeight()}),300)):o()}return l.value=a,t((function(){"cell"===e.getType()&&(l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",e.getRow().normalizeHeight(),i.selectContents&&l.select())})),l.addEventListener("change",u),l.addEventListener("blur",u),l.addEventListener("keyup",(function(){l.style.height="";var t=l.scrollHeight;l.style.height=t+"px",t!=c&&(c=t,e.getRow().normalizeHeight())})),l.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:e.shiftKey&&i.shiftEnterSubmit&&u();break;case 27:o();break;case 38:("editor"==s||"hybrid"==s&&l.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==s||"hybrid"==s&&l.selectionStart!==l.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),i.mask&&D(l,i),l},number:function(e,t,n,o,i){var r=e.getValue(),s=i.verticalNavigation||"editor",a=document.createElement("input");if(a.setAttribute("type","number"),void 0!==i.max&&a.setAttribute("max",i.max),void 0!==i.min&&a.setAttribute("min",i.min),void 0!==i.step&&a.setAttribute("step",i.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),a.setAttribute(e,a.getAttribute(e)+i.elementAttributes["+"+e])):a.setAttribute(e,i.elementAttributes[e]);a.value=r;var l=function(e){c()};function c(){var e=a.value;isNaN(e)||""===e||(e=Number(e)),e!==r?n(e)&&(r=e):o()}return t((function(){"cell"===e.getType()&&(a.removeEventListener("blur",l),a.focus({preventScroll:!0}),a.style.height="100%",a.addEventListener("blur",l),i.selectContents&&a.select())})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:c();break;case 27:o();break;case 38:case 40:"editor"==s&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}})),i.mask&&D(a,i),a},range:function(e,t,n,o,i){var r=e.getValue(),s=document.createElement("input");if(s.setAttribute("type","range"),void 0!==i.max&&s.setAttribute("max",i.max),void 0!==i.min&&s.setAttribute("min",i.min),void 0!==i.step&&s.setAttribute("step",i.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),s.setAttribute(e,s.getAttribute(e)+i.elementAttributes["+"+e])):s.setAttribute(e,i.elementAttributes[e]);function a(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!=r?n(e)&&(r=e):o()}return s.value=r,t((function(){"cell"===e.getType()&&(s.focus({preventScroll:!0}),s.style.height="100%")})),s.addEventListener("blur",(function(e){a()})),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:a();break;case 27:o()}})),s},date:function(e,t,n,o,i){var r=i.format,s=i.verticalNavigation||"editor",a=r?window.DateTime||luxon.DateTime:null,l=e.getValue(),c=document.createElement("input");function u(e){return(a.isDateTime(e)?e:"iso"===r?a.fromISO(String(e)):a.fromFormat(String(e),r)).toFormat("yyyy-MM-dd")}if(c.type="date",c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",i.max&&c.setAttribute("max",r?u(i.max):i.max),i.min&&c.setAttribute("min",r?u(i.min):i.min),i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),c.setAttribute(e,c.getAttribute(e)+i.elementAttributes["+"+e])):c.setAttribute(e,i.elementAttributes[e]);function d(){var e,t=c.value;if(null==l&&""!==t||t!==l){if(t&&r)switch(e=a.fromFormat(String(t),"yyyy-MM-dd"),r){case!0:t=e;break;case"iso":t=e.toISO();break;default:t=e.toFormat(r)}n(t)&&(l=c.value)}else o()}return l=void 0!==l?l:"",r&&(a?l=u(l):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),c.value=l,t((function(){"cell"===e.getType()&&(c.focus({preventScroll:!0}),c.style.height="100%",i.selectContents&&c.select())})),c.addEventListener("blur",(function(e){(e.relatedTarget||e.rangeParent||e.explicitOriginalTarget!==c)&&d()})),c.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:o();break;case 35:case 36:e.stopPropagation();break;case 38:case 40:"editor"==s&&(e.stopImmediatePropagation(),e.stopPropagation())}})),c},time:function(e,t,n,o,i){var r,s=i.format,a=i.verticalNavigation||"editor",l=s?window.DateTime||luxon.DateTime:null,c=e.getValue(),u=document.createElement("input");if(u.type="time",u.style.padding="4px",u.style.width="100%",u.style.boxSizing="border-box",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),u.setAttribute(e,u.getAttribute(e)+i.elementAttributes["+"+e])):u.setAttribute(e,i.elementAttributes[e]);function d(){var e,t=u.value;if(null==c&&""!==t||t!==c){if(t&&s)switch(e=l.fromFormat(String(t),"hh:mm"),s){case!0:t=e;break;case"iso":t=e.toISO();break;default:t=e.toFormat(s)}n(t)&&(c=u.value)}else o()}return c=void 0!==c?c:"",s&&(l?(r=l.isDateTime(c)?c:"iso"===s?l.fromISO(String(c)):l.fromFormat(String(c),s),c=r.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),u.value=c,t((function(){"cell"==e.getType()&&(u.focus({preventScroll:!0}),u.style.height="100%",i.selectContents&&u.select())})),u.addEventListener("blur",(function(e){(e.relatedTarget||e.rangeParent||e.explicitOriginalTarget!==u)&&d()})),u.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:o();break;case 35:case 36:e.stopPropagation();break;case 38:case 40:"editor"==a&&(e.stopImmediatePropagation(),e.stopPropagation())}})),u},datetime:function(e,t,n,o,i){var r,s=i.format,a=i.verticalNavigation||"editor",l=s?this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"):null,c=e.getValue(),u=document.createElement("input");if(u.type="datetime-local",u.style.padding="4px",u.style.width="100%",u.style.boxSizing="border-box",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),u.setAttribute(e,u.getAttribute(e)+i.elementAttributes["+"+e])):u.setAttribute(e,i.elementAttributes[e]);function d(){var e,t=u.value;if(null==c&&""!==t||t!==c){if(t&&s)switch(e=l.fromISO(String(t)),s){case!0:t=e;break;case"iso":t=e.toISO();break;default:t=e.toFormat(s)}n(t)&&(c=u.value)}else o()}return c=void 0!==c?c:"",s&&(l?(r=l.isDateTime(c)?c:"iso"===s?l.fromISO(String(c)):l.fromFormat(String(c),s),c=r.toFormat("yyyy-MM-dd")+"T"+r.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),u.value=c,t((function(){"cell"===e.getType()&&(u.focus({preventScroll:!0}),u.style.height="100%",i.selectContents&&u.select())})),u.addEventListener("blur",(function(e){(e.relatedTarget||e.rangeParent||e.explicitOriginalTarget!==u)&&d()})),u.addEventListener("keydown",(function(e){switch(e.keyCode){case 13:d();break;case 27:o();break;case 35:case 36:e.stopPropagation();break;case 38:case 40:"editor"==a&&(e.stopImmediatePropagation(),e.stopPropagation())}})),u},list:function(e,t,n,o,i){return new N(this,e,t,n,o,i).input},star:function(e,t,n,o,i){var r=this,s=e.getElement(),a=e.getValue(),l=s.getElementsByTagName("svg").length||5,c=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,u=[],d=document.createElement("div"),h=document.createElementNS("http://www.w3.org/2000/svg","svg");function p(e){u.forEach((function(t,n){n<e?("ie"==r.table.browser?t.setAttribute("class","tabulator-star-active"):t.classList.replace("tabulator-star-inactive","tabulator-star-active"),t.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')}))}function m(e){var t=document.createElement("span"),o=h.cloneNode(!0);u.push(o),t.addEventListener("mouseenter",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),p(e)})),t.addEventListener("mousemove",(function(e){e.stopPropagation(),e.stopImmediatePropagation()})),t.addEventListener("click",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),n(e),s.blur()})),t.appendChild(o),d.appendChild(t)}function g(e){a=e,p(e)}if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",d.style.verticalAlign="middle",d.style.display="inline-block",d.style.padding="4px",h.setAttribute("width",c),h.setAttribute("height",c),h.setAttribute("viewBox","0 0 512 512"),h.setAttribute("xml:space","preserve"),h.style.padding="0 1px",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),d.setAttribute(e,d.getAttribute(e)+i.elementAttributes["+"+e])):d.setAttribute(e,i.elementAttributes[e]);for(var f=1;f<=l;f++)m(f);return p(a=Math.min(parseInt(a),l)),d.addEventListener("mousemove",(function(e){p(0)})),d.addEventListener("click",(function(e){n(0)})),s.addEventListener("blur",(function(e){o()})),s.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:g(a+1);break;case 37:g(a-1);break;case 13:n(a);break;case 27:o()}})),d},progress:function(e,t,n,o,i){var r,s,a=e.getElement(),l=void 0===i.max?a.getElementsByTagName("div")[0]&&a.getElementsByTagName("div")[0].getAttribute("max")||100:i.max,c=void 0===i.min?a.getElementsByTagName("div")[0]&&a.getElementsByTagName("div")[0].getAttribute("min")||0:i.min,u=(l-c)/100,d=e.getValue()||0,h=document.createElement("div"),p=document.createElement("div");function m(){var e=window.getComputedStyle(a,null),t=u*Math.round(p.offsetWidth/((a.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+c;n(t),a.setAttribute("aria-valuenow",t),a.setAttribute("aria-label",d)}if(h.style.position="absolute",h.style.right="0",h.style.top="0",h.style.bottom="0",h.style.width="5px",h.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),p.setAttribute(e,p.getAttribute(e)+i.elementAttributes["+"+e])):p.setAttribute(e,i.elementAttributes[e]);return a.style.padding="4px 4px",d=Math.min(parseFloat(d),l),d=Math.max(parseFloat(d),c),d=Math.round((d-c)/u),p.style.width=d+"%",a.setAttribute("aria-valuemin",c),a.setAttribute("aria-valuemax",l),p.appendChild(h),h.addEventListener("mousedown",(function(e){r=e.screenX,s=p.offsetWidth})),h.addEventListener("mouseover",(function(){h.style.cursor="ew-resize"})),a.addEventListener("mousemove",(function(e){r&&(p.style.width=s+e.screenX-r+"px")})),a.addEventListener("mouseup",(function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,s=!1,m())})),a.addEventListener("keydown",(function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+a.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-a.clientWidth/100+"px";break;case 9:case 13:m();break;case 27:o()}})),a.addEventListener("blur",(function(){o()})),p},tickCross:function(e,t,n,o,i){var r=e.getValue(),s=document.createElement("input"),a=i.tristate,l=void 0===i.indeterminateValue?null:i.indeterminateValue,c=!1,u=Object.keys(i).includes("trueValue"),d=Object.keys(i).includes("falseValue");if(s.setAttribute("type","checkbox"),s.style.marginTop="5px",s.style.boxSizing="border-box",i.elementAttributes&&"object"==typeof i.elementAttributes)for(let e in i.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),s.setAttribute(e,s.getAttribute(e)+i.elementAttributes["+"+e])):s.setAttribute(e,i.elementAttributes[e]);function h(e){var t=s.checked;return u&&t?t=i.trueValue:d&&!t&&(t=i.falseValue),a?e?c?l:t:s.checked&&!c?(s.checked=!1,s.indeterminate=!0,c=!0,l):(c=!1,t):t}return s.value=r,!a||void 0!==r&&r!==l&&""!==r||(c=!0,s.indeterminate=!0),"firefox"!=this.table.browser&&"safari"!=this.table.browser&&t((function(){"cell"===e.getType()&&s.focus({preventScroll:!0})})),s.checked=u?r===i.trueValue:!0===r||"true"===r||"True"===r||1===r,s.addEventListener("change",(function(e){n(h())})),s.addEventListener("blur",(function(e){n(h(!0))})),s.addEventListener("keydown",(function(e){13==e.keyCode&&n(h()),27==e.keyCode&&o()})),s},adaptable:function(e,t,n,o,i){var r,s,a=e._getSelf().column;return r=i.editorLookup?i.editorLookup(e):function(e){var t=e.getValue(),n="input";switch(typeof t){case"number":n="number";break;case"boolean":n="tickCross";break;case"string":t.includes("\n")&&(n="textarea")}return n}(e),i.paramsLookup&&(s="function"==typeof i.paramsLookup?i.paramsLookup(r,e):i.paramsLookup[r]),this.table.modules.edit.lookupEditor(r,a).call(this,e,t,n,o,s||{})}};class L extends s{static moduleName="edit";static editors=H;constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.convertEmptyValues=!1,this.editors=L.editors,this.registerTableOption("editTriggerEvent","focus"),this.registerTableOption("editorEmptyValue"),this.registerTableOption("editorEmptyValueFunc",this.emptyValueCheck.bind(this)),this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("editorEmptyValue"),this.registerColumnOption("editorEmptyValueFunc"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("clipboard-paste",this.pasteBlocker.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0)),Object.keys(this.table.options).includes("editorEmptyValue")&&(this.convertEmptyValues=!0)}pasteBlocker(e){if(this.currentCell)return!0}keybindingNavigateNext(e){var t=this.currentCell,n=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||n&&(t.getElement().firstChild.blur(),this.invalidEdit||(n=!0===n?this.table.addRow({}):"function"==typeof n?this.table.addRow(n(t.row.getComponent())):this.table.addRow(Object.assign({},n))).then((()=>{setTimeout((()=>{t.getComponent().navigateNext()}))}))))}cellIsEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach((e=>{this.table.modules.edit.clearEdited(e._getSelf())}))}navigatePrev(e=this.currentCell,t){var n,o;if(e){if(t&&t.preventDefault(),n=this.navigateLeft())return!0;if((o=this.table.rowManager.prevDisplayRow(e.row,!0))&&(n=this.findPrevEditableCell(o,o.cells.length)))return n.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var n,o;if(e){if(t&&t.preventDefault(),n=this.navigateRight())return!0;if((o=this.table.rowManager.nextDisplayRow(e.row,!0))&&(n=this.findNextEditableCell(o,-1)))return n.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var n,o;return!!(e&&(t&&t.preventDefault(),n=e.getIndex(),o=this.findPrevEditableCell(e.row,n)))&&(o.getComponent().edit(),!0)}navigateRight(e=this.currentCell,t){var n,o;return!!(e&&(t&&t.preventDefault(),n=e.getIndex(),o=this.findNextEditableCell(e.row,n)))&&(o.getComponent().edit(),!0)}navigateUp(e=this.currentCell,t){var n,o;return!!(e&&(t&&t.preventDefault(),n=e.getIndex(),o=this.table.rowManager.prevDisplayRow(e.row,!0)))&&(o.cells[n].getComponent().edit(),!0)}navigateDown(e=this.currentCell,t){var n,o;return!!(e&&(t&&t.preventDefault(),n=e.getIndex(),o=this.table.rowManager.nextDisplayRow(e.row,!0)))&&(o.cells[n].getComponent().edit(),!0)}findNextEditableCell(e,t){var n=!1;if(t<e.cells.length-1)for(var o=t+1;o<e.cells.length;o++){let t=e.cells[o];if(t.column.modules.edit&&i.elVisible(t.getElement())&&this.allowEdit(t)){n=t;break}}return n}findPrevEditableCell(e,t){var n=!1;if(t>0)for(var o=t-1;o>=0;o--){let t=e.cells[o];if(t.column.modules.edit&&i.elVisible(t.getElement())&&this.allowEdit(t)){n=t;break}}return n}initializeColumnCheck(e){void 0!==e.definition.editor&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}rowEditableCheck(e){e.getCells().forEach((e=>{e.column.modules.edit&&"function"==typeof e.column.modules.edit.check&&this.updateCellClass(e)}))}initializeColumn(e){var t=Object.keys(e.definition).includes("editorEmptyValue"),n={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{},convertEmptyValues:t,editorEmptyValue:e.definition.editorEmptyValue,editorEmptyValueFunc:e.definition.editorEmptyValueFunc};n.editor=this.lookupEditor(e.definition.editor,e),n.editor&&(e.modules.edit=n)}lookupEditor(e,t){var n;switch(typeof e){case"string":this.editors[e]?n=this.editors[e]:console.warn("Editor Error - No such editor found: ",e);break;case"function":n=e;break;case"boolean":!0===e&&("function"!=typeof t.definition.formatter?n=this.editors[t.definition.formatter]?this.editors[t.definition.formatter]:this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}return n}getCurrentCell(){return!!this.currentCell&&this.currentCell.getComponent()}clearEditor(e){var t,n=this.currentCell;if(this.invalidEdit=!1,n){for(this.currentCell=!1,t=n.getElement(),this.dispatch("edit-editor-clear",n,e),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);n.row.getElement().classList.remove("tabulator-editing"),n.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,n=e.getElement(!0);this.updateCellClass(e),n.setAttribute("tabindex",0),n.addEventListener("mousedown",(function(e){2===e.button?e.preventDefault():t.mouseClick=!0})),"dblclick"===this.options("editTriggerEvent")&&n.addEventListener("dblclick",(function(o){n.classList.contains("tabulator-editing")||(n.focus({preventScroll:!0}),t.edit(e,o,!1))})),"focus"!==this.options("editTriggerEvent")&&"click"!==this.options("editTriggerEvent")||n.addEventListener("click",(function(o){n.classList.contains("tabulator-editing")||(n.focus({preventScroll:!0}),t.edit(e,o,!1))})),"focus"===this.options("editTriggerEvent")&&n.addEventListener("focus",(function(n){t.recursionBlock||t.edit(e,n,!1)}))}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,n=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,o=e.row.getElement();o.offsetTop<t?this.table.rowManager.element.scrollTop-=t-o.offsetTop:o.offsetTop+o.offsetHeight>n&&(this.table.rowManager.element.scrollTop+=o.offsetTop+o.offsetHeight-n);var i=this.table.rowManager.element.scrollLeft,r=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,s=e.getElement();this.table.modExists("frozenColumns")&&(i+=parseInt(this.table.modules.frozenColumns.leftMargin||0),r-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),"virtual"===this.table.options.renderHorizontal&&(i-=parseInt(this.table.columnManager.renderer.vDomPadLeft),r-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),s.offsetLeft<i?this.table.rowManager.element.scrollLeft-=i-s.offsetLeft:s.offsetLeft+s.offsetWidth>r&&(this.table.rowManager.element.scrollLeft+=s.offsetLeft+s.offsetWidth-r)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check}return t}edit(e,t,n){var o,i,r,s=this,a=function(){},l=e.getElement(),c=!1;if(!this.currentCell){if(e.column.modules.edit.blocked)return this.mouseClick=!1,this.blur(l),!1;if(t&&t.stopPropagation(),this.allowEdit(e)||n){if(s.cancelEdit(),s.currentCell=e,this.focusScrollAdjust(e),i=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,i)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,i),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",i),r="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(i):e.column.modules.edit.params,o=e.column.modules.edit.editor.call(s,i,(function(e){a=e}),(function(t){if(s.currentCell===e&&!c){var n=s.chain("edit-success",[e,t],!0,!0);return!0===n||"highlight"===s.table.options.validationMode?(c=!0,s.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==s.editedCells.indexOf(e)&&s.editedCells.push(e),t=s.transformEmptyValues(t,e),e.setValue(t,!0),!0===n):(c=!0,s.invalidEdit=!0,s.focusCellNoEvent(e,!0),a(),setTimeout((()=>{c=!1}),10),!1)}}),(function(){s.currentCell!==e||c||s.cancelEdit()}),r),!this.currentCell||!1===o)return this.blur(l),!1;if(!(o instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",o),this.blur(l),!1;for(l.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");l.firstChild;)l.removeChild(l.firstChild);l.appendChild(o),a();for(var u=l.children,d=0;d<u.length;d++)u[d].addEventListener("click",(function(e){e.stopPropagation()}));return!0}return this.mouseClick=!1,this.blur(l),!1}this.invalidEdit||this.currentCell===e||this.cancelEdit()}emptyValueCheck(e){return""===e||null==e}transformEmptyValues(e,t){var n,o=t.column.modules.edit;return(o.convertEmptyValues||this.convertEmptyValues)&&(n=o.editorEmptyValueFunc||this.options("editorEmptyValueFunc"))&&n(e)&&(e=o.convertEmptyValues?o.editorEmptyValue:this.options("editorEmptyValue")),e}blur(e){this.confirm("edit-blur",[e])||e.blur()}getEditedCells(){var e=[];return this.editedCells.forEach((t=>{e.push(t.getComponent())})),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)}}class ${constructor(e,t,n,o){this.type=e,this.columns=t,this.component=n||!1,this.indent=o||0}}class _{constructor(e,t,n,o,i){this.value=e,this.component=t||!1,this.width=n,this.height=o,this.depth=i}}var z={},F={visible:function(){return this.rowManager.getVisibleRows(!1,!0)},all:function(){return this.rowManager.rows},selected:function(){return this.modules.selectRow.selectedRows},active:function(){return this.options.pagination?this.rowManager.getDisplayRows(this.rowManager.displayRows.length-2):this.rowManager.getDisplayRows()}};class B extends s{static moduleName="export";static columnLookups=z;static rowLookups=F;constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.colVisPropAttach="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,n,o){var i,r,s,a;return this.cloneTableStyle=t,this.config=e||{},this.colVisProp=o,this.colVisPropAttach=this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1),(a=B.columnLookups[n])&&(s=(s=a.call(this.table)).filter((e=>this.columnVisCheck(e)))),i=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders(s)):[],s&&(s=s.map((e=>e.getComponent()))),r=this.bodyToExportRows(this.rowLookup(n),s),i.concat(r)}generateTable(e,t,n,o){var i=this.generateExportList(e,t,n,o);return this.generateTableElement(i)}rowLookup(e){var t,n=[];return"function"==typeof e?e.call(this.table).forEach((e=>{(e=this.table.rowManager.findRow(e))&&n.push(e)})):(t=B.rowLookups[e]||B.rowLookups.active,n=t.call(this.table)),Object.assign([],n)}generateColumnGroupHeaders(e){var t=[];return e||(e=!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex),e.forEach((e=>{var n=this.processColumnGroup(e);n&&t.push(n)})),t}processColumnGroup(e){var t=e.columns,n=0,o={title:e.definition["title"+this.colVisPropAttach]||e.definition.title,column:e,depth:1};if(t.length){if(o.subGroups=[],o.width=0,t.forEach((e=>{var t=this.processColumnGroup(e);t&&(o.width+=t.width,o.subGroups.push(t),t.depth>n&&(n=t.depth))})),o.depth+=n,!o.width)return!1}else{if(!this.columnVisCheck(e))return!1;o.width=1}return o}columnVisCheck(e){var t=e.definition[this.colVisProp];return(!1!==this.config.rowHeaders||!e.isRowHeader)&&("function"==typeof t&&(t=t.call(this.table,e.getComponent())),!1===t||!0===t?t:e.visible&&e.field)}headersToExportRows(e){var t=[],n=0,o=[];function i(e,o){var r=n-o;if(void 0===t[o]&&(t[o]=[]),e.height=e.subGroups?1:r-e.depth+1,t[o].push(e),e.height>1)for(let n=1;n<e.height;n++)void 0===t[o+n]&&(t[o+n]=[]),t[o+n].push(!1);if(e.width>1)for(let n=1;n<e.width;n++)t[o].push(!1);e.subGroups&&e.subGroups.forEach((function(e){i(e,o+1)}))}return e.forEach((function(e){e.depth>n&&(n=e.depth)})),e.forEach((function(e){i(e,0)})),t.forEach((e=>{var t=[];e.forEach((e=>{if(e){let n=void 0===e.title?"":e.title;t.push(new _(n,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),o.push(new $("header",t))})),o}bodyToExportRows(e,t=[]){var n=[];return 0===t.length&&this.table.columnManager.columnsByIndex.forEach((e=>{this.columnVisCheck(e)&&t.push(e.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),(e=e.filter((e=>{switch(e.type){case"group":return!1!==this.config.rowGroups;case"calc":return!1!==this.config.columnCalcs;case"row":return!(this.table.options.dataTree&&!1===this.config.dataTree&&e.modules.dataTree.parent)}return!0}))).forEach(((e,o)=>{var i=e.getData(this.colVisProp),r=[],s=0;switch(e.type){case"group":s=e.level,r.push(new _(e.key,e.getComponent(),t.length,1));break;case"calc":case"row":t.forEach((e=>{r.push(new _(e._column.getFieldValue(i),e,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(s=e.modules.dataTree.index)}n.push(new $(e.type,r,e.getComponent(),s))})),n}generateTableElement(e){var t=document.createElement("table"),n=document.createElement("thead"),o=document.createElement("tbody"),i=this.lookupTableStyles(),r=this.table.options["rowFormatter"+this.colVisPropAttach],s={};return s.rowFormatter=null!==r?r:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(s.treeElementField=this.table.modules.dataTree.elementField),s.groupHeader=this.table.options["groupHeader"+this.colVisPropAttach],s.groupHeader&&!Array.isArray(s.groupHeader)&&(s.groupHeader=[s.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),n,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach(((e,t)=>{let r;switch(e.type){case"header":n.appendChild(this.generateHeaderElement(e,s,i));break;case"group":o.appendChild(this.generateGroupElement(e,s,i));break;case"calc":o.appendChild(this.generateCalcElement(e,s,i));break;case"row":r=this.generateRowElement(e,s,i),this.mapElementStyles(t%2&&i.evenRow?i.evenRow:i.oddRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),o.appendChild(r)}})),n.innerHTML&&t.appendChild(n),t.appendChild(o),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.styleRowHeader=e.firstRow.getElementsByClassName("tabulator-row-header")[0],e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}generateHeaderElement(e,t,n){var o=document.createElement("tr");return e.columns.forEach((e=>{if(e){var t=document.createElement("th"),n=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,this.cloneTableStyle&&(t.style.boxSizing="border-box"),n.forEach((function(e){t.classList.add(e)})),this.mapElementStyles(e.component.getElement(),t,["text-align","border-left","border-right","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?this.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&e.component._column.parent.isGroup?this.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]):this.mapElementStyles(e.component.getElement(),t,["border-top"]),e.component._column.isGroup?this.mapElementStyles(e.component.getElement(),t,["border-bottom"]):this.mapElementStyles(this.table.columnManager.getElement(),t,["border-bottom"]),o.appendChild(t)}})),o}generateGroupElement(e,t,n){var o=document.createElement("tr"),i=document.createElement("td"),r=e.columns[0];return o.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?r.value=t.groupHeader[e.indent](r.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1!==t.groupHeader&&(r.value=e.component._group.generator(r.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),i.colSpan=r.width,i.innerHTML=r.value,o.classList.add("tabulator-print-table-group"),o.classList.add("tabulator-group-level-"+e.indent),r.component.isVisible()&&o.classList.add("tabulator-group-visible"),this.mapElementStyles(n.firstGroup,o,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(n.firstGroup,i,["padding-top","padding-left","padding-right","padding-bottom"]),o.appendChild(i),o}generateCalcElement(e,t,n){var o=this.generateRowElement(e,t,n);return o.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(n.calcRow,o,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),o}generateRowElement(e,t,n){var o=document.createElement("tr");return o.classList.add("tabulator-print-table-row"),e.columns.forEach(((i,r)=>{if(i){var s,a,l=document.createElement("td"),c=i.component._column,u=this.table,d=u.columnManager.findColumnIndex(c),h=i.value,p={modules:{},getValue:function(){return h},getField:function(){return c.definition.field},getElement:function(){return l},getType:function(){return"cell"},getColumn:function(){return c.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getTable:function(){return u},getComponent:function(){return p},column:c};if((c.definition.cssClass?c.definition.cssClass.split(" "):[]).forEach((function(e){l.classList.add(e)})),this.table.modExists("format")&&!1!==this.config.formatCells)h=this.table.modules.format.formatExportValue(p,this.colVisProp);else switch(typeof h){case"object":h=null!==h?JSON.stringify(h):"";break;case"undefined":h=""}h instanceof Node?l.appendChild(h):l.innerHTML=h,a=["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"],c.isRowHeader?(s=n.styleRowHeader,a.push("background-color")):s=n.styleCells&&n.styleCells[d]?n.styleCells[d]:n.firstCell,s&&(this.mapElementStyles(s,l,a),c.definition.align&&(l.style.textAlign=c.definition.align)),this.table.options.dataTree&&!1!==this.config.dataTree&&(t.treeElementField&&t.treeElementField==c.field||!t.treeElementField&&0==r)&&(e.component._row.modules.dataTree.controlEl&&l.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),l.firstChild),e.component._row.modules.dataTree.branchEl&&l.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),l.firstChild)),o.appendChild(l),p.modules.format&&p.modules.format.renderedCallback&&p.modules.format.renderedCallback()}})),t.rowFormatter&&"row"===e.type&&!1!==this.config.formatCells&&(Object.assign(e.component).getElement=function(){return o},t.rowFormatter(e.component)),o}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,n,o){var i=this.generateExportList(n||this.table.options.htmlOutputConfig,t,e,o||"htmlOutput");return this.generateHTMLTable(i)}mapElementStyles(e,t,n){if(this.cloneTableStyle&&e&&t){var o={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var i=window.getComputedStyle(e);n.forEach((function(e){t.style[o[e]]||(t.style[o[e]]=i.getPropertyValue(e))}))}}}}var j={"=":function(e,t,n,o){return t==e},"<":function(e,t,n,o){return t<e},"<=":function(e,t,n,o){return t<=e},">":function(e,t,n,o){return t>e},">=":function(e,t,n,o){return t>=e},"!=":function(e,t,n,o){return t!=e},regex:function(e,t,n,o){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,n,o){return null==e?t===e:null!=t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,n,o){var i=e.toLowerCase().split(void 0===o.separator?" ":o.separator),r=String(null==t?"":t).toLowerCase(),s=[];return i.forEach((e=>{r.includes(e)&&s.push(!0)})),o.matchAll?s.length===i.length:!!s.length},starts:function(e,t,n,o){return null==e?t===e:null!=t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,n,o){return null==e?t===e:null!=t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,n,o){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}};class W extends s{static moduleName="filter";static filters=j;constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),"remote"===this.table.options.filterMode&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach((e=>{var t=this.table.columnManager.findColumn(e.field);if(!t)return console.warn("Column Filter Error - No matching column found:",e.field),!1;this.setHeaderFilterValue(t,e.value)})),this.tableInitialized=!0}remoteFilterParams(e,t,n,o){return o.filter=this.getFilters(!0,!0),o}generatePlaceholder(e){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(e,t,n,o){this.setFilter(e,t,n,o),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,n,o){this.addFilter(e,t,n,o),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.setHeaderFilterFocus(t)}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var n=this.table.columnManager.findColumn(e);if(!n)return console.warn("Column Filter Error - No matching column found:",e),!1;this.setHeaderFilterValue(n,t)}userRemoveFilter(e,t,n){this.removeFilter(e,t,n),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,n){return this.search("rows",e,t,n)}searchData(e,t,n){return this.search("data",e,t,n)}initializeColumnHeaderFilter(e){e.definition.headerFilter&&this.initializeColumn(e)}initializeColumn(e,t){var n=this,o=e.getField();e.modules.filter={success:function(t){var i,r="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",s="",a="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[o];else{switch(e.modules.filter.value=t,typeof e.definition.headerFilterFunc){case"string":W.filters[e.definition.headerFilterFunc]?(s=e.definition.headerFilterFunc,i=function(n){var o=e.definition.headerFilterFuncParams||{},i=e.getFieldValue(n);return o="function"==typeof o?o(t,i,n):o,W.filters[e.definition.headerFilterFunc](t,i,n,o)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":s=i=function(n){var o=e.definition.headerFilterFuncParams||{},i=e.getFieldValue(n);return o="function"==typeof o?o(t,i,n):o,e.definition.headerFilterFunc(t,i,n,o)}}i||("partial"===r?(i=function(n){var o=e.getFieldValue(n);return null!=o&&String(o).toLowerCase().indexOf(String(t).toLowerCase())>-1},s="like"):(i=function(n){return e.getFieldValue(n)==t},s="=")),n.headerFilters[o]={value:t,func:i,type:s}}e.modules.filter.value=t,a=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==a&&(n.prevHeaderFilterChangeCheck=a,n.trackChanges(),n.refreshFilter())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,n){var o,i,r,s,a,l,c,u,d=this,h=e.modules.filter.success,p=e.getField();if(e.modules.filter.value=t,e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),p){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&0!==e},(o=document.createElement("div")).classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":d.table.modules.edit.editors[e.definition.headerFilter]?(i=d.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":i=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?i=e.modules.edit.editor:e.definition.formatter&&d.table.modules.edit.editors[e.definition.formatter]?(i=d.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):i=d.table.modules.edit.editors.input}if(i){if(s={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return o},getColumn:function(){return e.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},c="function"==typeof(c=e.definition.headerFilterParams||{})?c.call(d.table,s):c,!(r=i.call(this.table.modules.edit,s,(function(e){u=e}),h,(function(){}),c)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(r instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",r);d.langBind("headerFilters|columns|"+e.definition.field,(function(t){r.setAttribute("placeholder",void 0!==t&&t?t:e.definition.headerFilterPlaceholder||d.langText("headerFilters|default"))})),r.addEventListener("click",(function(e){e.stopPropagation(),r.focus()})),r.addEventListener("focus",(e=>{var t=this.table.columnManager.contentsElement.scrollLeft;t!==this.table.rowManager.element.scrollLeft&&(this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})),a=!1,l=function(e){a&&clearTimeout(a),a=setTimeout((function(){h(r.value)}),d.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=r,e.modules.filter.attrType=r.hasAttribute("type")?r.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=r.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(r.addEventListener("keyup",l),r.addEventListener("search",l),"number"==e.modules.filter.attrType&&r.addEventListener("change",(function(e){h(r.value)})),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&r.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||r.addEventListener("mousedown",(function(e){e.stopPropagation()}))),o.appendChild(r),e.contentElement.appendChild(o),n||d.headerFilterColumns.push(e),u&&u()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")}))}showHeaderFilterElements(){this.headerFilterColumns.forEach((function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")}))}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&("remote"===this.table.options.filterMode?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,n,o){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:n,params:o}]),this.addFilter(e)}addFilter(e,t,n,o){var i=!1;Array.isArray(e)||(e=[{field:e,type:t,value:n,params:o}]),e.forEach((e=>{(e=this.findFilter(e))&&(this.filterList.push(e),i=!0)})),i&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var n=!1;return"function"==typeof e.field?n=function(t){return e.field(t,e.type||{})}:W.filters[e.type]?n=(t=this.table.columnManager.getColumnByField(e.field))?function(n){return W.filters[e.type](e.value,t.getFieldValue(n),n,e.params||{})}:function(t){return W.filters[e.type](e.value,t[e.field],t,e.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=n,!!e.func&&e}findSubFilters(e){var t=[];return e.forEach((e=>{(e=this.findFilter(e))&&t.push(e)})),!!t.length&&t}getFilters(e,t){var n=[];return e&&(n=this.getHeaderFilters()),t&&n.forEach((function(e){"function"==typeof e.type&&(e.type="function")})),n.concat(this.filtersToArray(this.filterList,t))}filtersToArray(e,t){var n=[];return e.forEach((e=>{var o;Array.isArray(e)?n.push(this.filtersToArray(e,t)):(o={field:e.field,type:e.type,value:e.value},t&&"function"==typeof o.type&&(o.type="function"),n.push(o))})),n}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,n){Array.isArray(e)||(e=[{field:e,type:t,value:n}]),e.forEach((e=>{var t;(t="object"==typeof e.field?this.filterList.findIndex((t=>e===t)):this.filterList.findIndex((t=>e.field===t.field&&e.type===t.type&&e.value===t.value)))>-1?this.filterList.splice(t,1):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)})),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((e=>{void 0!==e.modules.filter.value&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)})),this.trackChanges()}search(e,t,n,o){var i=[],r=[];return Array.isArray(t)||(t=[{field:t,type:n,value:o}]),t.forEach((e=>{(e=this.findFilter(e))&&r.push(e)})),this.table.rowManager.rows.forEach((t=>{var n=!0;r.forEach((e=>{this.filterRecurse(e,t.getData())||(n=!1)})),n&&i.push("data"===e?t.getData("data"):t.getComponent())})),i}filter(e,t){var n=[],o=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),"remote"!==this.table.options.filterMode&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach((e=>{this.filterRow(e)&&n.push(e)})):n=e.slice(0),this.subscribedExternal("dataFiltered")&&(n.forEach((e=>{o.push(e.getComponent())})),this.dispatchExternal("dataFiltered",this.getFilters(!0),o)),n}filterRow(e,t){var n=!0,o=e.getData();for(var i in this.filterList.forEach((e=>{this.filterRecurse(e,o)||(n=!1)})),this.headerFilters)this.headerFilters[i].func(o)||(n=!1);return n}filterRecurse(e,t){var n=!1;return Array.isArray(e)?e.forEach((e=>{this.filterRecurse(e,t)&&(n=!0)})):n=e.func(t),n}}var V={plaintext:function(e,t,n){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,n){return e.getValue()},textarea:function(e,t,n){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,n){var o,i,r,s,a,l=parseFloat(e.getValue()),c="",u=t.decimal||".",d=t.thousand||",",h=t.negativeSign||"-",p=t.symbol||"",m=!!t.symbolAfter,g=void 0!==t.precision?t.precision:2;if(isNaN(l))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));if(l<0&&(l=Math.abs(l),c=h),o=!1!==g?l.toFixed(g):l,i=(o=String(o).split("."))[0],r=o.length>1?u+o[1]:"",!1!==t.thousand)for(s=/(\d+)(\d{3})/;s.test(i);)i=i.replace(s,"$1"+d+"$2");return a=i+r,!0===c?(a="("+a+")",m?a+p:p+a):m?c+a+p:c+p+a},link:function(e,t,n){var o,r=e.getValue(),s=t.urlPrefix||"",a=t.download,l=r,c=document.createElement("a");if(t.labelField&&(o=e.getData(),l=function e(t,n){var o=n[t.shift()];return t.length&&"object"==typeof o?e(t,o):o}(t.labelField.split(this.table.options.nestedFieldSeparator),o)),t.label)switch(typeof t.label){case"string":l=t.label;break;case"function":l=t.label(e)}if(l){if(t.urlField&&(o=e.getData(),r=i.retrieveNestedData(this.table.options.nestedFieldSeparator,t.urlField,o)),t.url)switch(typeof t.url){case"string":r=t.url;break;case"function":r=t.url(e)}return c.setAttribute("href",s+r),t.target&&c.setAttribute("target",t.target),t.download&&(a="function"==typeof a?a(e):!0===a?"":a,c.setAttribute("download",a)),c.innerHTML=this.emptyToSpace(this.sanitizeHTML(l)),c}return"&nbsp;"},image:function(e,t,n){var o=document.createElement("img"),i=e.getValue();switch(t.urlPrefix&&(i=t.urlPrefix+e.getValue()),t.urlSuffix&&(i+=t.urlSuffix),o.setAttribute("src",i),typeof t.height){case"number":o.style.height=t.height+"px";break;case"string":o.style.height=t.height}switch(typeof t.width){case"number":o.style.width=t.width+"px";break;case"string":o.style.width=t.width}return o.addEventListener("load",(function(){e.getRow().normalizeHeight()})),o},tickCross:function(e,t,n){var o=e.getValue(),i=e.getElement(),r=t.allowEmpty,s=t.allowTruthy,a=Object.keys(t).includes("trueValue"),l=void 0!==t.tickElement?t.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',c=void 0!==t.crossElement?t.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return a&&o===t.trueValue||!a&&(s&&o||!0===o||"true"===o||"True"===o||1===o||"1"===o)?(i.setAttribute("aria-checked",!0),l||""):!r||"null"!==o&&""!==o&&null!=o?(i.setAttribute("aria-checked",!1),c||""):(i.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,n){var o,i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),r=t.inputFormat||"yyyy-MM-dd HH:mm:ss",s=t.outputFormat||"dd/MM/yyyy HH:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue();if(void 0!==i)return(o=i.isDateTime(l)?l:"iso"===r?i.fromISO(String(l)):i.fromFormat(String(l),r)).isValid?(t.timezone&&(o=o.setZone(t.timezone)),o.toFormat(s)):!0!==a&&l?"function"==typeof a?a(l):a:l;console.error("Format Error - 'datetime' formatter is dependant on luxon.js")},datetimediff:function(e,t,n){var o,i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),r=t.inputFormat||"yyyy-MM-dd HH:mm:ss",s=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:"days",c=void 0!==t.humanize&&t.humanize,u=void 0!==t.date?t.date:i.now(),d=e.getValue();if(void 0!==i)return(o=i.isDateTime(d)?d:"iso"===r?i.fromISO(String(d)):i.fromFormat(String(d),r)).isValid?c?o.diff(u,l).toHuman()+(a?" "+a:""):parseInt(o.diff(u,l)[l])+(a?" "+a:""):!0===s?d:"function"==typeof s?s(d):s;console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")},lookup:function(e,t,n){var o=e.getValue();return void 0===t[o]?(console.warn("Missing display value for "+o),o):t[o]},star:function(e,t,n){var o=e.getValue(),i=e.getElement(),r=t&&t.stars?t.stars:5,s=document.createElement("span"),a=document.createElementNS("http://www.w3.org/2000/svg","svg");s.style.verticalAlign="middle",a.setAttribute("width","14"),a.setAttribute("height","14"),a.setAttribute("viewBox","0 0 512 512"),a.setAttribute("xml:space","preserve"),a.style.padding="0 1px",o=o&&!isNaN(o)?parseInt(o):0,o=Math.max(0,Math.min(o,r));for(var l=1;l<=r;l++){var c=a.cloneNode(!0);c.innerHTML=l<=o?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',s.appendChild(c)}return i.style.whiteSpace="nowrap",i.style.overflow="hidden",i.style.textOverflow="ellipsis",i.setAttribute("aria-label",o),s},traffic:function(e,t,n){var o,i,r=this.sanitizeHTML(e.getValue())||0,s=document.createElement("span"),a=t&&t.max?t.max:100,l=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(r)&&void 0!==e.getValue()){switch(s.classList.add("tabulator-traffic-light"),i=parseFloat(r)<=a?parseFloat(r):a,i=parseFloat(i)>=l?parseFloat(i):l,o=(a-l)/100,i=Math.round((i-l)/o),typeof c){case"string":u=c;break;case"function":u=c(r);break;case"object":if(Array.isArray(c)){var d=100/c.length,h=Math.floor(i/d);h=Math.min(h,c.length-1),u=c[h=Math.max(h,0)];break}}return s.style.backgroundColor=u,s}},progress:function(e,t={},n){var o,i,r,s,a,l=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),u=t.max?t.max:100,d=t.min?t.min:0,h=t.legendAlign?t.legendAlign:"center";switch(i=parseFloat(l)<=u?parseFloat(l):u,i=parseFloat(i)>=d?parseFloat(i):d,o=(u-d)/100,i=Math.round((i-d)/o),typeof t.color){case"string":r=t.color;break;case"function":r=t.color(l);break;case"object":if(Array.isArray(t.color)){let e=100/t.color.length,n=Math.floor(i/e);n=Math.min(n,t.color.length-1),n=Math.max(n,0),r=t.color[n];break}default:r="#2DC214"}switch(typeof t.legend){case"string":s=t.legend;break;case"function":s=t.legend(l);break;case"boolean":s=l;break;default:s=!1}switch(typeof t.legendColor){case"string":a=t.legendColor;break;case"function":a=t.legendColor(l);break;case"object":if(Array.isArray(t.legendColor)){let e=100/t.legendColor.length,n=Math.floor(i/e);n=Math.min(n,t.legendColor.length-1),n=Math.max(n,0),a=t.legendColor[n]}break;default:a="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",i);var p=document.createElement("div");p.style.display="inline-block",p.style.width=i+"%",p.style.backgroundColor=r,p.style.height="100%",p.setAttribute("data-max",u),p.setAttribute("data-min",d);var m=document.createElement("div");if(m.style.position="relative",m.style.width="100%",m.style.height="100%",s){var g=document.createElement("div");g.style.position="absolute",g.style.top=0,g.style.left=0,g.style.textAlign=h,g.style.width="100%",g.style.color=a,g.innerHTML=s}return n((function(){if(!(e instanceof x)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",c.appendChild(t),c=t}c.appendChild(m),m.appendChild(p),s&&m.appendChild(g)})),""},color:function(e,t,n){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,n){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(e,t,n){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},toggle:function(e,t,n){var o,i,r=e.getValue(),s=t.size||15,a=s+"px",l=!t.hasOwnProperty("onValue")||t.onValue,c=!!t.hasOwnProperty("offValue")&&t.offValue,u=t.onTruthy?r:r===l;return(o=document.createElement("div")).classList.add("tabulator-toggle"),u?(o.classList.add("tabulator-toggle-on"),o.style.flexDirection="row-reverse",t.onColor&&(o.style.background=t.onColor)):t.offColor&&(o.style.background=t.offColor),o.style.width=2.5*s+"px",o.style.borderRadius=a,t.clickable&&o.addEventListener("click",(t=>{e.setValue(u?c:l)})),(i=document.createElement("div")).classList.add("tabulator-toggle-switch"),i.style.height=a,i.style.width=a,i.style.borderRadius=a,o.appendChild(i),o},rownum:function(e,t,n){var o=document.createElement("span"),i=e.getRow(),r=e.getTable();return i.watchPosition((e=>{t.relativeToPage&&(e+=r.modules.page.getPageSize()*(r.modules.page.getPage()-1)),o.innerText=e})),o},handle:function(e,t,n){return e.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},adaptable:function(e,t,n){var o,i;return o=t.formatterLookup?t.formatterLookup(e):function(e){var t=e.getValue(),n="plaintext";switch(typeof t){case"boolean":n="tickCross";break;case"string":t.includes("\n")&&(n="textarea")}return n}(e),t.paramsLookup&&(i="function"==typeof t.paramsLookup?t.paramsLookup(o,e):t.paramsLookup[o]),this.table.modules.format.lookupFormatter(o).call(this,e,i||{},n)},array:function(e,t,n){var o,r=t.delimiter||",",s=e.getValue(),a=this.table;return t.valueMap&&(o="string"==typeof t.valueMap?function(e){return e.map((e=>i.retrieveNestedData(a.options.nestedFieldSeparator,t.valueMap,e)))}:t.valueMap),Array.isArray(s)?(o&&(s=o(s)),s.join(r)):s},json:function(e,t,n){var o=t.indent||"\t",i=void 0===t.multiline||t.multiline,r=t.replacer||null,s=e.getValue();return i&&(e.getElement().style.whiteSpace="pre-wrap"),JSON.stringify(s,r,o)}};class G extends s{static moduleName="format";static formatters=V;constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupTypeFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupTypeFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupTypeFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupTypeFormatter(e,"HtmlOutput"))}lookupTypeFormatter(e,t){var n={params:e.definition["formatter"+t+"Params"]||{}},o=e.definition["formatter"+t];return n.formatter=this.lookupFormatter(o),n}lookupFormatter(e){var t;switch(typeof e){case"string":G.formatters[e]?t=G.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),t=G.formatters.plaintext);break;case"function":t=e;break;default:t=G.formatters.plaintext}return t}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,n){var o,i,r,s;return e.definition.titleFormatter?(o=this.lookupFormatter(e.definition.titleFormatter),r=t=>{e.titleFormatterRendered=t},s={getValue:function(){return t},getElement:function(){return n},getType:function(){return"header"},getColumn:function(){return e.getComponent()},getTable:()=>this.table},i="function"==typeof(i=e.definition.titleFormatterParams||{})?i():i,o.call(this,s,i,r)):t}formatValue(e){var t=e.getComponent(),n="function"==typeof e.column.modules.format.params?e.column.modules.format.params(t):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,t,n,(function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}))}formatExportValue(e,t){var n,o=e.column.modules.format[t];if(o){function i(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}return n="function"==typeof o.params?o.params(e.getComponent()):o.params,o.formatter.call(this,e.getComponent(),n,i)}return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(e).replace(/[&<>"'`=/]/g,(function(e){return t[e]}))}return e}emptyToSpace(e){return null==e||""===e?"&nbsp;":e}}class K{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(e,t,n){return void 0!==e[t]?e[t]:e._group.groupManager.table.componentFunctionBinder.handle("group",e._group,t)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return!!this._group.parent&&this._group.parent.getComponent()}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(e,t){return this._group.groupManager.table.rowManager.scrollToRow(this._group,e,t)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class U{constructor(e,t,n,o,i,r,s){this.groupManager=e,this.parent=t,this.key=o,this.level=n,this.field=i,this.hasSubGroups=n<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=s,this.rows=[],this.groups=[],this.groupList=[],this.generator=r,this.element=!1,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=s?s.visible:void 0!==e.startOpen[n]?e.startOpen[n]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()}wipe(e){e||(this.groupList.length?this.groupList.forEach((function(e){e.wipe()})):this.rows.forEach((e=>{e.modules&&delete e.modules.group}))),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach((t=>{this._createGroup(t,e)}))}addBindings(){this.groupManager.table.options.groupToggleElement&&("arrow"==this.groupManager.table.options.groupToggleElement?this.arrowElement:this.element).addEventListener("click",(e=>{"arrow"===this.groupManager.table.options.groupToggleElement&&(e.stopPropagation(),e.stopImmediatePropagation()),setTimeout((()=>{this.toggleVisibility()}))}))}_createGroup(e,t){var n=t+"_"+e,o=new U(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[n]);this.groups[n]=o,this.groupList.push(o)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var n=this.groupManager.groupIDLookups[t].func(e.getData()),o=t+"_"+n;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[o]&&this.groups[o].addRow(e):(this.groups[o]||this._createGroup(n,t),this.groups[o].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,n){var o=this.conformRowData({});e.updateData(o);var i=this.rows.indexOf(t);i>-1?n?this.rows.splice(i+1,0,e):this.rows.splice(i,0,e):n?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach((function(t){t.scrollHeader(e)})))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),n=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(n.parentNode&&n.parentNode.removeChild(n),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this))):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))}removeGroup(e){var t,n=e.level+"_"+e.key;this.groups[n]&&(delete this.groups[n],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())})):("table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}getData(e,t){var n=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach((e=>{n.push(e.getData(t||"data"))})),n}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach((t=>{e+=t.getRowCount()})):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,"basic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination||(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((e=>{e.getHeadersAndRows().forEach((e=>{e.detachElement()}))})):this.rows.forEach((e=>{var t=e.getElement();t.parentNode.removeChild(t)}))),this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,"basic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach((t=>{t.getHeadersAndRows().forEach((t=>{var n=t.getElement();e.parentNode.insertBefore(n,e.nextSibling),t.initialize(),e=n}))})):this.rows.forEach((t=>{var n=t.getElement();e.parentNode.insertBefore(n,e.nextSibling),t.initialize(),e=n})),this.groupManager.updateGroupRows(!0)}this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];"function"==typeof this.visible&&(this.rows.forEach((function(t){e.push(t.getData())})),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach((function(n){var o=n.getRowGroup(e);o&&(t=o)})):this.rows.find((function(t){return t===e}))&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach((function(n){t.push(e?n.getComponent():n)})),t}getRows(e,t){var n=[];return t&&this.groupList.length?this.groupList.forEach((o=>{n=n.concat(o.getRows(e,t))})):this.rows.forEach((function(t){n.push(e?t.getComponent():t)})),n}generateGroupHeaderContents(){var e=[];for(this.getRows(!1,!0).forEach((function(t){e.push(t.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}normalizeHeight(){this.setHeight(this.element.clientHeight)}initialize(e){this.initialized&&!e||(this.normalizeHeight(),this.initialized=!0)}reinitialize(){this.initialized=!1,this.height=0,i.elVisible(this.element)&&this.initialize(!0)}setHeight(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getGroup(){return this}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}deinitializeHeight(){}rendered(){}getComponent(){return this.component||(this.component=new K(this)),this.component}}var q={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue),e.component.cellRendered()},rowAdd:function(e){e.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t),this.table.rowManager.checkPlaceholder()},rowMove:function(e){var t=e.data.posFrom-e.data.posTo>0;this.table.rowManager.moveRowActual(e.component,this.table.rowManager.getRowFromPosition(e.data.posFrom),t),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},Y={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue),e.component.cellRendered()},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t),this.table.rowManager.checkPlaceholder()},rowDelete:function(e){e.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.getRowFromPosition(e.data.posTo),e.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},X={keybindings:{bindings:{undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"]},actions:{undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))}}}};class Q extends s{static moduleName="history";static moduleExtensions=X;static undoers=q;static redoers=Y;constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,n){this.action("rowMove",e,{posFrom:e.getPosition(),posTo:t.getPosition(),to:t,after:n})}rowAdded(e,t,n,o){this.action("rowAdd",e,{data:t,pos:n,index:o})}rowDeleted(e){var t,n;this.table.options.groupBy?(t=(n=e.getComponent().getGroup()._getSelf().rows).indexOf(e))&&(t=n[t-1]):(t=e.table.rowManager.getRowIndex(e))&&(t=e.table.rowManager.rows[t-1]),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,n){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:n}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex((function(t){return t.component===e}));t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return Q.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}return console.warn(this.options("history")?"History Undo Error - No more history to undo":"History module not enabled"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return Q.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}return console.warn(this.options("history")?"History Redo Error - No more history to redo":"History module not enabled"),!1}_rebindRow(e,t){this.history.forEach((function(n){if(n.component instanceof M)n.component===e&&(n.component=t);else if(n.component instanceof E&&n.component.row===e){var o=n.component.column.getField();o&&(n.component=t.getCell(o))}}))}}var J={csv:function(e){var t=[],n=0,o=0,i=!1;for(let r=0;r<e.length;r++){let s=e[r],a=e[r+1];t[n]||(t[n]=[]),t[n][o]||(t[n][o]=""),'"'==s&&i&&'"'==a?(t[n][o]+=s,r++):'"'!=s?","!=s||i?"\r"!=s||"\n"!=a||i?"\r"!=s&&"\n"!=s||i?t[n][o]+=s:(o=0,n++):(o=0,n++,r++):o++:i=!i}return t},json:function(e){try{return JSON.parse(e)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}},array:function(e){return e},xlsx:function(e){var t=this.dependencyRegistry.lookup("XLSX"),n=t.read(e),o=n.Sheets[n.SheetNames[0]];return t.utils.sheet_to_json(o,{header:1})}};class Z extends s{static moduleName="import";static importers=J;constructor(e){super(e),this.registerTableOption("importFormat"),this.registerTableOption("importReader","text"),this.registerTableOption("importHeaderTransform"),this.registerTableOption("importValueTransform"),this.registerTableOption("importDataValidator"),this.registerTableOption("importFileValidator")}initialize(){this.registerTableFunction("import",this.importFromFile.bind(this)),this.table.options.importFormat&&(this.subscribe("data-loading",this.loadDataCheck.bind(this),10),this.subscribe("data-load",this.loadData.bind(this),10))}loadDataCheck(e){return this.table.options.importFormat&&("string"==typeof e||Array.isArray(e)&&e.length&&Array.isArray(e))}loadData(e,t,n,o,i){return this.importData(this.lookupImporter(),e).then(this.structureData.bind(this)).catch((e=>(console.error("Import Error:",e||"Unable to import data"),Promise.reject(e))))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),(t="string"==typeof e?Z.importers[e]:e)||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t,n){var o=this.lookupImporter(e);if(o)return this.pickFile(t,n).then(this.importData.bind(this,o)).then(this.structureData.bind(this)).then(this.mutateData.bind(this)).then(this.validateData.bind(this)).then(this.setData.bind(this)).catch((e=>(this.dispatch("import-error",e),this.dispatchExternal("importError",e),console.error("Import Error:",e||"Unable to import file"),this.table.dataLoader.alertError(),setTimeout((()=>{this.table.dataLoader.clearAlert()}),3e3),Promise.reject(e))))}pickFile(e,t){return new Promise(((n,o)=>{var i=document.createElement("input");i.type="file",i.accept=e,i.addEventListener("change",(e=>{var r=i.files[0],s=new FileReader,a=this.validateFile(r);if(!0===a){switch(this.dispatch("import-importing",i.files),this.dispatchExternal("importImporting",i.files),t||this.table.options.importReader){case"buffer":s.readAsArrayBuffer(r);break;case"binary":s.readAsBinaryString(r);break;case"url":s.readAsDataURL(r);break;default:s.readAsText(r)}s.onload=e=>{n(s.result)},s.onerror=e=>{console.warn("File Load Error - Unable to read file"),o(e)}}else o(a)})),this.dispatch("import-choose"),this.dispatchExternal("importChoose"),i.click()}))}importData(e,t){var n;return this.table.dataLoader.alertLoader(),new Promise(((o,i)=>{setTimeout((()=>{(n=e.call(this.table,t))instanceof Promise||n?o(n):i()}),10)}))}structureData(e){return Array.isArray(e)&&e.length&&Array.isArray(e[0])?this.table.options.autoColumns?this.structureArrayToObject(e):this.structureArrayToColumns(e):e}mutateData(e){var t=[];return Array.isArray(e)?e.forEach((e=>{t.push(this.table.modules.mutator.transformRow(e,"import"))})):t=e,t}transformHeader(e){var t=[];return this.table.options.importHeaderTransform?(e.forEach((n=>{t.push(this.table.options.importHeaderTransform.call(this.table,n,e))})),t):e}transformData(e){var t=[];return this.table.options.importValueTransform?(e.forEach((n=>{t.push(this.table.options.importValueTransform.call(this.table,n,e))})),t):e}structureArrayToObject(e){var t=this.transformHeader(e.shift());return e.map((e=>{var n={};return e=this.transformData(e),t.forEach(((t,o)=>{n[t]=e[o]})),n}))}structureArrayToColumns(e){var t=[],n=this.transformHeader(e[0]),o=this.table.getColumns();return o[0]&&n[0]&&o[0].getDefinition().title===n[0]&&e.shift(),e.forEach((e=>{var n={};(e=this.transformData(e)).forEach(((e,t)=>{var i=o[t];i&&(n[i.getField()]=e)})),t.push(n)})),t}validateFile(e){return!this.table.options.importFileValidator||this.table.options.importFileValidator.call(this.table,e)}validateData(e){var t;return this.table.options.importDataValidator?!0===(t=this.table.options.importDataValidator.call(this.table,e))?e:Promise.reject(t):e}setData(e){return this.dispatch("import-imported",e),this.dispatchExternal("importImported",e),this.table.dataLoader.clearAlert(),this.table.setData(e)}}var ee={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,navLeft:37,navRight:39,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35},te={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,n=t.scrollTop-t.element.clientHeight;e.preventDefault(),t.displayRowsCount&&(n>=0?t.element.scrollTop=n:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,n=t.scrollTop+t.element.clientHeight,o=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(n<=o?t.element.scrollTop=n:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){this.dispatch("keybinding-nav-prev",e)},navNext:function(e){this.dispatch("keybinding-nav-next",e)},navLeft:function(e){this.dispatch("keybinding-nav-left",e)},navRight:function(e){this.dispatch("keybinding-nav-right",e)},navUp:function(e){this.dispatch("keybinding-nav-up",e)},navDown:function(e){this.dispatch("keybinding-nav-down",e)}};class ne extends s{static moduleName="keybindings";static bindings=ee;static actions=te;constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],!1!==e&&(Object.assign(t,ne.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)ne.actions[t]?e[t]&&("object"!=typeof e[t]&&(e[t]=[e[t]]),e[t].forEach((e=>{(Array.isArray(e)?e:[e]).forEach((e=>{this.mapBinding(t,e)}))}))):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var n={action:ne.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1};t.toString().toLowerCase().split(" ").join("").split("+").forEach((e=>{switch(e){case"ctrl":n.ctrl=!0;break;case"shift":n.shift=!0;break;case"meta":n.meta=!0;break;default:e=isNaN(e)?e.toUpperCase().charCodeAt(0):parseInt(e),n.keys.push(e),this.watchKeys[e]||(this.watchKeys[e]=[]),this.watchKeys[e].push(n)}}))}bindEvents(){var e=this;this.keyupBinding=function(t){var n=t.keyCode,o=e.watchKeys[n];o&&(e.pressedKeys.push(n),o.forEach((function(n){e.checkBinding(t,n)})))},this.keydownBinding=function(t){var n=t.keyCode;if(e.watchKeys[n]){var o=e.pressedKeys.indexOf(n);o>-1&&e.pressedKeys.splice(o,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var n=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach((e=>{-1==this.pressedKeys.indexOf(e)&&(n=!1)})),n&&t.action.call(this,e),!0)}}var oe={delete:function(e,t,n){e.delete()}},ie={insert:function(e,t,n){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,n){return this.table.addRow(e.getData()),!0},update:function(e,t,n){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,n){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}};class re extends s{static moduleName="moveRow";static senders=oe;static receivers=ie;constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,n={};n.mouseup=function(n){t.tableRowDrop(n,e)}.bind(t),n.mousemove=function(n){var o;n.pageY-i.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?t.toRow===e&&t.toRowAfter||((o=e.getElement()).parentNode.insertBefore(t.placeholderElement,o.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(o=e.getElement()).previousSibling&&(o.parentNode.insertBefore(t.placeholderElement,o),t.moveRow(e,!1))}.bind(t),e.modules.moveRow=n}initializeRow(e){var t,n=this,o={};o.mouseup=function(t){n.tableRowDrop(t,e)}.bind(n),o.mousemove=function(t){var o=e.getElement();t.pageY-i.elOffset(o).top+n.table.rowManager.element.scrollTop>e.getHeight()/2?n.toRow===e&&n.toRowAfter||(o.parentNode.insertBefore(n.placeholderElement,o.nextSibling),n.moveRow(e,!0)):(n.toRow!==e||n.toRowAfter)&&(o.parentNode.insertBefore(n.placeholderElement,o),n.moveRow(e,!1))}.bind(n),this.hasHandle||((t=e.getElement()).addEventListener("mousedown",(function(t){1===t.which&&(n.checkTimeout=setTimeout((function(){n.startMove(t,e)}),n.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&n.checkTimeout&&clearTimeout(n.checkTimeout)})),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=o}initializeColumn(e){e.definition.rowHandle&&!1!==this.table.options.movableRows&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&!1!==this.table.options.movableRows){var t=this,n=e.getElement(!0);n.addEventListener("mousedown",(function(n){1===n.which&&(t.checkTimeout=setTimeout((function(){t.startMove(n,e.row)}),t.checkPeriod))})),n.addEventListener("mouseup",(function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)})),this.bindTouchEvents(e.row,n)}}bindTouchEvents(e,t){var n,o,i,r,s,a,l=!1;t.addEventListener("touchstart",(t=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,n=e.nextRow(),i=n?n.getHeight()/2:0,o=e.prevRow(),r=o?o.getHeight()/2:0,s=0,a=0,l=!1,this.startMove(t,e)}),this.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",(t=>{var c,u;this.moving&&(t.preventDefault(),this.moveHover(t),l||(l=t.touches[0].pageY),(c=t.touches[0].pageY-l)>0?n&&c-s>i&&(u=n)!==e&&(l=t.touches[0].pageY,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement().nextSibling),this.moveRow(u,!0)):o&&-c-a>r&&(u=o)!==e&&(l=t.touches[0].pageY,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement()),this.moveRow(u,!1)),u&&(n=u.nextRow(),s=i,i=n?n.getHeight()/2:0,o=u.prevRow(),a=r,r=o?o.getHeight()/2:0))})),t.addEventListener("touchend",(e=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(e),this.touchMove=!1)}))}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach((e=>{("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)}))}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach((e=>{("row"===e.type||"group"===e.type)&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)}))}startMove(e,t){var n=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(n.parentNode.insertBefore(this.placeholderElement,n),n.parentNode.removeChild(n)),this.hoverElement=n.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var n,o,i=this.touchMove?e.touches[0].pageX:e.pageX,r=this.touchMove?e.touches[0].pageY:e.pageY;n=t.getElement(),this.connection?(o=n.getBoundingClientRect(),this.startX=o.left-i+window.pageXOffset,this.startY=o.top-r+window.pageYOffset):this.startY=r-n.getBoundingClientRect().top}endMove(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),n=t.scrollTop,o=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+n;this.hoverElement.style.top=Math.min(o-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,n){this.dispatchExternal("movableRowsElementDrop",e,t,!!n&&n.getComponent())}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((e=>{"string"==typeof e?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):this.connectionElements.push(e)})),this.connectionElements.forEach((e=>{var t=t=>{this.elementRowDrop(t,e,this.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")})))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((e=>{e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent}))}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((e=>{"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((e=>{"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,n){var o=!1;if(n){switch(typeof this.table.options.movableRowsSender){case"string":o=re.senders[this.table.options.movableRowsSender];break;case"function":o=this.table.options.movableRowsSender}o?o.call(this,this.moving?this.moving.getComponent():void 0,t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var n=!1,o=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":n=re.receivers[this.table.options.movableRowsReceiver];break;case"function":n=this.table.options.movableRowsReceiver}n?o=n.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),o?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:o})}commsReceived(e,t,n){switch(t){case"connect":return this.connect(e,n.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,n.row,n.success)}}}var se={};class ae extends s{static moduleName="mutator";static mutators=se;constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard","import"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutatorImport"),this.registerColumnOption("mutatorImportParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,n){return this.transformRow(t,"data",n)}initializeColumn(e){var t=!1,n={};this.allowedTypes.forEach((o=>{var i,r="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));e.definition[r]&&(i=this.lookupMutator(e.definition[r]))&&(t=!0,n[r]={mutator:i,params:e.definition[r+"Params"]||{}})})),t&&(e.modules.mutate=n)}lookupMutator(e){var t=!1;switch(typeof e){case"string":ae.mutators[e]?t=ae.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e}return t}transformRow(e,t,n){var o,i="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&this.table.columnManager.traverse((r=>{var s,a,l;r.modules.mutate&&(s=r.modules.mutate[i]||r.modules.mutate.mutator||!1)&&(o=r.getFieldValue(void 0!==n?n:e),("data"==t&&!n||void 0!==o)&&(l=r.getComponent(),a="function"==typeof s.params?s.params(o,e,t,l):s.params,r.setFieldValue(e,s.mutator(o,e,t,a,l))))})),e}transformCell(e,t){if(e.column.modules.mutate){var n=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,o={};if(n)return o=Object.assign(o,e.row.getData()),e.column.setFieldValue(o,t),n.mutator(t,o,"edit",n.params,e.getComponent())}return t}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach((t=>{var n=e.row.getCell(t);n&&n.setValue(n.getValue(),!0,!0)})))}enable(){this.enabled=!0}disable(){this.enabled=!1}}var le={rows:function(e,t,n,o,i){var r=document.createElement("span"),s=document.createElement("span"),a=document.createElement("span"),l=document.createElement("span"),c=document.createElement("span"),u=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(e=>{s.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|of",(e=>{l.innerHTML=e})),this.table.modules.localize.langBind("pagination|counter|rows",(e=>{u.innerHTML=e})),o?(a.innerHTML=" "+t+"-"+Math.min(t+e-1,o)+" ",c.innerHTML=" "+o+" ",r.appendChild(s),r.appendChild(a),r.appendChild(l),r.appendChild(c),r.appendChild(u)):(a.innerHTML=" 0 ",r.appendChild(s),r.appendChild(a),r.appendChild(u)),r},pages:function(e,t,n,o,i){var r=document.createElement("span"),s=document.createElement("span"),a=document.createElement("span"),l=document.createElement("span"),c=document.createElement("span"),u=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",(e=>{s.innerHTML=e})),a.innerHTML=" "+n+" ",this.table.modules.localize.langBind("pagination|counter|of",(e=>{l.innerHTML=e})),c.innerHTML=" "+i+" ",this.table.modules.localize.langBind("pagination|counter|pages",(e=>{u.innerHTML=e})),r.appendChild(s),r.appendChild(a),r.appendChild(l),r.appendChild(c),r.appendChild(u),r}};class ce extends s{static moduleName="page";static pageCounters=le;constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("paginationOutOfRange",!1),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),"page"==this.table.options.paginationAddRow&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),"remote"===this.table.options.paginationMode&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),"scroll"===this.table.options.progressiveLoad&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var n,o=this.table.rowManager,i=o.getDisplayRows();return t?i.length?n=i[0]:o.activeRows.length&&(n=o.activeRows[o.activeRows.length-1],t=!1):i.length&&(n=i[i.length-1],t=!(i.length<this.size)),{index:n,top:t}}calculatePageSizes(){var e,t;this.table.options.paginationSize?this.size=this.table.options.paginationSize:((e=document.createElement("div")).classList.add("tabulator-row"),e.style.visibility="hidden",(t=document.createElement("div")).classList.add("tabulator-cell"),t.innerHTML="Page Row Test",e.appendChild(t),this.table.rowManager.getTableElement().appendChild(e),this.size=Math.floor(this.table.rowManager.getElement().clientHeight/e.offsetHeight),this.table.rowManager.getTableElement().removeChild(e)),this.dispatchExternal("pageSizeChanged",this.size),this.generatePageSizeSelectList()}initialLoadComplete(){this.initialLoad=!1}remotePageParams(e,t,n,o){return this.initialLoad||(this.progressiveLoad&&!n||!this.progressiveLoad&&!this.dataChanging)&&this.reset(!0),o.page=this.page,this.size&&(o.size=this.size),o}userSetPageToRow(e){return this.table.options.pagination&&(e=this.table.rowManager.findRow(e))?this.setPageToRow(e):Promise.reject()}userSetPageSize(e){return!!this.table.options.pagination&&(this.setPageSize(e),this.setPage(1))}scrollVertical(e,t){var n;t||this.table.dataLoader.loading||(n=this.table.rowManager.getElement()).scrollHeight-n.clientHeight-e<(this.table.options.progressiveLoadScrollMargin||2*n.clientHeight)&&this.nextPage().catch((()=>{}))}restOnRenderBefore(e,t){return t||"local"===this.mode&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(e=document.createElement("button")).classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,-1==this.pageSizes.indexOf(this.size)&&e.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach((e=>{var t=document.createElement("option");t.value=e,!0===e?this.langBind("pagination|all",(function(e){t.innerHTML=e})):t.innerHTML=e,this.pageSizeSelect.appendChild(t)})),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&((t="function"==typeof e?e:ce.pageCounters[e])?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,n;e||(this.langBind("pagination|first",(e=>{this.firstBut.innerHTML=e})),this.langBind("pagination|first_title",(e=>{this.firstBut.setAttribute("aria-label",e),this.firstBut.setAttribute("title",e)})),this.langBind("pagination|prev",(e=>{this.prevBut.innerHTML=e})),this.langBind("pagination|prev_title",(e=>{this.prevBut.setAttribute("aria-label",e),this.prevBut.setAttribute("title",e)})),this.langBind("pagination|next",(e=>{this.nextBut.innerHTML=e})),this.langBind("pagination|next_title",(e=>{this.nextBut.setAttribute("aria-label",e),this.nextBut.setAttribute("title",e)})),this.langBind("pagination|last",(e=>{this.lastBut.innerHTML=e})),this.langBind("pagination|last_title",(e=>{this.lastBut.setAttribute("aria-label",e),this.lastBut.setAttribute("title",e)})),this.firstBut.addEventListener("click",(()=>{this.setPage(1)})),this.prevBut.addEventListener("click",(()=>{this.previousPage()})),this.nextBut.addEventListener("click",(()=>{this.nextPage()})),this.lastBut.addEventListener("click",(()=>{this.setPage(this.max)})),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",(e=>{this.pageSizeSelect.setAttribute("aria-label",e),this.pageSizeSelect.setAttribute("title",e),t.innerHTML=e})),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",(e=>{this.setPageSize("true"==this.pageSizeSelect.value||this.pageSizeSelect.value),this.setPage(1)}))),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):"string"==typeof this.table.options.paginationCounterElement&&((n=document.querySelector(this.table.options.paginationCounterElement))?n.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||("local"==this.mode||e)&&(this.page=1,this.trackChanges())}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return(e=parseInt(e))>0&&e<=this.max||"local"!==this.mode?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.displayRows(-1).indexOf(e);if(t>-1){var n=!0===this.size?1:Math.ceil((t+1)/this.size);return this.setPage(n)}return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e,this.dispatchExternal("pageSizeChanged",e)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,n){var o;if(this.pageCounter)switch("remote"===this.mode&&(t=this.size,n=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),typeof(o=this.pageCounter.call(this,t,n,this.page,e,this.max))){case"object":if(o instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(o)}else this.pageCounterElement.innerHTML="",null!=o&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",o);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=o}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),n=this.max-this.page+e+1<this.count?this.max-this.count+1:Math.max(this.page-e,1),o=this.page<=t?Math.min(this.count,this.max):Math.min(this.page+t,this.max);for(;this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);1==this.page?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(let e=n;e<=o;e++)e>0&&e<=this.max&&this.pagesElement.appendChild(this._generatePageButton(e));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",(n=>{t.setAttribute("aria-label",n+" "+e),t.setAttribute("title",n+" "+e)})),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",(t=>{this.setPage(e)})),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page<this.max?(this.page++,this.trackChanges(),this.trigger()):(this.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),Promise.reject())}getPage(){return this.page}getPageMax(){return this.max}getPageSize(e){return this.size}getMode(){return this.mode}getRows(e){var t,n,o,i,r=0,s=e.filter((e=>"row"===e.type));if("local"==this.mode){t=[],this.setMaxRows(e.length),!0===this.size?(n=0,o=e.length):o=(n=this.size*(this.page-1))+parseInt(this.size),this._setPageButtons();for(let s=n;s<o;s++){let n=e[s];n&&(t.push(n),"row"===n.type&&(i||(i=n),r++))}return this._setPageCounter(s.length,r,i?s.indexOf(i)+1:0),t}return this._setPageButtons(),this._setPageCounter(s.length),e.slice(0)}trigger(){var e;switch(this.mode){case"local":return e=this.table.rowManager.scrollLeft,this.refreshData(),this.table.rowManager.scrollHorizontal(e),this.dispatchExternal("pageLoaded",this.getPage()),Promise.resolve();case"remote":return this.dataChanging=!0,this.reloadData(null).finally((()=>{this.dataChanging=!1}));case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t,n;if(void 0===e.last_page&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data){if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=void 0!==e.last_row?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(e.data,!1,1==this.page):this.table.rowManager.addRows(e.data),this.page<this.max&&setTimeout((()=>{this.nextPage()}),this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=1===this.page?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,1!==this.page,1==this.page),t=this.table.options.progressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page<this.max&&setTimeout((()=>{this.nextPage()}))}return!1}if(this.page>this.max&&(console.warn("Remote Pagination Error - Server returned last page value lower than the current page"),n=this.options("paginationOutOfRange")))return this.setPage("function"==typeof n?n.call(this,this.page,this.max):n);this.dispatchExternal("pageLoaded",this.getPage())}else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}var ue={local:function(e,t){var n=localStorage.getItem(e+"-"+t);return!!n&&JSON.parse(n)},cookie:function(e,t){var n,o,i=document.cookie,r=e+"-"+t,s=i.indexOf(r+"=");return s>-1&&((n=(i=i.slice(s)).indexOf(";"))>-1&&(i=i.slice(0,n)),o=i.replace(r+"=","")),!!o&&JSON.parse(o)}},de={local:function(e,t,n){localStorage.setItem(e+"-"+t,JSON.stringify(n))},cookie:function(e,t,n){var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(n)+"; expires="+o.toUTCString()}};class he extends s{static moduleName="persistence";static moduleInitOrder=-10;static readers=ue;static writers=de;constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}initialize(){if(this.table.options.persistence){var e,t=this.table.options.persistenceMode,n=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:he.readers[this.table.options.persistenceReaderFunc]?this.readFunc=he.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):he.readers[this.mode]?this.readFunc=he.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:he.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=he.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):he.writers[this.mode]?this.writeFunc=he.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(n||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,headerFilter:!0===this.table.options.persistence||this.table.options.persistence.headerFilter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retrieveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retrieveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t,n;this.config.sort&&0==!(e=this.load("sort"))&&(this.table.options.initialSort=e),this.config.filter&&0==!(t=this.load("filter"))&&(this.table.options.initialFilter=t),this.config.headerFilter&&0==!(n=this.load("headerFilter"))&&(this.table.options.initialHeaderFilter=n)}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e,!0)),!0}initializeColumn(e){var t;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),(!0===this.config.columns?Object.keys(t):this.config.columns).forEach((e=>{var n=Object.getOwnPropertyDescriptor(t,e),o=t[e];n&&Object.defineProperty(t,e,{set:e=>{o=e,this.defWatcherBlock||this.save("columns"),n.set&&n.set(e)},get:()=>(n.get&&n.get(),o)})})),this.defWatcherBlock=!1)}load(e,t){var n=this.retrieveData(e);return t&&(n=n?this.mergeDefinition(t,n):t),n}retrieveData(e){return!!this.readFunc&&this.readFunc(this.id,e)}mergeDefinition(e,t,n){var o=[];return(t=t||[]).forEach(((t,i)=>{var r,s=this._findColumn(e,t);s&&(n?r=Object.keys(t):!0===this.config.columns||null==this.config.columns?(r=Object.keys(s)).push("width"):r=this.config.columns,r.forEach((e=>{"columns"!==e&&void 0!==t[e]&&(s[e]=t[e])})),s.columns&&(s.columns=this.mergeDefinition(s.columns,t.columns)),o.push(s))})),e.forEach(((e,n)=>{this._findColumn(t,e)||(o.length>n?o.splice(n,0,e):o.push(e))})),o}_findColumn(e,t){var n=t.columns?"group":t.field?"field":"object";return e.find((function(e){switch(n){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}}))}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"headerFilter":t=this.table.modules.filter.getHeaderFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach((function(e){e.column=e.field,delete e.field})),e}getGroupConfig(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],n=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach((e=>{var o,i={},r=e.getDefinition();e.isGroup?(i.title=r.title,i.columns=this.parseColumns(e.getColumns())):(i.field=e.getField(),!0===this.config.columns||null==this.config.columns?((o=Object.keys(r)).push("width"),o.push("visible")):o=this.config.columns,o.forEach((t=>{switch(t){case"width":i.width=e.getWidth();break;case"visible":i.visible=e.visible;break;default:"function"!=typeof r[t]&&-1===n.indexOf(t)&&(i[t]=r[t])}}))),t.push(i)})),t}}var pe={format:{formatters:{responsiveCollapse:function(e,t,n){var o=document.createElement("div"),i=e.getRow()._row.modules.responsiveLayout;function r(e){var t=i.element;i.open=e,t&&(i.open?(o.classList.add("open"),t.style.display=""):(o.classList.remove("open"),t.style.display="none"))}return o.classList.add("tabulator-responsive-collapse-toggle"),o.innerHTML='<svg class=\'tabulator-responsive-collapse-toggle-open\' viewbox="0 0 24 24">\n <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />\n <line y1="7" x1="12" y2="17" x2="12" fill="none" stroke-width="3" stroke-linecap="round" />\n</svg>\n\n<svg class=\'tabulator-responsive-collapse-toggle-close\' viewbox="0 0 24 24">\n <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />\n</svg>',e.getElement().classList.add("tabulator-row-handle"),o.addEventListener("click",(function(t){t.stopImmediatePropagation(),r(!i.open),e.getTable().rowManager.adjustTableSize()})),r(i.open),o}}}},me={format:{formatters:{rowSelection:function(e,t,n){var o=document.createElement("input"),i=!1;if(o.type="checkbox",o.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(o.addEventListener("click",(e=>{e.stopPropagation()})),"function"==typeof e.getRow){var r=e.getRow();r instanceof R?(o.addEventListener("change",(e=>{"click"===this.table.options.selectableRowsRangeMode&&i?i=!1:r.toggleSelect()})),"click"===this.table.options.selectableRowsRangeMode&&o.addEventListener("click",(e=>{i=!0,this.table.modules.selectRow.handleComplexRowClick(r._row,e)})),o.checked=r.isSelected&&r.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(r,o)):o=""}else o.addEventListener("change",(e=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(t.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(o);return o}}}};class ge{constructor(e){return this._range=e,new Proxy(this,{get:function(e,t,n){return void 0!==e[t]?e[t]:e._range.table.componentFunctionBinder.handle("range",e._range,t)}})}getElement(){return this._range.element}getData(){return this._range.getData()}getCells(){return this._range.getCells(!0,!0)}getStructuredCells(){return this._range.getStructuredCells()}getRows(){return this._range.getRows().map((e=>e.getComponent()))}getColumns(){return this._range.getColumns().map((e=>e.getComponent()))}getBounds(){return this._range.getBounds()}getTopEdge(){return this._range.top}getBottomEdge(){return this._range.bottom}getLeftEdge(){return this._range.left}getRightEdge(){return this._range.right}setBounds(e,t){this._range.destroyedGuard("setBounds")&&this._range.setBounds(e?e._cell:e,t?t._cell:t)}setStartBound(e){this._range.destroyedGuard("setStartBound")&&(this._range.setEndBound(e?e._cell:e),this._range.rangeManager.layoutElement())}setEndBound(e){this._range.destroyedGuard("setEndBound")&&(this._range.setEndBound(e?e._cell:e),this._range.rangeManager.layoutElement())}clearValues(){this._range.destroyedGuard("clearValues")&&this._range.clearValues()}remove(){this._range.destroyedGuard("remove")&&this._range.destroy(!0)}}class fe extends o{constructor(e,t,n,o){super(e),this.rangeManager=t,this.element=null,this.initialized=!1,this.initializing={start:!1,end:!1},this.destroyed=!1,this.top=0,this.bottom=0,this.left=0,this.right=0,this.table=e,this.start={row:0,col:0},this.end={row:0,col:0},this.rangeManager.rowHeader&&(this.left=1,this.right=1,this.start.col=1,this.end.col=1),this.initElement(),setTimeout((()=>{this.initBounds(n,o)}))}initElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-range")}initBounds(e,t){this._updateMinMax(),e&&this.setBounds(e,t||e)}setStart(e,t){this.start.row===e&&this.start.col===t||(this.start.row=e,this.start.col=t,this.initializing.start=!0,this._updateMinMax())}setEnd(e,t){this.end.row===e&&this.end.col===t||(this.end.row=e,this.end.col=t,this.initializing.end=!0,this._updateMinMax())}setBounds(e,t,n){e&&this.setStartBound(e),this.setEndBound(t||e),this.rangeManager.layoutElement(n)}setStartBound(e){var t,n;"column"===e.type?this.rangeManager.columnSelection&&this.setStart(0,e.getPosition()-1):(t=e.row.position-1,n=e.column.getPosition()-1,e.column===this.rangeManager.rowHeader?this.setStart(t,1):this.setStart(t,n))}setEndBound(e){var t,n,o,i=this._getTableRows().length;"column"===e.type?this.rangeManager.columnSelection&&("column"===this.rangeManager.selecting?this.setEnd(i-1,e.getPosition()-1):"cell"===this.rangeManager.selecting&&this.setEnd(0,e.getPosition()-1)):(t=e.row.position-1,n=e.column.getPosition()-1,o=e.column===this.rangeManager.rowHeader,"row"===this.rangeManager.selecting?this.setEnd(t,this._getTableColumns().length-1):"row"!==this.rangeManager.selecting&&o?this.setEnd(t,0):"column"===this.rangeManager.selecting?this.setEnd(i-1,n):this.setEnd(t,n))}_updateMinMax(){this.top=Math.min(this.start.row,this.end.row),this.bottom=Math.max(this.start.row,this.end.row),this.left=Math.min(this.start.col,this.end.col),this.right=Math.max(this.start.col,this.end.col),this.initialized?this.dispatchExternal("rangeChanged",this.getComponent()):this.initializing.start&&this.initializing.end&&(this.initialized=!0,this.dispatchExternal("rangeAdded",this.getComponent()))}_getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}_getTableRows(){return this.table.rowManager.getDisplayRows().filter((e=>"row"===e.type))}layout(){var e,t,n,o,i,r,s,a,l,c,u=this.table.rowManager.renderer.vDomTop,d=this.table.rowManager.renderer.vDomBottom,h=this.table.columnManager.renderer.leftCol,p=this.table.columnManager.renderer.rightCol;"virtual"===this.table.options.renderHorizontal&&this.rangeManager.rowHeader&&(p+=1),null==u&&(u=0),null==d&&(d=1/0),null==h&&(h=0),null==p&&(p=1/0),this.overlaps(h,u,p,d)&&(e=Math.max(this.top,u),t=Math.min(this.bottom,d),n=Math.max(this.left,h),o=Math.min(this.right,p),i=this.rangeManager.getCell(e,n),r=this.rangeManager.getCell(t,o),s=i.getElement(),a=r.getElement(),l=i.row.getElement(),c=r.row.getElement(),this.element.classList.add("tabulator-range-active"),this.table.rtl?(this.element.style.right=l.offsetWidth-s.offsetLeft-s.offsetWidth+"px",this.element.style.width=s.offsetLeft+s.offsetWidth-a.offsetLeft+"px"):(this.element.style.left=l.offsetLeft+s.offsetLeft+"px",this.element.style.width=a.offsetLeft+a.offsetWidth-s.offsetLeft+"px"),this.element.style.top=l.offsetTop+"px",this.element.style.height=c.offsetTop+c.offsetHeight-l.offsetTop+"px")}atTopLeft(e){return e.row.position-1===this.top&&e.column.getPosition()-1===this.left}atBottomRight(e){return e.row.position-1===this.bottom&&e.column.getPosition()-1===this.right}occupies(e){return this.occupiesRow(e.row)&&this.occupiesColumn(e.column)}occupiesRow(e){return this.top<=e.position-1&&e.position-1<=this.bottom}occupiesColumn(e){return this.left<=e.getPosition()-1&&e.getPosition()-1<=this.right}overlaps(e,t,n,o){return!(this.left>n||e>this.right||this.top>o||t>this.bottom)}getData(){var e=[],t=this.getRows(),n=this.getColumns();return t.forEach((t=>{var o=t.getData(),i={};n.forEach((e=>{i[e.field]=o[e.field]})),e.push(i)})),e}getCells(e,t){var n=[],o=this.getRows(),i=this.getColumns();return e?n=o.map((e=>{var n=[];return e.getCells().forEach((e=>{i.includes(e.column)&&n.push(t?e.getComponent():e)})),n})):o.forEach((e=>{e.getCells().forEach((e=>{i.includes(e.column)&&n.push(t?e.getComponent():e)}))})),n}getStructuredCells(){return this.getCells(!0,!0)}getRows(){return this._getTableRows().slice(this.top,this.bottom+1)}getColumns(){return this._getTableColumns().slice(this.left,this.right+1)}clearValues(){var e=this.getCells(),t=this.table.options.selectableRangeClearCellsValue;this.table.blockRedraw(),e.forEach((e=>{e.setValue(t)})),this.table.restoreRedraw()}getBounds(e){var t=this.getCells(!1,e),n={start:null,end:null};return t.length?(n.start=t[0],n.end=t[t.length-1]):console.warn("No bounds defined on range"),n}getComponent(){return this.component||(this.component=new ge(this)),this.component}destroy(e){this.destroyed=!0,this.element.remove(),e&&this.rangeManager.rangeRemoved(this),this.initialized&&this.dispatchExternal("rangeRemoved",this.getComponent())}destroyedGuard(e){return this.destroyed&&console.warn("You cannot call the "+e+" function on a destroyed range"),!this.destroyed}}var be={keybindings:{bindings:{rangeJumpUp:["ctrl + 38","meta + 38"],rangeJumpDown:["ctrl + 40","meta + 40"],rangeJumpLeft:["ctrl + 37","meta + 37"],rangeJumpRight:["ctrl + 39","meta + 39"],rangeExpandUp:"shift + 38",rangeExpandDown:"shift + 40",rangeExpandLeft:"shift + 37",rangeExpandRight:"shift + 39",rangeExpandJumpUp:["ctrl + shift + 38","meta + shift + 38"],rangeExpandJumpDown:["ctrl + shift + 40","meta + shift + 40"],rangeExpandJumpLeft:["ctrl + shift + 37","meta + shift + 37"],rangeExpandJumpRight:["ctrl + shift + 39","meta + shift + 39"]},actions:{rangeJumpLeft:function(e){this.dispatch("keybinding-nav-range",e,"left",!0,!1)},rangeJumpRight:function(e){this.dispatch("keybinding-nav-range",e,"right",!0,!1)},rangeJumpUp:function(e){this.dispatch("keybinding-nav-range",e,"up",!0,!1)},rangeJumpDown:function(e){this.dispatch("keybinding-nav-range",e,"down",!0,!1)},rangeExpandLeft:function(e){this.dispatch("keybinding-nav-range",e,"left",!1,!0)},rangeExpandRight:function(e){this.dispatch("keybinding-nav-range",e,"right",!1,!0)},rangeExpandUp:function(e){this.dispatch("keybinding-nav-range",e,"up",!1,!0)},rangeExpandDown:function(e){this.dispatch("keybinding-nav-range",e,"down",!1,!0)},rangeExpandJumpLeft:function(e){this.dispatch("keybinding-nav-range",e,"left",!0,!0)},rangeExpandJumpRight:function(e){this.dispatch("keybinding-nav-range",e,"right",!0,!0)},rangeExpandJumpUp:function(e){this.dispatch("keybinding-nav-range",e,"up",!0,!0)},rangeExpandJumpDown:function(e){this.dispatch("keybinding-nav-range",e,"down",!0,!0)}}},clipboard:{pasteActions:{range:function(e){var t,n,o,i,r,s=[],a=this.table.modules.selectRange.activeRange,l=!1;return r=e.length,a&&(n=(t=a.getBounds()).start,t.start===t.end&&(l=!0),n&&(o=(s=this.table.rowManager.activeRows.slice()).indexOf(n.row),i=l?e.length:s.indexOf(t.end.row)-o+1,o>-1&&(this.table.blockRedraw(),(s=s.slice(o,o+i)).forEach(((t,n)=>{t.updateData(e[n%r])})),this.table.restoreRedraw()))),s}},pasteParsers:{range:function(e){var t,n,o,i,r,s=[],a=[],l=this.table.modules.selectRange.activeRange,c=!1;return!!(l&&(n=(t=l.getBounds()).start,t.start===t.end&&(c=!0),n&&((e=e.split("\n")).forEach((function(e){s.push(e.split("\t"))})),s.length&&(r=(i=this.table.columnManager.getVisibleColumnsByIndex()).indexOf(n.column))>-1)))&&(o=c?s[0].length:i.indexOf(t.end.column)-r+1,i=i.slice(r,r+o),s.forEach((e=>{var t={},n=e.length;i.forEach((function(o,i){t[o.field]=e[i%n]})),a.push(t)})),a)}}},export:{columnLookups:{range:function(){var e=this.modules.selectRange.selectedColumns();return this.columnManager.rowHeader&&e.unshift(this.columnManager.rowHeader),e}},rowLookups:{range:function(){return this.modules.selectRange.selectedRows()}}}};function ve(e,t,n,o,i,r,s){var a=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),l=s.format||"dd/MM/yyyy HH:mm:ss",c=s.alignEmptyValues,u=0;if(void 0!==a){if(a.isDateTime(e)||(e="iso"===l?a.fromISO(String(e)):a.fromFormat(String(e),l)),a.isDateTime(t)||(t="iso"===l?a.fromISO(String(t)):a.fromFormat(String(t),l)),e.isValid){if(t.isValid)return e-t;u=1}else u=t.isValid?-1:0;return("top"===c&&"desc"===r||"bottom"===c&&"asc"===r)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}var we={number:function(e,t,n,o,i,r,s){var a=s.alignEmptyValues,l=s.decimalSeparator,c=s.thousandSeparator,u=0;if(e=String(e),t=String(t),c&&(e=e.split(c).join(""),t=t.split(c).join("")),l&&(e=e.split(l).join("."),t=t.split(l).join(".")),e=parseFloat(e),t=parseFloat(t),isNaN(e))u=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;u=1}return("top"===a&&"desc"===r||"bottom"===a&&"asc"===r)&&(u*=-1),u},string:function(e,t,n,o,i,r,s){var a,l=s.alignEmptyValues,c=0;if(e){if(t){switch(typeof s.locale){case"boolean":s.locale&&(a=this.langLocale());break;case"string":a=s.locale}return String(e).toLowerCase().localeCompare(String(t).toLowerCase(),a)}c=1}else c=t?-1:0;return("top"===l&&"desc"===r||"bottom"===l&&"asc"===r)&&(c*=-1),c},date:function(e,t,n,o,i,r,s){return s.format||(s.format="dd/MM/yyyy"),ve.call(this,e,t,n,o,i,r,s)},time:function(e,t,n,o,i,r,s){return s.format||(s.format="HH:mm"),ve.call(this,e,t,n,o,i,r,s)},datetime:ve,boolean:function(e,t,n,o,i,r,s){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,n,o,r,s,a){var l,c=a.type||"length",u=a.alignEmptyValues,d=0,h=this.table;function p(e){var t;switch(l&&(e=l(e)),c){case"length":t=e.length;break;case"sum":t=e.reduce((function(e,t){return e+t}));break;case"max":t=Math.max.apply(null,e);break;case"min":t=Math.min.apply(null,e);break;case"avg":t=e.reduce((function(e,t){return e+t}))/e.length;break;case"string":t=e.join("")}return t}if(a.valueMap&&(l="string"==typeof a.valueMap?function(e){return e.map((e=>i.retrieveNestedData(h.options.nestedFieldSeparator,a.valueMap,e)))}:a.valueMap),Array.isArray(e)){if(Array.isArray(t))return"string"===c?String(p(e)).toLowerCase().localeCompare(String(p(t)).toLowerCase()):p(t)-p(e);d=1}else d=Array.isArray(t)?-1:0;return("top"===u&&"desc"===s||"bottom"===u&&"asc"===s)&&(d*=-1),d},exists:function(e,t,n,o,i,r,s){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,n,o,i,r,s){var a,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,g=s.alignEmptyValues,f=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if((a=String(e).toLowerCase())===(l=String(t).toLowerCase()))return 0;if(!m.test(a)||!m.test(l))return a>l?1:-1;for(a=a.match(p),l=l.match(p),d=a.length>l.length?l.length:a.length;h<d;)if((c=a[h])!==(u=l[h++]))return isFinite(c)&&isFinite(u)?("0"===c.charAt(0)&&(c="."+c),"0"===u.charAt(0)&&(u="."+u),c-u):c>u?1:-1;return a.length>l.length}f=1}else f=t||0===t?-1:0;return("top"===g&&"desc"===r||"bottom"===g&&"asc"===r)&&(f*=-1),f}};class ye extends s{static moduleName="sort";static sorters=we;constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","<div class='tabulator-arrow'></div>"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),"remote"===this.table.options.sortMode&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,n,o){var i=this.getSort();return i.forEach((e=>{delete e.column})),o.sort=i,o}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t,n,o=!1;switch(typeof e.definition.sorter){case"string":ye.sorters[e.definition.sorter]?o=ye.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":o=e.definition.sorter}if(e.modules.sort={sorter:o,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},!1!==e.definition.headerSort){switch((t=e.getElement()).classList.add("tabulator-sortable"),(n=document.createElement("div")).classList.add("tabulator-col-sorter"),"icon"===this.table.options.headerSortClickElement?n.classList.add("tabulator-col-sorter-element"):t.classList.add("tabulator-col-sorter-element"),this.table.options.headerSortElement){case"function":break;case"object":n.appendChild(this.table.options.headerSortElement);break;default:n.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(n),e.modules.sort.element=n,this.setColumnHeaderSortIcon(e,"none"),"icon"===this.table.options.headerSortClickElement&&n.addEventListener("mousedown",(e=>{e.stopPropagation()})),("icon"===this.table.options.headerSortClickElement?n:t).addEventListener("click",(t=>{var n="",o=[],i=!1;if(e.modules.sort){if(e.modules.sort.tristate)n="none"==e.modules.sort.dir?e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?"asc"==e.modules.sort.dir?"desc":"asc":"none";else switch(e.modules.sort.dir){case"asc":n="desc";break;case"desc":n="asc";break;default:n=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(t.shiftKey||t.ctrlKey)?(i=(o=this.getSort()).findIndex((t=>t.field===e.getField())),i>-1?(o[i].dir=n,i=o.splice(i,1)[0],"none"!=n&&o.push(i)):"none"!=n&&o.push({column:e,dir:n}),this.setSort(o)):"none"==n?this.clear():this.setSort(e,n),this.refreshSort()}}))}}refreshSort(){"remote"===this.table.options.sortMode?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=[];return this.sortList.forEach((function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})})),e}setSort(e,t){var n=this,o=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach((function(e){var t;(t=n.table.columnManager.findColumn(e.column))?(e.column=t,o.push(e),n.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)})),n.sortList=o,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t,n=this.table.rowManager.activeRows[0],o="string";if(n&&(n=n.getData(),e.getField()))switch(typeof(t=e.getFieldValue(n))){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(t)||""===t?t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return ye.sorters[o]}sort(e,t){var n=this,o=this.table.options.sortOrderReverse?n.sortList.slice().reverse():n.sortList,i=[],r=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",n.getSort()),t||n.clearColumnHeaders(),"remote"!==this.table.options.sortMode?(o.forEach((function(e,o){var r;e.column&&((r=e.column.modules.sort)&&(r.sorter||(r.sorter=n.findSorter(e.column)),e.params="function"==typeof r.params?r.params(e.column.getComponent(),e.dir):r.params,i.push(e)),t||n.setColumnHeader(e.column,e.dir))})),i.length&&n._sortItems(e,i)):t||o.forEach((function(e,t){n.setColumnHeader(e.column,e.dir)})),this.subscribedExternal("dataSorted")&&(e.forEach((e=>{r.push(e.getComponent())})),this.dispatchExternal("dataSorted",n.getSort(),r)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach((e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))}))}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort","asc"===t?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var n,o=e.modules.sort.element;if(e.definition.headerSort&&"function"==typeof this.table.options.headerSortElement){for(;o.firstChild;)o.removeChild(o.firstChild);"object"==typeof(n=this.table.options.headerSortElement.call(this.table,e.getComponent(),t))?o.appendChild(n):o.innerHTML=n}}_sortItems(e,t){var n=t.length-1;e.sort(((e,o)=>{for(var i,r=n;r>=0;r--){let n=t[r];if(0!==(i=this._sortRow(e,o,n.column,n.dir,n.params)))break}return i}))}_sortRow(e,t,n,o,i){var r,s,a="asc"==o?e:t,l="asc"==o?t:e;return e=void 0!==(e=n.getFieldValue(a.getData()))?e:"",t=void 0!==(t=n.getFieldValue(l.getData()))?t:"",r=a.getComponent(),s=l.getComponent(),n.modules.sort.sorter.call(this,e,t,r,s,n.getComponent(),o,i)}}class Ce{constructor(e,t){this.columnCount=e,this.rowCount=t,this.columnString=[],this.columns=[],this.rows=[]}genColumns(e){var t=Math.max(this.columnCount,Math.max(...e.map((e=>e.length))));this.columnString=[],this.columns=[];for(let e=1;e<=t;e++)this.incrementChar(this.columnString.length-1),this.columns.push(this.columnString.join(""));return this.columns}genRows(e){var t=Math.max(this.rowCount,e.length);this.rows=[];for(let e=1;e<=t;e++)this.rows.push(e);return this.rows}incrementChar(e){let t=this.columnString[e];t?"Z"!==t?this.columnString[e]=String.fromCharCode(this.columnString[e].charCodeAt(0)+1):(this.columnString[e]="A",e?this.incrementChar(e-1):this.columnString.push("A")):this.columnString.push("A")}setRowCount(e){this.rowCount=e}setColumnCount(e){this.columnCount=e}}class xe{constructor(e){return this._sheet=e,new Proxy(this,{get:function(e,t,n){return void 0!==e[t]?e[t]:e._sheet.table.componentFunctionBinder.handle("sheet",e._sheet,t)}})}getTitle(){return this._sheet.title}getKey(){return this._sheet.key}getDefinition(){return this._sheet.getDefinition()}getData(){return this._sheet.getData()}setData(e){return this._sheet.setData(e)}clear(){return this._sheet.clear()}remove(){return this._sheet.remove()}active(){return this._sheet.active()}setTitle(e){return this._sheet.setTitle(e)}setRows(e){return this._sheet.setRows(e)}setColumns(e){return this._sheet.setColumns(e)}}class Ee extends o{constructor(e,t){super(e.table),this.spreadsheetManager=e,this.definition=t,this.title=this.definition.title||"",this.key=this.definition.key||this.definition.title,this.rowCount=this.definition.rows,this.columnCount=this.definition.columns,this.data=this.definition.data||[],this.element=null,this.isActive=!1,this.grid=new Ce(this.columnCount,this.rowCount),this.defaultColumnDefinition={width:100,headerHozAlign:"center",headerSort:!1},this.columnDefinition=Object.assign(this.defaultColumnDefinition,this.options("spreadsheetColumnDefinition")),this.columnDefs=[],this.rowDefs=[],this.columnFields=[],this.columns=[],this.rows=[],this.scrollTop=null,this.scrollLeft=null,this.initialize(),this.dispatchExternal("sheetAdded",this.getComponent())}initialize(){this.initializeElement(),this.initializeColumns(),this.initializeRows()}reinitialize(){this.initializeColumns(),this.initializeRows()}initializeElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tab"),this.element.innerText=this.title,this.element.addEventListener("click",(()=>{this.spreadsheetManager.loadSheet(this)}))}initializeColumns(){this.grid.setColumnCount(this.columnCount),this.columnFields=this.grid.genColumns(this.data),this.columnDefs=[],this.columnFields.forEach((e=>{var t=Object.assign({},this.columnDefinition);t.field=e,t.title=e,this.columnDefs.push(t)}))}initializeRows(){var e;this.grid.setRowCount(this.rowCount),e=this.grid.genRows(this.data),this.rowDefs=[],e.forEach(((e,t)=>{var n={_id:e},o=this.data[t];o&&o.forEach(((e,t)=>{var o=this.columnFields[t];o&&(n[o]=e)})),this.rowDefs.push(n)}))}unload(){this.isActive=!1,this.scrollTop=this.table.rowManager.scrollTop,this.scrollLeft=this.table.rowManager.scrollLeft,this.data=this.getData(!0),this.element.classList.remove("tabulator-spreadsheet-tab-active")}load(){var e=!this.isActive;this.isActive=!0,this.table.blockRedraw(),this.table.setData([]),this.table.setColumns(this.columnDefs),this.table.setData(this.rowDefs),this.table.restoreRedraw(),e&&null!==this.scrollTop&&(this.table.rowManager.element.scrollLeft=this.scrollLeft,this.table.rowManager.element.scrollTop=this.scrollTop),this.element.classList.add("tabulator-spreadsheet-tab-active"),this.dispatchExternal("sheetLoaded",this.getComponent())}getComponent(){return new xe(this)}getDefinition(){return{title:this.title,key:this.key,rows:this.rowCount,columns:this.columnCount,data:this.getData()}}getData(e){var t,n,o,i=[];return this.rowDefs.forEach((e=>{var t=[];this.columnFields.forEach((n=>{t.push(e[n])})),i.push(t)})),e||this.options("spreadsheetOutputFull")||(t=i.map((e=>e.findLastIndex((e=>void 0!==e))+1)),n=Math.max(...t),o=t.findLastIndex((e=>e>0))+1,i=(i=i.slice(0,o)).map((e=>e.slice(0,n)))),i}setData(e){this.data=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}clear(){this.setData([])}setTitle(e){this.title=e,this.element.innerText=e,this.dispatchExternal("sheetUpdated",this.getComponent())}setRows(e){this.rowCount=e,this.initializeRows(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}setColumns(e){this.columnCount=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}remove(){this.spreadsheetManager.removeSheet(this)}destroy(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.dispatchExternal("sheetRemoved",this.getComponent())}active(){this.spreadsheetManager.loadSheet(this)}}var Se={integer:function(e,t,n){return""===t||null==t||(t=Number(t),!isNaN(t)&&isFinite(t)&&Math.floor(t)===t)},float:function(e,t,n){return""===t||null==t||(t=Number(t),!isNaN(t)&&isFinite(t)&&t%1!=0)},numeric:function(e,t,n){return""===t||null==t||!isNaN(t)},string:function(e,t,n){return""===t||null==t||isNaN(t)},alphanumeric:function(e,t,n){return""===t||null==t||new RegExp(/^[a-z0-9]+$/i).test(t)},max:function(e,t,n){return""===t||null==t||parseFloat(t)<=n},min:function(e,t,n){return""===t||null==t||parseFloat(t)>=n},starts:function(e,t,n){return""===t||null==t||String(t).toLowerCase().startsWith(String(n).toLowerCase())},ends:function(e,t,n){return""===t||null==t||String(t).toLowerCase().endsWith(String(n).toLowerCase())},minLength:function(e,t,n){return""===t||null==t||String(t).length>=n},maxLength:function(e,t,n){return""===t||null==t||String(t).length<=n},in:function(e,t,n){return""===t||null==t||("string"==typeof n&&(n=n.split("|")),n.indexOf(t)>-1)},regex:function(e,t,n){return""===t||null==t||new RegExp(n).test(t)},unique:function(e,t,n){if(""===t||null==t)return!0;var o=!0,i=e.getData(),r=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(e){var n=e.getData();n!==i&&t==r.getFieldValue(n)&&(o=!1)})),o},required:function(e,t,n){return""!==t&&null!=t}};class Ae extends s{static moduleName="validate";static validators=Se;constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,n){var o="manual"===this.table.options.validationMode||this.validate(e.column.modules.validate,e,t);return!0!==o&&setTimeout((()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,o)})),o}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach((e=>{!0!==this.cellValidate(e)&&t.push(e.getComponent())})),!t.length||t}rowValidate(e){var t=[];return e.cells.forEach((e=>{!0!==this.cellValidate(e)&&t.push(e.getComponent())})),!t.length||t}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach((e=>{this.clearValidation(e._getSelf())}))}userValidate(e){var t=[];return this.table.rowManager.rows.forEach((e=>{var n=(e=e.getComponent()).validate();!0!==n&&(t=t.concat(n))})),!t.length||t}initializeColumnCheck(e){void 0!==e.definition.validator&&this.initializeColumn(e)}initializeColumn(e){var t,n=this,o=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach((e=>{(t=n._extractValidator(e))&&o.push(t)})):(t=this._extractValidator(e.definition.validator))&&o.push(t),e.modules.validate=!!o.length&&o)}_extractValidator(e){var t,n,o;switch(typeof e){case"string":return(o=e.indexOf(":"))>-1?(t=e.substring(0,o),n=e.substring(o+1)):t=e,this._buildValidator(t,n);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var n="function"==typeof e?e:Ae.validators[e];return n?{type:"function"==typeof e?"function":e,func:n,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,n){var o=this,i=[],r=this.invalidCells.indexOf(t);return e&&e.forEach((e=>{e.func.call(o,t.getComponent(),n,e.params)||i.push({type:e.type,parameters:e.params})})),t.modules.validate||(t.modules.validate={}),i.length?(t.modules.validate.invalid=i,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==r&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),r>-1&&this.invalidCells.splice(r,1)),!i.length||i}getInvalidCells(){var e=[];return this.invalidCells.forEach((t=>{e.push(t.getComponent())})),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))}}var ke=Object.freeze({__proto__:null,AccessorModule:l,AjaxModule:f,ClipboardModule:y,ColumnCalcsModule:I,DataTreeModule:class extends s{static moduleName="dataTree";constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?!0===t.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof t.dataTreeBranchElement?((e=document.createElement("div")).innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?"string"==typeof t.dataTreeCollapseElement?((e=document.createElement("div")).innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?"string"==typeof t.dataTreeExpandElement?((e=document.createElement("div")).innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(e,n){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(e,n){return t.dataTreeStartExpanded[n]}}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){e&&this.table.rowManager.getRows().forEach((e=>{this.reinitializeRowChildren(e)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||!!e&&e.field}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach((t=>{e=e.concat(this.getTreeChildren(t,!1,!0))})),e}rowDataChanged(e,t,n){this.redrawNeeded(n)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){e.column.getField()===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],n=Array.isArray(t),o=n||!n&&"object"==typeof t&&null!==t;!o&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!o&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!o&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!o)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!o)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:o}}reinitializeRowChildren(e){this.getTreeChildren(e,!1,!0).forEach((function(e){e.reinitialize(!0)}))}layoutRow(e){var t=(this.elementField?e.getCell(this.elementField):e.getCells()[0]).getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,t),e.getElement().classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),t.insertBefore(n.branchEl,t.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?t.style.paddingRight=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":t.style.paddingLeft=parseInt(window.getComputedStyle(t,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")}generateControlElement(e,t){var n=e.modules.dataTree,o=n.controlEl;t=t||e.getCells()[0].getElement(),!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",(t=>{t.stopPropagation(),this.collapseRow(e)}))):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",(t=>{t.stopPropagation(),this.expandRow(e)}))),n.controlEl.addEventListener("mousedown",(e=>{e.stopPropagation()})),o&&o.parentNode===t?o.parentNode.replaceChild(n.controlEl,o):t.insertBefore(n.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach(((e,n)=>{var o;t.push(e),e instanceof M&&(e.create(),(o=e.modules.dataTree).index||!1===o.children||this.getChildren(e,!1,!0).forEach((e=>{e.create(),t.push(e)})))})),t}getChildren(e,t,n){var o=e.modules.dataTree,i=[],r=[];return!1!==o.children&&(o.open||t)&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),i=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(i,n),i.forEach((e=>{r.push(e),this.getChildren(e,!1,!0).forEach((e=>{r.push(e)}))}))),r}generateChildren(e){var t=[],n=e.getData()[this.field];return Array.isArray(n)||(n=[n]),n.forEach((n=>{var o=new M(n||{},this.table.rowManager);o.create(),o.modules.dataTree.index=e.modules.dataTree.index+1,o.modules.dataTree.parent=e,o.modules.dataTree.children&&(o.modules.dataTree.open=this.startOpen(o.getComponent(),o.modules.dataTree.index)),t.push(o)})),t}expandRow(e,t){var n=e.modules.dataTree;!1!==n.children&&(n.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,n=[];return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(t.children):t.children).forEach((e=>{e instanceof M&&n.push(e)}))),n}rowDeleting(e){var t=e.modules.dataTree;t&&t.children&&Array.isArray(t.children)&&t.children.forEach((e=>{e instanceof M&&e.wipe()}))}rowDelete(e){var t,n=e.modules.dataTree.parent;n&&(!1!==(t=this.findChildIndex(e,n))&&n.data[this.field].splice(t,1),n.data[this.field].length||delete n.data[this.field],this.initializeRow(n),this.layoutRow(n)),this.refreshData(!0)}addTreeChildRow(e,t,n,o){var i=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==o&&!1!==(i=this.findChildIndex(o,e))&&e.data[this.field].splice(n?i:i+1,0,t),!1===i&&(n?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var n=!1;return"object"==typeof e?e instanceof M?n=e.data:e instanceof R?n=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?t.modules.dataTree&&(n=t.modules.dataTree.children.find((t=>t instanceof M&&t.element===e)))&&(n=n.data):null===e&&(n=!1):n=void 0!==e&&t.data[this.field].find((t=>t.data[this.table.options.index]==e)),n&&(Array.isArray(t.data[this.field])&&(n=t.data[this.field].indexOf(n)),-1==n&&(n=!1)),n}getTreeChildren(e,t,n){var o=e.modules.dataTree,i=[];return o&&o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),o.children.forEach((e=>{e instanceof M&&(i.push(t?e.getComponent():e),n&&this.getTreeChildren(e,t,n).forEach((e=>{i.push(e)})))}))),i}getChildField(){return this.field}redrawNeeded(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]}},DownloadModule:O,EditModule:L,ExportModule:B,FilterModule:W,FormatModule:G,FrozenColumnsModule:class extends s{static moduleName="frozenColumns";constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-deleted",this.reinitializeColumns.bind(this)),this.subscribe("column-hide",this.reinitializeColumns.bind(this)),this.subscribe("column-show",this.reinitializeColumns.bind(this)),this.subscribe("columns-loaded",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach((e=>{this.initializeColumn(e)})),this.layout()}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach((e=>{e.calcs.top&&this.layoutRow(e.calcs.top),e.calcs.bottom&&this.layoutRow(e.calcs.bottom),e.groupList&&e.groupList.length&&this.layoutGroupCalcs(e.groupList)}))}layoutColumnPosition(e){var t=[],n=0,o=0;this.leftColumns.forEach(((o,i)=>{if(o.modules.frozen.marginValue=n,o.modules.frozen.margin=o.modules.frozen.marginValue+"px",o.visible&&(n+=o.getWidth()),i==this.leftColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup){var r=this.getColGroupParentElement(o);t.includes(r)||(this.layoutElement(r,o),t.push(r)),r.classList.toggle("tabulator-frozen-left",o.modules.frozen.edge&&"left"===o.modules.frozen.position),r.classList.toggle("tabulator-frozen-right",o.modules.frozen.edge&&"right"===o.modules.frozen.position)}else this.layoutElement(o.getElement(),o);e&&o.cells.forEach((e=>{this.layoutElement(e.getElement(!0),o)}))})),this.rightColumns.forEach(((t,n)=>{t.modules.frozen.marginValue=o,t.modules.frozen.margin=t.modules.frozen.marginValue+"px",t.visible&&(o+=t.getWidth()),n==this.rightColumns.length-1?t.modules.frozen.edge=!0:t.modules.frozen.edge=!1,t.parent.isGroup?this.layoutElement(this.getColGroupParentElement(t),t):this.layoutElement(t.getElement(),t),e&&t.cells.forEach((e=>{this.layoutElement(e.getElement(!0),t)}))}))}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0);this.table.rowManager.getRows().filter((t=>!e.includes(t))).forEach((e=>{e.deinitialize()})),e.forEach((e=>{"row"===e.type&&this.layoutRow(e)}))}layoutRow(e){"fitDataFill"===this.table.options.layout&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach((t=>{var n=e.getCell(t);n&&this.layoutElement(n.getElement(!0),t)})),this.rightColumns.forEach((t=>{var n=e.getCell(t);n&&this.layoutElement(n.getElement(!0),t)}))}layoutElement(e,t){var n;t.modules.frozen&&e&&(e.style.position="sticky",n=this.table.rtl?"left"===t.modules.frozen.position?"right":"left":t.modules.frozen.position,e.style[n]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),e.classList.toggle("tabulator-frozen-left",t.modules.frozen.edge&&"left"===t.modules.frozen.position),e.classList.toggle("tabulator-frozen-right",t.modules.frozen.edge&&"right"===t.modules.frozen.position))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}getFrozenColumns(){return this.leftColumns.concat(this.rightColumns)}_calcSpace(e,t){var n=0;for(let o=0;o<t;o++)e[o].visible&&(n+=e[o].getWidth());return n}},FrozenRowsModule:class extends s{static moduleName="frozenRows";constructor(e){super(e),this.topElement=document.createElement("div"),this.rows=[],this.registerComponentFunction("row","freeze",this.freezeRow.bind(this)),this.registerComponentFunction("row","unfreeze",this.unfreezeRow.bind(this)),this.registerComponentFunction("row","isFrozen",this.isRowFrozen.bind(this)),this.registerTableOption("frozenRowsField","id"),this.registerTableOption("frozenRows",!1)}initialize(){var e=document.createDocumentFragment();this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.subscribe("row-deleting",this.detachRow.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),10),this.table.options.frozenRows&&(this.subscribe("data-processed",this.initializeRows.bind(this)),this.subscribe("row-added",this.initializeRow.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this))),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}initializeRows(){this.table.rowManager.getRows().forEach((e=>{this.initializeRow(e)}))}initializeRow(e){var t=this.table.options.frozenRows,n=typeof t;"number"===n?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):"function"===n?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){return this.rows.indexOf(e)>-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach((e=>{t.push(e)})),t}getRows(e){var t=e.slice(0);return this.rows.forEach((function(e){var n=t.indexOf(e);n>-1&&t.splice(n,1)})),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(e){e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var n=e.getElement();n.parentNode&&n.parentNode.removeChild(n),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach(((e,t)=>{this.table.rowManager.styleRow(e,t)}))}},GroupRowsModule:class extends s{static moduleName="groupRows";constructor(e){super(e),this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayHandler=this.getRows.bind(this),this.blockRedraw=!1,this.registerTableOption("groupBy",!1),this.registerTableOption("groupStartOpen",!0),this.registerTableOption("groupValues",!1),this.registerTableOption("groupUpdateOnCellEdit",!1),this.registerTableOption("groupHeader",!1),this.registerTableOption("groupHeaderPrint",null),this.registerTableOption("groupHeaderClipboard",null),this.registerTableOption("groupHeaderHtmlOutput",null),this.registerTableOption("groupHeaderDownload",null),this.registerTableOption("groupToggleElement","arrow"),this.registerTableOption("groupClosedShowCalcs",!1),this.registerTableFunction("setGroupBy",this.setGroupBy.bind(this)),this.registerTableFunction("setGroupValues",this.setGroupValues.bind(this)),this.registerTableFunction("setGroupStartOpen",this.setGroupStartOpen.bind(this)),this.registerTableFunction("setGroupHeader",this.setGroupHeader.bind(this)),this.registerTableFunction("getGroups",this.userGetGroups.bind(this)),this.registerTableFunction("getGroupedData",this.userGetGroupedData.bind(this)),this.registerComponentFunction("row","getGroup",this.rowGetGroup.bind(this))}initialize(){this.subscribe("table-destroy",this._blockRedrawing.bind(this)),this.subscribe("rows-wipe",this._blockRedrawing.bind(this)),this.subscribe("rows-wiped",this._restore_redrawing.bind(this)),this.table.options.groupBy&&(this.table.options.groupUpdateOnCellEdit&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("row-data-changed",this.reassignRowToGroup.bind(this),0)),this.subscribe("table-built",this.configureGroupSetup.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHeaders.bind(this)),this.subscribe("rows-wipe",this.wipe.bind(this)),this.subscribe("rows-added",this.rowsUpdated.bind(this)),this.subscribe("row-moving",this.rowMoving.bind(this)),this.subscribe("row-adding-index",this.rowAddingIndex.bind(this)),this.subscribe("rows-sample",this.rowSample.bind(this)),this.subscribe("render-virtual-fill",this.virtualRenderFill.bind(this)),this.registerDisplayHandler(this.displayHandler,20),this.initialized=!0)}_blockRedrawing(){this.blockRedraw=!0}_restore_redrawing(){this.blockRedraw=!1}configureGroupSetup(){if(this.table.options.groupBy){var e=this.table.options.groupBy,t=this.table.options.groupStartOpen,n=this.table.options.groupHeader;this.allowedValues=this.table.options.groupValues,Array.isArray(e)&&Array.isArray(n)&&e.length>n.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",((e,t)=>{this.headerGenerator[0]=(n,o,i)=>(void 0===n?"":n)+"<span>("+o+" "+(1===o?e:t.groups.items)+")</span>"})),this.groupIDLookups=[],e?this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs():this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs&&this.table.columnManager.getRealColumns().forEach((e=>{e.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})),Array.isArray(e)||(e=[e]),e.forEach(((e,t)=>{var n,o;n="function"==typeof e?e:(o=this.table.columnManager.getColumnByField(e))?function(e){return o.getFieldValue(e)}:function(t){return t[e]},this.groupIDLookups.push({field:"function"!=typeof e&&e,func:n,values:!!this.allowedValues&&this.allowedValues[t]})})),t&&(Array.isArray(t)||(t=[t]),t.forEach((e=>{})),this.startOpen=t),n&&(this.headerGenerator=Array.isArray(n)?n:[n])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var n=this.getGroups(!1)[0];t.push(n.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(!this.table.options.groupBy)return t;t=t.filter((e=>"group"!==e.type)),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px"}rowAddingIndex(e,t,n){if(this.table.options.groupBy){this.assignRowToGroup(e);var o=e.modules.group.rows;return o.length>1&&(!t||t&&-1==o.indexOf(t)?n?o[0]!==e&&(t=o[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!n)):o[o.length-1]!==e&&(t=o[o.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!n)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!n)),t}}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized||this.initialize(),this.configureGroupSetup(),!e&&this.table.modExists("columnCalcs")&&!0===this.table.options.columnCalcs&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return!!e.modules.group&&e.modules.group.getComponent()}rowMoving(e,t,n){if(this.table.options.groupBy){!n&&t instanceof U&&(t=this.table.rowManager.prevDisplayRow(e)||t);var o=t instanceof U?t:t.modules.group,i=e instanceof U?e:e.modules.group;o===i?this.table.rowManager.moveRowInArray(o.rows,e,t,n):(i&&i.removeRow(e),o.insertRow(e,t,n))}}rowDeleting(e){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach((function(n){t.push(e?n.getComponent():n)})),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach((e=>{e.groupList.length?t=t.concat(this.getChildGroups(e)):t.push(e)})),t}wipe(){this.table.options.groupBy&&(this.groupList.forEach((function(e){e.wipe()})),this.groupList=[],this.groups={})}pullGroupListData(e){var t=[];return e.forEach((e=>{var n={level:0,rowCount:0,headerContent:""},o=[];e.hasSubGroups?(o=this.pullGroupListData(e.groupList),n.level=e.level,n.rowCount=o.length-e.groupList.length,n.headerContent=e.generator(e.key,n.rowCount,e.rows,e),t.push(n),t=t.concat(o)):(n.level=e.level,n.headerContent=e.generator(e.key,e.rows.length,e.rows,e),n.rowCount=e.getRows().length,t.push(n),e.getRows().forEach((e=>{t.push(e.getData("data"))})))})),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),this.groupList.forEach((n=>{var o=n.getRowGroup(e);o&&(t=o)})),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((e=>{this.createGroup(e,0,t)})),e.forEach((e=>{this.assignRowToExistingGroup(e,t)}))):e.forEach((e=>{this.assignRowToGroup(e,t)})),Object.values(t).forEach((e=>{e.wipe(!0)}))}createGroup(e,t,n){var o,i=t+"_"+e;n=n||[],o=new U(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],n[i]),this.groups[i]=o,this.groupList.push(o)}assignRowToExistingGroup(e,t){var n="0_"+this.groupIDLookups[0].func(e.getData());this.groups[n]&&this.groups[n].addRow(e)}assignRowToGroup(e,t){var n=this.groupIDLookups[0].func(e.getData()),o=!this.groups["0_"+n];return o&&this.createGroup(n,0,t),this.groups["0_"+n].addRow(e),!o}reassignRowToGroup(e){if("row"===e.type){var t=e.modules.group,n=t.getPath(),o=this.getExpectedPath(e);n.length==o.length&&n.every(((e,t)=>e===o[t]))||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],n=e.getData();return this.groupIDLookups.forEach((e=>{t.push(e.func(n))})),t}updateGroupRows(e){var t=[];return this.blockRedraw||(this.groupList.forEach((e=>{t=t.concat(e.getHeadersAndRows())})),e&&this.refreshData(!0)),t}scrollHeaders(e){this.table.options.groupBy&&("virtual"===this.table.options.renderHorizontal&&(e-=this.table.columnManager.renderer.vDomPadLeft),e+="px",this.groupList.forEach((t=>{t.scrollHeader(e)})))}removeGroup(e){var t,n=e.level+"_"+e.key;this.groups[n]&&(delete this.groups[n],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach(((n,o)=>{this.table.rowManager.styleRow(n,o),e.appendChild(n.getElement()),n.initialize(!0),"group"!==n.type&&(t=!1)})),e.style.minWidth=t?this.table.columnManager.getWidth()+"px":""}},HistoryModule:Q,HtmlTableImportModule:class extends s{static moduleName="htmlTableImport";constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&"TABLE"===this.table.originalElement.tagName&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,n=e.getElementsByTagName("th"),o=e.getElementsByTagName("tbody")[0],i=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),o=o?o.getElementsByTagName("tr"):[],this._extractOptions(e,t),n.length?this._extractHeaders(n,o):this._generateBlankHeaders(n,o);for(var r=0;r<o.length;r++){var s=o[r].getElementsByTagName("td"),a={};this.hasIndex||(a[t.index]=r);for(var l=0;l<s.length;l++){var c=s[l];void 0!==this.fieldIndex[l]&&(a[this.fieldIndex[l]]=c.innerHTML)}i.push(a)}t.data=i,this.dispatchExternal("htmlImported")}_extractOptions(e,t,n){var o=e.attributes,i=n?Object.keys(n):Object.keys(t),r={};for(var s in i.forEach((e=>{r[e.toLowerCase()]=e})),o){var a,l=o[s];l&&"object"==typeof l&&l.name&&0===l.name.indexOf("tabulator-")&&(a=l.name.replace("tabulator-",""),void 0!==r[a]&&(t[r[a]]=this._attribValue(l.value)))}}_attribValue(e){return"true"===e||"false"!==e&&e}_findCol(e){return this.table.options.columns.find((t=>t.title===e))||!1}_extractHeaders(e,t){for(var n=0;n<e.length;n++){var o,i=e[n],r=!1,s=this._findCol(i.textContent);s?r=!0:s={title:i.textContent.trim()},s.field||(s.field=i.textContent.trim().toLowerCase().replaceAll(" ","_")),(o=i.getAttribute("width"))&&!s.width&&(s.width=o),this._extractOptions(i,s,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[n]=s.field,s.field==this.table.options.index&&(this.hasIndex=!0),r||this.table.options.columns.push(s)}}_generateBlankHeaders(e,t){for(var n=0;n<e.length;n++){var o=e[n],i={title:"",field:"col"+n};this.fieldIndex[n]=i.field;var r=o.getAttribute("width");r&&(i.width=r),this.table.options.columns.push(i)}}},ImportModule:Z,InteractionModule:class extends s{static moduleName="interaction";constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){Object.values(this.touchWatchers).forEach((e=>{for(let t in e)e[t]=null}))}cellContentsSelectionFixer(e,t){var n;if(!this.table.modExists("edit")||this.table.modules.edit.currentCell!==t){e.preventDefault();try{document.selection?((n=document.body.createTextRange()).moveToElementText(t.getElement()),n.select()):window.getSelection&&((n=document.createRange()).selectNode(t.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(n))}catch(e){}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?!this.subscribers[e]||this.columnSubscribers[e]||this.subscribedExternal(e)||(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,n=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let e in this.eventMap)this.eventMap[e]===n&&this.subscribers[e]&&(t=!1);t&&(this.unsubscribe(n+"-touchstart",this.touchSubscribers[n+"-touchstart"]),this.unsubscribe(n+"-touchend",this.touchSubscribers[n+"-touchend"]),delete this.touchSubscribers[n+"-touchstart"],delete this.touchSubscribers[n+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let n in this.eventMap)t[n]&&(this.subscriptionChanged(n,!0),this.columnSubscribers[n]||(this.columnSubscribers[n]=[]),this.columnSubscribers[n].push(e))}handle(e,t,n){this.dispatchEvent(e,t,n)}handleTouch(e,t,n,o){var i=this.touchWatchers[e];switch("column"===e&&(e="header"),t){case"start":i.tap=!0,clearTimeout(i.tapHold),i.tapHold=setTimeout((()=>{clearTimeout(i.tapHold),i.tapHold=null,i.tap=null,clearTimeout(i.tapDbl),i.tapDbl=null,this.dispatchEvent(e+"TapHold",n,o)}),1e3);break;case"end":i.tap&&(i.tap=null,this.dispatchEvent(e+"Tap",n,o)),i.tapDbl?(clearTimeout(i.tapDbl),i.tapDbl=null,this.dispatchEvent(e+"DblTap",n,o)):i.tapDbl=setTimeout((()=>{clearTimeout(i.tapDbl),i.tapDbl=null}),300),clearTimeout(i.tapHold),i.tapHold=null}}dispatchEvent(e,t,n){var o,i=n.getComponent();this.columnSubscribers[e]&&(n instanceof E?o=n.column.definition[e]:n instanceof k&&(o=n.definition[e]),o&&o(t,i)),this.dispatchExternal(e,t,i)}},KeybindingsModule:ne,MenuModule:class extends s{static moduleName="menu";constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t,n=e.definition.headerMenuIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),n?("function"==typeof n&&(n=n(e.getComponent())),n instanceof HTMLElement?t.appendChild(n):t.innerHTML=n):t.innerHTML="&vellip;",t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,n){n._cell&&(n=n._cell),n.column.definition[e]&&this.loadMenuEvent(n.column.definition[e],t,n)}loadMenuTableColumnEvent(e,t,n){n._column&&(n=n._column),n.definition[e]&&this.loadMenuEvent(n.definition[e],t,n)}loadMenuEvent(e,t,n){n._group?n=n._group:n._row&&(n=n._row),e="function"==typeof e?e.call(this.table,t,n.getComponent()):e,this.loadMenu(t,n,e)}loadMenu(e,t,n,o,i){var r,s=!(e instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),s||e.preventDefault(),n&&n.length){if(o)r=i.child(a);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout((()=>{this.nestedMenuBlock=!1}),100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=r=this.popup(a)}n.forEach((e=>{var n=document.createElement("div"),o=e.label,i=e.disabled;e.separator?n.classList.add("tabulator-menu-separator"):(n.classList.add("tabulator-menu-item"),"function"==typeof o&&(o=o.call(this.table,t.getComponent())),o instanceof Node?n.appendChild(o):n.innerHTML=o,"function"==typeof i&&(i=i.call(this.table,t.getComponent())),i?(n.classList.add("tabulator-menu-item-disabled"),n.addEventListener("click",(e=>{e.stopPropagation()}))):e.menu&&e.menu.length?n.addEventListener("click",(o=>{o.stopPropagation(),this.loadMenu(o,t,e.menu,n,r)})):e.action&&n.addEventListener("click",(n=>{e.action(n,t.getComponent())})),e.menu&&e.menu.length&&n.classList.add("tabulator-menu-item-submenu")),a.appendChild(n)})),a.addEventListener("click",(e=>{this.rootPopup&&this.rootPopup.hide()})),r.show(o||e),r===this.rootPopup&&(this.rootPopup.hideOnBlur((()=>{this.rootPopup=null,this.currentComponent&&(this.dispatch("menu-closed",n,r),this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)})),this.currentComponent=t,this.dispatch("menu-opened",n,r),this.dispatchExternal("menuOpened",t.getComponent()))}}},MoveColumnsModule:class extends s{static moduleName="moveColumn";constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&(this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("alert-show",this.abortMove.bind(this)))}abortMove(){clearTimeout(this.checkTimeout)}initializeColumn(e){var t,n=this,o={};e.modules.frozen||e.isGroup||e.isRowHeader||(t=e.getElement(),o.mousemove=function(o){e.parent===n.moving.parent&&((n.touchMove?o.touches[0].pageX:o.pageX)-i.elOffset(t).left+n.table.columnManager.contentsElement.scrollLeft>e.getWidth()/2?n.toCol===e&&n.toColAfter||(t.parentNode.insertBefore(n.placeholderElement,t.nextSibling),n.moveColumn(e,!0)):(n.toCol!==e||n.toColAfter)&&(t.parentNode.insertBefore(n.placeholderElement,t),n.moveColumn(e,!1)))}.bind(n),t.addEventListener("mousedown",(function(t){n.touchMove=!1,1===t.which&&(n.checkTimeout=setTimeout((function(){n.startMove(t,e)}),n.checkPeriod))})),t.addEventListener("mouseup",(function(e){1===e.which&&n.checkTimeout&&clearTimeout(n.checkTimeout)})),n.bindTouchEvents(e)),e.modules.moveColumn=o}bindTouchEvents(e){var t,n,o,i,r,s,a=e.getElement(),l=!1;a.addEventListener("touchstart",(a=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,t=e.nextColumn(),o=t?t.getWidth()/2:0,n=e.prevColumn(),i=n?n.getWidth()/2:0,r=0,s=0,l=!1,this.startMove(a,e)}),this.checkPeriod)}),{passive:!0}),a.addEventListener("touchmove",(a=>{var c,u;this.moving&&(this.moveHover(a),l||(l=a.touches[0].pageX),(c=a.touches[0].pageX-l)>0?t&&c-r>o&&(u=t)!==e&&(l=a.touches[0].pageX,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement().nextSibling),this.moveColumn(u,!0)):n&&-c-s>i&&(u=n)!==e&&(l=a.touches[0].pageX,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement()),this.moveColumn(u,!1)),u&&(t=u.nextColumn(),r=o,o=t?t.getWidth()/2:0,n=u.prevColumn(),s=i,i=n?n.getWidth()/2:0))}),{passive:!0}),a.addEventListener("touchend",(e=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(e)}))}startMove(e,t){var n=t.getElement(),o=this.table.columnManager.getContentsElement(),r=this.table.columnManager.getHeadersElement();this.table.modules.selectRange&&this.table.modules.selectRange.columnSelection&&this.table.modules.selectRange.mousedown&&"column"===this.table.modules.selectRange.selecting||(this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-i.elOffset(n).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",n.parentNode.insertBefore(this.placeholderElement,n),n.parentNode.removeChild(n),this.hoverElement=n.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),o.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=o.clientHeight-r.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e),this.dispatch("column-moving",e,this.moving))}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)}))}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach((function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)}))}moveColumn(e,t){var n=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach((function(e,t){var o=e.getElement(!0);o.parentNode&&n[t]&&o.parentNode.insertBefore(n[t].getElement(),o.nextSibling)})):e.getCells().forEach((function(e,t){var o=e.getElement(!0);o.parentNode&&n[t]&&o.parentNode.insertBefore(n[t].getElement(),o)}))}endMove(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t,n=this.table.columnManager.getContentsElement(),o=n.scrollLeft,r=(this.touchMove?e.touches[0].pageX:e.pageX)-i.elOffset(n).left+o;this.hoverElement.style.left=r-this.startX+"px",r-o<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout((()=>{t=Math.max(0,o-5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1))),o+n.clientWidth-r<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout((()=>{t=Math.min(n.clientWidth,o+5),this.table.rowManager.getElement().scrollLeft=t,this.autoScrollTimeout=!1}),1)))}},MoveRowsModule:re,MutatorModule:ae,PageModule:ce,PersistenceModule:he,PopupModule:class extends s{static moduleName="popup";constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,n){this.loadPopupEvent(t,null,e,n)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t,n=e.definition.headerPopupIcon;(t=document.createElement("span")).classList.add("tabulator-header-popup-button"),n?("function"==typeof n&&(n=n(e.getComponent())),n instanceof HTMLElement?t.appendChild(n):t.innerHTML=n):t.innerHTML="&vellip;",t.addEventListener("click",(t=>{t.stopPropagation(),t.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,t,e)})),e.titleElement.insertBefore(t,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,n){n._cell&&(n=n._cell),n.column.definition[e]&&this.loadPopupEvent(n.column.definition[e],t,n)}loadPopupTableColumnEvent(e,t,n){n._column&&(n=n._column),n.definition[e]&&this.loadPopupEvent(n.definition[e],t,n)}loadPopupEvent(e,t,n,o){var i;n._group?n=n._group:n._row&&(n=n._row),e="function"==typeof e?e.call(this.table,t,n.getComponent(),(function(e){i=e})):e,this.loadPopup(t,n,e,i,o)}loadPopup(e,t,n,o,i){var r,s,a=!(e instanceof MouseEvent);n instanceof HTMLElement?r=n:(r=document.createElement("div")).innerHTML=n,r.classList.add("tabulator-popup"),r.addEventListener("click",(e=>{e.stopPropagation()})),a||e.preventDefault(),s=this.popup(r),"function"==typeof o&&s.renderCallback(o),e?s.show(e):s.show(t.getElement(),i||"center"),s.hideOnBlur((()=>{this.dispatchExternal("popupClosed",t.getComponent())})),this.dispatchExternal("popupOpened",t.getComponent())}},PrintModule:class extends s{static moduleName="print";constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,n){var o,i,r=window.scrollX,s=window.scrollY,a=document.createElement("div"),l=document.createElement("div"),c=this.table.modules.export.generateTable(void 0!==n?n:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),"string"==typeof(o="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?a.innerHTML=o:a.appendChild(o),this.element.appendChild(a)),this.element.appendChild(c),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(i="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=i:l.appendChild(i),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,c),window.print(),this.cleanup(),window.scrollTo(r,s),this.manualBlock=!1}},ReactiveDataModule:class extends s{static moduleName="reactiveData";constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t,n=this;this.currentVersion++,t=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var o,i=Array.from(arguments);return n.blocked||t!==n.currentVersion||(n.block("data-push"),i.forEach((e=>{n.table.rowManager.addRowActual(e,!1)})),o=n.origFuncs.push.apply(e,arguments),n.unblock("data-push")),o}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var o,i=Array.from(arguments);return n.blocked||t!==n.currentVersion||(n.block("data-unshift"),i.forEach((e=>{n.table.rowManager.addRowActual(e,!0)})),o=n.origFuncs.unshift.apply(e,arguments),n.unblock("data-unshift")),o}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var o,i;return n.blocked||t!==n.currentVersion||(n.block("data-shift"),n.data.length&&(o=n.table.rowManager.getRowFromDataObject(n.data[0]))&&o.deleteActual(),i=n.origFuncs.shift.call(e),n.unblock("data-shift")),i}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var o,i;return n.blocked||t!==n.currentVersion||(n.block("data-pop"),n.data.length&&(o=n.table.rowManager.getRowFromDataObject(n.data[n.data.length-1]))&&o.deleteActual(),i=n.origFuncs.pop.call(e),n.unblock("data-pop")),i}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var o,i,r=Array.from(arguments),s=r[0]<0?e.length+r[0]:r[0],a=r[1],l=!!r[2]&&r.slice(2);if(!n.blocked&&t===n.currentVersion){if(n.block("data-splice"),l&&((o=!!e[s]&&n.table.rowManager.getRowFromDataObject(e[s]))?l.forEach((e=>{n.table.rowManager.addRowActual(e,!0,o,!0)})):(l=l.slice().reverse()).forEach((e=>{n.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var c=e.slice(s,void 0===r[1]?r[1]:s+a);c.forEach(((e,t)=>{var o=n.table.rowManager.getRowFromDataObject(e);o&&o.deleteActual(t!==c.length-1)}))}(l||0!==a)&&n.table.rowManager.reRenderInPosition(),i=n.origFuncs.splice.apply(e,arguments),n.unblock("data-splice")}return i}})}unwatchData(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var n in t)this.watchKey(e,t,n);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,n=e.getData()[this.table.options.dataTreeChildField],o={};n&&(o.push=n.push,Object.defineProperty(n,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var i=o.push.apply(n,arguments);this.rebuildTree(e),t.unblock("tree-push")}return i}}),o.unshift=n.unshift,Object.defineProperty(n,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var i=o.unshift.apply(n,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return i}}),o.shift=n.shift,Object.defineProperty(n,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var i=o.shift.call(n);this.rebuildTree(e),t.unblock("tree-shift")}return i}}),o.pop=n.pop,Object.defineProperty(n,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var i=o.pop.call(n);this.rebuildTree(e),t.unblock("tree-pop")}return i}}),o.splice=n.splice,Object.defineProperty(n,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var i=o.splice.apply(n,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return i}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,n){var o=this,i=Object.getOwnPropertyDescriptor(t,n),r=t[n],s=this.currentVersion;Object.defineProperty(t,n,{set:t=>{if(r=t,!o.blocked&&s===o.currentVersion){o.block("key");var a={};a[n]=t,e.updateData(a),o.unblock("key")}i.set&&i.set(t)},get:()=>(i.get&&i.get(),r)})}unwatchRow(e){var t=e.getData();for(var n in t)Object.defineProperty(t,n,{value:t[n]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}},ResizeColumnsModule:class extends s{static moduleName="resizeColumns";constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1),this.registerTableOption("resizableColumnGuide",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){"row"===e.row.type&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach((e=>{this.reinitializeColumn(e)})):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach((e=>{this.reinitializeColumn(e)})))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,"left"===e.modules.frozen.position?t+=e.getWidth()-3:t&&(t-=3)),!1!==t&&t+"px"}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach((n=>{n.modules.resize&&n.modules.resize.handleEl&&(t&&(n.modules.resize.handleEl.style[e.modules.frozen.position]=t,n.modules.resize.handleEl.style["z-index"]=11),n.element.after(n.modules.resize.handleEl))})),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,n,o){var i=this,r=n.definition.resizable,s={},a=n.getLastColumn();if("header"===e&&(s={variableHeight:"textarea"==n.definition.formatter||n.definition.variableHeight}),(!0===r||r==e)&&this._checkResizability(a)){var l=document.createElement("span");l.className="tabulator-col-resize-handle",l.addEventListener("click",(function(e){e.stopPropagation()}));var c=function(e){i.startColumn=n,i.initialNextColumn=i.nextColumn=a.nextColumn(),i._mouseDown(e,a,l)};l.addEventListener("mousedown",c),l.addEventListener("touchstart",c,{passive:!0}),l.addEventListener("dblclick",(e=>{var t=a.getWidth();e.stopPropagation(),a.reinitializeWidth(!0),t!==a.getWidth()&&(i.dispatch("column-resized",a),i.dispatchExternal("columnResized",a.getComponent()))})),n.modules.frozen&&(l.style.position="sticky",l.style[n.modules.frozen.position]=this.frozenColumnOffset(n)),s.handleEl=l,o.parentNode&&n.visible&&o.after(l)}t.modules.resize=s}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach((e=>{this.deInitializeComponent(e)}))}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl)&&t.parentElement&&t.parentElement.removeChild(t)}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}resize(e,t){var n,o,i=void 0===e.clientX?e.touches[0].clientX:e.clientX,r=i-this.startX,s=i-this.latestX;if(this.latestX=i,this.table.rtl&&(r=-r,s=-s),n=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(this.startWidth+r),o=t.width==t.minWidth||t.width==t.maxWidth,s<0&&(this.nextColumn=this.initialNextColumn),this.table.options.resizableColumnFit&&this.nextColumn&&(!n||!o)){let e=this.nextColumn.getWidth();s>0&&e<=this.nextColumn.minWidth&&(this.nextColumn=this.nextColumn.nextColumn()),this.nextColumn&&this.nextColumn.setWidth(this.nextColumn.getWidth()-s)}this.table.columnManager.rerenderColumns(!0),!this.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}calcGuidePosition(e,t,n){var o=void 0===e.clientX?e.touches[0].clientX:e.clientX,i=n.getBoundingClientRect().x-this.table.element.getBoundingClientRect().x,r=this.table.element.getBoundingClientRect().x,s=t.element.getBoundingClientRect().left-r,a=o-this.startX,l=Math.max(i+a,s+t.minWidth);return t.maxWidth&&(l=Math.min(l,s+t.maxWidth)),l}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,n){var o,i=this;function r(e){i.table.options.resizableColumnGuide?o.style.left=i.calcGuidePosition(e,t,n)+"px":i.resize(e,t)}function s(e){i.table.options.resizableColumnGuide&&(i.resize(e,t),o.remove()),i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!1),i.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",s),document.body.removeEventListener("mousemove",r),n.removeEventListener("touchmove",r),n.removeEventListener("touchend",s),i.table.element.classList.remove("tabulator-block-select"),i.startWidth!==t.getWidth()&&(i.table.columnManager.verticalAlignHeaders(),i.dispatch("column-resized",t),i.dispatchExternal("columnResized",t.getComponent()))}this.dispatchExternal("columnResizing",t.getComponent()),i.table.options.resizableColumnGuide&&((o=document.createElement("span")).classList.add("tabulator-col-resize-guide"),i.table.element.appendChild(o),setTimeout((()=>{o.style.left=i.calcGuidePosition(e,t,n)+"px"}))),i.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!0),i.startX=void 0===e.clientX?e.touches[0].clientX:e.clientX,i.latestX=i.startX,i.startWidth=t.getWidth(),document.body.addEventListener("mousemove",r),document.body.addEventListener("mouseup",s),n.addEventListener("touchmove",r,{passive:!0}),n.addEventListener("touchend",s)}},ResizeRowsModule:class extends s{static moduleName="resizeRows";constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1),this.registerTableOption("resizableRowGuide",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,n=e.getElement(),o=document.createElement("div");o.className="tabulator-row-resize-handle";var i=document.createElement("div");i.className="tabulator-row-resize-handle prev",o.addEventListener("click",(function(e){e.stopPropagation()}));var r=function(n){t.startRow=e,t._mouseDown(n,e,o)};o.addEventListener("mousedown",r),o.addEventListener("touchstart",r,{passive:!0}),i.addEventListener("click",(function(e){e.stopPropagation()}));var s=function(n){var o=t.table.rowManager.prevDisplayRow(e);o&&(t.startRow=o,t._mouseDown(n,o,i))};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.appendChild(o),n.appendChild(i)}resize(e,t){t.setHeight(this.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-this.startY))}calcGuidePosition(e,t,n){var o=void 0===e.screenY?e.touches[0].screenY:e.screenY,i=n.getBoundingClientRect().y-this.table.element.getBoundingClientRect().y,r=this.table.element.getBoundingClientRect().y,s=t.element.getBoundingClientRect().top-r,a=o-this.startY;return Math.max(i+a,s)}_mouseDown(e,t,n){var o,i=this;function r(e){i.table.options.resizableRowGuide?o.style.top=i.calcGuidePosition(e,t,n)+"px":i.resize(e,t)}function s(e){i.table.options.resizableRowGuide&&(i.resize(e,t),o.remove()),document.body.removeEventListener("mouseup",r),document.body.removeEventListener("mousemove",r),n.removeEventListener("touchmove",r),n.removeEventListener("touchend",s),i.table.element.classList.remove("tabulator-block-select"),i.dispatchExternal("rowResized",t.getComponent())}i.dispatchExternal("rowResizing",t.getComponent()),i.table.options.resizableRowGuide&&((o=document.createElement("span")).classList.add("tabulator-row-resize-guide"),i.table.element.appendChild(o),setTimeout((()=>{o.style.top=i.calcGuidePosition(e,t,n)+"px"}))),i.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),i.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,i.startHeight=t.getHeight(),document.body.addEventListener("mousemove",r),document.body.addEventListener("mouseup",s),n.addEventListener("touchmove",r,{passive:!0}),n.addEventListener("touchend",s)}},ResizeTableModule:class extends s{static moduleName="resizeTable";constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e,t=this.table;this.tableHeight=t.element.clientHeight,this.tableWidth=t.element.clientWidth,t.element.parentNode&&(this.containerHeight=t.element.parentNode.clientHeight,this.containerWidth=t.element.parentNode.clientWidth),"undefined"!=typeof IntersectionObserver&&"undefined"!=typeof ResizeObserver&&"virtual"===t.rowManager.getRenderMode()?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver((e=>{if(!t.browserMobile||t.browserMobile&&(!t.modules.edit||t.modules.edit&&!t.modules.edit.currentCell)){var n=Math.floor(e[0].contentRect.height),o=Math.floor(e[0].contentRect.width);this.tableHeight==n&&this.tableWidth==o||(this.tableHeight=n,this.tableWidth=o,t.element.parentNode&&(this.containerHeight=t.element.parentNode.clientHeight,this.containerWidth=t.element.parentNode.clientWidth),this.redrawTable())}})),this.resizeObserver.observe(t.element),e=window.getComputedStyle(t.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(e.getPropertyValue("max-height")||e.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((e=>{if(!t.browserMobile||t.browserMobile&&(!t.modules.edit||t.modules.edit&&!t.modules.edit.currentCell)){var n=Math.floor(e[0].contentRect.height),o=Math.floor(e[0].contentRect.width);this.containerHeight==n&&this.containerWidth==o||(this.containerHeight=n,this.containerWidth=o,this.tableHeight=t.element.clientHeight,this.tableWidth=t.element.clientWidth),this.redrawTable()}})),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!t.browserMobile||t.browserMobile&&(!t.modules.edit||t.modules.edit&&!t.modules.edit.currentCell))&&(t.columnManager.rerenderColumns(!0),t.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver((e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)})),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}},ResponsiveLayoutModule:class extends s{static moduleName="responsiveLayout";static moduleExtensions=pe;constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),"collapse"===this.table.options.responsiveLayout&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){-1===["fitColumns","fitDataStretch"].indexOf(this.layoutMode())&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.collapseFormatter&&(this.collapseFormatter=this.collapseFormatter.bind(this.table)),this.table.columnManager.columnsByIndex.forEach(((t,n)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=n,e.push(t),t.visible||"collapse"!==this.mode||this.hiddenColumns.push(t))})),e=(e=e.reverse()).sort(((e,t)=>t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index)),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent();for(let e of this.table.columnManager.columnsByIndex)if("responsiveCollapse"==e.definition.formatter){this.collapseHandleColumn=e;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}}initializeRow(e){var t;"calc"!==e.type&&((t=document.createElement("div")).classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&((t=this.hiddenColumns.indexOf(e))>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=!0;e;){let t="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),n=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(n<0){let t=this.columns[this.index];t?(this.hideColumn(t),this.index++):e=!1}else{let t=this.columns[this.index-1];t&&n>0&&n>=t.getWidth()?(this.showColumn(t),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){this.table.rowManager.getDisplayRows().forEach((e=>{this.generateCollapsedRowContent(e)}))}generateCollapsedRowContent(e){var t,n;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);(n=this.collapseFormatter(this.generateCollapsedRowData(e)))&&t.appendChild(n),e.calcHeight(!0)}}generateCollapsedRowData(e){var t,n=e.getData(),o=[];return this.hiddenColumns.forEach((i=>{var r=i.getFieldValue(n);if(i.definition.title&&i.field)if(i.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){function s(e){e()}t={value:!1,data:{},getValue:function(){return r},getData:function(){return n},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return i.getComponent()},getTable:()=>this.table},o.push({field:i.field,title:i.definition.title,value:i.modules.format.formatter.call(this.table.modules.format,t,i.modules.format.params,s)})}else o.push({field:i.field,title:i.definition.title,value:r})})),o}formatCollapsedData(e){var t=document.createElement("table");return e.forEach((e=>{var n,o=document.createElement("tr"),i=document.createElement("td"),r=document.createElement("td"),s=document.createElement("strong");i.appendChild(s),this.modules.localize.bind("columns|"+e.field,(function(t){s.innerHTML=t||e.title})),e.value instanceof Node?((n=document.createElement("div")).appendChild(e.value),r.appendChild(n)):r.innerHTML=e.value,o.appendChild(i),o.appendChild(r),t.appendChild(o)})),Object.keys(e).length?t:""}},SelectRangeModule:class extends s{static moduleName="selectRange";static moduleInitOrder=1;static moduleExtensions=be;constructor(e){super(e),this.selecting="cell",this.mousedown=!1,this.ranges=[],this.overlay=null,this.rowHeader=null,this.layoutChangeTimeout=null,this.columnSelection=!1,this.rowSelection=!1,this.maxRanges=0,this.activeRange=!1,this.blockKeydown=!1,this.keyDownEvent=this._handleKeyDown.bind(this),this.mouseUpEvent=this._handleMouseUp.bind(this),this.registerTableOption("selectableRange",!1),this.registerTableOption("selectableRangeColumns",!1),this.registerTableOption("selectableRangeRows",!1),this.registerTableOption("selectableRangeClearCells",!1),this.registerTableOption("selectableRangeClearCellsValue",void 0),this.registerTableOption("selectableRangeAutoFocus",!0),this.registerTableFunction("getRangesData",this.getRangesData.bind(this)),this.registerTableFunction("getRanges",this.getRanges.bind(this)),this.registerTableFunction("addRange",this.addRangeFromComponent.bind(this)),this.registerComponentFunction("cell","getRanges",this.cellGetRanges.bind(this)),this.registerComponentFunction("row","getRanges",this.rowGetRanges.bind(this)),this.registerComponentFunction("column","getRanges",this.colGetRanges.bind(this))}initialize(){this.options("selectableRange")&&(this.options("selectableRows")?console.warn("SelectRange functionality cannot be used in conjunction with row selection"):(this.maxRanges=this.options("selectableRange"),this.initializeTable(),this.initializeWatchers()),this.options("columns").findIndex((e=>e.frozen))>0&&console.warn("Having frozen column in arbitrary position with selectRange option may result in unpredictable behavior."),this.options("columns").filter((e=>e.frozen))>1&&console.warn("Having multiple frozen columns with selectRange option may result in unpredictable behavior."))}initializeTable(){this.overlay=document.createElement("div"),this.overlay.classList.add("tabulator-range-overlay"),this.rangeContainer=document.createElement("div"),this.rangeContainer.classList.add("tabulator-range-container"),this.activeRangeCellElement=document.createElement("div"),this.activeRangeCellElement.classList.add("tabulator-range-cell-active"),this.overlay.appendChild(this.rangeContainer),this.overlay.appendChild(this.activeRangeCellElement),this.table.rowManager.element.addEventListener("keydown",this.keyDownEvent),this.resetRanges(),this.table.rowManager.element.appendChild(this.overlay),this.table.columnManager.element.setAttribute("tabindex",0),this.table.element.classList.add("tabulator-ranges")}initializeWatchers(){this.columnSelection=this.options("selectableRangeColumns"),this.rowSelection=this.options("selectableRangeRows"),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-mousedown",this.handleColumnMouseDown.bind(this)),this.subscribe("column-mousemove",this.handleColumnMouseMove.bind(this)),this.subscribe("column-resized",this.handleColumnResized.bind(this)),this.subscribe("column-moving",this.handleColumnMoving.bind(this)),this.subscribe("column-moved",this.handleColumnMoved.bind(this)),this.subscribe("column-width",this.layoutChange.bind(this)),this.subscribe("column-height",this.layoutChange.bind(this)),this.subscribe("column-resized",this.layoutChange.bind(this)),this.subscribe("columns-loaded",this.updateHeaderColumn.bind(this)),this.subscribe("cell-height",this.layoutChange.bind(this)),this.subscribe("cell-rendered",this.renderCell.bind(this)),this.subscribe("cell-mousedown",this.handleCellMouseDown.bind(this)),this.subscribe("cell-mousemove",this.handleCellMouseMove.bind(this)),this.subscribe("cell-click",this.handleCellClick.bind(this)),this.subscribe("cell-editing",this.handleEditingCell.bind(this)),this.subscribe("page-changed",this.redraw.bind(this)),this.subscribe("scroll-vertical",this.layoutChange.bind(this)),this.subscribe("scroll-horizontal",this.layoutChange.bind(this)),this.subscribe("data-destroy",this.tableDestroyed.bind(this)),this.subscribe("data-processed",this.resetRanges.bind(this)),this.subscribe("table-layout",this.layoutElement.bind(this)),this.subscribe("table-redraw",this.redraw.bind(this)),this.subscribe("table-destroy",this.tableDestroyed.bind(this)),this.subscribe("edit-editor-clear",this.finishEditingCell.bind(this)),this.subscribe("edit-blur",this.restoreFocus.bind(this)),this.subscribe("keybinding-nav-prev",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-next",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-left",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-right",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-up",this.keyNavigate.bind(this,"up")),this.subscribe("keybinding-nav-down",this.keyNavigate.bind(this,"down")),this.subscribe("keybinding-nav-range",this.keyNavigateRange.bind(this))}initializeColumn(e){this.columnSelection&&e.definition.headerSort&&"icon"!==this.options("headerSortClickElement")&&console.warn("Using column headerSort with selectableRangeColumns option may result in unpredictable behavior. Consider using headerSortClickElement: 'icon'."),e.modules.edit}updateHeaderColumn(){var e;this.rowSelection&&(this.rowHeader=this.table.columnManager.getVisibleColumnsByIndex()[0],this.rowHeader&&(this.rowHeader.definition.cssClass=this.rowHeader.definition.cssClass+" tabulator-range-row-header",this.rowHeader.definition.headerSort&&console.warn("Using column headerSort with selectableRangeRows option may result in unpredictable behavior"),this.rowHeader.definition.editor&&console.warn("Using column editor with selectableRangeRows option may result in unpredictable behavior"))),this.table.modules.frozenColumns&&this.table.modules.frozenColumns.active&&((e=this.table.modules.frozenColumns.getFrozenColumns()).length>1||1===e.length&&e[0]!==this.rowHeader)&&console.warn("Using frozen columns that are not the range header in combination with the selectRange option may result in unpredictable behavior")}getRanges(){return this.ranges.map((e=>e.getComponent()))}getRangesData(){return this.ranges.map((e=>e.getData()))}addRangeFromComponent(e,t){return e=e?e._cell:null,t=t?t._cell:null,this.addRange(e,t)}cellGetRanges(e){return(e.column===this.rowHeader?this.ranges.filter((t=>t.occupiesRow(e.row))):this.ranges.filter((t=>t.occupies(e)))).map((e=>e.getComponent()))}rowGetRanges(e){return this.ranges.filter((t=>t.occupiesRow(e))).map((e=>e.getComponent()))}colGetRanges(e){return this.ranges.filter((t=>t.occupiesColumn(e))).map((e=>e.getComponent()))}_handleMouseUp(e){this.mousedown=!1,document.removeEventListener("mouseup",this.mouseUpEvent)}_handleKeyDown(e){if(!this.blockKeydown&&(!this.table.modules.edit||this.table.modules.edit&&!this.table.modules.edit.currentCell)){if("Enter"===e.key){if(this.table.modules.edit&&this.table.modules.edit.currentCell)return;this.table.modules.edit.editCell(this.getActiveCell()),e.preventDefault()}"Backspace"!==e.key&&"Delete"!==e.key||!this.options("selectableRangeClearCells")||this.activeRange&&this.activeRange.clearValues()}}initializeFocus(e){var t;this.restoreFocus();try{document.selection?((t=document.body.createTextRange()).moveToElementText(e.getElement()),t.select()):window.getSelection&&((t=document.createRange()).selectNode(e.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(t))}catch(e){}}restoreFocus(e){return this.table.rowManager.element.focus(),!0}handleColumnResized(e){"column"!==this.selecting&&"all"!==this.selecting||this.ranges.some((t=>t.occupiesColumn(e)))&&this.ranges.forEach((t=>{t.getColumns(!0).forEach((t=>{t!==e&&t.setWidth(e.width)}))}))}handleColumnMoving(e,t){this.resetRanges().setBounds(t),this.overlay.style.visibility="hidden"}handleColumnMoved(e,t,n){this.activeRange.setBounds(e),this.layoutElement()}handleColumnMouseDown(e,t){(2!==e.button||"column"!==this.selecting&&"all"!==this.selecting||!this.activeRange.occupiesColumn(t))&&(this.table.options.movableColumns&&"column"===this.selecting&&this.activeRange.occupiesColumn(t)||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t)))}handleColumnMouseMove(e,t){t!==this.rowHeader&&this.mousedown&&"all"!==this.selecting&&this.activeRange.setBounds(!1,t,!0)}renderCell(e){var t=e.getElement(),n=this.ranges.findIndex((t=>t.occupies(e)));t.classList.toggle("tabulator-range-selected",-1!==n),t.classList.toggle("tabulator-range-only-cell-selected",1===this.ranges.length&&this.ranges[0].atTopLeft(e)&&this.ranges[0].atBottomRight(e)),t.dataset.range=n}handleCellMouseDown(e,t){2===e.button&&(this.activeRange.occupies(t)||("row"===this.selecting||"all"===this.selecting)&&this.activeRange.occupiesRow(t.row))||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleCellMouseMove(e,t){this.mousedown&&"all"!==this.selecting&&this.activeRange.setBounds(!1,t,!0)}handleCellClick(e,t){this.initializeFocus(t)}handleEditingCell(e){this.activeRange&&this.activeRange.setBounds(e)}finishEditingCell(){this.blockKeydown=!0,this.table.rowManager.element.focus(),setTimeout((()=>{this.blockKeydown=!1}),10)}keyNavigate(e,t){this.navigate(!1,!1,e),t.preventDefault()}keyNavigateRange(e,t,n,o){this.navigate(n,o,t),e.preventDefault()}navigate(e,t,n){var o,i,r,s,a,l,c,u,d,h,p;if(this.table.modules.edit&&this.table.modules.edit.currentCell)return!1;if(this.ranges.length>1&&(this.ranges=this.ranges.filter((e=>e===this.activeRange?(e.setEnd(e.start.row,e.start.col),!0):(e.destroy(),!1)))),r={top:(o=this.activeRange).top,bottom:o.bottom,left:o.left,right:o.right},s=(i=t?o.end:o.start).row,a=i.col,e)switch(n){case"left":a=this.findJumpCellLeft(o.start.row,i.col);break;case"right":a=this.findJumpCellRight(o.start.row,i.col);break;case"up":s=this.findJumpCellUp(i.row,o.start.col);break;case"down":s=this.findJumpCellDown(i.row,o.start.col)}else{if(t&&("row"===this.selecting&&("left"===n||"right"===n)||"column"===this.selecting&&("up"===n||"down"===n)))return;switch(n){case"left":a=Math.max(a-1,0);break;case"right":a=Math.min(a+1,this.getTableColumns().length-1);break;case"up":s=Math.max(s-1,0);break;case"down":s=Math.min(s+1,this.getTableRows().length-1)}}return this.rowHeader&&0===a&&(a=1),t||o.setStart(s,a),o.setEnd(s,a),t||(this.selecting="cell"),r.top!==o.top||r.bottom!==o.bottom||r.left!==o.left||r.right!==o.right?(l=this.getRowByRangePos(o.end.row),c=this.getColumnByRangePos(o.end.col),u=l.getElement().getBoundingClientRect(),h=c.getElement().getBoundingClientRect(),d=this.table.rowManager.getElement().getBoundingClientRect(),p=this.table.columnManager.getElement().getBoundingClientRect(),u.top>=d.top&&u.bottom<=d.bottom||(l.getElement().parentNode&&c.getElement().parentNode?this.autoScroll(o,l.getElement(),c.getElement()):l.getComponent().scrollTo(void 0,!1)),h.left>=p.left+this.getRowHeaderWidth()&&h.right<=p.right||(l.getElement().parentNode&&c.getElement().parentNode?this.autoScroll(o,l.getElement(),c.getElement()):c.getComponent().scrollTo(void 0,!1)),this.layoutElement(),!0):void 0}rangeRemoved(e){this.ranges=this.ranges.filter((t=>t!==e)),this.activeRange===e&&(this.ranges.length?this.activeRange=this.ranges[this.ranges.length-1]:this.addRange()),this.layoutElement()}findJumpRow(e,t,n,o,i){return n&&(t=t.reverse()),this.findJumpItem(o,i,t,(function(t){return t.getData()[e.getField()]}))}findJumpCol(e,t,n,o,i){return n&&(t=t.reverse()),this.findJumpItem(o,i,t,(function(t){return e.getData()[t.getField()]}))}findJumpItem(e,t,n,o){var i;for(let r of n){let n=o(r);if(e){if(i=r,n)break}else if(t){if(i=r,n)break}else{if(!n)break;i=r}}return i}findJumpCellLeft(e,t){var n=this.getRowByRangePos(e),o=this.getTableColumns(),i=this.isEmpty(n.getData()[o[t].getField()]),r=!!o[t-1]&&this.isEmpty(n.getData()[o[t-1].getField()]),s=this.rowHeader?o.slice(1,t):o.slice(0,t),a=this.findJumpCol(n,s,!0,i,r);return a?a.getPosition()-1:t}findJumpCellRight(e,t){var n=this.getRowByRangePos(e),o=this.getTableColumns(),i=this.isEmpty(n.getData()[o[t].getField()]),r=!!o[t+1]&&this.isEmpty(n.getData()[o[t+1].getField()]),s=this.findJumpCol(n,o.slice(t+1,o.length),!1,i,r);return s?s.getPosition()-1:t}findJumpCellUp(e,t){var n=this.getColumnByRangePos(t),o=this.getTableRows(),i=this.isEmpty(o[e].getData()[n.getField()]),r=!!o[e-1]&&this.isEmpty(o[e-1].getData()[n.getField()]),s=this.findJumpRow(n,o.slice(0,e),!0,i,r);return s?s.position-1:e}findJumpCellDown(e,t){var n=this.getColumnByRangePos(t),o=this.getTableRows(),i=this.isEmpty(o[e].getData()[n.getField()]),r=!!o[e+1]&&this.isEmpty(o[e+1].getData()[n.getField()]),s=this.findJumpRow(n,o.slice(e+1,o.length),!1,i,r);return s?s.position-1:e}newSelection(e,t){var n;if("column"===t.type){if(!this.columnSelection)return;if(t===this.rowHeader){n=this.resetRanges(),this.selecting="all";var o,i=this.getCell(-1,-1);return o=this.rowHeader?this.getCell(0,1):this.getCell(0,0),void n.setBounds(o,i)}this.selecting="column"}else t.column===this.rowHeader?this.selecting="row":this.selecting="cell";e.shiftKey?this.activeRange.setBounds(!1,t):e.ctrlKey?this.addRange().setBounds(t):this.resetRanges().setBounds(t)}autoScroll(e,t,n){var o,i,r,s=this.table.rowManager.element;void 0===t&&(t=this.getRowByRangePos(e.end.row).getElement()),void 0===n&&(n=this.getColumnByRangePos(e.end.col).getElement()),o={left:n.offsetLeft,right:n.offsetLeft+n.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight},r=(i={left:s.scrollLeft+this.getRowHeaderWidth(),right:Math.ceil(s.scrollLeft+s.clientWidth),top:s.scrollTop,bottom:s.scrollTop+s.offsetHeight-this.table.rowManager.scrollbarWidth}).top<o.top&&o.top<i.bottom&&i.top<o.bottom&&o.bottom<i.bottom,i.left<o.left&&o.left<i.right&&i.left<o.right&&o.right<i.right||(o.left<i.left?s.scrollLeft=o.left-this.getRowHeaderWidth():o.right>i.right&&(s.scrollLeft=Math.min(o.right-s.clientWidth,o.left-this.getRowHeaderWidth()))),r||(o.top<i.top?s.scrollTop=o.top:o.bottom>i.bottom&&(s.scrollTop=o.bottom-s.clientHeight))}layoutChange(){this.overlay.style.visibility="hidden",clearTimeout(this.layoutChangeTimeout),this.layoutChangeTimeout=setTimeout(this.layoutRanges.bind(this),200)}redraw(e){e&&(this.selecting="cell",this.resetRanges(),this.layoutElement())}layoutElement(e){(e?this.table.rowManager.getVisibleRows(!0):this.table.rowManager.getRows()).forEach((e=>{"row"===e.type&&(this.layoutRow(e),e.cells.forEach((e=>this.renderCell(e))))})),this.getTableColumns().forEach((e=>{this.layoutColumn(e)})),this.layoutRanges()}layoutRow(e){var t=e.getElement(),n=!1,o=this.ranges.some((t=>t.occupiesRow(e)));"row"===this.selecting?n=o:"all"===this.selecting&&(n=!0),t.classList.toggle("tabulator-range-selected",n),t.classList.toggle("tabulator-range-highlight",o)}layoutColumn(e){var t=e.getElement(),n=!1,o=this.ranges.some((t=>t.occupiesColumn(e)));"column"===this.selecting?n=o:"all"===this.selecting&&(n=!0),t.classList.toggle("tabulator-range-selected",n),t.classList.toggle("tabulator-range-highlight",o)}layoutRanges(){var e,t,n;this.table.initialized&&(e=this.getActiveCell())&&(t=e.getElement(),n=e.row.getElement(),this.table.rtl?this.activeRangeCellElement.style.right=n.offsetWidth-t.offsetLeft-t.offsetWidth+"px":this.activeRangeCellElement.style.left=n.offsetLeft+t.offsetLeft+"px",this.activeRangeCellElement.style.top=n.offsetTop+"px",this.activeRangeCellElement.style.width=t.offsetWidth+"px",this.activeRangeCellElement.style.height=n.offsetHeight+"px",this.ranges.forEach((e=>e.layout())),this.overlay.style.visibility="visible")}getCell(e,t){var n;return t<0&&(t=this.getTableColumns().length+t)<0?null:(e<0&&(e=this.getTableRows().length+e),(n=this.table.rowManager.getRowFromPosition(e+1))?n.getCells(!1,!0).filter((e=>e.column.visible))[t]:null)}getActiveCell(){return this.getCell(this.activeRange.start.row,this.activeRange.start.col)}getRowByRangePos(e){return this.getTableRows()[e]}getColumnByRangePos(e){return this.getTableColumns()[e]}getTableRows(){return this.table.rowManager.getDisplayRows().filter((e=>"row"===e.type))}getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}addRange(e,t){var n;return!0!==this.maxRanges&&this.ranges.length>=this.maxRanges&&this.ranges.shift().destroy(),n=new fe(this.table,this,e,t),this.activeRange=n,this.ranges.push(n),this.rangeContainer.appendChild(n.element),n}resetRanges(){var e,t,n;return this.ranges.forEach((e=>e.destroy())),this.ranges=[],e=this.addRange(),this.table.rowManager.activeRows.length&&(n=this.table.rowManager.activeRows[0].cells.filter((e=>e.column.visible)),(t=n[this.rowHeader?1:0])&&(e.setBounds(t),this.options("selectableRangeAutoFocus")&&this.initializeFocus(t))),e}tableDestroyed(){document.removeEventListener("mouseup",this.mouseUpEvent),this.table.rowManager.element.removeEventListener("keydown",this.keyDownEvent)}selectedRows(e){return e?this.activeRange.getRows().map((e=>e.getComponent())):this.activeRange.getRows()}selectedColumns(e){return e?this.activeRange.getColumns().map((e=>e.getComponent())):this.activeRange.getColumns()}getRowHeaderWidth(){return this.rowHeader?this.rowHeader.getElement().offsetWidth:0}isEmpty(e){return null==e||""===e}},SelectRowModule:class extends s{static moduleName="selectRow";static moduleExtensions=me;constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectableRows","highlight"),this.registerTableOption("selectableRowsRangeMode","drag"),this.registerTableOption("selectableRowsRollingSelection",!0),this.registerTableOption("selectableRowsPersistence",!0),this.registerTableOption("selectableRowsCheck",(function(e,t){return!0})),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){this.deprecatedOptionsCheck(),"highlight"===this.table.options.selectableRows&&this.table.options.selectableRange&&(this.table.options.selectableRows=!1),!1!==this.table.options.selectableRows&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectableRows&&!this.table.options.selectableRowsPersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}deprecatedOptionsCheck(){}rowRetrieve(e,t){return"selected"===e?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){var t=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t&&!0!==e&&this._rowSelectionChanged()}initializeRow(e){var t=this,n=t.checkRowSelectability(e),o=e.getElement(),i=function(){setTimeout((function(){t.selecting=!1}),50),document.body.removeEventListener("mouseup",i)};e.modules.select={selected:!1},o.classList.toggle("tabulator-selectable",n),o.classList.toggle("tabulator-unselectable",!n),t.checkRowSelectability(e)&&t.table.options.selectableRows&&"highlight"!=t.table.options.selectableRows&&("click"===t.table.options.selectableRowsRangeMode?o.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(o.addEventListener("click",(function(n){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)})),o.addEventListener("mousedown",(function(n){if(n.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),t.toggleRow(e),!1})),o.addEventListener("mouseenter",(function(n){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))})),o.addEventListener("mouseout",(function(n){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))}))))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var n=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),o=this.table.rowManager.getDisplayRowIndex(e),i=n<=o?n:o,r=n>=o?n:o,s=this.table.rowManager.getDisplayRows().slice(0).splice(i,r-i+1);t.ctrlKey||t.metaKey?(s.forEach((t=>{t!==this.lastClickedRow&&(!0===this.table.options.selectableRows||this.isRowSelected(e)||this.selectedRows.length<this.table.options.selectableRows)&&this.toggleRow(t)})),this.lastClickedRow=e):(this.deselectRows(void 0,!0),!0!==this.table.options.selectableRows&&s.length>this.table.options.selectableRows&&(s=s.slice(0,this.table.options.selectableRows)),this.selectRows(s)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}checkRowSelectability(e){return!(!e||"row"!==e.type)&&this.table.options.selectableRowsCheck.call(this.table,e.getComponent())}toggleRow(e){this.checkRowSelectability(e)&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t,n,o=[];switch(typeof e){case"undefined":t=this.table.rowManager.rows;break;case"number":t=this.table.rowManager.findRow(e);break;case"string":(t=this.table.rowManager.findRow(e))||(t=this.table.rowManager.getRows(e));break;default:t=e}Array.isArray(t)?t.length&&(t.forEach((e=>{(n=this._selectRow(e,!0,!0))&&o.push(n)})),this._rowSelectionChanged(!1,o)):t&&this._selectRow(t,!1,!0)}_selectRow(e,t,n){if(!isNaN(this.table.options.selectableRows)&&!0!==this.table.options.selectableRows&&!n&&this.selectedRows.length>=this.table.options.selectableRows){if(!this.table.options.selectableRowsRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var o=this.table.rowManager.findRow(e);if(o){if(-1==this.selectedRows.indexOf(o))return o.getElement().classList.add("tabulator-selected"),o.modules.select||(o.modules.select={}),o.modules.select.selected=!0,o.modules.select.checkboxEl&&(o.modules.select.checkboxEl.checked=!0),this.selectedRows.push(o),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(o,!0),this.dispatchExternal("rowSelected",o.getComponent()),this._rowSelectionChanged(t,o),o}else t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return-1!==this.selectedRows.indexOf(e)}deselectRows(e,t){var n,o,i=[];switch(typeof e){case"undefined":n=Object.assign([],this.selectedRows);break;case"number":n=this.table.rowManager.findRow(e);break;case"string":(n=this.table.rowManager.findRow(e))||(n=this.table.rowManager.getRows(e));break;default:n=e}Array.isArray(n)?n.length&&(n.forEach((e=>{(o=this._deselectRow(e,!0,!0))&&i.push(o)})),this._rowSelectionChanged(t,[],i)):n&&this._deselectRow(n,t,!0)}_deselectRow(e,t){var n,o,i=this,r=i.table.rowManager.findRow(e);if(r){if((n=i.selectedRows.findIndex((function(e){return e==r})))>-1)return(o=r.getElement())&&o.classList.remove("tabulator-selected"),r.modules.select||(r.modules.select={}),r.modules.select.selected=!1,r.modules.select.checkboxEl&&(r.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(n,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(r,!1),this.dispatchExternal("rowDeselected",r.getComponent()),i._rowSelectionChanged(t,void 0,r),r}else t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getData())})),e}getSelectedRows(){var e=[];return this.selectedRows.forEach((function(t){e.push(t.getComponent())})),e}_rowSelectionChanged(e,t=[],n=[]){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||(Array.isArray(t)||(t=[t]),t=t.map((e=>e.getComponent())),Array.isArray(n)||(n=[n]),n=n.map((e=>e.getComponent())),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),t,n))}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var n=this.table.modules.dataTree.getChildren(e,!0,!0);if(t)for(let e of n)this._selectRow(e,!0);else for(let e of n)this._deselectRow(e,!0)}},SortModule:ye,SpreadsheetModule:class extends s{static moduleName="spreadsheet";constructor(e){super(e),this.sheets=[],this.element=null,this.registerTableOption("spreadsheet",!1),this.registerTableOption("spreadsheetRows",50),this.registerTableOption("spreadsheetColumns",50),this.registerTableOption("spreadsheetColumnDefinition",{}),this.registerTableOption("spreadsheetOutputFull",!1),this.registerTableOption("spreadsheetData",!1),this.registerTableOption("spreadsheetSheets",!1),this.registerTableOption("spreadsheetSheetTabs",!1),this.registerTableOption("spreadsheetSheetTabsElement",!1),this.registerTableFunction("setSheets",this.setSheets.bind(this)),this.registerTableFunction("addSheet",this.addSheet.bind(this)),this.registerTableFunction("getSheets",this.getSheets.bind(this)),this.registerTableFunction("getSheetDefinitions",this.getSheetDefinitions.bind(this)),this.registerTableFunction("setSheetData",this.setSheetData.bind(this)),this.registerTableFunction("getSheet",this.getSheet.bind(this)),this.registerTableFunction("getSheetData",this.getSheetData.bind(this)),this.registerTableFunction("clearSheet",this.clearSheet.bind(this)),this.registerTableFunction("removeSheet",this.removeSheetFunc.bind(this)),this.registerTableFunction("activeSheet",this.activeSheetFunc.bind(this))}initialize(){this.options("spreadsheet")&&(this.subscribe("table-initialized",this.tableInitialized.bind(this)),this.subscribe("data-loaded",this.loadRemoteData.bind(this)),this.table.options.index="_id",this.options("spreadsheetData")&&this.options("spreadsheetSheets")&&(console.warn("You cannot use spreadsheetData and spreadsheetSheets at the same time, ignoring spreadsheetData"),this.table.options.spreadsheetData=!1),this.compatibilityCheck(),this.options("spreadsheetSheetTabs")&&this.initializeTabset())}compatibilityCheck(){this.options("data")&&console.warn("Do not use the data option when working with spreadsheets, use either spreadsheetData or spreadsheetSheets to pass data into the table"),this.options("pagination")&&console.warn("The spreadsheet module is not compatible with the pagination module"),this.options("groupBy")&&console.warn("The spreadsheet module is not compatible with the row grouping module"),this.options("responsiveCollapse")&&console.warn("The spreadsheet module is not compatible with the responsive collapse module")}initializeTabset(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tabs");var e=this.options("spreadsheetSheetTabsElement");!e||e instanceof HTMLElement||(e=document.querySelector(e))||console.warn("Unable to find element matching spreadsheetSheetTabsElement selector:",this.options("spreadsheetSheetTabsElement")),e?e.appendChild(this.element):this.footerAppend(this.element)}tableInitialized(){this.sheets.length?this.loadSheet(this.sheets[0]):this.options("spreadsheetSheets")?this.loadSheets(this.options("spreadsheetSheets")):this.options("spreadsheetData")&&this.loadData(this.options("spreadsheetData"))}loadRemoteData(e,t,n){return console.log("data",e,t,n),Array.isArray(e)?(this.table.dataLoader.clearAlert(),this.dispatchExternal("dataLoaded",e),!e.length||Array.isArray(e[0])?this.loadData(e):this.loadSheets(e)):console.error("Spreadsheet Loading Error - Unable to process remote data due to invalid data type \nExpecting: array \nReceived: ",typeof e,"\nData: ",e),!1}loadData(e){var t={data:e};this.loadSheet(this.newSheet(t))}destroySheets(){this.sheets.forEach((e=>{e.destroy()})),this.sheets=[],this.activeSheet=null}loadSheets(e){Array.isArray(e)||(e=[]),this.destroySheets(),e.forEach((e=>{this.newSheet(e)})),this.loadSheet(this.sheets[0])}loadSheet(e){this.activeSheet!==e&&(this.activeSheet&&this.activeSheet.unload(),this.activeSheet=e,e.load())}newSheet(e={}){var t;return e.rows||(e.rows=this.options("spreadsheetRows")),e.columns||(e.columns=this.options("spreadsheetColumns")),t=new Ee(this,e),this.sheets.push(t),this.element&&this.element.appendChild(t.element),t}removeSheet(e){var t,n=this.sheets.indexOf(e);this.sheets.length>1?n>-1&&(this.sheets.splice(n,1),e.destroy(),this.activeSheet===e&&((t=this.sheets[n-1]||this.sheets[0])?this.loadSheet(t):this.activeSheet=null)):console.warn("Unable to remove sheet, at least one sheet must be active")}lookupSheet(e){return e?e instanceof Ee?e:e instanceof xe?e._sheet:this.sheets.find((t=>t.key===e))||!1:this.activeSheet}setSheets(e){return this.loadSheets(e),this.getSheets()}addSheet(e){return this.newSheet(e).getComponent()}getSheetDefinitions(){return this.sheets.map((e=>e.getDefinition()))}getSheets(){return this.sheets.map((e=>e.getComponent()))}getSheet(e){var t=this.lookupSheet(e);return!!t&&t.getComponent()}setSheetData(e,t){e&&!t&&(t=e,e=!1);var n=this.lookupSheet(e);return!!n&&n.setData(t)}getSheetData(e){var t=this.lookupSheet(e);return!!t&&t.getData()}clearSheet(e){var t=this.lookupSheet(e);return!!t&&t.clear()}removeSheetFunc(e){var t=this.lookupSheet(e);t&&this.removeSheet(t)}activeSheetFunc(e){var t=this.lookupSheet(e);return!!t&&this.loadSheet(t)}},TooltipModule:class extends s{static moduleName="tooltip";constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,n){var o="tooltip"===e?n.column.definition.tooltip:n.definition.headerTooltip;o&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,n,o),this.table.options.tooltipDelay))}mouseoutCheck(e,t,n){this.popupInstance||this.clearPopup()}clearPopup(e,t,n){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,n){var o,i,r;"function"==typeof n&&(n=n(e,t.getComponent(),(function(e){i=e}))),n instanceof HTMLElement?o=n:(o=document.createElement("div"),!0===n&&(t instanceof E?n=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,(e=>{o.innerHTML=n=e||t.definition.title})):n=t.definition.title),o.innerHTML=n),(n||0===n||!1===n)&&(o.classList.add("tabulator-tooltip"),o.addEventListener("mousemove",(e=>e.preventDefault())),this.popupInstance=this.popup(o),"function"==typeof i&&this.popupInstance.renderCallback(i),r=this.popupInstance.containerEventCoords(e),this.popupInstance.show(r.x+15,r.y+15).hideOnBlur((()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null})),this.dispatchExternal("TooltipOpened",t.getComponent()))}},ValidateModule:Ae}),Re={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},rowHeader:!1,data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{},dependencies:{}};class Me{constructor(e,t,n={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},n)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var n=Object.assign({},this.registeredDefaults),o=this.table.options.debugInvalidOptions||!0===t.debugInvalidOptions;Object.assign(n,e);for(let e in t)n.hasOwnProperty(e)||(o&&console.warn("Invalid "+this.msgType+" option:",e),n[e]=t.key);for(let e in n)e in t?n[e]=t[e]:Array.isArray(n[e])?n[e]=Object.assign([],n[e]):"object"==typeof n[e]&&null!==n[e]?n[e]=Object.assign({},n[e]):void 0===n[e]&&delete n[e];return n}}class Te extends o{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var n=e.getElement();t%2?(n.classList.add("tabulator-row-even"),n.classList.remove("tabulator-row-odd")):(n.classList.add("tabulator-row-odd"),n.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,n){var o=this.rows().indexOf(e),r=e.getElement(),s=0;return new Promise(((a,l)=>{if(o>-1){if(void 0===n&&(n=this.table.options.scrollToRowIfVisible),!n&&i.elVisible(r)&&(s=i.elOffset(r).top-i.elOffset(this.elementVertical).top)>0&&s<this.elementVertical.clientHeight-r.offsetHeight)return a(),!1;switch(void 0===t&&(t=this.table.options.scrollToRowPosition),"nearest"===t&&(t=this.scrollToRowNearestTop(e)?"top":"bottom"),this.scrollToRow(e),t){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(r.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-r.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-r.offsetTop)+r.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+r.offsetHeight;break;case"top":this.elementVertical.scrollTop=r.offsetTop}a()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")}))}}class Ie extends Te{constructor(e){super(e)}renderRowCells(e,t){const n=document.createDocumentFragment();e.cells.forEach((e=>{n.appendChild(e.getElement())})),e.element.appendChild(n),t||e.cells.forEach((e=>{e.cellRendered()}))}reinitializeColumnWidths(e){e.forEach((function(e){e.reinitializeWidth()}))}}class Pe extends Te{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){"fitDataTable"==this.options("layout")&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach((t=>{if(t.visible){var n=t.getWidth();n>e&&(e=n)}})),this.windowBuffer=2*e}rerenderColumns(e,t){var n={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},o=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach((e=>{var t,n={};e.visible&&(e.modules.frozen||(t=e.getWidth(),n.leftPos=o,n.rightPos=o+t,n.width=t,this.isFitData&&(n.fitDataCheck=!e.modules.vdomHoz||e.modules.vdomHoz.fitDataCheck),o+t>this.vDomScrollPosLeft&&o<this.vDomScrollPosRight?(-1==this.leftCol&&(this.leftCol=this.columns.length,this.vDomPadLeft=o),this.rightCol=this.columns.length):-1!==this.leftCol&&(this.vDomPadRight+=t),this.columns.push(e),e.modules.vdomHoz=n,o+=t))})),this.tableElement.style.paddingLeft=this.vDomPadLeft+"px",this.tableElement.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||e&&!this.reinitChanged(n)||this.reinitializeRows(),this.elementVertical.scrollLeft=this.scrollLeft)}renderRowCells(e){if(this.initialized)this.initializeRow(e);else{const t=document.createDocumentFragment();e.cells.forEach((e=>{t.appendChild(e.getElement())})),e.element.appendChild(t),e.cells.forEach((e=>{e.cellRendered()}))}}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let e=this.leftCol;e<=this.rightCol;e++){let t=this.columns[e];t&&t.reinitializeWidth()}}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e,t,n=!1;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach((e=>{!e.definition.width&&e.visible&&(n=!0)})),n&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,e=this.chain("rows-sample",[1],[],(()=>this.table.rowManager.getDisplayRows()))[0])){t=e.getElement(),e.generateCells(),this.tableElement.appendChild(t);for(let n=0;n<e.cells.length;n++){let o=e.cells[n];t.appendChild(o.getElement()),o.column.reinitializeWidth()}t.parentNode.removeChild(t),this.rerenderColumns(!1,!0)}}else"fitColumns"===this.options("layout")&&(this.layoutRefresh(),this.rerenderColumns(!1,!0))}reinitChanged(e){var t=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol||(e.cols.forEach(((e,n)=>{e!==this.columns[n]&&(t=!1)})),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter((t=>!e.includes(t)));e.forEach((e=>{this.reinitializeRow(e,!0)})),t.forEach((e=>{e.deinitialize()}))}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,n){for(let o=e;o<t;o++){let e=this.columns[o];e.modules.vdomHoz.leftPos+=n,e.modules.vdomHoz.rightPos+=n}}addColRight(){for(var e=!1,t=!0;t;){let n=this.columns[this.rightCol+1];n&&n.modules.vdomHoz.leftPos<=this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var t=e.getCell(n);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.rightCol]).getElement().nextSibling),t.cellRendered()}})),this.fitDataColActualWidthCheck(n),this.rightCol++,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.rightCol=this.rightCol)})),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=n.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let n=this.columns[this.leftCol-1];if(n)if(n.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var t=e.getCell(n);e.getElement().insertBefore(t.getElement(),e.getCell(this.columns[this.leftCol]).getElement()),t.cellRendered()}})),this.leftCol--,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.leftCol=this.leftCol)})),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=n.getWidth();let t=this.fitDataColActualWidthCheck(n);t&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+t,this.vDomPadRight-=t)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let n=this.columns[this.rightCol];n&&n.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var t=e.getCell(n);try{e.getElement().removeChild(t.getElement())}catch(e){console.warn("Could not removeColRight",e.message)}}})),this.vDomPadRight+=n.getWidth(),this.rightCol--,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.rightCol=this.rightCol)}))):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let n=this.columns[this.leftCol];n&&n.modules.vdomHoz.rightPos<this.vDomScrollPosLeft?(e=!0,this.getVisibleRows().forEach((e=>{if("group"!==e.type){var t=e.getCell(n);try{e.getElement().removeChild(t.getElement())}catch(e){console.warn("Could not removeColLeft",e.message)}}})),this.vDomPadLeft+=n.getWidth(),this.leftCol++,this.getVisibleRows().forEach((e=>{"group"!==e.type&&(e.modules.vdomHoz.leftCol=this.leftCol)}))):t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,n;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),(n=(t=e.getWidth())-e.modules.vdomHoz.width)&&(e.modules.vdomHoz.rightPos+=n,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,n)),e.modules.vdomHoz.fitDataCheck=!1),n}initializeRow(e){if("group"!==e.type){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach((t=>{this.appendCell(e,t)}));for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach((t=>{this.appendCell(e,t)}))}}appendCell(e,t){if(t&&t.visible){let n=e.getCell(t);e.getElement().appendChild(n.getElement()),n.cellRendered()}}reinitializeRow(e,t){if("group"!==e.type&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var n=e.getElement();n.firstChild;)n.removeChild(n.firstChild);this.initializeRow(e)}}}class Oe extends o{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.rowHeader=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new Me(this.table,"column definition",A),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:Pe,basic:Ie};(e="string"==typeof this.table.options.renderHorizontal?t[this.table.options.renderHorizontal]:this.table.options.renderHorizontal)?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,this.scrollLeft=e,this.renderer.scrollColumns(e)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",(e=>{var t;e.deltaX&&(t=this.contentsElement.scrollLeft+e.deltaX,this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))}))}generateColumnsFromRowData(e){var t=[],n={},o="full"===this.table.options.autoColumns?e:[e[0]],i=this.table.options.autoColumnsDefinitions;if(e&&e.length){if(o.forEach((e=>{Object.keys(e).forEach(((o,i)=>{let r,s=e[o];n[o]?!0!==n[o]&&void 0!==s&&(n[o].sorter=this.calculateSorterFromValue(s),n[o]=!0):(r={field:o,title:o,sorter:this.calculateSorterFromValue(s)},t.splice(i,0,r),n[o]=void 0!==s||r)}))})),i)switch(typeof i){case"function":this.table.options.columns=i.call(this.table,t);break;case"object":Array.isArray(i)?t.forEach((e=>{var t=i.find((t=>t.field===e.field));t&&Object.assign(e,t)})):t.forEach((e=>{i[e.field]&&Object.assign(e,i[e.field])})),this.table.options.columns=t}else this.table.options.columns=t;this.setColumns(this.table.options.columns)}}calculateSorterFromValue(e){var t;switch(typeof e){case"undefined":t="string";break;case"boolean":t="boolean";break;case"number":t="number";break;case"object":t=Array.isArray(e)?"array":"string";break;default:t=isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}return t}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),this.dispatchExternal("columnsLoading"),this.table.options.rowHeader&&(this.rowHeader=new k(!0===this.table.options.rowHeader?{}:this.table.options.rowHeader,this,!0),this.columns.push(this.rowHeader),this.headersElement.appendChild(this.rowHeader.getElement()),this.rowHeader.columnRendered()),e.forEach(((e,t)=>{this._addColumn(e)})),this._reIndexColumns(),this.dispatch("columns-loaded"),this.subscribedExternal("columnsLoaded")&&this.dispatchExternal("columnsLoaded",this.getComponents()),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,n){var o=new k(e,this),i=o.getElement(),r=n?this.findColumnIndex(n):n;if(!t||!this.rowHeader||n&&n!==this.rowHeader||(t=!1,n=this.rowHeader,r=0),n&&r>-1){var s=n.getTopColumn(),a=this.columns.indexOf(s),l=s.getElement();t?(this.columns.splice(a,0,o),l.parentNode.insertBefore(i,l)):(this.columns.splice(a+1,0,o),l.parentNode.insertBefore(i,l.nextSibling))}else t?(this.columns.unshift(o),this.headersElement.insertBefore(o.getElement(),this.headersElement.firstChild)):(this.columns.push(o),this.headersElement.appendChild(o.getElement()));return o.columnRendered(),o}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach((function(e){e.reRegisterPosition()}))}verticalAlignHeaders(){var e=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach((e=>{e.clearVerticalAlign()})),this.columns.forEach((t=>{var n=t.getHeight();n>e&&(e=n)})),this.headersElement.style.height=e+"px",this.columns.forEach((t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)})),this.table.rowManager.adjustTableSize())}findColumn(e){var t;return"object"!=typeof e?this.columnsByField[e]||!1:e instanceof k?e:e instanceof S?e._getSelf()||!1:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&(t=[],this.columns.forEach((e=>{t.push(e),t=t.concat(e.getColumns(!0))})),t.find((t=>t.element===e))||!1)}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach((n=>{(this.table.options.nestedFieldSeparator?n.split(this.table.options.nestedFieldSeparator)[0]:n)===e&&t.push(this.columnsByField[n])})),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(){var e=this.columnsByIndex.findIndex((e=>e.visible));return e>-1&&this.columnsByIndex[e]}getVisibleColumnsByIndex(){return this.columnsByIndex.filter((e=>e.visible))}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex((t=>e===t))}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach(((t,n)=>{e(t,n)}))}getDefinitions(e){var t=[];return this.columnsByIndex.forEach((n=>{(!e||e&&n.visible)&&t.push(n.getDefinition())})),t}getDefinitionTree(){var e=[];return this.columns.forEach((t=>{e.push(t.getDefinition(!0))})),e}getComponents(e){var t=[];return(e?this.columns:this.columnsByIndex).forEach((e=>{t.push(e.getComponent())})),t}getWidth(){var e=0;return this.columnsByIndex.forEach((t=>{t.visible&&(e+=t.getWidth())})),e}moveColumn(e,t,n){t.element.parentNode.insertBefore(e.element,t.element),n&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,n),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,n){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,n):this._moveColumnInArray(this.columns,e,t,n),this._moveColumnInArray(this.columnsByIndex,e,t,n,!0),this.rerenderColumns(!0),this.dispatch("column-moved",e,t,n),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,n,o,i){var r,s=e.indexOf(t);s>-1&&(e.splice(s,1),(r=e.indexOf(n))>-1?o&&(r+=1):r=s,e.splice(r,0,t),i&&(this.chain("column-moving-rows",[t,n,o],null,[])||[]).concat(this.table.rowManager.rows).forEach((function(e){if(e.cells.length){var t=e.cells.splice(s,1)[0];e.cells.splice(r,0,t)}})))}scrollToColumn(e,t,n){var o=0,i=e.getLeftOffset(),r=0,s=e.getElement();return new Promise(((a,l)=>{if(void 0===t&&(t=this.table.options.scrollToColumnPosition),void 0===n&&(n=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":r=-this.element.clientWidth/2;break;case"right":r=s.clientWidth-this.headersElement.clientWidth}if(!n&&i>0&&i+s.offsetWidth<this.element.clientWidth)return!1;o=i+r,o=Math.max(Math.min(o,this.table.rowManager.element.scrollWidth-this.table.rowManager.element.clientWidth),0),this.table.rowManager.scrollHorizontal(o),this.scrollHorizontal(o),a()}else console.warn("Scroll Error - Column not visible"),l("Scroll Error - Column not visible")}))}generateCells(e){var t=[];return this.columnsByIndex.forEach((n=>{t.push(n.generateCell(e))})),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(n){var o,i,r;n.visible&&(o=n.definition.width||0,i=parseInt(n.minWidth),r="string"==typeof o?o.indexOf("%")>-1?e/100*parseInt(o):parseInt(o):o,t+=r>i?r:i)})),t}addColumn(e,t,n){return new Promise(((o,i)=>{var r=this._addColumn(e,t,n);this._reIndexColumns(),this.dispatch("column-add",e,t,n),"fitColumns"!=this.layoutMode()&&r.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),o(r)}))}deregisterColumn(e){var t,n=e.getField();n&&delete this.columnsByField[n],(t=this.columnsByIndex.indexOf(e))>-1&&this.columnsByIndex.splice(t,1),(t=this.columns.indexOf(e))>-1&&this.columns.splice(t,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(e,t){this.redrawBlock?(!1===e||!0===e&&null===this.redrawBlockUpdate)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){i.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class De extends Te{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0,n=document.createDocumentFragment(),o=this.rows();o.forEach(((e,o)=>{this.styleRow(e,o),e.initialize(!1,!0),"group"!==e.type&&(t=!1),n.appendChild(e.getElement())})),e.appendChild(n),o.forEach((e=>{e.rendered(),e.heightInitialized||e.calcHeight(!0)})),o.forEach((e=>{e.heightInitialized||e.setCellHeight()})),e.style.minWidth=t?this.table.columnManager.getWidth()+"px":""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows(),this.rows().length||this.table.rowManager.tableEmpty()}scrollToRowNearestTop(e){var t=i.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=i.elOffset(t).top-i.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class Ne extends Te{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,n=!1,o=!1,i=this.table.rowManager.scrollLeft,r=this.rows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(r[s]){var a=t-r[s].getElement().offsetTop;if(!(!1===o||Math.abs(a)<o))break;o=a,n=s}r.forEach((e=>{e.deinitializeHeight()})),e&&e(),this.rows().length?this._virtualRenderFill(!1===n?this.rows.length-1:n,!0,o||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(i)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var n=e-this.vDomScrollPosTop,o=e-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer,r=this.rows();if(this.scrollTop=e,-n>i||o>i){var s=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*r.length)),this.scrollColumns(s)}else t?(n<0&&this._addTopRow(r,-n),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(r,-o):this.vDomScrollPosBottom=this.scrollTop)):(o>=0&&this._addBottomRow(r,o),n>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(r,n):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,n=this.elementVertical.clientHeight+t,o=!1,i=0,r=0,s=this.rows();if(e)i=this.vDomTop,r=this.vDomBottom;else for(var a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a])if(o){if(!(n-s[a].getElement().offsetTop>=0))break;r=a}else if(t-s[a].getElement().offsetTop>=0)i=a;else{if(o=!0,!(n-s[a].getElement().offsetTop>=0))break;r=a}return s.slice(i,r+1)}_virtualRenderFill(e,t,n){var o,r,s=this.tableElement,a=this.elementVertical,l=0,c=0,u=0,d=0,h=0,p=0,m=this.rows(),g=m.length,f=0,b=[],v=0,w=0,y=this.table.rowManager.fixedHeight,C=this.elementVertical.clientHeight,x=this.table.options.rowHeight,E=!0;if(n=n||0,e=e||0){for(;s.firstChild;)s.removeChild(s.firstChild);(d=(g-e+1)*this.vDomRowHeight)<C&&(e-=Math.ceil((C-d)/this.vDomRowHeight))<0&&(e=0),e-=l=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),e)}else this.clear();if(g&&i.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,y||this.table.options.maxHeight?(x&&(w=C/x+this.vDomWindowBuffer/x),w=Math.max(this.vDomWindowMinTotalRows,Math.ceil(w))):w=g;(w==g||c<=C+this.vDomWindowBuffer||v<this.vDomWindowMinTotalRows)&&this.vDomBottom<g-1;){for(b=[],r=document.createDocumentFragment(),p=0;p<w&&this.vDomBottom<g-1;)o=m[f=this.vDomBottom+1],this.styleRow(o,f),o.initialize(!1,!0),o.heightInitialized||this.table.options.rowHeight||o.clearCellHeight(),r.appendChild(o.getElement()),b.push(o),this.vDomBottom++,p++;if(!b.length)break;s.appendChild(r),b.forEach((e=>{e.rendered(),e.heightInitialized||e.calcHeight(!0)})),b.forEach((e=>{e.heightInitialized||e.setCellHeight()})),b.forEach((e=>{u=e.getHeight(),v<l?h+=u:c+=u,u>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*u),v++})),E=this.table.rowManager.adjustTableSize(),C=this.elementVertical.clientHeight,E&&(y||this.table.options.maxHeight)&&(x=c/v,w=Math.max(this.vDomWindowMinTotalRows,Math.ceil(C/x+this.vDomWindowBuffer/x)))}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+n:this.scrollTop-h,this.vDomBottomPad=this.vDomBottom==g-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-c-h,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((c+h)/v),this.vDomBottomPad=this.vDomRowHeight*(g-this.vDomBottom-1),this.vDomScrollHeight=h+c+this.vDomBottomPad-C),s.style.paddingTop=this.vDomTopPad+"px",s.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+h+n-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-C:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-C),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-C),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,a.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var n=this.tableElement,o=[],i=0,r=this.vDomTop-1,s=0,a=!0;a;)if(this.vDomTop){let l,c,u=e[r];u&&s<this.vDomMaxRenderChain?(l=u.getHeight()||this.vDomRowHeight,c=u.initialized,t>=l?(this.styleRow(u,r),n.insertBefore(u.getElement(),n.firstChild),u.initialized&&u.heightInitialized||o.push(u),u.initialize(),c||(l=u.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,i+=l,this.vDomTop--,r--,s++):a=!1):a=!1}else a=!1;for(let e of o)e.clearCellHeight();this._quickNormalizeRowHeight(o),i&&(this.vDomTopPad-=i,this.vDomTopPad<0&&(this.vDomTopPad=r*this.vDomRowHeight),r<1&&(this.vDomTopPad=0),n.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=i)}_removeTopRow(e,t){for(var n=[],o=0,i=0,r=!0;r;){let s,a=e[this.vDomTop];a&&i<this.vDomMaxRenderChain?(s=a.getHeight()||this.vDomRowHeight,t>=s?(this.vDomTop++,t-=s,o+=s,n.push(a),i++):r=!1):r=!1}for(let e of n){let t=e.getElement();t.parentNode&&t.parentNode.removeChild(t)}o&&(this.vDomTopPad+=o,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?o:o+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var n=this.tableElement,o=[],i=0,r=this.vDomBottom+1,s=0,a=!0;a;){let l,c,u=e[r];u&&s<this.vDomMaxRenderChain?(l=u.getHeight()||this.vDomRowHeight,c=u.initialized,t>=l?(this.styleRow(u,r),n.appendChild(u.getElement()),u.initialized&&u.heightInitialized||o.push(u),u.initialize(),c||(l=u.getElement().offsetHeight,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l)),t-=l,i+=l,this.vDomBottom++,r++,s++):a=!1):a=!1}for(let e of o)e.clearCellHeight();this._quickNormalizeRowHeight(o),i&&(this.vDomBottomPad-=i,(this.vDomBottomPad<0||r==e.length-1)&&(this.vDomBottomPad=0),n.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=i)}_removeBottomRow(e,t){for(var n=[],o=0,i=0,r=!0;r;){let s,a=e[this.vDomBottom];a&&i<this.vDomMaxRenderChain?(s=a.getHeight()||this.vDomRowHeight,t>=s?(this.vDomBottom--,t-=s,o+=s,n.push(a),i++):r=!1):r=!1}for(let e of n){let t=e.getElement();t.parentNode&&t.parentNode.removeChild(t)}o&&(this.vDomBottomPad+=o,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=o)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class He extends o{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){var e=this.table.options.placeholder;if("function"==typeof e&&(e=e.call(this.table)),e=this.chain("placeholder",[e],e,e)||e){let t=document.createElement("div");if(t.classList.add("tabulator-placeholder"),"string"==typeof e){let n=document.createElement("div");n.classList.add("tabulator-placeholder-contents"),n.innerHTML=e,t.appendChild(n),this.placeholderContents=n}else"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(t.appendChild(e),this.placeholderContents=e):(console.warn("Invalid placeholder provided, must be string or HTML Element",e),this.el=null);this.placeholder=t}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",(()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,n=this.element.scrollTop,o=this.scrollTop>n;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=n&&(this.scrollTop=n,this.renderer.scrollRows(n,o),this.dispatch("scroll-vertical",n,o),this.dispatchExternal("scrollVertical",n,o))}))}findRow(e){return"object"!=typeof e?void 0!==e&&(this.rows.find((t=>t.data[this.table.options.index]==e))||!1):e instanceof M?e:e instanceof R?e._getSelf()||!1:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&this.rows.find((t=>t.getElement()===e))||!1}getRowFromDataObject(e){return this.rows.find((t=>t.data===e))||!1}getRowFromPosition(e){return this.getDisplayRows().find((t=>"row"===t.type&&t.getPosition()===e&&t.isDisplayed()))}scrollToRow(e,t,n){return this.renderer.scrollToRowPosition(e,t,n)}setData(e,t,n){return new Promise(((o,i)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition((()=>{this._setDataActual(e)})):(this.table.options.autoColumns&&n&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),o()}))}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach(((e,t)=>{if(e&&"object"==typeof e){var n=new M(e,this);this.rows.push(n)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",e)})),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",typeof e,"\nData: ",e)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach((e=>{e.wipe()})),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(e,t){var n=this.rows.indexOf(e),o=this.activeRows.indexOf(e);o>-1&&this.activeRows.splice(o,1),n>-1&&this.rows.splice(n,1),this.setActiveRows(this.activeRows),this.displayRowIterator((t=>{var n=t.indexOf(e);n>-1&&t.splice(n,1)})),t||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,n,o){return this.addRowActual(e,t,n,o)}addRows(e,t,n,o){var i=[];return new Promise(((r,s)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),(void 0===n&&t||void 0!==n&&!t)&&e.reverse(),e.forEach(((e,o)=>{var r=this.addRow(e,t,n,!0);i.push(r),this.dispatch("row-added",r,e,t,n)})),this.refreshActiveData(!!o&&"displayPipeline",!1,!0),this.regenerateRowPositions(),this.displayRowsCount&&this._clearPlaceholder(),r(i)}))}findAddRowPos(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e}addRowActual(e,t,n,o){var i,r,s=e instanceof M?e:new M(e||{},this),a=this.findAddRowPos(t),l=-1;return n||(r=this.chain("row-adding-position",[s,a],null,{index:n,top:a}),n=r.index,a=r.top),void 0!==n&&(n=this.findRow(n)),(n=this.chain("row-adding-index",[s,n,a],null,n))&&(l=this.rows.indexOf(n)),n&&l>-1?(i=this.activeRows.indexOf(n),this.displayRowIterator((function(e){var t=e.indexOf(n);t>-1&&e.splice(a?t:t+1,0,s)})),i>-1&&this.activeRows.splice(a?i:i+1,0,s),this.rows.splice(a?l:l+1,0,s)):a?(this.displayRowIterator((function(e){e.unshift(s)})),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator((function(e){e.push(s)})),this.activeRows.push(s),this.rows.push(s)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",s.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),o||this.reRenderInPosition(),s}moveRow(e,t,n){this.dispatch("row-move",e,t,n),this.moveRowActual(e,t,n),this.regenerateRowPositions(),this.dispatch("row-moved",e,t,n),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,n){this.moveRowInArray(this.rows,e,t,n),this.moveRowInArray(this.activeRows,e,t,n),this.displayRowIterator((o=>{this.moveRowInArray(o,e,t,n)})),this.dispatch("row-moving",e,t,n)}moveRowInArray(e,t,n,o){var i,r,s;if(t!==n&&((i=e.indexOf(t))>-1&&(e.splice(i,1),(r=e.indexOf(n))>-1?o?e.splice(r+1,0,t):e.splice(r,0,t):e.splice(i,0,t)),e===this.getDisplayRows())){s=r>i?r:i+1;for(let t=i<r?i:r;t<=s;t++)e[t]&&this.styleRow(e[t],t)}}clearData(){this.setData([])}getRowIndex(e){return this.findRowIndex(e,this.rows)}getDisplayRowIndex(e){var t=this.getDisplayRows().indexOf(e);return t>-1&&t}nextDisplayRow(e,t){var n=this.getDisplayRowIndex(e),o=!1;return!1!==n&&n<this.displayRowsCount-1&&(o=this.getDisplayRows()[n+1]),!o||o instanceof M&&"row"==o.type?o:this.nextDisplayRow(o,t)}prevDisplayRow(e,t){var n=this.getDisplayRowIndex(e),o=!1;return n&&(o=this.getDisplayRows()[n-1]),!t||!o||o instanceof M&&"row"==o.type?o:this.prevDisplayRow(o,t)}findRowIndex(e,t){var n;return!!((e=this.findRow(e))&&(n=t.indexOf(e))>-1)&&n}getData(e,t){var n=[];return this.getRows(e).forEach((function(e){"row"==e.type&&n.push(e.getData(t||"data"))})),n}getComponents(e){var t=[];return this.getRows(e).forEach((function(e){t.push(e.getComponent())})),t}getDataCount(e){return this.getRows(e).length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){void 0!==t?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort(((e,t)=>e.priority-t.priority))):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){void 0!==t?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort(((e,t)=>e.priority-t.priority))):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,n){var o=this.table,r="",s=0,a=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if("function"==typeof e)if((s=this.dataPipeline.findIndex((t=>t.handler===e)))>-1)r="dataPipeline",t&&(s==this.dataPipeline.length-1?r="display":s++);else{if(!((s=this.displayPipeline.findIndex((t=>t.handler===e)))>-1))return void console.error("Unable to refresh data, invalid handler provided",e);r="displayPipeline",t&&(s==this.displayPipeline.length-1?r="end":s++)}else r=e||"all",s=0;if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===r&&s<this.redrawBlockRestoreConfig.index||a.indexOf(r)<a.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:e,skipStage:t,renderInPosition:n,stage:r,index:s}));i.elVisible(this.element)?n?this.reRenderInPosition(this.refreshPipelines.bind(this,e,r,s,n)):(this.refreshPipelines(e,r,s,n),e||this.table.columnManager.renderer.renderColumns(),this.renderTable(),o.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(e,r,s,n),this.dispatch("data-refreshed")}}refreshPipelines(e,t,n,o){switch(this.dispatch("data-refreshing"),e&&this.activeRowsPipeline[0]||(this.activeRowsPipeline[0]=this.rows.slice(0)),t){case"all":case"dataPipeline":for(let e=n;e<this.dataPipeline.length;e++){let t=this.dataPipeline[e].handler(this.activeRowsPipeline[e].slice(0));this.activeRowsPipeline[e+1]=t||this.activeRowsPipeline[e].slice(0)}this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);case"display":n=0,this.resetDisplayRows();case"displayPipeline":for(let e=n;e<this.displayPipeline.length;e++){let t=this.displayPipeline[e].handler((e?this.getDisplayRows(e-1):this.activeRows).slice(0),o);this.setDisplayRows(t||this.getDisplayRows(e-1).slice(0),e)}case"end":this.regenerateRowPositions()}this.getDisplayRows().length&&this._clearPlaceholder()}regenerateRowPositions(){var e=this.getDisplayRows(),t=1;e.forEach((e=>{"row"===e.type&&(e.setPosition(t),t++)}))}setActiveRows(e){this.activeRows=this.activeRows=Object.assign([],e),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(e){return void 0===e?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var n=Object.assign([],this.renderer.visibleRows(!t));return e&&(n=this.chain("rows-visible",[t],n,n)),n}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t=[];switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:Ne,basic:De};(e="string"==typeof this.table.options.renderVertical?t[this.table.options.renderVertical]:this.table.options.renderVertical)?(this.renderMode=this.table.options.renderVertical,this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),!this.table.element.clientHeight&&!this.table.options.height||this.table.options.minHeight&&this.table.options.maxHeight?this.fixedHeight=!1:this.fixedHeight=!0):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}checkPlaceholder(){this.displayRowsCount?this._clearPlaceholder():this.tableEmpty()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var n=e.getElement();t%2?(n.classList.add("tabulator-row-even"),n.classList.remove("tabulator-row-odd")):(n.classList.add("tabulator-row-odd"),n.classList.remove("tabulator-row-even"))}normalizeHeight(e){this.activeRows.forEach((function(t){t.normalizeHeight(e)}))}adjustTableSize(){let e,t=this.element.clientHeight,n=!1;if("fill"===this.renderer.verticalFillMode){let o=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){e=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const t="calc(100% - "+o+"px)";this.element.style.minHeight=e||"calc(100% - "+o+"px)",this.element.style.height=t,this.element.style.maxHeight=t}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),this.fixedHeight||t==this.element.clientHeight||(n=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),n}reinitialize(){this.rows.forEach((function(e){e.reinitialize(!0)}))}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class Le extends o{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){this.table.options.footerElement&&("string"==typeof this.table.options.footerElement?"<"===this.table.options.footerElement[0]?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement)):this.element=this.table.options.footerElement)}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){this.element.firstChild&&!e||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class $e extends o{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach((t=>{e[t]={handler:null,components:[]}})),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach((e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)})),this.pseudoTracking=!0}pseudoMouseEnter(e,t,n){this.pseudoTrackers[e].target!==n&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,this.pseudoTrackers[e].target),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=n,this.dispatch(e+"-mouseenter",t,n))}pseudoMouseLeave(e,t){var n=Object.keys(this.pseudoTrackers),o={row:["cell"],cell:["row"]};(n=n.filter((t=>{var n=o[e];return t!==e&&(!n||n&&!n.includes(t))}))).forEach((e=>{var n=this.pseudoTrackers[e].target;this.pseudoTrackers[e].target&&(this.dispatch(e+"-mouseleave",t,n),this.pseudoTrackers[e].target=null)}))}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let n of t)for(let t of e){let e=n+"-"+t;this.subscriptionChange(e,this.subscriptionChanged.bind(this,n,t))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,n){var o=this.listeners[t].components,i=o.indexOf(e),r=!1;n?-1===i&&(o.push(e),r=!0):this.subscribed(e+"-"+t)||i>-1&&(o.splice(i,1),r=!0),"mouseenter"!==t&&"mouseleave"!==t||this.pseudoTracking||this.bindPseudoEvents(),r&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var n=t.composedPath&&t.composedPath()||t.path,o=this.findTargets(n);o=this.bindComponents(e,o),this.triggerEvents(e,t,o),!this.pseudoTracking||"mouseover"!=e&&"mouseleave"!=e||Object.keys(o).length||this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let n=Object.keys(this.componentMap);for(let o of e){let e=o.classList?[...o.classList]:[];if(e.filter((e=>this.abortClasses.includes(e))).length)break;let i=e.filter((e=>n.includes(e)));for(let e of i)t[this.componentMap[e]]||(t[this.componentMap[e]]=o)}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var n=Object.keys(t).reverse(),o=this.listeners[e],i={},r={},s={};for(let e of n){let n,r=t[e],a=this.previousTargets[e];if(a&&a.target===r)n=a.component;else switch(e){case"row":case"group":(o.components.includes("row")||o.components.includes("cell")||o.components.includes("group"))&&(n=this.table.rowManager.getVisibleRows(!0).find((e=>e.getElement()===r)),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[e]=!1));break;case"column":o.components.includes("column")&&(n=this.table.columnManager.findColumn(r));break;case"cell":o.components.includes("cell")&&(i.row instanceof M?n=i.row.findCell(r):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"))}n&&(i[e]=n,s[e]={target:r,component:n})}return this.previousTargets=s,Object.keys(t).forEach((e=>{let t=i[e];r[e]=t})),r}triggerEvents(e,t,n){var o=this.listeners[e];for(let i in n)n[i]&&o.components.includes(i)&&this.dispatch(i+"-"+e,t,n[i])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class _e{constructor(e){this.table=e,this.bindings={}}bind(e,t,n){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,n):this.bindings[e][t]=n}handle(e,t,n){if(this.bindings[e]&&this.bindings[e][n]&&"function"==typeof this.bindings[e][n].bind)return this.bindings[e][n].bind(null,t);"then"===n||"string"!=typeof n||n.startsWith("_")||this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+n+" function, have you checked that you have the correct Tabulator module installed?")}}class ze extends o{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,n,o,i,r){var s=++this.requestOrder;return this.table.destroyed?Promise.resolve():(this.dispatchExternal("dataLoading",e),!e||0!=e.indexOf("{")&&0!=e.indexOf("[")||(e=JSON.parse(e)),this.confirm("data-loading",[e,t,n,i])?(this.loading=!0,i||this.alertLoader(),t=this.chain("data-params",[e,n,i],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams),this.chain("data-load",[e,t,n,i],!1,Promise.resolve([])).then((e=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{Array.isArray(e)||"object"!=typeof e||(e=this.mapParams(e,this.objectInvert(this.table.options.dataReceiveParams)));var t=this.chain("data-loaded",[e],null,e);s==this.requestOrder?(this.clearAlert(),!1!==t&&(this.dispatchExternal("dataLoaded",t),this.table.rowManager.setData(t,o,void 0===r?!o:r))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}})).catch((e=>{console.error("Data Load Error: ",e),this.dispatchExternal("dataLoadError",e),i||this.alertError(),setTimeout((()=>{this.clearAlert()}),this.table.options.dataLoaderErrorTimeout)})).finally((()=>{this.loading=!1}))):(this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,o,void 0===r?!o:r),Promise.resolve()))}mapParams(e,t){var n={};for(let o in e)n[t.hasOwnProperty(o)?t[o]:o]=e[o];return n}objectInvert(e){var t={};for(let n in e)t[e[n]]=n;return t}blockActiveLoad(){this.requestOrder++}alertLoader(){("function"==typeof this.table.options.dataLoader?this.table.options.dataLoader():this.table.options.dataLoader)&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class Fe{constructor(e,t,n){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=n?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=n}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var n;if(this.events[e]){if(t){if(!((n=this.events[e].findIndex((e=>e===t)))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(n,1)}else delete this.events[e];this._notifySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(e,t){var n=this.subscriptionNotifiers[e];n&&n.forEach((e=>{e(t)}))}_dispatch(){var e,t=Array.from(arguments),n=t.shift();return this.events[n]&&this.events[n].forEach(((n,o)=>{let i=n.apply(this.table,t);o||(e=i)})),e}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class Be{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t,n=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:n}),this.events[e].sort(((e,t)=>e.priority-t.priority)),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var n;if(this.events[e]){if(t){if(!((n=this.events[e].findIndex((e=>e.callback===t)))>-1))return void console.warn("Cannot remove event, no matching event found:",e,t);this.events[e].splice(n,1)}this._notifySubscriptionChange(e,!1)}else console.warn("Cannot remove event, no events set on:",e)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,n,o){var i=n;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach(((e,n)=>{i=e.callback.apply(this,t.concat([i]))})),i):"function"==typeof o?o():o}_confirm(e,t){var n=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach(((e,o)=>{e.callback.apply(this,t)&&(n=!0)})),n}_notifySubscriptionChange(e,t){var n=this.subscriptionNotifiers[e];n&&n.forEach((e=>{e(t)}))}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach((t=>{t.callback.apply(this,e)}))}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(!0===this.debug||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class je extends o{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t,n){var o="";return void 0===this.options(e)||(o="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(o=o+", Please use the %c"+t+"%c option instead",this._warnUser(o,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;"),n&&(this.table.options[t]=this.table.options[e])):this._warnUser(o,"font-weight: bold;","font-weight: normal;"),!1)}checkMsg(e,t){return void 0===this.options(e)||(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1)}msg(e){this._warnUser(e)}}class We extends o{constructor(e){super(e),this.deps={},this.props={}}initialize(){this.deps=Object.assign({},this.options("dependencies"))}lookup(e,t,n){if(!Array.isArray(e))return t?this.lookupProp(e,t,n):this.lookupKey(e,n);for(const n of e){var o=this.lookup(n,t,!0);if(o)break}if(o)return o;this.error(e)}lookupProp(e,t,n){var o;return this.props[e]&&this.props[e][t]?this.props[e][t]:(o=this.lookupKey(e,n))?(this.props[e]||(this.props[e]={}),this.props[e][t]=o[t]||o,this.props[e][t]):void 0}lookupKey(e,t){var n;return this.deps[e]?n=this.deps[e]:window[e]?(this.deps[e]=window[e],n=this.deps[e]):t||this.error(e),n}error(e){console.error("Unable to find dependency",e,"Please check documentation and ensure you have imported the required library into your project")}}function Ve(e,t){e.forEach((function(e){e.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}var Ge={fitData:function(e,t){t&&this.table.columnManager.renderer.reinitializeColumnWidths(e),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:Ve,fitDataTable:Ve,fitDataStretch:function(e,t){var n=0,o=this.table.rowManager.element.clientWidth,i=0,r=!1;e.forEach(((e,t)=>{e.widthFixed||e.reinitializeWidth(),(this.table.options.responsiveLayout?e.modules.responsive.visible:e.visible)&&(r=e),e.visible&&(n+=e.getWidth())})),r?(i=o-n+r.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(r.setWidth(0),this.table.modules.responsiveLayout.update()),i>0?r.setWidth(i):r.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e,t){var n,o,i=this.table.rowManager.element.getBoundingClientRect().width,r=0,s=0,a=0,l=[],c=[],u=0,d=0;function h(e){return"string"==typeof e?e.indexOf("%")>-1?i/100*parseInt(e):parseInt(e):e}function p(e,t,n,o){var i=[],r=0,s=0,l=0,c=a,u=0,d=0,m=[];function g(e){return n*(e.column.definition.widthGrow||1)}function f(e){return h(e.width)-n*(e.column.definition.widthShrink||0)}return e.forEach((function(e,r){var s=o?f(e):g(e);e.column.minWidth>=s?i.push(e):e.column.maxWidth&&e.column.maxWidth<s?(e.width=e.column.maxWidth,t-=e.column.maxWidth,(c-=o?e.column.definition.widthShrink||1:e.column.definition.widthGrow||1)&&(n=Math.floor(t/c))):(m.push(e),d+=o?e.column.definition.widthShrink||1:e.column.definition.widthGrow||1)})),i.length?(i.forEach((function(e){r+=o?e.width-e.column.minWidth:e.column.minWidth,e.width=e.column.minWidth})),s=t-r,l=d?Math.floor(s/d):s,u=p(m,s,l,o)):(u=d?t-Math.floor(t/d)*d:t,m.forEach((function(e){e.width=o?f(e):g(e)}))),u}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(i-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach((function(e){var t,n,o;e.visible&&(t=e.definition.width,n=parseInt(e.minWidth),t?(o=h(t),r+=o>n?o:n,e.definition.widthShrink&&(c.push({column:e,width:o>n?o:n}),u+=e.definition.widthShrink)):(l.push({column:e,width:0}),a+=e.definition.widthGrow||1))})),s=i-r,n=Math.floor(s/a),d=p(l,s,n,!1),l.length&&d>0&&(l[l.length-1].width+=d),l.forEach((function(e){s-=e.width})),(o=Math.abs(d)+s)>0&&u&&(d=p(c,o,Math.floor(o/u),!0)),d&&c.length&&(c[c.length-1].width-=d),l.forEach((function(e){e.column.setWidth(e.width)})),c.forEach((function(e){e.column.setWidth(e.width)}))}};class Ke extends s{static moduleName="layout";static modes=Ge;constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;Ke.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode),this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){e.definition.widthGrow&&(e.definition.widthGrow=Number(e.definition.widthGrow)),e.definition.widthShrink&&(e.definition.widthShrink=Number(e.definition.widthShrink))}getMode(){return this.mode}layout(e){var t=this.table.columnManager.columnsByIndex.find((e=>e.definition.variableHeight||"textarea"===e.definition.formatter));this.dispatch("layout-refreshing"),Ke.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),t&&this.table.rowManager.normalizeHeight(!0),this.dispatch("layout-refreshed")}}var Ue={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class qe extends s{static moduleName="localize";static langs=Ue;constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=i.deepClone(qe.langs),!1!==this.table.options.columnDefaults.headerFilterPlaceholder&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let n in t)e[n]&&"object"==typeof e[n]?this._setLangProp(e[n],t[n]):e[n]=t[n]}setLocale(e){if(!0===(e=e||"default")&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let t=e.split("-")[0];this.langList[t]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,t),e=t):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=i.deepClone(this.langList.default||{}),"default"!=e&&function e(t,n){for(var o in t)"object"==typeof t[o]?(n[o]||(n[o]={}),e(t[o],n[o])):n[o]=t[o]}(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var n=(t?e+"|"+t:e).split("|");return this._getLangElement(n,this.locale)||""}_getLangElement(e,t){var n=this.lang;return e.forEach((function(e){var t;n&&(t=n[e],n=void 0!==t&&t)})),n}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach((t=>{t(this.getText(e),this.lang)}))}}var Ye=Object.freeze({__proto__:null,CommsModule:class extends s{static moduleName="comms";constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[];return this.table.constructor.registry.lookupTable(e).forEach((e=>{this.table!==e&&t.push(e)})),t}send(e,t,n,o){var i=this.getConnections(e);i.forEach((e=>{e.tableComms(this.table.element,t,n,o)})),!i.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,n,o){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,n,o);console.warn("Inter-table Comms Error - no such module:",t)}},LayoutModule:Ke,LocalizeModule:qe});class Xe{static registry={tables:[],register(e){Xe.registry.tables.push(e)},deregister(e){var t=Xe.registry.tables.indexOf(e);t>-1&&Xe.registry.tables.splice(t,1)},lookupTable(e,t){var n,o,i=[];if("string"==typeof e){if((n=document.querySelectorAll(e)).length)for(var r=0;r<n.length;r++)(o=Xe.registry.matchElement(n[r]))&&i.push(o)}else"undefined"!=typeof HTMLElement&&e instanceof HTMLElement||e instanceof Xe?(o=Xe.registry.matchElement(e))&&i.push(o):Array.isArray(e)?e.forEach((function(e){i=i.concat(Xe.registry.lookupTable(e))})):t||console.warn("Table Connection Error - Invalid Selector",e);return i},matchElement:e=>Xe.registry.tables.find((function(t){return e instanceof Xe?t===e:t.element===e}))};static findTable(e){var t=Xe.registry.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t}}class Qe extends Xe{static moduleBindings={};static moduleExtensions={};static modulesRegistered=!1;static defaultModules=!1;constructor(){super()}static initializeModuleBinder(e){Qe.modulesRegistered||(Qe.modulesRegistered=!0,Qe._registerModules(Ye,!0),e&&Qe._registerModules(e))}static _extendModule(e,t,n){if(Qe.moduleBindings[e]){var o=Qe.moduleBindings[e][t];if(o)if("object"==typeof n)for(let e in n)o[e]=n[e];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)}static _registerModules(e,t){var n=Object.values(e);t&&n.forEach((e=>{e.prototype.moduleCore=!0})),Qe._registerModule(n)}static _registerModule(e){Array.isArray(e)||(e=[e]),e.forEach((e=>{Qe._registerModuleBinding(e),Qe._registerModuleExtensions(e)}))}static _registerModuleBinding(e){e.moduleName?Qe.moduleBindings[e.moduleName]=e:console.error("Unable to bind module, no moduleName defined",e.moduleName)}static _registerModuleExtensions(e){var t=e.moduleExtensions;if(e.moduleExtensions)for(let e in t){let n=t[e];if(Qe.moduleBindings[e])for(let t in n)Qe._extendModule(e,t,n[t]);else{Qe.moduleExtensions[e]||(Qe.moduleExtensions[e]={});for(let t in n)Qe.moduleExtensions[e][t]||(Qe.moduleExtensions[e][t]={}),Object.assign(Qe.moduleExtensions[e][t],n[t])}}Qe._extendModuleFromQueue(e)}static _extendModuleFromQueue(e){var t=Qe.moduleExtensions[e.moduleName];if(t)for(let n in t)Qe._extendModule(e.moduleName,n,t[n])}_bindModules(){var e=[],t=[],n=[];for(var o in this.modules={},Qe.moduleBindings){let i=Qe.moduleBindings[o],r=new i(this);this.modules[o]=r,i.prototype.moduleCore?this.modulesCore.push(r):i.moduleInitOrder?i.moduleInitOrder<0?e.push(r):t.push(r):n.push(r)}e.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),t.sort(((e,t)=>e.moduleInitOrder>t.moduleInitOrder?1:-1)),this.modulesRegular=e.concat(n.concat(t))}}class Je extends o{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.dispatch("alert-show",t),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),"function"==typeof e&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.dispatch("alert-hide",this.type),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class Ze extends Qe{static defaultOptions=Re;static extendModule(){Ze.initializeModuleBinder(),Ze._extendModule(...arguments)}static registerModule(){Ze.initializeModuleBinder(),Ze._registerModule(...arguments)}constructor(e,t,n){super(),Ze.initializeModuleBinder(n),this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new _e(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new je(this),this.optionsList=new Me(this,"table constructor"),this.dependencyRegistry=new We(this),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout((()=>{this._create()}))),this.constructor.registry.register(this)}initializeElement(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new Oe(this),this.rowManager=new He(this),this.footerManager=new Le(this),this.dataLoader=new ze(this),this.alertManager=new Je(this),this._bindModules(),this.options=this.optionsList.generate(Ze.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new Fe(this,this.options,this.options.debugEventsExternal),this.eventBus=new Be(this.options.debugEventsInternal),this.interactionMonitor=new $e(this),this.dataLoader.initialize(),this.footerManager.initialize(),this.dependencyRegistry.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this.initialized=!0,this._loadInitialData().finally((()=>{this.eventBus.dispatch("table-initialized"),this.externalEvents.dispatch("tableBuilt")}))}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e,t=this.element,n=this.options;if("TABLE"===t.tagName){this.originalElement=this.element,e=document.createElement("div");var o=t.attributes;for(var i in o)"object"==typeof o[i]&&e.setAttribute(o[i].name,o[i].value);t.parentNode.replaceChild(e,t),this.element=t=e}for(t.classList.add("tabulator"),t.setAttribute("role","grid");t.firstChild;)t.removeChild(t.firstChild);n.height&&(n.height=isNaN(n.height)?n.height:n.height+"px",t.style.height=n.height),!1!==n.minHeight&&(n.minHeight=isNaN(n.minHeight)?n.minHeight:n.minHeight+"px",t.style.minHeight=n.minHeight),!1!==n.maxHeight&&(n.maxHeight=isNaN(n.maxHeight)?n.maxHeight:n.maxHeight+"px",t.style.maxHeight=n.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach((e=>{e.initialize()})),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach((e=>{e.initialize()})),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){return this.dataLoader.load(this.options.data).finally((()=>{this.columnManager.verticalAlignHeaders()}))}destroy(){var e=this.element;for(this.destroyed=!0,this.constructor.registry.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):e.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.slice(0,4))}initGuard(e,t){var n,o;return this.options.debugInitialization&&!this.initialized&&(e||(e=" "==(o="Error"==(n=(new Error).stack.split("\n"))[0]?n[2]:n[1])[0]?o.trim().split(" ")[1].split(".")[1]:o.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,n){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,n,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,n){return this.initGuard(),this.dataLoader.load(e,t,n,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise(((n,o)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?e.forEach((e=>{var i=this.rowManager.findRow(e[this.options.index]);i?(t++,i.updateData(e).then((()=>{--t||n()})).catch((t=>{o("Update Error - Unable to update row",e,t)}))):o("Update Error - Unable to find row",e)})):(console.warn("Update Error - No data provided"),o("Update Error - No data provided"))}))}addData(e,t,n){return this.initGuard(),new Promise(((o,i)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,n).then((e=>{var t=[];e.forEach((function(e){t.push(e.getComponent())})),o(t)})):(console.warn("Update Error - No data provided"),i("Update Error - No data provided"))}))}updateOrAddData(e){var t=[],n=0;return this.initGuard(),new Promise(((o,i)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?e.forEach((e=>{var i=this.rowManager.findRow(e[this.options.index]);n++,i?i.updateData(e).then((()=>{n--,t.push(i.getComponent()),n||o(t)})):this.rowManager.addRows(e).then((e=>{n--,t.push(e[0].getComponent()),n||o(t)}))})):(console.warn("Update Error - No data provided"),i("Update Error - No data provided"))}))}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),Array.isArray(e)||(e=[e]);for(let n of e){let e=this.rowManager.findRow(n,!0);if(!e)return console.error("Delete Error - No matching row found:",n),Promise.reject("Delete Error - No matching row found");t.push(e)}return t.sort(((e,t)=>this.rowManager.rows.indexOf(e)>this.rowManager.rows.indexOf(t)?1:-1)),t.forEach((e=>{e.delete()})),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,n){return this.initGuard(),"string"==typeof e&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,n,!0).then((e=>e[0].getComponent()))}updateOrAddRow(e,t){var n=this.rowManager.findRow(e);return this.initGuard(),"string"==typeof t&&(t=JSON.parse(t)),n?n.updateData(t).then((()=>n.getComponent())):this.rowManager.addRows(t).then((e=>e[0].getComponent()))}updateRow(e,t){var n=this.rowManager.findRow(e);return this.initGuard(),"string"==typeof t&&(t=JSON.parse(t)),n?n.updateData(t).then((()=>Promise.resolve(n.getComponent()))):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,n){var o=this.rowManager.findRow(e);return o?this.rowManager.scrollToRow(o,t,n):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,n){var o=this.rowManager.findRow(e);this.initGuard(),o?o.moveToRow(t,n):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show()}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide()}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()}addColumn(e,t,n){var o=this.columnManager.findColumn(n);return this.initGuard(),this.columnManager.addColumn(e,t,o).then((e=>e.getComponent()))}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var n=this.columnManager.findColumn(e);return this.initGuard(),n?n.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,n){var o=this.columnManager.findColumn(e),i=this.columnManager.findColumn(t);this.initGuard(),o?i?this.columnManager.moveColumn(o,i,n):console.warn("Move Error - No matching column found:",i):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,n){return new Promise(((o,i)=>{var r=this.columnManager.findColumn(e);return r?this.columnManager.scrollToColumn(r,t,n):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))}))}redraw(e){this.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw(!0)}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){Array.from(arguments).shift(),this.externalEvents.dispatch(...arguments)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}var et=Ze,tt=class extends et{static extendModule(){et.initializeModuleBinder(ke),et._extendModule(...arguments)}static registerModule(){et.initializeModuleBinder(ke),et._registerModule(...arguments)}constructor(e,t,n){super(e,t,ke)}}},85045:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(2616);function i(e){return e>=0&&e<=255}const r=function(e,t){const{r:n,g:r,b:s,a}=new o.Y(e).toRgb();if(a<1)return e;const{r:l,g:c,b:u}=new o.Y(t).toRgb();for(let e=.01;e<=1;e+=.01){const t=Math.round((n-l*(1-e))/e),a=Math.round((r-c*(1-e))/e),d=Math.round((s-u*(1-e))/e);if(i(t)&&i(a)&&i(d))return new o.Y({r:t,g:a,b:d,a:Math.round(100*e)/100}).toRgbString()}return new o.Y({r:n,g:r,b:s,a:1}).toRgbString()}},85160:(e,t,n)=>{"use strict";var o=n(96540),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=o.useSyncExternalStore,s=o.useRef,a=o.useEffect,l=o.useMemo,c=o.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,o,u){var d=s(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=l((function(){function e(e){if(!a){if(a=!0,r=e,e=o(e),void 0!==u&&h.hasValue){var t=h.value;if(u(t,e))return s=t}return s=e}if(t=s,i(r,e))return t;var n=o(e);return void 0!==u&&u(t,n)?(r=e,t):(r=e,s=n)}var r,s,a=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,n,o,u]);var p=r(e,d[0],d[1]);return a((function(){h.hasValue=!0,h.value=p}),[p]),c(p),p}},85342:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var o=n(96540),i=n(34164),r=n(14292),s=n(1908),a=n(21362),l=n(14808),c=n(21124),u=n(14921),d=n(57514),h=n(65387);const p=(e,t,n)=>{const o=e.keys[0];var i,r;Array.isArray(t)?t.forEach(((t,o)=>{n(((t,n)=>{o<=e.keys.length-1&&(0===o?Object.assign(t,n):t[e.up(e.keys[o])]=n)}),t)})):t&&"object"==typeof t?(Object.keys(t).length>e.keys.length?e.keys:(i=e.keys,r=Object.keys(t),i.filter((e=>r.includes(e))))).forEach((i=>{if(e.keys.includes(i)){const r=t[i];void 0!==r&&n(((t,n)=>{o===i?Object.assign(t,n):t[e.up(i)]=n}),r)}})):"number"!=typeof t&&"string"!=typeof t||n(((e,t)=>{Object.assign(e,t)}),t)};function m(e){return`--Grid-${e}Spacing`}function g(e){return`--Grid-parent-${e}Spacing`}const f="--Grid-columns",b="--Grid-parent-columns",v=({theme:e,ownerState:t})=>{const n={};return p(e.breakpoints,t.size,((e,t)=>{let o={};"grow"===t&&(o={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(o={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${b}) - (var(${b}) - ${t}) * (var(${g("column")}) / var(${b})))`}),e(n,o)})),n},w=({theme:e,ownerState:t})=>{const n={};return p(e.breakpoints,t.offset,((e,t)=>{let o={};"auto"===t&&(o={marginLeft:"auto"}),"number"==typeof t&&(o={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${b}) + var(${g("column")}) * ${t} / var(${b}))`}),e(n,o)})),n},y=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[f]:12};return p(e.breakpoints,t.columns,((e,t)=>{const o=t??12;e(n,{[f]:o,"> *":{[b]:o}})})),n},C=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.rowSpacing,((t,o)=>{const i="string"==typeof o?o:e.spacing?.(o);t(n,{[m("row")]:i,"> *":{[g("row")]:i}})})),n},x=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.columnSpacing,((t,o)=>{const i="string"==typeof o?o:e.spacing?.(o);t(n,{[m("column")]:i,"> *":{[g("column")]:i}})})),n},E=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.direction,((e,t)=>{e(n,{flexDirection:t})})),n},S=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${m("row")}) var(${m("column")})`}}),A=e=>{const t=[];return Object.entries(e).forEach((([e,n])=>{!1!==n&&void 0!==n&&t.push(`grid-${e}-${String(n)}`)})),t},k=(e,t="xs")=>{function n(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(n(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){const t=[];return Object.entries(e).forEach((([e,o])=>{n(o)&&t.push(`spacing-${e}-${String(o)}`)})),t}return[]},R=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map((([e,t])=>`direction-${e}-${t}`)):[`direction-xs-${String(e)}`];var M=n(74848);const T=(0,h.A)(),I=(0,l.A)("div",{name:"MuiGrid",slot:"Root"});function P(e){return(0,c.A)({props:e,name:"MuiGrid",defaultTheme:T})}var O=n(26739),D=n(20439),N=n(53356);const H=function(e={}){const{createStyledComponent:t=I,useThemeProps:n=P,useTheme:l=u.A,componentName:c="MuiGrid"}=e;function h(e,t,n=()=>!0){const o={};return null===e||(Array.isArray(e)?e.forEach(((e,i)=>{null!==e&&n(e)&&t.keys[i]&&(o[t.keys[i]]=e)})):"object"==typeof e?Object.keys(e).forEach((t=>{const i=e[t];null!=i&&n(i)&&(o[t]=i)})):o[t.keys[0]]=e),o}const p=t(y,x,C,v,E,S,w),m=o.forwardRef((function(e,t){const u=l(),m=n(e),g=(0,d.A)(m);!function(e,t){const n=[];void 0!==e.item&&(delete e.item,n.push("item")),void 0!==e.zeroMinWidth&&(delete e.zeroMinWidth,n.push("zeroMinWidth")),t.keys.forEach((t=>{void 0!==e[t]&&(n.push(t),delete e[t])}))}(g,u.breakpoints);const{className:f,children:b,columns:v=12,container:w=!1,component:y="div",direction:C="row",wrap:x="wrap",size:E={},offset:S={},spacing:T=0,rowSpacing:I=T,columnSpacing:P=T,unstable_level:O=0,...D}=g,N=h(E,u.breakpoints,(e=>!1!==e)),H=h(S,u.breakpoints),L=e.columns??(O?void 0:v),$=e.spacing??(O?void 0:T),_=e.rowSpacing??e.spacing??(O?void 0:I),z=e.columnSpacing??e.spacing??(O?void 0:P),F={...g,level:O,columns:L,container:w,direction:C,wrap:x,spacing:$,rowSpacing:_,columnSpacing:z,size:N,offset:H},B=((e,t)=>{const{container:n,direction:o,spacing:i,wrap:r,size:l}=e,u={root:["root",n&&"container","wrap"!==r&&`wrap-xs-${String(r)}`,...R(o),...A(l),...n?k(i,t.breakpoints.keys[0]):[]]};return(0,a.A)(u,(e=>(0,s.Ay)(c,e)),{})})(F,u);return(0,M.jsx)(p,{ref:t,as:y,ownerState:F,className:(0,i.A)(B.root,f),...D,children:o.Children.map(b,(e=>o.isValidElement(e)&&(0,r.A)(e,["Grid"])&&w&&e.props.container?o.cloneElement(e,{unstable_level:e.props?.unstable_level??O+1}):e))})}));return m.muiName="Grid",m}({createStyledComponent:(0,O.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>(0,D.b)({props:e,name:"MuiGrid"}),useTheme:N.A}),L=H},85501:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(63662);function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,o.A)(e,t)}},85916:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(96540),i=n(34164),r=n(21362),s=n(35124),a=n(26739),l=n(20439),c=n(21942),u=n(58503),d=n(74848);const h=(0,a.Ay)(s.A,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),p=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiDialogTitle"}),{className:s,id:a,...p}=n,m=n,g=(e=>{const{classes:t}=e;return(0,r.A)({root:["root"]},c.t,t)})(m),{titleId:f=a}=o.useContext(u.A);return(0,d.jsx)(h,{component:"h2",className:(0,i.A)(g.root,s),ownerState:m,ref:t,variant:"h6",id:a??f,...p})}))},87695:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(96369),i=n(73893),r=n(27800),s=n(76562);function a(e){return(0,o.A)(e)||(0,i.A)(e)||(0,r.A)(e)||(0,s.A)()}},88629:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(9792),i=n(74848);const r=(0,o.A)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},89045:(e,t,n)=>{var o=n(73738).default;e.exports=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},89379:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(64467);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},89569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commonLocale=void 0,t.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}},90729:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(96540).createContext({})},90754:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>g,Ay:()=>ge});var o=n(64467),i=n(89379),r=n(5544),s=n(82284),a=n(46942),l=n.n(a),c=n(66588),u=n(8719),d=n(96540),h=n(80045),p=["children"],m=d.createContext({});function g(e){var t=e.children,n=(0,h.A)(e,p);return d.createElement(m.Provider,{value:n},t)}var f=n(23029),b=n(92901),v=n(85501),w=n(49640);const y=function(e){(0,v.A)(n,e);var t=(0,w.A)(n);function n(){return(0,f.A)(this,n),t.apply(this,arguments)}return(0,b.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(d.Component);var C=n(81470),x=n(1233),E=n(26956),S="none",A="appear",k="enter",R="leave",M="none",T="prepare",I="start",P="active",O="end",D="prepared",N=n(20998);function H(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var L,$,_,z=(L=(0,N.A)(),$="undefined"!=typeof window?window:{},_={animationend:H("Animation","AnimationEnd"),transitionend:H("Transition","TransitionEnd")},L&&("AnimationEvent"in $||delete _.animationend.animation,"TransitionEvent"in $||delete _.transitionend.transition),_),F={};if((0,N.A)()){var B=document.createElement("div");F=B.style}var j={};function W(e){if(j[e])return j[e];var t=z[e];if(t)for(var n=Object.keys(t),o=n.length,i=0;i<o;i+=1){var r=n[i];if(Object.prototype.hasOwnProperty.call(t,r)&&r in F)return j[e]=t[r],j[e]}return""}var V=W("animationend"),G=W("transitionend"),K=!(!V||!G),U=V||"animationend",q=G||"transitionend";function Y(e,t){return e?"object"===(0,s.A)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}const X=(0,N.A)()?d.useLayoutEffect:d.useEffect;var Q=n(25371),J=[T,I,P,O],Z=[T,D],ee=!1;function te(e){return e===P||e===O}function ne(e,t,n,s){var a,l,c,u,h=s.motionEnter,p=void 0===h||h,m=s.motionAppear,g=void 0===m||m,f=s.motionLeave,b=void 0===f||f,v=s.motionDeadline,w=s.motionLeaveImmediately,y=s.onAppearPrepare,N=s.onEnterPrepare,H=s.onLeavePrepare,L=s.onAppearStart,$=s.onEnterStart,_=s.onLeaveStart,z=s.onAppearActive,F=s.onEnterActive,B=s.onLeaveActive,j=s.onAppearEnd,W=s.onEnterEnd,V=s.onLeaveEnd,G=s.onVisibleChanged,K=(0,x.A)(),Y=(0,r.A)(K,2),ne=Y[0],oe=Y[1],ie=(a=S,l=d.useReducer((function(e){return e+1}),0),c=(0,r.A)(l,2)[1],u=d.useRef(a),[(0,E.A)((function(){return u.current})),(0,E.A)((function(e){u.current="function"==typeof e?e(u.current):e,c()}))]),re=(0,r.A)(ie,2),se=re[0],ae=re[1],le=(0,x.A)(null),ce=(0,r.A)(le,2),ue=ce[0],de=ce[1],he=se(),pe=(0,d.useRef)(!1),me=(0,d.useRef)(null);function ge(){return n()}var fe=(0,d.useRef)(!1);function be(){ae(S),de(null,!0)}var ve=(0,C._q)((function(e){var t=se();if(t!==S){var n=ge();if(!e||e.deadline||e.target===n){var o,i=fe.current;t===A&&i?o=null==j?void 0:j(n,e):t===k&&i?o=null==W?void 0:W(n,e):t===R&&i&&(o=null==V?void 0:V(n,e)),i&&!1!==o&&be()}}})),we=function(e){var t=(0,d.useRef)();function n(t){t&&(t.removeEventListener(q,e),t.removeEventListener(U,e))}return d.useEffect((function(){return function(){n(t.current)}}),[]),[function(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(q,e),o.addEventListener(U,e),t.current=o)},n]}(ve),ye=(0,r.A)(we,1)[0],Ce=function(e){switch(e){case A:return(0,o.A)((0,o.A)((0,o.A)({},T,y),I,L),P,z);case k:return(0,o.A)((0,o.A)((0,o.A)({},T,N),I,$),P,F);case R:return(0,o.A)((0,o.A)((0,o.A)({},T,H),I,_),P,B);default:return{}}},xe=d.useMemo((function(){return Ce(he)}),[he]),Ee=function(e,t,n){var o=(0,x.A)(M),i=(0,r.A)(o,2),s=i[0],a=i[1],l=function(){var e=d.useRef(null);function t(){Q.A.cancel(e.current)}return d.useEffect((function(){return function(){t()}}),[]),[function n(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var r=(0,Q.A)((function(){i<=1?o({isCanceled:function(){return r!==e.current}}):n(o,i-1)}));e.current=r},t]}(),c=(0,r.A)(l,2),u=c[0],h=c[1],p=t?Z:J;return X((function(){if(s!==M&&s!==O){var e=p.indexOf(s),t=p[e+1],o=n(s);o===ee?a(t,!0):t&&u((function(e){function n(){e.isCanceled()||a(t,!0)}!0===o?n():Promise.resolve(o).then(n)}))}}),[e,s]),d.useEffect((function(){return function(){h()}}),[]),[function(){a(T,!0)},s]}(he,!e,(function(e){if(e===T){var t=xe[T];return t?t(ge()):ee}var n;return ke in xe&&de((null===(n=xe[ke])||void 0===n?void 0:n.call(xe,ge(),null))||null),ke===P&&he!==S&&(ye(ge()),v>0&&(clearTimeout(me.current),me.current=setTimeout((function(){ve({deadline:!0})}),v))),ke===D&&be(),!0})),Se=(0,r.A)(Ee,2),Ae=Se[0],ke=Se[1],Re=te(ke);fe.current=Re;var Me=(0,d.useRef)(null);X((function(){if(!pe.current||Me.current!==t){oe(t);var n,o=pe.current;pe.current=!0,!o&&t&&g&&(n=A),o&&t&&p&&(n=k),(o&&!t&&b||!o&&w&&!t&&b)&&(n=R);var i=Ce(n);n&&(e||i[T])?(ae(n),Ae()):ae(S),Me.current=t}}),[t]),(0,d.useEffect)((function(){(he===A&&!g||he===k&&!p||he===R&&!b)&&ae(S)}),[g,p,b]),(0,d.useEffect)((function(){return function(){pe.current=!1,clearTimeout(me.current)}}),[]);var Te=d.useRef(!1);(0,d.useEffect)((function(){ne&&(Te.current=!0),void 0!==ne&&he===S&&((Te.current||ne)&&(null==G||G(ne)),Te.current=!0)}),[ne,he]);var Ie=ue;return xe[T]&&ke===I&&(Ie=(0,i.A)({transition:"none"},Ie)),[he,ke,Ie,null!=ne?ne:t]}const oe=function(e){var t=e;"object"===(0,s.A)(e)&&(t=e.transitionSupport);var n=d.forwardRef((function(e,n){var s=e.visible,a=void 0===s||s,h=e.removeOnLeave,p=void 0===h||h,g=e.forceRender,f=e.children,b=e.motionName,v=e.leavedClassName,w=e.eventProps,C=function(e,n){return!(!e.motionName||!t||!1===n)}(e,d.useContext(m).motion),x=(0,d.useRef)(),E=(0,d.useRef)(),A=ne(C,a,(function(){try{return x.current instanceof HTMLElement?x.current:(0,c.Ay)(E.current)}catch(e){return null}}),e),k=(0,r.A)(A,4),R=k[0],M=k[1],P=k[2],O=k[3],D=d.useRef(O);O&&(D.current=!0);var N,H=d.useCallback((function(e){x.current=e,(0,u.Xf)(n,e)}),[n]),L=(0,i.A)((0,i.A)({},w),{},{visible:a});if(f)if(R===S)N=O?f((0,i.A)({},L),H):!p&&D.current&&v?f((0,i.A)((0,i.A)({},L),{},{className:v}),H):g||!p&&!v?f((0,i.A)((0,i.A)({},L),{},{style:{display:"none"}}),H):null;else{var $;M===T?$="prepare":te(M)?$="active":M===I&&($="start");var _=Y(b,"".concat(R,"-").concat($));N=f((0,i.A)((0,i.A)({},L),{},{className:l()(Y(b,R),(0,o.A)((0,o.A)({},_,_&&$),b,"string"==typeof b)),style:P}),H)}else N=null;return d.isValidElement(N)&&(0,u.f3)(N)&&((0,u.A9)(N)||(N=d.cloneElement(N,{ref:H}))),d.createElement(y,{ref:E},N)}));return n.displayName="CSSMotion",n}(K);var ie=n(58168),re=n(9417),se="add",ae="keep",le="remove",ce="removed";function ue(e){var t;return t=e&&"object"===(0,s.A)(e)&&"key"in e?e:{key:e},(0,i.A)((0,i.A)({},t),{},{key:String(t.key)})}function de(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(ue)}var he=["component","children","onVisibleChanged","onAllRemoved"],pe=["status"],me=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe,t=function(t){(0,v.A)(r,t);var n=(0,w.A)(r);function r(){var e;(0,f.A)(this,r);for(var t=arguments.length,s=new Array(t),a=0;a<t;a++)s[a]=arguments[a];return e=n.call.apply(n,[this].concat(s)),(0,o.A)((0,re.A)(e),"state",{keyEntities:[]}),(0,o.A)((0,re.A)(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:(0,i.A)((0,i.A)({},e),{},{status:ce})}))}}),(function(){0===e.state.keyEntities.filter((function(e){return e.status!==ce})).length&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return(0,b.A)(r,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,o=this.props,r=o.component,s=o.children,a=o.onVisibleChanged,l=(o.onAllRemoved,(0,h.A)(o,he)),c=r||d.Fragment,u={};return me.forEach((function(e){u[e]=l[e],delete l[e]})),delete l.keys,d.createElement(c,l,n.map((function(n,o){var r=n.status,l=(0,h.A)(n,pe),c=r===se||r===ae;return d.createElement(e,(0,ie.A)({},u,{key:l.key,visible:c,eventProps:l,onVisibleChanged:function(e){null==a||a(e,{key:l.key}),e||t.removeKey(l.key)}}),(function(e,t){return s((0,i.A)((0,i.A)({},e),{},{index:o}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,o=t.keyEntities,r=de(n),s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],o=0,r=t.length,s=de(e),a=de(t);s.forEach((function(e){for(var t=!1,s=o;s<r;s+=1){var l=a[s];if(l.key===e.key){o<s&&(n=n.concat(a.slice(o,s).map((function(e){return(0,i.A)((0,i.A)({},e),{},{status:se})}))),o=s),n.push((0,i.A)((0,i.A)({},l),{},{status:ae})),o+=1,t=!0;break}}t||n.push((0,i.A)((0,i.A)({},e),{},{status:le}))})),o<r&&(n=n.concat(a.slice(o).map((function(e){return(0,i.A)((0,i.A)({},e),{},{status:se})}))));var l={};return n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1})),Object.keys(l).filter((function(e){return l[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,o=t.status;return n!==e||o!==le}))).forEach((function(t){t.key===e&&(t.status=ae)}))})),n}(o,r);return{keyEntities:s.filter((function(e){var t=o.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==ce||e.status!==le}))}}}]),r}(d.Component);(0,o.A)(t,"defaultProps",{component:"div"})}(K);const ge=oe},92187:(e,t,n)=>{"use strict";var o=n(24994).default;t.A=void 0;var i=o(n(67018)),r=o(n(41702)),s=o(n(83009)),a=o(n(82348));const l="${label}不是一个有效的${type}",c={locale:"zh-cn",Pagination:i.default,DatePicker:s.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:"请选择",close:"关闭"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckAll:"全选",filterSearchPlaceholder:"在筛选项中搜索",emptyText:"暂无数据",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",deselectAll:"取消全选",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开",collapse:"收起"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码过期",refresh:"点击刷新",scanned:"已扫描"},ColorPicker:{presetEmpty:"暂无",transparent:"无色",singleColor:"单色",gradientColor:"渐变色"}};t.A=c},92901:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(20816);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,o.A)(i.key),i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},94925:(e,t,n)=>{"use strict";function o(e){return(e+8)/e}function i(e){const t=Array.from({length:10}).map(((t,n)=>{const o=n-1,i=e*Math.pow(Math.E,o/5),r=n>1?Math.floor(i):Math.ceil(i);return 2*Math.floor(r/2)}));return t[1]=e,t.map((e=>({size:e,lineHeight:o(e)})))}n.d(t,{A:()=>i,k:()=>o})},96069:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}},96369:(e,t,n)=>{"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,{A:()=>o})},98119:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,X:()=>r});var o=n(96540);const i=o.createContext(!1),r=({children:e,disabled:t})=>{const n=o.useContext(i);return o.createElement(i.Provider,{value:null!=t?t:n},e)},s=i},99374:(e,t,n)=>{var o=n(54128),i=n(23805),r=n(44394),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}}}]);