| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- /*! For license information please see 606.bundle.js.LICENSE.txt */
- (self.webpackChunkfront=self.webpackChunkfront||[]).push([[606],{23:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},244:(e,t,n)=>{"use strict";function o(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}n.d(t,{A:()=>o})},322:(e,t,n)=>{"use strict";function o(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r+=1)if(!o(e[r],t[r]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const n=Array.from(e.entries());for(let e=0;e<n.length;e+=1)if(!t.has(n[e][0]))return!1;for(let e=0;e<n.length;e+=1){const r=n[e];if(!o(r[1],t.get(r[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const n=Array.from(e.entries());for(let e=0;e<n.length;e+=1)if(!t.has(n[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;for(let e=0;e<r;e+=1)if(!Object.prototype.hasOwnProperty.call(t,n[e]))return!1;for(let i=0;i<r;i+=1){const r=n[i];if(!o(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}n.d(t,{H:()=>o})},411:(e,t,n)=>{"use strict";n.d(t,{I:()=>i});var o=n(96540);n(74848);const r=o.createContext(),i=()=>o.useContext(r)??!1},654:(e,t,n)=>{"use strict";var o=n(85072),r=n.n(o),i=n(97825),s=n.n(i),a=n(77659),l=n.n(a),c=n(55056),u=n.n(c),d=n(10540),h=n.n(d),p=n(41113),f=n.n(p),m=n(15411),g={};g.styleTagTransform=f(),g.setAttributes=u(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),r()(m.A,g),m.A&&m.A.locals&&m.A.locals},659:(e,t,n)=>{var o=n(51873),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var o=!0}catch(e){}var r=s.call(e);return o&&(t?e[a]=n:delete e[a]),r}},836:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,Q:()=>i});var o=n(96540),r=n(54405);function i(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function s(e){if(o.isValidElement(e)||(0,r.Hy)(e)||!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=s(e[n])})),t}function a(e,t,n={clone:!0}){const l=n.clone?{...e}:e;return i(e)&&i(t)&&Object.keys(t).forEach((c=>{o.isValidElement(t[c])||(0,r.Hy)(t[c])?l[c]=t[c]:i(t[c])&&Object.prototype.hasOwnProperty.call(e,c)&&i(e[c])?l[c]=a(e[c],t[c],n):n.clone?l[c]=i(t[c])?s(t[c]):t[c]:l[c]=t[c]})),l}},1152:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(97164).A},1233:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(5544),r=n(96540);function i(e){var t=r.useRef(!1),n=r.useState(e),i=(0,o.A)(n,2),s=i[0],a=i[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[s,function(e,n){n&&t.current||a(e)}]}},1321:(e,t,n)=>{"use strict";function o(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}n.d(t,{A:()=>o})},1713:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(96540).createContext(void 0)},1883:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(96540);var o=n(9792),r=n(74848);const i=(0,o.A)((0,r.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},1908:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>i});var o=n(61626);const r={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t,n="Mui"){const i=r[t];return i?`${n}-${i}`:`${o.A.generate(e)}-${t}`}},2616:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var o=n(64467);const r=Math.round;function i(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 r(e){return n.startsWith(e)}/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):r("rgb")?this.fromRgbString(n):r("hsl")?this.fromHslString(n):(r("hsv")||r("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:r(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,i=e=>(n[e]-this[e])*o+this[e],s={r:r(i("r")),g:r(i("g")),b:r(i("b")),a:r(100*i("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=>r((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=r(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=r(100*this.getSaturation()),n=r(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=r(255*n);this.r=e,this.g=e,this.b=e}let i=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?(i=c,s=u):l>=1&&l<2?(i=u,s=c):l>=2&&l<3?(s=c,a=u):l>=3&&l<4?(s=u,a=c):l>=4&&l<5?(i=u,a=c):l>=5&&l<6&&(i=c,a=u);const d=n-c/2;this.r=r(255*(i+d)),this.g=r(255*(s+d)),this.b=r(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 i=r(255*n);if(this.r=i,this.g=i,this.b=i,t<=0)return;const s=e/60,a=Math.floor(s),l=s-a,c=r(n*(1-t)*255),u=r(n*(1-t*l)*255),d=r(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=i(e,s);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=i(e,s);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=i(e,((e,t)=>t.includes("%")?r(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,s){if(s!==o){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 t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},3068:(e,t,n)=>{"use strict";n.d(t,{K:()=>o,u:()=>r});let o=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const r={left:[],right:[]}},3072:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,r=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case d:case i:case a:case s:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case r:return t}}}function x(e){return C(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=h,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=r,t.Profiler=a,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||C(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return C(e)===c},t.isContextProvider=function(e){return C(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return C(e)===h},t.isFragment=function(e){return C(e)===i},t.isLazy=function(e){return C(e)===g},t.isMemo=function(e){return C(e)===m},t.isPortal=function(e){return C(e)===r},t.isProfiler=function(e){return C(e)===a},t.isStrictMode=function(e){return C(e)===s},t.isSuspense=function(e){return C(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===a||e===s||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=C},3576:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);const r="undefined"!=typeof window?o.useLayoutEffect:o.useEffect},4076:(e,t,n)=>{"use strict";function o(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>n.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${n} for the full message.`}n.d(t,{A:()=>o})},4146:(e,t,n)=>{"use strict";var o=n(73404),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return o.isMemo(e)?s:a[e.$$typeof]||r}a[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[o.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(f){var r=p(n);r&&r!==f&&e(t,r,o)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;g<s.length;++g){var b=s[g];if(!(i[b]||o&&o[b]||m&&m[b]||a&&a[b])){var v=h(n,b);try{c(t,b,v)}catch(e){}}}}return t}},4894:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=(0,n(28040).A)()},4977:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>h,Dg:()=>p}),n(96540);var o=n(57514),r=n(17437),i=n(74848);function s(e){const{styles:t,defaultTheme:n={}}=e,o="function"==typeof t?e=>{return t(null==(o=e)||0===Object.keys(o).length?n:e);var o}:t;return(0,i.jsx)(r.mL,{styles:o})}var a=n(14921);const l=function({styles:e,themeId:t,defaultTheme:n={}}){const o=(0,a.A)(n),r="function"==typeof e?e(t&&o[t]||o):e;return(0,i.jsx)(s,{styles:r})};var c=n(4894),u=n(31355);const d=function(e){return(0,i.jsx)(l,{...e,defaultTheme:c.A,themeId:u.A})};function h(e){return function(t){return(0,i.jsx)(d,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}function p(){return o.A}},5009:(e,t,n)=>{"use strict";n.d(t,{J6:()=>l,RJ:()=>a,XU:()=>c,oF:()=>u});var o=n(92661),r=n(24349),i=n(65347);const s=(0,o.gz)((e=>e.sorting)),a=(0,o.Mz)(s,(e=>e.sortedRows)),l=(0,o.S)(a,r.rI,r.qj,((e,t,n)=>e.reduce(((e,o)=>{const r=t[o];if(r)e.push({id:o,model:r});else{const t=n[o];t&&(0,i.nF)(t)&&e.push({id:o,model:{[i.gb]:o}})}return e}),[]))),c=(0,o.Mz)(s,(e=>e.sortModel)),u=(0,o.S)(c,(e=>e.reduce(((t,n,o)=>(t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?o+1:void 0},t)),{})));(0,o.S)(a,(e=>e.reduce(((e,t,n)=>(e[t]=n,e)),Object.create(null))))},5544:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(96369),r=n(27800),i=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,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||(0,r.A)(e,t)||(0,i.A)()}},5556:(e,t,n)=>{e.exports=n(2694)()},6481:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(96540),r=n(34164),i=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,i.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:i,value:l,keepMounted:p=!1,...f}=n,m={...n},g=(e=>{const{classes:t,hidden:n}=e,o={root:["root",n&&"hidden"]};return(0,a.A)(o,c,t)})(m),b=(0,u.QM)();if(null===b)throw new TypeError("No TabContext provided");const v=(0,u.eR)(b,l),y=(0,u.vU)(b,l);return(0,d.jsx)(h,{"aria-labelledby":y,className:(0,r.A)(g.root,i),hidden:l!==b.value,id:v,ref:t,role:"tabpanel",ownerState:m,...f,children:(p||l===b.value)&&o})}))},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7193:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ev});var o=n(96540),r=n.t(o,2),i={},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,r=e.children,i=o.useRef(n);i.current=n;var s=o.useState((function(){return{getValue:function(){return i.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},r)},defaultValue:e}}function f(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}),r=o.useContext(null==e?void 0:e.Context),i=r||{},s=i.listeners,d=i.getValue,h=o.useRef();h.current=n(r?d():null==e?void 0:e.defaultValue);var p=o.useState({}),f=(0,a.A)(p,2)[1];return(0,c.A)((function(){if(r)return s.add(e),function(){s.delete(e)};function e(e){var t=n(e);(0,u.A)(h.current,t,!0)||f({})}}),[r]),h.current}var m=n(58168),g=n(8719);function b(){var e=o.createContext(null);function t(){return o.useContext(e)}return{makeImmutable:function(n,r){var i=(0,g.f3)(n),s=function(s,a){var l=i?{ref:a}:{},c=o.useRef(0),u=o.useRef(s);return null!==t()?o.createElement(n,(0,m.A)({},s,l)):(r&&!r(u.current,s)||(c.current+=1),u.current=s,o.createElement(e.Provider,{value:c.current},o.createElement(n,(0,m.A)({},s,l))))};return i?o.forwardRef(s):s},responseImmutable:function(e,n){var r=(0,g.f3)(e),i=function(n,i){var s=r?{ref:i}:{};return t(),o.createElement(e,(0,m.A)({},n,s))};return r?o.memo(o.forwardRef(i),n):o.memo(i,n)},useImmutableMark:t}}var v=b(),y=(v.makeImmutable,v.responseImmutable,v.useImmutableMark,b()),w=y.makeImmutable,C=y.responseImmutable,x=y.useImmutableMark;const S=p();var A=n(82284),E=n(89379),k=n(64467),R=n(46942),M=n.n(R),I=n(28104),P=n(16300),T=n(68210);const O=o.createContext({renderWithProps:!1});function $(e){var t=[],n={};return e.forEach((function(e){for(var o,r=e||{},i=r.key,s=r.dataIndex,a=i||(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 D(e){return null!=e}var N=n(81470);function L(e){var t,n,r,i,s,l,c,d,h=e.component,p=e.children,g=e.ellipsis,b=e.scope,v=e.prefixCls,y=e.className,w=e.align,C=e.record,R=e.render,T=e.dataIndex,$=e.renderIndex,L=e.shouldCellUpdate,H=e.index,z=e.rowType,F=e.colSpan,j=e.rowSpan,B=e.fixLeft,_=e.fixRight,V=e.firstFixLeft,W=e.lastFixLeft,G=e.firstFixRight,K=e.lastFixRight,U=e.appendNode,q=e.additionalProps,X=void 0===q?{}:q,Y=e.isSticky,Q="".concat(v,"-cell"),J=f(S,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Z=J.supportSticky,ee=J.allColumnsFixedLeft,te=J.rowHoverable,ne=function(e,t,n,r,i,s){var l=o.useContext(O),c=x();return(0,I.A)((function(){if(D(r))return[r];var s,a=null==t||""===t?[]:Array.isArray(t)?t:[t],c=(0,P.A)(e,a),u=c,d=void 0;if(i){var h=i(c,e,n);!(s=h)||"object"!==(0,A.A)(s)||Array.isArray(s)||o.isValidElement(s)?u=h:(u=h.children,d=h.props,l.renderWithProps=!0)}return[u,d]}),[c,e,r,t,i,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,T,$,p,R,L),oe=(0,a.A)(ne,2),re=oe[0],ie=oe[1],se={},ae="number"==typeof B&&Z,le="number"==typeof _&&Z;ae&&(se.position="sticky",se.left=B),le&&(se.position="sticky",se.right=_);var ce=null!==(t=null!==(n=null!==(r=null==ie?void 0:ie.colSpan)&&void 0!==r?r:X.colSpan)&&void 0!==n?n:F)&&void 0!==t?t:1,ue=null!==(i=null!==(s=null!==(l=null==ie?void 0:ie.rowSpan)&&void 0!==l?l:X.rowSpan)&&void 0!==s?s:j)&&void 0!==i?i:1,de=function(e,t){return f(S,(function(n){var o,r,i,s;return[(o=e,r=t||1,i=n.hoverStartRow,s=n.hoverEndRow,o<=s&&o+r-1>=i),n.onHover]}))}(H,ue),he=(0,a.A)(de,2),pe=he[0],fe=he[1],me=(0,N._q)((function(e){var t;C&&fe(H,H+ue-1),null==X||null===(t=X.onMouseEnter)||void 0===t||t.call(X,e)})),ge=(0,N._q)((function(e){var t;C&&fe(-1,-1),null==X||null===(t=X.onMouseLeave)||void 0===t||t.call(X,e)}));if(0===ce||0===ue)return null;var be=null!==(c=X.title)&&void 0!==c?c:function(e){var t,n=e.ellipsis,r=e.rowType,i=e.children,s=!0===n?{showTitle:!0}:n;return s&&(s.showTitle||"header"===r)&&("string"==typeof i||"number"==typeof i?t=i.toString():o.isValidElement(i)&&"string"==typeof i.props.children&&(t=i.props.children)),t}({rowType:z,ellipsis:g,children:re}),ve=M()(Q,y,(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"),V&&Z),"".concat(Q,"-fix-left-last"),W&&Z),"".concat(Q,"-fix-left-all"),W&&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"),g),"".concat(Q,"-with-append"),U),"".concat(Q,"-fix-sticky"),(ae||le)&&Y&&Z),(0,k.A)(d,"".concat(Q,"-row-hover"),!ie&&pe)),X.className,null==ie?void 0:ie.className),ye={};w&&(ye.textAlign=w);var we=(0,E.A)((0,E.A)((0,E.A)((0,E.A)({},null==ie?void 0:ie.style),se),ye),X.style),Ce=re;return"object"!==(0,A.A)(Ce)||Array.isArray(Ce)||o.isValidElement(Ce)||(Ce=null),g&&(W||G)&&(Ce=o.createElement("span",{className:"".concat(Q,"-content")},Ce)),o.createElement(h,(0,m.A)({},ie,X,{className:ve,style:we,title:be,scope:b,onMouseEnter:te?me:void 0,onMouseLeave:te?ge:void 0,colSpan:1!==ce?ce:null,rowSpan:1!==ue?ue:null}),U,Ce)}const H=o.memo(L);function z(e,t,n,o,r){var i,s,a=n[e]||{},l=n[t]||{};"left"===a.fixed?i=o.left["rtl"===r?t:e]:"right"===l.fixed&&(s=o.right["rtl"===r?e:t]);var c=!1,u=!1,d=!1,h=!1,p=n[t+1],f=n[e-1],m=p&&!p.fixed||f&&!f.fixed||n.every((function(e){return"left"===e.fixed}));return"rtl"===r?void 0!==i?h=!(f&&"left"===f.fixed)&&m:void 0!==s&&(d=!(p&&"right"===p.fixed)&&m):void 0!==i?c=!(p&&"left"===p.fixed)&&m:void 0!==s&&(u=!(f&&"right"===f.fixed)&&m),{fixLeft:i,fixRight:s,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:h,isSticky:o.isSticky}}const F=o.createContext({});var j=n(80045),B=["children"];function _(e){return e.children}_.Row=function(e){var t=e.children,n=(0,j.A)(e,B);return o.createElement("tr",n,t)},_.Cell=function(e){var t=e.className,n=e.index,r=e.children,i=e.colSpan,s=void 0===i?1:i,a=e.rowSpan,l=e.align,c=f(S,["prefixCls","direction"]),u=c.prefixCls,d=c.direction,h=o.useContext(F),p=h.scrollColumnIndex,g=h.stickyOffsets,b=n+s-1+1===p?s+1:s,v=z(n,n+b-1,h.flattenColumns,g,d);return o.createElement(H,(0,m.A)({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,align:l,colSpan:b,rowSpan:a,render:function(){return r}},v))};const V=_,W=C((function(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,i=f(S,"prefixCls"),s=r.length-1,a=r[s],l=o.useMemo((function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:null!=a&&a.scrollbar?s:null}}),[a,r,s,n]);return o.createElement(F.Provider,{value:l},o.createElement("tfoot",{className:"".concat(i,"-summary")},t))}));var G=V,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),X=o.createContext(null),Y=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 r=o[n];e.call(t,r[1],r[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 r(){t&&(t=!1,e()),n&&s()}function i(){Z(r)}function s(){var e=Date.now();if(t){if(e-o<2)return;n=!0}else t=!0,n=!1,setTimeout(i,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 r=o[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},re=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||J},ie=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 re(e).SVGGraphicsElement}:function(e){return e instanceof re(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 ie;var o=re(e).getComputedStyle(e),r=function(e){for(var t={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var r=o[n],i=e["padding-"+r];t[r]=se(i)}return t}(o),i=r.left+r.right,s=r.top+r.bottom,a=se(o.width),l=se(o.height);if("border-box"===o.boxSizing&&(Math.round(a+i)!==t&&(a-=ae(o,"left","right")+i),Math.round(l+s)!==n&&(l-=ae(o,"top","bottom")+s)),!function(e){return e===re(e).document.documentElement}(e)){var c=Math.round(a+i)-t,u=Math.round(l+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(u)&&(l-=u)}return ue(r.left,r.top,a,l)}(e):ie}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,r,i,s,a,l,c=(o=(n=t).x,r=n.y,i=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),oe(l,{x:o,y:r,width:i,height:s,top:r,right:o+i,bottom:s+r,left:o}),l);oe(this,{target:e,contentRect:c})},pe=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Y,"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 re(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 re(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}(),fe="undefined"!=typeof WeakMap?new WeakMap:new Y,me=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);fe.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){me.prototype[e]=function(){var t;return(t=fe.get(this))[e].apply(t,arguments)}}));const ge=void 0!==J.ResizeObserver?J.ResizeObserver:me;var be=new Map,ve=new ge((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)}))}))})),ye=n(23029),we=n(92901),Ce=n(85501),xe=n(49640),Se=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(){return(0,ye.A)(this,n),t.apply(this,arguments)}return(0,we.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(o.Component);function Ae(e,t){var n=e.children,r=e.disabled,i=o.useRef(null),s=o.useRef(null),a=o.useContext(X),l="function"==typeof n,c=l?n(i):n,u=o.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!l&&o.isValidElement(c)&&(0,g.f3)(c),h=d?(0,g.A9)(c):null,p=(0,g.xK)(h,i),f=function(){var e;return(0,q.Ay)(i.current)||(i.current&&"object"===(0,A.A)(i.current)?(0,q.Ay)(null===(e=i.current)||void 0===e?void 0:e.nativeElement):null)||(0,q.Ay)(s.current)};o.useImperativeHandle(t,(function(){return f()}));var m=o.useRef(e);m.current=e;var b=o.useCallback((function(e){var t=m.current,n=t.onResize,o=t.data,r=e.getBoundingClientRect(),i=r.width,s=r.height,l=e.offsetWidth,c=e.offsetHeight,d=Math.floor(i),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 f=l===Math.round(i)?i:l,g=c===Math.round(s)?s:c,b=(0,E.A)((0,E.A)({},p),{},{offsetWidth:f,offsetHeight:g});null==a||a(b,e,o),n&&Promise.resolve().then((function(){n(b,e)}))}}),[]);return o.useEffect((function(){var e,t,n=f();return n&&!r&&(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)}}),[i.current,r]),o.createElement(Se,{ref:s},d?o.cloneElement(c,{ref:p}):c)}const Ee=o.forwardRef(Ae);function ke(e,t){var n=e.children;return("function"==typeof n?[n]:U(n)).map((function(n,r){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(r);return o.createElement(Ee,(0,m.A)({},e,{key:i,ref:0===r?t:void 0}),n)}))}var Re=o.forwardRef(ke);Re.Collection=function(e){var t=e.children,n=e.onBatchResize,r=o.useRef(0),i=o.useRef([]),s=o.useContext(X),a=o.useCallback((function(e,t,o){r.current+=1;var a=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then((function(){a===r.current&&(null==n||n(i.current),i.current=[])})),null==s||s(e,t,o)}),[n,s]);return o.createElement(X.Provider,{value:a},t)};const Me=Re;var Ie=n(20998),Pe=function(e){if((0,Ie.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 Te,Oe=n(34552);function $e(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var o,r,i=n.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var s=getComputedStyle(e);i.scrollbarColor=s.scrollbarColor,i.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,r=c}}document.body.appendChild(n);var h=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,p=e&&r&&!isNaN(r)?r:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),(0,Oe.m6)(t),{width:h,height:p}}function De(e){return"undefined"==typeof document?0:((e||void 0===Te)&&(Te=$e()),Te.width)}function Ne(e){return"undefined"!=typeof document&&e&&e instanceof Element?$e(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 He(e,t){return 0===e.indexOf(t)}function ze(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,E.A)({},n);var o={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||He(n,"aria-"))||t.data&&He(n,"data-")||t.attr&&Le.includes(n))&&(o[n]=e[n])})),o}function Fe(e,t,n,o,r,i,s){var a=i(t,s);e.push({record:t,indent:n,index:s,rowKey:a});var l=null==r?void 0:r.has(a);if(t&&Array.isArray(t[o])&&l)for(var c=0;c<t[o].length;c+=1)Fe(e,t[o][c],n+1,o,r,i,c)}function je(e,t,n,r){return o.useMemo((function(){if(null!=n&&n.size){for(var o=[],i=0;i<(null==e?void 0:e.length);i+=1)Fe(o,e[i],0,t,n,r,i);return o}return null==e?void 0:e.map((function(e,t){return{record:e,indent:0,index:t,rowKey:r(e,t)}}))}),[e,t,n,r])}function Be(e,t,n,o){var r,i=f(S,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),s=i.flattenColumns,a=i.expandableType,l=i.expandedKeys,c=i.childrenColumnName,u=i.onTriggerExpand,d=i.rowExpandable,h=i.onRow,p=i.expandRowByClick,m=i.rowClassName,g="nest"===a,b="row"===a&&(!d||d(e)),v=b||g,y=l&&l.has(t),w=c&&e&&e[c],C=(0,N._q)(u),x=null==h?void 0:h(e,n),A=null==x?void 0:x.onClick;"string"==typeof m?r=m:"function"==typeof m&&(r=m(e,n,o));var k=$(s);return(0,E.A)((0,E.A)({},i),{},{columnsKey:k,nestExpandable:g,expanded:y,hasNestChildren:w,record:e,onTriggerExpand:C,rowSupportExpand:b,expandable:v,rowProps:(0,E.A)((0,E.A)({},x),{},{className:M()(r,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),r=1;r<n;r++)o[r-1]=arguments[r];null==A||A.apply(void 0,[t].concat(o))}})})}const _e=function(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,s=e.className,a=e.expanded,l=e.colSpan,c=e.isEmpty,u=e.stickyOffset,d=void 0===u?0:u,h=f(S,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),p=h.scrollbarSize,m=h.fixHeader,g=h.fixColumn,b=h.componentWidth,v=h.horizonScroll,y=n;return(c?v&&b:g)&&(y=o.createElement("div",{style:{width:b-d-(m&&!c?p:0),position:"sticky",left:d,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},y)),o.createElement(r,{className:s,style:{display:a?null:"none"}},o.createElement(H,{component:i,prefixCls:t,colSpan:l},y))};function Ve(e){var t=e.prefixCls,n=e.record,r=e.onExpand,i=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"),i),"".concat(t,"-row-collapsed"),!i)),onClick:function(e){r(n,e),e.stopPropagation()}}):o.createElement("span",{className:M()(a,"".concat(t,"-row-spaced"))})}function We(e,t,n,o){return"string"==typeof e?e:"function"==typeof e?e(t,n,o):""}function Ge(e,t,n,r,i){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,f=e.expandIconColumnIndex,m=e.nestExpandable,g=e.indentSize,b=e.expandIcon,v=e.expanded,y=e.hasNestChildren,w=e.onTriggerExpand,C=e.expandable,x=e.expandedKeys,S=h[n],A=p[n];n===(f||0)&&m&&(a=o.createElement(o.Fragment,null,o.createElement("span",{style:{paddingLeft:"".concat(g*r,"px")},className:"".concat(d,"-row-indent indent-level-").concat(r)}),b({prefixCls:d,expanded:v,expandable:y,record:u,onExpand:w})));var E=(null===(s=t.onCell)||void 0===s?void 0:s.call(t,u,i))||{};if(c){var k=E.rowSpan,R=void 0===k?1:k;if(C&&R&&n<c){for(var M=R,I=i;I<i+R;I+=1){var P=l[I];x.has(P)&&(M+=1)}E.rowSpan=M}}return{key:S,fixedInfo:A,appendCellNode:a,additionalCellProps:E}}const Ke=C((function(e){var t=e.className,n=e.style,r=e.record,i=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,f=e.expandedRowInfo,g=Be(r,a,i,u),b=g.prefixCls,v=g.flattenColumns,y=g.expandedRowClassName,w=g.expandedRowRender,C=g.rowProps,x=g.expanded,S=g.rowSupportExpand,A=o.useRef(!1);A.current||(A.current=x);var R,I=We(y,r,i,u),P=o.createElement(d,(0,m.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)({},I,u>=1)),style:(0,E.A)((0,E.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(g,e,t,u,i,l,null==f?void 0:f.offset),v=d.key,y=d.fixedInfo,w=d.appendCellNode,C=d.additionalCellProps;return o.createElement(H,(0,m.A)({className:c,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:h,prefixCls:b,key:v,record:r,index:i,renderIndex:s,dataIndex:a,render:n,shouldCellUpdate:e.shouldCellUpdate},y,{appendNode:w,additionalProps:C}))})));if(S&&(A.current||x)){var T=w(r,i,u+1,x);R=o.createElement(_e,{expanded:x,className:M()("".concat(b,"-expanded-row"),"".concat(b,"-expanded-row-level-").concat(u+1),I),prefixCls:b,component:d,cellComponent:h,colSpan:f?f.colSpan:v.length,stickyOffset:null==f?void 0:f.sticky,isEmpty:!1},T)}return o.createElement(o.Fragment,null,P,R)}));function Ue(e){var t=e.columnKey,n=e.onColumnResize,r=o.useRef();return(0,c.A)((function(){r.current&&n(t,r.current.offsetWidth)}),[]),o.createElement(Me,{data:t},o.createElement("td",{ref:r,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 r=e.getBoundingClientRect(),i=r.width,s=r.height;if(i||s)return!0}}return!1};function Xe(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize,i=o.useRef(null);return o.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},ref:i},o.createElement(Me.Collection,{onBatchResize:function(e){qe(i.current)&&e.forEach((function(e){var t=e.data,n=e.size;r(t,n.offsetWidth)}))}},n.map((function(e){return o.createElement(Ue,{key:e,columnKey:e,onColumnResize:r})}))))}const Ye=C((function(e){var t,n=e.data,r=e.measureColumnWidth,i=f(S,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),s=i.prefixCls,a=i.getComponent,l=i.onColumnResize,c=i.flattenColumns,u=i.getRowKey,d=i.expandedKeys,h=i.childrenColumnName,p=i.emptyNode,m=i.expandedRowOffset,g=void 0===m?0:m,b=i.colWidths,v=je(n,h,d,u),y=o.useMemo((function(){return v.map((function(e){return e.rowKey}))}),[v]),w=o.useRef({renderWithProps:!1}),C=o.useMemo((function(){for(var e=c.length-g,t=0,n=0;n<g;n+=1)t+=b[n]||0;return{offset:g,colSpan:e,sticky:t}}),[c.length,g,b]),x=a(["body","wrapper"],"tbody"),A=a(["body","row"],"tr"),E=a(["body","cell"],"td"),k=a(["body","cell"],"th");t=n.length?v.map((function(e,t){var n=e.record,r=e.indent,i=e.index,s=e.rowKey;return o.createElement(Ke,{key:s,rowKey:s,rowKeys:y,record:n,index:t,renderIndex:i,rowComponent:A,cellComponent:E,scopeCellComponent:k,indent:r,expandedRowInfo:C})})):o.createElement(_e,{expanded:!0,className:"".concat(s,"-placeholder"),prefixCls:s,component:A,cellComponent:E,colSpan:c.length,isEmpty:!0},p);var R=$(c);return o.createElement(O.Provider,{value:w.current},o.createElement(x,{className:"".concat(s,"-tbody")},r&&o.createElement(Xe,{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,r=e.columCount,i=f(S,["tableLayout"]).tableLayout,s=[],a=!1,l=(r||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"===i&&(h=u.minWidth)),c||h||d||a){var p=d||{},g=(p.columnType,(0,j.A)(p,Ze));s.unshift(o.createElement("col",(0,m.A)({key:l,style:{width:c,minWidth:h}},g))),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,r=e.noData,i=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,m=e.stickyClassName,b=e.onScroll,v=e.maxContentScroll,y=e.children,w=(0,j.A)(e,nt),C=f(S,["prefixCls","scrollbarSize","isSticky","getComponent"]),x=C.prefixCls,A=C.scrollbarSize,R=C.isSticky,I=(0,C.getComponent)(["header","table"],"table"),P=R&&!d?0:A,T=o.useRef(null),O=o.useCallback((function(e){(0,g.Xf)(t,e),(0,g.Xf)(T,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=T.current;return null==t||t.addEventListener("wheel",e,{passive:!1}),function(){null==t||t.removeEventListener("wheel",e)}}),[]);var $=o.useMemo((function(){return s.every((function(e){return e.width}))}),[s]),D=s[s.length-1],N={fixed:D?D.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(x,"-cell-scrollbar")}}},L=(0,o.useMemo)((function(){return P?[].concat((0,tt.A)(i),[N]):i}),[P,i]),H=(0,o.useMemo)((function(){return P?[].concat((0,tt.A)(s),[N]):s}),[P,s]),z=(0,o.useMemo)((function(){var e=c.right,t=c.left;return(0,E.A)((0,E.A)({},c),{},{left:"rtl"===u?[].concat((0,tt.A)(t.map((function(e){return e+P}))),[0]):t,right:"rtl"===u?e:[].concat((0,tt.A)(e.map((function(e){return e+P}))),[0]),isSticky:R})}),[P,c,R]),F=function(e,t){return(0,o.useMemo)((function(){for(var n=[],o=0;o<t;o+=1){var r=e[o];if(void 0===r)return null;n[o]=r}return n}),[e.join("_"),t])}(a,l);return o.createElement("div",{style:(0,E.A)({overflow:"hidden"},R?{top:h,bottom:p}:{}),ref:O,className:M()(n,(0,k.A)({},m,!!m))},o.createElement(I,{style:{tableLayout:"fixed",visibility:r||F?null:"hidden"}},(!r||!v||$)&&o.createElement(et,{colWidths:F?[].concat((0,tt.A)(F),[P]):[],columCount:l+1,columns:H}),y((0,E.A)((0,E.A)({},w),{},{stickyOffsets:z,columns:L,flattenColumns:H}))))}));const rt=o.memo(ot),it=function(e){var t,n=e.cells,r=e.stickyOffsets,i=e.flattenColumns,s=e.rowComponent,a=e.cellComponent,l=e.onHeaderRow,c=e.index,u=f(S,["prefixCls","direction"]),d=u.prefixCls,h=u.direction;l&&(t=l(n.map((function(e){return e.column})),c));var p=$(n.map((function(e){return e.column})));return o.createElement(s,t,n.map((function(e,t){var n,s=e.column,l=z(e.colStart,e.colEnd,i,r,h);return s&&s.onHeaderCell&&(n=e.column.onHeaderCell(s)),o.createElement(H,(0,m.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,r=e.flattenColumns,i=e.onHeaderRow,s=f(S,["prefixCls","getComponent"]),a=s.prefixCls,l=s.getComponent,c=o.useMemo((function(){return function(e){var t=[];!function e(n,o){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[r]=t[r]||[];var i=o;return n.filter(Boolean).map((function(n){var o={key:n.key,className:n.className||"",children:n.title,column:n,colStart:i},s=1,a=n.children;return a&&a.length>0&&(s=e(a,i,r+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[r].push(o),i+=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)}))},r=0;r<n;r+=1)o(r);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(it,{key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:d,cellComponent:h,onHeaderRow:i,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,r=(0,j.A)(n,lt),i=(0,E.A)({key:t},r);return o&&(i.children=ut(o)),i}))}function dt(e){return e.filter((function(e){return e&&"object"===(0,A.A)(e)&&!e.hidden})).map((function(e){var t=e.children;return t&&t.length>0?(0,E.A)((0,E.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,A.A)(e)})).reduce((function(e,n,o){var r=n.fixed,i=!0===r?"left":r,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,E.A)({fixed:i},e)})))):[].concat((0,tt.A)(e),[(0,E.A)((0,E.A)({key:s},n),{},{fixed:i})])}),[])}const pt=function(e,t){var n=e.prefixCls,r=e.columns,s=e.children,l=e.expandable,c=e.expandedKeys,u=e.columnTitle,d=e.getRowKey,h=e.onTriggerExpand,p=e.expandIcon,f=e.rowExpandable,m=e.expandIconColumnIndex,g=e.expandedRowOffset,b=void 0===g?0:g,v=e.direction,y=e.expandRowByClick,w=e.columnWidth,C=e.fixed,x=e.scrollWidth,S=e.clientWidth,A=o.useMemo((function(){return dt((r||ut(s)||[]).slice())}),[r,s]),R=o.useMemo((function(){if(l){var e=A.slice();if(!e.includes(i)){var t=m||0;t>=0&&(t||"left"===C||!C)&&e.splice(t,0,i),"right"===C&&e.splice(A.length,0,i)}var r=e.indexOf(i);e=e.filter((function(e,t){return e!==i||t===r}));var s,a=A[r];s=C||(a?a.fixed:null);var g=(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",w),"render",(function(e,t,r){var i=d(t,r),s=c.has(i),a=!f||f(t),l=p({prefixCls:n,expanded:s,expandable:a,record:t,onExpand:h});return y?o.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l}));return e.map((function(e,t){var n=e===i?g:e;return t<b?(0,E.A)((0,E.A)({},n),{},{fixed:n.fixed||"left"}):n}))}return A.filter((function(e){return e!==i}))}),[l,A,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]),I=o.useMemo((function(){return"rtl"===v?function(e){return e.map((function(e){var t=e.fixed,n=(0,j.A)(e,ct),o=t;return"left"===t?o="right":"right"===t&&(o="left"),(0,E.A)({fixed:o},n)}))}(ht(M)):ht(M)}),[M,v,x]),P=o.useMemo((function(){for(var e=-1,t=I.length-1;t>=0;t-=1){var n=I[t].fixed;if("left"===n||!0===n){e=t;break}}if(e>=0)for(var o=0;o<=e;o+=1){var r=I[o].fixed;if("left"!==r&&!0!==r)return!0}var i=I.findIndex((function(e){return"right"===e.fixed}));if(i>=0)for(var s=i;s<I.length;s+=1)if("right"!==I[s].fixed)return!0;return!1}),[I]),T=function(e,t,n){return o.useMemo((function(){if(t&&t>0){var o=0,r=0;e.forEach((function(e){var n=at(t,e.width);n?o+=n:r+=1}));var i=Math.max(t,n),s=Math.max(i-o,r),a=r,l=s/r,c=0,u=e.map((function(e){var n=(0,E.A)({},e),o=at(t,n.width);if(o)n.width=o;else{var r=Math.floor(l);n.width=1===a?s:r,s-=r,a-=1}return c+=n.width,n}));if(c<i){var d=i/c;s=i,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,i)]}return[e,t]}),[e,t,n])}(I,x,S),O=(0,a.A)(T,2),$=O[0],D=O[1];return[M,$,D,P]};var ft=(0,Ie.A)()?window:null;const mt=function(e){var t=e.className,n=e.children;return o.createElement("div",{className:t},n)};function gt(e,t,n,o){var r=d.unstable_batchedUpdates?function(e){d.unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,r,o),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,r,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 yt=function(e,t){var n,r,i,s,l,c,u,d,h=e.scrollBodyRef,p=e.onScroll,m=e.offsetScroll,g=e.container,b=e.direction,v=f(S,"prefixCls"),y=(null===(n=h.current)||void 0===n?void 0:n.scrollWidth)||0,w=(null===(r=h.current)||void 0===r?void 0:r.clientWidth)||0,C=y&&w*(w/y),x=o.useRef(),A=(i={scrollLeft:0,isHiddenScrollBar:!0},s=(0,o.useRef)(i),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)(A,2),I=R[0],P=R[1],T=o.useRef({delta:0,x:0}),O=o.useState(!1),$=(0,a.A)(O,2),D=$[0],N=$[1],L=o.useRef(null);o.useEffect((function(){return function(){bt.A.cancel(L.current)}}),[]);var H=function(){N(!1)},z=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(D&&0!==n){var o=T.current.x+e.pageX-T.current.x-T.current.delta,r="rtl"===b;o=Math.max(r?C-w:0,Math.min(r?0:w-C,o)),(!r||Math.abs(o)+Math.abs(C)<w)&&(p({scrollLeft:o/w*(y+2)}),T.current.x=e.pageX)}else D&&N(!1)},F=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=g===window?document.documentElement.scrollTop+window.innerHeight:vt(g).top+g.clientHeight;t-De()<=n||e>=n-m?P((function(e){return(0,E.A)((0,E.A)({},e),{},{isHiddenScrollBar:!0})})):P((function(e){return(0,E.A)((0,E.A)({},e),{},{isHiddenScrollBar:!1})}))}}))},j=function(e){P((function(t){return(0,E.A)((0,E.A)({},t),{},{scrollLeft:e/y*w||0})}))};return o.useImperativeHandle(t,(function(){return{setScrollLeft:j,checkScrollBarVisible:F}})),o.useEffect((function(){var e=gt(document.body,"mouseup",H,!1),t=gt(document.body,"mousemove",z,!1);return F(),function(){e.remove(),t.remove()}}),[C,D]),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",F,!1)})),window.addEventListener("resize",F,!1),window.addEventListener("scroll",F,!1),g.addEventListener("scroll",F,!1),function(){e.forEach((function(e){return e.removeEventListener("scroll",F)})),window.removeEventListener("resize",F),window.removeEventListener("scroll",F),g.removeEventListener("scroll",F)}}}),[g]),o.useEffect((function(){I.isHiddenScrollBar||P((function(e){var t=h.current;return t?(0,E.A)((0,E.A)({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e}))}),[I.isHiddenScrollBar]),y<=w||!C||I.isHiddenScrollBar?null:o.createElement("div",{style:{height:De(),width:w,bottom:m},className:"".concat(v,"-sticky-scroll")},o.createElement("div",{onMouseDown:function(e){e.persist(),T.current.delta=e.pageX-I.scrollLeft,T.current.x=0,N(!0),e.preventDefault()},ref:x,className:M()("".concat(v,"-sticky-scroll-bar"),(0,k.A)({},"".concat(v,"-sticky-scroll-bar-active"),D)),style:{width:"".concat(C,"px"),transform:"translate3d(".concat(I.scrollLeft,"px, 0, 0)")}}))};const wt=o.forwardRef(yt);var Ct="rc-table",xt=[],St={};function At(){return"No Data"}function Et(e,t){var n=(0,E.A)({rowKey:"key",prefixCls:Ct,emptyText:At},e),r=n.prefixCls,i=n.className,d=n.rowClassName,h=n.style,p=n.data,f=n.rowKey,g=n.scroll,b=n.tableLayout,v=n.direction,y=n.title,w=n.footer,C=n.summary,x=n.caption,R=n.id,T=n.showHeader,O=n.components,N=n.emptyText,L=n.onRow,H=n.onHeaderRow,F=n.onScroll,B=n.internalHooks,_=n.transformColumns,G=n.internalRefs,K=n.tailor,U=n.getContainerWidth,X=n.sticky,Y=n.rowHoverable,Q=void 0===Y||Y,J=p||xt,Z=!!J.length,ee=B===s,te=o.useCallback((function(e,t){return(0,P.A)(O,e)||t}),[O]),ne=o.useMemo((function(){return"function"==typeof f?f:function(e){return e&&e[f]}}),[f]),oe=te(["body"]),re=function(){var e=o.useState(-1),t=(0,a.A)(e,2),n=t[0],r=t[1],i=o.useState(-1),s=(0,a.A)(i,2),l=s[0],c=s[1];return[n,l,o.useCallback((function(e,t){r(e),c(t)}),[])]}(),ie=(0,a.A)(re,3),se=ie[0],ae=ie[1],le=ie[2],ce=function(e,t,n){var r=function(e){var t,n=e.expandable,o=(0,j.A)(e,Qe);return!1===(t="expandable"in e?(0,E.A)((0,E.A)({},o),n):o).showExpandColumn&&(t.expandIconColumnIndex=-1),t}(e),i=r.expandIcon,l=r.expandedRowKeys,c=r.defaultExpandedRowKeys,u=r.defaultExpandAllRows,d=r.expandedRowRender,h=r.onExpand,p=r.onExpandedRowsChange,f=i||Ve,m=r.childrenColumnName||"children",g=o.useMemo((function(){return d?"row":!!(e.expandable&&e.internalHooks===s&&e.expandable.__PARENT_RENDER_ICON__||t.some((function(e){return e&&"object"===(0,A.A)(e)&&e[m]})))&&"nest"}),[!!d,t]),b=o.useState((function(){return c||(u?function(e,t,n){var o=[];return function e(r){(r||[]).forEach((function(r,i){o.push(t(r,i)),e(r[n])}))}(e),o}(t,n,m):[])})),v=(0,a.A)(b,2),y=v[0],w=v[1],C=o.useMemo((function(){return new Set(l||y||[])}),[l,y]),x=o.useCallback((function(e){var o,r=n(e,t.indexOf(e)),i=C.has(r);i?(C.delete(r),o=(0,tt.A)(C)):o=[].concat((0,tt.A)(C),[r]),w(o),h&&h(!i,e),p&&p(o)}),[n,C,t,h,p]);return[r,g,C,f,m,x]}(n,J,ne),ue=(0,a.A)(ce,6),de=ue[0],he=ue[1],pe=ue[2],fe=ue[3],me=ue[4],ge=ue[5],be=null==g?void 0:g.x,ve=o.useState(0),ye=(0,a.A)(ve,2),we=ye[0],Ce=ye[1],xe=pt((0,E.A)((0,E.A)((0,E.A)({},n),de),{},{expandable:!!de.expandedRowRender,columnTitle:de.columnTitle,expandedKeys:pe,getRowKey:ne,onTriggerExpand:ge,expandIcon:fe,expandIconColumnIndex:de.expandIconColumnIndex,direction:v,scrollWidth:ee&&K&&"number"==typeof be?be:null,clientWidth:we}),ee?_:null),Se=(0,a.A)(xe,4),Ae=Se[0],Ee=Se[1],ke=Se[2],Re=Se[3],Ie=null!=ke?ke:be,Te=o.useMemo((function(){return{columns:Ae,flattenColumns:Ee}}),[Ae,Ee]),Oe=o.useRef(),$e=o.useRef(),De=o.useRef(),Le=o.useRef();o.useImperativeHandle(t,(function(){return{nativeElement:Oe.current,scrollTo:function(e){var t,n;if(De.current instanceof HTMLElement){var o=e.index,r=e.top,i=e.key;if("number"!=typeof(n=r)||Number.isNaN(n)){var s,a=null!=i?i:ne(J[o]);null===(s=De.current.querySelector('[data-row-key="'.concat(a,'"]')))||void 0===s||s.scrollIntoView()}else{var l;null===(l=De.current)||void 0===l||l.scrollTo({top:r})}}else null!==(t=De.current)&&void 0!==t&&t.scrollTo&&De.current.scrollTo(e)}}}));var He,Fe,je,Be=o.useRef(),_e=o.useState(!1),We=(0,a.A)(_e,2),Ge=We[0],Ke=We[1],Ue=o.useState(!1),qe=(0,a.A)(Ue,2),Xe=qe[0],Je=qe[1],Ze=o.useState(new Map),nt=(0,a.A)(Ze,2),ot=nt[0],it=nt[1],at=$(Ee).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,r=function(n,o,r){for(var i=[],s=0,a=n;a!==o;a+=r)i.push(s),t[a].fixed&&(s+=e[a]||0);return i},i=r(0,o,1),s=r(o-1,-1,-1).reverse();return"rtl"===n?{left:s,right:i}:{left:i,right:s}}),[e,t,n])}(lt,Ee,v),ut=g&&D(g.y),dt=g&&D(Ie)||Boolean(de.fixed),ht=dt&&Ee.some((function(e){return e.fixed})),gt=o.useRef(),bt=function(e,t){var n="object"===(0,A.A)(e)?e:{},r=n.offsetHeader,i=void 0===r?0:r,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 ft}:u)()||ft,h=!!e;return o.useMemo((function(){return{isSticky:h,stickyClassName:h?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:a,offsetScroll:c,container:d}}),[h,c,i,a,t,d])}(X,r),vt=bt.isSticky,yt=bt.offsetHeader,Et=bt.offsetSummary,kt=bt.offsetScroll,Rt=bt.stickyClassName,Mt=bt.container,It=o.useMemo((function(){return null==C?void 0:C(J)}),[C,J]),Pt=(ut||vt)&&o.isValidElement(It)&&It.type===V&&It.props.fixed;ut&&(Fe={overflowY:Z?"scroll":"auto",maxHeight:g.y}),dt&&(He={overflowX:"auto"},ut||(Fe={overflowY:"hidden"}),je={width:!0===Ie?"auto":Ie,minWidth:"100%"});var Tt=o.useCallback((function(e,t){it((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}]}(),$t=(0,a.A)(Ot,2),Dt=$t[0],Nt=$t[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 Ht=(0,l.A)((function(e){var t,n=e.currentTarget,o=e.scrollLeft,r="rtl"===v,i="number"==typeof o?o:n.scrollLeft,s=n||St;Nt()&&Nt()!==s||(Dt(s),Lt(i,$e.current),Lt(i,De.current),Lt(i,Be.current),Lt(i,null===(t=gt.current)||void 0===t?void 0:t.setScrollLeft));var a=n||$e.current;if(a){var l=ee&&K&&"number"==typeof Ie?Ie:a.scrollWidth,c=a.clientWidth;if(l===c)return Ke(!1),void Je(!1);r?(Ke(-i<l-c),Je(-i>0)):(Ke(i>0),Je(i<l-c))}})),zt=(0,l.A)((function(e){Ht(e),null==F||F(e)})),Ft=function(){var e;dt&&De.current?Ht({currentTarget:(0,q.rb)(De.current),scrollLeft:null===(e=De.current)||void 0===e?void 0:e.scrollLeft}):(Ke(!1),Je(!1))},jt=o.useRef(!1);o.useEffect((function(){jt.current&&Ft()}),[dt,p,Ae.length]),o.useEffect((function(){jt.current=!0}),[]);var Bt=o.useState(0),_t=(0,a.A)(Bt,2),Vt=_t[0],Wt=_t[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||(De.current instanceof Element?Wt(Ne(De.current).width):Wt(Ne(Le.current).width)),qt((e="position",t="sticky",Array.isArray(e)||void 0===t?Pe(e):function(e,t){if(!Pe(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=De.current)}));var Xt,Yt=o.useCallback((function(e){return o.createElement(o.Fragment,null,o.createElement(st,e),"top"===Pt&&o.createElement(W,e,It))}),[Pt,It]),Qt=o.useCallback((function(e){return o.createElement(W,e,It)}),[It]),Jt=te(["table"],"table"),Zt=o.useMemo((function(){return b||(ht?"max-content"===Ie?"auto":"fixed":ut||vt||Ee.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[ut,ht,Ee,b,vt]),en={colWidths:lt,columCount:Ee.length,stickyOffsets:ct,onHeaderRow:H,fixHeader:ut,scroll:g},tn=o.useMemo((function(){return Z?null:"function"==typeof N?N():N}),[Z,N]),nn=o.createElement(Ye,{data:J,measureColumnWidth:ut||dt||vt}),on=o.createElement(et,{colWidths:Ee.map((function(e){return e.width})),columns:Ee}),rn=null!=x?o.createElement("caption",{className:"".concat(r,"-caption")},x):void 0,sn=ze(n,{data:!0}),an=ze(n,{aria:!0});if(ut||vt){var ln;"function"==typeof oe?(ln=oe(J,{scrollbarSize:Vt,ref:De,onScroll:Ht}),en.colWidths=Ee.map((function(e,t){var n=e.width,o=t===Ee.length-1?n-Vt:n;return"number"!=typeof o||Number.isNaN(o)?0:o}))):ln=o.createElement("div",{style:(0,E.A)((0,E.A)({},He),Fe),onScroll:zt,ref:De,className:M()("".concat(r,"-body"))},o.createElement(Jt,(0,m.A)({style:(0,E.A)((0,E.A)({},je),{},{tableLayout:Zt})},an),rn,on,nn,!Pt&&It&&o.createElement(W,{stickyOffsets:ct,flattenColumns:Ee},It)));var cn=(0,E.A)((0,E.A)((0,E.A)({noData:!J.length,maxContentScroll:dt&&"max-content"===Ie},en),Te),{},{direction:v,stickyClassName:Rt,onScroll:Ht});Xt=o.createElement(o.Fragment,null,!1!==T&&o.createElement(rt,(0,m.A)({},cn,{stickyTopOffset:yt,className:"".concat(r,"-header"),ref:$e}),Yt),ln,Pt&&"top"!==Pt&&o.createElement(rt,(0,m.A)({},cn,{stickyBottomOffset:Et,className:"".concat(r,"-summary"),ref:Be}),Qt),vt&&De.current&&De.current instanceof Element&&o.createElement(wt,{ref:gt,offsetScroll:kt,scrollBodyRef:De,onScroll:Ht,container:Mt,direction:v}))}else Xt=o.createElement("div",{style:(0,E.A)((0,E.A)({},He),Fe),className:M()("".concat(r,"-content")),onScroll:Ht,ref:De},o.createElement(Jt,(0,m.A)({style:(0,E.A)((0,E.A)({},je),{},{tableLayout:Zt})},an),rn,on,!1!==T&&o.createElement(st,(0,m.A)({},en,Te)),nn,It&&o.createElement(W,{stickyOffsets:ct,flattenColumns:Ee},It)));var un=o.createElement("div",(0,m.A)({className:M()(r,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)({},"".concat(r,"-rtl"),"rtl"===v),"".concat(r,"-ping-left"),Ge),"".concat(r,"-ping-right"),Xe),"".concat(r,"-layout-fixed"),"fixed"===b),"".concat(r,"-fixed-header"),ut),"".concat(r,"-fixed-column"),ht),"".concat(r,"-fixed-column-gapped"),ht&&Re),"".concat(r,"-scroll-horizontal"),dt),"".concat(r,"-has-fix-left"),Ee[0]&&Ee[0].fixed),"".concat(r,"-has-fix-right"),Ee[Ee.length-1]&&"right"===Ee[Ee.length-1].fixed)),style:h,id:R,ref:Oe},sn),y&&o.createElement(mt,{className:"".concat(r,"-title")},y(J)),o.createElement("div",{ref:Le,className:"".concat(r,"-container")},Xt),w&&o.createElement(mt,{className:"".concat(r,"-footer")},w(J)));dt&&(un=o.createElement(Me,{onResize:function(e){var t,n=e.width;null===(t=gt.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!==we&&(Ft(),Ce(o))}},un));var dn=function(e,t,n){var o=e.map((function(o,r){return z(r,r,e,t,n)}));return(0,I.A)((function(){return o}),[o],(function(e,t){return!(0,u.A)(e,t)}))}(Ee,ct,v),hn=o.useMemo((function(){return{scrollX:Ie,prefixCls:r,getComponent:te,scrollbarSize:Vt,direction:v,fixedInfoList:dn,isSticky:vt,supportSticky:Ut,componentWidth:we,fixHeader:ut,fixColumn:ht,horizonScroll:dt,tableLayout:Zt,rowClassName:d,expandedRowClassName:de.expandedRowClassName,expandIcon:fe,expandableType:he,expandRowByClick:de.expandRowByClick,expandedRowRender:de.expandedRowRender,expandedRowOffset:de.expandedRowOffset,onTriggerExpand:ge,expandIconColumnIndex:de.expandIconColumnIndex,indentSize:de.indentSize,allColumnsFixedLeft:Ee.every((function(e){return"left"===e.fixed})),emptyNode:tn,columns:Ae,flattenColumns:Ee,onColumnResize:Tt,colWidths:lt,hoverStartRow:se,hoverEndRow:ae,onHover:le,rowExpandable:de.rowExpandable,onRow:L,getRowKey:ne,expandedKeys:pe,childrenColumnName:me,rowHoverable:Q}}),[Ie,r,te,Vt,v,dn,vt,Ut,we,ut,ht,dt,Zt,d,de.expandedRowClassName,fe,he,de.expandRowByClick,de.expandedRowRender,de.expandedRowOffset,ge,de.expandIconColumnIndex,de.indentSize,tn,Ae,Ee,Tt,lt,se,ae,le,de.rowExpandable,L,ne,pe,me,Q]);return o.createElement(S.Provider,{value:hn},un)}var kt=o.forwardRef(Et);function Rt(e){return w(kt,e)}var Mt=Rt();Mt.EXPAND_COLUMN=i,Mt.INTERNAL_HOOKS=s,Mt.Column=function(e){return null},Mt.ColumnGroup=function(e){return null},Mt.Summary=G;const It=Mt;var Pt=o.forwardRef((function(e,t){var n=e.height,r=e.offsetY,i=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!==r&&(h={height:n,position:"relative",overflow:"hidden"},p=(0,E.A)((0,E.A)({},p),{},(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({transform:"translateY(".concat(r,"px)")},u?"marginRight":"marginLeft",-i),"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,m.A)({style:p,className:M()((0,k.A)({},"".concat(a,"-holder-inner"),a)),ref:t},c),s,d)))}));Pt.displayName="Filler";const Tt=Pt;function Ot(e){var t=e.children,n=e.setRef,r=o.useCallback((function(e){n(e)}),[]);return o.cloneElement(t,{ref:r})}const $t="object"===("undefined"==typeof navigator?"undefined":(0,A.A)(navigator))&&/Firefox/i.test(navigator.userAgent),Dt=function(e,t,n,r){var i=(0,o.useRef)(!1),s=(0,o.useRef)(null),a=(0,o.useRef)({top:e,bottom:t,left:n,right:r});return a.current.top=e,a.current.bottom=t,a.current.left=n,a.current.right=r,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),i.current=!1):o&&!i.current||(clearTimeout(s.current),i.current=!0,s.current=setTimeout((function(){i.current=!1}),50)),!i.current&&o}};const Nt=function(){function e(){(0,ye.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,we.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 Ht=14/15;function zt(e){return Math.floor(Math.pow(e,.5))}function Ft(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}var jt=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.rtl,i=e.scrollOffset,s=e.scrollRange,l=e.onStartMove,c=e.onStopMove,u=e.onScroll,d=e.horizontal,h=e.spinSize,p=e.containerSize,f=e.style,m=e.thumbStyle,g=e.showScrollBar,b=o.useState(!1),v=(0,a.A)(b,2),y=v[0],w=v[1],C=o.useState(null),x=(0,a.A)(C,2),S=x[0],A=x[1],R=o.useState(null),I=(0,a.A)(R,2),P=I[0],T=I[1],O=!r,$=o.useRef(),D=o.useRef(),N=o.useState(g),L=(0,a.A)(N,2),H=L[0],z=L[1],F=o.useRef(),j=function(){!0!==g&&!1!==g&&(clearTimeout(F.current),z(!0),F.current=setTimeout((function(){z(!1)}),3e3))},B=s-p||0,_=p-h||0,V=o.useMemo((function(){return 0===i||0===B?0:i/B*_}),[i,B,_]),W=o.useRef({top:V,dragging:y,pageY:S,startTop:P});W.current={top:V,dragging:y,pageY:S,startTop:P};var G=function(e){w(!0),A(Ft(e,d)),T(W.current.top),l(),e.stopPropagation(),e.preventDefault()};o.useEffect((function(){var e=function(e){e.preventDefault()},t=$.current,n=D.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=_,o.useEffect((function(){if(y){var e,t=function(t){var n=W.current,o=n.dragging,r=n.pageY,i=n.startTop;bt.A.cancel(e);var s=$.current.getBoundingClientRect(),a=p/(d?s.width:s.height);if(o){var l=(Ft(t,d)-r)*a,c=i;!O&&d?c-=l:c+=l;var h=K.current,f=U.current,m=f?c/f:0,g=Math.ceil(m*h);g=Math.max(g,0),g=Math.min(g,h),e=(0,bt.A)((function(){u(g,d)}))}},n=function(){w(!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)}}}),[y]),o.useEffect((function(){return j(),function(){clearTimeout(F.current)}}),[i]),o.useImperativeHandle(t,(function(){return{delayHidden:j}}));var q="".concat(n,"-scrollbar"),X={position:"absolute",visibility:H?null:"hidden"},Y={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(X,{height:8,left:0,right:0,bottom:0}),Object.assign(Y,(0,k.A)({height:"100%",width:h},O?"left":"right",V))):(Object.assign(X,(0,k.A)({width:8,top:0,bottom:0},O?"right":"left",0)),Object.assign(Y,{width:"100%",height:h,top:V})),o.createElement("div",{ref:$,className:M()(q,(0,k.A)((0,k.A)((0,k.A)({},"".concat(q,"-horizontal"),d),"".concat(q,"-vertical"),!d),"".concat(q,"-visible"),H)),style:(0,E.A)((0,E.A)({},X),f),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:j},o.createElement("div",{ref:D,className:M()("".concat(q,"-thumb"),(0,k.A)({},"".concat(q,"-thumb-moving"),y)),style:(0,E.A)((0,E.A)({},Y),m),onMouseDown:G}))}));const Bt=jt;function _t(){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 Vt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Wt=[],Gt={overflowY:"auto",overflowAnchor:"none"};function Kt(e,t){var n=e.prefixCls,r=void 0===n?"rc-virtual-list":n,i=e.className,s=e.height,l=e.itemHeight,u=e.fullHeight,h=void 0===u||u,p=e.style,f=e.data,g=e.children,b=e.itemKey,v=e.virtual,y=e.direction,w=e.scrollWidth,C=e.component,x=void 0===C?"div":C,S=e.onScroll,R=e.onVirtualScroll,I=e.onVisibleChange,P=e.innerProps,T=e.extraRender,O=e.styles,$=e.showScrollBar,D=void 0===$?"optional":$,L=(0,j.A)(e,Vt),H=o.useCallback((function(e){return"function"==typeof b?b(e):null==e?void 0:e[b]}),[b]),z=function(e){var t=o.useState(0),n=(0,a.A)(t,2),r=n[0],i=n[1],s=(0,o.useRef)(new Map),l=(0,o.useRef)(new Nt),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,r=getComputedStyle(t),i=r.marginTop,s=r.marginBottom,a=o+Lt(i)+Lt(s);l.current.get(n)!==a&&(l.current.set(n,a),e=!0)}})),e&&i((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,r]}(H),F=(0,a.A)(z,4),B=F[0],_=F[1],V=F[2],W=F[3],G=!(!1===v||!s||!l),K=o.useMemo((function(){return Object.values(V.maps).reduce((function(e,t){return e+t}),0)}),[V.id,V.maps]),U=G&&f&&(Math.max(l*f.length,K)>s||!!w),q="rtl"===y,X=M()(r,(0,k.A)({},"".concat(r,"-rtl"),q),i),Y=f||Wt,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],re=(0,o.useState)(0),ie=(0,a.A)(re,2),se=ie[0],ae=ie[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)},fe={getKey:H};function me(e){oe((function(t){var n=function(e){var t=e;return Number.isNaN(Ne.current)||(t=Math.min(t,Ne.current)),t=Math.max(t,0)}("function"==typeof e?e(t):e);return Q.current.scrollTop=n,n}))}var ge=(0,o.useRef)({start:0,end:Y.length}),be=(0,o.useRef)(),ve=function(e,t,n){var r=o.useState(e),i=(0,a.A)(r,2),s=i[0],l=i[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,r,i=e.length,s=t.length;if(0===i&&0===s)return null;i<s?(o=e,r=t):(o=t,r=e);var a={__EMPTY_ITEM__:!0};function l(e){return void 0!==e?n(e):a}for(var c=null,u=1!==Math.abs(i-s),d=0;d<r.length;d+=1){var h=l(o[d]);if(h!==l(r[d])){c=d,u=u||h!==l(r[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]}(Y,H),ye=(0,a.A)(ve,1)[0];be.current=ye;var we=o.useMemo((function(){if(!G)return{scrollHeight:void 0,start:0,end:Y.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:Y.length-1,offset:void 0};for(var t,n,o,r=0,i=Y.length,a=0;a<i;a+=1){var c=Y[a],u=H(c),d=V.get(u),h=r+(void 0===d?l:d);h>=ne&&void 0===t&&(t=a,n=r),h>ne+s&&void 0===o&&(o=a),r=h}return void 0===t&&(t=0,n=0,o=Math.ceil(s/l)),void 0===o&&(o=Y.length-1),{scrollHeight:r,start:t,end:o=Math.min(o+1,Y.length-1),offset:n}}),[U,G,ne,Y,W,s]),Ce=we.scrollHeight,xe=we.start,Se=we.end,Ae=we.offset;ge.current.start=xe,ge.current.end=Se,o.useLayoutEffect((function(){var e=V.getRecord();if(1===e.size){var t=Array.from(e.keys())[0],n=e.get(t),o=Y[xe];if(o&&void 0===n&&H(o)===t){var r=V.get(t)-l;me((function(e){return e+r}))}}V.resetRecord()}),[Ce]);var Ee=o.useState({width:0,height:s}),ke=(0,a.A)(Ee,2),Re=ke[0],Ie=ke[1],Pe=(0,o.useRef)(),Te=(0,o.useRef)(),Oe=o.useMemo((function(){return _t(Re.width,w)}),[Re.width,w]),$e=o.useMemo((function(){return _t(Re.height,Ce)}),[Re.height,Ce]),De=Ce-s,Ne=(0,o.useRef)(De);Ne.current=De;var Le=ne<=0,He=ne>=De,ze=se<=0,Fe=se>=w,je=Dt(Le,He,ze,Fe),Be=function(){return{x:q?-se:se,y:ne}},_e=(0,o.useRef)(Be()),Ve=(0,N._q)((function(e){if(R){var t=(0,E.A)((0,E.A)({},Be()),e);_e.current.x===t.x&&_e.current.y===t.y||(R(t),_e.current=t)}}));function We(e,t){var n=e;t?((0,d.flushSync)((function(){ae(n)})),Ve()):me(n)}var Ge=function(e){var t=e,n=w?w-Re.width:0;return t=Math.max(t,0),Math.min(t,n)},Ke=(0,N._q)((function(e,t){t?((0,d.flushSync)((function(){ae((function(t){return Ge(t+(q?-e:e))}))})),Ve()):me((function(t){return t+e}))})),Ue=function(e,t,n,r,i,s,a){var l=(0,o.useRef)(0),c=(0,o.useRef)(null),u=(0,o.useRef)(null),d=(0,o.useRef)(!1),h=Dt(t,n,r,i),p=(0,o.useRef)(null),f=(0,o.useRef)(null);return[function(t){if(e){bt.A.cancel(f.current),f.current=(0,bt.A)((function(){p.current=null}),2);var n=t.deltaX,o=t.deltaY,r=t.shiftKey,i=n,m=o;("sx"===p.current||!p.current&&r&&o&&!n)&&(i=o,m=0,p.current="sx");var g=Math.abs(i),b=Math.abs(m);null===p.current&&(p.current=s&&g>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,$t||n.preventDefault(),c.current=(0,bt.A)((function(){var e=d.current?10:1;a(l.current*e,!1),l.current=0})))}}(t,m):function(e,t){a(t,!0),$t||e.preventDefault()}(t,i)}},function(t){e&&(d.current=t.detail===u.current)}]}(G,Le,He,ze,Fe,!!w,Ke),qe=(0,a.A)(Ue,2),Xe=qe[0],Ye=qe[1];!function(e,t,n){var r,i=(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(i.current){var t=Math.ceil(e.touches[0].pageX),o=Math.ceil(e.touches[0].pageY),r=s.current-t,l=a.current-o,c=Math.abs(r)>Math.abs(l);c?s.current=t:a.current=o;var d=n(c,c?r:l,!1,e);d&&e.preventDefault(),clearInterval(u.current),d&&(u.current=setInterval((function(){c?r*=Ht:l*=Ht;var e=Math.floor(c?r:l);(!n(c,e,!0)||Math.abs(e)<=.1)&&clearInterval(u.current)}),16))}},h=function(){i.current=!1,r()},p=function(e){r(),1!==e.touches.length||i.current||(i.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}))};r=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),r(),clearInterval(u.current)}}),[e])}(G,Q,(function(e,t,n,o){var r=o;return!(je(e,t,n)||r&&r._virtualHandled||(r&&(r._virtualHandled=!0),Xe({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,r,i=!1,s=function(){bt.A.cancel(o)},a=function e(){s(),o=(0,bt.A)((function(){var t;t=r,me((function(e){return e+t})),e()}))},l=function(e){if(!e.target.draggable&&0===e.button){var t=e;t._virtualHandled||(t._virtualHandled=!0,i=!0)}},c=function(){i=!1,s()},u=function(e){if(i){var t=Ft(e,!1),o=n.getBoundingClientRect(),l=o.top,c=o.bottom;t<=l?(r=-zt(l-t),a()):t>=c?(r=zt(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=He&&e.detail>0;!G||t||n||e.preventDefault()}var t=Q.current;return t.addEventListener("wheel",Xe,{passive:!1}),t.addEventListener("DOMMouseScroll",Ye,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",Xe),t.removeEventListener("DOMMouseScroll",Ye),t.removeEventListener("MozMousePixelScroll",e)}}),[G,Le,He]),(0,c.A)((function(){if(w){var e=Ge(se);ae(e),Ve({x:e})}}),[Re.width,w]);var Qe=function(){var e,t;null===(e=Pe.current)||void 0===e||e.delayHidden(),null===(t=Te.current)||void 0===t||t.delayHidden()},Je=function(e,t,n,r,i,s,l,u){var d=o.useRef(),h=o.useState(null),p=(0,a.A)(h,2),f=p[0],m=p[1];return(0,c.A)((function(){if(f&&f.times<10){if(!e.current)return void m((function(e){return(0,E.A)({},e)}));s();var o=f.targetAlign,a=f.originAlign,c=f.index,u=f.offset,d=e.current.clientHeight,h=!1,p=o,g=null;if(d){for(var b=o||a,v=0,y=0,w=0,C=Math.min(t.length-1,c),x=0;x<=C;x+=1){var S=i(t[x]);y=v;var A=n.get(S);v=w=y+(void 0===A?r:A)}for(var k="top"===b?u:d-u,R=C;R>=0;R-=1){var M=i(t[R]),I=n.get(M);if(void 0===I){h=!0;break}if((k-=I)<=0)break}switch(b){case"top":g=y-u;break;case"bottom":g=w-d+u;break;default:var P=e.current.scrollTop;y<P?p="top":w>P+d&&(p="bottom")}null!==g&&l(g),g!==f.lastTop&&(h=!0)}h&&m((0,E.A)((0,E.A)({},f),{},{times:f.times+1,targetAlign:p,lastTop:g}))}}),[f,e.current]),function(e){if(null!=e){if(bt.A.cancel(d.current),"number"==typeof e)l(e);else if(e&&"object"===(0,A.A)(e)){var n,o=e.align;n="index"in e?e.index:t.findIndex((function(t){return i(t)===e.key}));var r=e.offset;m({times:0,index:n,offset:void 0===r?0:r,originAlign:o})}}else u()}}(Q,Y,V,l,H,(function(){return _(!0)}),me,Qe);o.useImperativeHandle(t,(function(){return{nativeElement:Z.current,getScrollInfo:Be,scrollTo:function(e){var t;(t=e)&&"object"===(0,A.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(I){var e=Y.slice(xe,Se+1);I(e,Y)}}),[xe,Se,Y]);var Ze=function(e,t,n,r){var i=o.useMemo((function(){return[new Map,[]]}),[e,n.id,r]),s=(0,a.A)(i,2),l=s[0],c=s[1];return function(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,s=l.get(o),a=l.get(i);if(void 0===s||void 0===a)for(var u=e.length,d=c.length;d<u;d+=1){var h,p=e[d],f=t(p);l.set(f,d);var m=null!==(h=n.get(f))&&void 0!==h?h:r;if(c[d]=(c[d-1]||0)+m,f===o&&(s=d),f===i&&(a=d),void 0!==s&&void 0!==a)break}return{top:c[s-1]||0,bottom:c[a]}}}(Y,H,V,l),et=null==T?void 0:T({start:xe,end:Se,virtual:U,offsetX:se,offsetY:Ae,rtl:q,getSize:Ze}),tt=function(e,t,n,r,i,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:r},offsetX:i}),u=c(e);return o.createElement(Ot,{key:u,setRef:function(t){return s(e,t)}},l)}))}(Y,xe,Se,w,se,B,g,fe),nt=null;s&&(nt=(0,E.A)((0,k.A)({},h?"height":"maxHeight",s),Gt),G&&(nt.overflowY="hidden",w&&(nt.overflowX="hidden"),ue&&(nt.pointerEvents="none")));var ot={};return q&&(ot.dir="rtl"),o.createElement("div",(0,m.A)({ref:Z,style:(0,E.A)((0,E.A)({},p),{},{position:"relative"}),className:X},ot,L),o.createElement(Me,{onResize:function(e){Ie({width:e.offsetWidth,height:e.offsetHeight})}},o.createElement(x,{className:"".concat(r,"-holder"),style:nt,ref:Q,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==ne&&me(t),null==S||S(e),Ve()},onMouseEnter:Qe},o.createElement(Tt,{prefixCls:r,height:Ce,offsetX:se,offsetY:Ae,scrollWidth:w,onInnerResize:_,ref:J,innerProps:P,rtl:q,extra:et},tt))),U&&Ce>s&&o.createElement(Bt,{ref:Pe,prefixCls:r,scrollOffset:ne,scrollRange:Ce,rtl:q,onScroll:We,onStartMove:he,onStopMove:pe,spinSize:$e,containerSize:Re.height,style:null==O?void 0:O.verticalScrollBar,thumbStyle:null==O?void 0:O.verticalScrollBarThumb,showScrollBar:D}),U&&w>Re.width&&o.createElement(Bt,{ref:Te,prefixCls:r,scrollOffset:se,scrollRange:w,rtl:q,onScroll:We,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:D}))}var Ut=o.forwardRef(Kt);Ut.displayName="List";const qt=Ut;var Xt=p(null),Yt=p(null);const Qt=function(e){var t=e.rowInfo,n=e.column,r=e.colIndex,i=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,g=n.render,b=n.dataIndex,v=n.className,y=n.width,w=f(Yt,["columnsOffset"]).columnsOffset,C=Ge(t,n,r,i,s),x=C.key,S=C.fixedInfo,A=C.appendCellNode,k=C.additionalCellProps,R=k.style,I=k.colSpan,P=void 0===I?1:I,T=k.rowSpan,O=void 0===T?1:T,$=function(e,t,n){return n[e+(t||1)]-(n[e]||0)}(r-1,P,w),D=P>1?y-$:0,N=(0,E.A)((0,E.A)((0,E.A)({},R),u),{},{flex:"0 0 ".concat($,"px"),width:"".concat($,"px"),marginRight:D,pointerEvents:"auto"}),L=o.useMemo((function(){return h?O<=1:0===P||0===O||O>1}),[O,P,h]);L?N.visibility="hidden":h&&(N.height=null==p?void 0:p(O));var z=L?function(){return null}:g,F={};return 0!==O&&0!==P||(F.rowSpan=1,F.colSpan=1),o.createElement(H,(0,m.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:z,shouldCellUpdate:n.shouldCellUpdate},S,{appendNode:A,additionalProps:(0,E.A)((0,E.A)({},k),{},{style:N},F)}))};var Jt=["data","index","className","rowKey","style","extra","getHeight"],Zt=o.forwardRef((function(e,t){var n,r=e.data,i=e.index,s=e.className,a=e.rowKey,l=e.style,c=e.extra,u=e.getHeight,d=(0,j.A)(e,Jt),h=r.record,p=r.indent,g=r.index,b=f(S,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),v=b.scrollX,y=b.flattenColumns,w=b.prefixCls,C=b.fixColumn,x=b.componentWidth,A=f(Xt,["getComponent"]).getComponent,R=Be(h,a,i,p),I=A(["body","row"],"div"),P=A(["body","cell"],"div"),T=R.rowSupportExpand,O=R.expanded,$=R.rowProps,D=R.expandedRowRender,N=R.expandedRowClassName;if(T&&O){var L=D(h,i,p+1,O),z=We(N,h,i,p),F={};C&&(F={style:(0,k.A)({},"--virtual-width","".concat(x,"px"))});var B="".concat(w,"-expanded-row-cell");n=o.createElement(I,{className:M()("".concat(w,"-expanded-row"),"".concat(w,"-expanded-row-level-").concat(p+1),z)},o.createElement(H,{component:P,prefixCls:w,className:M()(B,(0,k.A)({},"".concat(B,"-fixed"),C)),additionalProps:F},L))}var _=(0,E.A)((0,E.A)({},l),{},{width:v});c&&(_.position="absolute",_.pointerEvents="none");var V=o.createElement(I,(0,m.A)({},$,d,{"data-row-key":a,ref:T?null:t,className:M()(s,"".concat(w,"-row"),null==$?void 0:$.className,(0,k.A)({},"".concat(w,"-row-extra"),c)),style:(0,E.A)((0,E.A)({},_),null==$?void 0:$.style)}),y.map((function(e,t){return o.createElement(Qt,{key:t,component:P,rowInfo:R,column:e,colIndex:t,indent:p,index:i,renderIndex:g,record:h,inverse:c,getHeight:u})})));return T?o.createElement("div",{ref:t},V,n):V}));const en=C(Zt);var tn=o.forwardRef((function(e,t){var n=e.data,r=e.onScroll,i=f(S,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),s=i.flattenColumns,l=i.onColumnResize,c=i.getRowKey,u=i.expandedKeys,d=i.prefixCls,h=i.childrenColumnName,p=i.scrollX,m=i.direction,g=f(Xt),b=g.sticky,v=g.scrollY,y=g.listItemHeight,w=g.getComponent,C=g.onScroll,x=o.useRef(),E=je(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=E[t])||void 0===n?void 0:n.record,r=e.onCell;if(r){var i,s=r(o,t);return null!==(i=null==s?void 0:s.rowSpan)&&void 0!==i?i:1}return 1},I=o.useMemo((function(){return{columnsOffset:R}}),[R]),P="".concat(d,"-tbody"),T=w(["body","wrapper"]),O={};return b&&(O.position="sticky",O.bottom=0,"object"===(0,A.A)(b)&&b.offsetScroll&&(O.bottom=b.offsetScroll)),o.createElement(Yt.Provider,{value:I},o.createElement(qt,{fullHeight:!1,ref:x,prefixCls:"".concat(P,"-virtual"),styles:{horizontalScrollBar:O},className:P,height:v,itemHeight:y||24,data:E,itemKey:function(e){return c(e.record)},component:T,scrollWidth:p,direction:m,onVirtualScroll:function(e){var t,n=e.x;r({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,r=e.getSize,i=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,f=function(e){if(!(h=h.filter((function(t){return 1!==M(t,e)}))).length)return p=Math.max(e-1,n),1},m=n;m<E.length&&!f(m);m+=1);for(var g=[],b=function(e){if(!E[e])return 1;s.some((function(t){return M(t,e)>1}))&&g.push(e)},v=l;v<=p;v+=1)b(v);return g.map((function(e){var t=E[e],n=c(t.record,e),s=r(n);return o.createElement(en,{key:e,data:t,rowKey:n,index:e,style:{top:-i+s.top},extra:!0,getHeight:function(t){var o=e+t-1,i=c(E[o].record,o),s=r(n,i);return s.bottom-s.top}})}))}},(function(e,t,n){var r=c(e.record,t);return o.createElement(en,{data:e,rowKey:r,index:t,style:n.style})})))}));const nn=C(tn);var on=function(e,t){var n=t.ref,r=t.onScroll;return o.createElement(nn,{ref:n,data:e,onScroll:r})};function rn(e,t){var n=e.data,r=e.columns,i=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,f=i||{},g=f.x,b=f.y;"number"!=typeof g&&(g=1),"number"!=typeof b&&(b=500);var v=(0,N._q)((function(e,t){return(0,P.A)(h,e)||t})),y=(0,N._q)(p),w=o.useMemo((function(){return{sticky:a,scrollY:b,listItemHeight:d,getComponent:v,onScroll:y}}),[a,b,d,v,y]);return o.createElement(Xt.Provider,{value:w},o.createElement(It,(0,m.A)({},e,{className:M()(u,"".concat(c,"-virtual")),scroll:(0,E.A)((0,E.A)({},i),{},{x:g}),components:(0,E.A)((0,E.A)({},h),{},{body:null!=n&&n.length?on:void 0}),columns:r,internalHooks:s,tailor:!0,ref:t})))}var sn=o.forwardRef(rn);function an(e){return w(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,A.A)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,A.A)(e.icon)||"function"==typeof e.icon)}function fn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var o,r=e[n];return"class"===n?(t.className=r,delete t.class):(delete t[n],t[(o=n,o.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=r),t}),{})}function mn(e,t,n){return n?o.createElement(e.tag,(0,E.A)((0,E.A)({key:t},fn(e.attrs)),n),(e.children||[]).map((function(n,o){return mn(n,"".concat(t,"-").concat(e.tag,"-").concat(o))}))):o.createElement(e.tag,(0,E.A)({key:t},fn(e.attrs)),(e.children||[]).map((function(n,o){return mn(n,"".concat(t,"-").concat(e.tag,"-").concat(o))})))}function gn(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"],yn={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},wn=function(e){var t,n,r,i,s,a,l,c,u=e.icon,d=e.className,h=e.onClick,p=e.style,f=e.primaryColor,m=e.secondaryColor,g=(0,j.A)(e,vn),b=o.useRef(),v=yn;if(f&&(v={primaryColor:f,secondaryColor:m||gn(f)}),t=b,n=(0,o.useContext)(un.A),r=n.csp,i=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",i&&(a=a.replace(/anticon/g,i)),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:r,attachTo:e})}),[]),l=pn(u),c="icon should be icon definiton, but got ".concat(u),(0,T.Ay)(l,"[@ant-design/icons] ".concat(c)),!pn(u))return null;var y=u;return y&&"function"==typeof y.icon&&(y=(0,E.A)((0,E.A)({},y),{},{icon:y.icon(v.primaryColor,v.secondaryColor)})),mn(y.icon,"svg-".concat(y.name),(0,E.A)((0,E.A)({className:d,onClick:h,style:p,"data-icon":y.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},g),{},{ref:b}))};wn.displayName="IconReact",wn.getTwoToneColors=function(){return(0,E.A)({},yn)},wn.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;yn.primaryColor=t,yn.secondaryColor=n||gn(t),yn.calculated=!!n};const Cn=wn;function xn(e){var t=bn(e),n=(0,a.A)(t,2),o=n[0],r=n[1];return Cn.setTwoToneColors({primaryColor:o,secondaryColor:r})}var Sn=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];xn(cn.z1.primary);var An=o.forwardRef((function(e,t){var n=e.className,r=e.icon,i=e.spin,s=e.rotate,l=e.tabIndex,c=e.onClick,u=e.twoToneColor,d=(0,j.A)(e,Sn),h=o.useContext(un.A),p=h.prefixCls,f=void 0===p?"anticon":p,g=h.rootClassName,b=M()(g,f,(0,k.A)((0,k.A)({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!i||"loading"===r.name),n),v=l;void 0===v&&c&&(v=-1);var y=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,w=bn(u),C=(0,a.A)(w,2),x=C[0],S=C[1];return o.createElement("span",(0,m.A)({role:"img","aria-label":r.name},d,{ref:t,tabIndex:v,onClick:c,className:b}),o.createElement(Cn,{icon:r,primaryColor:x,secondaryColor:S,style:y}))}));An.displayName="AntdIcon",An.getTwoToneColor=function(){var e=Cn.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},An.setTwoToneColor=xn;const En=An;var kn=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:ln}))};const Rn=o.forwardRef(kn);var Mn=o.createContext(null),In=o.createContext({}),Pn=function(e){for(var t=e.prefixCls,n=e.level,r=e.isStart,i=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"),r[l]),"".concat(s,"-end"),i[l]))}));return o.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},a)};const Tn=o.memo(Pn);function On(e,t){return e[t]}function $n(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}var Dn=["children"];function Nn(e,t){return"".concat(e,"-").concat(t)}function Ln(e,t){return null!=e?e:t}function Hn(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function zn(e){return function e(t){return U(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return(0,T.Ay)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,o=t.props,r=o.children,i=(0,j.A)(o,Dn),s=(0,E.A)({key:n},i),a=e(r);return a.length&&(s.children=a),s})).filter((function(e){return e}))}(e)}function Fn(e,t,n){var o=Hn(n),r=o._title,i=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=Nn(o?o.pos:"0",u),p=Ln(c[i],h),f=0;f<r.length;f+=1){var m=r[f];if(void 0!==c[m]){d=c[m];break}}var g=Object.assign($n(c,[].concat((0,tt.A)(r),[i,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(g),!0===t||a.has(p)?g.children=e(c[s]||[],g):g.children=[],g}))}(e),l}function jn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,o=t.processEntity,r=t.onProcessFinished,i=t.externalGetKey,s=t.childrenPropName,a=t.fieldNames,l=i||(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 r,i=("object"===(0,A.A)(n)?n:{externalGetKey:n})||{},s=i.childrenPropName,a=i.externalGetKey,l=Hn(i.fieldNames),h=l.key,p=l.children,f=s||p;a?"string"==typeof a?r=function(e){return e[a]}:"function"==typeof a&&(r=function(e){return a(e)}):r=function(e,t){return Ln(e[h],t)},function t(n,i,s,a){var l=n?n[f]:e,h=n?Nn(s.pos,i):"0",p=n?[].concat((0,tt.A)(a),[n]):[];if(n){var m=r(n,h);!function(e){var t=e.node,n=e.index,r=e.pos,i=e.key,s=e.parentPos,a=e.level,l={node:t,nodes:e.nodes,index:n,key:i,pos:r,level:a},h=Ln(i,r);c[r]=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:i,pos:h,key:m,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}),r&&r(d),d}function Bn(e,t){var n=t.expandedKeys,o=t.selectedKeys,r=t.loadedKeys,i=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!==r.indexOf(e),loading:-1!==i.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 _n(e){var t=e.data,n=e.expanded,o=e.selected,r=e.checked,i=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,f=(0,E.A)((0,E.A)({},t),{},{expanded:n,selected:o,checked:r,loaded:i,loading:s,halfChecked:a,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:h,key:p});return"props"in f||Object.defineProperty(f,"props",{get:function(){return(0,T.Ay)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),f}var Vn=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Wn="open",Gn="close",Kn=function(e){var t,n,r,i=e.eventKey,s=e.className,l=e.style,c=e.dragOver,u=e.dragOverGapTop,d=e.dragOverGapBottom,h=e.isLeaf,p=e.isStart,f=e.isEnd,g=e.expanded,b=e.selected,v=e.checked,y=e.halfChecked,w=e.loading,C=e.domRef,x=e.active,S=e.data,A=e.onMouseMove,R=e.selectable,I=(0,j.A)(e,Vn),P=o.useContext(Mn),T=o.useContext(In),O=o.useRef(null),$=o.useState(!1),D=(0,a.A)($,2),N=D[0],L=D[1],H=!!(P.disabled||e.disabled||null!==(t=T.nodeDisabled)&&void 0!==t&&t.call(T,S)),z=o.useMemo((function(){return!(!P.checkable||!1===e.checkable)&&P.checkable}),[P.checkable,e.checkable]),F=function(t){H||z&&!e.disableCheckbox&&P.onNodeCheck(t,_n(e),!v)},B=o.useMemo((function(){return"boolean"==typeof R?R:P.selectable}),[R,P.selectable]),_=function(t){P.onNodeClick(t,_n(e)),B?function(t){H||P.onNodeSelect(t,_n(e))}(t):F(t)},V=function(t){P.onNodeDoubleClick(t,_n(e))},W=function(t){P.onNodeMouseEnter(t,_n(e))},G=function(t){P.onNodeMouseLeave(t,_n(e))},K=function(t){P.onNodeContextMenu(t,_n(e))},U=o.useMemo((function(){return!(!P.draggable||P.draggable.nodeDraggable&&!P.draggable.nodeDraggable(S))}),[P.draggable,S]),q=function(t){w||P.onNodeExpand(t,_n(e))},X=o.useMemo((function(){var e=(On(P.keyEntities,i)||{}).children;return Boolean((e||[]).length)}),[P.keyEntities,i]),Y=o.useMemo((function(){return!1!==h&&(h||!P.loadData&&!X||P.loadData&&e.loaded&&!X)}),[h,P.loadData,X,e.loaded]);o.useEffect((function(){w||"function"!=typeof P.loadData||!g||Y||e.loaded||P.onNodeLoad(_n(e))}),[w,P.loadData,P.onNodeLoad,g,Y,e]);var Q=o.useMemo((function(){var e;return null!==(e=P.draggable)&&void 0!==e&&e.icon?o.createElement("span",{className:"".concat(P.prefixCls,"-draggable-icon")},P.draggable.icon):null}),[P.draggable]),J=function(t){var n=e.switcherIcon||P.switcherIcon;return"function"==typeof n?n((0,E.A)((0,E.A)({},e),{},{isLeaf:t})):n},Z=o.useMemo((function(){if(!z)return null;var t="boolean"!=typeof z?z:null;return o.createElement("span",{className:M()("".concat(P.prefixCls,"-checkbox"),(0,k.A)((0,k.A)((0,k.A)({},"".concat(P.prefixCls,"-checkbox-checked"),v),"".concat(P.prefixCls,"-checkbox-indeterminate"),!v&&y),"".concat(P.prefixCls,"-checkbox-disabled"),H||e.disableCheckbox)),onClick:F,role:"checkbox","aria-checked":y?"mixed":v,"aria-disabled":H||e.disableCheckbox,"aria-label":"Select ".concat("string"==typeof e.title?e.title:"tree node")},t)}),[z,v,y,H,e.disableCheckbox,e.title]),ee=o.useMemo((function(){return Y?null:g?Wn:Gn}),[Y,g]),te=o.useMemo((function(){return o.createElement("span",{className:M()("".concat(P.prefixCls,"-iconEle"),"".concat(P.prefixCls,"-icon__").concat(ee||"docu"),(0,k.A)({},"".concat(P.prefixCls,"-icon_loading"),w))})}),[P.prefixCls,ee,w]),ne=o.useMemo((function(){var t=Boolean(P.draggable);return!e.disabled&&t&&P.dragOverNodeKey===i?P.dropIndicatorRender({dropPosition:P.dropPosition,dropLevelOffset:P.dropLevelOffset,indent:P.indent,prefixCls:P.prefixCls,direction:P.direction}):null}),[P.dropPosition,P.dropLevelOffset,P.indent,P.prefixCls,P.direction,P.draggable,P.dragOverNodeKey,P.dropIndicatorRender]),oe=o.useMemo((function(){var t,n,r=e.title,i=void 0===r?"---":r,s="".concat(P.prefixCls,"-node-content-wrapper");if(P.showIcon){var a=e.icon||P.icon;t=a?o.createElement("span",{className:M()("".concat(P.prefixCls,"-iconEle"),"".concat(P.prefixCls,"-icon__customize"))},"function"==typeof a?a(e):a):te}else P.loadData&&w&&(t=te);return n="function"==typeof i?i(S):P.titleRender?P.titleRender(S):i,o.createElement("span",{ref:O,title:"string"==typeof i?i:"",className:M()(s,"".concat(s,"-").concat(ee||"normal"),(0,k.A)({},"".concat(P.prefixCls,"-node-selected"),!H&&(b||N))),onMouseEnter:W,onMouseLeave:G,onContextMenu:K,onClick:_,onDoubleClick:V},t,o.createElement("span",{className:"".concat(P.prefixCls,"-title")},n),ne)}),[P.prefixCls,P.showIcon,e,P.icon,te,P.titleRender,S,ee,W,G,K,_,V]),re=ze(I,{aria:!0,data:!0}),ie=(On(P.keyEntities,i)||{}).level,se=f[f.length-1],ae=!H&&U,le=P.draggingNodeKey===i,ce=void 0!==R?{"aria-selected":!!R}:void 0;return o.createElement("div",(0,m.A)({ref:C,role:"treeitem","aria-expanded":h?void 0:g,className:M()(s,"".concat(P.prefixCls,"-treenode"),(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)(r,"".concat(P.prefixCls,"-treenode-disabled"),H),"".concat(P.prefixCls,"-treenode-switcher-").concat(g?"open":"close"),!h),"".concat(P.prefixCls,"-treenode-checkbox-checked"),v),"".concat(P.prefixCls,"-treenode-checkbox-indeterminate"),y),"".concat(P.prefixCls,"-treenode-selected"),b),"".concat(P.prefixCls,"-treenode-loading"),w),"".concat(P.prefixCls,"-treenode-active"),x),"".concat(P.prefixCls,"-treenode-leaf-last"),se),"".concat(P.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)(r,"drop-target",P.dropTargetKey===i),"drop-container",P.dropContainerKey===i),"drag-over",!H&&c),"drag-over-gap-top",!H&&u),"drag-over-gap-bottom",!H&&d),"filter-node",null===(n=P.filterTreeNode)||void 0===n?void 0:n.call(P,_n(e))),"".concat(P.prefixCls,"-treenode-leaf"),Y))),style:l,draggable:ae,onDragStart:ae?function(t){t.stopPropagation(),L(!0),P.onNodeDragStart(t,e);try{t.dataTransfer.setData("text/plain","")}catch(e){}}:void 0,onDragEnter:U?function(t){t.preventDefault(),t.stopPropagation(),P.onNodeDragEnter(t,e)}:void 0,onDragOver:U?function(t){t.preventDefault(),t.stopPropagation(),P.onNodeDragOver(t,e)}:void 0,onDragLeave:U?function(t){t.stopPropagation(),P.onNodeDragLeave(t,e)}:void 0,onDrop:U?function(t){t.preventDefault(),t.stopPropagation(),L(!1),P.onNodeDrop(t,e)}:void 0,onDragEnd:U?function(t){t.stopPropagation(),L(!1),P.onNodeDragEnd(t,e)}:void 0,onMouseMove:A},ce,re),o.createElement(Tn,{prefixCls:P.prefixCls,level:ie,isStart:p,isEnd:f}),Q,function(){if(Y){var e=J(!0);return!1!==e?o.createElement("span",{className:M()("".concat(P.prefixCls,"-switcher"),"".concat(P.prefixCls,"-switcher-noop"))},e):null}var t=J(!1);return!1!==t?o.createElement("span",{onClick:q,className:M()("".concat(P.prefixCls,"-switcher"),"".concat(P.prefixCls,"-switcher_").concat(g?Wn: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 Xn(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function Yn(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,r=t.children;n.push(o),e(r)}))}(On(t,e).children),n}function Jn(e){if(e.parent){var t=Yn(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function Zn(e,t,n,o,r,i,s,a,l,c){var u,d=e.clientX,h=e.clientY,p=e.target.getBoundingClientRect(),f=p.top,m=p.height,g=(("rtl"===c?-1:1)*(((null==r?void 0:r.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<f+m/2){var y=s.findIndex((function(e){return e.key===v.key})),w=s[y<=0?0:y-1].key;v=On(a,w)}var C=v.key,x=v,S=v.key,A=0,E=0;if(!b.includes(C))for(var k=0;k<g&&Jn(v);k+=1)v=v.parent,E+=1;var R,M=t.data,I=v.node,P=!0;return R=Yn(v.pos),0===Number(R[R.length-1])&&0===v.level&&h<f+m/2&&i({dragNode:M,dropNode:I,dropPosition:-1})&&v.key===n.eventKey?A=-1:(x.children||[]).length&&b.includes(S)?i({dragNode:M,dropNode:I,dropPosition:0})?A=0:P=!1:0===E?g>-1.5?i({dragNode:M,dropNode:I,dropPosition:1})?A=1:P=!1:i({dragNode:M,dropNode:I,dropPosition:0})?A=0:i({dragNode:M,dropNode:I,dropPosition:1})?A=1:P=!1:i({dragNode:M,dropNode:I,dropPosition:1})?A=1:P=!1,{dropPosition:A,dropLevelOffset:E,dropTargetKey:v.key,dropTargetPos:v.pos,dragOverNodeKey:S,dropContainerKey:0===A?null:(null===(u=v.parent)||void 0===u?void 0:u.key)||null,dropAllowed:P}}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,A.A)(e))return(0,T.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 r=On(t,e);if(r){n.add(e);var i=r.parent;r.node.disabled||i&&o(i.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 ro(e){var t=e||{},n=t.disabled,o=t.disableCheckbox,r=t.checkable;return!(!n&&!o)||!1===r}function io(e,t,n,o){var r,i=[];r=o||ro;var s,a=new Set(e.filter((function(e){var t=!!On(n,e);return t||i.push(e),t}))),l=new Map,c=0;return Object.keys(n).forEach((function(e){var t=n[e],o=t.level,r=l.get(o);r||(r=new Set,l.set(o,r)),r.add(t),c=Math.max(c,o)})),(0,T.Ay)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),s=!0===t?function(e,t,n,o){for(var r=new Set(e),i=new Set,s=0;s<=n;s+=1)(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,s=void 0===i?[]:i;r.has(t)&&!o(n)&&s.filter((function(e){return!o(e.node)})).forEach((function(e){r.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=r.has(t);s&&!n&&(s=!1),l||!n&&!i.has(t)||(l=!0)})),s&&r.add(t.key),l&&i.add(t.key),a.add(t.key)}}));return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(oo(i,r))}}(a,l,c,r):function(e,t,n,o,r){for(var i=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;i.has(t)||s.has(t)||r(n)||a.filter((function(e){return!r(e.node)})).forEach((function(e){i.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(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var o=!0,a=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=i.has(t);o&&!n&&(o=!1),a||!n&&!s.has(t)||(a=!0)})),o||i.delete(t.key),a&&s.add(t.key),l.add(t.key)}}));return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(oo(s,i))}}(a,t.halfCheckedKeys,l,c,r),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,r=void 0===n?"rc-checkbox":n,i=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,f=e.title,g=e.onChange,b=(0,j.A)(e,lo),v=(0,o.useRef)(null),y=(0,o.useRef)(null),w=(0,so.A)(d,{value:l}),C=(0,a.A)(w,2),x=C[0],S=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:y.current}}));var A=M()(r,i,(0,k.A)((0,k.A)({},"".concat(r,"-checked"),x),"".concat(r,"-disabled"),c));return o.createElement("span",{className:A,title:f,style:s,ref:y},o.createElement("input",(0,m.A)({},b,{className:"".concat(r,"-input"),ref:v,onChange:function(t){c||("checked"in e||S(t.target.checked),null==g||g({target:(0,E.A)((0,E.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(r,"-inner")}))}));const uo=co;var ho=n(62279);function po(e){return e&&o.isValidElement(e)&&e.type===o.Fragment}function fo(e,t){return((e,t,n)=>o.isValidElement(e)?o.cloneElement(e,"function"==typeof n?n(e.props||{}):n):t)(e,e,t)}var mo=n(77132),go=n(9417);const bo=(0,we.A)((function e(){(0,ye.A)(this,e)}));var vo="CALC_UNIT",yo=new RegExp(vo,"g");function wo(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 r;(0,ye.A)(this,n),r=t.call(this),(0,k.A)((0,go.A)(r),"result",""),(0,k.A)((0,go.A)(r),"unitlessCssVar",void 0),(0,k.A)((0,go.A)(r),"lowPriority",void 0);var i=(0,A.A)(e);return r.unitlessCssVar=o,e instanceof n?r.result="(".concat(e.result,")"):"number"===i?r.result=wo(e):"string"===i&&(r.result=e),r}return(0,we.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(wo(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(wo(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(yo,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,ye.A)(this,n),o=t.call(this),(0,k.A)((0,go.A)(o),"result",0),e instanceof n?o.result=e.result:"number"==typeof e&&(o.result=e),o}return(0,we.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),So=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("-"))},Ao=function(e,t,n,o){var r=(0,E.A)({},t[e]);null!=o&&o.deprecatedTokens&&o.deprecatedTokens.forEach((function(e){var t,n=(0,a.A)(e,2),o=n[0],i=n[1];(null!=r&&r[o]||null!=r&&r[i])&&(null!==(t=r[i])&&void 0!==t||(r[i]=null==r?void 0:r[o]))}));var i=(0,E.A)((0,E.A)({},n),r);return Object.keys(i).forEach((function(e){i[e]===t[e]&&delete i[e]})),i};var Eo="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(!Eo)return Object.assign.apply(Object,[{}].concat(t));ko=!1;var o={};return t.forEach((function(e){"object"===(0,A.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 Io(){}const Po=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 To=new(function(){function e(){(0,ye.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,we.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,A.A)(e)?"obj_".concat(t.getObjectID(e)):"".concat((0,A.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 $o=n(25905),Do=n(39319);const{genStyleHooks:No,genComponentStyleHook:Lo,genSubStyleComponent:Ho}=function(e){var t=e.useCSP,n=void 0===t?Oo:t,r=e.useToken,i=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],f=h.join("-"),m=e.layer||{name:"antd"};return function(e){var t,a,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,g=r(),b=g.theme,v=g.realToken,y=g.hashId,w=g.token,C=g.cssVar,x=i(),S=x.rootPrefixCls,k=x.iconPrefixCls,R=n(),M=C?"css":"js",I=(t=function(){var e=new Set;return C&&Object.keys(d.unitless||{}).forEach((function(t){e.add((0,mo.Ki)(t,C.prefix)),e.add((0,mo.Ki)(t,So(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=To.get(a);if(e)return e;var n=t();return To.set(a,n),n}),a)),P=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,mo.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,mo.zA)(e)})).join(","),")")}}}(M),T=P.max,O=P.min,$={theme:b,token:w,hashId:y,nonce:function(){return R.nonce},clientOnly:d.clientOnly,layer:m,order:d.order||-999};return"function"==typeof s&&(0,mo.IV)((0,E.A)((0,E.A)({},$),{},{clientOnly:!1,path:["Shared",S]}),(function(){return s(w,{prefix:{rootPrefixCls:S,iconPrefixCls:k},csp:R})})),[(0,mo.IV)((0,E.A)((0,E.A)({},$),{},{path:[f,e,k]}),(function(){if(!1===d.injectStyle)return[];var t=function(e){var t,n=e,o=Io;return Eo&&"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,E.A)((0,E.A)({},null===(o=Mo[e])||void 0===o?void 0:o.component),n)}}),{token:n,keys:t,flush:o}}(w),n=t.token,o=t.flush,r=Po(p,v,u),i=".".concat(e),s=Ao(p,v,r,{deprecatedTokens:d.deprecatedTokens});C&&r&&"object"===(0,A.A)(r)&&Object.keys(r).forEach((function(e){r[e]="var(".concat((0,mo.Ki)(e,So(p,C.prefix)),")")}));var a=Ro(n,{componentCls:i,prefixCls:e,iconCls:".".concat(k),antCls:".".concat(S),calc:I,max:T,min:O},C?r:s),f=c(a,{hashId:y,prefixCls:e,rootPrefixCls:S,iconPrefixCls:k});o(p,s);var m="function"==typeof l?l(a,e,h,d.resetFont):null;return[!1===d.resetStyle?null:m,f]})),y]}}return{genStyleHooks:function(e,t,n,i){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==i?void 0:i.unitless)||{},h="function"==typeof c?c(e):{},p=(0,E.A)((0,E.A)({},h),{},(0,k.A)({},l("zIndexPopup"),!0));Object.keys(d).forEach((function(e){p[l(e)]=d[e]}));var f=(0,E.A)((0,E.A)({},i),{},{unitless:p,prefixToken:l}),m=u(e,t,n,f),g=function(e,t,n){var i=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=r().realToken;return(0,mo.RC)({path:[e],prefix:u.prefix,key:u.key,unitless:i,ignore:c,token:d,scope:s},(function(){var o=Po(e,d,t),r=Ao(e,d,o,{deprecatedTokens:null==n?void 0:n.deprecatedTokens});return Object.keys(o).forEach((function(e){r[l(e)]=r[e],delete r[e]})),r})),null};return function(t){var n=r().cssVar;return[function(r){return a&&n?o.createElement(o.Fragment,null,o.createElement(u,{rootCls:t,cssVar:n,component:e}),r):r},null==n?void 0:n.key]}}(s,n,f);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=m(e,t),o=(0,a.A)(n,2)[1],r=g(t),i=(0,a.A)(r,2);return[i[0],o,i[1]]}},genSubStyleComponent:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=u(e,t,n,(0,E.A)({resetStyle:!1,order:-998},o));return function(e){var t=e.prefixCls,n=e.rootCls;return r(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,r]=(0,Do.Ay)();return{theme:e,realToken:t,hashId:n,token:o,cssVar:r}},useCSP:()=>{const{csp:e}=(0,o.useContext)(ho.QO);return null!=e?e:{}},getResetStyles:(e,t)=>{var n;const o=(0,$o.av)(e);return[o,{"&":o},(0,$o.jz)(null!==(n=null==t?void 0:t.prefix.iconPrefixCls)&&void 0!==n?n:ho.pM)]},getCommonStyle:$o.vj,getCompUnitless:()=>Do.Is}),zo=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(",")}}}}},Fo=Lo("Wave",(e=>[zo(e)])),jo=`${ho.yH}-wave-target`;var Bo=n(90754);function _o(e,t){this.v=e,this.k=t}function Vo(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Vo=function(e,t,n,o){if(t)r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n;else{var i=function(t,n){Vo(e,t,(function(e){return this._invoke(t,n,e)}))};i("next",0),i("throw",1),i("return",2)}},Vo(e,t,n,o)}function Wo(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var l=o&&o.prototype instanceof a?o:a,c=Object.create(l.prototype);return Vo(c,"_invoke",function(n,o,r){var i,a,l,c=0,u=r||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,a=0,l=e,h.n=n,s}};function p(n,o){for(a=n,l=o,t=0;!d&&c&&!r&&t<u.length;t++){var r,i=u[t],p=h.p,f=i[2];n>3?(r=f===o)&&(l=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=p&&((r=n<2&&p<i[1])?(a=0,h.v=o,h.n=i[1]):p<f&&(r=n<3||i[0]>o||o>f)&&(i[4]=n,i[5]=o,h.n=f,a=0))}if(r||n>1)return s;throw d=!0,o}return function(r,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,f),a=u,l=f;(t=a<2?e:l)||!d;){i||(a?a<3?(a>1&&(h.n=-1),p(a,l)):h.n=l:h.v=l);try{if(c=2,i){if(a||(r="next"),t=i[r]){if(!(t=t.call(i,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=i.return)&&t.call(i),a<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=e}else if((t=(d=h.n<0)?l:n.call(o,h))!==s)break}catch(t){i=e,a=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,r,i),!0),c}var s={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][o]?t(t([][o]())):(Vo(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,Vo(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Vo(d,"constructor",c),Vo(c,"constructor",l),l.displayName="GeneratorFunction",Vo(c,r,"GeneratorFunction"),Vo(d),Vo(d,r,"Generator"),Vo(d,o,(function(){return this})),Vo(d,"toString",(function(){return"[object Generator]"})),(Wo=function(){return{w:i,m:h}})()}function Go(e,t){function n(o,r,i,s){try{var a=e[o](r),l=a.value;return l instanceof _o?t.resolve(l.v).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(l).then((function(e){a.value=e,i(a)}),(function(e){return n("throw",e,i,s)}))}catch(e){s(e)}}var o;this.next||(Vo(Go.prototype),Vo(Go.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),Vo(this,"_invoke",(function(e,r,i){function s(){return new t((function(t,o){n(e,i,t,o)}))}return o=o?o.then(s,s):s()}),!0)}function Ko(e,t,n,o,r){return new Go(Wo().w(e,t,n,o),r||Promise)}function Uo(e,t,n,o,r){var i=Ko(e,t,n,o,r);return i.next().then((function(e){return e.done?e.value:i.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 Xo(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,A.A)(e)+" is not iterable")}function Yo(){var e=Wo(),t=e.m(Yo),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 r={throw:1,return:2,break:3,continue:3};function i(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,r[e],t)},delegateYield:function(e,r,i){return t.resultName=r,n(o.d,Xo(e),i)},finish:function(e){return n(o.f,e)}},n=function(e,n,r){o.p=t.prev,o.n=t.next;try{return e(n,r)}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(Yo=function(){return{wrap:function(t,n,o,r){return e.w(i(t),n,o,r&&r.reverse())},isGeneratorFunction:o,mark:e.m,awrap:function(e,t){return new _o(e,t)},AsyncIterator:Go,async:function(e,t,n,r,s){return(o(t)?Ko:Uo)(i(e),t,n,r,s)},keys:qo,values:Xo}})()}function Qo(e,t,n,o,r,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(o,r)}function Jo(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function s(e){Qo(i,o,r,s,a,"next",e)}function a(e){Qo(i,o,r,s,a,"throw",e)}s(void 0)}))}}var Zo,er=(0,E.A)({},h),tr=er.version,nr=er.render,or=er.unmountComponentAtNode;try{Number((tr||"").split(".")[0])>=18&&(Zo=er.createRoot)}catch(e){}function rr(e){var t=er.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,A.A)(t)&&(t.usingClientEntryPoint=e)}var ir="__rc_react_root__";function sr(e){return ar.apply(this,arguments)}function ar(){return(ar=Jo(Yo().mark((function e(t){return Yo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[ir])||void 0===e||e.unmount(),delete t[ir]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lr(e){or(e)}function cr(){return(cr=Jo(Yo().mark((function e(t){return Yo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===Zo){e.next=2;break}return e.abrupt("return",sr(t));case 2:lr(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}let ur=(e,t)=>(function(e,t){Zo?function(e,t){rr(!0);var n=t[ir]||Zo(t);rr(!1),n.render(e),t[ir]=n}(e,t):function(e,t){null==nr||nr(e,t)}(e,t)}(e,t),()=>function(e){return cr.apply(this,arguments)}(t));function dr(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 hr(e){return Number.isNaN(e)?0:e}const pr=e=>{const{className:t,target:n,component:r,registerUnmount:i}=e,s=o.useRef(null),a=o.useRef(null);o.useEffect((()=>{a.current=i()}),[]);const[l,c]=o.useState(null),[u,d]=o.useState([]),[h,p]=o.useState(0),[f,m]=o.useState(0),[b,v]=o.useState(0),[y,w]=o.useState(0),[C,x]=o.useState(!1),S={left:h,top:f,width:b,height:y,borderRadius:u.map((e=>`${e}px`)).join(" ")};function A(){const e=getComputedStyle(n);c(function(e){const{borderTopColor:t,borderColor:n,backgroundColor:o}=getComputedStyle(e);return dr(t)?t:dr(n)?n:dr(o)?o:null}(n));const t="static"===e.position,{borderLeftWidth:o,borderTopWidth:r}=e;p(t?n.offsetLeft:hr(-parseFloat(o))),m(t?n.offsetTop:hr(-parseFloat(r))),v(n.offsetWidth),w(n.offsetHeight);const{borderTopLeftRadius:i,borderTopRightRadius:s,borderBottomLeftRadius:a,borderBottomRightRadius:l}=e;d([i,s,l,a].map((e=>hr(parseFloat(e)))))}if(l&&(S["--wave-color"]=l),o.useEffect((()=>{if(n){const e=(0,bt.A)((()=>{A(),x(!0)}));let t;return"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(A),t.observe(n)),()=>{bt.A.cancel(e),null==t||t.disconnect()}}}),[]),!C)return null;const E=("Checkbox"===r||"Radio"===r)&&(null==n?void 0:n.classList.contains(jo));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,g.K4)(s,n),className:M()(t,e,{"wave-quick":E}),style:S})))},fr=(e,t)=>{var n;const{component:r}=t;if("Checkbox"===r&&!(null===(n=e.querySelector("input"))||void 0===n?void 0:n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",null==e||e.insertBefore(i,null==e?void 0:e.firstChild);let s=null;s=ur(o.createElement(pr,Object.assign({},t,{target:e,registerUnmount:function(){return s}})),i)},mr=(e,t,n)=>{const{wave:r}=o.useContext(ho.QO),[,i,s]=(0,Do.Ay)(),a=(0,l.A)((o=>{const a=e.current;if((null==r?void 0:r.disabled)||!a)return;const l=a.querySelector(`.${jo}`)||a,{showEffect:c}=r||{};(c||fr)(l,{className:t,token:i,component:n,event:o,hashId:s})})),c=o.useRef(null);return e=>{bt.A.cancel(c.current),c.current=(0,bt.A)((()=>{a(e)}))}},gr=e=>{const{children:t,disabled:n,component:r}=e,{getPrefixCls:i}=(0,o.useContext)(ho.QO),s=(0,o.useRef)(null),a=i("wave"),[,l]=Fo(a),c=mr(s,M()(a,l),r);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)?fo(t,{ref:(0,g.f3)(t)?(0,g.K4)((0,g.A9)(t),s):s}):null!=t?t:null};var br=n(98119);const vr=e=>{const[,,,,t]=(0,Do.Ay)();return t?`${e}-css-var`:""};var yr="RC_FORM_INTERNAL_HOOKS",wr=function(){(0,T.Ay)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const Cr=o.createContext({getFieldValue:wr,getFieldsValue:wr,getFieldError:wr,getFieldWarning:wr,getFieldsError:wr,isFieldsTouched:wr,isFieldTouched:wr,isFieldValidating:wr,isFieldsValidating:wr,resetFields:wr,setFields:wr,setFieldValue:wr,setFieldsValue:wr,validateFields:wr,submit:wr,getInternalHooks:function(){return wr(),{dispatch:wr,initEntityValue:wr,registerField:wr,useSubscribe:wr,setInitialValues:wr,destroyForm:wr,setCallbacks:wr,registerWatch:wr,getFields:wr,setValidateMessages:wr,setPreserve:wr,getInitialValue:wr}}}),xr=o.createContext(null);function Sr(e){return null==e?[]:Array.isArray(e)?e:[e]}function Ar(){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 Er=Ar(),kr=n(53954),Rr=n(63662),Mr=n(52176);function Ir(e){var t="function"==typeof Map?new Map:void 0;return Ir=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,Mr.A)())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var r=new(e.bind.apply(e,o));return n&&(0,Rr.A)(r,n.prototype),r}(e,arguments,(0,kr.A)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,Rr.A)(n,e)},Ir(e)}var Pr=/%[sdj%]/g;function Tr(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 Or(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 r=0,i=n.length;return"function"==typeof e?e.apply(null,n):"string"==typeof e?e.replace(Pr,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})):e}function $r(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 Dr(e,t,n){var o=0,r=e.length;!function i(s){if(s&&s.length)n(s);else{var a=o;o+=1,a<r?t(e[a],i):n([])}}([])}"undefined"!=typeof process&&process.env;var Nr=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(e,o){var r;return(0,ye.A)(this,n),r=t.call(this,"Async Validation Error"),(0,k.A)((0,go.A)(r),"errors",void 0),(0,k.A)((0,go.A)(r),"fields",void 0),r.errors=e,r.fields=o,r}return(0,we.A)(n)}(Ir(Error));function Lr(e,t){return function(n){var o,r;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],(r=n)&&void 0!==r.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 Hr(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];"object"===(0,A.A)(o)&&"object"===(0,A.A)(e[n])?e[n]=(0,E.A)((0,E.A)({},e[n]),o):e[n]=o}return e}var zr="enum";const Fr=function(e,t,n,o,r,i){!e.required||n.hasOwnProperty(e.field)&&!$r(t,i||e.type)||o.push(Or(r.messages.required,e.fullField))};var jr,Br=/^(([^<>()\[\]\\.,;:\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,}))$/,_r=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Vr={integer:function(e){return Vr.number(e)&&parseInt(e,10)===e},float:function(e){return Vr.number(e)&&!Vr.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,A.A)(e)&&!Vr.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(Br)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(function(){if(jr)return jr;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}",r=["(?:".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}|:))")],i="(?:".concat(r.join("|"),")").concat("(?:%[0-9a-zA-Z]{1,})?"),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(i,"$)")),a=new RegExp("^".concat(n,"$")),l=new RegExp("^".concat(i,"$")),c=function(e){return e&&e.exact?s:new RegExp("(?:".concat(t(e)).concat(n).concat(t(e),")|(?:").concat(t(e)).concat(i).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(i).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 jr=new RegExp("(?:^".concat(h,"$)"),"i")}())},hex:function(e){return"string"==typeof e&&!!e.match(_r)}};const Wr=Fr,Gr=function(e,t,n,o,r){(/^\s+$/.test(t)||""===t)&&o.push(Or(r.messages.whitespace,e.fullField))},Kr=function(e,t,n,o,r){if(e.required&&void 0===t)Fr(e,t,n,o,r);else{var i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?Vr[i](t)||o.push(Or(r.messages.types[i],e.fullField,e.type)):i&&(0,A.A)(t)!==e.type&&o.push(Or(r.messages.types[i],e.fullField,e.type))}},Ur=function(e,t,n,o,r){var i="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),i?l!==e.len&&o.push(Or(r.messages[c].len,e.fullField,e.len)):s&&!a&&l<e.min?o.push(Or(r.messages[c].min,e.fullField,e.min)):a&&!s&&l>e.max?o.push(Or(r.messages[c].max,e.fullField,e.max)):s&&a&&(l<e.min||l>e.max)&&o.push(Or(r.messages[c].range,e.fullField,e.min,e.max))},qr=function(e,t,n,o,r){e[zr]=Array.isArray(e[zr])?e[zr]:[],-1===e[zr].indexOf(t)&&o.push(Or(r.messages[zr],e.fullField,e[zr].join(", ")))},Xr=function(e,t,n,o,r){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||o.push(Or(r.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"==typeof e.pattern&&(new RegExp(e.pattern).test(t)||o.push(Or(r.messages.pattern.mismatch,e.fullField,t,e.pattern))))},Yr=function(e,t,n,o,r){var i=e.type,s=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t,i)&&!e.required)return n();Wr(e,t,o,s,r,i),$r(t,i)||Kr(e,t,o,s,r)}n(s)},Qr={string:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t,"string")&&!e.required)return n();Wr(e,t,o,i,r,"string"),$r(t,"string")||(Kr(e,t,o,i,r),Ur(e,t,o,i,r),Xr(e,t,o,i,r),!0===e.whitespace&&Gr(e,t,o,i,r))}n(i)},method:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t)&&!e.required)return n();Wr(e,t,o,i,r),void 0!==t&&Kr(e,t,o,i,r)}n(i)},number:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(""===t&&(t=void 0),$r(t)&&!e.required)return n();Wr(e,t,o,i,r),void 0!==t&&(Kr(e,t,o,i,r),Ur(e,t,o,i,r))}n(i)},boolean:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t)&&!e.required)return n();Wr(e,t,o,i,r),void 0!==t&&Kr(e,t,o,i,r)}n(i)},regexp:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t)&&!e.required)return n();Wr(e,t,o,i,r),$r(t)||Kr(e,t,o,i,r)}n(i)},integer:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t)&&!e.required)return n();Wr(e,t,o,i,r),void 0!==t&&(Kr(e,t,o,i,r),Ur(e,t,o,i,r))}n(i)},float:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t)&&!e.required)return n();Wr(e,t,o,i,r),void 0!==t&&(Kr(e,t,o,i,r),Ur(e,t,o,i,r))}n(i)},array:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();Wr(e,t,o,i,r,"array"),null!=t&&(Kr(e,t,o,i,r),Ur(e,t,o,i,r))}n(i)},object:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t)&&!e.required)return n();Wr(e,t,o,i,r),void 0!==t&&Kr(e,t,o,i,r)}n(i)},enum:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t)&&!e.required)return n();Wr(e,t,o,i,r),void 0!==t&&qr(e,t,o,i,r)}n(i)},pattern:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t,"string")&&!e.required)return n();Wr(e,t,o,i,r),$r(t,"string")||Xr(e,t,o,i,r)}n(i)},date:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t,"date")&&!e.required)return n();var s;Wr(e,t,o,i,r),$r(t,"date")||(s=t instanceof Date?t:new Date(t),Kr(e,s,o,i,r),s&&Ur(e,s.getTime(),o,i,r))}n(i)},url:Yr,hex:Yr,email:Yr,required:function(e,t,n,o,r){var i=[],s=Array.isArray(t)?"array":(0,A.A)(t);Wr(e,t,o,i,r,s),n(i)},any:function(e,t,n,o,r){var i=[];if(e.required||!e.required&&o.hasOwnProperty(e.field)){if($r(t)&&!e.required)return n();Wr(e,t,o,i,r)}n(i)}};var Jr=function(){function e(t){(0,ye.A)(this,e),(0,k.A)(this,"rules",null),(0,k.A)(this,"_messages",Er),this.define(t)}return(0,we.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,A.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=Hr(Ar(),e)),this._messages}},{key:"validate",value:function(t){var n=this,o=t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if("function"==typeof r&&(i=r,r={}),!this.rules||0===Object.keys(this.rules).length)return i&&i(null,o),Promise.resolve(o);if(r.messages){var s=this.messages();s===Er&&(s=Ar()),Hr(s,r.messages),r.messages=s}else r.messages=this.messages();var a={};(r.keys||Object.keys(this.rules)).forEach((function(e){var r=n.rules[e],i=o[e];r.forEach((function(r){var s=r;"function"==typeof s.transform&&(o===t&&(o=(0,E.A)({},o)),null!=(i=o[e]=s.transform(i))&&(s.type=s.type||(Array.isArray(i)?"array":(0,A.A)(i)))),(s="function"==typeof s?{validator:s}:(0,E.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:i,source:o,field:e}))}))}));var l={};return function(e,t,n,o,r){if(t.first){var i=new Promise((function(t,i){var s=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,(0,tt.A)(e[n]||[]))})),t}(e);Dr(s,n,(function(e){return o(e),e.length?i(new Nr(e,Tr(e))):t(r)}))}));return i.catch((function(e){return e})),i}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,i){var d=function(e){if(u.push.apply(u,e),++c===l)return o(u),u.length?i(new Nr(u,Tr(u))):t(r)};a.length||(o(u),t(r)),a.forEach((function(t){var o=e[t];-1!==s.indexOf(t)?Dr(o,n,d):function(e,t,n){var o=[],r=0,i=e.length;function s(e){o.push.apply(o,(0,tt.A)(e||[])),++r===i&&n(o)}e.forEach((function(e){t(e,s)}))}(o,n,d)}))}));return d.catch((function(e){return e})),d}(a,r,(function(t,n){var i,s=t.rule,a=!("object"!==s.type&&"array"!==s.type||"object"!==(0,A.A)(s.fields)&&"object"!==(0,A.A)(s.defaultField));function c(e,t){return(0,E.A)((0,E.A)({},t),{},{fullField:"".concat(s.fullField,".").concat(e),fullFields:s.fullFields?[].concat((0,tt.A)(s.fullFields),[e]):[e]})}function u(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=Array.isArray(i)?i:[i];!r.suppressWarning&&u.length&&e.warning("async-validator:",u),u.length&&void 0!==s.message&&(u=[].concat(s.message));var d=u.map(Lr(s,o));if(r.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(Lr(s,o)):r.error&&(d=[r.error(s,Or(r.messages.required,s.field))]),n(d);var h={};s.defaultField&&Object.keys(t.value).map((function(e){h[e]=s.defaultField})),h=(0,E.A)((0,E.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 f=new e(p);f.messages(r.messages),t.rule.options&&(t.rule.options.messages=r.messages,t.rule.options.error=r.error),f.validate(t.value,t.rule.options||r,(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)i=s.asyncValidator(s,t.value,u,t.source,r);else if(s.validator){try{i=s.validator(s,t.value,u,t.source,r)}catch(e){var d,h;null===(d=(h=console).error)||void 0===d||d.call(h,e),r.suppressValidatorError||setTimeout((function(){throw e}),0),u(e.message)}!0===i?u():!1===i?u("function"==typeof s.message?s.message(s.fullField||s.field):s.message||"".concat(s.fullField||s.field," fails")):i instanceof Array?u(i):i instanceof Error&&u(i.message)}i&&i.then&&i.then((function(){return u()}),(function(e){return u(e)}))}),(function(e){!function(e){for(var t,n,r=[],s={},a=0;a<e.length;a++)t=e[a],n=void 0,Array.isArray(t)?r=(n=r).concat.apply(n,(0,tt.A)(t)):r.push(t);r.length?(s=Tr(r),i(r,s)):i(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&&!Qr.hasOwnProperty(e.type))throw new Error(Or("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]?Qr.required:Qr[this.getType(e)]||void 0}}]),e}();(0,k.A)(Jr,"register",(function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");Qr[e]=t})),(0,k.A)(Jr,"warning",(function(){})),(0,k.A)(Jr,"messages",Er),(0,k.A)(Jr,"validators",Qr);const Zr=Jr;var ei="'${name}' is not a valid ${type}",ti={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:ei,method:ei,array:ei,object:ei,number:ei,date:ei,boolean:ei,integer:ei,float:ei,regexp:ei,email:ei,url:ei,hex:ei},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}"}},ni=n(20488),oi=Zr;function ri(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 ii="CODE_LOGIC_ERROR";function si(e,t,n,o,r){return ai.apply(this,arguments)}function ai(){return ai=Jo(Yo().mark((function e(t,n,r,i,s){var a,l,c,u,d,h,p,f,m;return Yo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return delete(a=(0,E.A)({},r)).ruleIndex,oi.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(ii)}}),c=null,a&&"array"===a.type&&a.defaultField&&(c=a.defaultField,delete a.defaultField),u=new oi((0,k.A)({},t,[a])),d=(0,ni.h)(ti,i.validateMessages),u.messages(d),h=[],e.prev=10,e.next=13,Promise.resolve(u.validate((0,k.A)({},t,n),(0,E.A)({},i)));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,r=n===ii?d.default:n;return o.isValidElement(r)?o.cloneElement(r,{key:"error_".concat(t)}):r})));case 18:if(h.length||!c){e.next=23;break}return e.next=21,Promise.all(n.map((function(e,n){return si("".concat(t,".").concat(n),e,c,i,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 f=(0,E.A)((0,E.A)({},r),{},{name:t,enum:(r.enum||[]).join(", ")},s),m=h.map((function(e){return"string"==typeof e?ri(e,f):e})),e.abrupt("return",m);case 26:case"end":return e.stop()}}),e,null,[[10,15]])}))),ai.apply(this,arguments)}function li(e,t,n,o,r,i){var s,a=e.join("."),l=n.map((function(e,t){var n=e.validator,o=(0,E.A)((0,E.A)({},e),{},{ruleIndex:t});return n&&(o.validator=function(e,t,o){var r=!1,i=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,T.Ay)(!r,"Your validator function has already return a promise. `callback` will be ignored."),r||o.apply(void 0,t)}))}));r=i&&"function"==typeof i.then&&"function"==typeof i.catch,(0,T.Ay)(r,"`callback` is deprecated. Please return a promise instead."),r&&i.then((function(){o()})).catch((function(e){o(e||" ")}))}),o})).sort((function(e,t){var n=e.warningOnly,o=e.ruleIndex,r=t.warningOnly,i=t.ruleIndex;return!!n==!!r?o-i:n?1:-1}));if(!0===r)s=new Promise(function(){var e=Jo(Yo().mark((function e(n,r){var s,c,u;return Yo().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,si(a,t,c,o,i);case 5:if(!(u=e.sent).length){e.next=9;break}return r([{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 si(a,t,e,o,i).then((function(t){return{errors:t,rule:e}}))}));s=(r?function(e){return ui.apply(this,arguments)}(c):function(e){return ci.apply(this,arguments)}(c)).then((function(e){return Promise.reject(e)}))}return s.catch((function(e){return e})),s}function ci(){return(ci=Jo(Yo().mark((function e(t){return Yo().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 ui(){return(ui=Jo(Yo().mark((function e(t){var n;return Yo().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 di(e){return Sr(e)}function hi(e,t){var n={};return t.forEach((function(t){var o=(0,P.A)(e,t);n=(0,ni.A)(n,t,o)})),n}function pi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return fi(t,e,n)}))}function fi(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 mi(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,A.A)(t.target)&&e in t.target?t.target[e]:t}function gi(e,t,n){var o=e.length;if(t<0||t>=o||n<0||n>=o)return e;var r=e[t],i=t-n;return i>0?[].concat((0,tt.A)(e.slice(0,n)),[r],(0,tt.A)(e.slice(n,t)),(0,tt.A)(e.slice(t+1,o))):i<0?[].concat((0,tt.A)(e.slice(0,t)),(0,tt.A)(e.slice(t+1,n+1)),[r],(0,tt.A)(e.slice(n+1,o))):e}var bi=["name"],vi=[];function yi(e,t,n,o,r,i){return"function"==typeof e?e(t,n,"source"in i?{source:i.source}:{}):o!==r}var wi=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(e){var r;return(0,ye.A)(this,n),r=t.call(this,e),(0,k.A)((0,go.A)(r),"state",{resetCount:0}),(0,k.A)((0,go.A)(r),"cancelRegisterFunc",null),(0,k.A)((0,go.A)(r),"mounted",!1),(0,k.A)((0,go.A)(r),"touched",!1),(0,k.A)((0,go.A)(r),"dirty",!1),(0,k.A)((0,go.A)(r),"validatePromise",void 0),(0,k.A)((0,go.A)(r),"prevValidating",void 0),(0,k.A)((0,go.A)(r),"errors",vi),(0,k.A)((0,go.A)(r),"warnings",vi),(0,k.A)((0,go.A)(r),"cancelRegister",(function(){var e=r.props,t=e.preserve,n=e.isListField,o=e.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(n,t,di(o)),r.cancelRegisterFunc=null})),(0,k.A)((0,go.A)(r),"getNamePath",(function(){var e=r.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,go.A)(r),"getRules",(function(){var e=r.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,go.A)(r),"refresh",(function(){r.mounted&&r.setState((function(e){return{resetCount:e.resetCount+1}}))})),(0,k.A)((0,go.A)(r),"metaCache",null),(0,k.A)((0,go.A)(r),"triggerMetaEvent",(function(e){var t=r.props.onMetaChange;if(t){var n=(0,E.A)((0,E.A)({},r.getMeta()),{},{destroy:e});(0,u.A)(r.metaCache,n)||t(n),r.metaCache=n}else r.metaCache=null})),(0,k.A)((0,go.A)(r),"onStoreChange",(function(e,t,n){var o=r.props,i=o.shouldUpdate,s=o.dependencies,a=void 0===s?[]:s,l=o.onReset,c=n.store,d=r.getNamePath(),h=r.getValue(e),p=r.getValue(c),f=t&&pi(t,d);switch("valueUpdate"!==n.type||"external"!==n.source||(0,u.A)(h,p)||(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=vi,r.warnings=vi,r.triggerMetaEvent()),n.type){case"reset":if(!t||f)return r.touched=!1,r.dirty=!1,r.validatePromise=void 0,r.errors=vi,r.warnings=vi,r.triggerMetaEvent(),null==l||l(),void r.refresh();break;case"remove":if(i&&yi(i,e,c,h,p,n))return void r.reRender();break;case"setField":var m=n.data;if(f)return"touched"in m&&(r.touched=m.touched),"validating"in m&&!("originRCField"in m)&&(r.validatePromise=m.validating?Promise.resolve([]):null),"errors"in m&&(r.errors=m.errors||vi),"warnings"in m&&(r.warnings=m.warnings||vi),r.dirty=!0,r.triggerMetaEvent(),void r.reRender();if("value"in m&&pi(t,d,!0))return void r.reRender();if(i&&!d.length&&yi(i,e,c,h,p,n))return void r.reRender();break;case"dependenciesUpdate":if(a.map(di).some((function(e){return pi(n.relatedFields,e)})))return void r.reRender();break;default:if(f||(!a.length||d.length||i)&&yi(i,e,c,h,p,n))return void r.reRender()}!0===i&&r.reRender()})),(0,k.A)((0,go.A)(r),"validateRules",(function(e){var t=r.getNamePath(),n=r.getValue(),o=e||{},i=o.triggerName,s=o.validateOnly,a=void 0!==s&&s,l=Promise.resolve().then(Jo(Yo().mark((function o(){var s,a,c,u,d,h,p;return Yo().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(r.mounted){o.next=2;break}return o.abrupt("return",[]);case 2:if(s=r.props,a=s.validateFirst,c=void 0!==a&&a,u=s.messageVariables,d=s.validateDebounce,h=r.getRules(),i&&(h=h.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||Sr(t).includes(i)}))),!d||!i){o.next=10;break}return o.next=8,new Promise((function(e){setTimeout(e,d)}));case 8:if(r.validatePromise===l){o.next=10;break}return o.abrupt("return",[]);case 10:return(p=li(t,n,h,e,c,u)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vi;if(r.validatePromise===l){var t;r.validatePromise=null;var n=[],o=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,r=e.errors,i=void 0===r?vi:r;t?o.push.apply(o,(0,tt.A)(i)):n.push.apply(n,(0,tt.A)(i))})),r.errors=n,r.warnings=o,r.triggerMetaEvent(),r.reRender()}})),o.abrupt("return",p);case 13:case"end":return o.stop()}}),o)}))));return a||(r.validatePromise=l,r.dirty=!0,r.errors=vi,r.warnings=vi,r.triggerMetaEvent(),r.reRender()),l})),(0,k.A)((0,go.A)(r),"isFieldValidating",(function(){return!!r.validatePromise})),(0,k.A)((0,go.A)(r),"isFieldTouched",(function(){return r.touched})),(0,k.A)((0,go.A)(r),"isFieldDirty",(function(){return!(!r.dirty&&void 0===r.props.initialValue)||void 0!==(0,r.props.fieldContext.getInternalHooks(yr).getInitialValue)(r.getNamePath())})),(0,k.A)((0,go.A)(r),"getErrors",(function(){return r.errors})),(0,k.A)((0,go.A)(r),"getWarnings",(function(){return r.warnings})),(0,k.A)((0,go.A)(r),"isListField",(function(){return r.props.isListField})),(0,k.A)((0,go.A)(r),"isList",(function(){return r.props.isList})),(0,k.A)((0,go.A)(r),"isPreserve",(function(){return r.props.preserve})),(0,k.A)((0,go.A)(r),"getMeta",(function(){return r.prevValidating=r.isFieldValidating(),{touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,warnings:r.warnings,name:r.getNamePath(),validated:null===r.validatePromise}})),(0,k.A)((0,go.A)(r),"getOnlyChild",(function(e){if("function"==typeof e){var t=r.getMeta();return(0,E.A)((0,E.A)({},r.getOnlyChild(e(r.getControlled(),t,r.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,go.A)(r),"getValue",(function(e){var t=r.props.fieldContext.getFieldsValue,n=r.getNamePath();return(0,P.A)(e||t(!0),n)})),(0,k.A)((0,go.A)(r),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props,n=t.name,o=t.trigger,i=t.validateTrigger,s=t.getValueFromEvent,a=t.normalize,l=t.valuePropName,c=t.getValueProps,u=t.fieldContext,d=void 0!==i?i:u.validateTrigger,h=r.getNamePath(),p=u.getInternalHooks,f=u.getFieldsValue,m=p(yr).dispatch,g=r.getValue(),b=c||function(e){return(0,k.A)({},l,e)},v=e[o],y=void 0!==n?b(g):{},w=(0,E.A)((0,E.A)({},e),y);return w[o]=function(){var e;r.touched=!0,r.dirty=!0,r.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):mi.apply(void 0,[l].concat(n)),a&&(e=a(e,g,f(!0))),e!==g&&m({type:"updateValue",namePath:h,value:e}),v&&v.apply(void 0,n)},Sr(d||[]).forEach((function(e){var t=w[e];w[e]=function(){t&&t.apply(void 0,arguments);var n=r.props.rules;n&&n.length&&m({type:"validateField",namePath:h,triggerName:e})}})),w})),e.fieldContext&&(0,(0,e.fieldContext.getInternalHooks)(yr).initEntityValue)((0,go.A)(r)),r}return(0,we.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)(yr).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,r=this.getOnlyChild(n),i=r.child;return r.isFunction?e=i:o.isValidElement(i)?e=o.cloneElement(i,this.getControlled(i.props)):((0,T.Ay)(!i,"`children` of Field is not validate ReactElement."),e=i),o.createElement(o.Fragment,{key:t},e)}}]),n}(o.Component);(0,k.A)(wi,"contextType",Cr),(0,k.A)(wi,"defaultProps",{trigger:"onChange",valuePropName:"value"});const Ci=function(e){var t,n=e.name,r=(0,j.A)(e,bi),i=o.useContext(Cr),s=o.useContext(xr),a=void 0!==n?di(n):void 0,l=null!==(t=r.isListField)&&void 0!==t?t:!!s,c="keep";return l||(c="_".concat((a||[]).join("_"))),o.createElement(wi,(0,m.A)({key:c,name:a,isListField:l},r,{fieldContext:i}))};var xi="__@field_split__";function Si(e){return e.map((function(e){return"".concat((0,A.A)(e),":").concat(e)})).join(xi)}var Ai=function(){function e(){(0,ye.A)(this,e),(0,k.A)(this,"kvs",new Map)}return(0,we.A)(e,[{key:"set",value:function(e,t){this.kvs.set(Si(e),t)}},{key:"get",value:function(e){return this.kvs.get(Si(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(Si(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],r=n[1],i=o.split(xi);return e({key:i.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,a.A)(t,3),o=n[1],r=n[2];return"number"===o?Number(r):r})),value:r})}))}},{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 Ei=Ai;var ki=["name"],Ri=(0,we.A)((function e(t){var n=this;(0,ye.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===yr?(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,T.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,r=(0,ni.h)(e,n.store);null===(o=n.prevWithoutPreserves)||void 0===o||o.map((function(t){var n=t.key;r=(0,ni.A)(r,n,(0,P.A)(e,n))})),n.prevWithoutPreserves=null,n.updateStore(r)}})),(0,k.A)(this,"destroyForm",(function(e){if(e)n.updateStore({});else{var t=new Ei;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,P.A)(n.initialValues,e);return e.length?(0,ni.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 Ei;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=di(e);return t.get(n)||{INVALIDATE_NAME_PATH:di(e)}}))})),(0,k.A)(this,"getFieldsValue",(function(e,t){var o,r,i;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(o=e,r=t):e&&"object"===(0,A.A)(e)&&(i=e.strict,r=e.filter),!0===o&&!r)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(i){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(r){var u="getMeta"in e?e.getMeta():null;r(u)&&a.push(c)}else a.push(c)})),hi(n.store,a.map(di))})),(0,k.A)(this,"getFieldValue",(function(e){n.warningUnhooked();var t=di(e);return(0,P.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:di(e[n]),errors:[],warnings:[]}}))})),(0,k.A)(this,"getFieldError",(function(e){n.warningUnhooked();var t=di(e);return n.getFieldsError([t])[0].errors})),(0,k.A)(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=di(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 r,i=t[0],s=t[1],a=!1;0===t.length?r=null:1===t.length?Array.isArray(i)?(r=i.map(di),a=!1):(r=null,a=i):(r=i.map(di),a=s);var l=n.getFieldEntities(!0),c=function(e){return e.isFieldTouched()};if(!r)return a?l.every((function(e){return c(e)||e.isList()})):l.some(c);var u=new Ei;r.forEach((function(e){u.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();r.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(di);return t.some((function(e){var t=e.getNamePath();return pi(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 Ei,r=n.getFieldEntities(!0);r.forEach((function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var r=o.get(n)||new Set;r.add({entity:e,value:t}),o.set(n,r)}})),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach((function(t){var n,r=o.get(t);r&&(n=e).push.apply(n,(0,tt.A)((0,tt.A)(r).map((function(e){return e.entity}))))}))):e=r,e.forEach((function(e){if(void 0!==e.props.initialValue){var r=e.getNamePath();if(void 0!==n.getInitialValue(r))(0,T.Ay)(!1,"Form already set 'initialValues' with path '".concat(r.join("."),"'. Field can not overwrite it."));else{var i=o.get(r);if(i&&i.size>1)(0,T.Ay)(!1,"Multiple Field with path '".concat(r.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(i){var s=n.getFieldValue(r);e.isListField()||t.skipExist&&void 0!==s||n.updateStore((0,ni.A)(n.store,r,(0,tt.A)(i)[0].value))}}}}))})),(0,k.A)(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore((0,ni.h)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var o=e.map(di);o.forEach((function(e){var t=n.getInitialValue(e);n.updateStore((0,ni.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 r=e.name,i=(0,j.A)(e,ki),s=di(r);o.push(s),"value"in i&&n.updateStore((0,ni.A)(n.store,s,i.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(),r=(0,E.A)((0,E.A)({},o),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(r,"originRCField",{value:!0}),r}))})),(0,k.A)(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var o=e.getNamePath();void 0===(0,P.A)(n.store,o)&&n.updateStore((0,ni.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,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(r)&&(!o||i.length>1)){var s=o?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==s&&n.fieldEntities.every((function(e){return!fi(e.getNamePath(),t)}))){var a=n.store;n.updateStore((0,ni.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 r=e.namePath,i=e.triggerName;n.validateFields([r],{triggerName:i})}})),(0,k.A)(this,"notifyObservers",(function(e,t,o){if(n.subscribable){var r=(0,E.A)((0,E.A)({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,r)}))}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=di(e),r=n.store;n.updateStore((0,ni.A)(n.store,o,t)),n.notifyObservers(r,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var i=n.triggerDependenciesUpdate(r,o),s=n.callbacks.onValuesChange;s&&s(hi(n.store,[o]),n.getFieldsValue()),n.triggerOnFieldsChange([o].concat((0,tt.A)(i)))})),(0,k.A)(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var o=(0,ni.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=[],r=new Ei;return n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=di(t);r.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))})),function e(n){(r.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var r=n.getNamePath();n.isFieldDirty()&&r.length&&(o.push(r),e(r))}}))}(e),o})),(0,k.A)(this,"triggerOnFieldsChange",(function(e,t){var o=n.callbacks.onFieldsChange;if(o){var r=n.getFields();if(t){var i=new Ei;t.forEach((function(e){var t=e.name,n=e.errors;i.set(t,n)})),r.forEach((function(e){e.errors=i.get(e.name)||e.errors}))}var s=r.filter((function(t){var n=t.name;return pi(e,n)}));s.length&&o(s,r)}})),(0,k.A)(this,"validateFields",(function(e,t){var o,r;n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(o=e,r=t):r=e;var i=!!o,s=i?o.map(di):[],a=[],l=String(Date.now()),c=new Set,u=r||{},d=u.recursive,h=u.dirty;n.getFieldEntities(!0).forEach((function(e){if(i||s.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!h||e.isFieldDirty())){var t=e.getNamePath();if(c.add(t.join(l)),!i||pi(s,t,d)){var o=e.validateRules((0,E.A)({validateMessages:(0,E.A)((0,E.A)({},ti),n.validateMessages)},r));a.push(o.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,o=[],r=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?r.push.apply(r,(0,tt.A)(n)):o.push.apply(o,(0,tt.A)(n))})),o.length?Promise.reject({name:t,errors:o,warnings:r}):{name:t,errors:o,warnings:r}})))}}}));var p=function(e){var t=!1,n=e.length,o=[];return e.length?new Promise((function(r,i){e.forEach((function(e,s){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,o[s]=e,n>0||(t&&i(o),r(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 f=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})}));f.catch((function(e){return e}));var m=s.filter((function(e){return c.has(e.join(l))}));return n.triggerOnFieldsChange(m),f})),(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 Mi=function(e){var t=o.useRef(),n=o.useState({}),r=(0,a.A)(n,2)[1];if(!t.current)if(e)t.current=e;else{var i=new Ri((function(){r({})}));t.current=i.getForm()}return[t.current]};var Ii=o.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}});const Pi=Ii;var Ti=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"];const Oi=function(e,t){var n=e.name,r=e.initialValues,i=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,f=void 0===p?"onChange":p,g=e.onValuesChange,b=e.onFieldsChange,v=e.onFinish,y=e.onFinishFailed,w=e.clearOnDestroy,C=(0,j.A)(e,Ti),x=o.useRef(null),S=o.useContext(Pi),k=Mi(s),R=(0,a.A)(k,1)[0],M=R.getInternalHooks(yr),I=M.useSubscribe,P=M.setInitialValues,T=M.setCallbacks,O=M.setValidateMessages,$=M.setPreserve,D=M.destroyForm;o.useImperativeHandle(t,(function(){return(0,E.A)((0,E.A)({},R),{},{nativeElement:x.current})})),o.useEffect((function(){return S.registerForm(n,R),function(){S.unregisterForm(n)}}),[S,R,n]),O((0,E.A)((0,E.A)({},S.validateMessages),h)),T({onValuesChange:g,onFieldsChange:function(e){if(S.triggerFormChange(n,e),b){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];b.apply(void 0,[e].concat(o))}},onFinish:function(e){S.triggerFormFinish(n,e),v&&v(e)},onFinishFailed:y}),$(l);var N,L=o.useRef(null);P(r,!L.current),L.current||(L.current=!0),o.useEffect((function(){return function(){return D(w)}}),[]);var H="function"==typeof c;N=H?c(R.getFieldsValue(!0),R):c,I(!H);var z=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,A.A)(e)||"object"!==(0,A.A)(t))return!1;var n=Object.keys(e),o=Object.keys(t),r=new Set([].concat(n,o));return(0,tt.A)(r).every((function(n){var o=e[n],r=t[n];return"function"==typeof o&&"function"==typeof r||o===r}))})(z.current||[],i||[])||R.setFields(i||[]),z.current=i}),[i,R]);var F=o.useMemo((function(){return(0,E.A)((0,E.A)({},R),{},{validateTrigger:f})}),[R,f]),B=o.createElement(xr.Provider,{value:null},o.createElement(Cr.Provider,{value:F},N));return!1===d?B:o.createElement(d,(0,m.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 $i(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}var Di=o.forwardRef(Oi);Di.FormProvider=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,i=e.children,s=o.useContext(Ii),a=o.useRef({});return o.createElement(Ii.Provider,{value:(0,E.A)((0,E.A)({},s),{},{validateMessages:(0,E.A)((0,E.A)({},s.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:a.current}),s.triggerFormChange(e,t)},triggerFormFinish:function(e,t){r&&r(e,{values:t,forms:a.current}),s.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(a.current=(0,E.A)((0,E.A)({},a.current),{},(0,k.A)({},e,t))),s.registerForm(e,t)},unregisterForm:function(e){var t=(0,E.A)({},a.current);delete t[e],a.current=t,s.unregisterForm(e)}})},i)},Di.Field=Ci,Di.List=function(e){var t=e.name,n=e.initialValue,r=e.children,i=e.rules,s=e.validateTrigger,a=e.isListField,l=o.useContext(Cr),c=o.useContext(xr),u=o.useRef({keys:[],id:0}).current,d=o.useMemo((function(){var e=di(l.prefixName)||[];return[].concat((0,tt.A)(e),(0,tt.A)(di(t)))}),[l.prefixName,t]),h=o.useMemo((function(){return(0,E.A)((0,E.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 r?((0,T.Ay)(!1,"Form.List only accepts function as children."),null):o.createElement(xr.Provider,{value:p},o.createElement(Cr.Provider,{value:h},o.createElement(Ci,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:i,validateTrigger:s,initialValue:n,isList:!0,isListField:null!=a?a:!!c},(function(e,t){var n=e.value,o=void 0===n?[]:n,i=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))),i([].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]),i([].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)})),i(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=gi(u.keys,e,t),i(gi(n,e,t)))}}},h=o||[];return Array.isArray(h)||(h=[]),r(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)}))))},Di.useForm=Mi,Di.useWatch=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],s=void 0===i?{}:i,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],f=(0,o.useMemo)((function(){return $i(h)}),[h]),m=(0,o.useRef)(f);m.current=f;var g=(0,o.useContext)(Cr),b=c||g,v=b&&b._init,y=di(r),w=(0,o.useRef)(y);return w.current=y,(0,o.useEffect)((function(){if(v){var e=b.getFieldsValue,t=(0,b.getInternalHooks)(yr).registerWatch,n=function(e,t){var n=l.preserve?t:e;return"function"==typeof r?r(n):(0,P.A)(n,w.current)},o=t((function(e,t){var o=n(e,t),r=$i(o);m.current!==r&&(m.current=r,p(o))})),i=n(e(),e(!0));return h!==i&&p(i),o}}),[v]),h};const Ni=o.createContext({}),Li=({children:e,status:t,override:n})=>{const r=o.useContext(Ni),i=o.useMemo((()=>{const e=Object.assign({},r);return n&&delete e.isFormItemInput,t&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[t,n,r]);return o.createElement(Ni.Provider,{value:i},e)},Hi=o.createContext(void 0),zi=o.createContext(null),Fi=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,$o.dF)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},(0,$o.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,$o.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,$o.jk)(e))},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,mo.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,mo.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 ji(e,t){const n=Ro(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[Fi(n)]}const Bi=No("Checkbox",((e,{prefixCls:t})=>[ji(t,e)]));function _i(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 Vi=(e,t)=>{var n;const{prefixCls:r,className:i,rootClassName:s,children:a,indeterminate:l=!1,style:c,onMouseEnter:u,onMouseLeave:d,skipGroup:h=!1,disabled:p}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:m,direction:b,checkbox:v}=o.useContext(ho.QO),y=o.useContext(zi),{isFormItemInput:w}=o.useContext(Ni),C=o.useContext(br.A),x=null!==(n=(null==y?void 0:y.disabled)||p)&&void 0!==n?n:C,S=o.useRef(f.value),A=o.useRef(null),E=(0,g.K4)(t,A);o.useEffect((()=>{null==y||y.registerValue(f.value)}),[]),o.useEffect((()=>{if(!h)return f.value!==S.current&&(null==y||y.cancelValue(S.current),null==y||y.registerValue(f.value),S.current=f.value),()=>null==y?void 0:y.cancelValue(f.value)}),[f.value]),o.useEffect((()=>{var e;(null===(e=A.current)||void 0===e?void 0:e.input)&&(A.current.input.indeterminate=l)}),[l]);const k=m("checkbox",r),R=vr(k),[I,P,T]=Bi(k,R),O=Object.assign({},f);y&&!h&&(O.onChange=(...e)=>{f.onChange&&f.onChange.apply(f,e),y.toggleOption&&y.toggleOption({label:a,value:f.value})},O.name=y.name,O.checked=y.value.includes(f.value));const $=M()(`${k}-wrapper`,{[`${k}-rtl`]:"rtl"===b,[`${k}-wrapper-checked`]:O.checked,[`${k}-wrapper-disabled`]:x,[`${k}-wrapper-in-form-item`]:w},null==v?void 0:v.className,i,s,T,R,P),D=M()({[`${k}-indeterminate`]:l},jo,P),[N,L]=_i(O.onClick);return I(o.createElement(gr,{component:"Checkbox",disabled:x},o.createElement("label",{className:$,style:Object.assign(Object.assign({},null==v?void 0:v.style),c),onMouseEnter:u,onMouseLeave:d,onClick:N},o.createElement(uo,Object.assign({},O,{onClick:L,prefixCls:k,className:D,disabled:x,ref:E})),null!=a&&o.createElement("span",{className:`${k}-label`},a))))},Wi=o.forwardRef(Vi);const Gi=o.forwardRef(((e,t)=>{const{defaultValue:n,children:r,options:i=[],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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:h,direction:p}=o.useContext(ho.QO),[f,m]=o.useState(d.value||n||[]),[g,b]=o.useState([]);o.useEffect((()=>{"value"in d&&m(d.value||[])}),[d.value]);const v=o.useMemo((()=>i.map((e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e))),[i]),y=e=>{b((t=>t.filter((t=>t!==e))))},w=e=>{b((t=>[].concat((0,tt.A)(t),[e])))},C=e=>{const t=f.indexOf(e.value),n=(0,tt.A)(f);-1===t?n.push(e.value):n.splice(t,1),"value"in d||m(n),null==u||u(n.filter((e=>g.includes(e))).sort(((e,t)=>v.findIndex((t=>t.value===e))-v.findIndex((e=>e.value===t)))))},x=h("checkbox",s),S=`${x}-group`,A=vr(x),[E,k,R]=Bi(x,A),I=$n(d,["value","disabled"]),P=i.length?v.map((e=>o.createElement(Wi,{prefixCls:x,key:e.value.toString(),disabled:"disabled"in e?e.disabled:d.disabled,value:e.value,checked:f.includes(e.value),onChange:e.onChange,className:M()(`${S}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label))):r,T=o.useMemo((()=>({toggleOption:C,value:f,disabled:d.disabled,name:d.name,registerValue:w,cancelValue:y})),[C,f,d.disabled,d.name,w,y]),O=M()(S,{[`${S}-rtl`]:"rtl"===p},a,l,R,A,k);return E(o.createElement("div",Object.assign({className:O,style:c},I,{ref:t}),o.createElement(zi.Provider,{value:T},P)))})),Ki=Gi,Ui=Wi;Ui.Group=Ki,Ui.__ANT_CHECKBOX=!0;const qi=Ui,Xi={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 Yi=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Xi}))};const Qi=o.forwardRef(Yi),Ji={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 Zi=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Ji}))};const es=o.forwardRef(Zi),ts=o.createContext(null);var ns=[],os="rc-util-locker-".concat(Date.now()),rs=0;var is=!1,ss=function(e){return!1!==e&&((0,Ie.A)()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},as=o.forwardRef((function(e,t){var n=e.open,r=e.autoLock,i=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),f=p[0],m=p[1],b=f||n;o.useEffect((function(){(l||n)&&m(n)}),[n,l]);var v=o.useState((function(){return ss(i)})),y=(0,a.A)(v,2),w=y[0],C=y[1];o.useEffect((function(){var e=ss(i);C(null!=e?e:null)}));var x=function(e){var t=o.useState((function(){return(0,Ie.A)()?document.createElement("div"):null})),n=(0,a.A)(t,1)[0],r=o.useRef(!1),i=o.useContext(ts),s=o.useState(ns),l=(0,a.A)(s,2),u=l[0],d=l[1],h=i||(r.current?void 0:function(e){d((function(t){return[e].concat((0,tt.A)(t))}))});function p(){n.parentElement||document.body.appendChild(n),r.current=!0}function f(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),r.current=!1}return(0,c.A)((function(){return e?i?i(p):p():f(),f}),[e]),(0,c.A)((function(){u.length&&(u.forEach((function(e){return e()})),d(ns))}),[u]),[n,h]}(b&&!w),S=(0,a.A)(x,2),A=S[0],E=S[1],k=null!=w?w:A;!function(e){var t=!!e,n=o.useState((function(){return rs+=1,"".concat(os,"_").concat(rs)})),r=(0,a.A)(n,1)[0];(0,c.A)((function(){if(t){var e=Ne(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}"),r)}else(0,Oe.m6)(r);return function(){(0,Oe.m6)(r)}}),[t,r])}(r&&n&&(0,Ie.A)()&&(k===A||k===document.body));var R=null;u&&(0,g.f3)(u)&&t&&(R=u.ref);var M=(0,g.xK)(R,t);if(!b||!(0,Ie.A)()||void 0===w)return null;var I=!1===k||is,P=u;return t&&(P=o.cloneElement(u,{ref:M})),o.createElement(ts.Provider,{value:E},I?P:(0,d.createPortal)(P,k))}));const ls=as;var cs=0,us=(0,E.A)({},r).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),r=n[0],i=n[1];return o.useEffect((function(){var e=cs;cs+=1,i("rc_unique_".concat(e))}),[]),e||r},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,r=e.arrow,i=e.arrowPos,s=r||{},a=s.className,l=s.content,c=i.x,u=void 0===c?0:c,d=i.y,h=void 0===d?0:d,p=o.useRef();if(!n||!n.points)return null;var f={position:"absolute"};if(!1!==n.autoArrow){var m=n.points[0],g=n.points[1],b=m[0],v=m[1],y=g[0],w=g[1];b!==y&&["t","b"].includes(b)?"t"===b?f.top=0:f.bottom=0:f.top=h,v!==w&&["l","r"].includes(v)?"l"===v?f.left=0:f.right=0:f.left=u}return o.createElement("div",{ref:p,className:M()("".concat(t,"-arrow"),a),style:f},l)}function fs(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,s=e.motion;return i?o.createElement(Bo.Ay,(0,m.A)({},s,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return o.createElement("div",{style:{zIndex:r},className:M()("".concat(t,"-mask"),n)})})):null}const ms=o.memo((function(e){return e.children}),(function(e,t){return t.cache}));var gs=o.forwardRef((function(e,t){var n=e.popup,r=e.className,i=e.prefixCls,s=e.style,l=e.target,u=e.onVisibleChanged,d=e.open,h=e.keepDom,p=e.fresh,f=e.onClick,b=e.mask,v=e.arrow,y=e.arrowPos,w=e.align,C=e.motion,x=e.maskMotion,S=e.forceRender,A=e.getPopupContainer,k=e.autoDestroy,R=e.portal,I=e.zIndex,P=e.onMouseEnter,T=e.onMouseLeave,O=e.onPointerEnter,$=e.onPointerDownCapture,D=e.ready,N=e.offsetX,L=e.offsetY,H=e.offsetR,z=e.offsetB,F=e.onAlign,j=e.onPrepare,B=e.stretch,_=e.targetWidth,V=e.targetHeight,W="function"==typeof n?n():n,G=d||h,K=(null==A?void 0:A.length)>0,U=o.useState(!A||!K),q=(0,a.A)(U,2),X=q[0],Y=q[1];if((0,c.A)((function(){!X&&K&&l&&Y(!0)}),[X,K,l]),!X)return null;var Q="auto",J={left:"-1000vw",top:"-1000vh",right:Q,bottom:Q};if(D||!d){var Z,ee=w.points,te=w.dynamicInset||(null===(Z=w._experimental)||void 0===Z?void 0:Z.dynamicInset),ne=te&&"r"===ee[0][1],oe=te&&"b"===ee[0][0];ne?(J.right=H,J.left=Q):(J.left=N,J.right=Q),oe?(J.bottom=z,J.top=Q):(J.top=L,J.bottom=Q)}var re={};return B&&(B.includes("height")&&V?re.height=V:B.includes("minHeight")&&V&&(re.minHeight=V),B.includes("width")&&_?re.width=_:B.includes("minWidth")&&_&&(re.minWidth=_)),d||(re.pointerEvents="none"),o.createElement(R,{open:S||G,getContainer:A&&function(){return A(l)},autoDestroy:k},o.createElement(fs,{prefixCls:i,open:d,zIndex:I,mask:b,motion:x}),o.createElement(Me,{onResize:F,disabled:!d},(function(e){return o.createElement(Bo.Ay,(0,m.A)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:S,leavedClassName:"".concat(i,"-hidden")},C,{onAppearPrepare:j,onEnterPrepare:j,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()(i,l,r);return o.createElement("div",{ref:(0,g.K4)(e,t,a),className:u,style:(0,E.A)((0,E.A)((0,E.A)((0,E.A)({"--arrow-x":"".concat(y.x||0,"px"),"--arrow-y":"".concat(y.y||0,"px")},J),re),c),{},{boxSizing:"border-box",zIndex:I},s),onMouseEnter:P,onMouseLeave:T,onPointerEnter:O,onClick:f,onPointerDownCapture:$},v&&o.createElement(ps,{prefixCls:i,arrow:v,arrowPos:y,align:w}),o.createElement(ms,{cache:!d&&!p},W))}))})))}));const bs=gs,vs=o.forwardRef((function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=(0,g.f3)(n),s=o.useCallback((function(e){(0,g.Xf)(t,r?r(e):e)}),[r]),a=(0,g.xK)(s,(0,g.A9)(n));return i?o.cloneElement(n,{ref:a}):n})),ys=o.createContext(null);function ws(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 Ss(e){return e.ownerDocument.defaultView}function As(e){for(var t=[],n=null==e?void 0:e.parentElement,o=["hidden","scroll","clip","auto"];n;){var r=Ss(n).getComputedStyle(n);[r.overflowX,r.overflowY,r.overflow].some((function(e){return o.includes(e)}))&&t.push(n),n=n.parentElement}return t}function Es(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function ks(e){return Es(parseFloat(e),0)}function Rs(e,t){var n=(0,E.A)({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=Ss(e).getComputedStyle(e),o=t.overflow,r=t.overflowClipMargin,i=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,f=ks(i),m=ks(s),g=ks(a),b=ks(l),v=Es(Math.round(c.width/h*1e3)/1e3),y=Es(Math.round(c.height/u*1e3)/1e3),w=(h-p-g-b)*v,C=(u-d-f-m)*y,x=f*y,S=m*y,A=g*v,E=b*v,k=0,R=0;if("clip"===o){var M=ks(r);k=M*v,R=M*y}var I=c.x+A-k,P=c.y+x-R,T=I+c.width+2*k-A-E-w,O=P+c.height+2*R-x-S-C;n.left=Math.max(n.left,I),n.top=Math.max(n.top,P),n.right=Math.min(n.right,T),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 Is(e,t){var n=t||[],o=(0,a.A)(n,2),r=o[0],i=o[1];return[Ms(e.width,r),Ms(e.height,i)]}function Ps(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function Ts(e,t){var n,o=t[0],r=t[1];return n="t"===o?e.y:"b"===o?e.y+e.height:e.y+e.height/2,{x:"l"===r?e.x:"r"===r?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 $s=["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 Ds=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ls,t=o.forwardRef((function(t,n){var r=t.prefixCls,i=void 0===r?"rc-trigger-popup":r,s=t.children,u=t.action,d=void 0===u?"hover":u,h=t.showAction,p=t.hideAction,f=t.popupVisible,m=t.defaultPopupVisible,g=t.onPopupVisibleChange,b=t.afterPopupVisibleChange,v=t.mouseEnterDelay,y=t.mouseLeaveDelay,w=void 0===y?.1:y,C=t.focusDelay,x=t.blurDelay,S=t.mask,A=t.maskClosable,k=void 0===A||A,R=t.getPopupContainer,I=t.forceRender,P=t.autoDestroy,T=t.destroyPopupOnHide,O=t.popup,$=t.popupClassName,D=t.popupStyle,N=t.popupPlacement,L=t.builtinPlacements,H=void 0===L?{}:L,z=t.popupAlign,F=t.zIndex,B=t.stretch,_=t.getPopupClassNameFromAlign,V=t.fresh,W=t.alignPoint,G=t.onPopupClick,K=t.onPopupAlign,U=t.arrow,X=t.popupMotion,Y=t.maskMotion,Q=t.popupTransitionName,J=t.popupAnimation,Z=t.maskTransitionName,ee=t.maskAnimation,te=t.className,ne=t.getTriggerDOMNode,oe=(0,j.A)(t,$s),re=P||T||!1,ie=o.useState(!1),se=(0,a.A)(ie,2),ae=se[0],le=se[1];(0,c.A)((function(){le(hs())}),[]);var ce=o.useRef({}),ue=o.useContext(ys),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),fe=(0,a.A)(pe,2),me=fe[0],ge=fe[1],be=o.useRef(null),ve=(0,l.A)((function(e){be.current=e,(0,q.fk)(e)&&me!==e&&ge(e),null==ue||ue.registerSubPopup(he,e)})),ye=o.useState(null),we=(0,a.A)(ye,2),Ce=we[0],xe=we[1],Se=o.useRef(null),Ae=(0,l.A)((function(e){(0,q.fk)(e)&&Ce!==e&&(xe(e),Se.current=e)})),Ee=o.Children.only(s),ke=(null==Ee?void 0:Ee.props)||{},Re={},Ie=(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==me?void 0:me.contains(e))||(null===(n=hn(me))||void 0===n?void 0:n.host)===e||e===me||Object.values(ce.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),Pe=xs(i,X,J,Q),Te=xs(i,Y,ee,Z),Oe=o.useState(m||!1),$e=(0,a.A)(Oe,2),De=$e[0],Ne=$e[1],Le=null!=f?f:De,He=(0,l.A)((function(e){void 0===f&&Ne(e)}));(0,c.A)((function(){Ne(f||!1)}),[f]);var ze=o.useRef(Le);ze.current=Le;var Fe=o.useRef([]);Fe.current=[];var je=(0,l.A)((function(e){var t;He(e),(null!==(t=Fe.current[Fe.current.length-1])&&void 0!==t?t:Le)!==e&&(Fe.current.push(e),null==g||g(e))})),Be=o.useRef(),_e=function(){clearTimeout(Be.current)},Ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_e(),0===t?je(e):Be.current=setTimeout((function(){je(e)}),1e3*t)};o.useEffect((function(){return _e}),[]);var We=o.useState(!1),Ge=(0,a.A)(We,2),Ke=Ge[0],Ue=Ge[1];(0,c.A)((function(e){e&&!Le||Ue(!0)}),[Le]);var Xe=o.useState(null),Ye=(0,a.A)(Xe,2),Qe=Ye[0],Je=Ye[1],Ze=o.useState(null),et=(0,a.A)(Ze,2),nt=et[0],ot=et[1],rt=function(e){ot([e.clientX,e.clientY])},it=function(e,t,n,r,i,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:i[r]||{}}),h=(0,a.A)(d,2),p=h[0],f=h[1],m=o.useRef(0),g=o.useMemo((function(){return t?As(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,m=p.ownerDocument,v=Ss(p),y=v.getComputedStyle(p).position,w=p.style.left,C=p.style.top,x=p.style.right,S=p.style.bottom,A=p.style.overflow,k=(0,E.A)((0,E.A)({},i[r]),s),R=m.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=y,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,I,P=n.getBoundingClientRect();P.x=null!==(M=P.x)&&void 0!==M?M:P.left,P.y=null!==(I=P.y)&&void 0!==I?I:P.top,h={x:P.x,y:P.y,width:P.width,height:P.height}}var T=p.getBoundingClientRect(),O=v.getComputedStyle(p),$=O.height,D=O.width;T.x=null!==(l=T.x)&&void 0!==l?l:T.left,T.y=null!==(c=T.y)&&void 0!==c?c:T.top;var N=m.documentElement,L=N.clientWidth,H=N.clientHeight,z=N.scrollWidth,F=N.scrollHeight,j=N.scrollTop,B=N.scrollLeft,_=T.height,V=T.width,W=h.height,G=h.width,K={left:0,top:0,right:L,bottom:H},U={left:-B,top:-j,right:z-B,bottom:F-j},X=k.htmlRegion,Y="visible",Q="visibleFirst";"scroll"!==X&&X!==Q&&(X=Y);var J=X===Q,Z=Rs(U,g),ee=Rs(K,g),te=X===Y?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=w,p.style.top=C,p.style.right=x,p.style.bottom=S,p.style.overflow=A,null===(d=p.parentElement)||void 0===d||d.removeChild(R);var re=Es(Math.round(V/parseFloat(D)*1e3)/1e3),ie=Es(Math.round(_/parseFloat($)*1e3)/1e3);if(0===re||0===ie||(0,q.fk)(n)&&!qe(n))return;var se=k.offset,ae=k.targetOffset,le=Is(T,se),ce=(0,a.A)(le,2),ue=ce[0],de=ce[1],he=Is(h,ae),pe=(0,a.A)(he,2),fe=pe[0],me=pe[1];h.x-=fe,h.y-=me;var ge=k.points||[],be=(0,a.A)(ge,2),ve=be[0],ye=Ps(be[1]),we=Ps(ve),Ce=Ts(h,ye),xe=Ts(T,we),Se=(0,E.A)({},k),Ae=Ce.x-xe.x+ue,Ee=Ce.y-xe.y+de;function yt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:te,o=T.x+e,r=T.y+t,i=o+V,s=r+_,a=Math.max(o,n.left),l=Math.max(r,n.top),c=Math.min(i,n.right),u=Math.min(s,n.bottom);return Math.max(0,(c-a)*(u-l))}var ke,Re,Me,Ie,Pe=yt(Ae,Ee),Te=yt(Ae,Ee,ee),Oe=Ts(h,["t","l"]),$e=Ts(T,["t","l"]),De=Ts(h,["b","r"]),Ne=Ts(T,["b","r"]),Le=k.overflow||{},He=Le.adjustX,ze=Le.adjustY,Fe=Le.shiftX,je=Le.shiftY,Be=function(e){return"boolean"==typeof e?e:e>=0};function wt(){ke=T.y+Ee,Re=ke+_,Me=T.x+Ae,Ie=Me+V}wt();var _e=Be(ze),Ve=we[0]===ye[0];if(_e&&"t"===we[0]&&(Re>ne.bottom||b.current.bt)){var We=Ee;Ve?We-=_-W:We=Oe.y-Ne.y-de;var Ge=yt(Ae,We),Ke=yt(Ae,We,ee);Ge>Pe||Ge===Pe&&(!J||Ke>=Te)?(b.current.bt=!0,Ee=We,de=-de,Se.points=[Os(we,0),Os(ye,0)]):b.current.bt=!1}if(_e&&"b"===we[0]&&(ke<ne.top||b.current.tb)){var Ue=Ee;Ve?Ue+=_-W:Ue=De.y-$e.y-de;var Xe=yt(Ae,Ue),Ye=yt(Ae,Ue,ee);Xe>Pe||Xe===Pe&&(!J||Ye>=Te)?(b.current.tb=!0,Ee=Ue,de=-de,Se.points=[Os(we,0),Os(ye,0)]):b.current.tb=!1}var Qe=Be(He),Je=we[1]===ye[1];if(Qe&&"l"===we[1]&&(Ie>ne.right||b.current.rl)){var Ze=Ae;Je?Ze-=V-G:Ze=Oe.x-Ne.x-ue;var et=yt(Ze,Ee),tt=yt(Ze,Ee,ee);et>Pe||et===Pe&&(!J||tt>=Te)?(b.current.rl=!0,Ae=Ze,ue=-ue,Se.points=[Os(we,1),Os(ye,1)]):b.current.rl=!1}if(Qe&&"r"===we[1]&&(Me<ne.left||b.current.lr)){var nt=Ae;Je?nt+=V-G:nt=De.x-$e.x-ue;var ot=yt(nt,Ee),rt=yt(nt,Ee,ee);ot>Pe||ot===Pe&&(!J||rt>=Te)?(b.current.lr=!0,Ae=nt,ue=-ue,Se.points=[Os(we,1),Os(ye,1)]):b.current.lr=!1}wt();var it=!0===Fe?0:Fe;"number"==typeof it&&(Me<ee.left&&(Ae-=Me-ee.left-ue,h.x+G<ee.left+it&&(Ae+=h.x-ee.left+G-it)),Ie>ee.right&&(Ae-=Ie-ee.right-ue,h.x>ee.right-it&&(Ae+=h.x-ee.right+it)));var st=!0===je?0:je;"number"==typeof st&&(ke<ee.top&&(Ee-=ke-ee.top-de,h.y+W<ee.top+st&&(Ee+=h.y-ee.top+W-st)),Re>ee.bottom&&(Ee-=Re-ee.bottom-de,h.y>ee.bottom-st&&(Ee+=h.y-ee.bottom+st)));var at=T.x+Ae,lt=at+V,ct=T.y+Ee,ut=ct+_,dt=h.x,ht=dt+G,pt=h.y,ft=pt+W,mt=(Math.max(at,dt)+Math.min(lt,ht))/2-at,gt=(Math.max(ct,pt)+Math.min(ut,ft))/2-ct;null==u||u(t,Se);var bt=oe.right-T.x-(Ae+T.width),vt=oe.bottom-T.y-(Ee+T.height);1===re&&(Ae=Math.round(Ae),bt=Math.round(bt)),1===ie&&(Ee=Math.round(Ee),vt=Math.round(vt)),f({ready:!0,offsetX:Ae/re,offsetY:Ee/ie,offsetR:bt/re,offsetB:vt/ie,arrowX:mt/re,arrowY:gt/ie,scaleX:re,scaleY:ie,align:Se})}})),y=function(){f((function(e){return(0,E.A)((0,E.A)({},e),{},{ready:!1})}))};return(0,c.A)(y,[r]),(0,c.A)((function(){e||y()}),[e]),[p.ready,p.offsetX,p.offsetY,p.offsetR,p.offsetB,p.arrowX,p.arrowY,p.scaleX,p.scaleY,p.align,function(){m.current+=1;var e=m.current;Promise.resolve().then((function(){m.current===e&&v()}))}]}(Le,me,W&&null!==nt?nt:Ce,N,H,z,K),st=(0,a.A)(it,11),at=st[0],lt=st[1],ct=st[2],ut=st[3],dt=st[4],ht=st[5],pt=st[6],ft=st[7],mt=st[8],gt=st[9],bt=st[10],vt=function(e,t,n,r){return o.useMemo((function(){var o=ws(null!=n?n:t),i=ws(null!=r?r:t),s=new Set(o),a=new Set(i);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,r])}(ae,d,h,p),yt=(0,a.A)(vt,2),wt=yt[0],Ct=yt[1],xt=wt.has("click"),St=Ct.has("click")||Ct.has("contextMenu"),At=(0,l.A)((function(){Ke||bt()}));!function(e,t,n,o){(0,c.A)((function(){if(e&&t&&n){var r=n,i=As(t),s=As(r),a=Ss(r),l=new Set([a].concat((0,tt.A)(i),(0,tt.A)(s)));function c(){o(),ze.current&&W&&St&&Ve(!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,me,At),(0,c.A)((function(){At()}),[nt,N]),(0,c.A)((function(){!Le||null!=H&&H[N]||At()}),[JSON.stringify(z)]);var Et=o.useMemo((function(){var e=function(e,t,n,o){for(var r=n.points,i=Object.keys(e),s=0;s<i.length;s+=1){var a,l=i[s];if(Cs(null===(a=e[l])||void 0===a?void 0:a.points,r,o))return"".concat(t,"-placement-").concat(l)}return""}(H,i,gt,W);return M()(e,null==_?void 0:_(gt))}),[gt,_,H,i,W]);o.useImperativeHandle(n,(function(){return{nativeElement:Se.current,popupElement:be.current,forceAlign:At}}));var kt=o.useState(0),Rt=(0,a.A)(kt,2),Mt=Rt[0],It=Rt[1],Pt=o.useState(0),Tt=(0,a.A)(Pt,2),Ot=Tt[0],$t=Tt[1],Dt=function(){if(B&&Ce){var e=Ce.getBoundingClientRect();It(e.width),$t(e.height)}};function Nt(e,t,n,o){Re[e]=function(r){var i;null==o||o(r),Ve(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===(i=ke[e])||void 0===i||i.call.apply(i,[ke,r].concat(a))}}(0,c.A)((function(){Qe&&(bt(),Qe(),Je(null))}),[Qe]),(xt||St)&&(Re.onClick=function(e){var t;ze.current&&St?Ve(!1):!ze.current&&xt&&(rt(e),Ve(!0));for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];null===(t=ke.onClick)||void 0===t||t.call.apply(t,[ke,e].concat(o))});var Lt,Ht,zt=function(e,t,n,r,i,s,a,l){var c=o.useRef(e);c.current=e;var u=o.useRef(!1);return o.useEffect((function(){if(t&&r&&(!i||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=Ss(r);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,r,i,s]),function(){u.current=!0}}(Le,St,Ce,me,S,k,Ie,Ve),Ft=wt.has("hover"),jt=Ct.has("hover");Ft&&(Nt("onMouseEnter",!0,v,(function(e){rt(e)})),Nt("onPointerEnter",!0,v,(function(e){rt(e)})),Lt=function(e){(Le||Ke)&&null!=me&&me.contains(e.target)&&Ve(!0,v)},W&&(Re.onMouseMove=function(e){var t;null===(t=ke.onMouseMove)||void 0===t||t.call(ke,e)})),jt&&(Nt("onMouseLeave",!1,w),Nt("onPointerLeave",!1,w),Ht=function(){Ve(!1,w)}),wt.has("focus")&&Nt("onFocus",!0,C),Ct.has("focus")&&Nt("onBlur",!1,x),wt.has("contextMenu")&&(Re.onContextMenu=function(e){var t;ze.current&&Ct.has("contextMenu")?Ve(!1):(rt(e),Ve(!0)),e.preventDefault();for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];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,E.A)((0,E.A)({},ke),Re),_t={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){oe[e]&&(_t[e]=function(){for(var t,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];null===(t=Bt[e])||void 0===t||t.call.apply(t,[Bt].concat(o)),oe[e].apply(oe,o)})}));var Vt=o.cloneElement(Ee,(0,E.A)((0,E.A)({},Bt),_t)),Wt={x:ht,y:pt},Gt=U?(0,E.A)({},!0!==U?U:{}):null;return o.createElement(o.Fragment,null,o.createElement(Me,{disabled:!Le,ref:Ae,onResize:function(){Dt(),At()}},o.createElement(vs,{getTriggerDOMNode:ne},Vt)),o.createElement(ys.Provider,{value:de},o.createElement(bs,{portal:e,ref:ve,prefixCls:i,popup:O,className:M()($,Et),style:D,target:Ce,onMouseEnter:Lt,onMouseLeave:Ht,onPointerEnter:Lt,zIndex:F,open:Le,keepDom:Ke,fresh:V,onClick:G,onPointerDownCapture:zt,mask:S,motion:Pe,maskMotion:Te,onVisibleChanged:function(e){Ue(!1),bt(),null==b||b(e)},onPrepare:function(){return new Promise((function(e){Dt(),Je((function(){return e}))}))},forceRender:I,autoDestroy:re,getPopupContainer:R,align:gt,arrow:Gt,arrowPos:Wt,ready:at,offsetX:lt,offsetY:ct,offsetR:ut,offsetB:dt,onAlign:At,stretch:B,targetWidth:Mt/ft,targetHeight:Ot/mt})))}));return t}(ls);var Ns={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>=Ns.F1&&t<=Ns.F12)return!1;switch(t){case Ns.ALT:case Ns.CAPS_LOCK:case Ns.CONTEXT_MENU:case Ns.CTRL:case Ns.DOWN:case Ns.END:case Ns.ESC:case Ns.HOME:case Ns.INSERT:case Ns.LEFT:case Ns.MAC_FF_META:case Ns.META:case Ns.NUMLOCK:case Ns.NUM_CENTER:case Ns.PAGE_DOWN:case Ns.PAGE_UP:case Ns.PAUSE:case Ns.PRINT_SCREEN:case Ns.RIGHT:case Ns.SHIFT:case Ns.UP:case Ns.WIN_KEY:case Ns.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Ns.ZERO&&e<=Ns.NINE)return!0;if(e>=Ns.NUM_ZERO&&e<=Ns.NUM_MULTIPLY)return!0;if(e>=Ns.A&&e<=Ns.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Ns.SPACE:case Ns.QUESTION_MARK:case Ns.NUM_PLUS:case Ns.NUM_MINUS:case Ns.NUM_PERIOD:case Ns.NUM_DIVISION:case Ns.SEMICOLON:case Ns.DASH:case Ns.EQUALS:case Ns.COMMA:case Ns.PERIOD:case Ns.SLASH:case Ns.APOSTROPHE:case Ns.SINGLE_QUOTE:case Ns.OPEN_SQUARE_BRACKET:case Ns.BACKSLASH:case Ns.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const Ls=Ns;var Hs=Ls.ESC,zs=Ls.TAB;const Fs=(0,o.forwardRef)((function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,s=(0,o.useMemo)((function(){return"function"==typeof n?n():n}),[n]),a=(0,g.K4)(t,(0,g.A9)(s));return o.createElement(o.Fragment,null,r&&o.createElement("div",{className:"".concat(i,"-arrow")}),o.cloneElement(s,{ref:(0,g.f3)(s)?a:void 0}))}));var js={adjustX:1,adjustY:1},Bs=[0,0];const _s={topLeft:{points:["bl","tl"],overflow:js,offset:[0,-4],targetOffset:Bs},top:{points:["bc","tc"],overflow:js,offset:[0,-4],targetOffset:Bs},topRight:{points:["br","tr"],overflow:js,offset:[0,-4],targetOffset:Bs},bottomLeft:{points:["tl","bl"],overflow:js,offset:[0,4],targetOffset:Bs},bottom:{points:["tc","bc"],overflow:js,offset:[0,4],targetOffset:Bs},bottomRight:{points:["tr","br"],overflow:js,offset:[0,4],targetOffset:Bs}};var Vs=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Ws(e,t){var n,r=e.arrow,i=void 0!==r&&r,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,f=e.placements,b=void 0===f?_s:f,v=e.getPopupContainer,y=e.showAction,w=e.hideAction,C=e.overlayClassName,x=e.overlayStyle,S=e.visible,A=e.trigger,E=void 0===A?["hover"]:A,R=e.autoFocus,I=e.overlay,P=e.children,T=e.onVisibleChange,O=(0,j.A)(e,Vs),$=o.useState(),D=(0,a.A)($,2),N=D[0],L=D[1],H="visible"in e?S:N,z=o.useRef(null),F=o.useRef(null),B=o.useRef(null);o.useImperativeHandle(t,(function(){return z.current}));var _=function(e){L(e),null==T||T(e)};!function(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=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==r||r(!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 Hs:l();break;case zs:var t=!1;a.current||(t=c()),t?e.preventDefault():l()}};o.useEffect((function(){return t?(window.addEventListener("keydown",u),i&&(0,bt.A)(c,3),function(){window.removeEventListener("keydown",u),a.current=!1}):function(){a.current=!1}}),[t])}({visible:H,triggerRef:B,onVisibleChange:_,autoFocus:R,overlayRef:F});var V,W,G,K=function(){return o.createElement(Fs,{ref:F,overlay:I,prefixCls:l,arrow:i})},U=o.cloneElement(P,{className:M()(null===(n=P.props)||void 0===n?void 0:n.className,H&&(V=e.openClassName,void 0!==V?V:"".concat(l,"-open"))),ref:(0,g.f3)(P)?(0,g.K4)(B,(0,g.A9)(P)):void 0}),q=w;return q||-1===E.indexOf("contextMenu")||(q=["click"]),o.createElement(Ds,(0,m.A)({builtinPlacements:b},O,{prefixCls:l,ref:z,popupClassName:M()(C,(0,k.A)({},"".concat(l,"-show-arrow"),i)),popupStyle:x,action:E,showAction:y,hideAction:q,popupPlacement:p,popupAlign:d,popupTransitionName:c,popupAnimation:u,popupVisible:H,stretch:(W=e.minOverlayWidthMatchTrigger,G=e.alignPoint,("minOverlayWidthMatchTrigger"in e?W:!G)?"minWidth":""),popup:"function"==typeof I?K:K(),onPopupVisibleChange:_,onPopupClick:function(t){var n=e.onOverlayClick;L(!1),n&&n(t)},getPopupContainer:v}),U)}const Gs=o.forwardRef(Ws),Ks=o.createContext(void 0),Us=100,qs={Modal:Us,Drawer:Us,Popover:Us,Popconfirm:Us,Tooltip:Us,Tour:Us,FloatButton:Us},Xs={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},Ys=(e,t)=>{const[,n]=(0,Do.Ay)(),r=o.useContext(Ks),i=e in qs;let s;if(void 0!==t)s=[t,t];else{let o=null!=r?r:0;o+=i?(r?0:n.zIndexPopupBase)+qs[e]:Xs[e],s=[void 0===r?t:o,o]}return s};function Qs(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:o}=e,r=t/2,i=r,s=1*o/Math.sqrt(2),a=r-o*(1-1/Math.sqrt(2)),l=r-n*(1/Math.sqrt(2)),c=o*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),u=2*r-l,d=c,h=2*r-s,p=a,f=2*r-0,m=i,g=r*Math.sqrt(2)+o*(Math.sqrt(2)-2),b=o*(Math.sqrt(2)-1);return{arrowShadowWidth:g,arrowPath:`path('M 0 ${i} 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 ${f} ${m} Z')`,arrowPolygon:`polygon(${b}px 100%, 50% ${b}px, ${2*r-b}px 100%, ${b}px 100%)`}}const Js=(e,t,n)=>{const{sizePopupArrow:o,arrowPolygon:r,arrowPath:i,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:[r,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,mo.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:r,arrowOffsetVertical:i,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,r)),{"&: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,mo.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,mo.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:i},[`&-placement-leftBottom > ${o}-arrow`]:{bottom:i}})),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:i},[`&-placement-rightBottom > ${o}-arrow`]:{bottom:i}}))}}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"]}},ra=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function ia(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:o,offset:r,borderRadius:i,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,ra.has(e)&&(u.autoArrow=!1),e){case"top":case"topLeft":case"topRight":u.offset[1]=-a-r;break;case"bottom":case"bottomLeft":case"bottomRight":u.offset[1]=a+r;break;case"left":case"leftTop":case"leftBottom":u.offset[0]=-a-r;break;case"right":case"rightTop":case"rightBottom":u.offset[0]=a+r}const d=Zs({contentRadius:i,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 r=o&&"object"==typeof o?o:{},i={};switch(e){case"top":case"bottom":i.shiftX=2*t.arrowOffsetHorizontal+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=2*t.arrowOffsetVertical+n,i.shiftX=!0,i.adjustX=!0}const s=Object.assign(Object.assign({},i),r);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,r,i)=>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),[f,m]=(0,so.A)(!1,{value:s.open}),{getPrefixCls:g}=o.useContext(ho.QO),b=g(r||"select",a);o.useEffect((()=>{if(m(!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=i?`.${i(b)}`:`.${b}-dropdown`,r=null===(n=c.current)||void 0===n?void 0:n.querySelector(o);r&&(clearInterval(t),e.observe(r))}),10);return()=>{clearInterval(t),e.disconnect()}}}),[]);let v=Object.assign(Object.assign({},s),{style:Object.assign(Object.assign({},l),{margin:0}),open:f,visible:f,getPopupContainer:()=>c.current});n&&(v=n(v)),t&&Object.assign(v,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const y={paddingBottom:u,position:"relative",minWidth:h};return o.createElement("div",{ref:c,style:y},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,r=e.invalidate,i=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,f=e.display,g=e.order,b=e.component,v=void 0===b?"div":b,y=(0,j.A)(e,la),w=a&&!f;function C(e){c(u,e)}o.useEffect((function(){return function(){C(null)}}),[]);var x,S=s&&i!==ca?s(i,{index:g}):p;r||(x={opacity:w?0:1,height:w?0:ca,overflowY:w?"hidden":ca,order:a?g:ca,pointerEvents:w?"none":ca,position:w?"absolute":ca});var A={};w&&(A["aria-hidden"]=!0);var k=o.createElement(v,(0,m.A)({className:M()(!r&&n,d),style:(0,E.A)((0,E.A)({},x),h)},A,y,{ref:t}),S);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),r=(0,a.A)(n,2),i=r[0],s=r[1];return[i,(0,l.A)((function(t){e((function(){s(t)}))}))]}var fa=o.createContext(null),ma=["component"],ga=["className"],ba=["className"],va=function(e,t){var n=o.useContext(fa);if(!n){var r=e.component,i=void 0===r?"div":r,s=(0,j.A)(e,ma);return o.createElement(i,(0,m.A)({},s,{ref:t}))}var a=n.className,l=(0,j.A)(n,ga),c=e.className,u=(0,j.A)(e,ba);return o.createElement(fa.Provider,{value:null},o.createElement(ha,(0,m.A)({ref:t,className:M()(a,c)},l,u)))},ya=o.forwardRef(va);ya.displayName="RawItem";const wa=ya;var Ca=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],xa="responsive",Sa="invalidate";function Aa(e){return"+ ".concat(e.length," ...")}function Ea(e,t){var n,r=e.prefixCls,i=void 0===r?"rc-overflow":r,s=e.data,l=void 0===s?[]:s,u=e.renderItem,h=e.renderRawItem,p=e.itemKey,f=e.itemWidth,g=void 0===f?10:f,b=e.ssr,v=e.style,y=e.className,w=e.maxCount,C=e.renderRest,x=e.renderRawRest,S=e.suffix,A=e.component,k=void 0===A?"div":A,R=e.itemComponent,I=e.onVisibleChange,P=(0,j.A)(e,Ca),T="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)}),$=pa(O,null),D=(0,a.A)($,2),N=D[0],L=D[1],H=N||0,z=pa(O,new Map),F=(0,a.A)(z,2),B=F[0],_=F[1],V=pa(O,0),W=(0,a.A)(V,2),G=W[0],K=W[1],U=pa(O,0),q=(0,a.A)(U,2),X=q[0],Y=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],re=ne[1],ie=(0,o.useState)(null),se=(0,a.A)(ie,2),ae=se[0],le=se[1],ce=o.useMemo((function(){return null===ae&&T?Number.MAX_SAFE_INTEGER:ae||0}),[ae,N]),ue=(0,o.useState)(!1),de=(0,a.A)(ue,2),he=de[0],pe=de[1],fe="".concat(i,"-item"),me=Math.max(G,X),ge=w===xa,be=l.length&&ge,ve=w===Sa,ye=be||"number"==typeof w&&l.length>w,we=(0,o.useMemo)((function(){var e=l;return be?e=null===N&&T?l:l.slice(0,Math.min(l.length,H/g)):"number"==typeof w&&(e=l.slice(0,w)),e}),[l,g,N,w,be]),Ce=(0,o.useMemo)((function(){return be?l.slice(ce+1):l.slice(we.length)}),[l,we,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]),Se=(0,o.useCallback)(u||function(e){return e},[u]);function Ae(e,t,n){(ae!==e||void 0!==t&&t!==oe)&&(le(e),n||(pe(e<l.length-1),null==I||I(e)),void 0!==t&&re(t))}function Ee(e,t){_((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(we[e],e))}(0,c.A)((function(){if(H&&"number"==typeof me&&we){var e=Z,t=we.length,n=t-1;if(!t)return void Ae(0,null);for(var o=0;o<t;o+=1){var r=ke(o);if(T&&(r=r||0),void 0===r){Ae(o-1,void 0,!0);break}if(e+=r,0===n&&e<=H||o===n-1&&e+ke(n)<=H){Ae(n,null);break}if(e+me>H){Ae(o-1,e-r-Z+X);break}}S&&ke(0)+Z>H&&re(null)}}),[H,B,X,Z,xe,we]);var Re=he&&!!Ce.length,Ie={};null!==oe&&be&&(Ie={position:"absolute",left:oe,top:0});var Pe={prefixCls:fe,responsive:be,component:R,invalidate:ve},Te=h?function(e,t){var n=xe(e,t);return o.createElement(fa.Provider,{key:n,value:(0,E.A)((0,E.A)({},Pe),{},{order:t,item:e,itemKey:n,registerSize:Ee,display:t<=ce})},h(e,t))}:function(e,t){var n=xe(e,t);return o.createElement(ha,(0,m.A)({},Pe,{order:t,key:n,item:e,renderItem:Se,itemKey:n,registerSize:Ee,display:t<=ce}))},Oe={order:Re?ce:Number.MAX_SAFE_INTEGER,className:"".concat(fe,"-rest"),registerSize:function(e,t){Y(t),K(X)},display:Re},$e=C||Aa,De=x?o.createElement(fa.Provider,{value:(0,E.A)((0,E.A)({},Pe),Oe)},x(Ce)):o.createElement(ha,(0,m.A)({},Pe,Oe),"function"==typeof $e?$e(Ce):$e),Ne=o.createElement(k,(0,m.A)({className:M()(!ve&&i,y),style:v,ref:t},P),we.map(Te),ye?De:null,S&&o.createElement(ha,(0,m.A)({},Pe,{responsive:ge,responsiveDisabled:!be,order:ce,className:"".concat(fe,"-suffix"),registerSize:function(e,t){ee(t)},display:!0,style:Ie}),S));return ge?o.createElement(Me,{onResize:function(e,t){L(t.clientWidth)},disabled:!be},Ne):Ne}var ka=o.forwardRef(Ea);ka.displayName="Overflow",ka.Item=wa,ka.RESPONSIVE=xa,ka.INVALIDATE=Sa;const Ra=ka;var Ma=o.createContext(null);function Ia(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function Pa(e){return Ia(o.useContext(Ma),e)}var Ta=["children","locked"],Oa=o.createContext(null);function $a(e){var t=e.children,n=e.locked,r=(0,j.A)(e,Ta),i=o.useContext(Oa),s=(0,I.A)((function(){return e=i,t=r,n=(0,E.A)({},e),Object.keys(t).forEach((function(e){var o=t[e];void 0!==o&&(n[e]=o)})),n;var e,t,n}),[i,r],(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 Da=[],Na=o.createContext(null);function La(){return o.useContext(Na)}var Ha=o.createContext(Da);function za(e){var t=o.useContext(Ha);return o.useMemo((function(){return void 0!==e?[].concat((0,tt.A)(t),[e]):t}),[t,e])}var Fa=o.createContext(null);const ja=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"),r=e.getAttribute("tabindex"),i=Number(r),s=null;return r&&!Number.isNaN(i)?s=i:o&&null===s&&(s=0),o&&e.disabled&&(s=null),null!==s&&(s>=0||t&&s<0)}return!1}var _a=Ls.LEFT,Va=Ls.RIGHT,Wa=Ls.UP,Ga=Ls.DOWN,Ka=Ls.ENTER,Ua=Ls.ESC,qa=Ls.HOME,Xa=Ls.END,Ya=[Wa,Ga,_a,Va];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 r=Qa(e,t),i=r.length,s=r.findIndex((function(e){return n===e}));return o<0?-1===s?s=i-1:s-=1:o>0&&(s+=1),r[s=(s+i)%i]}var Za=function(e,t){var n=new Set,o=new Map,r=new Map;return e.forEach((function(e){var i=document.querySelector("[data-menu-id='".concat(Ia(t,e),"']"));i&&(n.add(i),r.set(i,e),o.set(e,i))})),{elements:n,key2element:o,element2key:r}};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),r=0;r<n;r++)o[r]=arguments[r];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(o))}),[]);return e?n:void 0}var rl=Math.random().toFixed(5).toString().slice(2),il=0;function sl(e,t,n,r){var i=o.useContext(Oa),s=i.activeKey,a=i.onActive,l=i.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==r||r({key:e,domEvent:t}),l(e)}),c}function al(e){var t=o.useContext(Oa),n=t.mode,r=t.rtl,i=t.inlineIndent;return"inline"!==n?null:r?{paddingRight:e*i}:{paddingLeft:e*i}}function ll(e){var t,n=e.icon,r=e.props,i=e.children;return null===n||!1===n?null:("function"==typeof n?t=o.createElement(n,(0,E.A)({},r)):"boolean"!=typeof n&&(t=n),t||i||null)}var cl=["item"];function ul(e){var t=e.item,n=(0,j.A)(e,cl);return Object.defineProperty(n,"item",{get:function(){return(0,T.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"],fl=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(){return(0,ye.A)(this,n),t.apply(this,arguments)}return(0,we.A)(n,[{key:"render",value:function(){var e=this.props,t=e.title,n=e.attribute,r=e.elementRef,i=$n((0,j.A)(e,dl),["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,T.Ay)(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),o.createElement(Ra.Item,(0,m.A)({},n,{title:"string"==typeof t?t:void 0},i,{ref:r}))}}]),n}(o.Component),ml=o.forwardRef((function(e,t){var n=e.style,r=e.className,i=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,f=e.onFocus,b=(0,j.A)(e,hl),v=Pa(i),y=o.useContext(Oa),w=y.prefixCls,C=y.onItemClick,x=y.disabled,S=y.overflowDisabled,A=y.itemIcon,R=y.selectedKeys,I=y.onActive,P=o.useContext(ja)._internalRenderMenuItem,T="".concat(w,"-item"),O=o.useRef(),$=o.useRef(),D=x||s,N=(0,g.xK)(t,$),L=za(i),H=function(e){return{key:i,keyPath:(0,tt.A)(L).reverse(),item:O.current,domEvent:e}},z=a||A,F=sl(i,D,u,d),B=F.active,_=(0,j.A)(F,pl),V=R.includes(i),W=al(L.length),G={};"option"===e.role&&(G["aria-selected"]=V);var K=o.createElement(fl,(0,m.A)({ref:O,elementRef:N,role:null===c?"none":c||"menuitem",tabIndex:s?null:-1,"data-menu-id":S&&v?null:v},$n(b,["extra"]),_,G,{component:"li","aria-disabled":s,style:(0,E.A)((0,E.A)({},W),n),className:M()(T,(0,k.A)((0,k.A)((0,k.A)({},"".concat(T,"-active"),B),"".concat(T,"-selected"),V),"".concat(T,"-disabled"),D),r),onClick:function(e){if(!D){var t=H(e);null==h||h(ul(t)),C(t)}},onKeyDown:function(e){if(null==p||p(e),e.which===Ls.ENTER){var t=H(e);null==h||h(ul(t)),C(t)}},onFocus:function(e){I(i),null==f||f(e)}}),l,o.createElement(ll,{props:(0,E.A)((0,E.A)({},e),{},{isSelected:V}),icon:z}));return P&&(K=P(K,e,{selected:V})),K}));function gl(e,t){var n=e.eventKey,r=La(),i=za(n);return o.useEffect((function(){if(r)return r.registerPath(n,i),function(){r.unregisterPath(n,i)}}),[i]),r?null:o.createElement(ml,(0,m.A)({},e,{ref:t}))}const bl=o.forwardRef(gl);var vl=["className","children"],yl=function(e,t){var n=e.className,r=e.children,i=(0,j.A)(e,vl),s=o.useContext(Oa),a=s.prefixCls,l=s.mode,c=s.rtl;return o.createElement("ul",(0,m.A)({className:M()(a,c&&"".concat(a,"-rtl"),"".concat(a,"-sub"),"".concat(a,"-").concat("inline"===l?"inline":"vertical"),n),role:"menu"},i,{"data-menu-list":!0,ref:t}),r)},wl=o.forwardRef(yl);wl.displayName="SubMenuList";const Cl=wl;function xl(e,t){return U(e).map((function(e,n){if(o.isValidElement(e)){var r,i,s=e.key,a=null!==(r=null===(i=e.props)||void 0===i?void 0:i.eventKey)&&void 0!==r?r: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 Sl={adjustX:1,adjustY:1},Al={topLeft:{points:["bl","tl"],overflow:Sl},topRight:{points:["br","tr"],overflow:Sl},bottomLeft:{points:["tl","bl"],overflow:Sl},bottomRight:{points:["tr","br"],overflow:Sl},leftTop:{points:["tr","tl"],overflow:Sl},leftBottom:{points:["br","bl"],overflow:Sl},rightTop:{points:["tl","tr"],overflow:Sl},rightBottom:{points:["bl","br"],overflow:Sl}},El={topLeft:{points:["bl","tl"],overflow:Sl},topRight:{points:["br","tr"],overflow:Sl},bottomLeft:{points:["tl","bl"],overflow:Sl},bottomRight:{points:["tr","br"],overflow:Sl},rightTop:{points:["tr","tl"],overflow:Sl},rightBottom:{points:["br","bl"],overflow:Sl},leftTop:{points:["tl","tr"],overflow:Sl},leftBottom:{points:["bl","br"],overflow:Sl}};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,r=e.children,i=e.popup,s=e.popupStyle,l=e.popupClassName,c=e.popupOffset,u=e.disabled,d=e.mode,h=e.onVisibleChange,p=o.useContext(Oa),f=p.getPopupContainer,m=p.rtl,g=p.subMenuOpenDelay,b=p.subMenuCloseDelay,v=p.builtinPlacements,y=p.triggerSubMenuAction,w=p.forceSubMenuRender,C=p.rootClassName,x=p.motion,S=p.defaultMotions,A=o.useState(!1),R=(0,a.A)(A,2),I=R[0],P=R[1],T=m?(0,E.A)((0,E.A)({},El),v):(0,E.A)((0,E.A)({},Al),v),O=Rl[d],$=kl(d,x,S),D=o.useRef($);"inline"!==d&&(D.current=$);var N=(0,E.A)((0,E.A)({},D.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),L=o.useRef();return o.useEffect((function(){return L.current=(0,bt.A)((function(){P(n)})),function(){bt.A.cancel(L.current)}}),[n]),o.createElement(Ds,{prefixCls:t,popupClassName:M()("".concat(t,"-popup"),(0,k.A)({},"".concat(t,"-rtl"),m),l,C),stretch:"horizontal"===d?"minWidth":null,getPopupContainer:f,builtinPlacements:T,popupPlacement:O,popupVisible:I,popup:i,popupStyle:s,popupAlign:c&&{offset:c},action:u?[]:[y],mouseEnterDelay:g,mouseLeaveDelay:b,onPopupVisibleChange:h,forceRender:w,popupMotion:N,fresh:!0},r)}function Il(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,s="inline",l=o.useContext(Oa),c=l.prefixCls,u=l.forceSubMenuRender,d=l.motion,h=l.defaultMotions,p=l.mode,f=o.useRef(!1);f.current=p===s;var g=o.useState(!f.current),b=(0,a.A)(g,2),v=b[0],y=b[1],w=!!f.current&&n;o.useEffect((function(){f.current&&y(!1)}),[p]);var C=(0,E.A)({},kl(s,d,h));r.length>1&&(C.motionAppear=!1);var x=C.onVisibleChanged;return C.onVisibleChanged=function(e){return f.current||e||y(!0),null==x?void 0:x(e)},v?null:o.createElement($a,{mode:s,locked:!f.current},o.createElement(Bo.Ay,(0,m.A)({visible:w},C,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(c,"-hidden")}),(function(e){var n=e.className,r=e.style;return o.createElement(Cl,{id:t,className:n,style:r},i)})))}var Pl=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Tl=["active"],Ol=o.forwardRef((function(e,t){var n=e.style,r=e.className,i=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,f=e.popupOffset,g=e.popupStyle,b=e.onClick,v=e.onMouseEnter,y=e.onMouseLeave,w=e.onTitleClick,C=e.onTitleMouseEnter,x=e.onTitleMouseLeave,S=(0,j.A)(e,Pl),A=Pa(s),R=o.useContext(Oa),I=R.prefixCls,P=R.mode,T=R.openKeys,O=R.disabled,$=R.overflowDisabled,D=R.activeKey,N=R.selectedKeys,L=R.itemIcon,H=R.expandIcon,z=R.onItemClick,F=R.onOpenChange,B=R.onActive,_=o.useContext(ja)._internalRenderSubMenuItem,V=o.useContext(Fa).isSubPathKey,W=za(),G="".concat(I,"-submenu"),K=O||l,U=o.useRef(),q=o.useRef(),X=null!=d?d:L,Y=null!=h?h:H,Q=T.includes(s),J=!$&&Q,Z=V(N,s),ee=sl(s,K,C,x),te=ee.active,ne=(0,j.A)(ee,Tl),oe=o.useState(!1),re=(0,a.A)(oe,2),ie=re[0],se=re[1],ae=function(e){K||se(e)},le=o.useMemo((function(){return te||"inline"!==P&&(ie||V([D],s))}),[P,te,D,ie,s,V]),ce=al(W.length),ue=ol((function(e){null==b||b(ul(e)),z(e)})),de=A&&"".concat(A,"-popup"),he=o.useMemo((function(){return o.createElement(ll,{icon:"horizontal"!==P?Y:void 0,props:(0,E.A)((0,E.A)({},e),{},{isOpen:J,isSubMenu:!0})},o.createElement("i",{className:"".concat(G,"-arrow")}))}),[P,Y,e,J,G]),pe=o.createElement("div",(0,m.A)({role:"menuitem",style:ce,className:"".concat(G,"-title"),tabIndex:K?null:-1,ref:U,title:"string"==typeof i?i:null,"data-menu-id":$&&A?null:A,"aria-expanded":J,"aria-haspopup":!0,"aria-controls":de,"aria-disabled":K,onClick:function(e){K||(null==w||w({key:s,domEvent:e}),"inline"===P&&F(s,!Q))},onFocus:function(){B(s)}},ne),i,he),fe=o.useRef(P);if("inline"!==P&&W.length>1?fe.current="vertical":fe.current=P,!$){var me=fe.current;pe=o.createElement(Ml,{mode:me,prefixCls:G,visible:!c&&J&&"inline"!==P,popupClassName:p,popupOffset:f,popupStyle:g,popup:o.createElement($a,{mode:"horizontal"===me?"vertical":me},o.createElement(Cl,{id:de,ref:q},u)),disabled:K,onVisibleChange:function(e){"inline"!==P&&F(s,e)}},pe)}var ge=o.createElement(Ra.Item,(0,m.A)({ref:t,role:"none"},S,{component:"li",style:n,className:M()(G,"".concat(G,"-").concat(P),r,(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==y||y({key:s,domEvent:e})}}),pe,!$&&o.createElement(Il,{id:de,open:J,keyPath:W},u));return _&&(ge=_(ge,e,{selected:Z,active:le,open:J,disabled:K})),o.createElement($a,{onItemClick:ue,mode:"horizontal"===P?"vertical":P,itemIcon:X,expandIcon:Y},ge)}));const $l=o.forwardRef((function(e,t){var n,r=e.eventKey,i=e.children,s=za(r),a=xl(i,s),l=La();return o.useEffect((function(){if(l)return l.registerPath(r,s),function(){l.unregisterPath(r,s)}}),[s]),n=l?a:o.createElement(Ol,(0,m.A)({ref:t},e),a),o.createElement(Ha.Provider,{value:s},n)}));function Dl(e){var t=e.className,n=e.style,r=o.useContext(Oa).prefixCls;return La()?null:o.createElement("li",{role:"separator",className:M()("".concat(r,"-item-divider"),t),style:n})}var Nl=["className","title","eventKey","children"],Ll=o.forwardRef((function(e,t){var n=e.className,r=e.title,i=(e.eventKey,e.children),s=(0,j.A)(e,Nl),a=o.useContext(Oa).prefixCls,l="".concat(a,"-item-group");return o.createElement("li",(0,m.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 r?r:void 0},r),o.createElement("ul",{role:"group",className:"".concat(l,"-list")},i))}));const Hl=o.forwardRef((function(e,t){var n=e.eventKey,r=xl(e.children,za(n));return La()?r:o.createElement(Ll,(0,m.A)({ref:t},$n(e,["warnKey"])),r)}));var zl=["label","children","key","type","extra"];function Fl(e,t,n){var r=t.item,i=t.group,s=t.submenu,a=t.divider;return(e||[]).map((function(e,l){if(e&&"object"===(0,A.A)(e)){var c=e,u=c.label,d=c.children,h=c.key,p=c.type,f=c.extra,g=(0,j.A)(c,zl),b=null!=h?h:"tmp-".concat(l);return d||"group"===p?"group"===p?o.createElement(i,(0,m.A)({key:b},g,{title:u}),Fl(d,t,n)):o.createElement(s,(0,m.A)({key:b},g,{title:u}),Fl(d,t,n)):"divider"===p?o.createElement(a,(0,m.A)({key:b},g)):o.createElement(r,(0,m.A)({key:b},g,{extra:f}),u,(!!f||0===f)&&o.createElement("span",{className:"".concat(n,"-item-extra")},f))}return null})).filter((function(e){return e}))}function jl(e,t,n,o,r){var i=e,s=(0,E.A)({divider:Dl,item:bl,group:Hl,submenu:$l},o);return t&&(i=Fl(t,s,r)),xl(i,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"],_l=[],Vl=o.forwardRef((function(e,t){var n,r=e,i=r.prefixCls,s=void 0===i?"rc-menu":i,l=r.rootClassName,c=r.style,h=r.className,p=r.tabIndex,f=void 0===p?0:p,g=r.items,b=r.children,v=r.direction,y=r.id,w=r.mode,C=void 0===w?"vertical":w,x=r.inlineCollapsed,S=r.disabled,A=r.disabledOverflow,R=r.subMenuOpenDelay,I=void 0===R?.1:R,P=r.subMenuCloseDelay,T=void 0===P?.1:P,O=r.forceSubMenuRender,$=r.defaultOpenKeys,D=r.openKeys,N=r.activeKey,L=r.defaultActiveFirst,H=r.selectable,z=void 0===H||H,F=r.multiple,B=void 0!==F&&F,_=r.defaultSelectedKeys,V=r.selectedKeys,W=r.onSelect,G=r.onDeselect,K=r.inlineIndent,U=void 0===K?24:K,q=r.motion,X=r.defaultMotions,Y=r.triggerSubMenuAction,Q=void 0===Y?"hover":Y,J=r.builtinPlacements,Z=r.itemIcon,ee=r.expandIcon,te=r.overflowedIndicator,ne=void 0===te?"...":te,oe=r.overflowedIndicatorPopupClassName,re=r.getPopupContainer,ie=r.onClick,se=r.onOpenChange,ae=r.onKeyDown,le=(r.openAnimation,r.openTransitionName,r._internalRenderMenuItem),ce=r._internalRenderSubMenuItem,ue=r._internalComponents,de=(0,j.A)(r,Bl),he=o.useMemo((function(){return[jl(b,g,_l,ue,s),jl(b,g,_l,{},s)]}),[b,g,ue]),pe=(0,a.A)(he,2),fe=pe[0],me=pe[1],ge=o.useState(!1),be=(0,a.A)(ge,2),ve=be[0],ye=be[1],we=o.useRef(),Ce=function(e){var t=(0,so.A)(e,{value:e}),n=(0,a.A)(t,2),r=n[0],i=n[1];return o.useEffect((function(){il+=1;var e="".concat(rl,"-").concat(il);i("rc-menu-uuid-".concat(e))}),[]),r}(y),xe="rtl"===v,Se=(0,so.A)($,{value:D,postState:function(e){return e||_l}}),Ae=(0,a.A)(Se,2),Ee=Ae[0],ke=Ae[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(Ee),Ie=(0,a.A)(Me,2),Pe=Ie[0],Te=Ie[1],Oe=o.useRef(!1),$e=o.useMemo((function(){return"inline"!==C&&"vertical"!==C||!x?[C,!1]:["vertical",x]}),[C,x]),De=(0,a.A)($e,2),Ne=De[0],Le=De[1],He="inline"===Ne,ze=o.useState(Ne),Fe=(0,a.A)(ze,2),je=Fe[0],Be=Fe[1],_e=o.useState(Le),Ve=(0,a.A)(_e,2),We=Ve[0],Ge=Ve[1];o.useEffect((function(){Be(Ne),Ge(Le),Oe.current&&(He?ke(Pe):Re(_l))}),[Ne,Le]);var Ke=o.useState(0),Ue=(0,a.A)(Ke,2),qe=Ue[0],Xe=Ue[1],Ye=qe>=fe.length-1||"horizontal"!==je||A;o.useEffect((function(){He&&Te(Ee)}),[Ee]),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),r=(0,o.useRef)(new Map),i=o.useState([]),s=(0,a.A)(i,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 i=tl(o);r.current.set(i,e),n.current.set(e,i),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);r.current.delete(o),n.current.delete(e)}),[]),f=(0,o.useCallback)((function(e){c(e)}),[]),m=(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]),g=(0,o.useCallback)((function(e,t){return e.filter((function(e){return void 0!==e})).some((function(e){return m(e,!0).includes(t)}))}),[m]),b=(0,o.useCallback)((function(e){var t="".concat(n.current.get(e)).concat(el),o=new Set;return(0,tt.A)(r.current.keys()).forEach((function(e){e.startsWith(t)&&o.add(r.current.get(e))})),o}),[]);return o.useEffect((function(){return function(){d.current=!0}}),[]),{registerPath:h,unregisterPath:p,refreshOverflowKeys:f,isSubPathKey:g,getKeyPath:m,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,rt=Qe.getKeys,it=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(Ye?_l:fe.slice(qe+1).map((function(e){return e.key})))}),[qe,Ye]);var lt=(0,so.A)(N||L&&(null===(n=fe[0])||void 0===n?void 0:n.key),{value:N}),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:we.current,focus:function(e){var t,n,o=rt(),r=Za(o,Ce),i=r.elements,s=r.key2element,a=r.element2key,l=Qa(we.current,i),c=null!=ut?ut:l[0]?a.get(l[0]):null===(t=fe.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 ft=(0,so.A)(_||[],{value:V,postState:function(e){return Array.isArray(e)?e:null==e?_l:[e]}}),mt=(0,a.A)(ft,2),gt=mt[0],vt=mt[1],yt=ol((function(e){null==ie||ie(ul(e)),function(e){if(z){var t,n=e.key,o=gt.includes(n);t=B?o?gt.filter((function(e){return e!==n})):[].concat((0,tt.A)(gt),[n]):[n],vt(t);var r=(0,E.A)((0,E.A)({},e),{},{selectedKeys:t});o?null==G||G(r):null==W||W(r)}!B&&Ee.length&&"inline"!==je&&Re(_l)}(e)})),wt=ol((function(e,t){var n=Ee.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==je){var o=it(e);n=n.filter((function(e){return!o.has(e)}))}(0,u.A)(Ee,n,!0)||Re(n,!0)})),Ct=function(e,t,n,r,i,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 f=o.which;if([].concat(Ya,[Ka,Ua,qa,Xa]).includes(f)){var m=s(),g=Za(m,r),b=g,v=b.elements,y=b.key2element,w=b.element2key,C=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(y.get(t),v),x=w.get(C),S=function(e,t,n,o){var r,i="prev",s="next",a="children",l="parent";if("inline"===e&&o===Ka)return{inlineTrigger:!0};var c=(0,k.A)((0,k.A)({},Wa,i),Ga,s),u=(0,k.A)((0,k.A)((0,k.A)((0,k.A)({},_a,n?s:i),Va,n?i:s),Ga,a),Ka,a),d=(0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)((0,k.A)({},Wa,i),Ga,s),Ka,a),Ua,l),_a,n?a:l),Va,n?l:a);switch(null===(r={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d}["".concat(e).concat(t?"":"Sub")])||void 0===r?void 0:r[o]){case i: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,f);if(!S&&f!==qa&&f!==Xa)return;(Ya.includes(f)||[qa,Xa].includes(f))&&o.preventDefault();var A=function(e){if(e){var t=e,n=e.querySelector("a");null!=n&&n.getAttribute("href")&&(t=n);var o=w.get(e);l(o),p(),d.current=(0,bt.A)((function(){h.current===o&&t.focus()}))}};if([qa,Xa].includes(f)||S.sibling||!C){var E,R,M=Qa(E=C&&"inline"!==e?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(C):i.current,v);R=f===qa?M[0]:f===Xa?M[M.length-1]:Ja(E,v,C,S.offset),A(R)}else if(S.inlineTrigger)c(x);else if(S.offset>0)c(x,!0),p(),d.current=(0,bt.A)((function(){g=Za(m,r);var e=C.getAttribute("aria-controls"),t=Ja(document.getElementById(e),g.elements);A(t)}),5);else if(S.offset<0){var I=a(x,!0),P=I[I.length-2],T=y.get(P);c(P,!1),A(T)}}null==u||u(o)}}(je,ut,xe,Ce,we,rt,ot,dt,(function(e,t){var n=null!=t?t:!Ee.includes(e);wt(e,n)}),ae);o.useEffect((function(){ye(!0)}),[]);var xt=o.useMemo((function(){return{_internalRenderMenuItem:le,_internalRenderSubMenuItem:ce}}),[le,ce]),St="horizontal"!==je||A?fe:fe.map((function(e,t){return o.createElement($a,{key:e.key,overflowDisabled:t>qe},e)})),At=o.createElement(Ra,(0,m.A)({id:y,ref:we,prefixCls:"".concat(s,"-overflow"),component:"ul",itemComponent:bl,className:M()(s,"".concat(s,"-root"),"".concat(s,"-").concat(je),h,(0,k.A)((0,k.A)({},"".concat(s,"-inline-collapsed"),We),"".concat(s,"-rtl"),xe),l),dir:v,style:c,role:"menu",tabIndex:f,data:St,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,n=t?fe.slice(-t):null;return o.createElement($l,{eventKey:nl,title:ne,disabled:Ye,internalPopupClose:0===t,popupClassName:oe},n)},maxCount:"horizontal"!==je||A?Ra.INVALIDATE:Ra.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){Xe(e)},onKeyDown:Ct},de));return o.createElement(ja.Provider,{value:xt},o.createElement(Ma.Provider,{value:Ce},o.createElement($a,{prefixCls:s,rootClassName:l,mode:je,openKeys:Ee,rtl:xe,disabled:S,motion:ve?q:null,defaultMotions:ve?X:null,activeKey:ut,onActive:ht,onInactive:pt,selectedKeys:gt,inlineIndent:U,subMenuOpenDelay:I,subMenuCloseDelay:T,forceSubMenuRender:O,builtinPlacements:J,triggerSubMenuAction:Q,getPopupContainer:re,itemIcon:Z,expandIcon:ee,onItemClick:yt,onOpenChange:wt},o.createElement(Fa.Provider,{value:at},At),o.createElement("div",{style:{display:"none"},"aria-hidden":!0},o.createElement(Na.Provider,{value:st},me)))))})),Wl=Vl;Wl.Item=bl,Wl.SubMenu=$l,Wl.ItemGroup=Hl,Wl.Divider=Dl;const Gl=Wl,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(En,(0,m.A)({},e,{ref:t,icon:Ul}))};const Xl=o.forwardRef(ql),Yl=()=>({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:Yl,onEnterStart:Yl,onAppearActive:Ql,onEnterActive:Ql,onLeaveStart:Jl,onLeaveActive:Yl,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:r}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["prefixCls","className","dashed"]),{getPrefixCls:s}=o.useContext(ho.QO),a=s("menu",t),l=M()({[`${a}-item-divider-dashed`]:!!r},n);return o.createElement(Dl,Object.assign({className:l},i))};function rc(e){var t=e.children,n=e.prefixCls,r=e.id,i=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:r,role:"tooltip",style:i},"function"==typeof t?t():t))}var ic={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:ic,offset:[0,-4],targetOffset:ac},bottom:{points:["tc","bc"],overflow:ic,offset:[0,4],targetOffset:ac},topLeft:{points:["bl","tl"],overflow:ic,offset:[0,-4],targetOffset:ac},leftTop:{points:["tr","tl"],overflow:sc,offset:[-4,0],targetOffset:ac},topRight:{points:["br","tr"],overflow:ic,offset:[0,-4],targetOffset:ac},rightTop:{points:["tl","tr"],overflow:sc,offset:[4,0],targetOffset:ac},bottomRight:{points:["tr","br"],overflow:ic,offset:[0,4],targetOffset:ac},rightBottom:{points:["bl","br"],overflow:sc,offset:[4,0],targetOffset:ac},bottomLeft:{points:["tl","bl"],overflow:ic,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,r=e.trigger,i=void 0===r?["hover"]:r,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,f=e.onVisibleChange,g=e.afterVisibleChange,b=e.transitionName,v=e.animation,y=e.motion,w=e.placement,C=void 0===w?"right":w,x=e.align,S=void 0===x?{}:x,A=e.destroyTooltipOnHide,k=void 0!==A&&A,R=e.defaultVisible,I=e.getTooltipContainer,P=e.overlayInnerStyle,T=(e.arrowContent,e.overlay),O=e.id,$=e.showArrow,D=void 0===$||$,N=e.classNames,L=e.styles,H=(0,j.A)(e,cc),z=ds(O),F=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(function(){return F.current}));var B,_,V,W=(0,E.A)({},H);return"visible"in e&&(W.popupVisible=e.visible),o.createElement(Ds,(0,m.A)({popupClassName:M()(n,null==N?void 0:N.root),prefixCls:h,popup:function(){return o.createElement(rc,{key:"content",prefixCls:h,id:z,bodyClassName:null==N?void 0:N.body,overlayInnerStyle:(0,E.A)((0,E.A)({},P),null==L?void 0:L.body)},T)},action:i,builtinPlacements:lc,popupPlacement:C,ref:F,popupAlign:S,getPopupContainer:I,onPopupVisibleChange:f,afterPopupVisibleChange:g,popupTransitionName:b,popupAnimation:v,popupMotion:y,defaultPopupVisible:R,autoDestroy:k,mouseLeaveDelay:c,popupStyle:(0,E.A)((0,E.A)({},u),null==L?void 0:L.root),mouseEnterDelay:a,arrow:D},W),(_=(null==(B=o.Children.only(p))?void 0:B.props)||{},V=(0,E.A)((0,E.A)({},_),{},{"aria-describedby":T?z:null}),o.cloneElement(p,V)))};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])},fc=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},mc=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"}}}},gc=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=No("Space",(e=>{const t=Ro(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[mc(t),gc(t),fc(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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const yc=o.createContext(null),wc=(e,t)=>{const n=o.useContext(yc),r=o.useMemo((()=>{if(!n)return"";const{compactDirection:o,isFirstItem:r,isLastItem:i}=n,s="vertical"===o?"-vertical-":"-";return M()(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:r,[`${e}-compact${s}last-item`]:i,[`${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:r}},Cc=e=>{const{children:t}=e;return o.createElement(yc.Provider,{value:null},t)},xc=e=>{const{children:t}=e,n=vc(e,["children"]);return o.createElement(yc.Provider,{value:o.useMemo((()=>n),[n])},t)},Sc=e=>{const{space:t,form:n,children:r}=e;if(null==r)return null;let i=r;return n&&(i=o.createElement(Li,{override:!0,status:!0},i)),t&&(i=o.createElement(Cc,null,i)),i},Ac=e=>({animationDuration:e,animationFillMode:"both"}),Ec=e=>({animationDuration:e,animationFillMode:"both"}),kc=(e,t,n,o,r=!1)=>{const i=r?"&":"";return{[`\n ${i}${e}-enter,\n ${i}${e}-appear\n `]:Object.assign(Object.assign({},Ac(o)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},Ec(o)),{animationPlayState:"paused"}),[`\n ${i}${e}-enter${e}-enter-active,\n ${i}${e}-appear${e}-appear-active\n `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},Rc=new mo.Mo("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Mc=new mo.Mo("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Ic=new mo.Mo("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Pc=new mo.Mo("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),Tc=new mo.Mo("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),Oc=new mo.Mo("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),$c={zoom:{inKeyframes:Rc,outKeyframes:Mc},"zoom-big":{inKeyframes:Ic,outKeyframes:Pc},"zoom-big-fast":{inKeyframes:Ic,outKeyframes:Pc},"zoom-left":{inKeyframes:new mo.Mo("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),outKeyframes:new mo.Mo("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}})},"zoom-right":{inKeyframes:new mo.Mo("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),outKeyframes:new mo.Mo("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}})},"zoom-up":{inKeyframes:Tc,outKeyframes:Oc},"zoom-down":{inKeyframes:new mo.Mo("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),outKeyframes:new mo.Mo("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}})}},Dc=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=$c[t];return[kc(o,r,i,"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}}]},Nc=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Lc(e,t){return Nc.reduce(((n,o)=>{const r=e[`${o}1`],i=e[`${o}3`],s=e[`${o}6`],a=e[`${o}7`];return Object.assign(Object.assign({},n),t(o,{lightColor:r,lightBorderColor:i,darkColor:s,textColor:a}))}),{})}const Hc=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:o,tooltipColor:r,tooltipBg:i,tooltipBorderRadius:s,zIndexPopup:a,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:h,sizePopupArrow:p}=e,f=t(s).add(p).add(h).equal(),m=t(s).mul(2).add(p).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$o.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":i,[`${n}-inner`]:{minWidth:m,minHeight:l,padding:`${(0,mo.zA)(e.calc(u).div(2).equal())} ${(0,mo.zA)(d)}`,color:r,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:s,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:f},[["&-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}}]},zc=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Zs({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Qs(Ro(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),Fc=(e,t=!0)=>No("Tooltip",(e=>{const{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:o}=e,r=Ro(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:o});return[Hc(r),Dc(e,"zoom-big-fast")]}),zc,{resetStyle:!1,injectStyle:t})(e),jc=Nc.map((e=>`${e}-inverse`));function Bc(e,t){const n=function(e,t=!0){return t?[].concat((0,tt.A)(jc),(0,tt.A)(Nc)).includes(e):Nc.includes(e)}(t),o=M()({[`${e}-${t}`]:t&&n}),r={},i={};return t&&!n&&(r.background=t,i["--antd-arrow-background-color"]=t),{className:o,overlayStyle:r,arrowStyle:i}}const _c=o.forwardRef(((e,t)=>{var n,r;const{prefixCls:i,openClassName:s,getTooltipContainer:a,color:l,overlayInnerStyle:c,children:u,afterOpenChange:d,afterVisibleChange:h,destroyTooltipOnHide:p,destroyOnHidden:f,arrow:m=!0,title:g,overlay:b,builtinPlacements:v,arrowPointAtCenter:y=!1,autoAdjustOverflow:w=!0,motion:C,getPopupContainer:x,placement:S="top",mouseEnterDelay:A=.1,mouseLeaveDelay:E=.1,overlayStyle:k,rootClassName:R,overlayClassName:I,styles:P,classNames:T}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}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"]),$=!!m,[,D]=(0,Do.Ay)(),{getPopupContainer:N,getPrefixCls:L,direction:H,className:z,style:F,classNames:j,styles:B}=(0,ho.TP)("tooltip"),_=(0,ao.rJ)("Tooltip"),V=o.useRef(null),W=()=>{var e;null===(e=V.current)||void 0===e||e.forceAlign()};o.useImperativeHandle(t,(()=>{var e,t;return{forceAlign:W,forcePopupAlign:()=>{_.deprecated(!1,"forcePopupAlign","forceAlign"),W()},nativeElement:null===(e=V.current)||void 0===e?void 0:e.nativeElement,popupElement:null===(t=V.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!==(r=e.defaultOpen)&&void 0!==r?r:e.defaultVisible}),U=!g&&!b&&0!==g,q=o.useMemo((()=>{var e,t;let n=y;return"object"==typeof m&&(n=null!==(t=null!==(e=m.pointAtCenter)&&void 0!==e?e:m.arrowPointAtCenter)&&void 0!==t?t:y),v||ia({arrowPointAtCenter:n,autoAdjustOverflow:w,arrowWidth:$?D.sizePopupArrow:0,borderRadius:D.borderRadius,offset:D.marginXXS,visibleFirst:!0})}),[y,m,v,D]),X=o.useMemo((()=>0===g?g:b||g||""),[b,g]),Y=o.createElement(Sc,{space:!0},"function"==typeof X?X():X),Q=L("tooltip",i),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`),[re,ie,se]=Fc(Q,!Z),ae=Bc(Q,l),le=ae.arrowStyle,ce=M()(I,{[`${Q}-rtl`]:"rtl"===H},ae.className,R,ie,se,z,j.root,null==T?void 0:T.root),ue=M()(j.body,null==T?void 0:T.body),[de,he]=Ys("Tooltip",O.zIndex),pe=o.createElement(dc,Object.assign({},O,{zIndex:de,showArrow:$,placement:S,mouseEnterDelay:A,mouseLeaveDelay:E,prefixCls:Q,classNames:{root:ce,body:ue},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},le),B.root),F),k),null==P?void 0:P.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},B.body),c),null==P?void 0:P.body),ae.overlayStyle)},getTooltipContainer:x||a||N,ref:V,builtinPlacements:q,overlay:Y,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!=f?f:!!p}),ee?fo(te,{className:oe}):te);return re(o.createElement(Ks.Provider,{value:he},pe))})),Vc=_c;Vc._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,className:n,placement:r="top",title:i,color:s,overlayInnerStyle:a}=e,{getPrefixCls:l}=o.useContext(ho.QO),c=l("tooltip",t),[u,d,h]=Fc(c),p=Bc(c,s),f=p.arrowStyle,m=Object.assign(Object.assign({},a),p.overlayStyle),g=M()(d,h,c,`${c}-pure`,`${c}-placement-${r}`,n,p.className);return u(o.createElement("div",{className:g,style:f},o.createElement("div",{className:`${c}-arrow`}),o.createElement(rc,Object.assign({},e,{className:d,prefixCls:c,overlayInnerStyle:m}),i)))};const Wc=Vc,Gc=e=>{var t;const{className:n,children:r,icon:i,title:s,danger:a,extra:l}=e,{prefixCls:c,firstLevel:u,direction:d,disableMenuItemTitleTooltip:h,inlineCollapsed:p}=o.useContext(nc),{siderCollapsed:f}=o.useContext(Kl);let m=s;void 0===s?m=u?r:"":!1===s&&(m="");const g={title:m};f||p||(g.title=null,g.open=!1);const b=U(r).length;let v=o.createElement(bl,Object.assign({},$n(e,["title","icon","danger"]),{className:M()({[`${c}-item-danger`]:a,[`${c}-item-only-child`]:1===(i?b+1:b)},n),title:"string"==typeof s?s:void 0}),fo(i,{className:M()(o.isValidElement(i)?null===(t=i.props)||void 0===t?void 0:t.className:"",`${c}-item-icon`)}),(e=>{const t=null==r?void 0:r[0],n=o.createElement("span",{className:M()(`${c}-title-content`,{[`${c}-title-content-with-extra`]:!!l||0===l})},r);return(!i||o.isValidElement(r)&&"span"===r.type)&&r&&e&&u&&"string"==typeof t?o.createElement("div",{className:`${c}-inline-collapsed-noicon`},t.charAt(0)):n})(p));return h||(v=o.createElement(Wc,Object.assign({},g,{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,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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["children"]),i=o.useContext(Kc),s=o.useMemo((()=>Object.assign(Object.assign({},i),r)),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=(0,g.H3)(n),l=(0,g.xK)(t,a?(0,g.A9)(n):null);return o.createElement(Kc.Provider,{value:s},o.createElement(Sc,{space:!0},a?o.cloneElement(n,{ref:l}):n))})),qc=Kc;var Xc=n(2616);const Yc=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 mo.Mo("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Jc=new mo.Mo("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Zc=new mo.Mo("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),eu=new mo.Mo("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),tu=new mo.Mo("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),nu=new mo.Mo("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),ou=new mo.Mo("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),ru=new mo.Mo("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),iu={"slide-up":{inKeyframes:Qc,outKeyframes:Jc},"slide-down":{inKeyframes:Zc,outKeyframes:eu},"slide-left":{inKeyframes:tu,outKeyframes:nu},"slide-right":{inKeyframes:ou,outKeyframes:ru}},su=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=iu[t];return[kc(o,r,i,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:r,lineWidth:i,lineType:s,itemPaddingInline:a}=e;return{[`${t}-horizontal`]:{lineHeight:o,border:0,borderBottom:`${(0,mo.zA)(i)} ${s} ${r}`,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,mo.zA)(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,mo.zA)(t)})`}}}}),cu=e=>Object.assign({},(0,$o.jk)(e)),uu=(e,t)=>{const{componentCls:n,itemColor:o,itemSelectedColor:r,subMenuItemSelectedColor:i,groupTitleColor:s,itemBg:a,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:h,motionDurationSlow:p,motionEaseInOut:f,motionEaseOut:m,itemPaddingInline:g,motionDurationMid:b,itemHoverColor:v,lineType:y,colorSplit:w,itemDisabledColor:C,dangerItemColor:x,dangerItemHoverColor:S,dangerItemSelectedColor:A,dangerItemActiveBg:E,dangerItemSelectedBg:k,popupBg:R,itemHoverBg:M,itemActiveBg:I,menuSubMenuBg:P,horizontalItemSelectedColor:T,horizontalItemSelectedBg:O,horizontalItemBorderRadius:$,horizontalItemHoverBg:D}=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:i},[`${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:I}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:I}}},[`${n}-item-danger`]:{color:x,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:S}},[`&${n}-item:active`]:{background:E}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:r,[`&${n}-item-danger`]:{color:A},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:k}},[`&${n}-submenu > ${n}`]:{backgroundColor:P},[`&${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:$,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${(0,mo.zA)(u)} solid transparent`,transition:`border-color ${p} ${f}`,content:'""'},"&:hover, &-active, &-open":{background:D,"&::after":{borderBottomWidth:u,borderBottomColor:T}},"&-selected":{color:T,backgroundColor:O,"&:hover":{backgroundColor:O},"&::after":{borderBottomWidth:u,borderBottomColor:T}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${(0,mo.zA)(h)} ${y} ${w}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,mo.zA)(d)} solid ${r}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${b} ${m}`,`opacity ${b} ${m}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:A}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${b} ${f}`,`opacity ${b} ${f}`].join(",")}}}}}},du=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:o,padding:r,menuArrowSize:i,marginXS:s,itemMarginBlock:a,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(i).add(r).add(s).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:(0,mo.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,mo.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:r,dropdownWidth:i,controlHeightLG:s,motionEaseOut:a,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:h,paddingXS:p,boxShadowSecondary:f,collapsedWidth:m,collapsedIconSize:g}=e,b={height:o,lineHeight:(0,mo.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:f})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${(0,mo.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:m,[`&${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,mo.zA)(e.calc(g).div(2).equal())} - ${(0,mo.zA)(c)})`,textOverflow:"clip",[`\n ${t}-submenu-arrow,\n ${t}-submenu-expand-icon\n `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:(0,mo.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:r}},[`${t}-item-group-title`]:Object.assign(Object.assign({},$o.L9),{paddingInline:p})}}]},pu=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:o,motionEaseInOut:r,motionEaseOut:i,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) ${r}`].join(","),[`${t}-item-icon, ${s}`]:{minWidth:a,fontSize:a,transition:[`font-size ${o} ${i}`,`margin ${n} ${r}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${r}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},(0,$o.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"}}}},fu=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:r,menuArrowSize:i,menuArrowOffset:s}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${o}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:r,transition:[`background ${n} ${o}`,`transform ${n} ${o}`,`top ${n} ${o}`,`color ${n} ${o}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,mo.zA)(e.calc(s).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,mo.zA)(s)})`}}}}},mu=e=>{const{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:r,motionDurationMid:i,motionEaseInOut:s,paddingXS:a,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:h,subMenuItemBorderRadius:p,menuArrowSize:f,menuArrowOffset:m,lineType:g,groupTitleLineHeight:b,groupTitleFontSize:v}=e;return[{"":{[n]:Object.assign(Object.assign({},(0,$o.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,$o.dF)(e)),(0,$o.t6)()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${r} 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,mo.zA)(a)} ${(0,mo.zA)(l)}`,fontSize:v,lineHeight:b,transition:`all ${r}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${r} ${s}`,`background ${r} ${s}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${r} ${s}`,`background ${r} ${s}`,`padding ${i} ${s}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${r} ${s}`,`padding ${r} ${s}`].join(",")},[`${n}-title-content`]:{transition:`color ${r}`,"&-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:g,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,mo.zA)(e.calc(o).mul(2).equal())} ${(0,mo.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)),fu(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${r} ${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}}}),fu(e)),{[`&-inline-collapsed ${n}-submenu-arrow,\n &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,mo.zA)(m)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,mo.zA)(e.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${(0,mo.zA)(e.calc(f).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,mo.zA)(e.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,mo.zA)(m)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},gu=e=>{var t,n,o;const{colorPrimary:r,colorError:i,colorTextDisabled:s,colorErrorBg:a,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:h,lineWidth:p,lineWidthBold:f,controlItemBgActive:m,colorBgTextHover:g,controlHeightLG:b,lineHeight:v,colorBgElevated:y,marginXXS:w,padding:C,fontSize:x,controlHeightSM:S,fontSizeLG:A,colorTextLightSolid:E,colorErrorHover:k}=e,R=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,M=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:p,I=null!==(o=e.itemMarginInline)&&void 0!==o?o:e.marginXXS,P=new Xc.Y(E).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:r,horizontalItemHoverColor:r,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:r,itemSelectedColor:r,subMenuItemSelectedColor:r,colorItemTextSelectedHorizontal:r,horizontalItemSelectedColor:r,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:h,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:R,colorActiveBarHeight:f,activeBarHeight:f,colorActiveBarBorderSize:p,activeBarBorderWidth:M,colorItemTextDisabled:s,itemDisabledColor:s,colorDangerItemText:i,dangerItemColor:i,colorDangerItemTextHover:i,dangerItemHoverColor:i,colorDangerItemTextSelected:i,dangerItemSelectedColor:i,colorDangerItemBgActive:a,dangerItemActiveBg:a,colorDangerItemBgSelected:a,dangerItemSelectedBg:a,itemMarginInline:I,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:v,collapsedWidth:2*b,popupBg:y,itemMarginBlock:w,itemPaddingInline:C,horizontalLineHeight:1.15*b+"px",iconSize:x,iconMarginInlineEnd:S-x,collapsedIconSize:A,groupTitleFontSize:x,darkItemDisabledColor:new Xc.Y(E).setA(.25).toRgbString(),darkItemColor:P,darkDangerItemColor:i,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:E,darkItemSelectedBg:r,darkDangerItemSelectedBg:i,darkItemHoverBg:"transparent",darkGroupTitleColor:P,darkItemHoverColor:E,darkDangerItemHoverColor:k,darkDangerItemSelectedColor:E,darkDangerItemActiveBg:i,itemWidth:R?`calc(100% + ${M}px)`:`calc(100% - ${2*I}px)`}},bu=(e,t=e,n=!0)=>No("Menu",(e=>{const{colorBgElevated:t,controlHeightLG:n,fontSize:o,darkItemColor:r,darkDangerItemColor:i,darkItemBg:s,darkSubMenuItemBg:a,darkItemSelectedColor:l,darkItemSelectedBg:c,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:h,darkItemHoverColor:p,darkItemDisabledColor:f,darkDangerItemHoverColor:m,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:b,popupBg:v,darkPopupBg:y}=e,w=e.calc(o).div(7).mul(5).equal(),C=Ro(e,{menuArrowSize:w,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(w).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),x=Ro(C,{itemColor:r,itemHoverColor:p,groupTitleColor:h,itemSelectedColor:l,subMenuItemSelectedColor:l,itemBg:s,popupBg:y,subMenuItemBg:a,itemActiveBg:"transparent",itemSelectedBg:c,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:f,dangerItemColor:i,dangerItemHoverColor:m,dangerItemSelectedColor:g,dangerItemActiveBg:b,dangerItemSelectedBg:u,menuSubMenuBg:a,horizontalItemSelectedColor:l,horizontalItemSelectedBg:c});return[mu(C),au(C),hu(C),uu(C,"light"),uu(x,"dark"),lu(C),Yc(C),su(C,"slide-up"),su(C,"slide-down"),Dc(C,"zoom-big")]}),gu,{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:r,title:i,theme:s}=e,a=o.useContext(nc),{prefixCls:l,inlineCollapsed:c,theme:u}=a,d=za();let h;if(r){const e=o.isValidElement(i)&&"span"===i.type;h=o.createElement(o.Fragment,null,fo(r,{className:M()(o.isValidElement(r)?null===(t=r.props)||void 0===t?void 0:t.className:"",`${l}-item-icon`)}),e?i:o.createElement("span",{className:`${l}-title-content`},i))}else h=c&&!d.length&&i&&"string"==typeof i?o.createElement("div",{className:`${l}-inline-collapsed-noicon`},i.charAt(0)):o.createElement("span",{className:`${l}-title-content`},i);const p=o.useMemo((()=>Object.assign(Object.assign({},a),{firstLevel:!1})),[a]),[f]=Ys("Menu");return o.createElement(nc.Provider,{value:p},o.createElement($l,Object.assign({},$n(e,["icon"]),{title:h,popupClassName:M()(l,n,`${l}-${s||u}`),popupStyle:Object.assign({zIndex:f},e.popupStyle)})))};function yu(e){return null===e||!1===e}const wu={item:Gc,submenu:vu,divider:oc},Cu=(0,o.forwardRef)(((e,t)=>{var n;const r=o.useContext(qc),i=r||{},{getPrefixCls:s,getPopupContainer:a,direction:c,menu:u}=o.useContext(ho.QO),d=s(),{prefixCls:h,className:p,style:f,theme:m="light",expandIcon:g,_internalDisableMenuItemTitleTooltip:b,inlineCollapsed:v,siderCollapsed:y,rootClassName:w,mode:C,selectable:x,onClick:S,overflowedIndicatorPopupClassName:A}=e,E=$n(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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),["collapsedWidth"]);null===(n=i.validator)||void 0===n||n.call(i,{mode:C});const k=(0,l.A)(((...e)=>{var t;null==S||S.apply(void 0,e),null===(t=i.onClick)||void 0===t||t.call(i)})),R=i.mode||C,I=null!=x?x:i.selectable,P=null!=v?v:y,T={horizontal:{motionName:`${d}-slide-up`},inline:tc(d),other:{motionName:`${d}-zoom-big`}},O=s("menu",h||i.prefixCls),$=vr(O),[D,N,L]=bu(O,$,!r),H=M()(`${O}-${m}`,null==u?void 0:u.className,p),z=o.useMemo((()=>{var e,t;if("function"==typeof g||yu(g))return g||null;if("function"==typeof i.expandIcon||yu(i.expandIcon))return i.expandIcon||null;if("function"==typeof(null==u?void 0:u.expandIcon)||yu(null==u?void 0:u.expandIcon))return(null==u?void 0:u.expandIcon)||null;const n=null!==(e=null!=g?g:null==i?void 0:i.expandIcon)&&void 0!==e?e:null==u?void 0:u.expandIcon;return fo(n,{className:M()(`${O}-submenu-expand-icon`,o.isValidElement(n)?null===(t=n.props)||void 0===t?void 0:t.className:void 0)})}),[g,null==i?void 0:i.expandIcon,null==u?void 0:u.expandIcon,O]),F=o.useMemo((()=>({prefixCls:O,inlineCollapsed:P||!1,direction:c,firstLevel:!0,theme:m,mode:R,disableMenuItemTitleTooltip:b})),[O,P,c,b,m]);return D(o.createElement(qc.Provider,{value:null},o.createElement(nc.Provider,{value:F},o.createElement(Gl,Object.assign({getPopupContainer:a,overflowedIndicator:o.createElement(Xl,null),overflowedIndicatorPopupClassName:M()(O,`${O}-${m}`,A),mode:R,selectable:I,onClick:k},E,{inlineCollapsed:P,style:Object.assign(Object.assign({},null==u?void 0:u.style),f),className:H,prefixCls:O,direction:c,defaultMotions:T,expandIcon:z,ref:t,rootClassName:M()(w,N,i.rootClassName,L,$),_internalComponents:wu})))))})),xu=Cu,Su=(0,o.forwardRef)(((e,t)=>{const n=(0,o.useRef)(null),r=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,r))}));Su.Item=Gc,Su.SubMenu=vu,Su.Divider=oc,Su.ItemGroup=Hl;const Au=Su,Eu=new mo.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 mo.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 mo.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 mo.Mo("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Iu=new mo.Mo("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Pu=new mo.Mo("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Tu={"move-up":{inKeyframes:new mo.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 mo.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:Eu,outKeyframes:ku},"move-left":{inKeyframes:Ru,outKeyframes:Mu},"move-right":{inKeyframes:Iu,outKeyframes:Pu}},Ou=(e,t)=>{const{antCls:n}=e,o=`${n}-${t}`,{inKeyframes:r,outKeyframes:i}=Tu[t];return[kc(o,r,i,e.motionDurationMid),{[`\n ${o}-enter,\n ${o}-appear\n `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},$u=e=>{const{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:r}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:o,"&:hover":{color:r,backgroundColor:o}}}}}},Du=e=>{const{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:r,sizePopupArrow:i,antCls:s,iconCls:a,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:h,fontSizeIcon:p,controlPaddingHorizontal:f,colorBgElevated:m}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(r).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,m,{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,$o.dF)(e)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},(0,$o.K8)(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${(0,mo.zA)(c)} ${(0,mo.zA)(f)}`,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,mo.zA)(c)} ${(0,mo.zA)(f)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},(0,$o.K8)(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,mo.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,mo.zA)(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(f).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:m,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"),Dc(e,"zoom-big")]]},Nu=No("Dropdown",(e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:o,componentCls:r}=e,i=Ro(e,{menuCls:`${r}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:o});return[Du(i),$u(i)]}),(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:r,prefixCls:i,children:s,trigger:a,disabled:c,dropdownRender:u,popupRender:d,getPopupContainer:h,overlayClassName:p,rootClassName:f,overlayStyle:m,open:g,onOpenChange:b,visible:v,onVisibleChange:y,mouseEnterDelay:w=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:x=!0,placement:S="",overlay:A,transitionName:E,destroyOnHidden:k,destroyPopupOnHide:R}=e,{getPopupContainer:I,getPrefixCls:P,direction:T,dropdown:O}=o.useContext(ho.QO),$=d||u;(0,ao.rJ)("Dropdown");const D=o.useMemo((()=>{const e=P();return void 0!==E?E:S.includes("top")?`${e}-slide-down`:`${e}-slide-up`}),[P,S,E]),N=o.useMemo((()=>S?S.includes("Center")?S.slice(0,S.indexOf("Center")):S:"rtl"===T?"bottomRight":"bottomLeft"),[S,T]),L=P("dropdown",i),H=vr(L),[z,F,j]=Nu(L,H),[,B]=(0,Do.Ay)(),_=o.Children.only("object"!=typeof(ee=s)&&"function"!=typeof ee||null===ee?o.createElement("span",null,s):s),V=fo(_,{className:M()(`${L}-trigger`,{[`${L}-rtl`]:"rtl"===T},_.props.className),disabled:null!==(t=_.props.disabled)&&void 0!==t?t:c}),W=c?[]:a,G=!!(null==W?void 0:W.includes("contextMenu")),[K,U]=(0,so.A)(!1,{value:null!=g?g:v}),q=(0,l.A)((e=>{null==b||b(e,{source:"trigger"}),null==y||y(e),U(e)})),X=M()(p,f,F,j,H,null==O?void 0:O.className,{[`${L}-rtl`]:"rtl"===T}),Y=ia({arrowPointAtCenter:"object"==typeof r&&r.pointAtCenter,autoAdjustOverflow:x,offset:B.marginXXS,arrowWidth:r?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]=Ys("Dropdown",null==m?void 0:m.zIndex);var ee;let te=o.createElement(Gs,Object.assign({alignPoint:G},$n(e,["rootClassName"]),{mouseEnterDelay:w,mouseLeaveDelay:C,visible:K,builtinPlacements:Y,arrow:!!r,overlayClassName:X,prefixCls:L,getPopupContainer:h||I,transitionName:D,trigger:W,overlay:()=>{let e;return e=(null==n?void 0:n.items)?o.createElement(Au,Object.assign({},n)):"function"==typeof A?A():A,$&&(e=$(e)),e=o.Children.only("string"==typeof e?o.createElement("span",null,e):e),o.createElement(Uc,{prefixCls:`${L}-menu`,rootClassName:M()(j,H),expandIcon:o.createElement("span",{className:`${L}-menu-submenu-arrow`},"rtl"===T?o.createElement(Qi,{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:N,onVisibleChange:q,overlayStyle:Object.assign(Object.assign(Object.assign({},null==O?void 0:O.style),m),{zIndex:J}),autoDestroy:null!=k?k:R}),V);return J&&(te=o.createElement(Ks.Provider,{value:Z},te)),z(te)},Hu=aa(Lu,"align",void 0,"dropdown",(e=>e));Lu._InternalPanelDoNotUseOrYouWillBeFired=e=>o.createElement(Hu,Object.assign({},e),o.createElement("span",null));const zu=Lu;const Fu=o.createContext(void 0),ju=/^[\u4E00-\u9FA5]{2}$/,Bu=ju.test.bind(ju);function _u(e){return"string"==typeof e}function Vu(e){return"text"===e||"link"===e}["default","primary","danger"].concat((0,tt.A)(Nc));const Wu={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(En,(0,m.A)({},e,{ref:t,icon:Wu}))};const Ku=o.forwardRef(Gu),Uu=(0,o.forwardRef)(((e,t)=>{const{className:n,style:r,children:i,prefixCls:s}=e,a=M()(`${s}-icon`,n);return o.createElement("span",{ref:t,className:a,style:r},i)})),qu=Uu,Xu=(0,o.forwardRef)(((e,t)=>{const{prefixCls:n,className:r,style:i,iconClassName:s}=e,a=M()(`${n}-loading-icon`,r);return o.createElement(qu,{prefixCls:n,className:a,style:i,ref:t},o.createElement(Ku,{className:s}))})),Yu=()=>({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:r,className:i,style:s,mount:a}=e,l=!!n;return r?o.createElement(Xu,{prefixCls:t,className:i,style:s}):o.createElement(Bo.Ay,{visible:l,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Yu,onAppearActive:Qu,onEnterStart:Yu,onEnterActive:Qu,onLeaveStart:Qu,onLeaveActive:Yu},(({className:e,style:n},r)=>{const a=Object.assign(Object.assign({},s),n);return o.createElement(Xu,{prefixCls:t,className:M()(i,e),style:a,ref:r})}))},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:r,colorErrorHover:i}=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`,r),Zu(`${t}-danger`,i)]}};var td,nd=["b"],od=["v"],rd=function(e){return Math.round(Number(e||0))},id=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(e){return(0,ye.A)(this,n),t.call(this,function(e){if(e instanceof Xc.Y)return e;if(e&&"object"===(0,A.A)(e)&&"h"in e&&"b"in e){var t=e,n=t.b,o=(0,j.A)(t,nd);return(0,E.A)((0,E.A)({},o),{},{v:n})}return"string"==typeof e&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e}(e))}return(0,we.A)(n,[{key:"toHsbString",value:function(){var e=this.toHsb(),t=rd(100*e.s),n=rd(100*e.b),o=rd(e.h),r=e.a,i="hsb(".concat(o,", ").concat(t,"%, ").concat(n,"%)"),s="hsba(".concat(o,", ").concat(t,"%, ").concat(n,"%, ").concat(r.toFixed(0===r?0:2),")");return 1===r?i:s}},{key:"toHsb",value:function(){var e=this.toHsv(),t=e.v,n=(0,j.A)(e,od);return(0,E.A)((0,E.A)({},n),{},{b:t,a:this.a})}}]),n}(Xc.Y);(td="#1677ff")instanceof id||new id(td);let sd=function(){return(0,we.A)((function e(t){var n;if((0,ye.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 id(this.colors[0].color.metaColor)):this.metaColor=new id(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,r,i,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!==(r=e.contentLineHeight)&&void 0!==r?r:(0,ad.k)(a),d=null!==(i=e.contentLineHeightSM)&&void 0!==i?i:(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:r,a:i}=e.toRgb(),s=new id(e.toRgbString()).onBackground(t).toHsv();return i<=.5?s.v>.5:.299*n+.587*o+.114*r>192})(new sd(e.colorBgSolid),"#fff")?"#000":"#fff",f=Nc.reduce(((t,n)=>Object.assign(Object.assign({},t),{[`${n}ShadowColor`]:`0 ${(0,mo.zA)(e.controlOutlineWidth)} 0 ${(0,ld.A)(e[`${n}1`],e.colorBgContainer)}`})),{});return Object.assign(Object.assign({},f),{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:r,motionDurationSlow:i,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,mo.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,$o.Nk)(),"> a":{color:"currentColor"},"&:not(:disabled)":(0,$o.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:r,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map((e=>`${e} ${i} ${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%"}),fd=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),md=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),gd=(e,t,n,o,r,i,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:r||void 0,borderColor:i||void 0}})}),bd=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},md(e))}),vd=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),yd=(e,t,n,o)=>{const r=o&&["link","text"].includes(o)?vd:bd;return Object.assign(Object.assign({},r(e)),hd(e.componentCls,t,n))},wd=(e,t,n,o,r)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:n},yd(e,o,r))}),Cd=(e,t,n,o,r)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:n},yd(e,o,r))}),xd=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Sd=(e,t,n,o)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},yd(e,n,o))}),Ad=(e,t,n,o,r)=>({[`&${e.componentCls}-variant-${n}`]:Object.assign({color:t,boxShadow:"none"},yd(e,o,r,n))}),Ed=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},wd(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),xd(e)),Sd(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),gd(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),Ad(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)),Sd(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),Ad(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Ad(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),gd(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},wd(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)),Sd(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),Ad(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Ad(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),gd(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({},Ad(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),gd(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),Id=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:Ed(e),[`${t}-color-primary`]:kd(e),[`${t}-color-dangerous`]:Rd(e),[`${t}-color-link`]:Md(e)},(e=>{const{componentCls:t}=e;return Nc.reduce(((n,o)=>{const r=e[`${o}6`],i=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:r,boxShadow:e[`${o}ShadowColor`]},wd(e,e.colorTextLightSolid,r,{background:s},{background:c})),Cd(e,r,e.colorBgContainer,{color:s,borderColor:s,background:e.colorBgContainer},{color:c,borderColor:c,background:e.colorBgContainer})),xd(e)),Sd(e,i,{background:a},{background:l})),Ad(e,r,"link",{color:s},{color:c})),Ad(e,r,"text",{color:s,background:i},{color:c,background:l}))})}),{})})(e))},Pd=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})),Ad(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),wd(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Ad(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Td=(e,t="")=>{const{componentCls:n,controlHeight:o,fontSize:r,borderRadius:i,buttonPaddingHorizontal:s,iconCls:a,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:r,height:o,padding:`${(0,mo.zA)(l)} ${(0,mo.zA)(s)}`,borderRadius:i,[`&${n}-icon-only`]:{width:o,[a]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:pd(e)},{[`${n}${n}-round${t}`]:fd(e)}]},Od=e=>{const t=Ro(e,{fontSize:e.contentFontSize});return Td(t,e.componentCls)},$d=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 Td(t,`${e.componentCls}-sm`)},Dd=e=>{const t=Ro(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Td(t,`${e.componentCls}-lg`)},Nd=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},Ld=No("Button",(e=>{const t=cd(e);return[dd(t),Od(t),$d(t),Dd(t),Nd(t),Id(t),Pd(t),ed(t)]}),ud,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function Hd(e,t,n){const{focusElCls:o,focus:r,borderElCls:i}=n,s=i?"> *":"",a=["hover",r?"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 zd(e,t,n){const{borderElCls:o}=n,r=o?`> ${o}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${r}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${r}, &${e}-sm ${r}, &${e}-lg ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Fd(e,t={focus:!0}){const{componentCls:n}=e,o=`${n}-compact`;return{[o]:Object.assign(Object.assign({},Hd(e,o,t)),zd(n,o,t))}}function jd(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({},jd(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 _d=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:o,calc:r}=e,i=r(o).mul(-1).equal(),s=e=>{const r=`${t}-compact${e?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${r} + ${r}::before`]:{position:"absolute",top:e?i:0,insetInlineStart:e?0:i,backgroundColor:n,content:'""',width:e?"100%":o,height:e?o:"100%"}}};return Object.assign(Object.assign({},s()),s(!0))},Vd=Ho(["Button","compact"],(e=>{const t=cd(e);return[Fd(t),Bd(t),_d(t)]}),ud);const Wd={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},Gd=o.forwardRef(((e,t)=>{var n,r;const{loading:i=!1,prefixCls:s,color:a,variant:l,type:c,danger:u=!1,shape:d="default",size:h,styles:p,disabled:f,className:m,rootClassName:b,children:v,icon:y,iconPosition:w="start",ghost:C=!1,block:x=!1,htmlType:S="button",classNames:A,style:E={},autoInsertSpace:k,autoFocus:R}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}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"]),P=c||"default",{button:T}=o.useContext(ho.QO),[O,$]=(0,o.useMemo)((()=>{if(a&&l)return[a,l];if(c||u){const e=Wd[P]||[];return u?["danger",e[1]]:e}return(null==T?void 0:T.color)&&(null==T?void 0:T.variant)?[T.color,T.variant]:["default","outlined"]}),[c,a,l,u,null==T?void 0:T.variant,null==T?void 0:T.color]),D="danger"===O?"dangerous":O,{getPrefixCls:N,direction:L,autoInsertSpace:H,className:z,style:F,classNames:j,styles:B}=(0,ho.TP)("button"),_=null===(n=null!=k?k:H)||void 0===n||n,V=N("btn",s),[W,G,K]=Ld(V),U=(0,o.useContext)(br.A),q=null!=f?f:U,X=(0,o.useContext)(Fu),Y=(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}}(i)),[i]),[Q,J]=(0,o.useState)(Y.loading),[Z,ee]=(0,o.useState)(!1),te=(0,o.useRef)(null),ne=(0,g.xK)(t,te),oe=1===o.Children.count(v)&&!y&&!Vu($),re=(0,o.useRef)(!0);o.useEffect((()=>(re.current=!1,()=>{re.current=!0})),[]),(0,o.useLayoutEffect)((()=>{let e=null;return Y.delay>0?e=setTimeout((()=>{e=null,J(!0)}),Y.delay):J(Y.loading),function(){e&&(clearTimeout(e),e=null)}}),[Y.delay,Y.loading]),(0,o.useEffect)((()=>{if(!te.current||!_)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 ie=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}=wc(V,L),le=pc((e=>{var t,n;return null!==(n=null!==(t=null!=h?h:se)&&void 0!==t?t:X)&&void 0!==n?n:e})),ce=le&&null!==(r={large:"lg",small:"sm",middle:void 0}[le])&&void 0!==r?r:"",ue=Q?"loading":y,de=$n(I,["navigate"]),he=M()(V,G,K,{[`${V}-${d}`]:"default"!==d&&d,[`${V}-${P}`]:P,[`${V}-dangerous`]:u,[`${V}-color-${D}`]:D,[`${V}-variant-${$}`]:$,[`${V}-${ce}`]:ce,[`${V}-icon-only`]:!v&&0!==v&&!!ue,[`${V}-background-ghost`]:C&&!Vu($),[`${V}-loading`]:Q,[`${V}-two-chinese-chars`]:Z&&_&&!Q,[`${V}-block`]:x,[`${V}-rtl`]:"rtl"===L,[`${V}-icon-end`]:"end"===w},ae,m,b,z),pe=Object.assign(Object.assign({},F),E),fe=M()(null==A?void 0:A.icon,j.icon),me=Object.assign(Object.assign({},(null==p?void 0:p.icon)||{}),B.icon||{}),ge=y&&!Q?o.createElement(qu,{prefixCls:V,className:fe,style:me},y):i&&"object"==typeof i&&i.icon?o.createElement(qu,{prefixCls:V,className:fe,style:me},i.icon):o.createElement(Ju,{existIcon:!!y,prefixCls:V,loading:Q,mount:re.current}),be=v||0===v?function(e,t){let n=!1;const r=[];return o.Children.forEach(e,(e=>{const t=typeof e,o="string"===t||"number"===t;if(n&&o){const t=r.length-1,n=r[t];r[t]=`${n}${e}`}else r.push(e);n=o})),o.Children.map(r,(e=>function(e,t){if(null==e)return;const n=t?" ":"";return"string"!=typeof e&&"number"!=typeof e&&_u(e.type)&&Bu(e.props.children)?fo(e,{children:e.props.children.split("").join(n)}):_u(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&&_):null;if(void 0!==de.href)return W(o.createElement("a",Object.assign({},de,{className:M()(he,{[`${V}-disabled`]:q}),href:q?void 0:de.href,style:pe,onClick:ie,ref:ne,tabIndex:q?-1:0}),ge,be));let ve=o.createElement("button",Object.assign({},I,{type:S,className:he,style:pe,onClick:ie,disabled:q,ref:ne}),ge,be,ae&&o.createElement(Vd,{prefixCls:V}));return Vu($)||(ve=o.createElement(gr,{component:"Button",disabled:Q},ve)),W(ve)})),Kd=Gd;Kd.Group=e=>{const{getPrefixCls:t,direction:n}=o.useContext(ho.QO),{prefixCls:r,size:i,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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["prefixCls","size","className"]),l=t("btn-group",r),[,,c]=(0,Do.Ay)(),u=o.useMemo((()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}}),[i]),d=M()(l,{[`${l}-${u}`]:u,[`${l}-rtl`]:"rtl"===n},s,c);return o.createElement(Fu.Provider,{value:i},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 Xd(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}const Yd=o.createContext({latestIndex:0}),Qd=Yd.Provider,Jd=({className:e,index:t,children:n,split:r,style:i})=>{const{latestIndex:s}=o.useContext(Yd);return null==n?null:o.createElement(o.Fragment,null,o.createElement("div",{className:e,style:i},n),t<s&&r&&o.createElement("span",{className:`${e}-split`},r))};const Zd=o.forwardRef(((e,t)=>{var n;const{getPrefixCls:r,direction:i,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:f,children:m,direction:g="horizontal",prefixCls:b,split:v,style:y,wrap:w=!1,classNames:C,styles:x}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[A,E]=Array.isArray(d)?d:[d,d],k=qd(E),R=qd(A),I=Xd(E),P=Xd(A),T=U(m,{keepEmpty:!0}),O=void 0===h&&"horizontal"===g?"center":h,$=r("space",b),[D,N,L]=bc($),H=M()($,a,N,`${$}-${g}`,{[`${$}-rtl`]:"rtl"===i,[`${$}-align-${O}`]:O,[`${$}-gap-row-${E}`]:k,[`${$}-gap-col-${A}`]:R},p,f,L),z=M()(`${$}-item`,null!==(n=null==C?void 0:C.item)&&void 0!==n?n:c.item);let F=0;const j=T.map(((e,t)=>{var n;null!=e&&(F=t);const r=(null==e?void 0:e.key)||`${z}-${t}`;return o.createElement(Jd,{className:z,key:r,index:t,split:v,style:null!==(n=null==x?void 0:x.item)&&void 0!==n?n:u.item},e)})),B=o.useMemo((()=>({latestIndex:F})),[F]);if(0===T.length)return null;const _={};return w&&(_.flexWrap="wrap"),!R&&P&&(_.columnGap=A),!k&&I&&(_.rowGap=E),D(o.createElement("div",Object.assign({ref:t,className:H,style:Object.assign(Object.assign(Object.assign({},_),l),y)},S),o.createElement(Qd,{value:B},j)))})),eh=Zd;eh.Compact=e=>{const{getPrefixCls:t,direction:n}=o.useContext(ho.QO),{size:r,direction:i,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!=r?r:e)),p=t("space-compact",a),[f,m]=bc(p),g=M()(p,m,{[`${p}-rtl`]:"rtl"===n,[`${p}-block`]:s,[`${p}-vertical`]:"vertical"===i},l,c),b=o.useContext(yc),v=U(u),y=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:i,isFirstItem:0===t&&(!b||(null==b?void 0:b.isFirstItem)),isLastItem:t===v.length-1&&(!b||(null==b?void 0:b.isLastItem))},e)}))),[r,v,b]);return 0===v.length?null:f(o.createElement("div",Object.assign({className:g},d),y))};const th=eh;const nh=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=o.useContext(ho.QO),{prefixCls:i,type:s="default",danger:a,disabled:l,loading:c,onClick:u,htmlType:d,children:h,className:p,menu:f,arrow:m,autoFocus:g,overlay:b,trigger:v,align:y,open:w,onOpenChange:C,placement:x,getPopupContainer:S,href:A,icon:E=o.createElement(Xl,null),title:k,buttonsRender:R=e=>e,mouseEnterDelay:I,mouseLeaveDelay:P,overlayClassName:T,overlayStyle:O,destroyOnHidden:$,destroyPopupOnHide:D,dropdownRender:N,popupRender:L}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}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"]),z=n("dropdown",i),F=`${z}-button`,j={menu:f,arrow:m,autoFocus:g,align:y,disabled:l,trigger:l?[]:v,onOpenChange:C,getPopupContainer:S||t,mouseEnterDelay:I,mouseLeaveDelay:P,overlayClassName:T,overlayStyle:O,destroyOnHidden:$,popupRender:L||N},{compactSize:B,compactItemClassnames:_}=wc(z,r),V=M()(F,_,p);"destroyPopupOnHide"in e&&(j.destroyPopupOnHide=D),"overlay"in e&&(j.overlay=b),"open"in e&&(j.open=w),j.placement="placement"in e?x:"rtl"===r?"bottomLeft":"bottomRight";const W=o.createElement(Ud,{type:s,danger:a,disabled:l,loading:c,onClick:u,htmlType:d,href:A,title:k},h),G=o.createElement(Ud,{type:s,danger:a,icon:E}),[K,U]=R([W,G]);return o.createElement(th.Compact,Object.assign({className:V,size:B,block:!0},H),K,o.createElement(zu,Object.assign({},j),U))};nh.__ANT_BUTTON=!0;const oh=nh,rh=zu;rh.Button=oh;const ih=rh,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,$o.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:r,motionDurationSlow:i,motionDurationMid:s,motionEaseInOutCirc:a,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:h,paddingXS:p,dotColorDisabled:f,lineType:m,radioColor:g,radioBgColor:b,calc:v}=e,y=`${t}-inner`,w=v(r).sub(v(4).mul(2)),C=v(1).mul(r).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},(0,$o.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,mo.zA)(u)} ${m} ${o}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},(0,$o.dF)(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,\n &:hover ${y}`]:{borderColor:o},[`${t}-input:focus-visible + ${y}`]:Object.assign({},(0,$o.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(r).div(-2).equal({unit:!0}),marginInlineStart:v(1).mul(r).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:C,transform:"scale(0)",opacity:0,transition:`all ${i} ${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`]:{[y]:{borderColor:o,backgroundColor:b,"&::after":{transform:`scale(${e.calc(e.dotSize).div(r).equal()})`,opacity:1,transition:`all ${i} ${a}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[y]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:f}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:h,cursor:"not-allowed"},[`&${t}-checked`]:{[y]:{"&::after":{transform:`scale(${v(w).div(r).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:p,paddingInlineEnd:p}})}},ph=e=>{const{buttonColor:t,controlHeight:n,componentCls:o,lineWidth:r,lineType:i,colorBorder:s,motionDurationSlow:a,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:h,controlHeightLG:p,controlHeightSM:f,paddingXS:m,borderRadius:g,borderRadiusSM:b,borderRadiusLG:v,buttonCheckedBg:y,buttonSolidCheckedColor:w,colorTextDisabled:C,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:A,colorPrimary:E,colorPrimaryHover:k,colorPrimaryActive:R,buttonSolidCheckedBg:M,buttonSolidCheckedHoverBg:I,buttonSolidCheckedActiveBg:P,calc:T}=e;return{[`${o}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:(0,mo.zA)(T(n).sub(T(r).mul(2)).equal()),background:d,border:`${(0,mo.zA)(r)} ${i} ${s}`,borderBlockStartWidth:T(r).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:r,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:T(r).mul(-1).equal(),insetInlineStart:T(r).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:r,paddingInline:0,backgroundColor:s,transition:`background-color ${a}`,content:'""'}},"&:first-child":{borderInlineStart:`${(0,mo.zA)(r)} ${i} ${s}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${o}-group-large &`]:{height:p,fontSize:h,lineHeight:(0,mo.zA)(T(p).sub(T(r).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},[`${o}-group-small &`]:{height:f,paddingInline:T(m).sub(r).equal(),paddingBlock:0,lineHeight:(0,mo.zA)(T(f).sub(T(r).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:E},"&:has(:focus-visible)":Object.assign({},(0,$o.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:E,background:y,borderColor:E,"&::before":{backgroundColor:E},"&:first-child":{borderColor:E},"&: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:w,background:M,borderColor:M,"&:hover":{color:w,background:I,borderColor:I},"&:active":{color:w,background:P,borderColor:P}},"&-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:A,backgroundColor:S,borderColor:s,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},fh=No("Radio",(e=>{const{controlOutline:t,controlOutlineWidth:n}=e,o=`0 0 0 ${(0,mo.zA)(n)} ${t}`,r=Ro(e,{radioFocusShadow:o,radioButtonFocusShadow:o});return[dh(r),hh(r),ph(r)]}),(e=>{const{wireframe:t,padding:n,marginXS:o,lineWidth:r,fontSizeLG:i,colorText:s,colorBgContainer:a,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:h,colorPrimaryActive:p,colorWhite:f}=e;return{radioSize:i,dotSize:t?i-8:i-2*(4+r),dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:h,buttonSolidCheckedActiveBg:p,buttonBg:a,buttonCheckedBg:a,buttonColor:s,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-r,wrapperMarginInlineEnd:o,radioColor:t?d:f,radioBgColor:t?a:d}}),{unitless:{radioSize:!0,dotSize:!0}});const mh=(e,t)=>{var n,r;const i=o.useContext(lh),s=o.useContext(ch),{getPrefixCls:a,direction:l,radio:c}=o.useContext(ho.QO),u=o.useRef(null),d=(0,g.K4)(t,u),{isFormItemInput:h}=o.useContext(Ni),{prefixCls:p,className:f,rootClassName:m,children:b,style:v,title:y}=e,w=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["prefixCls","className","rootClassName","children","style","title"]),C=a("radio",p),x="button"===((null==i?void 0:i.optionType)||s),S=x?`${C}-button`:C,A=vr(C),[E,k,R]=fh(C,A),I=Object.assign({},w),P=o.useContext(br.A);i&&(I.name=i.name,I.onChange=t=>{var n,o;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(o=null==i?void 0:i.onChange)||void 0===o||o.call(i,t)},I.checked=e.value===i.value,I.disabled=null!==(n=I.disabled)&&void 0!==n?n:i.disabled),I.disabled=null!==(r=I.disabled)&&void 0!==r?r:P;const T=M()(`${S}-wrapper`,{[`${S}-wrapper-checked`]:I.checked,[`${S}-wrapper-disabled`]:I.disabled,[`${S}-wrapper-rtl`]:"rtl"===l,[`${S}-wrapper-in-form-item`]:h,[`${S}-wrapper-block`]:!!(null==i?void 0:i.block)},null==c?void 0:c.className,f,m,k,R,A),[O,$]=_i(I.onClick);return E(o.createElement(gr,{component:"Radio",disabled:I.disabled},o.createElement("label",{className:T,style:Object.assign(Object.assign({},null==c?void 0:c.style),v),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:y,onClick:O},o.createElement(uo,Object.assign({},I,{className:M()(I.className,{[jo]:!x}),type:"radio",prefixCls:S,ref:d,onClick:$})),void 0!==b?o.createElement("span",{className:`${S}-label`},b):null)))},gh=o.forwardRef(mh),bh=o.forwardRef(((e,t)=>{const{getPrefixCls:n,direction:r}=o.useContext(ho.QO),i=ds(),{prefixCls:s,className:a,rootClassName:l,options:c,buttonStyle:u="outline",disabled:d,children:h,size:p,style:f,id:m,optionType:g,name:b=i,defaultValue:v,value:y,block:w=!1,onChange:C,onMouseEnter:x,onMouseLeave:S,onFocus:A,onBlur:E}=e,[k,R]=(0,so.A)(v,{value:y}),I=o.useCallback((t=>{const n=k,o=t.target.value;"value"in e||R(o),o!==n&&(null==C||C(t))}),[k,R,C]),P=n("radio",s),T=`${P}-group`,O=vr(P),[$,D,N]=fh(P,O);let L=h;c&&c.length>0&&(L=c.map((e=>"string"==typeof e||"number"==typeof e?o.createElement(gh,{key:e.toString(),prefixCls:P,disabled:d,value:e,checked:k===e},e):o.createElement(gh,{key:`radio-group-value-options-${e.value}`,prefixCls:P,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 H=pc(p),z=M()(T,`${T}-${u}`,{[`${T}-${H}`]:H,[`${T}-rtl`]:"rtl"===r,[`${T}-block`]:w},a,l,D,N,O),F=o.useMemo((()=>({onChange:I,value:k,disabled:d,name:b,optionType:g,block:w})),[I,k,d,b,g,w]);return $(o.createElement("div",Object.assign({},ze(e,{aria:!0,data:!0}),{className:z,style:f,onMouseEnter:x,onMouseLeave:S,onFocus:A,onBlur:E,id:m,ref:t}),o.createElement(ah,{value:F},L)))})),vh=o.memo(bh);const yh=(e,t)=>{const{getPrefixCls:n}=o.useContext(ho.QO),{prefixCls:r}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["prefixCls"]),s=n("radio",r);return o.createElement(uh,{value:"button"},o.createElement(gh,Object.assign({prefixCls:s},i,{type:"radio",ref:t})))},wh=o.forwardRef(yh),Ch=gh;Ch.Button=wh,Ch.Group=vh,Ch.__ANT_RADIO=!0;const xh=Ch,Sh={},Ah="SELECT_ALL",Eh="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 Ih(e){return null!=e&&e===e.window}var Ph=n(60685),Th=n(80436);const Oh=(e,t)=>{const n=o.useContext(Ph.A);return[o.useMemo((()=>{var o;const r=t||Th.A[e],i=null!==(o=null==n?void 0:n[e])&&void 0!==o?o:{};return Object.assign(Object.assign({},"function"==typeof r?r():r),i||{})}),[e,t,n]),o.useMemo((()=>{const e=null==n?void 0:n.locale;return(null==n?void 0:n.exist)&&!e?Th.A.locale:e}),[n])]},$h=()=>{const[,e]=(0,Do.Ay)(),[t]=Oh("Empty"),n=new Xc.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"}))))},Dh=()=>{const[,e]=(0,Do.Ay)(),[t]=Oh("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:s}=e,{borderColor:a,shadowColor:l,contentColor:c}=(0,o.useMemo)((()=>({borderColor:new Xc.Y(n).onBackground(s).toHexString(),shadowColor:new Xc.Y(r).onBackground(s).toHexString(),contentColor:new Xc.Y(i).onBackground(s).toHexString()})),[n,r,i,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}))))},Nh=e=>{const{componentCls:t,margin:n,marginXS:o,marginXL:r,fontSize:i,lineHeight:s}=e;return{[t]:{marginInline:o,fontSize:i,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:r,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=No("Empty",(e=>{const{componentCls:t,controlHeightLG:n,calc:o}=e,r=Ro(e,{emptyImgCls:`${t}-img`,emptyImgHeight:o(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:o(n).mul(.875).equal()});return[Nh(r)]}));const Hh=o.createElement($h,null),zh=o.createElement(Dh,null),Fh=e=>{const{className:t,rootClassName:n,prefixCls:r,image:i=Hh,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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:p,direction:f,className:m,style:g,classNames:b,styles:v}=(0,ho.TP)("empty"),y=p("empty",r),[w,C,x]=Lh(y),[S]=Oh("Empty"),A=void 0!==s?s:null==S?void 0:S.description,E="string"==typeof A?A:"empty";let k=null;return k="string"==typeof i?o.createElement("img",{alt:E,src:i}):i,w(o.createElement("div",Object.assign({className:M()(C,x,y,m,{[`${y}-normal`]:i===zh,[`${y}-rtl`]:"rtl"===f},t,n,b.root,null==u?void 0:u.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},v.root),g),null==d?void 0:d.root),c)},h),o.createElement("div",{className:M()(`${y}-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),A&&o.createElement("div",{className:M()(`${y}-description`,b.description,null==u?void 0:u.description),style:Object.assign(Object.assign({},v.description),null==d?void 0:d.description)},A),a&&o.createElement("div",{className:M()(`${y}-footer`,b.footer,null==u?void 0:u.footer),style:Object.assign(Object.assign({},v.footer),null==d?void 0:d.footer)},a)))};Fh.PRESENTED_IMAGE_DEFAULT=Hh,Fh.PRESENTED_IMAGE_SIMPLE=zh;const jh=Fh,Bh=e=>{const{componentName:t}=e,{getPrefixCls:n}=(0,o.useContext)(ho.QO),r=n("empty");switch(t){case"Table":case"List":return o.createElement(jh,{image:jh.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return o.createElement(jh,{image:jh.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return o.createElement(jh,null)}};function _h(){const[,e]=o.useReducer((e=>e+1),0);return e}const Vh=["xxl","xl","lg","md","sm","xs"],Wh=()=>{const[,e]=(0,Do.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(Vh).reverse();return n.forEach(((e,o)=>{const r=e.toUpperCase(),i=`screen${r}Min`,s=`screen${r}`;if(!(t[i]<=t[s]))throw new Error(`${i}<=${s} fails : !(${t[i]}<=${t[s]})`);if(o<n.length-1){const e=`screen${r}Max`;if(!(t[s]<=t[e]))throw new Error(`${s}<=${e} fails : !(${t[s]}<=${t[e]})`);const i=`screen${n[o+1].toUpperCase()}Min`;if(!(t[e]<=t[i]))throw new Error(`${e}<=${i} fails : !(${t[e]}<=${t[i]})`)}})),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}))},r=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)})(r,n),this.matchHandlers[t]={mql:r,listener:n},n(r)}))},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),r=_h(),i=Wh();return(0,c.A)((()=>{const t=i.subscribe((t=>{n.current=t,e&&r()}));return()=>i.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(En,(0,m.A)({},e,{ref:t,icon:Kh}))};const qh=o.forwardRef(Uh),Xh={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 Yh=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Xh}))};const Qh=o.forwardRef(Yh),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,r=e.locale,i=e.changeSize,s=e.pageSize,l=e.goButton,c=e.quickGo,u=e.rootPrefixCls,d=e.disabled,h=e.buildOptionText,p=e.showSizeChanger,f=e.sizeChangerRender,m=o.useState(""),g=(0,a.A)(m,2),b=g[0],v=g[1],y=function(){return!b||Number.isNaN(b)?void 0:Number(b)},w="function"==typeof h?h:function(e){return"".concat(e," ").concat(r.items_per_page)},C=function(e){""!==b&&(e.keyCode!==Ls.ENTER&&"click"!==e.type||(v(""),null==c||c(y())))},x="".concat(u,"-options");if(!p&&!c)return null;var S=null,A=null,E=null;return p&&f&&(S=f({disabled:d,size:s,onSizeChange:function(e){null==i||i(Number(e))},"aria-label":r.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:w(e),value:e}}))})),c&&(l&&(E="boolean"==typeof l?o.createElement("button",{type:"button",onClick:C,onKeyUp:C,disabled:d,className:"".concat(x,"-quick-jumper-button")},r.jump_to_confirm):o.createElement("span",{onClick:C,onKeyUp:C},l)),A=o.createElement("div",{className:"".concat(x,"-quick-jumper")},r.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(y()))},"aria-label":r.page}),r.page,E)),o.createElement("li",{className:x},S,A)},tp=function(e){var t=e.rootPrefixCls,n=e.page,r=e.active,i=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"),r),"".concat(u,"-disabled"),!n),i),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 rp(e){var t=Number(e);return"number"==typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ip(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,r=e.selectPrefixCls,i=void 0===r?"rc-select":r,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,f=e.defaultPageSize,g=void 0===f?10:f,b=e.onChange,v=void 0===b?op:b,y=e.hideOnSinglePage,w=e.align,C=e.showPrevNextJumpers,x=void 0===C||C,S=e.showQuickJumper,R=e.showLessItems,I=e.showTitle,P=void 0===I||I,T=e.onShowSizeChange,O=void 0===T?op:T,$=e.locale,D=void 0===$?Jh:$,N=e.style,L=e.totalBoundaryShowSizeChanger,H=void 0===L?50:L,z=e.disabled,F=e.simple,j=e.showTotal,B=e.showSizeChanger,_=void 0===B?h>H:B,V=e.sizeChangerRender,W=e.pageSizeOptions,G=e.itemRender,K=void 0===G?np:G,U=e.jumpPrevIcon,q=e.jumpNextIcon,X=e.prevIcon,Y=e.nextIcon,Q=o.useRef(null),J=(0,so.A)(10,{value:p,defaultValue:g}),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,ip(void 0,ee,h)))}}),oe=(0,a.A)(ne,2),re=oe[0],ie=oe[1],se=o.useState(re),ae=(0,a.A)(se,2),le=ae[0],ce=ae[1];(0,o.useEffect)((function(){ce(re)}),[re]);var ue=Math.max(1,re-(R?3:5)),de=Math.min(ip(void 0,ee,h),re+(R?3:5));function he(t,r){var i=t||o.createElement("button",{type:"button","aria-label":r,className:"".concat(n,"-item-link")});return"function"==typeof t&&(i=o.createElement(t,(0,E.A)({},e))),i}function pe(e){var t=e.target.value,n=ip(void 0,ee,h);return""===t?t:Number.isNaN(Number(t))?le:t>=n?n:Number(t)}var fe=h>ee&&S;function me(e){var t=pe(e);switch(t!==le&&ce(t),e.keyCode){case Ls.ENTER:ge(t);break;case Ls.UP:ge(t-1);break;case Ls.DOWN:ge(t+1)}}function ge(e){if(function(e){return rp(e)&&e!==re&&rp(h)&&h>0}(e)&&!z){var t=ip(void 0,ee,h),n=e;return e>t?n=t:e<1&&(n=1),n!==le&&ce(n),ie(n),null==v||v(n,ee),n}return re}var be=re>1,ve=re<ip(void 0,ee,h);function ye(){be&&ge(re-1)}function we(){ve&&ge(re+1)}function Ce(){ge(ue)}function xe(){ge(de)}function Se(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),r=2;r<n;r++)o[r-2]=arguments[r];t.apply(void 0,o)}}function Ae(e){"click"!==e.type&&e.keyCode!==Ls.ENTER||ge(le)}var Ee=null,ke=ze(e,{aria:!0,data:!0}),Re=j&&o.createElement("li",{className:"".concat(n,"-total-text")},j(h,[0===h?0:(re-1)*ee+1,re*ee>h?h:re*ee])),Me=null,Ie=ip(void 0,ee,h);if(y&&h<=ee)return null;var Pe=[],Te={rootPrefixCls:n,onClick:ge,onKeyPress:Se,showTitle:P,itemRender:K,page:-1},Oe=re-1>0?re-1:0,$e=re+1<Ie?re+1:Ie,De=S&&S.goButton,Ne="object"===(0,A.A)(F)?F.readOnly:!F,Le=De,He=null;F&&(De&&(Le="boolean"==typeof De?o.createElement("button",{type:"button",onClick:Ae,onKeyUp:Ae},D.jump_to_confirm):o.createElement("span",{onClick:Ae,onKeyUp:Ae},De),Le=o.createElement("li",{title:P?"".concat(D.jump_to).concat(re,"/").concat(Ie):null,className:"".concat(n,"-simple-pager")},Le)),He=o.createElement("li",{title:P?"".concat(re,"/").concat(Ie):null,className:"".concat(n,"-simple-pager")},Ne?le:o.createElement("input",{type:"text","aria-label":D.jump_to,value:le,disabled:z,onKeyDown:function(e){e.keyCode!==Ls.UP&&e.keyCode!==Ls.DOWN||e.preventDefault()},onKeyUp:me,onChange:me,onBlur:function(e){ge(pe(e))},size:3}),o.createElement("span",{className:"".concat(n,"-slash")},"/"),Ie));var Fe=R?1:2;if(Ie<=3+2*Fe){Ie||Pe.push(o.createElement(tp,(0,m.A)({},Te,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var je=1;je<=Ie;je+=1)Pe.push(o.createElement(tp,(0,m.A)({},Te,{key:je,page:je,active:re===je})))}else{var Be=R?D.prev_3:D.prev_5,_e=R?D.next_3:D.next_5,Ve=K(ue,"jump-prev",he(U,"prev page")),We=K(de,"jump-next",he(q,"next page"));x&&(Ee=Ve?o.createElement("li",{title:P?Be:null,key:"prev",onClick:Ce,tabIndex:0,onKeyDown:function(e){Se(e,Ce)},className:M()("".concat(n,"-jump-prev"),(0,k.A)({},"".concat(n,"-jump-prev-custom-icon"),!!U))},Ve):null,Me=We?o.createElement("li",{title:P?_e:null,key:"next",onClick:xe,tabIndex:0,onKeyDown:function(e){Se(e,xe)},className:M()("".concat(n,"-jump-next"),(0,k.A)({},"".concat(n,"-jump-next-custom-icon"),!!q))},We):null);var Ge=Math.max(1,re-Fe),Ke=Math.min(re+Fe,Ie);re-1<=Fe&&(Ke=1+2*Fe),Ie-re<=Fe&&(Ge=Ie-2*Fe);for(var Ue=Ge;Ue<=Ke;Ue+=1)Pe.push(o.createElement(tp,(0,m.A)({},Te,{key:Ue,page:Ue,active:re===Ue})));if(re-1>=2*Fe&&3!==re&&(Pe[0]=o.cloneElement(Pe[0],{className:M()("".concat(n,"-item-after-jump-prev"),Pe[0].props.className)}),Pe.unshift(Ee)),Ie-re>=2*Fe&&re!==Ie-2){var qe=Pe[Pe.length-1];Pe[Pe.length-1]=o.cloneElement(qe,{className:M()("".concat(n,"-item-before-jump-next"),qe.props.className)}),Pe.push(Me)}1!==Ge&&Pe.unshift(o.createElement(tp,(0,m.A)({},Te,{key:1,page:1}))),Ke!==Ie&&Pe.push(o.createElement(tp,(0,m.A)({},Te,{key:Ie,page:Ie})))}var Xe=function(e){var t=K(e,"prev",he(X,"prev page"));return o.isValidElement(t)?o.cloneElement(t,{disabled:!be}):t}(Oe);if(Xe){var Ye=!be||!Ie;Xe=o.createElement("li",{title:P?D.prev_page:null,onClick:ye,tabIndex:Ye?null:0,onKeyDown:function(e){Se(e,ye)},className:M()("".concat(n,"-prev"),(0,k.A)({},"".concat(n,"-disabled"),Ye)),"aria-disabled":Ye},Xe)}var Qe,Je,Ze=function(e){var t=K(e,"next",he(Y,"next page"));return o.isValidElement(t)?o.cloneElement(t,{disabled:!ve}):t}($e);Ze&&(F?(Qe=!ve,Je=be?0:null):Je=(Qe=!ve||!Ie)?null:0,Ze=o.createElement("li",{title:P?D.next_page:null,onClick:we,tabIndex:Je,onKeyDown:function(e){Se(e,we)},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"===w),"".concat(n,"-center"),"center"===w),"".concat(n,"-end"),"end"===w),"".concat(n,"-simple"),F),"".concat(n,"-disabled"),z));return o.createElement("ul",(0,m.A)({className:et,style:N,ref:Q},ke),Re,Xe,F?He:Pe,Ze,o.createElement(ep,{locale:D,rootPrefixCls:n,disabled:z,selectPrefixCls:i,changeSize:function(e){var t=ip(e,ee,h),n=re>t&&0!==t?t:re;te(e),ce(n),null==O||O(re,e),ie(n),null==v||v(n,e)},pageSize:ee,pageSizeOptions:W,quickGo:fe?ge:null,goButton:Le,showSizeChanger:_,sizeChangerRender:V}))};var ap=n(96069);const lp=function(e){var t=e.className,n=e.customizeIcon,r=e.customizeIconProps,i=e.children,s=e.onMouseDown,a=e.onClick,l="function"==typeof n?n(r):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")})))},i))};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,r=e.id,i=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,j.A)(e,dp),f=i||o.createElement("input",null),m=f,b=m.ref,v=m.props;return(0,T.$e)(!("maxLength"in f.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),o.cloneElement(f,(0,E.A)((0,E.A)((0,E.A)({type:"search"},function(e,t,n){var o=(0,E.A)((0,E.A)({},e),n?t:{});return Object.keys(t).forEach((function(n){var r=t[n];"function"==typeof r&&(o[n]=function(){for(var t,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r.apply(void 0,i),null===(t=e[n])||void 0===t?void 0:t.call.apply(t,[e].concat(i))})})),o}(p,v,!0)),{},{id:r,ref:(0,g.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(r,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(r,"_list"),"aria-activedescendant":d?c:void 0},h),{},{value:l?u:"",readOnly:!l,unselectable:l?null:"on",style:(0,E.A)((0,E.A)({},v.style),{},{opacity:l?null:0})}))};const pp=o.forwardRef(hp);function fp(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var mp="undefined"!=typeof window&&window.document&&window.document.documentElement;function gp(e){return["string","number"].includes((0,A.A)(e))}function bp(e){var t=void 0;return e&&(gp(e.title)?t=e.title.toString():gp(e.label)&&(t=e.label.toString())),t}function vp(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var yp=function(e){e.preventDefault(),e.stopPropagation()};const wp=function(e){var t,n,r=e.id,i=e.prefixCls,s=e.values,l=e.open,c=e.searchValue,u=e.autoClearSearchValue,d=e.inputRef,h=e.placeholder,p=e.disabled,f=e.mode,m=e.showSearch,g=e.autoFocus,b=e.autoComplete,v=e.activeDescendantId,y=e.tabIndex,w=e.removeIcon,C=e.maxTagCount,x=e.maxTagTextLength,S=e.maxTagPlaceholder,A=void 0===S?function(e){return"+ ".concat(e.length," ...")}:S,E=e.tagRender,R=e.onToggleOpen,I=e.onRemove,P=e.onInputChange,T=e.onInputPaste,O=e.onInputKeyDown,$=e.onInputMouseDown,D=e.onInputCompositionStart,N=e.onInputCompositionEnd,L=e.onInputBlur,H=o.useRef(null),z=(0,o.useState)(0),F=(0,a.A)(z,2),j=F[0],B=F[1],_=(0,o.useState)(!1),V=(0,a.A)(_,2),W=V[0],G=V[1],K="".concat(i,"-selection"),U=l||"multiple"===f&&!1===u||"tags"===f?c:"",q="tags"===f||"multiple"===f&&!1===u||m&&(l||W);t=function(){B(H.current.scrollWidth)},n=[U],mp?o.useLayoutEffect(t,n):o.useEffect(t,n);var X=function(e,t,n,r,i){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),r&&o.createElement(lp,{className:"".concat(K,"-item-remove"),onMouseDown:yp,onClick:i,customizeIcon:w},"×"))},Y=function(e,t,n,r,i,s){return o.createElement("span",{onMouseDown:function(e){yp(e),R(!l)}},E({label:t,value:e,disabled:n,closable:r,onClose:i,isMaxTag:!!s}))},Q=o.createElement("div",{className:"".concat(K,"-search"),style:{width:j},onFocus:function(){G(!0)},onBlur:function(){G(!1)}},o.createElement(pp,{ref:d,open:l,prefixCls:i,id:r,inputElement:null,disabled:p,autoFocus:g,autoComplete:b,editable:q,activeDescendantId:v,value:U,onKeyDown:O,onMouseDown:$,onChange:P,onPaste:T,onCompositionStart:D,onCompositionEnd:N,onBlur:L,tabIndex:y,attrs:ze(e,!0)}),o.createElement("span",{ref:H,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,r=!p&&!t,i=n;if("number"==typeof x&&("string"==typeof n||"number"==typeof n)){var s=String(i);s.length>x&&(i="".concat(s.slice(0,x),"..."))}var a=function(t){t&&t.stopPropagation(),I(e)};return"function"==typeof E?Y(o,i,t,r,a):X(e,i,t,r,a)},renderRest:function(e){if(!s.length)return null;var t="function"==typeof A?A(e):A;return"function"==typeof E?Y(void 0,t,!1,!1,void 0,!0):X({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,r=e.id,i=e.inputRef,s=e.disabled,l=e.autoFocus,c=e.autoComplete,u=e.activeDescendantId,d=e.mode,h=e.open,p=e.values,f=e.placeholder,m=e.tabIndex,g=e.showSearch,b=e.searchValue,v=e.activeValue,y=e.maxLength,w=e.onInputKeyDown,C=e.onInputMouseDown,x=e.onInputChange,S=e.onInputPaste,A=e.onInputCompositionStart,E=e.onInputCompositionEnd,k=e.onInputBlur,R=e.title,M=o.useState(!1),I=(0,a.A)(M,2),P=I[0],T=I[1],O="combobox"===d,$=O||g,D=p[0],N=b||"";O&&v&&!P&&(N=v),o.useEffect((function(){O&&T(!1)}),[O,v]);var L=!("combobox"!==d&&!h&&!g||!N),H=void 0===R?bp(D):R,z=o.useMemo((function(){return D?null:o.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:L?{visibility:"hidden"}:void 0},f)}),[D,L,f,n]);return o.createElement("span",{className:"".concat(n,"-selection-wrap")},o.createElement("span",{className:"".concat(n,"-selection-search")},o.createElement(pp,{ref:i,prefixCls:n,id:r,open:h,inputElement:t,disabled:s,autoFocus:l,autoComplete:c,editable:$,activeDescendantId:u,value:N,onKeyDown:w,onMouseDown:C,onChange:function(e){T(!0),x(e)},onPaste:S,onCompositionStart:A,onCompositionEnd:E,onBlur:k,tabIndex:m,attrs:ze(e,!0),maxLength:O?y:void 0})),!O&&D?o.createElement("span",{className:"".concat(n,"-selection-item"),title:H,style:L?{visibility:"hidden"}:void 0},D.label):null,z)};var xp=function(e,t){var n=(0,o.useRef)(null),r=(0,o.useRef)(!1),i=e.prefixCls,s=e.open,l=e.mode,c=e.showSearch,u=e.tokenWithEnter,d=e.disabled,h=e.prefix,p=e.autoClearSearchValue,f=e.onSearch,g=e.onSearchSubmit,b=e.onToggleOpen,v=e.onInputKeyDown,y=e.onInputBlur,w=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),S=x[0],A=x[1],E=(0,o.useRef)(null),k=function(e){!1!==f(e,!0,r.current)&&b(!0)},R={inputRef:n,onInputKeyDown:function(e){var t,o=e.which,i=n.current instanceof HTMLTextAreaElement;i||!s||o!==Ls.UP&&o!==Ls.DOWN||e.preventDefault(),v&&v(e),o!==Ls.ENTER||"tags"!==l||r.current||s||null==g||g(e.target.value),i&&!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(){A(!0)},onInputChange:function(e){var t=e.target.value;if(u&&E.current&&/[\r\n]/.test(E.current)){var n=E.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,E.current)}E.current=null,k(t)},onInputPaste:function(e){var t=e.clipboardData,n=null==t?void 0:t.getData("text");E.current=n||""},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(e){r.current=!1,"combobox"!==l&&k(e.target.value)},onInputBlur:y},M="multiple"===l||"tags"===l?o.createElement(wp,(0,m.A)({},e,R)):o.createElement(Cp,(0,m.A)({},e,R));return o.createElement("div",{ref:w,className:"".concat(i,"-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=S();e.target===n.current||t||"combobox"===l&&d||e.preventDefault(),("combobox"===l||c&&t)&&s||(s&&!1!==p&&f("",!0,!1),b())}},h&&o.createElement("div",{className:"".concat(i,"-prefix")},h),M)};const Sp=o.forwardRef(xp);var Ap=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ep=function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),i=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,f=e.builtinPlacements,g=e.dropdownMatchSelectWidth,b=e.dropdownRender,v=e.dropdownAlign,y=e.getPopupContainer,w=e.empty,C=e.getTriggerDOMNode,x=e.onPopupVisibleChange,S=e.onPopupMouseEnter,A=(0,j.A)(e,Ap),R="".concat(n,"-dropdown"),I=s;b&&(I=b(s));var P=o.useMemo((function(){return f||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"}}}(g)}),[f,g]),T=a?"".concat(R,"-").concat(a):l,O="number"==typeof g,$=o.useMemo((function(){return O?null:!1===g?"minWidth":"width"}),[g,O]),D=c;O&&(D=(0,E.A)((0,E.A)({},D),{},{width:g}));var N=o.useRef(null);return o.useImperativeHandle(t,(function(){return{getPopupElement:function(){var e;return null===(e=N.current)||void 0===e?void 0:e.popupElement}}})),o.createElement(Ds,(0,m.A)({},A,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:p||("rtl"===h?"bottomRight":"bottomLeft"),builtinPlacements:P,prefixCls:R,popupTransitionName:T,popup:o.createElement("div",{onMouseEnter:S},I),ref:N,stretch:$,popupAlign:v,popupVisible:r,getPopupContainer:y,popupClassName:M()(u,(0,k.A)({},"".concat(R,"-empty"),w)),popupStyle:D,getTriggerDOMNode:C,onPopupVisibleChange:x}),i)};const kp=o.forwardRef(Ep);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 Ip(e){return void 0!==e&&!Number.isNaN(e)}function Pp(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 Tp(e){var t=(0,E.A)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,T.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 $p(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,A.A)(t))?t:n})).join(", ")),n.length>50?", ...":null):null}var Dp=["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"],Np=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Lp=function(e){return"tags"===e||"multiple"===e},Hp=o.forwardRef((function(e,t){var n,r=e.id,i=e.prefixCls,s=e.className,l=e.showSearch,u=e.tagRender,d=e.direction,h=e.omitDomProps,p=e.displayValues,f=e.onDisplayValuesChange,b=e.emptyOptions,v=e.notFoundContent,y=void 0===v?"Not Found":v,w=e.onClear,C=e.mode,x=e.disabled,S=e.loading,R=e.getInputElement,I=e.getRawInputElement,P=e.open,T=e.defaultOpen,O=e.onDropdownVisibleChange,$=e.activeValue,D=e.onActiveValueChange,N=e.activeDescendantId,L=e.searchValue,H=e.autoClearSearchValue,z=e.onSearch,F=e.onSearchSplit,B=e.tokenSeparators,_=e.allowClear,V=e.prefix,W=e.suffixIcon,G=e.clearIcon,K=e.OptionList,U=e.animation,q=e.transitionName,X=e.dropdownStyle,Y=e.dropdownClassName,Q=e.dropdownMatchSelectWidth,J=e.dropdownRender,Z=e.dropdownAlign,ee=e.placement,te=e.builtinPlacements,ne=e.getPopupContainer,oe=e.showAction,re=void 0===oe?[]:oe,ie=e.onFocus,se=e.onBlur,ae=e.onKeyUp,le=e.onKeyDown,ce=e.onMouseDown,ue=(0,j.A)(e,Dp),de=Lp(C),he=(void 0!==l?l:de)||"combobox"===C,pe=(0,E.A)({},ue);Np.forEach((function(e){delete pe[e]})),null==h||h.forEach((function(e){delete pe[e]}));var fe=o.useState(!1),me=(0,a.A)(fe,2),ge=me[0],be=me[1];o.useEffect((function(){be(hs())}),[]);var ve=o.useRef(null),ye=o.useRef(null),we=o.useRef(null),Ce=o.useRef(null),xe=o.useRef(null),Se=o.useRef(!1),Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=o.useState(!1),n=(0,a.A)(t,2),r=n[0],i=n[1],s=o.useRef(null),l=function(){window.clearTimeout(s.current)};return o.useEffect((function(){return l}),[]),[r,function(t,n){l(),s.current=window.setTimeout((function(){i(t),n&&n()}),e)},l]}(),Ee=(0,a.A)(Ae,3),ke=Ee[0],Re=Ee[1],Me=Ee[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||ye.current}}));var Ie=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]),Pe="combobox"===C&&"function"==typeof R&&R()||null,Te="function"==typeof I&&I(),Oe=(0,g.xK)(ye,null==Te||null===(n=Te.props)||void 0===n?void 0:n.ref),$e=o.useState(!1),De=(0,a.A)($e,2),Ne=De[0],Le=De[1];(0,c.A)((function(){Le(!0)}),[]);var He=(0,so.A)(!1,{defaultValue:T,value:P}),ze=(0,a.A)(He,2),Fe=ze[0],je=ze[1],Be=!!Ne&&Fe,_e=!y&&b;(x||_e&&Be&&"combobox"===C)&&(Be=!1);var Ve=!_e&&Be,We=o.useCallback((function(e){var t=void 0!==e?e:!Be;x||(je(t),Be!==t&&(null==O||O(t)))}),[x,Be,je,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,Xe=function(e,t,n){if(!(de&&Ip(Ue)&&(null==qe?void 0:qe.size)>=Ue)){var o=!0,r=e;null==D||D(null);var i=function(e,t,n){if(!t||!t.length)return null;var o=!1,r=function e(t,n){var r=(0,Rp.A)(n),i=r[0],s=r.slice(1);if(!i)return[t];var a=t.split(i);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?r.slice(0,n):r:null}(e,B,Ip(Ue)?Ue-qe.size:void 0),s=n?null:i;return"combobox"!==C&&s&&(r="",null==F||F(s),We(!1),o=!1),z&&Ie!==r&&z(r,{source:t?"typing":"effect"}),o}};o.useEffect((function(){Be||de||"combobox"===C||Xe("",!1,!1)}),[Be]),o.useEffect((function(){Fe&&x&&je(!1),x&&!Se.current&&Re(!1)}),[x]);var Ye=up(),Qe=(0,a.A)(Ye,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 rt,it=o.useState({}),st=(0,a.A)(it,2)[1];Te&&(rt=function(e){We(e)}),function(e,t,n,r){var i=o.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},o.useEffect((function(){function e(e){var t,n;if(null===(t=i.current)||void 0===t||!t.customizedTrigger){var o=e.target;o.shadowRoot&&e.composed&&(o=e.composedPath()[0]||o),i.current.open&&[ve.current,null===(n=we.current)||void 0===n?void 0:n.getPopupElement()].filter((function(e){return e})).every((function(e){return!e.contains(o)&&e!==o}))&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}(0,Ve,We,!!Te);var at,lt=o.useMemo((function(){return(0,E.A)((0,E.A)({},e),{},{notFoundContent:y,open:Be,triggerOpen:Ve,id:r,showSearch:he,multiple:de,toggleOpen:We})}),[e,y,Ve,Be,r,he,de,We]),ct=!!W||S;ct&&(at=o.createElement(lp,{className:M()("".concat(i,"-arrow"),(0,k.A)({},"".concat(i,"-arrow-loading"),S)),customizeIcon:W,customizeIconProps:{loading:S,searchValue:Ie,open:Be,focused:ke,showSearch:he}}));var ut,dt=function(e,t,n,r,i){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,A.A)(r)?r.clearIcon:i||void 0}),[r,i]);return{allowClear:o.useMemo((function(){return!(s||!r||!n.length&&!a||"combobox"===l&&""===a)}),[r,s,n.length,a,l]),clearIcon:o.createElement(lp,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:c},"×")}}(i,(function(){var e;null==w||w(),null===(e=Ce.current)||void 0===e||e.focus(),f([],{type:"clear",values:p}),Xe("",!1,!1)}),p,_,G,x,Ie,C),ht=dt.allowClear,pt=dt.clearIcon,ft=o.createElement(K,{ref:xe}),mt=M()(i,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(i,"-focused"),ke),"".concat(i,"-multiple"),de),"".concat(i,"-single"),!de),"".concat(i,"-allow-clear"),_),"".concat(i,"-show-arrow"),ct),"".concat(i,"-disabled"),x),"".concat(i,"-loading"),S),"".concat(i,"-open"),Be),"".concat(i,"-customize-input"),Pe),"".concat(i,"-show-search"),he)),gt=o.createElement(kp,{ref:we,disabled:x,prefixCls:i,visible:Ve,popupElement:ft,animation:U,transitionName:q,dropdownStyle:X,dropdownClassName:Y,direction:d,dropdownMatchSelectWidth:Q,dropdownRender:J,dropdownAlign:Z,placement:ee,builtinPlacements:te,getPopupContainer:ne,empty:b,getTriggerDOMNode:function(e){return ye.current||e},onPopupVisibleChange:rt,onPopupMouseEnter:function(){st({})}},Te?o.cloneElement(Te,{ref:Oe}):o.createElement(Sp,(0,m.A)({},e,{domRef:ye,prefixCls:i,inputElement:Pe,ref:Ce,id:r,prefix:V,showSearch:he,autoClearSearchValue:H,mode:C,activeDescendantId:N,tagRender:u,values:p,open:Be,onToggleOpen:We,activeValue:$,searchValue:Ie,onSearch:Xe,onSearchSubmit:function(e){e&&e.trim()&&z(e,{source:"submit"})},onRemove:function(e){var t=p.filter((function(t){return t!==e}));f(t,{type:"remove",values:[e]})},tokenWithEnter:Ge,onInputBlur:function(){et.current=!1}})));return ut=Te?gt:o.createElement("div",(0,m.A)({className:mt},pe,{ref:ve,onMouseDown:function(e){var t,n=e.target,o=null===(t=we.current)||void 0===t?void 0:t.getPopupElement();if(o&&o.contains(n)){var r=setTimeout((function(){var e,t=ot.indexOf(r);-1!==t&&ot.splice(t,1),Me(),ge||o.contains(document.activeElement)||null===(e=Ce.current)||void 0===e||e.focus()}));ot.push(r)}for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;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,r="Enter"===o;if(r&&("combobox"!==C&&e.preventDefault(),Be||We(!0)),Ze(!!Ie),"Backspace"===o&&!n&&de&&!Ie&&p.length){for(var i=(0,tt.A)(p),s=null,a=i.length-1;a>=0;a-=1){var l=i[a];if(!l.disabled){i.splice(a,1),s=l;break}}s&&f(i,{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||r&&et.current||(r&&(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 r;Be&&(null===(r=xe.current)||void 0===r||r.onKeyUp.apply(r,[e].concat(n))),"Enter"===e.key&&(et.current=!1),null==ae||ae.apply(void 0,[e].concat(n))},onFocus:function(){Re(!0),x||(ie&&!nt.current&&ie.apply(void 0,arguments),re.includes("focus")&&We(!0)),nt.current=!0},onBlur:function(){Se.current=!0,Re(!1,(function(){nt.current=!1,Se.current=!1,We(!1)})),x||(Ie&&("tags"===C?z(Ie,{source:"submit"}):"multiple"===C&&z("",{source:"blur"})),se&&se.apply(void 0,arguments))}}),o.createElement($p,{visible:ke&&!Be,values:p}),gt,at,ht&&pt),o.createElement(cp.Provider,{value:lt},ut)}));const zp=Hp;var Fp=function(){return null};Fp.isSelectOptGroup=!0;const jp=Fp;var Bp=function(){return null};Bp.isSelectOption=!0;const _p=Bp;var Vp=["disabled","title","children","style","className"];function Wp(e){return"string"==typeof e||"number"==typeof e}var Gp=function(e,t){var n=o.useContext(cp),r=n.prefixCls,i=n.id,s=n.open,l=n.multiple,c=n.mode,u=n.searchValue,d=n.toggleOpen,h=n.notFoundContent,p=n.onPopupScroll,f=o.useContext(Op),g=f.maxCount,b=f.flattenOptions,v=f.onActiveValue,y=f.defaultActiveFirstOption,w=f.onSelect,C=f.menuItemSelectedIcon,x=f.rawValues,S=f.fieldNames,A=f.virtual,E=f.direction,R=f.listHeight,P=f.listItemHeight,T=f.optionRender,O="".concat(r,"-item"),$=(0,I.A)((function(){return b}),[s,b],(function(e,t){return t[0]&&e[1]!==t[1]})),D=o.useRef(null),N=o.useMemo((function(){return l&&Ip(g)&&(null==x?void 0:x.size)>=g}),[l,g,null==x?void 0:x.size]),L=function(e){e.preventDefault()},H=function(e){var t;null===(t=D.current)||void 0===t||t.scrollTo("number"==typeof e?{index:e}:e)},z=o.useCallback((function(e){return"combobox"!==c&&x.has(e)}),[c,(0,tt.A)(x).toString(),x.size]),F=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=$.length,o=0;o<n;o+=1){var r=(e+o*t+n)%n,i=$[r]||{},s=i.group,a=i.data;if(!s&&(null==a||!a.disabled)&&(z(a.value)||!N))return r}return-1},B=o.useState((function(){return F(0)})),_=(0,a.A)(B,2),V=_[0],W=_[1],G=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];W(e);var n={source:t?"keyboard":"mouse"},o=$[e];o?v(o.value,e,n):v(null,-1,n)};(0,o.useEffect)((function(){G(!1!==y?F(0):-1)}),[$.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=$.findIndex((function(t){var n=t.data;return u?String(n.value).startsWith(u):n.value===e}));-1!==t&&(G(t),H(t))}}));return s&&(null===(e=D.current)||void 0===e||e.scrollTo(void 0)),function(){return clearTimeout(t)}}),[s,u]);var U=function(e){void 0!==e&&w(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 r=F(V+o,o);H(r),G(r,!0)}break;case Ls.TAB:case Ls.ENTER:var i,a=$[V];!a||null!=a&&null!==(i=a.data)&&void 0!==i&&i.disabled||N?U(void 0):U(a.value),s&&e.preventDefault();break;case Ls.ESC:d(!1),s&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){H(e)}}})),0===$.length)return o.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(O,"-empty"),onMouseDown:L},h);var q=Object.keys(S).map((function(e){return S[e]})),X=function(e){return e.label};function Y(e,t){return{role:e.group?"presentation":"option",id:"".concat(i,"_list_").concat(t)}}var Q=function(e){var t=$[e];if(!t)return null;var n=t.data||{},r=n.value,i=t.group,s=ze(n,!0),a=X(t);return t?o.createElement("div",(0,m.A)({"aria-label":"string"!=typeof a||i?null:a},s,{key:e},Y(t,e),{"aria-selected":K(r)}),r):null},J={role:"listbox",id:"".concat(i,"_list")};return o.createElement(o.Fragment,null,A&&o.createElement("div",(0,m.A)({},J,{style:{height:0,width:0,overflow:"hidden"}}),Q(V-1),Q(V),Q(V+1)),o.createElement(qt,{itemKey:"key",ref:D,data:$,height:R,itemHeight:P,fullHeight:!1,onMouseDown:L,onScroll:p,virtual:A,direction:E,innerProps:A?null:J},(function(e,t){var n=e.group,r=e.groupOption,i=e.data,s=e.label,a=e.value,l=i.key;if(n){var c,u=null!==(c=i.title)&&void 0!==c?c:Wp(s)?s.toString():void 0;return o.createElement("div",{className:M()(O,"".concat(O,"-group"),i.className),title:u},void 0!==s?s:l)}var d=i.disabled,h=i.title,p=(i.children,i.style),f=i.className,g=$n((0,j.A)(i,Vp),q),b=z(a),v=d||!b&&N,y="".concat(O,"-option"),w=M()(O,y,f,(0,k.A)((0,k.A)((0,k.A)((0,k.A)({},"".concat(y,"-grouped"),r),"".concat(y,"-active"),V===t&&!v),"".concat(y,"-disabled"),v),"".concat(y,"-selected"),b)),x=X(e),S=!C||"function"==typeof C||b,E="number"==typeof x?x:x||a,R=Wp(E)?E.toString():void 0;return void 0!==h&&(R=h),o.createElement("div",(0,m.A)({},ze(g),A?{}:Y(e,t),{"aria-selected":K(a),className:w,title:R,onMouseMove:function(){V===t||v||G(t)},onClick:function(){v||U(a)},style:p}),o.createElement("div",{className:"".concat(y,"-content")},"function"==typeof T?T(e,{index:t}):E),o.isValidElement(C)||b,S&&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 fp(e).join("").toUpperCase().includes(t)}var qp=0,Xp=(0,Ie.A)();var Yp=["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 r=e,i=r.type.isSelectOptGroup,s=r.key,a=r.props,l=a.children,c=(0,j.A)(a,Qp);return t||!i?function(e){var t=e,n=t.key,o=t.props,r=o.children,i=o.value,s=(0,j.A)(o,Yp);return(0,E.A)({key:n,value:void 0!==i?i:n,children:r},s)}(e):(0,E.A)((0,E.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,r,i){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,r),l(a,u,i)):e(u[n.options],!0)}}(o),{options:o,valueOptions:s,labelOptions:a}}),[e,t,n,r,i])};function ef(e){var t=o.useRef();t.current=e;var n=o.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}var tf=["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"],nf=["inputValue"],of=o.forwardRef((function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,s=void 0===i?"rc-select":i,l=e.backfill,c=e.fieldNames,u=e.inputValue,d=e.searchValue,h=e.onSearch,p=e.autoClearSearchValue,f=void 0===p||p,g=e.onSelect,b=e.onDeselect,v=e.dropdownMatchSelectWidth,y=void 0===v||v,w=e.filterOption,C=e.filterSort,x=e.optionFilterProp,S=e.optionLabelProp,R=e.options,M=e.optionRender,I=e.children,P=e.defaultActiveFirstOption,T=e.menuItemSelectedIcon,O=e.virtual,$=e.direction,D=e.listHeight,N=void 0===D?200:D,L=e.listItemHeight,H=void 0===L?20:L,z=e.labelRender,F=e.value,B=e.defaultValue,_=e.labelInValue,V=e.onChange,W=e.maxCount,G=(0,j.A)(e,tf),K=function(e){var t=o.useState(),n=(0,a.A)(t,2),r=n[0],i=n[1];return o.useEffect((function(){var e;i("rc_select_".concat((Xp?(e=qp,qp+=1):e="TEST_OR_SSR",e)))}),[]),e||r}(n),U=Lp(r),q=!(R||!I),X=o.useMemo((function(){return(void 0!==w||"combobox"!==r)&&w}),[w,r]),Y=o.useMemo((function(){return Pp(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,I,Y,x,S),ne=te.valueOptions,oe=te.labelOptions,re=te.options,ie=o.useCallback((function(e){return fp(e).map((function(e){var t,n,o,r,i,s;!function(e){return!e||"object"!==(0,A.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[S||Y.label]),void 0===o&&(o=null!==(a=null==l?void 0:l.key)&&void 0!==a?a:t),r=null==l?void 0:l.disabled,i=null==l?void 0:l.title),{label:n,value:t,key:o,disabled:r,title:i}}))}),[Y,S,ne]),se=(0,so.A)(B,{value:F}),ae=(0,a.A)(se,2),le=ae[0],ce=ae[1],ue=o.useMemo((function(){var e,t=ie(U&&null===le?[]:le);return"combobox"===r&&function(e){return!e&&0!==e}(null===(e=t[0])||void 0===e?void 0:e.value)?[]:t}),[le,ie,r,U]),de=function(e,t){var n=o.useRef({values:new Map,options:new Map});return[o.useMemo((function(){var o=n.current,r=o.values,i=o.options,s=e.map((function(e){var t;return void 0===e.label?(0,E.A)((0,E.A)({},e),{},{label:null===(t=r.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)||i.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],fe=he[1],me=o.useMemo((function(){if(!r&&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,E.A)((0,E.A)({},e),{},{label:null!==(t="function"==typeof z?z(e):e.label)&&void 0!==t?t:e.value})}))}),[r,pe,z]),ge=o.useMemo((function(){return new Set(pe.map((function(e){return e.value})))}),[pe]);o.useEffect((function(){if("combobox"===r){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=ef((function(e,t){var n=null!=t?t:e;return(0,k.A)((0,k.A)({},Y.value,e),Y.label,n)})),ve=function(e,t,n,r,i){return o.useMemo((function(){if(!n||!1===r)return e;var o=t.options,s=t.label,a=t.value,l=[],c="function"==typeof r,u=n.toUpperCase(),d=c?r:function(e,t){return i?Up(t[i],u):t[o]?Up(t["children"!==s?s:"label"],u):Up(t[a],u)},h=c?function(e){return Tp(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,E.A)((0,E.A)({},e),{},(0,k.A)({},o,t)))}else d(n,h(e))&&l.push(e)})),l}),[e,r,i,n,t])}(o.useMemo((function(){if("tags"!==r)return re;var e=(0,tt.A)(re);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,re,ne,pe,r]),Y,Z,X,x),ye=o.useMemo((function(){return"tags"!==r||!Z||ve.some((function(e){return e[x||"value"]===Z}))||ve.some((function(e){return e[Y.value]===Z}))?ve:[be(Z)].concat((0,tt.A)(ve))}),[be,x,r,ve,Z,Y]),we=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,E.A)((0,E.A)({},t),{},{options:t.options.length>0?e(t.options):t.options}):t}))},Ce=o.useMemo((function(){return C?we(ye):ye}),[ye,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,r=[],i=Pp(n,!1),s=i.label,a=i.value,l=i.options,c=i.groupLabel;return function e(t,n){Array.isArray(t)&&t.forEach((function(t){if(n||!(l in t)){var i=t[a];r.push({key:Mp(t,r.length),groupOption:n,data:t,label:t[s],value:i})}else{var u=t[c];void 0===u&&o&&(u=t.label),r.push({key:Mp(t,r.length),group:!0,data:t,label:u}),e(t[l],!0)}}))}(e,!1),r}(Ce,{fieldNames:Y,childrenAsData:q})}),[Ce,Y,q]),Se=function(e){var t=ie(e);if(ce(t),V&&(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=_?t:t.map((function(e){return e.value})),o=t.map((function(e){return Tp(fe(e.value))}));V(U?n:n[0],U?o:o[0])}},Ae=o.useState(null),Ee=(0,a.A)(Ae,2),ke=Ee[0],Re=Ee[1],Me=o.useState(0),Ie=(0,a.A)(Me,2),Pe=Ie[0],Te=Ie[1],Oe=void 0!==P?P:"combobox"!==r,$e=o.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,o=void 0===n?"keyboard":n;Te(t),l&&"combobox"===r&&null!==e&&"keyboard"===o&&Re(String(e))}),[l,r]),De=function(e,t,n){var o=function(){var t,n=fe(e);return[_?{label:null==n?void 0:n[Y.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,Tp(n)]};if(t&&g){var r=o(),i=(0,a.A)(r,2),s=i[0],l=i[1];g(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)}},Ne=ef((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})),Se(n),De(e,o),"combobox"===r?Re(""):Lp&&!f||(ee(""),Re(""))})),Le=o.useMemo((function(){var e=!1!==O&&!1!==y;return(0,E.A)((0,E.A)({},te),{},{flattenOptions:xe,onActiveValue:$e,defaultActiveFirstOption:Oe,onSelect:Ne,menuItemSelectedIcon:T,rawValues:ge,fieldNames:Y,virtual:e,direction:$,listHeight:N,listItemHeight:H,childrenAsData:q,maxCount:W,optionRender:M})}),[W,te,xe,$e,Oe,Ne,T,ge,Y,O,y,$,N,H,q,M]);return o.createElement(Op.Provider,{value:Le},o.createElement(zp,(0,m.A)({},G,{id:K,prefixCls:s,ref:t,omitDomProps:nf,mode:r,displayValues:me,onDisplayValuesChange:function(e,t){Se(e);var n=t.type,o=t.values;"remove"!==n&&"clear"!==n||o.forEach((function(e){De(e.value,!1,n)}))},direction:$,searchValue:Z,onSearch:function(e,t){if(ee(e),Re(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===r&&Se(e),null==h||h(e));else{var n=(e||"").trim();if(n){var o=Array.from(new Set([].concat((0,tt.A)(ge),[n])));Se(o),De(n,!0),ee("")}}},autoClearSearchValue:f,onSearchSplit:function(e){var t=e;"tags"!==r&&(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)(ge),(0,tt.A)(t))));Se(n),n.forEach((function(e){De(e,!0)}))},dropdownMatchSelectWidth:y,OptionList:Kp,emptyOptions:!xe.length,activeValue:ke,activeDescendantId:"".concat(K,"_list_").concat(Pe)})))})),rf=of;rf.Option=_p,rf.OptGroup=jp;const sf=rf;function af(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 lf=(e,t)=>t||e,cf=(e,t,n=void 0)=>{var r,i;const{variant:s,[e]:a}=o.useContext(ho.QO),l=o.useContext(Hi),c=null==a?void 0:a.variant;let u;return u=void 0!==t?t:!1===n?"borderless":null!==(i=null!==(r=null!=l?l:c)&&void 0!==r?r:s)&&void 0!==i?i:"outlined",[u,ho.lJ.includes(u)]},uf=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)},df=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:o,optionPadding:r}=e;return{position:"relative",display:"block",minHeight:t,padding:r,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:o,boxSizing:"border-box"}},hf=e=>{const{antCls:t,componentCls:n}=e,o=`${n}-item`,r=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${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,$o.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 ${r}${a}bottomLeft,\n ${i}${a}bottomLeft\n `]:{animationName:Qc},[`\n ${r}${a}topLeft,\n ${i}${a}topLeft,\n ${r}${a}topRight,\n ${i}${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({},df(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"},$o.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({},df(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")]},pf=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:o,motionDurationSlow:r,paddingXS:i,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 ${r}, line-height ${r}, height ${r}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:i,paddingInlineEnd:e.calc(i).div(2).equal(),[`${t}-disabled&`]:{color:s,borderColor:a,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(i).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,$o.Nk)()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},ff=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:o}=e,r=`${n}-selection-overflow`,i=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:r}=e,i=e.max(e.calc(n).sub(o).equal(),0);return{basePadding:i,containerPadding:e.max(e.calc(i).sub(r).equal(),0),itemHeight:(0,mo.zA)(t),itemLineHeight:(0,mo.zA)(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}})(e);return{[`${n}-multiple${a}`]:Object.assign(Object.assign({},pf(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,mo.zA)(o)} 0`,lineHeight:(0,mo.zA)(i),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:(0,mo.zA)(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,mo.zA)(i),marginBlock:o}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${r}-item + ${r}-item,\n ${n}-prefix + ${n}-selection-wrap\n `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${r}-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:i,fontFamily:e.fontFamily,lineHeight:(0,mo.zA)(i),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 mf(e,t){const{componentCls:n}=e,o=t?`${n}-${t}`:"",r={[`${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[ff(e,t),r]}const gf=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[mf(e),mf(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},mf(o,"lg")]};function bf(e,t){const{componentCls:n,inputPaddingHorizontalBase:o,borderRadius:r}=e,i=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,$o.dF)(e,!0)),{display:"flex",borderRadius:r,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:(0,mo.zA)(i)},[`${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,mo.zA)(i),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,mo.zA)(o)}`,[`${n}-selection-search-input`]:{height:i,fontSize:e.fontSize},"&:after":{lineHeight:(0,mo.zA)(i)}}},[`&${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,mo.zA)(o)}`,"&:after":{display:"none"}}}}}}}function vf(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[bf(e),bf(Ro(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${(0,mo.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()}}}},bf(Ro(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const yf=(e,t)=>{const{componentCls:n,antCls:o,controlOutlineWidth:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${(0,mo.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,mo.zA)(r)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},wf=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},yf(e,t))}),Cf=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},yf(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),wf(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),wf(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,mo.zA)(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),xf=(e,t)=>{const{componentCls:n,antCls:o}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${(0,mo.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}}}},Sf=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},xf(e,t))}),Af=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},xf(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),Sf(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),Sf(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,mo.zA)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Ef=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${(0,mo.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,mo.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}}}}),kf=(e,t)=>{const{componentCls:n,antCls:o}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${(0,mo.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}}}},Rf=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},kf(e,t))}),Mf=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},kf(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),Rf(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),Rf(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,mo.zA)(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),If=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Cf(e)),Af(e)),Ef(e)),Mf(e))}),Pf=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"}}}},Tf=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"}}}},Of=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:o,iconCls:r}=e,i={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},(0,$o.dF)(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},Pf(e)),Tf(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},$o.L9),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},$o.L9),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},(0,$o.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`,[r]:{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)":i,"&:hover":i}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(o).add(e.fontSize).add(e.paddingXS).equal()}}}}}},$f=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Of(e),vf(e),gf(e),hf(e),{[`${t}-rtl`]:{direction:"rtl"}},Fd(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},Df=No("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[$f(n),If(n)]}),(e=>{const{fontSize:t,lineHeight:n,lineWidth:o,controlHeight:r,controlHeightSM:i,controlHeightLG:s,paddingXXS:a,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:h,controlItemBgHover:p,colorBgContainer:f,colorFillSecondary:m,colorBgContainerDisabled:g,colorTextDisabled:b,colorPrimaryHover:v,colorPrimary:y,controlOutline:w}=e,C=2*a,x=2*o,S=Math.min(r-C,r-x),A=Math.min(i-C,i-x),E=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:`${(r-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:r,selectorBg:f,clearBg:f,singleItemHeightLG:s,multipleItemBg:m,multipleItemBorderColor:"transparent",multipleItemHeight:S,multipleItemHeightSM:A,multipleItemHeightLG:E,multipleSelectorBgDisabled:g,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:w,selectAffixPadding:a}}),{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),Nf={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 Lf=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Nf}))};const Hf=o.forwardRef(Lf),zf={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 Ff=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:zf}))};const jf=o.forwardRef(Ff),Bf={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 _f=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Bf}))};const Vf=o.forwardRef(_f),Wf={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 Gf=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Wf}))};const Kf=o.forwardRef(Gf);const Uf="SECRET_COMBOBOX_MODE_DO_NOT_USE",qf=(e,t)=>{var n,r,i,s,a;const{prefixCls:l,bordered:c,className:u,rootClassName:d,getPopupContainer:h,popupClassName:p,dropdownClassName:f,listHeight:m=256,placement:g,listItemHeight:b,size:v,disabled:y,notFoundContent:w,status:C,builtinPlacements:x,dropdownMatchSelectWidth:S,popupMatchSelectWidth:A,direction:E,style:k,allowClear:R,variant:I,dropdownStyle:P,transitionName:T,tagRender:O,maxCount:$,prefix:D,dropdownRender:N,popupRender:L,onDropdownVisibleChange:H,onOpenChange:z,styles:F,classNames:j}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}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:_,getPrefixCls:V,renderEmpty:W,direction:G,virtual:K,popupMatchSelectWidth:U,popupOverflow:q}=o.useContext(ho.QO),{showSearch:X,style:Y,styles:Q,className:J,classNames:Z}=(0,ho.TP)("select"),[,ee]=(0,Do.Ay)(),te=null!=b?b:null==ee?void 0:ee.controlHeight,ne=V("select",l),oe=V(),re=null!=E?E:G,{compactSize:ie,compactItemClassnames:se}=wc(ne,re),[ae,le]=cf("select",I,c),ce=vr(ne),[ue,de,he]=Df(ne,ce),pe=o.useMemo((()=>{const{mode:t}=e;if("combobox"!==t)return t===Uf?"combobox":t}),[e.mode]),fe="multiple"===pe||"tags"===pe,me=function(e,t){return void 0!==t?t:null!==e}(e.suffixIcon,e.showArrow),ge=null!==(n=null!=A?A:S)&&void 0!==n?n:U,be=(null===(r=null==F?void 0:F.popup)||void 0===r?void 0:r.root)||(null===(i=Q.popup)||void 0===i?void 0:i.root)||P,ve=L||N,ye=z||H,{status:we,hasFeedback:Ce,isFormItemInput:xe,feedbackIcon:Se}=o.useContext(Ni),Ae=lf(we,C);let Ee;Ee=void 0!==w?w:"combobox"===pe?null:(null==W?void 0:W("Select"))||o.createElement(Bh,{componentName:"Select"});const{suffixIcon:ke,itemIcon:Re,removeIcon:Me,clearIcon:Ie}=function({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:s,hasFeedback:a,prefixCls:l,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:h}){const p=null!=t?t:o.createElement(jf,null),f=t=>null!==e||a||d?o.createElement(o.Fragment,null,!1!==c&&t,a&&u):null;let m=null;if(void 0!==e)m=f(e);else if(i)m=f(o.createElement(Ku,{spin:!0}));else{const e=`${l}-suffix`;m=({open:t,showSearch:n})=>f(t&&n?o.createElement(Kf,{className:e}):o.createElement(Rn,{className:e}))}let g=null;g=void 0!==n?n:s?o.createElement(Hf,null):null;let b=null;return b=void 0!==r?r:o.createElement(Vf,null),{clearIcon:p,suffixIcon:m,itemIcon:g,removeIcon:b}}(Object.assign(Object.assign({},B),{multiple:fe,hasFeedback:Ce,feedbackIcon:Se,showSuffixIcon:me,prefixCls:ne,componentName:"Select"})),Pe=!0===R?{clearIcon:Ie}:R,Te=$n(B,["suffixIcon","itemIcon"]),Oe=M()((null===(s=null==j?void 0:j.popup)||void 0===s?void 0:s.root)||(null===(a=null==Z?void 0:Z.popup)||void 0===a?void 0:a.root)||p||f,{[`${ne}-dropdown-${re}`]:"rtl"===re},d,Z.root,null==j?void 0:j.root,he,ce,de),$e=pc((e=>{var t;return null!==(t=null!=v?v:ie)&&void 0!==t?t:e})),De=o.useContext(br.A),Ne=null!=y?y:De,Le=M()({[`${ne}-lg`]:"large"===$e,[`${ne}-sm`]:"small"===$e,[`${ne}-rtl`]:"rtl"===re,[`${ne}-${ae}`]:le,[`${ne}-in-form-item`]:xe},af(ne,Ae,Ce),se,J,u,Z.root,null==j?void 0:j.root,d,he,ce,de),He=o.useMemo((()=>void 0!==g?g:"rtl"===re?"bottomRight":"bottomLeft"),[g,re]),[ze]=Ys("SelectLike",null==be?void 0:be.zIndex);return ue(o.createElement(sf,Object.assign({ref:t,virtual:K,showSearch:X},Te,{style:Object.assign(Object.assign(Object.assign(Object.assign({},Q.root),null==F?void 0:F.root),Y),k),dropdownMatchSelectWidth:ge,transitionName:ec(oe,"slide-up",T),builtinPlacements:uf(x,q),listHeight:m,listItemHeight:te,mode:pe,prefixCls:ne,placement:He,direction:re,prefix:D,suffixIcon:ke,menuItemSelectedIcon:Re,removeIcon:Me,allowClear:Pe,notFoundContent:Ee,className:Le,getPopupContainer:h||_,dropdownClassName:Oe,disabled:Ne,dropdownStyle:Object.assign(Object.assign({},be),{zIndex:ze}),maxCount:fe?$:void 0,tagRender:fe?O:void 0,dropdownRender:ve,onDropdownVisibleChange:ye})))},Xf=o.forwardRef(qf),Yf=aa(Xf,"dropdownAlign");Xf.SECRET_COMBOBOX_MODE_DO_NOT_USE=Uf,Xf.Option=_p,Xf.OptGroup=jp,Xf._InternalPanelDoNotUseOrYouWillBeFired=Yf;const Qf=Xf;function Jf(e){return Ro(e,{inputAffixPadding:e.paddingXXS})}const Zf=e=>{const{controlHeight:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightSM:i,controlHeightLG:s,fontSizeLG:a,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:h,colorPrimaryHover:p,colorPrimary:f,controlOutlineWidth:m,controlOutline:g,colorErrorOutline:b,colorWarningOutline:v,colorBgContainer:y,inputFontSize:w,inputFontSizeLG:C,inputFontSizeSM:x}=e,S=w||n,A=x||S,E=C||a,k=Math.round((t-S*o)/2*10)/10-r,R=Math.round((i-A*o)/2*10)/10-r,M=Math.ceil((s-E*l)/2*10)/10-r;return{paddingBlock:Math.max(k,0),paddingBlockSM:Math.max(R,0),paddingBlockLG:Math.max(M,0),paddingInline:c-r,paddingInlineSM:u-r,paddingInlineLG:d-r,addonBg:h,activeBorderColor:f,hoverBorderColor:p,activeShadow:`0 0 0 ${m}px ${g}`,errorActiveShadow:`0 0 0 ${m}px ${b}`,warningActiveShadow:`0 0 0 ${m}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:S,inputFontSizeLG:E,inputFontSizeSM:A}},em=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),tm=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({},em(Ro(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),nm=(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}}),om=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},nm(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),rm=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},nm(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},tm(e))}),om(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),om(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),im=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),sm=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${(0,mo.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},im(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),im(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},tm(e))}})}),am=(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)}},lm=(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}}},cm=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},lm(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),um=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},lm(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},tm(e))}),cm(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),cm(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),dm=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),hm=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},dm(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),dm(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,mo.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${(0,mo.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${(0,mo.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,mo.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${(0,mo.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${(0,mo.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),pm=(e,t)=>({background:e.colorBgContainer,borderWidth:`${(0,mo.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}}),fm=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},pm(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`}}),mm=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pm(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"}}),fm(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),fm(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),gm=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:o,paddingInlineLG:r}=e;return{padding:`${(0,mo.zA)(t)} ${(0,mo.zA)(r)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:o}},bm=e=>({padding:`${(0,mo.zA)(e.paddingBlockSM)} ${(0,mo.zA)(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vm=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,mo.zA)(e.paddingBlock)} ${(0,mo.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({},gm(e)),"&-sm":Object.assign({},bm(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),ym=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({},gm(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},bm(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,mo.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,mo.zA)(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${(0,mo.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,mo.zA)(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${(0,mo.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,$o.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}}}})}},wm=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:o,calc:r}=e,i=r(n).sub(r(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,$o.dF)(e)),vm(e)),rm(e)),um(e)),am(e)),mm(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:i,paddingBottom:i}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},Cm=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,mo.zA)(e.inputAffixPadding)}`}}}},xm=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:o,motionDurationSlow:r,colorIcon:i,colorIconHover:s,iconCls:a}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},vm(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}}}),Cm(e)),{[`${a}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${r}`,"&:hover":{color:s}}}),[`${t}-underlined`]:{borderRadius:0},[c]:{[`${a}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},Sm=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:o}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},(0,$o.dF)(e)),ym(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}}},sm(e)),hm(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}}})})}},Am=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}}}}},Em=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},km=No(["Input","Shared"],(e=>{const t=Ro(e,Jf(e));return[wm(t),xm(t)]}),Zf,{resetFont:!1}),Rm=No(["Input","Component"],(e=>{const t=Ro(e,Jf(e));return[Sm(t),Am(t),Em(t),Fd(t)]}),Zf,{resetFont:!1}),Mm=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"}}}}}},Im=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:(0,mo.zA)(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,mo.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,mo.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,mo.zA)(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:(0,mo.zA)(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:(0,mo.zA)(e.itemSizeSM),input:Object.assign(Object.assign({},bm(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},Pm=e=>{const{componentCls:t}=e;return{[`\n &${t}-simple ${t}-prev,\n &${t}-simple ${t}-next\n `]:{height:e.itemSizeSM,lineHeight:(0,mo.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,mo.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,mo.zA)(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${(0,mo.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,mo.zA)(e.inputOutlineOffset)} 0 ${(0,mo.zA)(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}}}},Tm=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,mo.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,mo.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,mo.zA)(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},vm(e)),nm(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},tm(e)),width:e.calc(e.controlHeightLG).mul(1.25).equal(),height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},Om=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,mo.zA)(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${(0,mo.zA)(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${(0,mo.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}}}}},$m=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,$o.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,mo.zA)(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),Om(e)),Tm(e)),Pm(e)),Im(e)),Mm(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"}}},Dm=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},(0,$o.K8)(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},(0,$o.jk)(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Object.assign({},(0,$o.jk)(e))}}}},Nm=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},Zf(e)),Lm=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"},Jf(e)),Hm=No("Pagination",(e=>{const t=Lm(e);return[$m(t),Dm(t)]}),Nm),zm=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,mo.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}}}}},Fm=Ho(["Pagination","bordered"],(e=>{const t=Lm(e);return[zm(t)]}),Nm);function jm(e){return(0,o.useMemo)((()=>"boolean"==typeof e?[e,{}]:e&&"object"==typeof e?[!0,e]:[void 0,void 0]),[e])}const Bm=e=>{const{align:t,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:s,style:a,size:l,locale:c,responsive:u,showSizeChanger:d,selectComponentClass:h,pageSizeOptions:p}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:m}=Gh(u),[,g]=(0,Do.Ay)(),{getPrefixCls:b,direction:v,showSizeChanger:y,className:w,style:C}=(0,ho.TP)("pagination"),x=b("pagination",n),[S,A,E]=Hm(x),k=pc(l),R="small"===k||!(!m||k||!u),[I]=Oh("Pagination",ap.A),P=Object.assign(Object.assign({},I),c),[T,O]=jm(d),[$,D]=jm(y),N=null!=T?T:$,L=null!=O?O:D,H=h||Qf,z=o.useMemo((()=>p?p.map((e=>Number(e))):void 0),[p]),F=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(Qi,null)),nextIcon:o.createElement("button",{className:`${x}-item-link`,type:"button",tabIndex:-1},"rtl"===v?o.createElement(Qi,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]),j=b("select",r),B=M()({[`${x}-${t}`]:!!t,[`${x}-mini`]:R,[`${x}-rtl`]:"rtl"===v,[`${x}-bordered`]:g.wireframe},w,i,s,A,E),_=Object.assign(Object.assign({},C),a);return S(o.createElement(o.Fragment,null,g.wireframe&&o.createElement(Fm,{prefixCls:x}),o.createElement(sp,Object.assign({},F,f,{style:_,prefixCls:x,selectPrefixCls:j,className:B,locale:P,pageSizeOptions:z,showSizeChanger:N,sizeChangerRender:e=>{var t;const{disabled:n,size:r,onSizeChange:i,"aria-label":s,className:a,options:l}=e,{className:c,onChange:u}=L||{},d=null===(t=l.find((e=>String(e.value)===String(r))))||void 0===t?void 0:t.value;return o.createElement(H,Object.assign({disabled:n,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":s,options:l},L,{value:d,onChange:(e,t)=>{null==i||i(e),null==u||u(e,t)},size:R?"small":"middle",className:M()(a,c)}))}}))))};const _m=80*Math.PI,Vm=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return o.createElement("circle",{className:M()(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:40,cx:50,cy:50,strokeWidth:20,style:n})},Wm=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,i=`${r}-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:""+_m/4,strokeDasharray:`${_m*l/100} ${_m*(100-l)/100}`};return o.createElement("span",{className:M()(r,`${n}-progress`,l<=0&&i)},o.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},o.createElement(Vm,{dotClassName:n,hasCircleCls:!0}),o.createElement(Vm,{dotClassName:n,style:u})))};function Gm(e){const{prefixCls:t,percent:n=0}=e,r=`${t}-dot`,i=`${r}-holder`,s=`${i}-hidden`;return o.createElement(o.Fragment,null,o.createElement("span",{className:M()(i,n>0&&s)},o.createElement("span",{className:M()(r,`${t}-dot-spin`)},[1,2,3,4].map((e=>o.createElement("i",{className:`${t}-dot-item`,key:e}))))),o.createElement(Wm,{prefixCls:t,percent:n}))}function Km(e){const{prefixCls:t,indicator:n,percent:r}=e,i=`${t}-dot`;return n&&o.isValidElement(n)?fo(n,{className:M()(n.props.className,i),percent:r}):o.createElement(Gm,{prefixCls:t,percent:r})}const Um=new mo.Mo("antSpinMove",{to:{opacity:1}}),qm=new mo.Mo("antRotate",{to:{transform:"rotate(405deg)"}}),Xm=e=>{const{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},(0,$o.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:Um,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:qm,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"}})}},Ym=No("Spin",(e=>{const t=Ro(e,{spinDotDefault:e.colorTextDescription});return[Xm(t)]}),(e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}})),Qm=[[30,.05],[70,.03],[96,.01]];let Jm;const Zm=e=>{var t;const{prefixCls:n,spinning:r=!0,delay:i=0,className:s,rootClassName:a,size:l="default",tip:c,wrapperClassName:u,style:d,children:h,fullscreen:p=!1,indicator:f,percent:m}=e,g=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:b,direction:v,className:y,style:w,indicator:C}=(0,ho.TP)("spin"),x=b("spin",n),[S,A,E]=Ym(x),[k,R]=o.useState((()=>r&&!function(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}(r,i))),I=function(e,t){const[n,r]=o.useState(0),i=o.useRef(null),s="auto"===t;return o.useEffect((()=>(s&&e&&(r(0),i.current=setInterval((()=>{r((e=>{const t=100-e;for(let n=0;n<Qm.length;n+=1){const[o,r]=Qm[n];if(e<=o)return e+t*r}return e}))}),200)),()=>{clearInterval(i.current)})),[s,e]),s?n:t}(k,m);o.useEffect((()=>{if(r){const e=function(e,t,n){var o=(n||{}).atBegin;return function(e,t,n){var o,r=n||{},i=r.noTrailing,s=void 0!==i&&i,a=r.noLeading,l=void 0!==a&&a,c=r.debounceMode,u=void 0===c?void 0:c,d=!1,h=0;function p(){o&&clearTimeout(o)}function f(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=this,c=Date.now()-h;function f(){h=Date.now(),t.apply(a,r)}function m(){o=void 0}d||(l||!u||o||f(),p(),void 0===u&&c>e?l?(h=Date.now(),s||(o=setTimeout(u?m:f,e))):f():!0!==s&&(o=setTimeout(u?m:f,void 0===u?e-c:e)))}return f.cancel=function(e){var t=(e||{}).upcomingOnly,n=void 0!==t&&t;p(),d=!n},f}(e,t,{debounceMode:!1!==(void 0!==o&&o)})}(i,(()=>{R(!0)}));return e(),()=>{var t;null===(t=null==e?void 0:e.cancel)||void 0===t||t.call(e)}}R(!1)}),[i,r]);const P=o.useMemo((()=>void 0!==h&&!p),[h,p]),T=M()(x,y,{[`${x}-sm`]:"small"===l,[`${x}-lg`]:"large"===l,[`${x}-spinning`]:k,[`${x}-show-text`]:!!c,[`${x}-rtl`]:"rtl"===v},s,!p&&a,A,E),O=M()(`${x}-container`,{[`${x}-blur`]:k}),$=null!==(t=null!=f?f:C)&&void 0!==t?t:Jm,D=Object.assign(Object.assign({},w),d),N=o.createElement("div",Object.assign({},g,{style:D,className:T,"aria-live":"polite","aria-busy":k}),o.createElement(Km,{prefixCls:x,indicator:$,percent:I}),c&&(P||p)?o.createElement("div",{className:`${x}-text`},c):null);return S(P?o.createElement("div",Object.assign({},g,{className:M()(`${x}-nested-loading`,u,A,E)}),k&&o.createElement("div",{key:"loading"},N),o.createElement("div",{className:O,key:"container"},h)):p?o.createElement("div",{className:M()(`${x}-fullscreen`,{[`${x}-fullscreen-show`]:k},a,A,E)},N):N)};Zm.setDefaultIndicator=e=>{Jm=e};const eg=Zm,tg=(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 ng(e,t){return t?`${t}-${e}`:`${e}`}const og=(e,t)=>"function"==typeof e?e(t):e,rg={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 ig=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:rg}))};const sg=o.forwardRef(ig),ag=function(...e){const t={};return e.forEach((e=>{e&&Object.keys(e).forEach((n=>{void 0!==e[n]&&(t[n]=e[n])}))})),t};function lg(e){if(null==e)throw new TypeError("Cannot destructure "+e)}var cg=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],ug=o.forwardRef((function(e,t){var n=e.className,r=e.style,i=e.motion,s=e.motionNodes,l=e.motionType,u=e.onMotionStart,d=e.onMotionEnd,h=e.active,p=e.treeNodeRequiredProps,f=(0,j.A)(e,cg),g=o.useState(!0),b=(0,a.A)(g,2),v=b[0],y=b[1],w=o.useContext(Mn).prefixCls,C=s&&"hide"!==l;(0,c.A)((function(){s&&C!==v&&y(C)}),[s]);var x=o.useRef(!1),S=function(){s&&!x.current&&(x.current=!0,d())};return function(e,t){var n=o.useState(!1),r=(0,a.A)(n,2),i=r[0],s=r[1];(0,c.A)((function(){if(i)return e(),function(){t()}}),[i]),(0,c.A)((function(){return s(!0),function(){s(!1)}}),[])}((function(){s&&u()}),S),s?o.createElement(Bo.Ay,(0,m.A)({ref:t,visible:v},i,{motionAppear:"show"===l,onVisibleChanged:function(e){C===e&&S()}}),(function(e,t){var n=e.className,r=e.style;return o.createElement("div",{ref:t,className:M()("".concat(w,"-treenode-motion"),n),style:r},s.map((function(e){var t=Object.assign({},(lg(e.data),e.data)),n=e.title,r=e.key,i=e.isStart,s=e.isEnd;delete t.children;var a=Bn(r,p);return o.createElement(Un,(0,m.A)({},t,a,{title:n,active:h,data:e.data,key:r,isStart:i,isEnd:s}))})))})):o.createElement(Un,(0,m.A)({domRef:t,className:n,style:r},f,{active:h}))}));const dg=ug;function hg(e,t,n){var o=e.findIndex((function(e){return e.key===n})),r=e[o+1],i=t.findIndex((function(e){return e.key===n}));if(r){var s=t.findIndex((function(e){return e.key===r.key}));return t.slice(i+1,s)}return t.slice(i+1)}var pg=["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"],fg={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},mg=function(){},gg="RC_TREE_MOTION_".concat(Math.random()),bg={key:gg},vg={key:gg,level:0,index:0,pos:"0",node:bg,nodes:[bg]},yg={parent:null,children:[],pos:vg.pos,data:bg,title:null,key:gg,isStart:[],isEnd:[]};function wg(e,t,n,o){return!1!==t&&n?e.slice(0,Math.ceil(n/o)+1):e}function Cg(e){return Ln(e.key,e.pos)}var xg=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.data,i=(e.selectable,e.checkable,e.expandedKeys),s=e.selectedKeys,l=e.checkedKeys,u=e.loadedKeys,d=e.loadingKeys,h=e.halfCheckedKeys,p=e.keyEntities,f=e.disabled,g=e.dragging,b=e.dragOverNodeKey,v=e.dropPosition,y=e.motion,w=e.height,C=e.itemHeight,x=e.virtual,S=e.scrollWidth,A=e.focusable,E=e.activeItem,k=e.focused,R=e.tabIndex,M=e.onKeyDown,I=e.onFocus,P=e.onBlur,T=e.onActiveChange,O=e.onListChangeStart,$=e.onListChangeEnd,D=(0,j.A)(e,pg),N=o.useRef(null),L=o.useRef(null);o.useImperativeHandle(t,(function(){return{scrollTo:function(e){N.current.scrollTo(e)},getIndentWidth:function(){return L.current.offsetWidth}}}));var H=o.useState(i),z=(0,a.A)(H,2),F=z[0],B=z[1],_=o.useState(r),V=(0,a.A)(_,2),W=V[0],G=V[1],K=o.useState(r),U=(0,a.A)(K,2),q=U[0],X=U[1],Y=o.useState([]),Q=(0,a.A)(Y,2),J=Q[0],Z=Q[1],ee=o.useState(null),te=(0,a.A)(ee,2),ne=te[0],oe=te[1],re=o.useRef(r);function ie(){var e=re.current;G(e),X(e),Z([]),oe(null),$()}re.current=r,(0,c.A)((function(){B(i);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 r(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:r(e,t)}:{add:!1,key:r(t,e)}}(F,i);if(null!==e.key)if(e.add){var t=W.findIndex((function(t){return t.key===e.key})),n=wg(hg(W,r,e.key),x,w,C),o=W.slice();o.splice(t+1,0,yg),X(o),Z(n),oe("show")}else{var s=r.findIndex((function(t){return t.key===e.key})),a=wg(hg(r,W,e.key),x,w,C),l=r.slice();l.splice(s+1,0,yg),X(l),Z(a),oe("hide")}else W!==r&&(G(r),X(r))}),[i,r]),o.useEffect((function(){g||ie()}),[g]);var se=y?q:r,ae={expandedKeys:i,selectedKeys:s,loadedKeys:u,loadingKeys:d,checkedKeys:l,halfCheckedKeys:h,dragOverNodeKey:b,dropPosition:v,keyEntities:p};return o.createElement(o.Fragment,null,k&&E&&o.createElement("span",{style:fg,"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}(E)),o.createElement("div",null,o.createElement("input",{style:fg,disabled:!1===A||f,tabIndex:!1!==A?R:null,onKeyDown:M,onFocus:I,onBlur:P,value:"",onChange:mg,"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,m.A)({},D,{data:se,itemKey:Cg,height:w,fullHeight:!1,virtual:x,itemHeight:C,scrollWidth:S,prefixCls:"".concat(n,"-list"),ref:N,role:"tree",onVisibleChange:function(e){e.every((function(e){return Cg(e)!==gg}))&&ie()}}),(function(e){var t=e.pos,n=Object.assign({},(lg(e.data),e.data)),r=e.title,i=e.key,s=e.isStart,a=e.isEnd,l=Ln(i,t);delete n.key,delete n.children;var c=Bn(l,ae);return o.createElement(dg,(0,m.A)({},n,c,{title:r,active:!!E&&i===E.key,pos:t,data:e.data,isStart:s,isEnd:a,motion:y,motionNodes:i===gg?J:null,motionType:ne,onMotionStart:O,onMotionEnd:ie,treeNodeRequiredProps:ae,onMouseMove:function(){T(null)}}))})))}));const Sg=xg;var Ag=function(e){(0,Ce.A)(n,e);var t=(0,xe.A)(n);function n(){var e;(0,ye.A)(this,n);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,k.A)((0,go.A)(e),"destroyed",!1),(0,k.A)((0,go.A)(e),"delayedDragEnterLogic",void 0),(0,k.A)((0,go.A)(e),"loadingRetryTimes",{}),(0,k.A)((0,go.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:Hn()}),(0,k.A)((0,go.A)(e),"dragStartMousePosition",null),(0,k.A)((0,go.A)(e),"dragNodeProps",null),(0,k.A)((0,go.A)(e),"currentMouseOverDroppableNodeKey",null),(0,k.A)((0,go.A)(e),"listRef",o.createRef()),(0,k.A)((0,go.A)(e),"onNodeDragStart",(function(t,n){var o=e.state,r=o.expandedKeys,i=o.keyEntities,s=e.props.onDragStart,a=n.eventKey;e.dragNodeProps=n,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var l=qn(r,a);e.setState({draggingNodeKey:a,dragChildrenKeys:Qn(a,i),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(l),window.addEventListener("dragend",e.onWindowDragEnd),null==s||s({event:t,node:_n(n)})})),(0,k.A)((0,go.A)(e),"onNodeDragEnter",(function(t,n){var o=e.state,r=o.expandedKeys,i=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,f=n.pos,m=n.eventKey;if(e.currentMouseOverDroppableNodeKey!==m&&(e.currentMouseOverDroppableNodeKey=m),e.dragNodeProps){var g=Zn(t,e.dragNodeProps,n,l,e.dragStartMousePosition,h,a,i,r,p),b=g.dropPosition,v=g.dropLevelOffset,y=g.dropTargetKey,w=g.dropContainerKey,C=g.dropTargetPos,x=g.dropAllowed,S=g.dragOverNodeKey;!s.includes(y)&&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[f]=window.setTimeout((function(){if(null!==e.state.draggingNodeKey){var o=(0,tt.A)(r),s=On(i,n.eventKey);s&&(s.children||[]).length&&(o=Xn(r,n.eventKey)),e.props.hasOwnProperty("expandedKeys")||e.setExpandedKeys(o),null==d||d(o,{node:_n(n),expanded:!0,nativeEvent:t.nativeEvent})}}),800)),e.dragNodeProps.eventKey!==y||0!==v?(e.setState({dragOverNodeKey:S,dropPosition:b,dropLevelOffset:v,dropTargetKey:y,dropContainerKey:w,dropTargetPos:C,dropAllowed:x}),null==u||u({event:t,node:_n(n),expandedKeys:r})):e.resetDragState()):e.resetDragState()}else e.resetDragState()})),(0,k.A)((0,go.A)(e),"onNodeDragOver",(function(t,n){var o=e.state,r=o.dragChildrenKeys,i=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,i,s,a,h),f=p.dropPosition,m=p.dropLevelOffset,g=p.dropTargetKey,b=p.dropContainerKey,v=p.dropTargetPos,y=p.dropAllowed,w=p.dragOverNodeKey;!r.includes(g)&&y&&(e.dragNodeProps.eventKey===g&&0===m?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():f===e.state.dropPosition&&m===e.state.dropLevelOffset&&g===e.state.dropTargetKey&&b===e.state.dropContainerKey&&v===e.state.dropTargetPos&&y===e.state.dropAllowed&&w===e.state.dragOverNodeKey||e.setState({dropPosition:f,dropLevelOffset:m,dropTargetKey:g,dropContainerKey:b,dropTargetPos:v,dropAllowed:y,dragOverNodeKey:w}),null==u||u({event:t,node:_n(n)}))}})),(0,k.A)((0,go.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:_n(n)})})),(0,k.A)((0,go.A)(e),"onWindowDragEnd",(function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)})),(0,k.A)((0,go.A)(e),"onNodeDragEnd",(function(t,n){var o=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==o||o({event:t,node:_n(n)}),e.dragNodeProps=null,window.removeEventListener("dragend",e.onWindowDragEnd)})),(0,k.A)((0,go.A)(e),"onNodeDrop",(function(t,n){var o,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.state,s=i.dragChildrenKeys,a=i.dropPosition,l=i.dropTargetKey,c=i.dropTargetPos;if(i.dropAllowed){var u=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==l){var d=(0,E.A)((0,E.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,T.Ay)(!h,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=Yn(c),f={event:t,node:_n(d),dragNode:e.dragNodeProps?_n(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(s),dropToGap:0!==a,dropPosition:a+Number(p[p.length-1])};r||null==u||u(f),e.dragNodeProps=null}}})),(0,k.A)((0,go.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,go.A)(e),"triggerExpandActionExpand",(function(t,n){var o=e.state,r=o.expandedKeys,i=o.flattenNodes,s=n.expanded,a=n.key;if(!(n.isLeaf||t.shiftKey||t.metaKey||t.ctrlKey)){var l=i.filter((function(e){return e.key===a}))[0],c=_n((0,E.A)((0,E.A)({},Bn(a,e.getTreeNodeRequiredProps())),{},{data:l.data}));e.setExpandedKeys(s?qn(r,a):Xn(r,a)),e.onNodeExpand(t,c)}})),(0,k.A)((0,go.A)(e),"onNodeClick",(function(t,n){var o=e.props,r=o.onClick;"click"===o.expandAction&&e.triggerExpandActionExpand(t,n),null==r||r(t,n)})),(0,k.A)((0,go.A)(e),"onNodeDoubleClick",(function(t,n){var o=e.props,r=o.onDoubleClick;"doubleClick"===o.expandAction&&e.triggerExpandActionExpand(t,n),null==r||r(t,n)})),(0,k.A)((0,go.A)(e),"onNodeSelect",(function(t,n){var o=e.state.selectedKeys,r=e.state,i=r.keyEntities,s=r.fieldNames,a=e.props,l=a.onSelect,c=a.multiple,u=n.selected,d=n[s.key],h=!u,p=(o=h?c?Xn(o,d):[d]:qn(o,d)).map((function(e){var t=On(i,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,go.A)(e),"onNodeCheck",(function(t,n,o){var r,i=e.state,s=i.keyEntities,a=i.checkedKeys,l=i.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 f=o?Xn(a,h):qn(a,h);r={checked:f,halfChecked:qn(l,h)},p.checkedNodes=f.map((function(e){return On(s,e)})).filter(Boolean).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:f})}else{var m=io([].concat((0,tt.A)(a),[h]),!0,s),g=m.checkedKeys,b=m.halfCheckedKeys;if(!o){var v=new Set(g);v.delete(h);var y=io(Array.from(v),{checked:!1,halfCheckedKeys:b},s);g=y.checkedKeys,b=y.halfCheckedKeys}r=g,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=b,g.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:g},!1,{halfCheckedKeys:b})}null==d||d(r,p)})),(0,k.A)((0,go.A)(e),"onNodeLoad",(function(t){var n,o=t.key,r=On(e.state.keyEntities,o);if(null==r||null===(n=r.children)||void 0===n||!n.length){var i=new Promise((function(n,r){e.setState((function(i){var s=i.loadedKeys,a=void 0===s?[]:s,l=i.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 r=Xn(e.state.loadedKeys,o);null==h||h(r,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:r}),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 i=e.state.loadedKeys;(0,T.Ay)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:Xn(i,o)}),n()}r(t)})),{loadingKeys:Xn(c,o)})}))}));return i.catch((function(){})),i}})),(0,k.A)((0,go.A)(e),"onNodeMouseEnter",(function(t,n){var o=e.props.onMouseEnter;null==o||o({event:t,node:n})})),(0,k.A)((0,go.A)(e),"onNodeMouseLeave",(function(t,n){var o=e.props.onMouseLeave;null==o||o({event:t,node:n})})),(0,k.A)((0,go.A)(e),"onNodeContextMenu",(function(t,n){var o=e.props.onRightClick;o&&(t.preventDefault(),o({event:t,node:n}))})),(0,k.A)((0,go.A)(e),"onFocus",(function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];null==t||t.apply(void 0,o)})),(0,k.A)((0,go.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),r=0;r<n;r++)o[r]=arguments[r];null==t||t.apply(void 0,o)})),(0,k.A)((0,go.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,go.A)(e),"setExpandedKeys",(function(t){var n=e.state,o=Fn(n.treeData,t,n.fieldNames);e.setUncontrolledState({expandedKeys:t,flattenNodes:o},!0)})),(0,k.A)((0,go.A)(e),"onNodeExpand",(function(t,n){var o=e.state.expandedKeys,r=e.state,i=r.listChanging,s=r.fieldNames,a=e.props,l=a.onExpand,c=a.loadData,u=n.expanded,d=n[s.key];if(!i){var h=o.includes(d),p=!u;if((0,T.Ay)(u&&h||!u&&!h,"Expand state not sync with index check"),o=p?Xn(o,d):qn(o,d),e.setExpandedKeys(o),null==l||l(o,{node:n,expanded:p,nativeEvent:t.nativeEvent}),p&&c){var f=e.onNodeLoad(n);f&&f.then((function(){var t=Fn(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,go.A)(e),"onListChangeStart",(function(){e.setUncontrolledState({listChanging:!0})})),(0,k.A)((0,go.A)(e),"onListChangeEnd",(function(){setTimeout((function(){e.setUncontrolledState({listChanging:!1})}))})),(0,k.A)((0,go.A)(e),"onActiveChange",(function(t){var n=e.state.activeKey,o=e.props,r=o.onActiveChange,i=o.itemScrollOffset,s=void 0===i?0:i;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t,offset:s}),null==r||r(t))})),(0,k.A)((0,go.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,go.A)(e),"offsetActiveKey",(function(t){var n=e.state,o=n.flattenNodes,r=n.activeKey,i=o.findIndex((function(e){return e.key===r}));-1===i&&t<0&&(i=o.length);var s=o[i=(i+t+o.length)%o.length];if(s){var a=s.key;e.onActiveChange(a)}else e.onActiveChange(null)})),(0,k.A)((0,go.A)(e),"onKeyDown",(function(t){var n=e.state,o=n.activeKey,r=n.expandedKeys,i=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,f=_n((0,E.A)((0,E.A)({},Bn(o,h)),{},{data:d.data,active:!0}));switch(t.which){case Ls.LEFT:p&&r.includes(o)?e.onNodeExpand({},f):d.parent&&e.onActiveChange(d.parent.key),t.preventDefault();break;case Ls.RIGHT:p&&!r.includes(o)?e.onNodeExpand({},f):d.children&&d.children.length&&e.onActiveChange(d.children[0].key),t.preventDefault();break;case Ls.ENTER:case Ls.SPACE:!c||f.disabled||!1===f.checkable||f.disableCheckbox?c||!u||f.disabled||!1===f.selectable||e.onNodeSelect({},f):e.onNodeCheck({},f,!i.includes(o))}}null==l||l(t)})),(0,k.A)((0,go.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 r=!1,i=!0,s={};Object.keys(t).forEach((function(n){e.props.hasOwnProperty(n)?i=!1:(r=!0,s[n]=t[n])})),!r||n&&!i||e.setState((0,E.A)((0,E.A)({},s),o))}})),(0,k.A)((0,go.A)(e),"scrollTo",(function(t){e.listRef.current.scrollTo(t)})),e}return(0,we.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,r=t.flattenNodes,i=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,f=this.props,g=f.prefixCls,b=f.className,v=f.style,y=f.showLine,w=f.focusable,C=f.tabIndex,x=void 0===C?0:C,S=f.selectable,E=f.showIcon,R=f.icon,I=f.switcherIcon,P=f.draggable,T=f.checkable,O=f.checkStrictly,$=f.disabled,D=f.motion,N=f.loadData,L=f.filterTreeNode,H=f.height,z=f.itemHeight,F=f.scrollWidth,j=f.virtual,B=f.titleRender,_=f.dropIndicatorRender,V=f.onContextMenu,W=f.onScroll,G=f.direction,K=f.rootClassName,U=f.rootStyle,q=ze(this.props,{aria:!0,data:!0});P&&(e="object"===(0,A.A)(P)?P:"function"==typeof P?{nodeDraggable:P}:{});var X={prefixCls:g,selectable:S,showIcon:E,icon:R,switcherIcon:I,draggable:e,draggingNodeKey:s,checkable:T,checkStrictly:O,disabled:$,keyEntities:i,dropLevelOffset:l,dropContainerKey:c,dropTargetKey:u,dropPosition:d,dragOverNodeKey:h,indent:p,direction:G,dropIndicatorRender:_,loadData:N,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:X},o.createElement("div",{className:M()(g,b,K,(0,k.A)((0,k.A)((0,k.A)({},"".concat(g,"-show-line"),y),"".concat(g,"-focused"),n),"".concat(g,"-active-focused"),null!==a)),style:U},o.createElement(Sg,(0,m.A)({ref:this.listRef,prefixCls:g,style:v,data:r,disabled:$,selectable:S,checkable:!!T,motion:D,dragging:null!==s,height:H,itemHeight:z,virtual:j,focusable:w,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:V,onScroll:W,scrollWidth:F},this.getTreeNodeRequiredProps(),q))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,o=t.prevProps,r={prevProps:e};function i(t){return!o&&e.hasOwnProperty(t)||o&&o[t]!==e[t]}var s=t.fieldNames;if(i("fieldNames")&&(s=Hn(e.fieldNames),r.fieldNames=s),i("treeData")?n=e.treeData:i("children")&&((0,T.Ay)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=zn(e.children)),n){r.treeData=n;var a=jn(n,{fieldNames:s});r.keyEntities=(0,E.A)((0,k.A)({},gg,vg),a.keyEntities)}var l,c=r.keyEntities||t.keyEntities;if(i("expandedKeys")||o&&i("autoExpandParent"))r.expandedKeys=e.autoExpandParent||!o&&e.defaultExpandParent?no(e.expandedKeys,c):e.expandedKeys;else if(!o&&e.defaultExpandAll){var u=(0,E.A)({},c);delete u[gg];var d=[];Object.keys(u).forEach((function(e){var t=u[e];t.children&&t.children.length&&d.push(t.key)})),r.expandedKeys=d}else!o&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?no(e.defaultExpandedKeys,c):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,n||r.expandedKeys){var h=Fn(n||t.treeData,r.expandedKeys||t.expandedKeys,s);r.flattenNodes=h}if(e.selectable&&(i("selectedKeys")?r.selectedKeys=eo(e.selectedKeys,e):!o&&e.defaultSelectedKeys&&(r.selectedKeys=eo(e.defaultSelectedKeys,e))),e.checkable&&(i("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,f=p.checkedKeys,m=void 0===f?[]:f,g=p.halfCheckedKeys,b=void 0===g?[]:g;if(!e.checkStrictly){var v=io(m,!0,c);m=v.checkedKeys,b=v.halfCheckedKeys}r.checkedKeys=m,r.halfCheckedKeys=b}return i("loadedKeys")&&(r.loadedKeys=e.loadedKeys),r}}]),n}(o.Component);(0,k.A)(Ag,"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,r=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r}return o.createElement("div",{style:i})},allowDrop:function(){return!0},expandAction:!1}),(0,k.A)(Ag,"TreeNode",Un);const Eg=Ag,kg={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 Rg=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:kg}))};const Mg=o.forwardRef(Rg),Ig={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 Pg=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Ig}))};const Tg=o.forwardRef(Pg),Og={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 $g=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Og}))};const Dg=o.forwardRef($g),Ng={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 Lg=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Ng}))};const Hg=o.forwardRef(Lg),zg=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:o,motionDurationMid:r,borderRadius:i,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 ${r}`,content:'""',borderRadius:i},"&: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}}}}}),Fg=new mo.Mo("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),jg=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),Bg=(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,mo.zA)(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),_g=(e,t)=>{const{treeCls:n,treeNodeCls:o,treeNodePadding:r,titleHeight:i,indentSize:s,nodeSelectedBg:a,nodeHoverBg:l,colorTextQuaternary:c,controlItemBgActiveDisabled:u}=t;return{[n]:Object.assign(Object.assign({},(0,$o.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,$o.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:Fg,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[o]:{display:"flex",alignItems:"flex-start",marginBottom:r,lineHeight:(0,mo.zA)(i),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:r},[`&-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:i,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(i).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:Object.assign(Object.assign({},jg(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:i,height:i,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(i).div(2).equal(),bottom:t.calc(r).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(i).div(2).equal()).mul(.8).equal(),height:t.calc(i).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:i,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},Bg(e,t)),{"&:hover":{backgroundColor:l},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:a},[`${n}-iconEle`]:{display:"inline-block",width:i,height:i,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(i).div(2).equal(),bottom:t.calc(r).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,mo.zA)(t.calc(i).div(2).equal())} !important`}})}},Vg=(e,t,n=!0)=>{const o=`.${e}`,r=`${o}-treenode`,i=t.calc(t.paddingXS).div(2).equal(),s=Ro(t,{treeCls:o,treeNodeCls:r,treeNodePadding:i});return[_g(e,s),n&&zg(s)].filter(Boolean)},Wg=No("Tree",((e,{prefixCls:t})=>[{[e.componentCls]:ji(`${t}-checkbox`,e)},Vg(t,e),Yc(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})})),Gg=function(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:i,direction:s="ltr"}=e,a="ltr"===s?"left":"right",l="ltr"===s?"right":"left",c={[a]:-n*i+4,[l]:0};switch(t){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[a]=i+4}return o.createElement("div",{style:c,className:`${r}-drop-indicator`})},Kg={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 Ug=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Kg}))};const qg=o.forwardRef(Ug),Xg={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 Yg=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Xg}))};const Qg=o.forwardRef(Yg),Jg={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 Zg=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Jg}))};const eb=o.forwardRef(Zg),tb=e=>{const{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:i,switcherLoadingIcon:s}=e,{isLeaf:a,expanded:l,loading:c}=r;if(c)return o.isValidElement(s)?s:o.createElement(Ku,{className:`${t}-switcher-loading-icon`});let u;if(i&&"object"==typeof i&&(u=i.showLeafIcon),a){if(!i)return null;if("boolean"!=typeof u&&u){const e="function"==typeof u?u(r):u,n=`${t}-switcher-line-custom-icon`;return o.isValidElement(e)?fo(e,{className:M()(e.props.className||"",n)}):e}return u?o.createElement(Mg,{className:`${t}-switcher-line-icon`}):o.createElement("span",{className:`${t}-switcher-leaf-line`})}const d=`${t}-switcher-icon`,h="function"==typeof n?n(r):n;return o.isValidElement(h)?fo(h,{className:M()(h.props.className||"",d)}):void 0!==h?h:i?l?o.createElement(Qg,{className:`${t}-switcher-line-icon`}):o.createElement(eb,{className:`${t}-switcher-line-icon`}):o.createElement(qg,{className:d})},nb=o.forwardRef(((e,t)=>{var n;const{getPrefixCls:r,direction:i,virtual:s,tree:a}=o.useContext(ho.QO),{prefixCls:l,className:c,showIcon:u=!1,showLine:d,switcherIcon:h,switcherLoadingIcon:p,blockNode:f=!1,children:m,checkable:g=!1,selectable:b=!0,draggable:v,motion:y,style:w}=e,C=r("tree",l),x=r(),S=null!=y?y:Object.assign(Object.assign({},tc(x)),{motionAppear:!1}),A=Object.assign(Object.assign({},e),{checkable:g,selectable:b,showIcon:u,motion:S,blockNode:f,showLine:Boolean(d),dropIndicatorRender:Gg}),[E,k,R]=Wg(C),[,I]=(0,Do.Ay)(),P=I.paddingXS/2+((null===(n=I.Tree)||void 0===n?void 0:n.titleHeight)||I.controlHeightSM),T=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(Hg,null)),e}),[v]);return E(o.createElement(Eg,Object.assign({itemHeight:P,ref:t,virtual:s},A,{style:Object.assign(Object.assign({},null==a?void 0:a.style),w),prefixCls:C,className:M()({[`${C}-icon-hide`]:!u,[`${C}-block-node`]:f,[`${C}-unselectable`]:!b,[`${C}-rtl`]:"rtl"===i},null==a?void 0:a.className,c,k,R),direction:i,checkable:g?o.createElement("span",{className:`${C}-checkbox-inner`}):g,selectable:b,switcherIcon:e=>o.createElement(tb,{prefixCls:C,switcherIcon:h,switcherLoadingIcon:p,treeNodeProps:e,showLine:d}),draggable:T}),m))})),ob=nb;function rb(e,t,n){const{key:o,children:r}=n;e.forEach((function(e){const i=e[o],s=e[r];!1!==t(i,e)&&rb(s||[],t,n)}))}function ib(e,t,n){const o=(0,tt.A)(t),r=[];return rb(e,((e,t)=>{const n=o.indexOf(e);return-1!==n&&(r.push(t),o.splice(n,1)),!!o.length}),Hn(n)),r}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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};function ab(e){const{isLeaf:t,expanded:n}=e;return t?o.createElement(Mg,null):n?o.createElement(Tg,null):o.createElement(Dg,null)}function lb({treeData:e,children:t}){return e||zn(t)}const cb=(e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:i}=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}=jn(lb(s));let t;return t=n?Object.keys(e):r?no(s.expandedKeys||i||[],e):s.expandedKeys||i||[],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:f}=o.useContext(ho.QO),{prefixCls:m,className:g,showIcon:b=!0,expandAction:v="click"}=s,y=sb(s,["prefixCls","className","showIcon","expandAction"]),w=p("tree",m),C=M()(`${w}-directory`,{[`${w}-directory-rtl`]:"rtl"===f},g);return o.createElement(ob,Object.assign({icon:ab,ref:t,blockNode:!0},y,{showIcon:b,expandAction:v,prefixCls:w,className:C,expandedKeys:d,selectedKeys:c,onSelect:(e,t)=>{var n;const{multiple:o,fieldNames:r}=s,{node:i,nativeEvent:c}=t,{key:h=""}=i,p=lb(s),f=Object.assign(Object.assign({},t),{selected:!0}),m=(null==c?void 0:c.ctrlKey)||(null==c?void 0:c.metaKey),g=null==c?void 0:c.shiftKey;let b;o&&m?(b=e,a.current=h,l.current=b,f.selectedNodes=ib(p,b,r)):o&&g?(b=Array.from(new Set([].concat((0,tt.A)(l.current||[]),(0,tt.A)(function({treeData:e,expandedKeys:t,startKey:n,endKey:o,fieldNames:r}){const i=[];let s=0;return n&&n===o?[n]:n&&o?(rb(e,(e=>{if(2===s)return!1;if(function(e){return e===n||e===o}(e)){if(i.push(e),0===s)s=1;else if(1===s)return s=2,!1}else 1===s&&i.push(e);return t.includes(e)}),Hn(r)),i):[]}({treeData:p,expandedKeys:d,startKey:h,endKey:a.current,fieldNames:r}))))),f.selectedNodes=ib(p,b,r)):(b=[h],a.current=h,l.current=b,f.selectedNodes=ib(p,b,r)),null===(n=s.onSelect)||void 0===n||n.call(s,b,f),"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),r=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)},r}function fb(e,t,n,o){if(n){var r=t;"click"!==t.type?"file"===e.type||void 0===o?n(r):n(r=pb(t,e,o)):n(r=pb(t,e,""))}}var mb=o.forwardRef((function(e,t){var n,r,i,s=e.inputElement,a=e.children,l=e.prefixCls,c=e.prefix,u=e.suffix,d=e.addonBefore,h=e.addonAfter,p=e.className,f=e.style,g=e.disabled,b=e.readOnly,v=e.focused,y=e.triggerFocus,w=e.allowClear,C=e.value,x=e.handleReset,S=e.hidden,R=e.classes,I=e.classNames,P=e.dataAttrs,T=e.styles,O=e.components,$=e.onClear,D=null!=a?a:s,N=(null==O?void 0:O.affixWrapper)||"span",L=(null==O?void 0:O.groupWrapper)||"span",H=(null==O?void 0:O.wrapper)||"span",z=(null==O?void 0:O.groupAddon)||"span",F=(0,o.useRef)(null),j=function(e){return!!(e.prefix||e.suffix||e.allowClear)}(e),B=(0,o.cloneElement)(D,{value:C,className:M()(null===(n=D.props)||void 0===n?void 0:n.className,!j&&(null==I?void 0:I.variant))||null}),_=(0,o.useRef)(null);if(o.useImperativeHandle(t,(function(){return{nativeElement:_.current||F.current}})),j){var V=null;if(w){var W=!g&&!b&&C,G="".concat(l,"-clear-icon"),K="object"===(0,A.A)(w)&&null!=w&&w.clearIcon?w.clearIcon:"✖";V=o.createElement("button",{type:"button",tabIndex:-1,onClick:function(e){null==x||x(e),null==$||$()},onMouseDown:function(e){return e.preventDefault()},className:M()(G,(0,k.A)((0,k.A)({},"".concat(G,"-hidden"),!W),"".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"),g),"".concat(U,"-disabled"),g),"".concat(U,"-focused"),v),"".concat(U,"-readonly"),b),"".concat(U,"-input-with-clear-btn"),u&&w&&C),null==R?void 0:R.affixWrapper,null==I?void 0:I.affixWrapper,null==I?void 0:I.variant),X=(u||w)&&o.createElement("span",{className:M()("".concat(l,"-suffix"),null==I?void 0:I.suffix),style:null==T?void 0:T.suffix},V,u);B=o.createElement(N,(0,m.A)({className:q,style:null==T?void 0:T.affixWrapper,onClick:function(e){var t;null!==(t=F.current)&&void 0!==t&&t.contains(e.target)&&(null==y||y())}},null==P?void 0:P.affixWrapper,{ref:F}),c&&o.createElement("span",{className:M()("".concat(l,"-prefix"),null==I?void 0:I.prefix),style:null==T?void 0:T.prefix},c),B,X)}if(function(e){return!(!e.addonBefore&&!e.addonAfter)}(e)){var Y="".concat(l,"-group"),Q="".concat(Y,"-addon"),J="".concat(Y,"-wrapper"),Z=M()("".concat(l,"-wrapper"),Y,null==R?void 0:R.wrapper,null==I?void 0:I.wrapper),ee=M()(J,(0,k.A)({},"".concat(J,"-disabled"),g),null==R?void 0:R.group,null==I?void 0:I.groupWrapper);B=o.createElement(L,{className:ee,ref:_},o.createElement(H,{className:Z},d&&o.createElement(z,{className:Q},d),B,h&&o.createElement(z,{className:Q},h)))}return o.cloneElement(B,{className:M()(null===(r=B.props)||void 0===r?void 0:r.className,p)||null,style:(0,E.A)((0,E.A)({},null===(i=B.props)||void 0===i?void 0:i.style),f),hidden:S})}));const gb=mb;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"],yb=(0,o.forwardRef)((function(e,t){var n=e.autoComplete,r=e.onChange,i=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,f=e.htmlSize,g=e.className,b=e.maxLength,v=e.suffix,y=e.showCount,w=e.count,C=e.type,x=void 0===C?"text":C,S=e.classes,R=e.classNames,I=e.styles,P=e.onCompositionStart,T=e.onCompositionEnd,O=(0,j.A)(e,vb),$=(0,o.useState)(!1),D=(0,a.A)($,2),N=D[0],L=D[1],H=(0,o.useRef)(!1),z=(0,o.useRef)(!1),F=(0,o.useRef)(null),B=(0,o.useRef)(null),_=function(e){F.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)}}}}(F.current,e)},V=(0,so.A)(e.defaultValue,{value:e.value}),W=(0,a.A)(V,2),G=W[0],K=W[1],U=null==G?"":String(G),q=(0,o.useState)(null),X=(0,a.A)(q,2),Y=X[0],Q=X[1],J=function(e,t){return o.useMemo((function(){var n={};t&&(n.show="object"===(0,A.A)(t)&&t.formatter?t.formatter:!!t);var o=n=(0,E.A)((0,E.A)({},n),e),r=o.show,i=(0,j.A)(o,bb);return(0,E.A)((0,E.A)({},i),{},{show:!!r,showFormatter:"function"==typeof r?r:void 0,strategy:i.strategy||function(e){return e.length}})}),[e,t])}(w,y),Z=J.max||b,ee=J.strategy(U),te=!!Z&&ee>Z;(0,o.useImperativeHandle)(t,(function(){var e;return{focus:_,blur:function(){var e;null===(e=F.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,n){var o;null===(o=F.current)||void 0===o||o.setSelectionRange(e,t,n)},select:function(){var e;null===(e=F.current)||void 0===e||e.select()},input:F.current,nativeElement:(null===(e=B.current)||void 0===e?void 0:e.nativeElement)||F.current}})),(0,o.useEffect)((function(){z.current&&(z.current=!1),L((function(e){return(!e||!p)&&e}))}),[p]);var ne=function(e,t,n){var o,i,s=t;if(!H.current&&J.exceedFormatter&&J.max&&J.strategy(t)>J.max)t!==(s=J.exceedFormatter(t,{max:J.max}))&&Q([(null===(o=F.current)||void 0===o?void 0:o.selectionStart)||0,(null===(i=F.current)||void 0===i?void 0:i.selectionEnd)||0]);else if("compositionEnd"===n.source)return;K(s),F.current&&fb(F.current,e,r,s)};(0,o.useEffect)((function(){var e;Y&&(null===(e=F.current)||void 0===e||e.setSelectionRange.apply(e,(0,tt.A)(Y)))}),[Y]);var oe,re=te&&"".concat(h,"-out-of-range");return o.createElement(gb,(0,m.A)({},O,{prefixCls:h,className:M()(g,re),handleReset:function(e){K(""),_(),F.current&&fb(F.current,e,r)},value:U,focused:N,triggerFocus:_,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,E.A)({},null==I?void 0:I.count)},t),v)}return null}(),disabled:p,classes:S,classNames:R,styles:I,ref:B}),(oe=$n(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]),o.createElement("input",(0,m.A)({autoComplete:n},oe,{onChange:function(e){ne(e,e.target.value,{source:"change"})},onFocus:function(e){L(!0),null==i||i(e)},onBlur:function(e){z.current&&(z.current=!1),L(!1),null==s||s(e)},onKeyDown:function(e){l&&"Enter"===e.key&&!z.current&&(z.current=!0,l(e)),null==c||c(e)},onKeyUp:function(e){"Enter"===e.key&&(z.current=!1),null==u||u(e)},className:M()(h,(0,k.A)({},"".concat(h,"-disabled"),p),null==R?void 0:R.input),style:null==I?void 0:I.input,ref:F,size:f,type:x,onCompositionStart:function(e){H.current=!0,null==P||P(e)},onCompositionEnd:function(e){H.current=!1,ne(e,e.currentTarget.value,{source:"compositionEnd"}),null==T||T(e)}}))))}));const wb=yb;const Cb=(0,o.forwardRef)(((e,t)=>{const{prefixCls:n,bordered:r=!0,status:i,size:s,disabled:a,onBlur:l,onFocus:c,suffix:u,allowClear:d,addonAfter:h,addonBefore:p,className:f,style:m,styles:b,rootClassName:v,onChange:y,classNames:w,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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:S,direction:A,allowClear:E,autoComplete:k,className:R,style:I,classNames:P,styles:T}=(0,ho.TP)("input"),O=S("input",n),$=(0,o.useRef)(null),D=vr(O),[N,L,H]=km(O,v),[z]=Rm(O,D),{compactSize:F,compactItemClassnames:j}=wc(O,A),B=pc((e=>{var t;return null!==(t=null!=s?s:F)&&void 0!==t?t:e})),_=o.useContext(br.A),V=null!=a?a:_,{status:W,hasFeedback:G,feedbackIcon:K}=(0,o.useContext)(Ni),U=lf(W,i),q=function(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}(e)||!!G;(0,o.useRef)(q);const X=function(e){const t=(0,o.useRef)([]),n=()=>{t.current.push(setTimeout((()=>{var t,n,o,r;(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===(r=e.current)||void 0===r||r.input.removeAttribute("value"))})))};return(0,o.useEffect)((()=>(n(),()=>t.current.forEach((e=>{e&&clearTimeout(e)})))),[]),n}($),Y=(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(jf,null)}),t})(null!=d?d:E),[J,Z]=cf("input",C,r);return N(z(o.createElement(wb,Object.assign({ref:(0,g.K4)(t,$),prefixCls:O,autoComplete:k},x,{disabled:V,onBlur:e=>{X(),null==l||l(e)},onFocus:e=>{X(),null==c||c(e)},style:Object.assign(Object.assign({},I),m),styles:Object.assign(Object.assign({},T),b),suffix:Y,allowClear:Q,className:M()(f,v,H,D,j,R),onChange:e=>{X(),null==y||y(e)},addonBefore:p&&o.createElement(Sc,{form:!0,space:!0},p),addonAfter:h&&o.createElement(Sc,{form:!0,space:!0},h),classNames:Object.assign(Object.assign(Object.assign({},w),P),{input:M()({[`${O}-sm`]:"small"===B,[`${O}-lg`]:"large"===B,[`${O}-rtl`]:"rtl"===A},null==w?void 0:w.input,P.input,L),variant:M()({[`${O}-${J}`]:Z},af(O,U)),affixWrapper:M()({[`${O}-affix-wrapper-sm`]:"small"===B,[`${O}-affix-wrapper-lg`]:"large"===B,[`${O}-affix-wrapper-rtl`]:"rtl"===A},L),wrapper:M()({[`${O}-group-rtl`]:"rtl"===A},L),groupWrapper:M()({[`${O}-group-wrapper-sm`]:"small"===B,[`${O}-group-wrapper-lg`]:"large"===B,[`${O}-group-wrapper-rtl`]:"rtl"===A,[`${O}-group-wrapper-${J}`]:Z},af(`${O}-group-wrapper`,U,G),L)})}))))})),xb=Cb,Sb=e=>{const{value:t,filterSearch:n,tablePrefixCls:r,locale:i,onChange:s}=e;return n?o.createElement("div",{className:`${r}-filter-dropdown-search`},o.createElement(xb,{prefix:o.createElement(Kf,null),placeholder:i.filterSearchPlaceholder,onChange:s,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},Ab=e=>{const{keyCode:t}=e;t===Ls.ENTER&&e.stopPropagation()},Eb=o.forwardRef(((e,t)=>o.createElement("div",{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:Ab,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:r,searchValue:i,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:r,searchValue:i,filterSearch:s})};const c=r?qi: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 i.trim()?"function"==typeof s?s(i,e)?u:null:Rb(i,e.text)?u:null:u}))}function Ib(e){return e||[]}const Pb=e=>{var t,n,r,i;const{tablePrefixCls:s,prefixCls:a,column:l,dropdownPrefixCls:c,columnKey:d,filterOnClose:h,filterMultiple:p,filterMode:f="menu",filterSearch:m=!1,filterState:g,triggerFilter:b,locale:v,children:y,getPopupContainer:w,rootClassName:C}=e,{filterResetToDefaultFilteredValue:x,defaultFilteredValue:S,filterDropdownProps:A={},filterDropdownOpen:E,filterDropdownVisible:k,onFilterDropdownVisibleChange:R,onFilterDropdownOpenChange:I}=l,[P,T]=o.useState(!1),O=!(!g||!(null===(t=g.filteredKeys)||void 0===t?void 0:t.length)&&!g.forceFiltered),$=e=>{var t;T(e),null===(t=A.onOpenChange)||void 0===t||t.call(A,e),null==I||I(e),null==R||R(e)},D=null!==(i=null!==(r=null!==(n=A.open)&&void 0!==n?n:E)&&void 0!==r?r:k)&&void 0!==i?i:P,N=null==g?void 0:g.filteredKeys,[L,H]=function(e){const t=o.useRef(e),n=_h();return[()=>t.current,e=>{t.current=e,n()}]}(Ib(N)),z=({selectedKeys:e})=>{H(e)},F=(e,{node:t,checked:n})=>{z(p?{selectedKeys:e}:{selectedKeys:n&&t.key?[t.key]:[]})};o.useEffect((()=>{P&&z({selectedKeys:Ib(N)})}),[N]);const[j,B]=o.useState([]),_=e=>{B(e)},[V,W]=o.useState(""),G=e=>{const{value:t}=e.target;W(t)};o.useEffect((()=>{P||W("")}),[P]);const K=e=>{const t=(null==e?void 0:e.length)?e:null;return null!==t||g&&g.filteredKeys?(0,u.A)(t,null==g?void 0:g.filteredKeys,!0)?null:void b({column:l,key:d,filteredKeys:t}):null},U=()=>{$(!1),K(L())},q=({confirm:e,closeDropdown:t}={confirm:!1,closeDropdown:!1})=>{e&&K([]),t&&$(!1),W(""),H(x?(S||[]).map((e=>String(e))):[])},X=M()({[`${c}-menu-without-submenu`]:(Y=l.filters||[],!Y.some((({children:e})=>e)))});var Y;const Q=e=>{if(e.target.checked){const e=kb(null==l?void 0:l.filters).map((e=>String(e)));H(e)}else H([])},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=>z({selectedKeys:e}),selectedKeys:L(),confirm:({closeDropdown:e}={closeDropdown:!0})=>{e&&$(!1),K(L())},clearFilters:q,filters:l.filters,visible:D,close:()=>{$(!1)}});else if(l.filterDropdown)ee=l.filterDropdown;else{const e=L()||[],t=()=>{var t,n;const r=null!==(t=null==ne?void 0:ne("Table.filter"))&&void 0!==t?t:o.createElement(jh,{image:jh.PRESENTED_IMAGE_SIMPLE,description:v.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if(0===(l.filters||[]).length)return r;if("tree"===f)return o.createElement(o.Fragment,null,o.createElement(Sb,{filterSearch:m,value:V,onChange:G,tablePrefixCls:s,locale:v}),o.createElement("div",{className:`${s}-filter-dropdown-tree`},p?o.createElement(qi,{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:F,checkedKeys:e,selectedKeys:e,showIcon:!1,treeData:J({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:V.trim()?e=>"function"==typeof m?m(V,Z(e)):Rb(V,e.title):void 0})));const i=Mb({filters:l.filters||[],filterSearch:m,prefixCls:a,filteredKeys:L(),filterMultiple:p,searchValue:V}),u=i.every((e=>null===e));return o.createElement(o.Fragment,null,o.createElement(Sb,{filterSearch:m,value:V,onChange:G,tablePrefixCls:s,locale:v}),u?r:o.createElement(Au,{selectable:!0,multiple:p,prefixCls:`${c}-menu`,className:X,onSelect:z,onDeselect:z,selectedKeys:e,getPopupContainer:w,openKeys:j,onOpenChange:_,items:i}))},n=()=>x?(0,u.A)((S||[]).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(Eb,{className:`${a}-dropdown`},ee);const oe=ag({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(sg,null),o.createElement("span",{role:"button",tabIndex:-1,className:M()(`${a}-trigger`,{active:O}),onClick:e=>{e.stopPropagation()}},e)})(),getPopupContainer:w},Object.assign(Object.assign({},A),{rootClassName:M()(C,A.rootClassName),open:D,onOpenChange:(e,t)=>{"trigger"===t.source&&(e&&void 0!==N&&H(Ib(N)),$(e),e||l.filterDropdown||!h||U())},popupRender:()=>"function"==typeof(null==A?void 0:A.dropdownRender)?A.dropdownRender(ee):ee}));return o.createElement("div",{className:`${a}-column`},o.createElement("span",{className:`${s}-column-title`},y),o.createElement(ih,Object.assign({},oe)))},Tb=(e,t,n)=>{let o=[];return(e||[]).forEach(((e,r)=>{var i;const s=ng(r,n),a=void 0!==e.filterDropdown;if(e.filters||a||"onFilter"in e)if("filteredValue"in e){let t=e.filteredValue;a||(t=null!==(i=null==t?void 0:t.map(String))&&void 0!==i?i:t),o.push({column:e,key:tg(e,s),filteredKeys:t,forceFiltered:e.filtered})}else o.push({column:e,key:tg(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)(Tb(e.children,t,s))))})),o};function Ob(e,t,n,r,i,s,a,l,c){return n.map(((n,u)=>{const d=ng(u,l),{filterOnClose:h=!0,filterMultiple:p=!0,filterMode:f,filterSearch:m}=n;let g=n;if(g.filters||g.filterDropdown){const l=tg(g,d),u=r.find((({key:e})=>l===e));g=Object.assign(Object.assign({},g),{title:r=>o.createElement(Pb,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:g,columnKey:l,filterState:u,filterOnClose:h,filterMultiple:p,filterMode:f,filterSearch:m,triggerFilter:s,locale:i,getPopupContainer:a,rootClassName:c},og(n.title,r))})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:Ob(e,t,g.children,r,i,s,a,d,c)})),g}))}const $b=e=>{const t={};return e.forEach((({key:e,filteredKeys:n,column:o})=>{const r=e,{filters:i,filterDropdown:s}=o;if(s)t[r]=n||null;else if(Array.isArray(n)){const e=kb(i);t[r]=e.filter((e=>n.includes(String(e))))}else t[r]=null})),t},Db=(e,t,n)=>t.reduce(((e,o)=>{const{column:{onFilter:r,filters:i},filteredKeys:s}=o;return r&&s&&s.length?e.map((e=>Object.assign({},e))).filter((e=>s.some((o=>{const s=kb(i),a=s.findIndex((e=>String(e)===String(o))),l=-1!==a?s[a]:o;return e[n]&&(e[n]=Db(e[n],t,n)),r(l,e)})))):e}),e),Nb=e=>e.flatMap((e=>"children"in e?[e].concat((0,tt.A)(Nb(e.children||[]))):[e])),Lb=e=>{const{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:i,getPopupContainer:s,locale:a,rootClassName:l}=e,c=((0,ao.rJ)("Table"),o.useMemo((()=>Nb(r||[])),[r])),[u,d]=o.useState((()=>Tb(c,!0))),h=o.useMemo((()=>{const e=Tb(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)=>tg(e,ng(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((()=>$b(h)),[h]),f=e=>{const t=h.filter((({key:t})=>t!==e.key));t.push(e),d(t),i($b(t),t)};return[e=>Ob(t,n,e,h,a,f,s,void 0,l),h,p]};const Hb=10,zb=function(e,t,n){const r=n&&"object"==typeof n?n:{},{total:i=0}=r,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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(r,["total"]),[a,l]=(0,o.useState)((()=>({current:"defaultCurrent"in s?s.defaultCurrent:1,pageSize:"defaultPageSize"in s?s.defaultPageSize:Hb}))),c=ag(a,s,{total:i>0?i:e}),u=Math.ceil((i||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 r;n&&(null===(r=n.onChange)||void 0===r||r.call(n,e,o)),d(e,o),t(e,o||(null==c?void 0:c.pageSize))}}),d]},Fb={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 jb=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:Fb}))};const Bb=o.forwardRef(jb),_b={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 Vb=function(e,t){return o.createElement(En,(0,m.A)({},e,{ref:t,icon:_b}))};const Wb=o.forwardRef(Vb),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,Xb=(e,t,n)=>{let o=[];const r=(e,t)=>{o.push({column:e,key:tg(e,t),multiplePriority:Ub(e),sortOrder:e.sortOrder})};return(e||[]).forEach(((e,i)=>{const s=ng(i,n);e.children?("sortOrder"in e&&r(e,s),o=[].concat((0,tt.A)(o),(0,tt.A)(Xb(e.children,t,s)))):e.sorter&&("sortOrder"in e?r(e,s):t&&e.defaultSortOrder&&o.push({column:e,key:tg(e,s),multiplePriority:Ub(e),sortOrder:e.defaultSortOrder}))})),o},Yb=(e,t,n,r,i,s,a,l)=>{const c=(t||[]).map(((t,c)=>{const u=ng(c,l);let d=t;if(d.sorter){const l=d.sortDirections||i,c=void 0===d.showSorterTooltip?a:d.showSorterTooltip,h=tg(d,u),p=n.find((({key:e})=>e===h)),f=p?p.sortOrder:null,m=((e,t)=>t?e[e.indexOf(t)+1]:e[0])(l,f);let g;if(t.sortIcon)g=t.sortIcon({sortOrder:f});else{const t=l.includes(Gb)&&o.createElement(Wb,{className:M()(`${e}-column-sorter-up`,{active:f===Gb})}),n=l.includes(Kb)&&o.createElement(Bb,{className:M()(`${e}-column-sorter-down`,{active:f===Kb})});g=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:y}=s||{};let w=b;m===Kb?w=y:m===Gb&&(w=v);const C="object"==typeof c?Object.assign({title:w},c):{title:w};d=Object.assign(Object.assign({},d),{className:M()(d.className,{[`${e}-column-sort`]:f}),title:n=>{const r=`${e}-column-sorters`,i=o.createElement("span",{className:`${e}-column-title`},og(t.title,n)),s=o.createElement("div",{className:r},i,g);return c?"boolean"!=typeof c&&"sorter-icon"===(null==c?void 0:c.target)?o.createElement("div",{className:`${r} ${e}-column-sorters-tooltip-target-sorter`},i,o.createElement(Wc,Object.assign({},C),g)):o.createElement(Wc,Object.assign({},C),s):s},onHeaderCell:n=>{var o;const i=(null===(o=t.onHeaderCell)||void 0===o?void 0:o.call(t,n))||{},s=i.onClick,a=i.onKeyDown;i.onClick=e=>{r({column:t,key:h,sortOrder:m,multiplePriority:Ub(t)}),null==s||s(e)},i.onKeyDown=e=>{e.keyCode===Ls.ENTER&&(r({column:t,key:h,sortOrder:m,multiplePriority:Ub(t)}),null==a||a(e))};const l=(e=>{const t=og(e,{});return"[object Object]"===Object.prototype.toString.call(t)?"":t})(t.title),c=null==l?void 0:l.toString();return f&&(i["aria-sort"]="ascend"===f?"ascending":"descending"),i["aria-label"]=c||"",i.className=M()(i.className,`${e}-column-has-sorters`),i.tabIndex=0,t.ellipsis&&(i.title=(null!=l?l:"").toString()),i}})}return"children"in d&&(d=Object.assign(Object.assign({},d),{children:Yb(e,d.children,n,r,i,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)),r=e.slice(),i=o.filter((({column:{sorter:e},sortOrder:t})=>qb(e)&&t));return i.length?r.sort(((e,t)=>{for(let n=0;n<i.length;n+=1){const o=i[n],{column:{sorter:r},sortOrder:s}=o,a=qb(r);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})):r},ev=(e,t)=>e.map((e=>{const n=Object.assign({},e);return n.title=og(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:r,tableHeaderBg:i,tablePaddingVertical:s,tablePaddingHorizontal:a,calc:l}=e,c=`${(0,mo.zA)(n)} ${o} ${r}`,u=(e,o,r)=>({[`&${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,mo.zA)(l(o).mul(-1).equal())}\n ${(0,mo.zA)(l(l(r).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,mo.zA)(l(s).mul(-1).equal())} ${(0,mo.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,mo.zA)(n)} 0 ${(0,mo.zA)(n)} ${i}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:c}}}},rv=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},$o.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"}})}}},iv=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:r,paddingXS:i,lineType:s,tableBorderColor:a,tableExpandIconBg:l,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:h,tableExpandedRowBg:p,paddingXXS:f,expandIconMarginTop:m,expandIconSize:g,expandIconHalfInner:b,expandIconScale:v,calc:y}=e,w=`${(0,mo.zA)(r)} ${s} ${a}`,C=y(f).sub(r).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,$o.Y1)(e)),{position:"relative",float:"left",width:g,height:g,color:"inherit",lineHeight:(0,mo.zA)(g),background:l,border:w,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:r},"&::after":{top:C,bottom:C,insetInlineStart:b,width:r,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:m,marginInlineEnd:i},[`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,mo.zA)(y(d).mul(-1).equal())} ${(0,mo.zA)(y(h).mul(-1).equal())}`,padding:`${(0,mo.zA)(d)} ${(0,mo.zA)(h)}`}}}},av=e=>{const{componentCls:t,antCls:n,iconCls:o,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:i,paddingXXS:s,paddingXS:a,colorText:l,lineWidth:c,lineType:u,tableBorderColor:d,headerIconColor:h,fontSizeSM:p,tablePaddingHorizontal:f,borderRadius:m,motionDurationSlow:g,colorIcon:b,colorPrimary:v,tableHeaderFilterActiveBg:y,colorTextDisabled:w,tableFilterDropdownBg:C,tableFilterDropdownHeight:x,controlItemBgHover:S,controlItemBgActive:A,boxShadowSecondary:E,filterDropdownMenuBg:k,calc:R}=e,M=`${n}-dropdown`,I=`${t}-filter-dropdown`,P=`${n}-tree`,T=`${(0,mo.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,mo.zA)(s)} ${(0,mo.zA)(R(f).div(2).mul(-1).equal())}`,padding:`0 ${(0,mo.zA)(s)}`,color:h,fontSize:p,borderRadius:m,cursor:"pointer",transition:`all ${g}`,"&:hover":{color:b,background:y},"&.active":{color:v}}}},{[`${n}-dropdown`]:{[I]:Object.assign(Object.assign({},(0,$o.dF)(e)),{minWidth:r,backgroundColor:C,borderRadius:m,boxShadow:E,overflow:"hidden",[`${M}-menu`]:{maxHeight:x,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:k,"&:empty::after":{display:"block",padding:`${(0,mo.zA)(a)} 0`,color:w,fontSize:p,textAlign:"center",content:'"Not Found"'}},[`${I}-tree`]:{paddingBlock:`${(0,mo.zA)(a)} 0`,paddingInline:a,[P]:{padding:0},[`${P}-treenode ${P}-node-content-wrapper:hover`]:{backgroundColor:S},[`${P}-treenode-checkbox-checked ${P}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:A}}},[`${I}-search`]:{padding:a,borderBottom:T,"&-input":{input:{minWidth:i},[o]:{color:w}}},[`${I}-checkall`]:{width:"100%",marginBottom:s,marginInlineStart:s},[`${I}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${(0,mo.zA)(R(a).sub(c).equal())} ${(0,mo.zA)(a)}`,overflow:"hidden",borderTop:T}})}},{[`${n}-dropdown ${I}, ${I}-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:r,zIndexTableFixed:i,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:i,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 ${r}`,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 ${r}`,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 ${r}`,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,mo.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,mo.zA)(n)} ${(0,mo.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,mo.zA)(n)} ${(0,mo.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:r,padding:i,paddingXS:s,headerIconColor:a,headerIconHoverColor:l,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:h,tablePaddingHorizontal:p,calc:f}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:c,[`&${t}-selection-col-with-dropdown`]:{width:f(c).add(r).add(f(i).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:f(c).add(f(s).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:f(c).add(r).add(f(i).div(4)).add(f(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:f(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,mo.zA)(f(p).div(4).equal()),[o]:{color:a,fontSize:r,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,r=(e,r,i,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,mo.zA)(r)} ${(0,mo.zA)(i)}`},[`${t}-filter-trigger`]:{marginInlineEnd:(0,mo.zA)(o(i).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${(0,mo.zA)(o(r).mul(-1).equal())} ${(0,mo.zA)(o(i).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:(0,mo.zA)(o(r).mul(-1).equal()),marginInline:`${(0,mo.zA)(o(n).sub(i).equal())} ${(0,mo.zA)(o(i).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:(0,mo.zA)(o(i).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},r("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),r("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},fv=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:o,headerIconColor:r,headerIconHoverColor:i}=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:r,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:i}}}},mv=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollThumbSize:i,tableScrollBg:s,zIndexTableSticky:a,stickyScrollBarBorderRadius:l,lineWidth:c,lineType:u,tableBorderColor:d}=e,h=`${(0,mo.zA)(c)} ${u} ${d}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:a,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${(0,mo.zA)(i)} !important`,zIndex:a,display:"flex",alignItems:"center",background:s,borderTop:h,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:o,borderRadius:l,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},gv=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:o,calc:r}=e,i=`${(0,mo.zA)(n)} ${e.lineType} ${o}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:i}}},[`div${t}-summary`]:{boxShadow:`0 ${(0,mo.zA)(r(n).mul(-1).equal())} 0 ${o}`}}}},bv=e=>{const{componentCls:t,motionDurationMid:n,lineWidth:o,lineType:r,tableBorderColor:i,calc:s}=e,a=`${(0,mo.zA)(o)} ${r} ${i}`,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,mo.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:r,tableExpandColumnWidth:i,lineWidth:s,lineType:a,tableBorderColor:l,tableFontSize:c,tableBg:u,tableRadius:d,tableHeaderTextColor:h,motionDurationMid:p,tableHeaderBg:f,tableHeaderCellSplitColor:m,tableFooterTextColor:g,tableFooterBg:b,calc:v}=e,y=`${(0,mo.zA)(s)} ${a} ${l}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,$o.t6)()),{[t]:Object.assign(Object.assign({},(0,$o.dF)(e)),{fontSize:c,background:u,borderRadius:`${(0,mo.zA)(d)} ${(0,mo.zA)(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${(0,mo.zA)(d)} ${(0,mo.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,mo.zA)(o)} ${(0,mo.zA)(r)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${(0,mo.zA)(o)} ${(0,mo.zA)(r)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:f,borderBottom:y,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:m,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:y,[`\n > ${t}-wrapper:only-child,\n > ${t}-expanded-row-fixed > ${t}-wrapper:only-child\n `]:{[t]:{marginBlock:(0,mo.zA)(v(o).mul(-1).equal()),marginInline:`${(0,mo.zA)(v(i).sub(r).equal())}\n ${(0,mo.zA)(v(r).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:f,borderBottom:y,transition:`background ${p} ease`}}},[`${t}-footer`]:{padding:`${(0,mo.zA)(o)} ${(0,mo.zA)(r)}`,color:g,background:b}})}},yv=No("Table",(e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:o,controlInteractiveSize:r,headerBg:i,headerColor:s,headerSortActiveBg:a,headerSortHoverBg:l,bodySortBg:c,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:h,rowExpandedBg:p,cellPaddingBlock:f,cellPaddingInline:m,cellPaddingBlockMD:g,cellPaddingInlineMD:b,cellPaddingBlockSM:v,cellPaddingInlineSM:y,borderColor:w,footerBg:C,footerColor:x,headerBorderRadius:S,cellFontSize:A,cellFontSizeMD:E,cellFontSizeSM:k,headerSplitColor:R,fixedHeaderSortActiveBg:M,headerFilterHoverBg:I,filterDropdownBg:P,expandIconBg:T,selectionColumnWidth:O,stickyScrollBarBg:$,calc:D}=e,N=Ro(e,{tableFontSize:A,tableBg:o,tableRadius:S,tablePaddingVertical:f,tablePaddingHorizontal:m,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:b,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:y,tableBorderColor:w,tableHeaderTextColor:s,tableHeaderBg:i,tableFooterTextColor:x,tableFooterBg:C,tableHeaderCellSplitColor:R,tableHeaderSortBg:a,tableHeaderSortHoverBg:l,tableBodySortBg:c,tableFixedHeaderSortActiveBg:M,tableHeaderFilterActiveBg:I,tableFilterDropdownBg:P,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:h,zIndexTableFixed:2,zIndexTableSticky:D(2).add(1).equal({unit:!1}),tableFontSizeMiddle:E,tableFontSizeSmall:k,tableSelectionColumnWidth:O,tableExpandIconBg:T,tableExpandColumnWidth:D(r).add(D(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:$,tableScrollThumbBgHover:t,tableScrollBg:n});return[vv(N),cv(N),gv(N),fv(N),av(N),ov(N),uv(N),sv(N),gv(N),iv(N),hv(N),lv(N),mv(N),rv(N),pv(N),dv(N),bv(N)]}),(e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:o,colorFillSecondary:r,colorFillContent:i,controlItemBgActive:s,controlItemBgActiveHover:a,padding:l,paddingSM:c,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:h,controlHeight:p,colorTextPlaceholder:f,fontSize:m,fontSizeSM:g,lineHeight:b,lineWidth:v,colorIcon:y,colorIconHover:w,opacityLoading:C,controlInteractiveSize:x}=e,S=new Xc.Y(r).onBackground(n).toHexString(),A=new Xc.Y(i).onBackground(n).toHexString(),E=new Xc.Y(t).onBackground(n).toHexString(),k=new Xc.Y(y),R=new Xc.Y(w),M=x/2-v,I=2*M+3*v;return{headerBg:E,headerColor:o,headerSortActiveBg:S,headerSortHoverBg:A,bodySortBg:E,rowHoverBg:E,rowSelectedBg:s,rowSelectedHoverBg:a,rowExpandedBg:t,cellPaddingBlock:l,cellPaddingInline:l,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:h,footerBg:E,footerColor:o,cellFontSize:m,cellFontSizeMD:m,cellFontSizeSM:m,headerSplitColor:d,fixedHeaderSortActiveBg:S,headerFilterHoverBg:i,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:f,stickyScrollBarBorderRadius:100,expandIconMarginTop:(m*b-3*v)/2-Math.ceil((1.4*g-3*v)/2),headerIconColor:k.clone().setA(k.a*C).toRgbString(),headerIconHoverColor:R.clone().setA(R.a*C).toRgbString(),expandIconHalfInner:M,expandIconSize:I,expandIconScale:x/I}}),{unitless:{expandIconScale:!0}}),wv=[],Cv=(e,t)=>{var n,r;const{prefixCls:i,className:a,rootClassName:l,style:c,size:u,bordered:d,dropdownPrefixCls:h,dataSource:p,pagination:f,rowSelection:m,rowKey:g="key",rowClassName:b,columns:v,children:y,childrenColumnName:w,onChange:C,getPopupContainer:x,loading:S,expandIcon:A,expandable:E,expandedRowRender:k,expandIconColumnIndex:R,indentSize:I,scroll:P,sortDirections:T,locale:O,showSorterTooltip:$={target:"full-header"},virtual:D}=e;(0,ao.rJ)("Table");const N=o.useMemo((()=>v||ut(y)),[v,y]),L=o.useMemo((()=>N.some((e=>e.responsive))),[N]),H=Gh(L),z=o.useMemo((()=>{const e=new Set(Object.keys(H).filter((e=>H[e])));return N.filter((t=>!t.responsive||t.responsive.some((t=>e.has(t)))))}),[N,H]),F=$n(e,["className","style","columns"]),{locale:j=Th.A,direction:B,table:_,renderEmpty:V,getPrefixCls:W,getPopupContainer:G}=o.useContext(ho.QO),K=pc(u),U=Object.assign(Object.assign({},j.Table),O),q=p||wv,X=W("table",i),Y=W("dropdown",h),[,Q]=(0,Do.Ay)(),J=vr(X),[Z,ee,te]=yv(X,J),ne=Object.assign(Object.assign({childrenColumnName:w,expandIconColumnIndex:R},E),{expandIcon:null!==(n=null==E?void 0:E.expandIcon)&&void 0!==n?n:null===(r=null==_?void 0:_.expandable)||void 0===r?void 0:r.expandIcon}),{childrenColumnName:oe="children"}=ne,re=o.useMemo((()=>q.some((e=>null==e?void 0:e[oe]))?"nest":k||(null==E?void 0:E.expandedRowRender)?"row":null),[q]),ie={body:o.useRef(null)},se=function(e){return(t,n)=>{const o=t.querySelector(`.${e}-container`);let r=n;if(o){const e=getComputedStyle(o);r=n-parseInt(e.borderLeftWidth,10)-parseInt(e.borderRightWidth,10)}return r}}(X),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)}):(r=e,(o=n)._antProxy=o._antProxy||{},Object.keys(r).forEach((e=>{if(!(e in o._antProxy)){const t=o[e];o._antProxy[e]=t,o[e]=r[e]}})),o);var o,r}))}(t,(()=>Object.assign(Object.assign({},le.current),{nativeElement:ae.current})));const ce=o.useMemo((()=>"function"==typeof g?g:e=>null==e?void 0:e[g]),[g]),[ue]=((e,t,n)=>{const r=o.useRef({});return[function(o){var i;if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){const s=new Map;function a(e){e.forEach(((e,o)=>{const r=n(e,o);s.set(r,e),e&&"object"==typeof e&&t in e&&a(e[t]||[])}))}a(e),r.current={data:e,childrenColumnName:t,kvMap:s,getRowKey:n}}return null===(i=r.current.kvMap)||void 0===i?void 0:i.get(o)}]})(q,oe,ce),de={},he=(e,t,n=!1)=>{var o,r,i,s;const a=Object.assign(Object.assign({},de),e);n&&(null===(o=de.resetPagination)||void 0===o||o.call(de),(null===(r=a.pagination)||void 0===r?void 0:r.current)&&(a.pagination.current=1),f&&(null===(i=f.onChange)||void 0===i||i.call(f,1,null===(s=a.pagination)||void 0===s?void 0:s.pageSize))),P&&!1!==P.scrollToFirstRowOnChange&&ie.body.current&&function(e,t={}){const{getContainer:n=()=>window,callback:o,duration:r=450}=t,i=n(),s=(e=>{var t,n;if("undefined"==typeof window)return 0;let o=0;return Ih(e)?o=e.pageYOffset:e instanceof Document?o=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(o=e.scrollTop),e&&!Ih(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})(i),a=Date.now(),l=()=>{const t=Date.now()-a,n=function(e,t,n,o){const r=n-t;return(e/=o/2)<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}(t>r?r:t,s,e,r);Ih(i)?i.scrollTo(window.pageXOffset,n):i instanceof Document||"HTMLDocument"===i.constructor.name?i.documentElement.scrollTop=n:i.scrollTop=n,t<r?(0,bt.A)(l):"function"==typeof o&&o()};(0,bt.A)(l)}(0,{getContainer:()=>ie.body.current}),null==C||C(a.pagination,a.filters,a.sorter,{currentDataSource:Db(Zb(q,a.sorterStates,oe),a.filterStates,oe),action:t})},[pe,fe,me,ge]=(e=>{const{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:i,showSorterTooltip:s,onSorterChange:a}=e,[l,c]=o.useState((()=>Xb(n,!0))),u=(e,t)=>{const n=[];return e.forEach(((e,o)=>{const r=ng(o,t);if(n.push(tg(e,r)),Array.isArray(e.children)){const t=u(e.children,r);n.push.apply(n,(0,tt.A)(t))}})),n},d=o.useMemo((()=>{let e=!0;const t=Xb(n,!1);if(!t.length){const e=u(n);return l.filter((({key:t})=>e.includes(t)))}const o=[];function r(t){e?o.push(t):o.push(Object.assign(Object.assign({},t),{sortOrder:null}))}let i=null;return t.forEach((t=>{null===i?(r(t),t.sortOrder&&(!1===t.multiplePriority?e=!1:i=!0)):(i&&!1!==t.multiplePriority||(e=!1),r(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=>Yb(t,e,d,p,r,i,s),d,h,()=>Jb(d)]})({prefixCls:X,mergedColumns:z,onSorterChange:(e,t)=>{he({sorter:e,sorterStates:t},"sort",!1)},sortDirections:T||["ascend","descend"],tableLocale:U,showSorterTooltip:$}),be=o.useMemo((()=>Zb(q,fe,oe)),[q,fe]);de.sorter=ge(),de.sorterStates=fe;const[ve,ye,we]=Lb({prefixCls:X,locale:U,dropdownPrefixCls:Y,mergedColumns:z,onFilterChange:(e,t)=>{he({filters:e,filterStates:t},"filter",!0)},getPopupContainer:x||G,rootClassName:M()(l,J)}),Ce=Db(be,ye,oe);de.filters=we,de.filterStates=ye;const xe=o.useMemo((()=>{const e={};return Object.keys(we).forEach((t=>{null!==we[t]&&(e[t]=we[t])})),Object.assign(Object.assign({},me),{filters:e})}),[me,we]),[Se]=(e=>[o.useCallback((t=>ev(t,e)),[e])])(xe),[Ae,Ee]=zb(Ce.length,((e,t)=>{he({pagination:Object.assign(Object.assign({},de.pagination),{current:e,pageSize:t})},"paginate")}),f);de.pagination=!1===f?{}: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}(Ae,f),de.resetPagination=Ee;const ke=o.useMemo((()=>{if(!1===f||!Ae.pageSize)return Ce;const{current:e=1,total:t,pageSize:n=Hb}=Ae;return Ce.length<t?Ce.length>n?Ce.slice((e-1)*n,e*n):Ce:Ce.slice((e-1)*n,e*n)}),[!!f,Ce,null==Ae?void 0:Ae.current,null==Ae?void 0:Ae.pageSize,null==Ae?void 0:Ae.total]),[Re,Me]=((e,t)=>{const{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:i,getCheckboxProps:s,onChange:a,onSelect:l,onSelectAll:c,onSelectInvert:u,onSelectNone:d,onSelectMultiple:h,columnWidth:p,type:f,selections:m,fixed:g,renderCell:b,hideSelectAll:v,checkStrictly:y=!0}=t||{},{prefixCls:w,data:C,pageData:x,getRecordByKey:S,getRowKey:A,expandType:E,childrenColumnName:k,locale:R,getPopupContainer:I}=e,P=(0,ao.rJ)("Table"),[T,O]=function(){const[e,t]=(0,o.useState)(null);return[(0,o.useCallback)(((n,o,r)=>{const i=null!=e?e:n,s=Math.min(i||0,n),a=Math.max(i||0,n),l=o.slice(s,a+1).map((e=>e)),c=l.some((e=>!r.has(e))),u=[];return l.forEach((e=>{c?(r.has(e)||u.push(e),r.add(e)):(r.delete(e),u.push(e))})),t(c?a:null),u}),[e]),e=>{t(e)}]}(),[$,D]=(0,so.A)(r||i||Rh,{value:r}),N=o.useRef(new Map),L=(0,o.useCallback)((e=>{if(n){const t=new Map;e.forEach((e=>{let n=S(e);!n&&N.current.has(e)&&(n=N.current.get(e)),t.set(e,n)})),N.current=t}}),[S,n]);o.useEffect((()=>{L($)}),[$]);const H=(0,o.useMemo)((()=>Mh(k,x)),[k,x]),{keyEntities:z}=(0,o.useMemo)((()=>{if(y)return{keyEntities:null};let e=C;if(n){const t=new Set(H.map(((e,t)=>A(e,t)))),n=Array.from(N.current).reduce(((e,[n,o])=>t.has(n)?e:e.concat(o)),[]);e=[].concat((0,tt.A)(e),(0,tt.A)(n))}return jn(e,{externalGetKey:A,childrenPropName:k})}),[C,A,y,k,n,H]),F=(0,o.useMemo)((()=>{const e=new Map;return H.forEach(((t,n)=>{const o=A(t,n),r=(s?s(t):null)||{};e.set(o,r)})),e}),[H,A,s]),j=(0,o.useCallback)((e=>{const t=A(e);let n;return n=F.has(t)?F.get(A(e)):s?s(e):void 0,!!(null==n?void 0:n.disabled)}),[F,A]),[B,_]=(0,o.useMemo)((()=>{if(y)return[$||[],[]];const{checkedKeys:e,halfCheckedKeys:t}=io($,!0,z,j);return[e||[],t]}),[$,y,z,j]),V=(0,o.useMemo)((()=>{const e="radio"===f?B.slice(0,1):B;return new Set(e)}),[B,f]),W=(0,o.useMemo)((()=>"radio"===f?new Set:new Set(_)),[_,f]);o.useEffect((()=>{t||D(Rh)}),[!!t]);const G=(0,o.useCallback)(((e,t)=>{let o,r;L(e),n?(o=e,r=e.map((e=>N.current.get(e)))):(o=[],r=[],e.forEach((e=>{const t=S(e);void 0!==t&&(o.push(e),r.push(t))}))),D(o),null==a||a(o,r,{type:t})}),[D,S,a,n]),K=(0,o.useCallback)(((e,t,n,o)=>{if(l){const r=n.map((e=>S(e)));l(S(e),t,r,o)}G(n,"single")}),[l,S,G]),U=(0,o.useMemo)((()=>!m||v?null:(!0===m?[Ah,Eh,kh]:m).map((e=>e===Ah?{key:"all",text:R.selectionAll,onSelect(){G(C.map(((e,t)=>A(e,t))).filter((e=>{const t=F.get(e);return!(null==t?void 0:t.disabled)||V.has(e)})),"all")}}:e===Eh?{key:"invert",text:R.selectInvert,onSelect(){const e=new Set(V);x.forEach(((t,n)=>{const o=A(t,n),r=F.get(o);(null==r?void 0:r.disabled)||(e.has(o)?e.delete(o):e.add(o))}));const t=Array.from(e);u&&(P.deprecated(!1,"onSelectInvert","onChange"),u(t)),G(t,"invert")}}:e===kh?{key:"none",text:R.selectNone,onSelect(){null==d||d(),G(Array.from(V).filter((e=>{const t=F.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)}})))),[m,V,x,A,u,G]),q=(0,o.useCallback)((e=>{var n;if(!t)return e.filter((e=>e!==Sh));let r=(0,tt.A)(e);const i=new Set(V),s=H.map(A).filter((e=>!F.get(e).disabled)),a=s.every((e=>i.has(e))),l=s.some((e=>i.has(e))),u=()=>{const e=[];a?s.forEach((t=>{i.delete(t),e.push(t)})):s.forEach((t=>{i.has(t)||(i.add(t),e.push(t))}));const t=Array.from(i);null==c||c(!a,t.map((e=>S(e))),e.map((e=>S(e)))),G(t,"all"),O(null)};let d,C,x;if("radio"!==f){let e;if(U){const t={getPopupContainer:I,items:U.map(((e,t)=>{const{key:n,text:o,onSelect:r}=e;return{key:null!=n?n:t,onClick:()=>{null==r||r(s)},label:o}}))};e=o.createElement("div",{className:`${w}-selection-extra`},o.createElement(ih,{menu:t,getPopupContainer:I},o.createElement("span",null,o.createElement(Rn,null))))}const t=H.map(((e,t)=>{const n=A(e,t),o=F.get(n)||{};return Object.assign({checked:i.has(n)},o)})).filter((({disabled:e})=>e)),n=!!t.length&&t.length===H.length,r=n&&t.every((({checked:e})=>e)),c=n&&t.some((({checked:e})=>e));C=o.createElement(qi,{checked:n?r:!!H.length&&a,indeterminate:n?!r&&c:!a&&l,onChange:u,disabled:0===H.length||n,"aria-label":e?"Custom selection":"Select all",skipGroup:!0}),d=!v&&o.createElement("div",{className:`${w}-selection`},C,e)}if(x="radio"===f?(e,t,n)=>{const r=A(t,n),s=i.has(r),a=F.get(r);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;i.has(r)||K(r,!0,[r],e.nativeEvent),null===(t=null==a?void 0:a.onChange)||void 0===t||t.call(a,e)}})),checked:s}}:(e,t,n)=>{var r;const a=A(t,n),l=i.has(a),c=W.has(a),u=F.get(a);let d;return d="nest"===E?c:null!==(r=null==u?void 0:u.indeterminate)&&void 0!==r?r:c,{node:o.createElement(qi,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,r=s.findIndex((e=>e===a)),c=B.some((e=>s.includes(e)));if(o&&y&&c){const e=T(r,s,i),t=Array.from(i);null==h||h(!l,t.map((e=>S(e))),e.map((e=>S(e)))),G(t,"multiple")}else{const e=B;if(y){const t=l?qn(e,a):Xn(e,a);K(a,!l,t,n)}else{const t=io([].concat((0,tt.A)(e),[a]),!0,z,j),{checkedKeys:o,halfCheckedKeys:r}=t;let i=o;if(l){const e=new Set(o);e.delete(a),i=io(Array.from(e),{checked:!1,halfCheckedKeys:r},z,j).checkedKeys}K(a,!l,i,n)}}O(l?null:r),null===(t=null==u?void 0:u.onChange)||void 0===t||t.call(u,e)}})),checked:l}},!r.includes(Sh))if(0===r.findIndex((e=>{var t;return"EXPAND_COLUMN"===(null===(t=e[Je])||void 0===t?void 0:t.columnType)}))){const[e,...t]=r;r=[e,Sh].concat((0,tt.A)(t))}else r=[Sh].concat((0,tt.A)(r));const k=r.indexOf(Sh);r=r.filter(((e,t)=>e!==Sh||t===k));const R=r[k-1],P=r[k+1];let $=g;void 0===$&&(void 0!==(null==P?void 0:P.fixed)?$=P.fixed:void 0!==(null==R?void 0:R.fixed)&&($=R.fixed)),$&&R&&"EXPAND_COLUMN"===(null===(n=R[Je])||void 0===n?void 0:n.columnType)&&void 0===R.fixed&&(R.fixed=$);const D=M()(`${w}-selection-col`,{[`${w}-selection-col-with-dropdown`]:m&&"checkbox"===f}),N={fixed:$,width:p,className:`${w}-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:r}=x(e,t,n);return b?b(r,t,n,o):o},onCell:t.onCell,align:t.align,[Je]:{className:D}};return r.map((e=>e===Sh?N:e))}),[A,H,t,B,V,W,p,U,E,F,h,K,j]);return[q,V]})({prefixCls:X,data:Ce,pageData:ke,getRowKey:ce,getRecordByKey:ue,expandType:re,childrenColumnName:oe,locale:U,getPopupContainer:x||G},m);ne.__PARENT_RENDER_ICON__=ne.expandIcon,ne.expandIcon=ne.expandIcon||A||function(e){return t=>{const{prefixCls:n,onExpand:r,record:i,expanded:s,expandable:a}=t,l=`${n}-row-expand-icon`;return o.createElement("button",{type:"button",onClick:e=>{r(i,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"===re&&void 0===ne.expandIconColumnIndex?ne.expandIconColumnIndex=m?1:0:ne.expandIconColumnIndex>0&&m&&(ne.expandIconColumnIndex-=1),"number"!=typeof ne.indentSize&&(ne.indentSize="number"==typeof I?I:15);const Ie=o.useCallback((e=>Se(Re(ve(pe(e))))),[pe,ve,Re]);let Pe,Te,Oe;if(!1!==f&&(null==Ae?void 0:Ae.total)){let e;e=Ae.size?Ae.size:"small"===K||"middle"===K?"small":void 0;const t=t=>o.createElement(Bm,Object.assign({},Ae,{className:M()(`${X}-pagination ${X}-pagination-${t}`,Ae.className),size:e})),n="rtl"===B?"left":"right",{position:r}=Ae;if(null!==r&&Array.isArray(r)){const e=r.find((e=>e.includes("top"))),o=r.find((e=>e.includes("bottom"))),i=r.every((e=>"none"==`${e}`));e||o||i||(Te=t(n)),e&&(Pe=t(e.toLowerCase().replace("top",""))),o&&(Te=t(o.toLowerCase().replace("bottom","")))}else Te=t(n)}"boolean"==typeof S?Oe={spinning:S}:"object"==typeof S&&(Oe=Object.assign({spinning:!0},S));const $e=M()(te,J,`${X}-wrapper`,null==_?void 0:_.className,{[`${X}-wrapper-rtl`]:"rtl"===B},a,l,ee),De=Object.assign(Object.assign({},null==_?void 0:_.style),c),Ne=void 0!==(null==O?void 0:O.emptyText)?O.emptyText:(null==V?void 0:V("Table"))||o.createElement(Bh,{componentName:"Table"}),Le=D?nv:tv,He={},ze=o.useMemo((()=>{const{fontSize:e,lineHeight:t,lineWidth:n,padding:o,paddingXS:r,paddingSM:i}=Q,s=Math.floor(e*t);switch(K){case"middle":return 2*i+s+n;case"small":return 2*r+s+n;default:return 2*o+s+n}}),[Q,K]);return D&&(He.listItemHeight=ze),Z(o.createElement("div",{ref:ae,className:$e,style:De},o.createElement(eg,Object.assign({spinning:!1},Oe),Pe,o.createElement(Le,Object.assign({},He,F,{ref:le,columns:z,direction:B,expandable:ne,prefixCls:X,className:M()({[`${X}-middle`]:"middle"===K,[`${X}-small`]:"small"===K,[`${X}-bordered`]:d,[`${X}-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()({[`${X}-row-selected`]:Me.has(ce(e,t))},o)},emptyText:Ne,internalHooks:s,internalRefs:ie,transformColumns:Ie,getContainerWidth:se})),Te)))},xv=o.forwardRef(Cv),Sv=(e,t)=>{const n=o.useRef(0);return n.current+=1,o.createElement(xv,Object.assign({},e,{ref:t,_renderTimes:n.current}))},Av=o.forwardRef(Sv);Av.SELECTION_COLUMN=Sh,Av.EXPAND_COLUMN=i,Av.SELECTION_ALL=Ah,Av.SELECTION_INVERT=Eh,Av.SELECTION_NONE=kh,Av.Column=e=>null,Av.ColumnGroup=e=>null,Av.Summary=G;const Ev=Av},7196:(e,t,n)=>{"use strict";n.d(t,{EU:()=>c,NI:()=>l,iZ:()=>d,kW:()=>h,vf:()=>u,zu:()=>i});var o=n(836),r=n(63132);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},s={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`},a={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:i[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function l(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||s;return t.reduce(((o,r,i)=>(o[e.up(e.keys[i])]=n(t[i]),o)),{})}if("object"==typeof t){const e=o.breakpoints||s;return Object.keys(t).reduce(((s,l)=>{if((0,r.ob)(e.keys,l)){const e=(0,r.CT)(o.containerQueries?o:a,l);e&&(s[e]=n(t[l],l))}else if(Object.keys(e.values||i).includes(l))s[e.up(l)]=n(t[l],l);else{const e=l;s[e]=t[e]}return s}),{})}return n(t)}function c(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}function u(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function d(e,...t){const n=c(e),r=[n,...t].reduce(((e,t)=>(0,o.A)(e,t)),{});return u(Object.keys(n),r)}function h({values:e,breakpoints:t,base:n}){const o=n||function(e,t){if("object"!=typeof e)return{};const n={},o=Object.keys(t);return Array.isArray(e)?o.forEach(((t,o)=>{o<e.length&&(n[t]=!0)})):o.forEach((t=>{null!=e[t]&&(n[t]=!0)})),n}(e,t),r=Object.keys(o);if(0===r.length)return e;let i;return r.reduce(((t,n,o)=>(Array.isArray(e)?(t[n]=null!=e[o]?e[o]:e[i],i=o):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t)),{})}},7350:(e,t,n)=>{var o=n(38221),r=n(23805);e.exports=function(e,t,n){var i=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),o(e,t,{leading:i,maxWait:t,trailing:s})}},7388:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ce});var o=n(96540),r=n(34164),i=n(836),s=n(21362),a=n(17726),l=n(4076),c=n(91092),u=n(33983),d=n(39407),h=n(411),p=n(53948),f=n(71026),m=n(10104),g=n(26739),b=n(20439),v=n(65418),y=n(41538),w=n(38572),C=n(41558),x=n(49565),S=n(96148),A=n(1908);function E(e){return(0,A.Ay)("MuiPopover",e)}(0,S.A)("MuiPopover",["root","paper"]);var k=n(85078),R=n(98663),M=n(74848);function I(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function P(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function T(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function O(e){return"function"==typeof e?e():e}const $=(0,g.Ay)(C.A,{name:"MuiPopover",slot:"Root"})({}),D=(0,g.Ay)(x.A,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),N=o.forwardRef((function(e,t){const n=(0,b.b)({props:e,name:"MuiPopover"}),{action:i,anchorEl:a,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:h,className:p,container:f,elevation:g=8,marginThreshold:C=16,open:x,PaperProps:S={},slots:A={},slotProps:N={},transformOrigin:L={vertical:"top",horizontal:"left"},TransitionComponent:H,transitionDuration:z="auto",TransitionProps:F={},disableScrollLock:j=!1,...B}=n,_=o.useRef(),V={...n,anchorOrigin:l,anchorReference:d,elevation:g,marginThreshold:C,transformOrigin:L,TransitionComponent:H,transitionDuration:z,TransitionProps:F},W=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"]},E,t)})(V),G=o.useCallback((()=>{if("anchorPosition"===d)return c;const e=O(a),t=(e&&1===e.nodeType?e:(0,u.A)(_.current).body).getBoundingClientRect();return{top:t.top+I(t,l.vertical),left:t.left+P(t,l.horizontal)}}),[a,l.horizontal,l.vertical,c,d]),K=o.useCallback((e=>({vertical:I(e,L.vertical),horizontal:P(e,L.horizontal)})),[L.horizontal,L.vertical]),U=o.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=K(t);if("none"===d)return{top:null,left:null,transformOrigin:T(n)};const o=G();let r=o.top-n.vertical,i=o.left-n.horizontal;const s=r+t.height,l=i+t.width,c=(0,y.A)(O(a)),u=c.innerHeight-C,h=c.innerWidth-C;if(null!==C&&r<C){const e=r-C;r-=e,n.vertical+=e}else if(null!==C&&s>u){const e=s-u;r-=e,n.vertical+=e}if(null!==C&&i<C){const e=i-C;i-=e,n.horizontal+=e}else if(l>h){const e=l-h;i-=e,n.horizontal+=e}return{top:`${Math.round(r)}px`,left:`${Math.round(i)}px`,transformOrigin:T(n)}}),[a,d,G,K,C]),[q,X]=o.useState(x),Y=o.useCallback((()=>{const e=_.current;if(!e)return;const t=U(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,X(!0)}),[U]);o.useEffect((()=>(j&&window.addEventListener("scroll",Y),()=>window.removeEventListener("scroll",Y))),[a,j,Y]),o.useEffect((()=>{x&&Y()})),o.useImperativeHandle(i,(()=>x?{updatePosition:()=>{Y()}}:null),[x,Y]),o.useEffect((()=>{if(!x)return;const e=(0,v.A)((()=>{Y()})),t=(0,y.A)(O(a));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[a,x,Y]);let Q=z;const J={slots:{transition:H,...A},slotProps:{transition:F,paper:S,...N}},[Z,ee]=(0,k.A)("transition",{elementType:w.A,externalForwardedProps:J,ownerState:V,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),Y()},onExited:t=>{e.onExited?.(t),X(!1)}}),additionalProps:{appear:!0,in:x}});"auto"!==z||Z.muiSupportAuto||(Q=void 0);const te=f||(a?(0,u.A)(O(a)).body:void 0),[ne,{slots:oe,slotProps:re,...ie}]=(0,k.A)("root",{ref:t,elementType:$,externalForwardedProps:{...J,...B},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:A.backdrop},slotProps:{backdrop:(0,R.A)("function"==typeof N.backdrop?N.backdrop(V):N.backdrop,{invisible:!0})},container:te,open:x},ownerState:V,className:(0,r.A)(W.root,p)}),[se,ae]=(0,k.A)("paper",{ref:_,className:W.paper,elementType:D,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:{elevation:g,style:q?void 0:{opacity:0}},ownerState:V});return(0,M.jsx)(ne,{...ie,...!(0,m.A)(ne)&&{slots:oe,slotProps:re,disableScrollLock:j},children:(0,M.jsx)(Z,{...ee,timeout:Q,children:(0,M.jsx)(se,{...ae,children:h})})})}));var L=n(98855);function H(e){return(0,A.Ay)("MuiMenu",e)}(0,S.A)("MuiMenu",["root","paper","list"]);const z={vertical:"top",horizontal:"right"},F={vertical:"top",horizontal:"left"},j=(0,g.Ay)(N,{shouldForwardProp:e=>(0,L.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root"})({}),B=(0,g.Ay)(D,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),_=(0,g.Ay)(f.A,{name:"MuiMenu",slot:"List"})({outline:0}),V=o.forwardRef((function(e,t){const n=(0,b.b)({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:f,PaperProps:m={},PopoverClasses:g,transitionDuration:v="auto",TransitionProps:{onEntering:y,...w}={},variant:C="selectedMenu",slots:x={},slotProps:S={},...A}=n,E=(0,h.I)(),R={...n,autoFocus:i,disableAutoFocusItem:c,MenuListProps:u,onEntering:y,PaperProps:m,transitionDuration:v,TransitionProps:w,variant:C},I=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"],list:["list"]},H,t)})(R),P=i&&!c&&f,T=o.useRef(null);let O=-1;o.Children.map(a,((e,t)=>{o.isValidElement(e)&&(e.props.disabled||("selectedMenu"===C&&e.props.selected||-1===O)&&(O=t))}));const $={slots:x,slotProps:{list:u,transition:w,paper:m,...S}},D=(0,p.A)({elementType:x.root,externalSlotProps:S.root,ownerState:R,className:[I.root,l]}),[N,L]=(0,k.A)("paper",{className:I.paper,elementType:B,externalForwardedProps:$,shouldForwardComponentProp:!0,ownerState:R}),[V,W]=(0,k.A)("list",{className:(0,r.A)(I.list,u.className),elementType:_,shouldForwardComponentProp:!0,externalForwardedProps:$,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:R}),G="function"==typeof $.slotProps.transition?$.slotProps.transition(R):$.slotProps.transition;return(0,M.jsx)(j,{onClose:d,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?z:F,slots:{root:x.root,paper:N,backdrop:x.backdrop,...x.transition&&{transition:x.transition}},slotProps:{root:D,paper:L,backdrop:"function"==typeof S.backdrop?S.backdrop(R):S.backdrop,transition:{...G,onEntering:(...e)=>{((e,t)=>{T.current&&T.current.adjustStyleForScrollbar(e,{direction:E?"rtl":"ltr"}),y&&y(e,t)})(...e),G?.onEntering?.(...e)}}},open:f,ref:t,transitionDuration:v,ownerState:R,...A,classes:g,children:(0,M.jsx)(V,{actions:T,autoFocus:i&&(-1===O||c),autoFocusItem:P,variant:C,...W,children:a})})}));function W(e){return(0,A.Ay)("MuiNativeSelect",e)}const G=(0,S.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),K=(0,g.Ay)("select")((({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${G.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]}))),U=(0,g.Ay)(K,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:L.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${G.multiple}`]:t.multiple}]}})({}),q=(0,g.Ay)("svg")((({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${G.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]}))),X=(0,g.Ay)(q,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.A)(n.variant)}`],n.open&&t.iconOpen]}})({}),Y=o.forwardRef((function(e,t){const{className:n,disabled:i,error:a,IconComponent:l,inputRef:c,variant:u="standard",...h}=e,p={...e,disabled:i,variant:u,error:a},f=(e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:a}=e,l={select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${(0,d.A)(n)}`,i&&"iconOpen",o&&"disabled"]};return(0,s.A)(l,W,t)})(p);return(0,M.jsxs)(o.Fragment,{children:[(0,M.jsx)(U,{ownerState:p,className:(0,r.A)(f.select,n),disabled:i,ref:c||t,...h}),e.multiple?null:(0,M.jsx)(X,{as:l,ownerState:p,className:f.icon})]})}));var Q=n(99692),J=n(23),Z=n(30301),ee=n(1152);function te(e){return(0,A.Ay)("MuiSelect",e)}const ne=(0,S.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var oe;const re=(0,g.Ay)(K,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ne.select}`]:t.select},{[`&.${ne.select}`]:t[n.variant]},{[`&.${ne.error}`]:t.error},{[`&.${ne.multiple}`]:t.multiple}]}})({[`&.${ne.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),ie=(0,g.Ay)(q,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.A)(n.variant)}`],n.open&&t.iconOpen]}})({}),se=(0,g.Ay)("input",{shouldForwardProp:e=>(0,J.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ae(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function le(e){return null==e||"string"==typeof e&&!e.trim()}const ce=o.forwardRef((function(e,t){const{"aria-describedby":n,"aria-label":i,autoFocus:a,autoWidth:h,children:p,className:f,defaultOpen:m,defaultValue:g,disabled:b,displayEmpty:v,error:y=!1,IconComponent:w,inputRef:C,labelId:x,MenuProps:S={},multiple:A,name:E,onBlur:k,onChange:R,onClose:I,onFocus:P,onOpen:T,open:O,readOnly:$,renderValue:D,required:N,SelectDisplayProps:L={},tabIndex:H,type:z,value:F,variant:j="standard",...B}=e,[_,W]=(0,ee.A)({controlled:F,default:g,name:"Select"}),[G,K]=(0,ee.A)({controlled:O,default:m,name:"Select"}),U=o.useRef(null),q=o.useRef(null),[X,Y]=o.useState(null),{current:J}=o.useRef(null!=O),[ne,ce]=o.useState(),ue=(0,Z.A)(t,C),de=o.useCallback((e=>{q.current=e,e&&Y(e)}),[]),he=X?.parentNode;o.useImperativeHandle(ue,(()=>({focus:()=>{q.current.focus()},node:U.current,value:_})),[_]),o.useEffect((()=>{m&&G&&X&&!J&&(ce(h?null:he.clientWidth),q.current.focus())}),[X,h]),o.useEffect((()=>{a&&q.current.focus()}),[a]),o.useEffect((()=>{if(!x)return;const e=(0,u.A)(q.current).getElementById(x);if(e){const t=()=>{getSelection().isCollapsed&&q.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[x]);const pe=(e,t)=>{e?T&&T(t):I&&I(t),J||(ce(h?null:he.clientWidth),K(e))},fe=o.Children.toArray(p),me=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(A){n=Array.isArray(_)?_.slice():[];const t=_.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),_!==n&&(W(n),R)){const o=t.nativeEvent||t,r=new o.constructor(o.type,o);Object.defineProperty(r,"target",{writable:!0,value:{value:n,name:E}}),R(r,e)}A||pe(!1,t)}},ge=null!==X&&G;let be,ve;delete B["aria-invalid"];const ye=[];let we=!1,Ce=!1;((0,Q.lq)({value:_})||v)&&(D?be=D(_):we=!0);const xe=fe.map((e=>{if(!o.isValidElement(e))return null;let t;if(A){if(!Array.isArray(_))throw new Error((0,l.A)(2));t=_.some((t=>ae(t,e.props.value))),t&&we&&ye.push(e.props.children)}else t=ae(_,e.props.value),t&&we&&(ve=e.props.children);return t&&(Ce=!0),o.cloneElement(e,{"aria-selected":t?"true":"false",onClick:me(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));we&&(be=A?0===ye.length?null:ye.reduce(((e,t,n)=>(e.push(t),n<ye.length-1&&e.push(", "),e)),[]):ve);let Se,Ae=ne;!h&&J&&X&&(Ae=he.clientWidth),Se=void 0!==H?H:b?null:0;const Ee=L.id||(E?`mui-component-select-${E}`:void 0),ke={...e,variant:j,value:_,open:ge,error:y},Re=(e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:a}=e,l={select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${(0,d.A)(n)}`,i&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return(0,s.A)(l,te,t)})(ke),Me={...S.PaperProps,...S.slotProps?.paper},Ie=(0,c.A)();return(0,M.jsxs)(o.Fragment,{children:[(0,M.jsx)(re,{as:"div",ref:de,tabIndex:Se,role:"combobox","aria-controls":ge?Ie:void 0,"aria-disabled":b?"true":void 0,"aria-expanded":ge?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[x,Ee].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":N?"true":void 0,"aria-invalid":y?"true":void 0,onKeyDown:e=>{$||[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),pe(!0,e))},onMouseDown:b||$?null:e=>{0===e.button&&(e.preventDefault(),q.current.focus(),pe(!0,e))},onBlur:e=>{!ge&&k&&(Object.defineProperty(e,"target",{writable:!0,value:{value:_,name:E}}),k(e))},onFocus:P,...L,ownerState:ke,className:(0,r.A)(L.className,Re.select,f),id:Ee,children:le(be)?oe||(oe=(0,M.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""})):be}),(0,M.jsx)(se,{"aria-invalid":y,value:Array.isArray(_)?_.join(","):_,name:E,ref:U,"aria-hidden":!0,onChange:e=>{const t=fe.find((t=>t.props.value===e.target.value));void 0!==t&&(W(t.props.value),R&&R(e,t))},tabIndex:-1,disabled:b,className:Re.nativeInput,autoFocus:a,required:N,...B,ownerState:ke}),(0,M.jsx)(ie,{as:w,className:Re.icon,ownerState:ke}),(0,M.jsx)(V,{id:`menu-${E||""}`,anchorEl:he,open:ge,onClose:e=>{pe(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...S,slotProps:{...S.slotProps,list:{"aria-labelledby":x,role:"listbox","aria-multiselectable":A?"true":void 0,disableListWrap:!0,id:Ie,...S.MenuListProps},paper:{...Me,style:{minWidth:Ae,...null!=Me?Me.style:null}}},children:xe})]})}));var ue=n(93583),de=n(76761),he=n(41811),pe=n(78164),fe=n(63984),me=n(47195);const ge={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>(0,L.A)(e)&&"variant"!==e},be=(0,g.Ay)(pe.A,ge)(""),ve=(0,g.Ay)(me.A,ge)(""),ye=(0,g.Ay)(fe.A,ge)(""),we=o.forwardRef((function(e,t){const n=(0,b.b)({name:"MuiSelect",props:e}),{autoWidth:l=!1,children:c,classes:u={},className:d,defaultOpen:h=!1,displayEmpty:p=!1,IconComponent:f=he.A,id:m,input:g,inputProps:v,label:y,labelId:w,MenuProps:C,multiple:x=!1,native:S=!1,onClose:A,onOpen:E,open:k,renderValue:R,SelectDisplayProps:I,variant:P="outlined",...T}=n,O=S?Y:ce,$=(0,de.A)(),D=(0,ue.A)({props:n,muiFormControl:$,states:["variant","error"]}),N=D.variant||P,L={...n,variant:N,classes:u},H=(e=>{const{classes:t}=e,n=(0,s.A)({root:["root"]},te,t);return{...t,...n}})(L),{root:z,...F}=H,j=g||{standard:(0,M.jsx)(be,{ownerState:L}),outlined:(0,M.jsx)(ve,{label:y,ownerState:L}),filled:(0,M.jsx)(ye,{ownerState:L})}[N],B=(0,Z.A)(t,(0,a.A)(j));return(0,M.jsx)(o.Fragment,{children:o.cloneElement(j,{inputComponent:O,inputProps:{children:c,error:D.error,IconComponent:f,variant:N,type:void 0,multiple:x,...S?{id:m}:{autoWidth:l,defaultOpen:h,displayEmpty:p,labelId:w,MenuProps:C,onClose:A,onOpen:E,open:k,renderValue:R,SelectDisplayProps:{id:m,...I}},...v,classes:v?(0,i.A)(F,v.classes):F,...g?g.props.inputProps:{}},...(x&&S||p)&&"outlined"===N?{notched:!0}:{},ref:B,className:(0,r.A)(j.props.className,d,H.root),...!g&&{variant:N},...T})})}));we.muiName="Select";const Ce=we},8719:(e,t,n)=>{"use strict";n.d(t,{A9:()=>m,H3:()=>f,K4:()=>u,Xf:()=>c,f3:()=>h,xK:()=>d});var o=n(82284),r=n(96540),i=n(66351),s=n(28104),a=n(76288),l=Number(r.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,i.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof o||null!==(t=o.prototype)&&void 0!==t&&t.render||o.$$typeof===i.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===i.ForwardRef)};function p(e){return(0,r.isValidElement)(e)&&!(0,a.A)(e)}var f=function(e){return p(e)&&h(e)},m=function(e){if(e&&p(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null}},8861:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var o=n(96540),r=n(34164),i=n(21362),s=n(17437),a=n(26739),l=n(39241),c=n(20439),u=n(39407),d=n(1321),h=n(96148),p=n(1908);function f(e){return(0,p.Ay)("MuiCircularProgress",e)}(0,h.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m=n(74848);const g=s.i7`
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
- `,b=s.i7`
- 0% {
- stroke-dasharray: 1px, 200px;
- stroke-dashoffset: 0;
- }
- 50% {
- stroke-dasharray: 100px, 200px;
- stroke-dashoffset: -15px;
- }
- 100% {
- stroke-dasharray: 1px, 200px;
- stroke-dashoffset: -126px;
- }
- `,v="string"!=typeof g?s.AH`
- animation: ${g} 1.4s linear infinite;
- `:null,y="string"!=typeof b?s.AH`
- animation: ${b} 1.4s ease-in-out infinite;
- `:null,w=(0,a.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,u.A)(n.color)}`]]}})((0,l.A)((({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:v||{animation:`${g} 1.4s linear infinite`}},...Object.entries(e.palette).filter((0,d.A)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),C=(0,a.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),x=(0,a.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,u.A)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((0,l.A)((({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:y||{animation:`${b} 1.4s ease-in-out infinite`}}]})))),S=o.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:a=!1,size:l=40,style:d,thickness:h=3.6,value:p=0,variant:g="indeterminate",...b}=n,v={...n,color:s,disableShrink:a,size:l,thickness:h,value:p,variant:g},y=(e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e,s={root:["root",n,`color${(0,u.A)(o)}`],svg:["svg"],circle:["circle",`circle${(0,u.A)(n)}`,r&&"circleDisableShrink"]};return(0,i.A)(s,f,t)})(v),S={},A={},E={};if("determinate"===g){const e=2*Math.PI*((44-h)/2);S.strokeDasharray=e.toFixed(3),E["aria-valuenow"]=Math.round(p),S.strokeDashoffset=`${((100-p)/100*e).toFixed(3)}px`,A.transform="rotate(-90deg)"}return(0,m.jsx)(w,{className:(0,r.A)(y.root,o),style:{width:l,height:l,...A,...d},ownerState:v,ref:t,role:"progressbar",...E,...b,children:(0,m.jsx)(C,{className:y.svg,ownerState:v,viewBox:"22 22 44 44",children:(0,m.jsx)(x,{className:y.circle,style:S,ownerState:v,cx:44,cy:44,r:(44-h)/2,fill:"none",strokeWidth:h})})})}))},9325:(e,t,n)=>{var o=n(34840),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},9417:(e,t,n)=>{"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>o})},9553:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var o=n(58296);function r(e){return o.A}},9792:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var o=n(96540),r=n(34164),i=n(21362),s=n(39407),a=n(26739),l=n(39241),c=n(20439),u=n(96148),d=n(1908);function h(e){return(0,d.Ay)("MuiSvgIcon",e)}(0,u.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(74848);const f=(0,a.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,s.A)(n.color)}`],t[`fontSize${(0,s.A)(n.fontSize)}`]]}})((0,l.A)((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter((([,e])=>e&&e.main)).map((([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}}))),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]})))),m=o.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:a,className:l,color:u="inherit",component:d="svg",fontSize:m="medium",htmlColor:g,inheritViewBox:b=!1,titleAccess:v,viewBox:y="0 0 24 24",...w}=n,C=o.isValidElement(a)&&"svg"===a.type,x={...n,color:u,component:d,fontSize:m,instanceFontSize:e.fontSize,inheritViewBox:b,viewBox:y,hasSvgAsChild:C},S={};b||(S.viewBox=y);const A=(e=>{const{color:t,fontSize:n,classes:o}=e,r={root:["root","inherit"!==t&&`color${(0,s.A)(t)}`,`fontSize${(0,s.A)(n)}`]};return(0,i.A)(r,h,o)})(x);return(0,p.jsxs)(f,{as:d,className:(0,r.A)(A.root,l),focusable:"false",color:g,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t,...S,...w,...C&&a.props,ownerState:x,children:[C?a.props.children:a,v?(0,p.jsx)("title",{children:v}):null]})}));m.muiName="SvgIcon";const g=m;function b(e,t){function n(t,n){return(0,p.jsx)(g,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=g.muiName,o.memo(o.forwardRef(n))}},10104:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(e){return"string"==typeof e}},10124:(e,t,n)=>{var o=n(9325);e.exports=function(){return o.Date.now()}},10644:(e,t,n)=>{"use strict";function o(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>o})},10786:(e,t,n)=>{"use strict";n.d(t,{AV:()=>g,DW:()=>s,EJ:()=>d,Ks:()=>l,P$:()=>v,YW:()=>m,lj:()=>p,nt:()=>a,p1:()=>u,tm:()=>f,tw:()=>b,uP:()=>h});var o=n(31216),r=n(60957);const i=e=>e.items,s=(0,o.M)(i,(e=>e.loading)),a=(0,o.M)(i,(e=>e.error)),l=(0,o.M)(i,(e=>e.itemMetaLookup)),c=[],u=(0,o.M)([i,(e,t)=>t],((e,t)=>e.itemOrderedChildrenIdsLookup[t??r.T2]??c)),d=(0,o.M)([i,(e,t)=>t],((e,t)=>e.itemModelLookup[t])),h=(0,o.M)([l,(e,t)=>t],((e,t)=>e[t??r.T2]??null)),p=(0,o.M)([l,(e,t)=>t],r.gE),f=(0,o.M)([i,h],((e,t)=>null==t?-1:e.itemChildrenIndexesLookup[t.parentId??r.T2][t.id])),m=(0,o.M)([h],(e=>e?.parentId??null)),g=(0,o.M)([h],(e=>e?.depth??0)),b=(0,o.M)([i],(e=>e.disabledItemsFocusable)),v=(0,o.M)([b,p],((e,t)=>!!e||!t))},11108:(e,t,n)=>{"use strict";function o(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>o})},12533:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(5544),r=n(26956),i=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),f=p[0],m=p[1],g=void 0!==c?c:f,b=d?d(g):g,v=(0,r.A)(u),y=(0,s.A)([g]),w=(0,o.A)(y,2),C=w[0],x=w[1];return(0,i.o)((function(){var e=C[0];f!==e&&v(f,e)}),[C]),(0,i.o)((function(){a(c)||m(c)}),[c]),[b,(0,r.A)((function(e,t){m(e,t),x([g],t)}))]}},12897:(e,t,n)=>{var o=n(43693);function r(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?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports},14292:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);function r(e,t){return o.isValidElement(e)&&-1!==t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)}},14808:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=(0,n(63248).Ay)()},14921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(65387),r=n(96540),i=n(24684);const s=(0,o.A)(),a=function(e=s){return function(e=null){const t=r.useContext(i.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}(e)}},15265:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(77132),r=n(45748),i=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,r.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){r.uy.pink=r.uy.magenta,r.UA.pink=r.UA.magenta;const t=Object.keys(i.r).map((t=>{const n=e[t]===r.uy[t]?r.UA[t]:(0,r.cM)(e[t]);return Array.from({length:10},(()=>1)).reduce(((e,o,r)=>(e[`${t}-${r+1}`]=n[r],e[`${t}${r+1}`]=n[r],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:r,colorError:i,colorInfo:a,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=t(l),h=t(o),p=t(r),f=t(i),m=t(a),g=n(c,u),b=t(e.colorLink||e.colorInfo),v=new s.Y(f[1]).mix(new s.Y(f[3]),50).toHexString();return Object.assign(Object.assign({},g),{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:f[1],colorErrorBgHover:f[2],colorErrorBgFilledHover:v,colorErrorBgActive:f[3],colorErrorBorder:f[3],colorErrorBorderHover:f[4],colorErrorHover:f[5],colorError:f[6],colorErrorActive:f[7],colorErrorTextHover:f[8],colorErrorText:f[9],colorErrorTextActive:f[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:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[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)),r=n[1],i=n[0],s=n[2],l=o[1],c=o[0],u=o[2];return{fontSizeSM:i,fontSize:r,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*r),fontHeightLG:Math.round(u*s),fontHeightSM:Math.round(c*i),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:r}=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:r+1},(e=>{let t=e,n=e,o=e,r=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?r=4:e>=8&&(r=6),{borderRadius:e,borderRadiusXS:o,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:r}})(o))}(e))})),p=h},15411:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(31601),r=n.n(o),i=n(76314),s=n.n(i)()(r());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},15870:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(96540);const r={};function i(e,t){const n=o.useRef(r);return n.current===r&&(n.current=e(t)),n}},16014:(e,t,n)=>{"use strict";n.d(t,{A:()=>Q});var o=n(96540),r=n(34164),i=n(21362),s=n(82777),a=n(11108),l=n(78854),c=n(97164),u=n(91092),d=n(16082);function h(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const p=function(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:o,matchFrom:r="any",stringify:i,trim:s=!1}=e;return(e,{inputValue:a,getOptionLabel:l})=>{let c=s?a.trim():a;n&&(c=c.toLowerCase()),t&&(c=h(c));const u=c?e.filter((e=>{let o=(i||l)(e);return n&&(o=o.toLowerCase()),t&&(o=h(o)),"start"===r?o.startsWith(c):o.includes(c)})):e;return"number"==typeof o?u.slice(0,o):u}}(),f=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),m=[];function g(e,t,n,o){if(t||null==e||o)return"";const r=n(e);return"string"==typeof r?r:""}var b=n(27519),v=n(22730),y=n(49565),w=n(37768),C=n(17862),x=n(67246),S=n(26410),A=n(24890),E=n(89026),k=n(37523),R=n(41811),M=n(26739),I=n(39241),P=n(20439),T=n(96148),O=n(1908);function $(e){return(0,O.Ay)("MuiAutocomplete",e)}const D=(0,T.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var N,L,H=n(39407),z=n(85078),F=n(74848);const j=(0,M.Ay)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:o,hasClearIcon:r,hasPopupIcon:i,inputFocused:s,size:a}=n;return[{[`& .${D.tag}`]:t.tag},{[`& .${D.tag}`]:t[`tagSize${(0,H.A)(a)}`]},{[`& .${D.inputRoot}`]:t.inputRoot},{[`& .${D.input}`]:t.input},{[`& .${D.input}`]:s&&t.inputFocused},t.root,o&&t.fullWidth,i&&t.hasPopupIcon,r&&t.hasClearIcon]}})({[`&.${D.focused} .${D.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${D.clearIndicator}`]:{visibility:"visible"}},[`& .${D.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${D.inputRoot}`]:{[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:30},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:56},[`& .${D.input}`]:{width:0,minWidth:30}},[`& .${x.A.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${x.A.root}.${S.A.sizeSmall}`]:{[`& .${x.A.input}`]:{padding:"2px 4px 3px 0"}},[`& .${A.A.root}`]:{padding:9,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:39},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:65},[`& .${D.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${A.A.root}.${S.A.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${D.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${E.A.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:39},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:65},[`& .${E.A.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${E.A.root}.${S.A.sizeSmall}`]:{paddingBottom:1,[`& .${E.A.input}`]:{padding:"2.5px 4px"}},[`& .${S.A.hiddenLabel}`]:{paddingTop:8},[`& .${E.A.root}.${S.A.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${E.A.root}.${S.A.hiddenLabel}.${S.A.sizeSmall}`]:{[`& .${D.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${D.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${D.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${D.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${D.inputRoot}`]:{flexWrap:"wrap"}}}]}),B=(0,M.Ay)("div",{name:"MuiAutocomplete",slot:"EndAdornment"})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),_=(0,M.Ay)(w.A,{name:"MuiAutocomplete",slot:"ClearIndicator"})({marginRight:-2,padding:4,visibility:"hidden"}),V=(0,M.Ay)(w.A,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),W=(0,M.Ay)(b.A,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${D.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((0,I.A)((({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})))),G=(0,M.Ay)(y.A,{name:"MuiAutocomplete",slot:"Paper"})((0,I.A)((({theme:e})=>({...e.typography.body1,overflow:"auto"})))),K=(0,M.Ay)("div",{name:"MuiAutocomplete",slot:"Loading"})((0,I.A)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})))),U=(0,M.Ay)("div",{name:"MuiAutocomplete",slot:"NoOptions"})((0,I.A)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})))),q=(0,M.Ay)("ul",{name:"MuiAutocomplete",slot:"Listbox"})((0,I.A)((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${D.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${D.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${D.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${D.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${D.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})))),X=(0,M.Ay)(v.A,{name:"MuiAutocomplete",slot:"GroupLabel"})((0,I.A)((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})))),Y=(0,M.Ay)("ul",{name:"MuiAutocomplete",slot:"GroupUl"})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Q=o.forwardRef((function(e,t){const n=(0,P.b)({props:e,name:"MuiAutocomplete"}),{autoComplete:s=!1,autoHighlight:h=!1,autoSelect:v=!1,blurOnSelect:w=!1,ChipProps:x,className:S,clearIcon:A=N||(N=(0,F.jsx)(k.A,{fontSize:"small"})),clearOnBlur:E=!n.freeSolo,clearOnEscape:M=!1,clearText:I="Clear",closeText:T="Close",componentsProps:O,defaultValue:D=(n.multiple?[]:null),disableClearable:Q=!1,disableCloseOnSelect:J=!1,disabled:Z=!1,disabledItemsFocusable:ee=!1,disableListWrap:te=!1,disablePortal:ne=!1,filterOptions:oe,filterSelectedOptions:re=!1,forcePopupIcon:ie="auto",freeSolo:se=!1,fullWidth:ae=!1,getLimitTagsText:le=e=>`+${e}`,getOptionDisabled:ce,getOptionKey:ue,getOptionLabel:de,isOptionEqualToValue:he,groupBy:pe,handleHomeEndKeys:fe=!n.freeSolo,id:me,includeInputInList:ge=!1,inputValue:be,limitTags:ve=-1,ListboxComponent:ye,ListboxProps:we,loading:Ce=!1,loadingText:xe="Loading…",multiple:Se=!1,noOptionsText:Ae="No options",onChange:Ee,onClose:ke,onHighlightChange:Re,onInputChange:Me,onOpen:Ie,open:Pe,openOnFocus:Te=!1,openText:Oe="Open",options:$e,PaperComponent:De,PopperComponent:Ne,popupIcon:Le=L||(L=(0,F.jsx)(R.A,{})),readOnly:He=!1,renderGroup:ze,renderInput:Fe,renderOption:je,renderTags:Be,renderValue:_e,selectOnFocus:Ve=!n.freeSolo,size:We="medium",slots:Ge={},slotProps:Ke={},value:Ue,...qe}=n,{getRootProps:Xe,getInputProps:Ye,getInputLabelProps:Qe,getPopupIndicatorProps:Je,getClearProps:Ze,getItemProps:et,getListboxProps:tt,getOptionProps:nt,value:ot,dirty:rt,expanded:it,id:st,popupOpen:at,focused:lt,focusedItem:ct,anchorEl:ut,setAnchorEl:dt,inputValue:ht,groupedOptions:pt}=function(e){const{unstable_isActiveElementInListbox:t=f,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:s=!1,blurOnSelect:h=!1,clearOnBlur:b=!e.freeSolo,clearOnEscape:v=!1,componentName:y="useAutocomplete",defaultValue:w=(e.multiple?m:null),disableClearable:C=!1,disableCloseOnSelect:x=!1,disabled:S,disabledItemsFocusable:A=!1,disableListWrap:E=!1,filterOptions:k=p,filterSelectedOptions:R=!1,freeSolo:M=!1,getOptionDisabled:I,getOptionKey:P,getOptionLabel:T=e=>e.label??e,groupBy:O,handleHomeEndKeys:$=!e.freeSolo,id:D,includeInputInList:N=!1,inputValue:L,isOptionEqualToValue:H=(e,t)=>e===t,multiple:z=!1,onChange:F,onClose:j,onHighlightChange:B,onInputChange:_,onOpen:V,open:W,openOnFocus:G=!1,options:K,readOnly:U=!1,renderValue:q,selectOnFocus:X=!e.freeSolo,value:Y}=e,Q=(0,u.A)(D);let J=T;J=e=>{const t=T(e);return"string"!=typeof t?String(t):t};const Z=o.useRef(!1),ee=o.useRef(!0),te=o.useRef(null),ne=o.useRef(null),[oe,re]=o.useState(null),[ie,se]=o.useState(-1),ae=i?0:-1,le=o.useRef(ae),ce=o.useRef(g(w??Y,z,J)).current,[ue,de]=(0,c.A)({controlled:Y,default:w,name:y}),[he,pe]=(0,c.A)({controlled:L,default:ce,name:y,state:"inputValue"}),[fe,me]=o.useState(!1),ge=o.useCallback(((e,t,n)=>{if(!(z?ue.length<t.length:null!==t)&&!b)return;const o=g(t,z,J,q);he!==o&&(pe(o),_&&_(e,o,n))}),[J,he,z,_,pe,b,ue,q]),[be,ve]=(0,c.A)({controlled:W,default:!1,name:y,state:"open"}),[ye,we]=o.useState(!0),Ce=!z&&null!=ue&&he===J(ue),xe=be&&!U,Se=xe?k(K.filter((e=>!R||!(z?ue:[ue]).some((t=>null!==t&&H(e,t))))),{inputValue:Ce&&ye?"":he,getOptionLabel:J}):[],Ae=(0,d.A)({filteredOptions:Se,value:ue,inputValue:he});o.useEffect((()=>{const e=ue!==Ae.value;fe&&!e||M&&!e||ge(null,ue,"reset")}),[ue,ge,fe,Ae.value,M]);const Ee=be&&Se.length>0&&!U,ke=(0,l.A)((e=>{if(-1===e)te.current.focus();else{const t=q?"data-item-index":"data-tag-index";oe.querySelector(`[${t}="${e}"]`).focus()}}));o.useEffect((()=>{z&&ie>ue.length-1&&(se(-1),ke(-1))}),[ue,z,ie,ke]);const Re=(0,l.A)((({event:e,index:t,reason:o})=>{if(le.current=t,-1===t?te.current.removeAttribute("aria-activedescendant"):te.current.setAttribute("aria-activedescendant",`${Q}-option-${t}`),B&&["mouse","keyboard","touch"].includes(o)&&B(e,-1===t?null:Se[t],o),!ne.current)return;const r=ne.current.querySelector(`[role="option"].${n}-focused`);r&&(r.classList.remove(`${n}-focused`),r.classList.remove(`${n}-focusVisible`));let i=ne.current;if("listbox"!==ne.current.getAttribute("role")&&(i=ne.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const s=ne.current.querySelector(`[data-option-index="${t}"]`);if(s&&(s.classList.add(`${n}-focused`),"keyboard"===o&&s.classList.add(`${n}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==o&&"touch"!==o)){const e=s,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(O?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(O?1.3:0))}})),Me=(0,l.A)((({event:e,diff:t,direction:n="next",reason:o})=>{if(!xe)return;const i=function(e,t){if(!ne.current||e<0||e>=Se.length)return-1;let n=e;for(;;){const o=ne.current.querySelector(`[data-option-index="${n}"]`),r=!A&&(!o||o.disabled||"true"===o.getAttribute("aria-disabled"));if(o&&o.hasAttribute("tabindex")&&!r)return n;if(n="next"===t?(n+1)%Se.length:(n-1+Se.length)%Se.length,n===e)return-1}}((()=>{const e=Se.length-1;if("reset"===t)return ae;if("start"===t)return 0;if("end"===t)return e;const n=le.current+t;return n<0?-1===n&&N?-1:E&&-1!==le.current||Math.abs(t)>1?0:e:n>e?n===e+1&&N?-1:E||Math.abs(t)>1?e:0:n})(),n);if(Re({index:i,reason:o,event:e}),r&&"reset"!==t)if(-1===i)te.current.value=he;else{const e=J(Se[i]);te.current.value=e,0===e.toLowerCase().indexOf(he.toLowerCase())&&he.length>0&&te.current.setSelectionRange(he.length,e.length)}})),Ie=o.useCallback((()=>{if(!xe)return;const e=(()=>{if(-1!==le.current&&Ae.filteredOptions&&Ae.filteredOptions.length!==Se.length&&Ae.inputValue===he&&(z?ue.length===Ae.value.length&&Ae.value.every(((e,t)=>J(ue[t])===J(e))):(e=Ae.value,t=ue,(e?J(e):"")===(t?J(t):"")))){const e=Ae.filteredOptions[le.current];if(e)return Se.findIndex((t=>J(t)===J(e)))}var e,t;return-1})();if(-1!==e)return void(le.current=e);const t=z?ue[0]:ue;if(0!==Se.length&&null!=t){if(ne.current)if(null==t)le.current>=Se.length-1?Re({index:Se.length-1}):Re({index:le.current});else{const e=Se[le.current];if(z&&e&&-1!==ue.findIndex((t=>H(e,t))))return;const n=Se.findIndex((e=>H(e,t)));-1===n?Me({diff:"reset"}):Re({index:n})}}else Me({diff:"reset"})}),[Se.length,!z&&ue,R,Me,Re,xe,he,z]),Pe=(0,l.A)((e=>{(0,a.A)(ne,e),e&&Ie()}));o.useEffect((()=>{Ie()}),[Ie]);const Te=e=>{be||(ve(!0),we(!0),V&&V(e))},Oe=(e,t)=>{be&&(ve(!1),j&&j(e,t))},$e=(e,t,n,o)=>{if(z){if(ue.length===t.length&&ue.every(((e,n)=>e===t[n])))return}else if(ue===t)return;F&&F(e,t,n,o),de(t)},De=o.useRef(!1),Ne=(e,t,n="selectOption",o="options")=>{let r=n,i=t;if(z){i=Array.isArray(ue)?ue.slice():[];const e=i.findIndex((e=>H(t,e)));-1===e?i.push(t):"freeSolo"!==o&&(i.splice(e,1),r="removeOption")}ge(e,i,r),$e(e,i,r,{option:t}),x||e&&(e.ctrlKey||e.metaKey)||Oe(e,r),(!0===h||"touch"===h&&De.current||"mouse"===h&&!De.current)&&te.current.blur()},Le=(e,t)=>{if(!z)return;""===he&&Oe(e,"toggleInput");let n=ie;-1===ie?""===he&&"previous"===t&&(n=ue.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===ue.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===ue.length||"previous"===t&&-1===n)return-1;const e=q?"data-item-index":"data-tag-index",o=oe.querySelector(`[${e}="${n}"]`);if(o&&o.hasAttribute("tabindex")&&!o.disabled&&"true"!==o.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),se(n),ke(n)},He=e=>{Z.current=!0,pe(""),_&&_(e,"","clear"),$e(e,z?[]:null,"clear")},ze=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===ie||["ArrowLeft","ArrowRight"].includes(t.key)||(se(-1),ke(-1)),229!==t.which))switch(t.key){case"Home":xe&&$&&(t.preventDefault(),Me({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":xe&&$&&(t.preventDefault(),Me({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Me({diff:-5,direction:"previous",reason:"keyboard",event:t}),Te(t);break;case"PageDown":t.preventDefault(),Me({diff:5,direction:"next",reason:"keyboard",event:t}),Te(t);break;case"ArrowDown":t.preventDefault(),Me({diff:1,direction:"next",reason:"keyboard",event:t}),Te(t);break;case"ArrowUp":t.preventDefault(),Me({diff:-1,direction:"previous",reason:"keyboard",event:t}),Te(t);break;case"ArrowLeft":!z&&q?ke(0):Le(t,"previous");break;case"ArrowRight":!z&&q?ke(-1):Le(t,"next");break;case"Enter":if(-1!==le.current&&xe){const e=Se[le.current],n=!!I&&I(e);if(t.preventDefault(),n)return;Ne(t,e,"selectOption"),r&&te.current.setSelectionRange(te.current.value.length,te.current.value.length)}else M&&""!==he&&!1===Ce&&(z&&t.preventDefault(),Ne(t,he,"createOption","freeSolo"));break;case"Escape":xe?(t.preventDefault(),t.stopPropagation(),Oe(t,"escape")):v&&(""!==he||z&&ue.length>0||q)&&(t.preventDefault(),t.stopPropagation(),He(t));break;case"Backspace":if(z&&!U&&""===he&&ue.length>0){const e=-1===ie?ue.length-1:ie,n=ue.slice();n.splice(e,1),$e(t,n,"removeOption",{option:ue[e]})}z||!q||U||(de(null),ke(-1));break;case"Delete":if(z&&!U&&""===he&&ue.length>0&&-1!==ie){const e=ie,n=ue.slice();n.splice(e,1),$e(t,n,"removeOption",{option:ue[e]})}z||!q||U||(de(null),ke(-1))}},Fe=e=>{me(!0),G&&!Z.current&&Te(e)},je=e=>{t(ne)?te.current.focus():(me(!1),ee.current=!0,Z.current=!1,s&&-1!==le.current&&xe?Ne(e,Se[le.current],"blur"):s&&M&&""!==he?Ne(e,he,"blur","freeSolo"):b&&ge(e,ue,"blur"),Oe(e,"blur"))},Be=e=>{const t=e.target.value;he!==t&&(pe(t),we(!1),_&&_(e,t,"input")),""===t?C||z||$e(e,null,"clear"):Te(e)},_e=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));le.current!==t&&Re({event:e,index:t,reason:"mouse"})},Ve=e=>{Re({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),De.current=!0},We=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Ne(e,Se[t],"selectOption"),De.current=!1},Ge=e=>t=>{const n=ue.slice();n.splice(e,1),$e(t,n,"removeOption",{option:ue[e]})},Ke=e=>{$e(e,null,"removeOption",{option:ue})},Ue=e=>{be?Oe(e,"toggleInput"):Te(e)},qe=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==Q&&e.preventDefault()},Xe=e=>{e.currentTarget.contains(e.target)&&(te.current.focus(),X&&ee.current&&te.current.selectionEnd-te.current.selectionStart===0&&te.current.select(),ee.current=!1)},Ye=e=>{S||""!==he&&be||Ue(e)};let Qe=M&&he.length>0;Qe=Qe||(z?ue.length>0:null!==ue);let Je=Se;return O&&(new Map,Je=Se.reduce(((e,t,n)=>{const o=O(t);return e.length>0&&e[e.length-1].group===o?e[e.length-1].options.push(t):e.push({key:n,index:n,group:o,options:[t]}),e}),[])),S&&fe&&je(),{getRootProps:(e={})=>({...e,onKeyDown:ze(e),onMouseDown:qe,onClick:Xe}),getInputLabelProps:()=>({id:`${Q}-label`,htmlFor:Q}),getInputProps:()=>({id:Q,value:he,onBlur:je,onFocus:Fe,onChange:Be,onMouseDown:Ye,"aria-activedescendant":xe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ee?`${Q}-listbox`:void 0,"aria-expanded":Ee,autoComplete:"off",ref:te,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:S}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:He}),getItemProps:({index:e=0}={})=>({...z&&{key:e},...q?{"data-item-index":e}:{"data-tag-index":e},tabIndex:-1,...!U&&{onDelete:z?Ge(e):Ke}}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Ue}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!U&&{onDelete:Ge(e)}}),getListboxProps:()=>({role:"listbox",id:`${Q}-listbox`,"aria-labelledby":`${Q}-label`,ref:Pe,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{const n=(z?ue:[ue]).some((e=>null!=e&&H(t,e))),o=!!I&&I(t);return{key:P?.(t)??J(t),tabIndex:-1,role:"option",id:`${Q}-option-${e}`,onMouseMove:_e,onClick:We,onTouchStart:Ve,"data-option-index":e,"aria-disabled":o,"aria-selected":n}},id:Q,inputValue:he,value:ue,dirty:Qe,expanded:xe&&oe,popupOpen:xe,focused:fe||-1!==ie,anchorEl:oe,setAnchorEl:re,focusedItem:ie,focusedTag:ie,groupedOptions:Je}}({...n,componentName:"Autocomplete"}),ft=!Q&&!Z&&rt&&!He,mt=(!se||!0===ie)&&!1!==ie,{onMouseDown:gt}=Ye(),{ref:bt,...vt}=tt(),yt=de||(e=>e.label??e),wt={...n,disablePortal:ne,expanded:it,focused:lt,fullWidth:ae,getOptionLabel:yt,hasClearIcon:ft,hasPopupIcon:mt,inputFocused:-1===ct,popupOpen:at,size:We},Ct=(e=>{const{classes:t,disablePortal:n,expanded:o,focused:r,fullWidth:s,hasClearIcon:a,hasPopupIcon:l,inputFocused:c,popupOpen:u,size:d}=e,h={root:["root",o&&"expanded",r&&"focused",s&&"fullWidth",a&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",c&&"inputFocused"],tag:["tag",`tagSize${(0,H.A)(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,i.A)(h,$,t)})(wt),xt={slots:{paper:De,popper:Ne,...Ge},slotProps:{chip:x,listbox:we,...O,...Ke}},[St,At]=(0,z.A)("listbox",{elementType:q,externalForwardedProps:xt,ownerState:wt,className:Ct.listbox,additionalProps:vt,ref:bt}),[Et,kt]=(0,z.A)("paper",{elementType:y.A,externalForwardedProps:xt,ownerState:wt,className:Ct.paper}),[Rt,Mt]=(0,z.A)("popper",{elementType:b.A,externalForwardedProps:xt,ownerState:wt,className:Ct.popper,additionalProps:{disablePortal:ne,style:{width:ut?ut.clientWidth:null},role:"presentation",anchorEl:ut,open:at}});let It;const Pt=e=>({className:Ct.tag,disabled:Z,...et(e)});if(Be&&Se&&ot.length>0?It=Be(ot,Pt,wt):_e&&ot?It=_e(ot,Pt,wt):Se&&ot.length>0&&(It=ot.map(((e,t)=>{const{key:n,...o}=Pt({index:t});return(0,F.jsx)(C.A,{label:yt(e),size:We,...o,...xt.slotProps.chip},n)}))),ve>-1&&Array.isArray(It)){const e=It.length-ve;!lt&&e>0&&(It=It.splice(0,ve),It.push((0,F.jsx)("span",{className:Ct.tag,children:le(e)},It.length)))}const Tt=ze||(e=>(0,F.jsxs)("li",{children:[(0,F.jsx)(X,{className:Ct.groupLabel,ownerState:wt,component:"div",children:e.group}),(0,F.jsx)(Y,{className:Ct.groupUl,ownerState:wt,children:e.children})]},e.key)),Ot=je||((e,t)=>{const{key:n,...o}=e;return(0,F.jsx)("li",{...o,children:yt(t)},n)}),$t=(e,t)=>{const n=nt({option:e,index:t});return Ot({...n,className:Ct.option},e,{selected:n["aria-selected"],index:t,inputValue:ht},wt)},Dt=xt.slotProps.clearIndicator,Nt=xt.slotProps.popupIndicator;return(0,F.jsxs)(o.Fragment,{children:[(0,F.jsx)(j,{ref:t,className:(0,r.A)(Ct.root,S),ownerState:wt,...Xe(qe),children:Fe({id:st,disabled:Z,fullWidth:!0,size:"small"===We?"small":void 0,InputLabelProps:Qe(),InputProps:{ref:dt,className:Ct.inputRoot,startAdornment:It,onMouseDown:e=>{e.target===e.currentTarget&>(e)},...(ft||mt)&&{endAdornment:(0,F.jsxs)(B,{className:Ct.endAdornment,ownerState:wt,children:[ft?(0,F.jsx)(_,{...Ze(),"aria-label":I,title:I,ownerState:wt,...Dt,className:(0,r.A)(Ct.clearIndicator,Dt?.className),children:A}):null,mt?(0,F.jsx)(V,{...Je(),disabled:Z,"aria-label":at?T:Oe,title:at?T:Oe,ownerState:wt,...Nt,className:(0,r.A)(Ct.popupIndicator,Nt?.className),children:Le}):null]})}},inputProps:{className:Ct.input,disabled:Z,readOnly:He,...Ye()}})}),ut?(0,F.jsx)(W,{as:Rt,...Mt,children:(0,F.jsxs)(G,{as:Et,...kt,children:[Ce&&0===pt.length?(0,F.jsx)(K,{className:Ct.loading,ownerState:wt,children:xe}):null,0!==pt.length||se||Ce?null:(0,F.jsx)(U,{className:Ct.noOptions,ownerState:wt,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:Ae}),pt.length>0?(0,F.jsx)(St,{as:ye,...At,children:pt.map(((e,t)=>pe?Tt({key:e.key,group:e.group,children:e.options.map(((t,n)=>$t(t,e.index+n)))}):$t(e,t)))}):null]})}):null]})}))},16082:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);const r=e=>{const t=o.useRef({});return o.useEffect((()=>{t.current=e})),t.current}},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})},16620:(e,t,n)=>{"use strict";n.d(t,{I:()=>f});var o=n(58168),r=n(98587),i=n(96540),s=n(24902),a=n(91092),l=n(51280),c=n(25054),u=n(77866),d=n(27961),h=n(74848);const p=["render","onKeyDown","onFocus","disabled","aria-disabled"],f=(0,l.R)((function(e,t){const{render:n,onKeyDown:l,onFocus:f,disabled:m,"aria-disabled":g}=e,b=(0,r.A)(e,p),v=(0,a.A)(),y=(0,u.A)(),w=i.useRef(null),C=(0,s.A)(w,t),{focusableItemId:x,registerItem:S,unregisterItem:A,onItemKeyDown:E,onItemFocus:k,onItemDisabled:R}=(0,d.w)();i.useEffect((()=>(S(v,w),()=>A(v))),[]);const M=i.useRef(m);i.useEffect((()=>{M.current!==m&&!0===m&&R(v,m),M.current=m}),[m,v,R]);const I=i.useRef(g);i.useEffect((()=>{I.current!==g&&!0===g&&R(v,!0),I.current=g}),[g,v,R]);const P=(0,c._)(y.slots.baseIconButton,n,(0,o.A)({},y.slotProps?.baseIconButton,{tabIndex:x===v?0:-1},b,{disabled:m,"aria-disabled":g,onKeyDown:e=>{E(e),l?.(e)},onFocus:e=>{k(v),f?.(e)},ref:C}));return(0,h.jsx)(i.Fragment,{children:P})}))},17241:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(96540).createContext(null)},17437:(e,t,n)=>{"use strict";n.d(t,{AH:()=>h,i7:()=>p,mL:()=>d});var o,r,i=n(24684),s=n(96540),a=n(30041),l=n(71287),c=n(43174),u=(n(55655),n(4146),function(e,t){var n=arguments;if(null==t||!i.h.call(t,"css"))return s.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=i.E,r[1]=(0,i.c)(e,t);for(var a=2;a<o;a++)r[a]=n[a];return s.createElement.apply(null,r)});o=u||(u={}),r||(r=o.JSX||(o.JSX={}));var d=(0,i.w)((function(e,t){var n=e.styles,o=(0,c.J)([n],void 0,s.useContext(i.T)),r=s.useRef();return(0,l.i)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,s=document.querySelector('style[data-emotion="'+e+" "+o.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==s&&(i=!0,s.setAttribute("data-emotion",e),n.hydrate([s])),r.current=[n,i],function(){n.flush()}}),[t]),(0,l.i)((function(){var e=r.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==o.next&&(0,a.sk)(t,o.next,!0),n.tags.length){var i=n.tags[n.tags.length-1].nextElementSibling;n.before=i,n.flush()}t.insert("",o,n,!1)}}),[t,o.name]),null}));function h(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,c.J)(t)}function p(){var e=h.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},17726:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);function r(e){return parseInt(o.version,10)>=19?e?.props?.ref||null:e?.ref||null}},17862:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var o=n(96540),r=n(34164),i=n(21362),s=n(82777),a=n(9792),l=n(74848);const c=(0,a.A)((0,l.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 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 12 17 15.59z"}),"Cancel");var u=n(30301),d=n(39407),h=n(38329),p=n(26739),f=n(39241),m=n(1321),g=n(20439),b=n(96148),v=n(1908);function y(e){return(0,v.Ay)("MuiChip",e)}const w=(0,b.A)("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),C=(0,p.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:o,iconColor:r,clickable:i,onDelete:s,size:a,variant:l}=n;return[{[`& .${w.avatar}`]:t.avatar},{[`& .${w.avatar}`]:t[`avatar${(0,d.A)(a)}`]},{[`& .${w.avatar}`]:t[`avatarColor${(0,d.A)(o)}`]},{[`& .${w.icon}`]:t.icon},{[`& .${w.icon}`]:t[`icon${(0,d.A)(a)}`]},{[`& .${w.icon}`]:t[`iconColor${(0,d.A)(r)}`]},{[`& .${w.deleteIcon}`]:t.deleteIcon},{[`& .${w.deleteIcon}`]:t[`deleteIcon${(0,d.A)(a)}`]},{[`& .${w.deleteIcon}`]:t[`deleteIconColor${(0,d.A)(o)}`]},{[`& .${w.deleteIcon}`]:t[`deleteIcon${(0,d.A)(l)}Color${(0,d.A)(o)}`]},t.root,t[`size${(0,d.A)(a)}`],t[`color${(0,d.A)(o)}`],i&&t.clickable,i&&"default"!==o&&t[`clickableColor${(0,d.A)(o)})`],s&&t.deletable,s&&"default"!==o&&t[`deletableColor${(0,d.A)(o)}`],t[l],t[`${l}${(0,d.A)(o)}`]]}})((0,f.A)((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${w.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${w.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${w.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${w.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${w.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${w.icon}`]:{marginLeft:5,marginRight:-6},[`& .${w.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,s.X4)(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,s.X4)(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${w.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${w.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter((0,m.A)(["contrastText"])).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${w.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t].contrastTextChannel} / 0.7)`:(0,s.X4)(e.palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}}))),{props:e=>e.iconColor===e.color,style:{[`& .${w.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${w.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter((0,m.A)(["dark"])).map((([t])=>({props:{color:t,onDelete:!0},style:{[`&.${w.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}}))),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter((0,m.A)(["dark"])).map((([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${w.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}}))),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${w.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${w.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${w.avatar}`]:{marginLeft:4},[`& .${w.avatarSmall}`]:{marginLeft:2},[`& .${w.icon}`]:{marginLeft:4},[`& .${w.iconSmall}`]:{marginLeft:2},[`& .${w.deleteIcon}`]:{marginRight:5},[`& .${w.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter((0,m.A)()).map((([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.7)`:(0,s.X4)(e.palette[t].main,.7)}`,[`&.${w.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(e.palette[t].main,e.palette.action.hoverOpacity)},[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,s.X4)(e.palette[t].main,e.palette.action.focusOpacity)},[`& .${w.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.7)`:(0,s.X4)(e.palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}})))]}}))),x=(0,p.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:o}=n;return[t.label,t[`label${(0,d.A)(o)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function S(e){return"Backspace"===e.key||"Delete"===e.key}const A=o.forwardRef((function(e,t){const n=(0,g.b)({props:e,name:"MuiChip"}),{avatar:s,className:a,clickable:p,color:f="default",component:m,deleteIcon:b,disabled:v=!1,icon:w,label:A,onClick:E,onDelete:k,onKeyDown:R,onKeyUp:M,size:I="medium",variant:P="filled",tabIndex:T,skipFocusWhenDisabled:O=!1,...$}=n,D=o.useRef(null),N=(0,u.A)(D,t),L=e=>{e.stopPropagation(),k&&k(e)},H=!(!1===p||!E)||p,z=H||k?h.A:m||"div",F={...n,component:z,disabled:v,size:I,color:f,iconColor:o.isValidElement(w)&&w.props.color||f,onDelete:!!k,clickable:H,variant:P},j=(e=>{const{classes:t,disabled:n,size:o,color:r,iconColor:s,onDelete:a,clickable:l,variant:c}=e,u={root:["root",c,n&&"disabled",`size${(0,d.A)(o)}`,`color${(0,d.A)(r)}`,l&&"clickable",l&&`clickableColor${(0,d.A)(r)}`,a&&"deletable",a&&`deletableColor${(0,d.A)(r)}`,`${c}${(0,d.A)(r)}`],label:["label",`label${(0,d.A)(o)}`],avatar:["avatar",`avatar${(0,d.A)(o)}`,`avatarColor${(0,d.A)(r)}`],icon:["icon",`icon${(0,d.A)(o)}`,`iconColor${(0,d.A)(s)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,d.A)(o)}`,`deleteIconColor${(0,d.A)(r)}`,`deleteIcon${(0,d.A)(c)}Color${(0,d.A)(r)}`]};return(0,i.A)(u,y,t)})(F),B=z===h.A?{component:m||"div",focusVisibleClassName:j.focusVisible,...k&&{disableRipple:!0}}:{};let _=null;k&&(_=b&&o.isValidElement(b)?o.cloneElement(b,{className:(0,r.A)(b.props.className,j.deleteIcon),onClick:L}):(0,l.jsx)(c,{className:j.deleteIcon,onClick:L}));let V=null;s&&o.isValidElement(s)&&(V=o.cloneElement(s,{className:(0,r.A)(j.avatar,s.props.className)}));let W=null;return w&&o.isValidElement(w)&&(W=o.cloneElement(w,{className:(0,r.A)(j.icon,w.props.className)})),(0,l.jsxs)(C,{as:z,className:(0,r.A)(j.root,a),disabled:!(!H||!v)||void 0,onClick:E,onKeyDown:e=>{e.currentTarget===e.target&&S(e)&&e.preventDefault(),R&&R(e)},onKeyUp:e=>{e.currentTarget===e.target&&k&&S(e)&&k(e),M&&M(e)},ref:N,tabIndex:O&&v?-1:T,ownerState:F,...B,...$,children:[V||W,(0,l.jsx)(x,{className:j.label,ownerState:F,children:A}),_]})}))},18139:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(49649);function r(e){const{variants:t,...n}=e,r={variants:t,style:(0,o.tT)(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=(0,o.tT)(e.style))})),r}},18877:(e,t,n)=>{"use strict";n.d(t,{_n:()=>i,rJ:()=>s});var o=n(96540);function r(){}n(68210);const i=o.createContext({}),s=()=>{const e=()=>{};return e.deprecated=r,e}},19268:(e,t,n)=>{"use strict";n.d(t,{P:()=>i,y:()=>r});var o=n(96540);const r=o.createContext({classes:{},slots:{},slotProps:{}}),i=()=>o.useContext(r)},19750:(e,t,n)=>{"use strict";function o(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if("components"===i||"slots"===i)n[i]={...e[i],...n[i]};else if("componentsProps"===i||"slotProps"===i){const r=e[i],s=t[i];if(s)if(r){n[i]={...s};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[i][t]=o(r[t],s[t])}}else n[i]=s;else n[i]=r||{}}else void 0===n[i]&&(n[i]=e[i])}return n}n.d(t,{A:()=>o})},19888:(e,t,n)=>{"use strict";e.exports=n(58493)},20439:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var o=n(96540),r=n(19750);n(74848);const i=o.createContext(void 0);function s(e){return function({props:e,name:t}){return function(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n])return o;const i=t.components[n];return i.defaultProps?(0,r.A)(i.defaultProps,o):i.styleOverrides||i.variants?o:(0,r.A)(i,o)}({props:e,name:t,theme:{components:o.useContext(i)}})}(e)}},20488:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,h:()=>h});var o=n(82284),r=n(89379),i=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,i.A)(e):(0,r.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 r=u(t[0]);return t.forEach((function(e){!function t(n,s){var l,h=new Set(s),p=(0,a.A)(e,n),f=Array.isArray(p);if(f||(l=p,"object"===(0,o.A)(l)&&null!==l&&Object.getPrototypeOf(l)===Object.prototype)){if(!h.has(p)){h.add(p);var m=(0,a.A)(r,n);f?r=c(r,n,[]):m&&"object"===(0,o.A)(m)||(r=c(r,n,u(p))),d(p).forEach((function(e){t([].concat((0,i.A)(n),[e]),h)}))}}else r=c(r,n,p)}([])})),r}},20816:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(82284);function r(e){var t=function(e){if("object"!=(0,o.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=(0,o.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,o.A)(t)?t:t+""}},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:()=>i});var o=n(46343),r=n(14921);function i({props:e,name:t,defaultTheme:n,themeId:i}){let s=(0,r.A)(n);return i&&(s=s[i]||s),(0,o.A)({theme:s,name:t,props:e})}},21234:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a,p0:()=>r});const o={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},r={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function i(e){return`${Math.round(e)}ms`}function s(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function a(e){const t={...o,...e.easing},n={...r,...e.duration};return{getAutoHeightDuration:s,create:(e=["all"],o={})=>{const{duration:r=n.standard,easing:s=t.easeInOut,delay:a=0,...l}=o;return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof r?r:i(r)} ${s} ${"string"==typeof a?a:i(a)}`)).join(",")},...e,easing:t,duration:n}}},21362:(e,t,n)=>{"use strict";function o(e,t,n=void 0){const o={};for(const r in e){const i=e[r];let s="",a=!0;for(let e=0;e<i.length;e+=1){const o=i[e];o&&(s+=(!0===a?"":" ")+t(o),a=!1,n&&n[o]&&(s+=" "+n[o]))}o[r]=s}return o}n.d(t,{A:()=>o})},21942:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,t:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiDialogTitle",e)}const s=(0,o.A)("MuiDialogTitle",["root"])},22730:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var o=n(96540),r=n(34164),i=n(21362),s=n(26739),a=n(39241),l=n(20439),c=n(39407),u=n(96148),d=n(1908);function h(e){return(0,d.Ay)("MuiListSubheader",e)}(0,u.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var p=n(74848);const f=(0,s.Ay)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,c.A)(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((0,a.A)((({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]})))),m=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiListSubheader"}),{className:o,color:s="default",component:a="li",disableGutters:u=!1,disableSticky:d=!1,inset:m=!1,...g}=n,b={...n,color:s,component:a,disableGutters:u,disableSticky:d,inset:m},v=(e=>{const{classes:t,color:n,disableGutters:o,inset:r,disableSticky:s}=e,a={root:["root","default"!==n&&`color${(0,c.A)(n)}`,!o&&"gutters",r&&"inset",!s&&"sticky"]};return(0,i.A)(a,h,t)})(b);return(0,p.jsx)(f,{as:a,className:(0,r.A)(v.root,o),ref:t,ownerState:b,...g})}));m&&(m.muiSkipListHighlight=!0);const g=m},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)}},24337:(e,t,n)=>{"use strict";n.d(t,{c:()=>r,q:()=>o});const o=e=>e.scrollTop;function r(e,t){const{timeout:n,easing:o,style:r={}}=e;return{duration:r.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:r.transitionTimingFunction??("object"==typeof o?o[t.mode]:o),delay:r.transitionDelay}}},24349:(e,t,n)=>{"use strict";n.d(t,{$2:()=>v,A6:()=>m,Dl:()=>s,H0:()=>i,Mz:()=>p,O8:()=>a,OQ:()=>y,Qu:()=>u,V2:()=>f,Y1:()=>h,Zy:()=>g,qj:()=>c,r:()=>d,rI:()=>l});var o=n(92661);const r=(0,o.gz)((e=>e.rows)),i=(0,o.Mz)(r,(e=>e.totalRowCount)),s=(0,o.Mz)(r,(e=>e.loading)),a=(0,o.Mz)(r,(e=>e.totalTopLevelRowCount)),l=(0,o.Mz)(r,(e=>e.dataRowIdToModelLookup)),c=((0,o.Mz)(l,((e,t)=>e[t])),(0,o.Mz)(r,(e=>e.tree))),u=(0,o.Mz)(c,((e,t)=>e[t])),d=(0,o.Mz)(r,(e=>e.groupsToFetch)),h=(0,o.Mz)(r,(e=>e.groupingName)),p=(0,o.Mz)(r,(e=>e.treeDepths)),f=(0,o.S)(r,(e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:(t.filter((([,e])=>e>0)).map((([e])=>Number(e))).sort(((e,t)=>t-e))[0]??0)+1})),m=(0,o.Mz)(r,(e=>e.dataRowIds)),g=(0,o.S)(m,l,((e,t)=>e.reduce(((e,n)=>t[n]?(e.push(t[n]),e):e),[]))),b=(0,o.Mz)(r,(e=>e?.additionalRowGroups)),v=(0,o.S)(b,(e=>{const t=e?.pinnedRows;return{bottom:t?.bottom?.map((e=>({id:e.id,model:e.model??{}})))??[],top:t?.top?.map((e=>({id:e.id,model:e.model??{}})))??[]}})),y=(0,o.Mz)(v,(e=>(e?.top?.length||0)+(e?.bottom?.length||0)))},24566:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,K:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiDivider",e)}const s=(0,o.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},24684:(e,t,n)=>{"use strict";n.d(t,{E:()=>m,T:()=>u,c:()=>p,h:()=>d,w:()=>c});var o=n(96540),r=n(55655),i=n(30041),s=n(43174),a=n(71287),l=o.createContext("undefined"!=typeof HTMLElement?(0,r.A)({key:"css"}):null),c=(l.Provider,function(e){return(0,o.forwardRef)((function(t,n){var r=(0,o.useContext)(l);return e(t,r,n)}))}),u=o.createContext({}),d={}.hasOwnProperty,h="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",p=function(e,t){var n={};for(var o in t)d.call(t,o)&&(n[o]=t[o]);return n[h]=e,n},f=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return(0,i.SF)(t,n,o),(0,a.s)((function(){return(0,i.sk)(t,n,o)})),null},m=c((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var a=e[h],l=[r],c="";"string"==typeof e.className?c=(0,i.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var p=(0,s.J)(l,void 0,o.useContext(u));c+=t.key+"-"+p.name;var m={};for(var g in e)d.call(e,g)&&"css"!==g&&g!==h&&(m[g]=e[g]);return m.className=c,n&&(m.ref=n),o.createElement(o.Fragment,null,o.createElement(f,{cache:t,serialized:p,isStringTag:"string"==typeof a}),o.createElement(a,m))}))},24890:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,v:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiOutlinedInput",e)}const s={...n(26410).A,...(0,o.A)("MuiOutlinedInput",["root","notchedOutline","input"])}},24902:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);function r(...e){const t=o.useRef(void 0),n=o.useCallback((t=>{const n=e.map((e=>{if(null==e)return null;if("function"==typeof e){const n=e,o=n(t);return"function"==typeof o?o:()=>{n(null)}}return e.current=t,()=>{e.current=null}}));return()=>{n.forEach((e=>e?.()))}}),e);return o.useMemo((()=>e.every((e=>null==e))?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))}),e)}},24994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},25054:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var o=n(58168),r=n(96540);function i(e,t,n,i={}){return"function"==typeof t?t(n,i):t?(t.props.className&&(n.className=(l=t.props.className,c=n.className,l&&c?`${l} ${c}`:l||c)),(t.props.style||n.style)&&(n.style=(0,o.A)({},n.style,t.props.style)),(t.props.sx||n.sx)&&(n.sx=(s=n.sx,a=t.props.sx,s&&a?(Array.isArray(s)?s:[s]).concat(Array.isArray(a)?a:[a]):s||a)),r.cloneElement(t,n)):r.createElement(e,n);var s,a,l,c}},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)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(o=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var i=0,s=new Map;function a(e){s.delete(e)}var l=function(e){var t=i+=1;return function n(r){if(0===r)a(t),e();else{var i=o((function(){n(r-1)}));s.set(t,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};l.cancel=function(e){var t=s.get(e);return a(e),r(t)};const c=l},25418:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var o=n(96540),r=n(34164),i=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 f=(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}}}]})))),m=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,i.A)(o,d,t)})(c);return(0,p.jsx)(f,{className:(0,r.A)(u.root,o),ownerState:c,ref:t,...a})}))},25508:(e,t,n)=>{"use strict";n.d(t,{Ad:()=>c,i5:()=>s});var o=Symbol("NOT_FOUND");var r=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var i=(e,t)=>e===t;function s(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=i,maxSize:s=1,resultEqualityCheck:a}=n,l=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:o}=t;for(let r=0;r<o;r++)if(!e(t[r],n[r]))return!1;return!0}}(r);let c=0;const u=s<=1?function(e){let t;return{get:n=>t&&e(t.key,n)?t.value:o,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(l):function(e,t){let n=[];function r(e){const r=n.findIndex((n=>t(e,n.key)));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return o}return{get:r,put:function(t,i){r(t)===o&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(s,l);function d(){let t=u.get(arguments);if(t===o){if(t=e.apply(null,arguments),c++,a){const e=u.getEntries().find((e=>a(e.value,t)));e&&(t=e.value,0!==c&&c--)}u.put(arguments,t)}return t}return d.clearCache=()=>{u.clear(),d.resetResultsCount()},d.resultsCount=()=>c,d.resetResultsCount=()=>{c=0},d}var a="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function l(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:o}=t;let r,i=0;function s(){let t=n;const{length:s}=arguments;for(let e=0,n=s;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const o=e.get(n);void 0===o?(t={s:0,v:void 0,o:null,p:null},e.set(n,t)):t=o}else{let e=t.p;null===e&&(t.p=e=new Map);const o=e.get(n);void 0===o?(t={s:0,v:void 0,o:null,p:null},e.set(n,t)):t=o}}const l=t;let c;if(1===t.s)c=t.v;else if(c=e.apply(null,arguments),i++,o){const e=r?.deref?.()??r;null!=e&&o(e,c)&&(c=e,0!==i&&i--),r="object"==typeof c&&null!==c||"function"==typeof c?new a(c):c}return l.s=1,l.v=c,c}return s.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function c(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,o=(...e)=>{let t,o=0,i=0,s={},a=e.pop();"object"==typeof a&&(s=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const c={...n,...s},{memoize:u,memoizeOptions:d=[],argsMemoize:h=l,argsMemoizeOptions:p=[],devModeChecks:f={}}=c,m=r(d),g=r(p),b=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),v=u((function(){return o++,a.apply(null,arguments)}),...m),y=h((function(){i++;const e=function(e,t){const n=[],{length:o}=e;for(let r=0;r<o;r++)n.push(e[r].apply(null,t));return n}(b,arguments);return t=v.apply(null,e),t}),...g);return Object.assign(y,{resultFunc:a,memoizedResultFunc:v,dependencies:b,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>t,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:u,argsMemoize:h})};return Object.assign(o,{withTypes:()=>o}),o}var u=c(l),d=Object.assign(((e,t=u)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,o)=>(e[n[o]]=t,e)),{})))}),{withTypes:()=>d})},25905:(e,t,n)=>{"use strict";n.d(t,{K8:()=>d,L9:()=>r,Nk:()=>s,Y1:()=>p,av:()=>l,dF:()=>i,jk:()=>u,jz:()=>h,t6:()=>a,vj:()=>c});var o=n(77132);const r={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},i=(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 r=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:r,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let a={};return!1!==o&&(a={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},a),s),{[r]: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}})},26410:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,g:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiInputBase",e)}const s=(0,o.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},26630:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);const r=parseInt(o.version,10)},26739:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a});var o=n(63248),r=n(4894),i=n(31355),s=n(98855);const a=(0,o.Ay)({themeId:i.A,defaultTheme:r.A,rootShouldForwardProp:s.A})},26773:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var o=n(96540),r=n(34164),i=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 f=(0,d.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var m=n(58503),g=n(30016),b=n(26739),v=n(53356),y=n(39241),w=n(20439),C=n(85078),x=n(74848);const S=(0,b.Ay)(g.A,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),A=(0,b.Ay)(l.A,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),E=(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,y.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)`,[`&.${f.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}`,[`&.${f.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,[`&.${f.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]})))),R=o.forwardRef((function(e,t){const n=(0,w.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":f,"aria-modal":g=!0,BackdropComponent:b,BackdropProps:y,children:R,className:M,disableEscapeKeyDown:I=!1,fullScreen:P=!1,fullWidth:T=!1,maxWidth:O="sm",onClick:$,onClose:D,open:N,PaperComponent:L=u.A,PaperProps:H={},scroll:z="paper",slots:F={},slotProps:j={},TransitionComponent:B=c.A,transitionDuration:_=d,TransitionProps:V,...W}=n,G={...n,disableEscapeKeyDown:I,fullScreen:P,fullWidth:T,maxWidth:O,scroll:z},K=(e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:r,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))}`,r&&"paperFullWidth",s&&"paperFullScreen"]};return(0,i.A)(l,p,t)})(G),U=o.useRef(),q=(0,s.A)(f),X=o.useMemo((()=>({titleId:q})),[q]),Y={slots:{transition:B,...F},slotProps:{transition:V,paper:H,backdrop:y,...j}},[Q,J]=(0,C.A)("root",{elementType:A,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:G,className:(0,r.A)(K.root,M),ref:t}),[Z,ee]=(0,C.A)("backdrop",{elementType:S,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:G}),[te,ne]=(0,C.A)("paper",{elementType:k,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:G,className:(0,r.A)(K.paper,H.className)}),[oe,re]=(0,C.A)("container",{elementType:E,externalForwardedProps:Y,ownerState:G,className:K.container}),[ie,se]=(0,C.A)("transition",{elementType:c.A,externalForwardedProps:Y,ownerState:G,additionalProps:{appear:!0,in:N,timeout:_,role:"presentation"}});return(0,x.jsx)(Q,{closeAfterTransition:!0,slots:{backdrop:Z},slotProps:{backdrop:{transitionDuration:_,as:b,...ee}},disableEscapeKeyDown:I,onClose:D,open:N,onClick:e=>{$&&$(e),U.current&&(U.current=null,D&&D(e,"backdropClick"))},...J,...W,children:(0,x.jsx)(ie,{...se,children:(0,x.jsx)(oe,{onMouseDown:e=>{U.current=e.target===e.currentTarget},...re,children:(0,x.jsx)(te,{as:L,elevation:24,role:"dialog","aria-describedby":h,"aria-labelledby":q,"aria-modal":g,...ne,children:(0,x.jsx)(m.A.Provider,{value:X,children:R})})})})})}))},26956:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);function r(e){var t=o.useRef();t.current=e;var n=o.useCallback((function(){for(var e,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(o))}),[]);return n}},27519:(e,t,n)=>{"use strict";n.d(t,{A:()=>Pe});var o=n(411),r=n(96540),i=n(10644),s=n(3576),a=n(24902);function l(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function c(e){return e instanceof l(e).Element||e instanceof Element}function u(e){return e instanceof l(e).HTMLElement||e instanceof HTMLElement}function d(e){return"undefined"!=typeof ShadowRoot&&(e instanceof l(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,p=Math.min,f=Math.round;function m(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function g(){return!/^((?!chrome|android).)*safari/i.test(m())}function b(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&u(e)&&(r=e.offsetWidth>0&&f(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&f(o.height)/e.offsetHeight||1);var s=(c(e)?l(e):window).visualViewport,a=!g()&&n,d=(o.left+(a&&s?s.offsetLeft:0))/r,h=(o.top+(a&&s?s.offsetTop:0))/i,p=o.width/r,m=o.height/i;return{width:p,height:m,top:h,right:d+p,bottom:h+m,left:d,x:d,y:h}}function v(e){var t=l(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function y(e){return e?(e.nodeName||"").toLowerCase():null}function w(e){return((c(e)?e.ownerDocument:e.document)||window.document).documentElement}function C(e){return b(w(e)).left+v(e).scrollLeft}function x(e){return l(e).getComputedStyle(e)}function S(e){var t=x(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function A(e,t,n){void 0===n&&(n=!1);var o,r,i=u(t),s=u(t)&&function(e){var t=e.getBoundingClientRect(),n=f(t.width)/e.offsetWidth||1,o=f(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),a=w(t),c=b(e,s,n),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(i||!i&&!n)&&(("body"!==y(t)||S(a))&&(d=(o=t)!==l(o)&&u(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:v(o)),u(t)?((h=b(t,!0)).x+=t.clientLeft,h.y+=t.clientTop):a&&(h.x=C(a))),{x:c.left+d.scrollLeft-h.x,y:c.top+d.scrollTop-h.y,width:c.width,height:c.height}}function E(e){var t=b(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function k(e){return"html"===y(e)?e:e.assignedSlot||e.parentNode||(d(e)?e.host:null)||w(e)}function R(e){return["html","body","#document"].indexOf(y(e))>=0?e.ownerDocument.body:u(e)&&S(e)?e:R(k(e))}function M(e,t){var n;void 0===t&&(t=[]);var o=R(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=l(o),s=r?[i].concat(i.visualViewport||[],S(o)?o:[]):o,a=t.concat(s);return r?a:a.concat(M(k(s)))}function I(e){return["table","td","th"].indexOf(y(e))>=0}function P(e){return u(e)&&"fixed"!==x(e).position?e.offsetParent:null}function T(e){for(var t=l(e),n=P(e);n&&I(n)&&"static"===x(n).position;)n=P(n);return n&&("html"===y(n)||"body"===y(n)&&"static"===x(n).position)?t:n||function(e){var t=/firefox/i.test(m());if(/Trident/i.test(m())&&u(e)&&"fixed"===x(e).position)return null;var n=k(e);for(d(n)&&(n=n.host);u(n)&&["html","body"].indexOf(y(n))<0;){var o=x(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",$="bottom",D="right",N="left",L="auto",H=[O,$,D,N],z="start",F="end",j="viewport",B="popper",_=H.reduce((function(e,t){return e.concat([t+"-"+z,t+"-"+F])}),[]),V=[].concat(H,[L]).reduce((function(e,t){return e.concat([t,t+"-"+z,t+"-"+F])}),[]),W=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function G(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),o}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function q(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?K:r;return function(e,t,n){void 0===n&&(n=i);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,d={state:a,setOptions:function(n){var r="function"==typeof n?n(a.options):n;h(),a.options=Object.assign({},i,a.options,r),a.scrollParents={reference:c(e)?M(e):e.contextElement?M(e.contextElement):[],popper:M(t)};var s,u,p=function(e){var t=G(e);return W.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,a.options.modifiers),u=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(u).map((function(e){return u[e]}))));return a.orderedModifiers=p.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var i=r({state:a,name:t,instance:d,options:o});l.push(i||function(){})}})),d.update()},forceUpdate:function(){if(!u){var e=a.elements,t=e.reference,n=e.popper;if(U(t,n)){a.rects={reference:A(t,T(n),"fixed"===a.options.strategy),popper:E(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<a.orderedModifiers.length;o++)if(!0!==a.reset){var r=a.orderedModifiers[o],i=r.fn,s=r.options,l=void 0===s?{}:s,c=r.name;"function"==typeof i&&(a=i({state:a,options:l,name:c,instance:d})||a)}else a.reset=!1,o=-1}}},update:(r=function(){return new Promise((function(e){d.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(r())}))}))),s}),destroy:function(){h(),u=!0}};if(!U(e,t))return d;function h(){l.forEach((function(e){return e()})),l=[]}return d.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),d}}var X={passive:!0};function Y(e){return e.split("-")[0]}function Q(e){return e.split("-")[1]}function J(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Z(e){var t,n=e.reference,o=e.element,r=e.placement,i=r?Y(r):null,s=r?Q(r):null,a=n.x+n.width/2-o.width/2,l=n.y+n.height/2-o.height/2;switch(i){case O:t={x:a,y:n.y-o.height};break;case $:t={x:a,y:n.y+n.height};break;case D:t={x:n.x+n.width,y:l};break;case N:t={x:n.x-o.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?J(i):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case z:t[c]=t[c]-(n[u]/2-o[u]/2);break;case F:t[c]=t[c]+(n[u]/2-o[u]/2)}}return t}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,s=e.offsets,a=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=s.x,m=void 0===p?0:p,g=s.y,b=void 0===g?0:g,v="function"==typeof d?d({x:m,y:b}):{x:m,y:b};m=v.x,b=v.y;var y=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),S=N,A=O,E=window;if(u){var k=T(n),R="clientHeight",M="clientWidth";k===l(n)&&"static"!==x(k=w(n)).position&&"absolute"===a&&(R="scrollHeight",M="scrollWidth"),(r===O||(r===N||r===D)&&i===F)&&(A=$,b-=(h&&k===E&&E.visualViewport?E.visualViewport.height:k[R])-o.height,b*=c?1:-1),r!==N&&(r!==O&&r!==$||i!==F)||(S=D,m-=(h&&k===E&&E.visualViewport?E.visualViewport.width:k[M])-o.width,m*=c?1:-1)}var I,P=Object.assign({position:a},u&&ee),L=!0===d?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:f(n*r)/r||0,y:f(o*r)/r||0}}({x:m,y:b},l(n)):{x:m,y:b};return m=L.x,b=L.y,c?Object.assign({},P,((I={})[A]=C?"0":"",I[S]=y?"0":"",I.transform=(E.devicePixelRatio||1)<=1?"translate("+m+"px, "+b+"px)":"translate3d("+m+"px, "+b+"px, 0)",I)):Object.assign({},P,((t={})[A]=C?b+"px":"",t[S]=y?m+"px":"",t.transform="",t))}var ne={left:"right",right:"left",bottom:"top",top:"bottom"};function oe(e){return e.replace(/left|right|bottom|top/g,(function(e){return ne[e]}))}var re={start:"end",end:"start"};function ie(e){return e.replace(/start|end/g,(function(e){return re[e]}))}function se(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&d(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function ae(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function le(e,t,n){return t===j?ae(function(e,t){var n=l(e),o=w(e),r=n.visualViewport,i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;var u=g();(u||!u&&"fixed"===t)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:s,x:a+C(e),y:c}}(e,n)):c(t)?function(e,t){var n=b(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ae(function(e){var t,n=w(e),o=v(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=h(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=h(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-o.scrollLeft+C(e),l=-o.scrollTop;return"rtl"===x(r||n).direction&&(a+=h(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(w(e)))}function ce(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ue(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function de(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=void 0===o?e.placement:o,i=n.strategy,s=void 0===i?e.strategy:i,a=n.boundary,l=void 0===a?"clippingParents":a,d=n.rootBoundary,f=void 0===d?j:d,m=n.elementContext,g=void 0===m?B:m,v=n.altBoundary,C=void 0!==v&&v,S=n.padding,A=void 0===S?0:S,E=ce("number"!=typeof A?A:ue(A,H)),R=g===B?"reference":B,I=e.rects.popper,P=e.elements[C?R:g],N=function(e,t,n,o){var r="clippingParents"===t?function(e){var t=M(k(e)),n=["absolute","fixed"].indexOf(x(e).position)>=0&&u(e)?T(e):e;return c(n)?t.filter((function(e){return c(e)&&se(e,n)&&"body"!==y(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),s=i[0],a=i.reduce((function(t,n){var r=le(e,n,o);return t.top=h(r.top,t.top),t.right=p(r.right,t.right),t.bottom=p(r.bottom,t.bottom),t.left=h(r.left,t.left),t}),le(e,s,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(c(P)?P:P.contextElement||w(e.elements.popper),l,f,s),L=b(e.elements.reference),z=Z({reference:L,element:I,strategy:"absolute",placement:r}),F=ae(Object.assign({},I,z)),_=g===B?F:L,V={top:N.top-_.top+E.top,bottom:_.bottom-N.bottom+E.bottom,left:N.left-_.left+E.left,right:_.right-N.right+E.right},W=e.modifiersData.offset;if(g===B&&W){var G=W[r];Object.keys(V).forEach((function(e){var t=[D,$].indexOf(e)>=0?1:-1,n=[O,$].indexOf(e)>=0?"y":"x";V[e]+=G[n]*t}))}return V}function he(e,t,n){return h(e,p(t,n))}function pe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function fe(e){return[O,D,$,N].some((function(t){return e[t]>=0}))}var me=q({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,s=o.resize,a=void 0===s||s,c=l(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(e){e.addEventListener("scroll",n.update,X)})),a&&c.addEventListener("resize",n.update,X),function(){i&&u.forEach((function(e){e.removeEventListener("scroll",n.update,X)})),a&&c.removeEventListener("resize",n.update,X)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,l=void 0===a||a,c={placement:Y(t.placement),variation:Q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];u(r)&&y(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});u(o)&&y(o)&&(Object.assign(o.style,i),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=void 0===r?[0,0]:r,s=V.reduce((function(e,n){return e[n]=function(e,t,n){var o=Y(e),r=[N,O].indexOf(o)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*r,[N,D].indexOf(o)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,i),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=void 0===r||r,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,b=Y(g),v=l||(b!==g&&f?function(e){if(Y(e)===L)return[];var t=oe(e);return[ie(e),t,ie(t)]}(g):[oe(g)]),y=[g].concat(v).reduce((function(e,n){return e.concat(Y(n)===L?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?V:l,u=Q(o),d=u?a?_:_.filter((function(e){return Q(e)===u})):H,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=de(e,{placement:n,boundary:r,rootBoundary:i,padding:s})[Y(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,C=t.rects.popper,x=new Map,S=!0,A=y[0],E=0;E<y.length;E++){var k=y[E],R=Y(k),M=Q(k)===z,I=[O,$].indexOf(R)>=0,P=I?"width":"height",T=de(t,{placement:k,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),F=I?M?D:N:M?$:O;w[P]>C[P]&&(F=oe(F));var j=oe(F),B=[];if(i&&B.push(T[R]<=0),a&&B.push(T[F]<=0,T[j]<=0),B.every((function(e){return e}))){A=k,S=!1;break}x.set(k,B)}if(S)for(var W=function(e){var t=y.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return A=t,"break"},G=f?3:1;G>0&&"break"!==W(G);G--);t.placement!==A&&(t.modifiersData[o]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=void 0===r||r,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,m=void 0===f||f,g=n.tetherOffset,b=void 0===g?0:g,v=de(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=Y(t.placement),w=Q(t.placement),C=!w,x=J(y),S="x"===x?"y":"x",A=t.modifiersData.popperOffsets,k=t.rects.reference,R=t.rects.popper,M="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,I="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(A){if(i){var H,F="y"===x?O:N,j="y"===x?$:D,B="y"===x?"height":"width",_=A[x],V=_+v[F],W=_-v[j],G=m?-R[B]/2:0,K=w===z?k[B]:R[B],U=w===z?-R[B]:-k[B],q=t.elements.arrow,X=m&&q?E(q):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=Z[F],te=Z[j],ne=he(0,k[B],X[B]),oe=C?k[B]/2-G-ne-ee-I.mainAxis:K-ne-ee-I.mainAxis,re=C?-k[B]/2+G+ne+te+I.mainAxis:U+ne+te+I.mainAxis,ie=t.elements.arrow&&T(t.elements.arrow),se=ie?"y"===x?ie.clientTop||0:ie.clientLeft||0:0,ae=null!=(H=null==P?void 0:P[x])?H:0,le=_+re-ae,ce=he(m?p(V,_+oe-ae-se):V,_,m?h(W,le):W);A[x]=ce,L[x]=ce-_}if(a){var ue,pe="x"===x?O:N,fe="x"===x?$:D,me=A[S],ge="y"===S?"height":"width",be=me+v[pe],ve=me-v[fe],ye=-1!==[O,N].indexOf(y),we=null!=(ue=null==P?void 0:P[S])?ue:0,Ce=ye?be:me-k[ge]-R[ge]-we+I.altAxis,xe=ye?me+k[ge]+R[ge]-we-I.altAxis:ve,Se=m&&ye?function(e,t,n){var o=he(e,t,n);return o>n?n:o}(Ce,me,xe):he(m?Ce:be,me,m?xe:ve);A[S]=Se,L[S]=Se-me}t.modifiersData[o]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Y(n.placement),l=J(a),c=[N,D].indexOf(a)>=0?"height":"width";if(i&&s){var u=function(e,t){return ce("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ue(e,H))}(r.padding,n),d=E(i),h="y"===l?O:N,p="y"===l?$:D,f=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],m=s[l]-n.rects.reference[l],g=T(i),b=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=f/2-m/2,y=u[h],w=b-d[c]-u[p],C=b/2-d[c]/2+v,x=he(y,C,w),S=l;n.modifiersData[o]=((t={})[S]=x,t.centerOffset=x-C,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&se(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,s=de(t,{elementContext:"reference"}),a=de(t,{altBoundary:!0}),l=pe(s,o),c=pe(a,r,i),u=fe(l),d=fe(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),ge=n(21362),be=n(53948),ve=n(94034),ye=n(96148),we=n(1908);function Ce(e){return(0,we.Ay)("MuiPopper",e)}(0,ye.A)("MuiPopper",["root"]);var xe=n(74848);function Se(e){return"function"==typeof e?e():e}const Ae={},Ee=r.forwardRef((function(e,t){const{anchorEl:n,children:o,direction:i,disablePortal:l,modifiers:c,open:u,placement:d,popperOptions:h,popperRef:p,slotProps:f={},slots:m={},TransitionProps:g,ownerState:b,...v}=e,y=r.useRef(null),w=(0,a.A)(y,t),C=r.useRef(null),x=(0,a.A)(C,p),S=r.useRef(x);(0,s.A)((()=>{S.current=x}),[x]),r.useImperativeHandle(p,(()=>C.current),[]);const A=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(d,i),[E,k]=r.useState(A),[R,M]=r.useState(Se(n));r.useEffect((()=>{C.current&&C.current.forceUpdate()})),r.useEffect((()=>{n&&M(Se(n))}),[n]),(0,s.A)((()=>{if(!R||!u)return;let e=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{k(e.placement)}}];null!=c&&(e=e.concat(c)),h&&null!=h.modifiers&&(e=e.concat(h.modifiers));const t=me(R,y.current,{placement:A,...h,modifiers:e});return S.current(t),()=>{t.destroy(),S.current(null)}}),[R,l,c,u,h,A]);const I={placement:E};null!==g&&(I.TransitionProps=g);const P=(e=>{const{classes:t}=e;return(0,ge.A)({root:["root"]},Ce,t)})(e),T=m.root??"div",O=(0,be.A)({elementType:T,externalSlotProps:f.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:w},ownerState:e,className:P.root});return(0,xe.jsx)(T,{...O,children:"function"==typeof o?o(I):o})})),ke=r.forwardRef((function(e,t){const{anchorEl:n,children:o,container:s,direction:a="ltr",disablePortal:l=!1,keepMounted:c=!1,modifiers:u,open:d,placement:h="bottom",popperOptions:p=Ae,popperRef:f,style:m,transition:g=!1,slotProps:b={},slots:v={},...y}=e,[w,C]=r.useState(!0);if(!c&&!d&&(!g||w))return null;let x;if(s)x=s;else if(n){const e=Se(n);x=e&&void 0!==e.nodeType?(0,i.A)(e).body:(0,i.A)(null).body}const S=d||!c||g&&!w?void 0:"none",A=g?{in:d,onEnter:()=>{C(!1)},onExited:()=>{C(!0)}}:void 0;return(0,xe.jsx)(ve.A,{disablePortal:l,container:x,children:(0,xe.jsx)(Ee,{anchorEl:n,direction:a,disablePortal:l,modifiers:u,ref:t,open:g?!w:d,placement:h,popperOptions:p,popperRef:f,slotProps:b,slots:v,...y,style:{position:"fixed",top:0,left:0,display:S,...m},TransitionProps:A,children:o})})}));var Re=n(26739),Me=n(20439);const Ie=(0,Re.Ay)(ke,{name:"MuiPopper",slot:"Root"})({}),Pe=r.forwardRef((function(e,t){const n=(0,o.I)(),r=(0,Me.b)({props:e,name:"MuiPopper"}),{anchorEl:i,component:s,components:a,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:b,slots:v,slotProps:y,...w}=r,C=v?.root??a?.Root,x={anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:b,...w};return(0,xe.jsx)(Ie,{as:s,direction:n?"rtl":"ltr",slots:{root:C},slotProps:y??l,...x,ref:t})}))},27629:(e,t,n)=>{"use strict";n.d(t,{A:()=>I});var o=n(96540),r=n(34164),i=n(21362),s=n(82777),a=n(42722),l=n(9792),c=n(74848);const u=(0,l.A)((0,c.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),d=(0,l.A)((0,c.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,l.A)((0,c.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var p=n(39407),f=n(98855),m=n(96148),g=n(1908);function b(e){return(0,g.Ay)("MuiCheckbox",e)}const v=(0,m.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var y=n(26739),w=n(39241),C=n(1321),x=n(20439),S=n(98663),A=n(85078);const E=(0,y.Ay)(a.A,{shouldForwardProp:e=>(0,f.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,p.A)(n.size)}`],"default"!==n.color&&t[`color${(0,p.A)(n.color)}`]]}})((0,w.A)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,C.A)()).map((([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter((0,C.A)()).map((([t])=>({props:{color:t},style:{[`&.${v.checked}, &.${v.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${v.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})))),k=(0,c.jsx)(d,{}),R=(0,c.jsx)(u,{}),M=(0,c.jsx)(h,{}),I=o.forwardRef((function(e,t){const n=(0,x.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:s=k,color:a="primary",icon:l=R,indeterminate:u=!1,indeterminateIcon:d=M,inputProps:h,size:f="medium",disableRipple:m=!1,className:g,slots:v={},slotProps:y={},...w}=n,C=u?d:l,I=u?d:s,P={...n,disableRipple:m,color:a,indeterminate:u,size:f},T=(e=>{const{classes:t,indeterminate:n,color:o,size:r}=e,s={root:["root",n&&"indeterminate",`color${(0,p.A)(o)}`,`size${(0,p.A)(r)}`]},a=(0,i.A)(s,b,t);return{...t,...a}})(P),O=y.input??h,[$,D]=(0,A.A)("root",{ref:t,elementType:E,className:(0,r.A)(T.root,g),shouldForwardComponentProp:!0,externalForwardedProps:{slots:v,slotProps:y,...w},ownerState:P,additionalProps:{type:"checkbox",icon:o.cloneElement(C,{fontSize:C.props.fontSize??f}),checkedIcon:o.cloneElement(I,{fontSize:I.props.fontSize??f}),disableRipple:m,slots:v,slotProps:{input:(0,S.A)("function"==typeof O?O(P):O,{"data-indeterminate":u})}}});return(0,c.jsx)($,{...D,classes:T})}))},27668:(e,t,n)=>{"use strict";n.d(t,{QQ:()=>l,Rt:()=>c,cP:()=>u,js:()=>a,l$:()=>s});var o=n(31216),r=n(10786);const i=e=>e.expansion,s=(0,o.M)([i],(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)([r.uP],(e=>e?.expandable??!1)),u=(0,o.M)([i],(e=>e.expansionTrigger))},27800:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(43145);function r(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}}},27961:(e,t,n)=>{"use strict";n.d(t,{P:()=>r,w:()=>i});var o=n(96540);const r=o.createContext(void 0);function i(){const e=o.useContext(r);if(void 0===e)throw new Error("MUI X: Missing context. Toolbar subcomponents must be placed within a <Toolbar /> component.");return e}},28040:(e,t,n)=>{"use strict";n.d(t,{A:()=>J});var o=n(4076),r=n(836),i=n(82777);const s={black:"#000",white:"#fff"},a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},l={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},c={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},u={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},d={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},h={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},p={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function f(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:s.white,default:s.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const m=f();function g(){return{text:{primary:s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const b=g();function v(e,t,n,o){const r=o.light||o,s=o.dark||1.5*o;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,i.a)(e.main,r):"dark"===t&&(e.dark=(0,i.e$)(e.main,s)))}function y(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:y=.2,...w}=e,C=e.primary||function(e="light"){return"dark"===e?{main:d[200],light:d[50],dark:d[400]}:{main:d[700],light:d[400],dark:d[800]}}(t),x=e.secondary||function(e="light"){return"dark"===e?{main:l[200],light:l[50],dark:l[400]}:{main:l[500],light:l[300],dark:l[700]}}(t),S=e.error||function(e="light"){return"dark"===e?{main:c[500],light:c[300],dark:c[700]}:{main:c[700],light:c[400],dark:c[800]}}(t),A=e.info||function(e="light"){return"dark"===e?{main:h[400],light:h[300],dark:h[700]}:{main:h[700],light:h[500],dark:h[900]}}(t),E=e.success||function(e="light"){return"dark"===e?{main:p[400],light:p[300],dark:p[700]}:{main:p[800],light:p[500],dark:p[900]}}(t),k=e.warning||function(e="light"){return"dark"===e?{main:u[400],light:u[300],dark:u[700]}:{main:"#ed6c02",light:u[500],dark:u[900]}}(t);function R(e){return(0,i.eM)(e,b.text.primary)>=n?b.text.primary:m.text.primary}const M=({color:e,name:t,mainShade:n=500,lightShade:r=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,o.A)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error((0,o.A)(12,t?` (${t})`:"",JSON.stringify(e.main)));return v(e,"light",r,y),v(e,"dark",i,y),e.contrastText||(e.contrastText=R(e.main)),e};let I;return"light"===t?I=f():"dark"===t&&(I=g()),(0,r.A)({common:{...s},mode:t,primary:M({color:C,name:"primary"}),secondary:M({color:x,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:M({color:S,name:"error"}),warning:M({color:k,name:"warning"}),info:M({color:A,name:"info"}),success:M({color:E,name:"success"}),grey:a,contrastThreshold:n,getContrastText:R,augmentColor:M,tonalOffset:y,...I},w)}function w(e=""){function t(...n){if(!n.length)return"";const o=n[0];return"string"!=typeof o||o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${o}`:`, var(--${e?`${e}-`:""}${o}${t(...n.slice(1))})`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}var C=n(33372),x=n(93781);function S(e){const t={};return Object.entries(e).forEach((e=>{const[n,o]=e;"object"==typeof o&&(t[n]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)})),t}const A=(e,t,n,o=[])=>{let r=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(r)?r[Number(e)]=n:r&&"object"==typeof r&&(r[e]=n):r&&"object"==typeof r&&(r[e]||(r[e]=o.includes(e)?[]:{}),r=r[e])}))};function E(e,t){const{prefix:n,shouldSkipGeneratingVar:o}=t||{},r={},i={},s={};var a,l;return a=(e,t,a)=>{if(!("string"!=typeof t&&"number"!=typeof t||o&&o(e,t))){const o=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t)))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(r,{[o]:l}),A(i,e,`var(${o})`,a),A(s,e,`var(${o}, ${l})`,a)}},l=e=>"vars"===e[0],function e(t,n=[],o=[]){Object.entries(t).forEach((([t,r])=>{(!l||l&&!l([...n,t]))&&null!=r&&("object"==typeof r&&Object.keys(r).length>0?e(r,[...n,t],Array.isArray(r)?[...o,t]:o):a([...n,t],r,o))}))}(e),{css:r,vars:i,varsWithDefaults:s}}const k=function(e,t={}){const{getSelector:n=b,disableCssColorScheme:o,colorSchemeSelector:i}=t,{colorSchemes:s={},components:a,defaultColorScheme:l="light",...c}=e,{vars:u,css:d,varsWithDefaults:h}=E(c,t);let p=h;const f={},{[l]:m,...g}=s;if(Object.entries(g||{}).forEach((([e,n])=>{const{vars:o,css:i,varsWithDefaults:s}=E(n,t);p=(0,r.A)(p,s),f[e]={css:i,vars:o}})),m){const{css:e,vars:n,varsWithDefaults:o}=E(m,t);p=(0,r.A)(p,o),f[l]={css:e,vars:n}}function b(t,n){let o=i;if("class"===i&&(o=".%s"),"data"===i&&(o="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),t){if("media"===o){if(e.defaultColorScheme===t)return":root";const o=s[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${o})`]:{":root":n}}}if(o)return e.defaultColorScheme===t?`:root, ${o.replace("%s",String(t))}`:o.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(f).forEach((([,{vars:t}])=>{e=(0,r.A)(e,t)})),e},generateStyleSheets:()=>{const t=[],r=e.defaultColorScheme||"light";function i(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}i(n(void 0,{...d}),d);const{[r]:a,...l}=f;if(a){const{css:e}=a,t=s[r]?.palette?.mode,l=!o&&t?{colorScheme:t,...e}:{...e};i(n(r,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const r=s[e]?.palette?.mode,a=!o&&r?{colorScheme:r,...t}:{...t};i(n(e,{...a}),a)})),t}}};var R=n(98762),M=n(95548),I=n(65387);const P={textTransform:"uppercase"},T='"Roboto", "Helvetica", "Arial", sans-serif';function O(e,t){const{fontFamily:n=T,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d,...h}="function"==typeof t?t(e):t,p=o/14,f=d||(e=>e/c*p+"rem"),m=(e,t,o,r,i)=>{return{fontFamily:n,fontWeight:e,fontSize:f(t),lineHeight:o,...n===T?{letterSpacing:(s=r/t,Math.round(1e5*s)/1e5+"em")}:{},...i,...u};var s},g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(s,48,1.167,0),h4:m(s,34,1.235,.25),h5:m(s,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(s,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(s,16,1.5,.15),body2:m(s,14,1.43,.15),button:m(a,14,1.75,.4,P),caption:m(s,12,1.66,.4),overline:m(s,12,2.66,1,P),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,r.A)({htmlFontSize:c,pxToRem:f,fontFamily:n,fontSize:o,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l,...g},h,{clone:!1})}function $(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const D=["none",$(0,2,1,-1,0,1,1,0,0,1,3,0),$(0,3,1,-2,0,2,2,0,0,1,5,0),$(0,3,3,-2,0,3,4,0,0,1,8,0),$(0,2,4,-1,0,4,5,0,0,1,10,0),$(0,3,5,-1,0,5,8,0,0,1,14,0),$(0,3,5,-1,0,6,10,0,0,1,18,0),$(0,4,5,-2,0,7,10,1,0,2,16,1),$(0,5,5,-3,0,8,10,1,0,3,14,2),$(0,5,6,-3,0,9,12,1,0,3,16,2),$(0,6,6,-3,0,10,14,1,0,4,18,3),$(0,6,7,-4,0,11,15,1,0,4,20,3),$(0,7,8,-4,0,12,17,2,0,5,22,4),$(0,7,8,-4,0,13,19,2,0,5,24,4),$(0,7,9,-4,0,14,21,2,0,5,26,4),$(0,8,9,-5,0,15,22,2,0,6,28,5),$(0,8,10,-5,0,16,24,2,0,6,30,5),$(0,8,11,-5,0,17,26,2,0,6,32,5),$(0,9,11,-5,0,18,28,2,0,7,34,6),$(0,9,12,-6,0,19,29,2,0,7,36,6),$(0,10,13,-6,0,20,31,3,0,8,38,7),$(0,10,13,-6,0,21,33,3,0,8,40,7),$(0,10,14,-6,0,22,35,3,0,8,42,7),$(0,11,14,-7,0,23,36,3,0,9,44,8),$(0,11,15,-7,0,24,38,3,0,9,46,8)];var N=n(21234);const L={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function H(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let i=0;i<n.length;i++){const[s,a]=n[i];o=a,!(0,r.Q)(o)&&void 0!==o&&"string"!=typeof o&&"boolean"!=typeof o&&"number"!=typeof o&&!Array.isArray(o)||s.startsWith("unstable_")?delete t[s]:(0,r.Q)(a)&&(t[s]={...a},e(t[s]))}var o}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}const z=function(e={},...t){const{breakpoints:n,mixins:i={},spacing:s,palette:a={},transitions:l={},typography:c={},shape:u,...d}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error((0,o.A)(20));const h=y(a),p=(0,I.A)(e);let f=(0,r.A)(p,{mixins:(m=p.breakpoints,g=i,{toolbar:{minHeight:56,[m.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[m.up("sm")]:{minHeight:64}},...g}),palette:h,shadows:D.slice(),typography:O(h,c),transitions:(0,N.Ay)(l),zIndex:{...L}});var m,g;return f=(0,r.A)(f,d),f=t.reduce(((e,t)=>(0,r.A)(e,t)),f),f.unstable_sxConfig={...R.A,...d?.unstable_sxConfig},f.unstable_sx=function(e){return(0,M.A)({sx:e,theme:this})},f.toRuntimeSource=H,f};var F=n(34578);const j=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=(0,F.A)(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function B(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function _(e){return"dark"===e?j:[]}function V(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const W=e=>(t,n)=>{const o=e.rootSelector||":root",r=e.colorSchemeSelector;let i=r;if("class"===r&&(i=".%s"),"data"===r&&(i="[data-%s]"),r?.startsWith("data-")&&!r.includes("%s")&&(i=`[${r}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const r={};return(s=e.cssVarPrefix,[...[...Array(25)].map(((e,t)=>`--${s?`${s}-`:""}overlays-${t}`)),`--${s?`${s}-`:""}palette-AppBar-darkBg`,`--${s?`${s}-`:""}palette-AppBar-darkColor`]).forEach((e=>{r[e]=n[e],delete n[e]})),"media"===i?{[o]:n,"@media (prefers-color-scheme: dark)":{[o]:r}}:i?{[i.replace("%s",t)]:r,[`${o}, ${i.replace("%s",t)}`]:n}:{[o]:{...n,...r}}}if(i&&"media"!==i)return`${o}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:n}};if(i)return i.replace("%s",String(t))}var s;return o};function G(e,t,n){!e[t]&&n&&(e[t]=n)}function K(e){return"string"==typeof e&&e.startsWith("hsl")?(0,i.YL)(e):e}function U(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,i.Me)(K(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const q=e=>{try{return e()}catch(e){}},X=(e="mui")=>w(e);function Y(e,t,n,o){if(!t)return;t=!0===t?{}:t;const r="dark"===o?"dark":"light";if(!n)return void(e[o]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:o,...r}=e,i=y(t);return{palette:i,opacity:{...B(i.mode),...n},overlays:o||_(i.mode),...r}}({...t,palette:{mode:r,...t?.palette}}));const{palette:i,...s}=z({...n,palette:{mode:r,...t?.palette}});return e[o]={...t,palette:i,opacity:{...B(r),...t?.opacity},overlays:t?.overlays||_(r)},s}function Q(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:y({...!0===n?{}:n.palette,mode:t})})}function J(e={},...t){const{palette:n,cssVariables:s=!1,colorSchemes:a=(n?void 0:{light:!0}),defaultColorScheme:l=n?.mode,...c}=e,u=l||"light",d=a?.[u],h={...a,...n?{[u]:{..."boolean"!=typeof d&&d,palette:n}}:void 0};if(!1===s){if(!("colorSchemes"in e))return z(e,...t);let o=n;"palette"in e||h[u]&&(!0!==h[u]?o=h[u].palette:"dark"===u&&(o={mode:"dark"}));const r=z({...e,palette:o},...t);return r.defaultColorScheme=u,r.colorSchemes=h,"light"===r.palette.mode&&(r.colorSchemes.light={...!0!==h.light&&h.light,palette:r.palette},Q(r,"dark",h.dark)),"dark"===r.palette.mode&&(r.colorSchemes.dark={...!0!==h.dark&&h.dark,palette:r.palette},Q(r,"light",h.light)),r}return n||"light"in h||"light"!==u||(h.light=!0),function(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:s,disableCssColorScheme:a=!1,cssVarPrefix:l="mui",shouldSkipGeneratingVar:c=V,colorSchemeSelector:u=(n.light&&n.dark?"media":void 0),rootSelector:d=":root",...h}=e,p=Object.keys(n)[0],f=s||(n.light&&"light"!==p?"light":p),m=X(l),{[f]:g,light:b,dark:v,...y}=n,w={...y};let A=g;if(("dark"===f&&!("dark"in n)||"light"===f&&!("light"in n))&&(A=!0),!A)throw new Error((0,o.A)(21,f));const E=Y(w,A,h,f);b&&!w.light&&Y(w,b,void 0,"light"),v&&!w.dark&&Y(w,v,void 0,"dark");let I={defaultColorScheme:f,...E,cssVarPrefix:l,colorSchemeSelector:u,rootSelector:d,getCssVar:m,colorSchemes:w,font:{...S(E.typography),...E.font},spacing:(P=h.spacing,"number"==typeof P?`${P}px`:"string"==typeof P||"function"==typeof P||Array.isArray(P)?P:"8px")};var P;Object.keys(I.colorSchemes).forEach((e=>{const t=I.colorSchemes[e].palette,n=e=>{const n=e.split("-"),o=n[1],r=n[2];return m(e,t[o][r])};var o;if("light"===t.mode&&(G(t.common,"background","#fff"),G(t.common,"onBackground","#000")),"dark"===t.mode&&(G(t.common,"background","#000"),G(t.common,"onBackground","#fff")),o=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{o[e]||(o[e]={})})),"light"===t.mode){G(t.Alert,"errorColor",(0,i.Nd)(t.error.light,.6)),G(t.Alert,"infoColor",(0,i.Nd)(t.info.light,.6)),G(t.Alert,"successColor",(0,i.Nd)(t.success.light,.6)),G(t.Alert,"warningColor",(0,i.Nd)(t.warning.light,.6)),G(t.Alert,"errorFilledBg",n("palette-error-main")),G(t.Alert,"infoFilledBg",n("palette-info-main")),G(t.Alert,"successFilledBg",n("palette-success-main")),G(t.Alert,"warningFilledBg",n("palette-warning-main")),G(t.Alert,"errorFilledColor",q((()=>t.getContrastText(t.error.main)))),G(t.Alert,"infoFilledColor",q((()=>t.getContrastText(t.info.main)))),G(t.Alert,"successFilledColor",q((()=>t.getContrastText(t.success.main)))),G(t.Alert,"warningFilledColor",q((()=>t.getContrastText(t.warning.main)))),G(t.Alert,"errorStandardBg",(0,i.j4)(t.error.light,.9)),G(t.Alert,"infoStandardBg",(0,i.j4)(t.info.light,.9)),G(t.Alert,"successStandardBg",(0,i.j4)(t.success.light,.9)),G(t.Alert,"warningStandardBg",(0,i.j4)(t.warning.light,.9)),G(t.Alert,"errorIconColor",n("palette-error-main")),G(t.Alert,"infoIconColor",n("palette-info-main")),G(t.Alert,"successIconColor",n("palette-success-main")),G(t.Alert,"warningIconColor",n("palette-warning-main")),G(t.AppBar,"defaultBg",n("palette-grey-100")),G(t.Avatar,"defaultBg",n("palette-grey-400")),G(t.Button,"inheritContainedBg",n("palette-grey-300")),G(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),G(t.Chip,"defaultBorder",n("palette-grey-400")),G(t.Chip,"defaultAvatarColor",n("palette-grey-700")),G(t.Chip,"defaultIconColor",n("palette-grey-700")),G(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),G(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),G(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),G(t.LinearProgress,"primaryBg",(0,i.j4)(t.primary.main,.62)),G(t.LinearProgress,"secondaryBg",(0,i.j4)(t.secondary.main,.62)),G(t.LinearProgress,"errorBg",(0,i.j4)(t.error.main,.62)),G(t.LinearProgress,"infoBg",(0,i.j4)(t.info.main,.62)),G(t.LinearProgress,"successBg",(0,i.j4)(t.success.main,.62)),G(t.LinearProgress,"warningBg",(0,i.j4)(t.warning.main,.62)),G(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),G(t.Slider,"primaryTrack",(0,i.j4)(t.primary.main,.62)),G(t.Slider,"secondaryTrack",(0,i.j4)(t.secondary.main,.62)),G(t.Slider,"errorTrack",(0,i.j4)(t.error.main,.62)),G(t.Slider,"infoTrack",(0,i.j4)(t.info.main,.62)),G(t.Slider,"successTrack",(0,i.j4)(t.success.main,.62)),G(t.Slider,"warningTrack",(0,i.j4)(t.warning.main,.62));const e=(0,i.Y9)(t.background.default,.8);G(t.SnackbarContent,"bg",e),G(t.SnackbarContent,"color",q((()=>t.getContrastText(e)))),G(t.SpeedDialAction,"fabHoverBg",(0,i.Y9)(t.background.paper,.15)),G(t.StepConnector,"border",n("palette-grey-400")),G(t.StepContent,"border",n("palette-grey-400")),G(t.Switch,"defaultColor",n("palette-common-white")),G(t.Switch,"defaultDisabledColor",n("palette-grey-100")),G(t.Switch,"primaryDisabledColor",(0,i.j4)(t.primary.main,.62)),G(t.Switch,"secondaryDisabledColor",(0,i.j4)(t.secondary.main,.62)),G(t.Switch,"errorDisabledColor",(0,i.j4)(t.error.main,.62)),G(t.Switch,"infoDisabledColor",(0,i.j4)(t.info.main,.62)),G(t.Switch,"successDisabledColor",(0,i.j4)(t.success.main,.62)),G(t.Switch,"warningDisabledColor",(0,i.j4)(t.warning.main,.62)),G(t.TableCell,"border",(0,i.j4)((0,i.Cg)(t.divider,1),.88)),G(t.Tooltip,"bg",(0,i.Cg)(t.grey[700],.92))}if("dark"===t.mode){G(t.Alert,"errorColor",(0,i.j4)(t.error.light,.6)),G(t.Alert,"infoColor",(0,i.j4)(t.info.light,.6)),G(t.Alert,"successColor",(0,i.j4)(t.success.light,.6)),G(t.Alert,"warningColor",(0,i.j4)(t.warning.light,.6)),G(t.Alert,"errorFilledBg",n("palette-error-dark")),G(t.Alert,"infoFilledBg",n("palette-info-dark")),G(t.Alert,"successFilledBg",n("palette-success-dark")),G(t.Alert,"warningFilledBg",n("palette-warning-dark")),G(t.Alert,"errorFilledColor",q((()=>t.getContrastText(t.error.dark)))),G(t.Alert,"infoFilledColor",q((()=>t.getContrastText(t.info.dark)))),G(t.Alert,"successFilledColor",q((()=>t.getContrastText(t.success.dark)))),G(t.Alert,"warningFilledColor",q((()=>t.getContrastText(t.warning.dark)))),G(t.Alert,"errorStandardBg",(0,i.Nd)(t.error.light,.9)),G(t.Alert,"infoStandardBg",(0,i.Nd)(t.info.light,.9)),G(t.Alert,"successStandardBg",(0,i.Nd)(t.success.light,.9)),G(t.Alert,"warningStandardBg",(0,i.Nd)(t.warning.light,.9)),G(t.Alert,"errorIconColor",n("palette-error-main")),G(t.Alert,"infoIconColor",n("palette-info-main")),G(t.Alert,"successIconColor",n("palette-success-main")),G(t.Alert,"warningIconColor",n("palette-warning-main")),G(t.AppBar,"defaultBg",n("palette-grey-900")),G(t.AppBar,"darkBg",n("palette-background-paper")),G(t.AppBar,"darkColor",n("palette-text-primary")),G(t.Avatar,"defaultBg",n("palette-grey-600")),G(t.Button,"inheritContainedBg",n("palette-grey-800")),G(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),G(t.Chip,"defaultBorder",n("palette-grey-700")),G(t.Chip,"defaultAvatarColor",n("palette-grey-300")),G(t.Chip,"defaultIconColor",n("palette-grey-300")),G(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),G(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),G(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),G(t.LinearProgress,"primaryBg",(0,i.Nd)(t.primary.main,.5)),G(t.LinearProgress,"secondaryBg",(0,i.Nd)(t.secondary.main,.5)),G(t.LinearProgress,"errorBg",(0,i.Nd)(t.error.main,.5)),G(t.LinearProgress,"infoBg",(0,i.Nd)(t.info.main,.5)),G(t.LinearProgress,"successBg",(0,i.Nd)(t.success.main,.5)),G(t.LinearProgress,"warningBg",(0,i.Nd)(t.warning.main,.5)),G(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),G(t.Slider,"primaryTrack",(0,i.Nd)(t.primary.main,.5)),G(t.Slider,"secondaryTrack",(0,i.Nd)(t.secondary.main,.5)),G(t.Slider,"errorTrack",(0,i.Nd)(t.error.main,.5)),G(t.Slider,"infoTrack",(0,i.Nd)(t.info.main,.5)),G(t.Slider,"successTrack",(0,i.Nd)(t.success.main,.5)),G(t.Slider,"warningTrack",(0,i.Nd)(t.warning.main,.5));const e=(0,i.Y9)(t.background.default,.98);G(t.SnackbarContent,"bg",e),G(t.SnackbarContent,"color",q((()=>t.getContrastText(e)))),G(t.SpeedDialAction,"fabHoverBg",(0,i.Y9)(t.background.paper,.15)),G(t.StepConnector,"border",n("palette-grey-600")),G(t.StepContent,"border",n("palette-grey-600")),G(t.Switch,"defaultColor",n("palette-grey-300")),G(t.Switch,"defaultDisabledColor",n("palette-grey-600")),G(t.Switch,"primaryDisabledColor",(0,i.Nd)(t.primary.main,.55)),G(t.Switch,"secondaryDisabledColor",(0,i.Nd)(t.secondary.main,.55)),G(t.Switch,"errorDisabledColor",(0,i.Nd)(t.error.main,.55)),G(t.Switch,"infoDisabledColor",(0,i.Nd)(t.info.main,.55)),G(t.Switch,"successDisabledColor",(0,i.Nd)(t.success.main,.55)),G(t.Switch,"warningDisabledColor",(0,i.Nd)(t.warning.main,.55)),G(t.TableCell,"border",(0,i.Nd)((0,i.Cg)(t.divider,1),.68)),G(t.Tooltip,"bg",(0,i.Cg)(t.grey[700],.92))}U(t.background,"default"),U(t.background,"paper"),U(t.common,"background"),U(t.common,"onBackground"),U(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&G(t[e],"mainChannel",(0,i.Me)(K(n.main))),n.light&&G(t[e],"lightChannel",(0,i.Me)(K(n.light))),n.dark&&G(t[e],"darkChannel",(0,i.Me)(K(n.dark))),n.contrastText&&G(t[e],"contrastTextChannel",(0,i.Me)(K(n.contrastText))),"text"===e&&(U(t[e],"primary"),U(t[e],"secondary")),"action"===e&&(n.active&&U(t[e],"active"),n.selected&&U(t[e],"selected")))}))})),I=t.reduce(((e,t)=>(0,r.A)(e,t)),I);const T={prefix:l,disableCssColorScheme:a,shouldSkipGeneratingVar:c,getSelector:W(I)},{vars:O,generateThemeVars:$,generateStyleSheets:D}=k(I,T);return I.vars=O,Object.entries(I.colorSchemes[I.defaultColorScheme]).forEach((([e,t])=>{I[e]=t})),I.generateThemeVars=$,I.generateStyleSheets=D,I.generateSpacing=function(){return(0,C.A)(h.spacing,(0,x.LX)(this))},I.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(u),I.spacing=I.generateSpacing(),I.shouldSkipGeneratingVar=c,I.unstable_sxConfig={...R.A,...h?.unstable_sxConfig},I.unstable_sx=function(e){return(0,M.A)({sx:e,theme:this})},I.toRuntimeSource=H,I}({...c,colorSchemes:h,defaultColorScheme:u,..."boolean"!=typeof s&&s},...t)}},28104:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);function r(e,t,n){var r=o.useRef({});return"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t),r.current.value}},28525:(e,t,n)=>{"use strict";n.d(t,{x:()=>h});var o=n(58168),r=n(98587),i=n(96540),s=n(51280),a=n(25054),l=n(77866),c=n(43203),u=n(74848);const d=["render","className","onClick"],h=(0,s.R)((function(e,t){const{render:n,className:s,onClick:h}=e,p=(0,r.A)(e,d),f=(0,l.A)(),{state:m,clearValue:g}=(0,c.q)(),b="function"==typeof s?s(m):s,v=(0,a._)(f.slots.baseIconButton,n,(0,o.A)({},f.slotProps?.baseIconButton,{className:b,tabIndex:-1},p,{onClick:e=>{g(),h?.(e)},ref:t}),m);return(0,u.jsx)(i.Fragment,{children:v})}))},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),r=n(10786);const i=(e,t)=>{let n=t.length-1;for(;n>=0&&!(0,r.P$)(e,t[n]);)n-=1;if(-1!==n)return t[n]},s=(e,t)=>{const n=(0,r.uP)(e,t);if(!n)return null;const a=(0,r.p1)(e,n.parentId),l=(0,r.tm)(e,t);if(0===l)return n.parentId;let c=l-1;for(;!(0,r.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=i(e,(0,r.p1)(e,u));for(;(0,o.QQ)(e,u)&&null!=d;)u=d,d=i(e,(0,r.p1)(e,u));return u},a=(e,t)=>{if((0,o.QQ)(e,t)){const n=(0,r.p1)(e,t).find((t=>(0,r.P$)(e,t)));if(null!=n)return n}let n=(0,r.uP)(e,t);for(;null!=n;){const t=(0,r.p1)(e,n.parentId),o=(0,r.tm)(e,n.id);if(o<t.length-1){let n=o+1;for(;!(0,r.P$)(e,t[n])&&n<t.length-1;)n+=1;if((0,r.P$)(e,t[n]))return t[n]}n=(0,r.uP)(e,n.parentId)}return null},l=e=>{let t=null;for(;null==t||(0,o.QQ)(e,t);){const n=(0,r.p1)(e,t),o=i(e,n);if(null==o)return t;t=o}return t},c=e=>(0,r.p1)(e,null).find((t=>(0,r.P$)(e,t))),u=(e,t,n)=>{if(t===n)return[t,n];const o=(0,r.uP)(e,t),i=(0,r.uP)(e,n);if(!o||!i)return[t,n];if(o.parentId===i.id||i.parentId===o.id)return i.parentId===o.id?[o.id,i.id]:[i.id,o.id];const s=[o.id],a=[i.id];let l=o.parentId,c=i.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,r.YW)(e,l))),p&&!u&&(a.push(c),d=-1!==s.indexOf(c),p=null!==c,!d&&p&&(c=(0,r.YW)(e,c)));const f=u?l:c,m=(0,r.p1)(e,f),g=s[s.indexOf(f)-1],b=a[a.indexOf(f)-1];return m.indexOf(g)<m.indexOf(b)?[t,n]:[n,t]},d=(e,t,n)=>{const i=t=>{if((0,o.Rt)(e,t)&&(0,o.QQ)(e,t))return(0,r.p1)(e,t)[0];let n=(0,r.uP)(e,t);for(;null!=n;){const t=(0,r.p1)(e,n.parentId),o=(0,r.tm)(e,n.id);if(o<t.length-1)return t[o+1];n=n.parentId?(0,r.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=i(c),(0,r.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"]')},29312:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,b:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiListItemText",e)}const s=(0,o.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"])},29401:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});var o=n(78418);const r=Object.is,i=(e,t,n=void 0,i=r)=>(0,o.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,(e=>t(e,n)),i)},29677:(e,t,n)=>{"use strict";n.d(t,{F:()=>r,i:()=>i});var o=n(96540);const r=o.createContext(null),i=()=>{const e=o.useContext(r);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}},30016:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var o=n(96540),r=n(34164),i=n(21362),s=n(26739),a=n(20439),l=n(85078),c=n(99798),u=n(96148),d=n(1908);function h(e){return(0,d.Ay)("MuiBackdrop",e)}(0,u.A)("MuiBackdrop",["root","invisible"]);var p=n(74848);const f=(0,s.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),m=o.forwardRef((function(e,t){const n=(0,a.b)({props:e,name:"MuiBackdrop"}),{children:o,className:s,component:u="div",invisible:d=!1,open:m,components:g={},componentsProps:b={},slotProps:v={},slots:y={},TransitionComponent:w,transitionDuration:C,...x}=n,S={...n,component:u,invisible:d},A=(e=>{const{classes:t,invisible:n}=e,o={root:["root",n&&"invisible"]};return(0,i.A)(o,h,t)})(S),E={slots:{transition:w,root:g.Root,...y},slotProps:{...b,...v}},[k,R]=(0,l.A)("root",{elementType:f,externalForwardedProps:E,className:(0,r.A)(A.root,s),ownerState:S}),[M,I]=(0,l.A)("transition",{elementType:c.A,externalForwardedProps:E,ownerState:S});return(0,p.jsx)(M,{in:m,timeout:C,...x,...I,children:(0,p.jsx)(k,{"aria-hidden":!0,...R,classes:A,ref:t,children:o})})}))},30041:(e,t,n)=>{"use strict";function o(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(o+=n+" ")})),o}n.d(t,{Rk:()=>o,SF:()=>r,sk:()=>i});var r=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},i=function(e,t,n){r(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+o:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},30237:(e,t,n)=>{"use strict";n(6469)("flatMap")},30301:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(24902).A},30531:(e,t,n)=>{"use strict";var o=n(46518),r=n(69565),i=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),f=!d&&!h("flatMap",(function(){})),m=!d&&!f&&p("flatMap",TypeError),g=d||f||m,b=c((function(){for(var e,t,n=this.iterator,o=this.mapper;;){if(t=this.inner)try{if(!(e=s(r(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){u(n,"throw",e)}if(e=s(r(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:g},{flatMap:function(e){s(this);try{i(e)}catch(e){u(this,"throw",e)}return m?r(m,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),r=(0,n(20998).A)()?o.useLayoutEffect:o.useEffect,i=function(e,t){var n=o.useRef(!0);r((function(){return e(n.current)}),t),r((function(){return n.current=!1,function(){n.current=!0}}),[])},s=function(e,t){i((function(t){if(!t)return e()}),t)};const a=i},31216:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var o=n(25508);const r=(0,o.Ad)({memoize:o.i5,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),i=new WeakMap,s=(...e)=>(t,n)=>{const o=t.cacheKey;let s=i.get(o);s||(s=new Map,i.set(o,s));const a=s.get(e);if(a)return a(t,n);const l=r(...e);return s.set(e,l),l(t,n)}},31355:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o="$$material"},31418:(e,t,n)=>{"use strict";n.d(t,{I$:()=>d,L6:()=>u,U_:()=>c,hc:()=>l});var o=n(31216),r=n(64938),i=n(10786),s=n(60957),a=n(27668);const l=(0,o.M)([r.Go,a.js,i.Ks,i.tw,e=>(0,i.p1)(e,null)],((e,t,n,o,r)=>{const i=e.find((e=>{if(!o&&(0,s.gE)(n,e))return!1;const r=n[e];return r&&(null==r.parentId||t.has(r.parentId))}));if(null!=i)return i;const a=r.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),r=n(40961),i=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),i=p({},!1);return i.className="".concat("hot-wrapper-editor-container"," ").concat(i.className),r.createPortal(o.createElement("div",Object.assign({},i),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 f(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 m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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&&g(e.prototype,t),n&&g(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 y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(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 f(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)?f(e,t):void 0}}var S=function(){return b((function e(){m(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,r=t.isInit,i=void 0!==r&&r,s=t.initOnlySettingKeys,a=void 0===s?[]:s,l=function(t){return!(i||!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}}])}(),A=(0,o.createContext)(void 0),E=function(e){var t=e.children,n=(0,o.useRef)([]),i=(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,i,s,c,d,p){var f="".concat(i,"-").concat(s),m=t.guid,g="".concat(m,"-").concat(f),b="".concat(f,"-").concat(m);if(a.current.has(f)&&(n.innerHTML=a.current.get(f).innerHTML),n&&!n.getAttribute("ghost-table")){for(var v=u.current.get(b),y=h.current.get(g);n.firstChild;)n.removeChild(n.firstChild);if(v&&y)n.appendChild(y);else{var w=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 i=null!=o?o:t.createElement("DIV");return l.appendChild(i),{portal:r.createPortal(e,i,n),portalContainer:i}}(o.createElement(e,{instance:t,TD:n,row:i,col:s,prop:c,value:d,cellProperties:p}),n.ownerDocument,b,y),C=w.portal,x=w.portalContainer;h.current.set(g,x),n.appendChild(x),u.current.set(b,C)}}return a.current.set("".concat(i,"-").concat(s),n),n}}),[]),m=(0,o.useRef)((function(){})),g=(0,o.useCallback)((function(e){m.current=e}),[]),b=(0,o.useCallback)((function(){var e;m.current(function(e){if(Array.isArray(e))return f(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:i,getRendererWrapper:p,clearPortalCache:d,clearRenderedCellCache:c,setRenderersPortalManagerRef:g,pushCellPortalsIntoPortalManager:b}}),[i,p,c,g,b]);return o.createElement(A.Provider,{value:v},t)};function k(){return(0,o.useContext)(A)}var R=(0,o.createContext)(void 0),M=function(e){var t=e.columnIndex,n=e.getOwnerDocument,r=e.children,i=(0,o.useMemo)((function(){return{columnIndex:t,getOwnerDocument:n}}),[t,n]);return o.createElement(R.Provider,{value:i},r)},I=["close","focus","open"],P=["getValue","setValue"],T={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function O(e,t){return function(n){function o(n){var r,s,a,l;return m(this,o),s=this,l=[n],a=v(a=o),r=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,y()?Reflect.construct(a,l||[],v(s).constructor):a.apply(s,l)),t.current=r,Object.getOwnPropertyNames(i.Ay.editors.BaseEditor.prototype).forEach((function(t){if("constructor"!==t&&!P.includes(t)){var n=i.Ay.editors.BaseEditor.prototype[t];o.prototype[t]=function(){for(var o,r,i,s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return I.includes(t)||(r=n.call.apply(n,[this].concat(a))),T[t]&&null!==(o=e.current)&&void 0!==o&&o[T[t]]&&(r=(i=e.current[T[t]]).call.apply(i,[this].concat(a))),r}.bind(r)}})),r}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&&w(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(){}}])}(i.Ay.editors.BaseEditor)}var $=(0,o.createContext)(void 0),D=function(e){var t=e.hooksRef,n=e.hotCustomEditorInstanceRef,r=e.children;return o.createElement($.Provider,{value:{hooksRef:t,hotCustomEditorInstanceRef:n}},r)},N=function(e){return e.type===H},L=["_columnIndex","_getOwnerDocument","children"],H=function(e){var t=k(),n=t.componentRendererColumns,r=t.emitColumnSettings,i=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=S.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=i(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}();r(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 f=h(l(),e.editor);return o.createElement(D,{hooksRef:d,hotCustomEditorInstanceRef:p},f)},z=(0,o.forwardRef)((function(e,t){var n,r,i=(n=(0,o.useState)([]),r=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,r,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(n,r)||x(n,r)||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=i[0],a=i[1];return(0,o.useImperativeHandle)(t,(function(){return a})),o.createElement(o.Fragment,null,s)}));function F(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var j,B,_,V,W={exports:{}};W.exports=function(){if(V)return _;V=1;var e=B?j:(B=1,j="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,_=function(){function o(t,n,o,r,i,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 r(){return o}o.isRequired=o;var i={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:r,element:o,elementType:o,instanceOf:r,node:o,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();var G=F(W.exports),K=(0,o.forwardRef)((function(e,t){var n,r,l=(0,o.useRef)(null),d=(0,o.useRef)(null),f=(0,o.useRef)(null),m=(0,o.useRef)(null),g=(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]),y=(0,o.useCallback)((function(){return!l.current||l.current.isDestroyed}),[l]),w=(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]:{},r=y()?[]:(null===(t=v())||void 0===t||null===(t=t.getSettings())||void 0===t?void 0:t._initOnlySettings)||[],i=S.getSettings(e,{prevProps:o,isInit:n,initOnlySettingKeys:r});return i.columns=b.columnsSettings.length?b.columnsSettings:i.columns,e.renderer?(i.renderer=b.getRendererWrapper(e.renderer),b.componentRendererColumns.set("global",!0)):i.renderer=e.hotRenderer||(0,s.gB)("text"),e.editor?i.editor=O(f,m):i.editor=e.hotEditor||(0,a.M8)("text"),i},A=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,r=x(!0);return g.current=e,l.current=new i.Ay.Core(d.current,r),l.current.addHook("beforeViewRender",(function(){b.clearPortalCache(),b.clearRenderedCellCache()})),l.current.addHook("afterViewRender",(function(){b.pushCellPortalsIntoPortalManager()})),l.current.init(),A(l.current),u(e.children)||(t=e.children,n=H,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;w(),null===(e=v())||void 0===e||e.destroy()}}),[]),n=function(){w();var t=v(),n=x(!1,g.current);g.current=e,null==t||t.updateSettings(n,!1),A(t),u(e.children)},r=o.useRef(!1),(0,o.useEffect)((function(){if(r.current)return n();r.current=!0}),undefined),(0,o.useImperativeHandle)(t,(function(){return{get hotElementRef(){return d.current},get hotInstance(){return v()}}}));var E=o.Children.toArray(e.children).filter(N).map((function(e,t){return o.createElement(M,{columnIndex:t,getOwnerDocument:C,key:t},e)})),R=p(e),I=h(C(),e.editor);return o.createElement(o.Fragment,null,o.createElement("div",Object.assign({ref:d},R),E),o.createElement(z,{ref:b.setRenderersPortalManagerRef}),o.createElement(D,{hooksRef:f,hotCustomEditorInstanceRef:m},I))}));K.propTypes={style:G.object,id:G.string,className:G.string};var U=["children"],q=(0,o.forwardRef)((function(e,t){var n,r=e.children,i=function(e,t){if(null==e)return{};var n,o,r=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 i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,U),s=null!==(n=i.id)&&void 0!==n?n:(0,o.useId)();return o.createElement(E,null,o.createElement(K,Object.assign({id:s},i,{ref:t}),r))}));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}},32067:(e,t,n)=>{"use strict";n.d(t,{Ai:()=>C,O7:()=>v,RN:()=>y,ZI:()=>c,ee:()=>w,em:()=>p,od:()=>x,q6:()=>u,qA:()=>g,tW:()=>b,ux:()=>f,wx:()=>h});var o=n(34790),r=n(92661),i=n(5009),s=n(47211),a=n(24349);const l=(0,r.gz)((e=>e.filter)),c=(0,r.Mz)(l,(e=>e.filterModel)),u=(0,r.Mz)(c,(e=>e.quickFilterValues)),d=(0,r.gz)((e=>e.visibleRowsLookup)),h=(0,r.Mz)(l,(e=>e.filteredRowsLookup)),p=((0,r.Mz)(l,(e=>e.filteredChildrenCountLookup)),(0,r.Mz)(l,(e=>e.filteredDescendantCountLookup)),(0,r.S)(d,i.J6,((e,t)=>(0,o.Z)(e)?t:t.filter((t=>!1!==e[t.id]))))),f=(0,r.S)(p,(e=>e.map((e=>e.id)))),m=(0,r.S)(h,i.J6,((e,t)=>(0,o.Z)(e)?t:t.filter((t=>!1!==e[t.id])))),g=(0,r.S)(m,(e=>e.map((e=>e.id)))),b=((0,r.S)(f,a.qj,((e,t)=>{const n={};let o=0;return e.reduce(((e,r)=>{const i=t[r];return n[i.depth]||(n[i.depth]=0),i.depth>o&&(n[i.depth]=0),o=i.depth,n[i.depth]+=1,e[r]=n[i.depth],e}),{})})),(0,r.S)(p,a.qj,a.V2,((e,t,n)=>n<2?e:e.filter((e=>0===t[e.id]?.depth))))),v=(0,r.Mz)(p,(e=>e.length)),y=(0,r.Mz)(b,(e=>e.length)),w=(0,r.Mz)(m,(e=>e.length)),C=((0,r.Mz)(w,y,((e,t)=>e-t)),(0,r.S)(c,s.gv,((e,t)=>e.items?.filter((e=>{if(!e.field)return!1;const n=t[e.field];if(!n?.filterOperators||0===n?.filterOperators?.length)return!1;const o=n.filterOperators.find((t=>t.value===e.operator));return!!o&&(!o.InputComponent||null!=e.value&&""!==e.value?.toString())}))))),x=(0,r.S)(C,(e=>e.reduce(((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e)),{})))},32350:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,E:()=>i});var o=n(15870),r=n(53172);class i{static create(){return new i}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function s(){const e=(0,o.A)(i.create).current;return(0,r.A)(e.disposeEffect),e}},32675:(e,t,n)=>{"use strict";n.d(t,{m:()=>p});var o=n(58168),r=n(98587),i=n(96540),s=n(51280),a=n(25054),l=n(24902),c=n(77866),u=n(43203),d=n(74848);const h=["render","className","onClick"],p=(0,s.R)((function(e,t){const{render:n,className:s,onClick:p}=e,f=(0,r.A)(e,h),m=(0,c.A)(),{state:g,controlId:b,onExpandedChange:v,triggerRef:y}=(0,u.q)(),w="function"==typeof s?s(g):s,C=(0,l.A)(y,t),x=(0,a._)(m.slots.baseButton,n,(0,o.A)({},m.slotProps?.baseButton,{className:w,"aria-controls":b,"aria-expanded":g.expanded},f,{onClick:e=>{v(!g.expanded),p?.(e)},ref:C}),g);return(0,d.jsx)(i.Fragment,{children:x})}))},33044:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(e,t,n){return"function"==typeof e?e(t,n):e}},33372:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(93781);function r(e=8,t=(0,o.LX)({spacing:e})){if(e.mui)return e;const n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}},33983:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(10644).A},34164:(e,t,n)=>{"use strict";function o(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=o(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}n.d(t,{A:()=>r});const r=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r}},34477:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var o=n(96540),r=n(34164),i=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"]),f=(0,d.A)(),m=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:u="MuiBox-root",generateClassName:d}=e,h=(0,i.Ay)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(s.A);return o.forwardRef((function(e,o){const i=(0,l.A)(n),{className:s,component:p="div",...f}=(0,a.A)(e);return(0,c.jsx)(h,{as:p,ref:o,className:(0,r.A)(s,d?d(u):u),theme:t&&i[t]||i,...f})}))}({themeId:h.A,defaultTheme:f,defaultClassName:p.root,generateClassName:u.A.generate}),g=m},34552:(e,t,n)=>{"use strict";n.d(t,{m6:()=>f,BD:()=>m});var o=n(89379),r=n(20998),i="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,r.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(i,c),h&&l&&p.setAttribute(s,"".concat(l)),null!=n&&n.nonce&&(p.nonce=null==n?void 0:n.nonce),p.innerHTML=e;var f=u(t),m=f.firstChild;if(o){if(h){var g=(t.styles||d(f)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(i)))return!1;var t=Number(e.getAttribute(s)||0);return l>=t}));if(g.length)return f.insertBefore(p,g[g.length-1].nextSibling),p}f.insertBefore(p,m)}else f.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 f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=p(e,t);n&&u(t).removeChild(n)}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=u(n),i=d(r),s=(0,o.A)((0,o.A)({},n),{},{styles:i});!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),r=o.parentNode;l.set(e,r),e.removeChild(o)}}(r,s);var a,f,m,g=p(t,s);if(g)return null!==(a=s.csp)&&void 0!==a&&a.nonce&&g.nonce!==(null===(f=s.csp)||void 0===f?void 0:f.nonce)&&(g.nonce=null===(m=s.csp)||void 0===m?void 0:m.nonce),g.innerHTML!==e&&(g.innerHTML=e),g;var b=h(e,s);return b.setAttribute(c(s),t),b}},34578:(e,t,n)=>{"use strict";function o(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}n.d(t,{A:()=>o})},34790:(e,t,n)=>{"use strict";function o(e){for(const t in e)return!1;return!0}n.d(t,{Z:()=>o})},34840:(e,t,n)=>{var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},35124:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var o=n(96540),r=n(34164),i=n(21362),s=n(4977),a=n(26739),l=n(39241),c=n(20439),u=n(39407),d=n(1321),h=n(91790),p=n(74848);const f={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},m=(0,s.Dg)(),g=(0,a.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,u.A)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((0,l.A)((({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter((([e,t])=>"inherit"!==e&&t&&"object"==typeof t)).map((([e,t])=>({props:{variant:e},style:t}))),...Object.entries(e.palette).filter((0,d.A)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette?.text||{}).filter((([,e])=>"string"==typeof e)).map((([t])=>({props:{color:`text${(0,u.A)(t)}`},style:{color:(e.vars||e).palette.text[t]}}))),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]})))),b={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},v=o.forwardRef((function(e,t){const{color:n,...o}=(0,c.b)({props:e,name:"MuiTypography"}),s=m({...o,...!f[n]&&{color:n}}),{align:a="inherit",className:l,component:d,gutterBottom:v=!1,noWrap:y=!1,paragraph:w=!1,variant:C="body1",variantMapping:x=b,...S}=s,A={...s,align:a,color:n,className:l,component:d,gutterBottom:v,noWrap:y,paragraph:w,variant:C,variantMapping:x},E=d||(w?"p":x[C]||b[C])||"span",k=(e=>{const{align:t,gutterBottom:n,noWrap:o,paragraph:r,variant:s,classes:a}=e,l={root:["root",s,"inherit"!==e.align&&`align${(0,u.A)(t)}`,n&&"gutterBottom",o&&"noWrap",r&&"paragraph"]};return(0,i.A)(l,h.y,a)})(A);return(0,p.jsx)(g,{as:E,ref:t,className:(0,r.A)(k.root,l),...S,ownerState:A,style:{..."inherit"!==a&&{"--Typography-textAlign":a},...S.style}})}))},36289:(e,t,n)=>{"use strict";function o(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>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),r=n(20091),i=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,r.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,r,i){super.prepare(e,t,n,o,r,i);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,i.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,i.CA)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let o,r;return!t.getSelectedLast()&&t.flipped?o=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(r=t.getSelectedLast()[0],o=Math.max(0,r-1)):(r=t.getSelectedLast()[0],o=r-1)),n(o,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let o,r;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;r=t.getSelectedLast()[0],o=Math.min(e,r+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),f=n(92182),m=n(66422),g=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 y(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 w(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,S=new WeakMap,A=new WeakSet;class E extends c{constructor(){var e;super(...arguments),v(this,e=A),e.add(this),y(this,"query",null),y(this,"strippedChoices",[]),y(this,"rawChoices",[]),b(this,x,this.hot.guid.slice(0,9)),b(this,S,(0,g.sg)((()=>{this.focus()}),100)),y(this,"sortByRelevance",(function(e,t,n){const o=[],r=[],i=e.length;let s,a,l,c,u=t.length;if(0===i){for(l=0;l<u;l++)r.push(l);return r}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-i,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++)r.push(o[l].baseIndex);return r}))}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,r.iQ)(this.htContainer,"autocompleteEditor"),(0,r.iQ)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,r.Bq)(this.TEXTAREA,[(0,m.ZW)(),(0,m.B6)(),(0,m.wP)("listbox"),(0,m.gq)()])}prepare(e,t,n,o,i,s){super.prepare(e,t,n,o,i,s),this.hot.getSettings().ariaTags&&(0,r.Bq)(this.TEXTAREA,[(0,m.dV)("false"),(0,m.Ku)(`${w(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:i,col:s}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.addHook("afterScroll",w(S,this)),this.htEditor.updateSettings({colWidths:e?[(0,r.Gq)(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(e,i,s,a,l,c,u)=>{(0,f.F)(e,i,s,a,l,c,u);const{filteringCaseSensitive:h,allowHtml:p,locale:g}=this.cellProperties,b=this.query;let v,y,w=(0,d.As)(c);w&&!p&&(v=!0===h?w.indexOf(b):w.toLocaleLowerCase(g).indexOf(b.toLocaleLowerCase(g)),-1!==v&&(y=w.substr(v,b.length),w=w.replace(y,`<strong>${y}</strong>`))),t&&(0,r.Bq)(i,[(0,m.n)(),...n?[(0,m.DY)(o)]:[],...n?[(0,m.Vy)(n.indexOf(c)+1)]:[],["id",`${this.htEditor.rootElement.id}_${s}-${a}`]]),i.innerHTML=w},afterSelectionEnd:(e,n)=>{if(t){const t=e=>{(0,r.Bq)(e,[(0,m.H0)()]),(0,r.Bq)(this.TEXTAREA,...(0,m.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,r.Bq)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,m.gg)()),(0,r.Bq)(this.htEditor.rootElement,[(0,m.$o)(),(0,m.S2)("polite"),(0,m.rE)("text"),["id",`${w(x,this)}-listbox-${i}-${s}`]]),(0,r.Bq)(this.TEXTAREA,...(0,m.dV)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,r.Bq)(this.TEXTAREA,[(0,m.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,r.JC)(this.TEXTAREA),n=(0,r.Xu)(this.TEXTAREA),o=this.cellProperties.sortByRelevance,i=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===i)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,r.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(),r=this.hot.view.getWorkspaceHeight()-n-t,i=o>r&&n>r+t;return i?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(i?n:r,o),i}limitDropdownIfNeeded(e,t){if(t>e){let n=0,o=0,r=0,i=null;do{r=this.htEditor.getRowHeight(o)||this.htEditor.view.getDefaultRowHeight(),n+=r,o+=1}while(n<e);i=n-r,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-i+"px"),this.setDropdownHeight(n-r)}}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(A,this,k).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),C(A,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,r.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,r.nB)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var I=n(95093);const P=()=>window,T=()=>window.document,O=(e,t)=>window.setTimeout(e,t),$=function(e,t,n,o){e.addEventListener(t,n,!!o)},D=function(e,t,n,o){e.removeEventListener(t,n,!!o)},N=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},L=function(e,t){N(e,t)||(e.className=""===e.className?t:e.className+" "+t)},H=function(e,t){var n;e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},z=function(e){return/Array/.test(Object.prototype.toString.call(e))},F=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},j=function(e){let t=e.getDay();return 0===t||6===t},B=function(e){return e%4==0&&e%100!=0||e%400==0},_=function(e,t){return[31,B(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},V=function(e){F(e)&&e.setHours(0,0,0,0)},W=function(e,t){return e.getTime()===t.getTime()},G=function(e,t,n){let o,r;for(o in t)r=void 0!==e[o],r&&"object"==typeof t[o]&&null!==t[o]&&void 0===t[o].nodeName?F(t[o])?n&&(e[o]=new Date(t[o].getTime())):z(t[o])?n&&(e[o]=t[o].slice(0)):e[o]=G({},t[o],n):!n&&r||(e[o]=t[o]);return e},K=function(e,t,n){let o=T().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},X=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},Y=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,r){let i=new Date(o,n,t),s=e.hasMoment?e.moment(i).isoWeek():function(e,t){e.setHours(0,0,0,0);let n=e.getDate(),o=e.getDay(),r=t,i=r-1,s=function(e){return(e+7-1)%7};e.setDate(n+i-s(o));let a=new Date(e.getFullYear(),0,r),l=(e.getTime()-a.getTime())/864e5;return 1+Math.round((l-i+s(a.getDay()))/7)}(i,r);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,r,i){let s,a,l,c,u,d=e._o,h=n===d.minYear,p=n===d.maxYear,f='<div id="'+i+'" class="pika-title" role="heading" aria-live="polite">',m=!0,g=!0;for(l=[],s=0;s<12;s++)l.push('<option value="'+(n===r?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>",z(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?f+=u+c:f+=c+u,h&&(0===o||d.minMonth>=o)&&(m=!1),p&&(11===o||d.maxMonth<=o)&&(g=!1),0===t&&(f+='<button class="pika-prev'+(m?"":" is-disabled")+'" type="button">'+d.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(f+='<button class="pika-next'+(g?"":" is-disabled")+'" type="button">'+d.i18n.nextMonth+"</button>"),f+"</div>"};function ee(e){let t=this,n=t.config(e);t._onMouseDown=function(e){if(!t._v)return;let o=(e=e||P().event).target||e.srcElement;if(o)if(N(o,"is-disabled")||(!N(o,"pika-button")||N(o,"is-empty")||N(o.parentNode,"is-disabled")?N(o,"pika-prev")?t.prevMonth():N(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))),N(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||P().event).target||e.srcElement;n&&(N(n,"pika-select-month")?t.gotoMonth(n.value):N(n,"pika-select-year")&&t.gotoYear(n.value))},t._onKeyChange=function(e){if(e=e||P().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(),F(n)&&t.setDate(n),t._v||t.show())},t._onInputFocus=function(){t.show()},t._onInputClick=function(){t.show()},t._onInputBlur=function(){let e=T().activeElement;do{if(N(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||P().event).target||e.srcElement,r=o;if(o){!hasEventListeners&&N(o,"pika-select")&&(o.onchange||(o.setAttribute("onchange","return;"),$(o,"change",t._onChange)));do{if(N(r,"pika-single")||r===n.trigger)return}while(r=r.parentNode);t._v&&o!==n.trigger&&r!==n.trigger&&t.hide()}},t.el=T().createElement("div"),t.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:""),$(t.el,"mousedown",t._onMouseDown,!0),$(t.el,"touchend",t._onMouseDown,!0),$(t.el,"change",t._onChange),n.keyboardInput&&$(T(),"keydown",t._onKeyChange),n.field&&(n.container?n.container.appendChild(t.el):n.bound?T().body.appendChild(t.el):n.field.parentNode.insertBefore(t.el,n.field.nextSibling),$(n.field,"change",t._onInputChange),n.defaultDate||(n.defaultDate=t._parseFieldValue(),n.setDefaultDate=!0));let o=n.defaultDate;F(o)?n.setDefaultDate?t.setDate(o,!0):t.gotoDate(o):t.gotoDate(new Date),n.bound?(this.hide(),t.el.className+=" is-bound",$(n.trigger,"click",t._onInputClick),$(n.trigger,"focus",t._onInputFocus),$(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,F(t.minDate)||(t.minDate=!1),F(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),z(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,F(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 F(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))),!F(e))return;let n=this._o.minDate,o=this._o.maxDate;F(n)&&e<n?e=n:F(o)&&e>o&&(e=o),this._d=new Date(e.getTime()),V(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(F(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),r=e.getTime();o.setMonth(o.getMonth()+1),o.setDate(o.getDate()-1),t=r<n.getTime()||o.getTime()<r}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,r=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(o.valueOf()+r):"subtract"===e&&(n=new Date(o.valueOf()-r)),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?(V(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?(V(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,r=n.maxYear,i=n.minMonth,s=n.maxMonth,a="";this._y<=o&&(this._y=o,!isNaN(i)&&this._m<i&&(this._m=i)),this._y>=r&&(this._y=r,!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,r,i,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=P().innerWidth||T().documentElement.clientWidth,r=P().innerHeight||T().documentElement.clientHeight,i=T().body.scrollTop||T().documentElement.scrollTop,c=!0,u=!0,l=e.getBoundingClientRect(),s=l.left+P().pageXOffset,a=l.bottom+P().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>r+i||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"),H(this.el,c?"right-aligned":"left-aligned"),H(this.el,u?"top-aligned":"bottom-aligned"))},render:function(e,t,n){let o=this._o,r=new Date,i=_(e,t),s=new Date(e,t,1).getDay(),a=[],l=[];V(r),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=_(d,c),f=i+s,m=f;for(;m>7;)m-=7;f+=7-m;let g=!1;for(let n=0,m=0;n<f;n++){let f=new Date(e,t,n-s+1),b=!!F(this._d)&&W(f,this._d),v=W(f,r),y=-1!==o.events.indexOf(f.toDateString()),w=n<s||n>=i+s,C=n-s+1,x=t,S=e,A=o.startRange&&W(o.startRange,f),E=o.endRange&&W(o.endRange,f),k=o.startRange&&o.endRange&&o.startRange<f&&f<o.endRange;w&&(n<s?(C=p+C,x=c,S=d):(C-=i,x=u,S=h));let R={day:C,month:x,year:S,hasEvent:y,isSelected:b,isToday:v,isDisabled:o.minDate&&f<o.minDate||o.maxDate&&f>o.maxDate||o.disableWeekends&&j(f)||o.disableDayFn&&o.disableDayFn(f),isEmpty:w,isStartRange:A,isEndRange:E,isInRange:k,showDaysInNextAndPreviousMonths:o.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:o.enableSelectionDaysInNextAndPreviousMonths};o.pickWholeWeek&&b&&(g=!0),l.push(Y(R)),7===++m&&(o.showWeekNumber&&l.unshift(Q(this,n-s,t,e,o.firstWeekOfYearMinDays)),a.push(J(l,o.isRTL,o.pickWholeWeek,g)),l=[],m=0,g=!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="'+X(e,t)+'">'+X(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(),H(this.el,"is-hidden"),this._o.bound&&($(T(),"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&&D(T(),"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(),D(this.el,"mousedown",this._onMouseDown,!0),D(this.el,"touchend",this._onMouseDown,!0),D(this.el,"change",this._onChange),e.keyboardInput&&D(T(),"keydown",this._onKeyChange),e.field&&(D(e.field,"change",this._onInputChange),e.bound&&(D(e.trigger,"click",this._onInputClick),D(e.trigger,"focus",this._onInputFocus),D(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 re="date",ie="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 re}init(){if("function"!=typeof I)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,r.vy)(this.datePicker,/ht-theme-.*/g),(0,r.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,r.iQ)(this.datePicker,"htDatepickerHolder");const e=this.hot.getCurrentThemeName();(0,r.vy)(this.datePicker,/ht-theme-.*/g),(0,r.iQ)(this.datePicker,e),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,r.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,r,i){super.prepare(e,t,n,o,r,i)}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:ie})}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(ie),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 r;this.datePicker.style.display="block",this.$datePicker=new ee(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(I),this.$datePicker._onInputFocus=function(){},this.originalValue?(r=this.originalValue,I(r,t,!0).isValid()&&this.$datePicker.setMoment(I(r,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),o||n||this.setValue("")):this.cellProperties.defaultDate?(r=this.cellProperties.defaultDate,I(r,t,!0).isValid()&&this.$datePicker.setMoment(I(r,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,r=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=I(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),r&&r()},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:i}=this.hot.view._wt,{wtTable:s}=null!==(t=i.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,r.DK)(this.TD)}px`;let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-(0,r.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 E{static get EDITOR_TYPE(){return"dropdown"}prepare(e,t,n,o,r,i){i.filter=!1,i.strict=!0,super.prepare(e,t,n,o,r,i)}}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,r.Ie)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}const pe="ht_editor_visible",fe="selectEditor";class me 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,m.MG)()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),(0,r.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,r.nB)(this.selectWrapper,pe)&&(0,r.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,i,a){super.prepare(e,t,n,o,i,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,r.Ie)(this.select),(0,s.v4)(c,((e,t)=>{const n=this.hot.rootDocument.createElement("OPTION");n.value=t,(0,r.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(),i=this.selectWrapper.style;i.height=`${o}px`,i.width=`${n}px`,i.top=`${e}px`,i[this.hot.isRtl()?"right":"left"]=`${t}px`,i.margin="0px",(0,r.iQ)(this.selectWrapper,pe)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:fe};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(fe)}}class ge extends o.t{static get EDITOR_TYPE(){return"time"}prepare(e,t,n,o,r,i){super.prepare(e,t,n,o,r,i),this.TEXTAREA.dir="ltr"}}var be=n(11080),ve=n(69478);function ye(e,t,n,o,i,s,a){ve.j.apply(this,[e,t,n,o,i,s,a]),(0,r.Mv)(t,null==s?"":s,!1)}ye.RENDERER_TYPE="html";var we=n(28061);function Ce(e,t,n,o,i,s,a){const{rootDocument:l}=e,c=a.allowHtml?ye:f.F,u=l.createElement("DIV"),d=e.getSettings().ariaTags;if(u.className="htAutocompleteArrow",d&&u.setAttribute(...(0,m.MG)()),u.appendChild(l.createTextNode(String.fromCharCode(9660))),c.apply(this,[e,t,n,o,i,s,a]),t.firstChild||t.appendChild(l.createTextNode(String.fromCharCode(160))),t.insertBefore(u,t.firstChild),(0,r.iQ)(t,"htAutocomplete"),!e.acArrowListener){const i=new we.A(e);e.acArrowListener=function(i){(0,r.nB)(i.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(n,o),t)},i.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{i.destroy()}))}}function xe(e,t,n,o,r,i,s){Ce.apply(this,[e,t,n,o,r,i,s])}Ce.RENDERER_TYPE="autocomplete",xe.RENDERER_TYPE="dropdown",n(23215),n(81454);var Se=n(63487),Ae=n(49138);const Ee=new WeakMap,ke=new WeakMap,Re="htBadValue",Me="data-row",Ie="data-col",Pe="checkboxRenderer",Te="checkbox";function Oe(e,t,n,o,i,s,l){const{rootDocument:c}=e,u=e.getSettings().ariaTags;ve.j.apply(this,[e,t,n,o,i,s,l]),function(e){let t=ke.get(e);if(!t){const{rootElement:n}=e;t=new we.A(e),t.addEventListener(n,"click",(t=>function(e,t){const{target:n}=e;if(!$e(n))return;if(!n.hasAttribute(Me)||!n.hasAttribute(Ie))return;const o=parseInt(n.getAttribute(Me),10),r=parseInt(n.getAttribute(Ie),10);t.getCellMeta(o,r).readOnly&&e.preventDefault()}(t,e))),t.addEventListener(n,"mouseup",(t=>function(e,t){const{target:n}=e;$e(n)&&n.hasAttribute(Me)&&n.hasAttribute(Ie)&&setTimeout(t.listen,10)}(t,e))),t.addEventListener(n,"change",(t=>function(e,t){const{target:n}=e;if(!$e(n))return;if(!n.hasAttribute(Me)||!n.hasAttribute(Ie))return;const o=parseInt(n.getAttribute(Me),10),r=parseInt(n.getAttribute(Ie),10),i=t.getCellMeta(o,r);if(!i.readOnly){let n=null;n=e.target.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,t.setDataAtCell(o,r,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 f=!1;if(void 0===l.checkedTemplate&&(l.checkedTemplate=!0),void 0===l.uncheckedTemplate&&(l.uncheckedTemplate=!1),(0,r.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,r.iQ)(h,"noValue"):(h.style.display="none",(0,r.iQ)(h,Re),f=!0),(0,r.Bq)(h,[[Me,n],[Ie,o]]),u&&(0,r.Bq)(h,[(0,m.SM)(h.checked?e.getTranslatedPhrase(Ae.CHECKBOX_CHECKED):e.getTranslatedPhrase(Ae.CHECKBOX_UNCHECKED)),(0,m.Xq)(h.checked),(0,m.Pk)()]),!f&&p){let r="";if(p.value)r="function"==typeof p.value?p.value.call(this,n,o,i,s):p.value;else if(p.property){const t=e.getDataAtRowProp(n,p.property);r=null!==t?t:""}const a=function(e,t,n){const o=e.createElement("label");o.className="htCheckboxRendererLabel "+(n?"fullWidth":"");const r=e.createTextNode(t);if(n){const t=e.createElement("span");t.appendChild(r),o.appendChild(t)}else o.appendChild(r);return o.cloneNode(!0)}(c,r,!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 g(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=e.getSelectedRange(),o=[],r=new Map;let i=[],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||(r.has(o.length)?r.set(o.length,[...r.get(o.length),[n,a,null]]):r.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)?i.push([n,a,l.uncheckedTemplate,c]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(u)&&i.push([n,a,l.checkedTemplate,c]):i.push([n,a,l.uncheckedTemplate,c]),s+=1}o.push(s),s=0}i=i.every((e=>{let[,,t]=e;return t===i[0][2]}))?i.map((e=>{let[t,n,o]=e;return[t,n,o]})):i.map((e=>{let[t,n,,o]=e;return[t,n,o.checkedTemplate]})),i.length>0&&o.forEach(((t,n)=>{let o=i.splice(0,t);r.size&&r.has(n)&&(o=[...o,...r.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(),i=t[n].getBottomEndCorner();for(let t=o.row;t<=i.row;t++)for(let n=o.col;n<=i.col;n++){if(e.getCellMeta(t,n).readOnly)continue;const o=e.getCell(t,n);if((0,r.sb)(o)&&o.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}(!p||p&&!p.separated)&&t.appendChild(h),f&&t.appendChild(c.createTextNode("#bad-value#")),Ee.has(e)||(Ee.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),n={group:Pe,relativeToGroup:a.b,position:"before"};t.addShortcuts([{keys:[["space"]],callback:()=>(g(),!b()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}},{keys:[["enter"]],callback:()=>(g(),!b()),runOnlyIf:()=>{const t=e.getSelectedRangeLast();return e.getSettings().enterBeginsEditing&&(null==t?void 0:t.highlight.isCell())&&!e.selection.isMultiple()}},{keys:[["delete"],["backspace"]],callback:()=>(g(!0),!b()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}}],n)}())}function $e(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}function De(e,t,n,o,r,i,s){Ce.apply(this,[e,t,n,o,r,i,s])}Se.R.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,n){const{label:o,type:r,row:i,column:s,prop:a}=t;if(r===Te){if(o){const{value:t,property:r}=o;let l=n;if(t)l="function"==typeof t?t(i,s,a,n):t;else if(r){const e=this.getDataAtRowProp(i,r);l=null!==e?e:n}e=l}return e}})),Oe.RENDERER_TYPE=Te,De.RENDERER_TYPE="handsontable";var Ne,Le,He,ze,Fe,je,Be="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ve(){return Le||(Le=1,Ne={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}}}),Ne}function We(){if(ze)return He;ze=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,r,i,s,a,l,c){if(!isNaN(+o))return+o;let u="",d=o.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==o)return-1*n(d,r,i,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,r,i,s,a,l)*c.factor}if(u=o.replace("%",""),u!==o)return n(u,r,i,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,r,i,s,a,l);let f={};Object.keys(l).forEach((e=>{f[l[e]]=e}));let m=Object.keys(f).sort().reverse(),g=m.length;for(let e=0;e<g;e++){let t=m[e],c=f[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,r,i,s,a,l)*e}}}function o(e,o,r="",i,s,a,l){if(""===e)return;if(e===s)return 0;let c=function(e,n,o){let r=e.replace(o,"");return r=r.replace(new RegExp(`([0-9])${t(n.thousands)}([0-9])`,"g"),"$1$2"),r=r.replace(n.decimal,"."),r}(e,o,r);return n(c,o,r,i,s,a)}return He={unformat:function(e,t){const n=Xe();let r,i=n.currentDelimiters(),s=n.currentCurrency().symbol,a=n.currentOrdinal(),l=n.getZeroFormat(),c=n.currentAbbreviations();if("string"==typeof e)r=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;let n=e.split(":");if(3!==n.length)return!1;let o=+n[0],r=+n[1],i=+n[2];return!isNaN(o)&&!isNaN(r)&&!isNaN(i)}(e,i)?function(e){let t=e.split(":"),n=+t[0],o=+t[1];return+t[2]+60*o+3600*n}(e):o(e,i,s,a,l,c);else{if("number"!=typeof e)return;r=e}if(void 0!==r)return r}},He}function Ge(){if(je)return Fe;je=1;let e=We();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 r(t){return void 0!==e.unformat(t)}function i(e,t,o,r=!1){let s=Object.keys(e).map((r=>{if(!t[r])return console.error(`${o} Invalid key: ${r}`),!1;let s=e[r],a=t[r];if("string"==typeof a&&(a={type:a}),"format"===a.type){if(!i(s,n,`[Validate ${r}]`,!0))return!1}else if(typeof s!==a.type)return console.error(`${o} ${r} 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:i}=a.restrictions[n];if(!t(s,e))return console.error(`${o} ${r} invalid value: ${i}`),!1}}return a.restriction&&!a.restriction(s,e)?(console.error(`${o} ${r} invalid value: ${a.message}`),!1):a.validValues&&-1===a.validValues.indexOf(s)?(console.error(`${o} ${r} invalid value: must be among ${JSON.stringify(a.validValues)}, "${s}" provided`),!1):!(a.children&&!i(s,a.children,`[Validate ${r}]`))}));return r||s.push(...Object.keys(t).map((n=>{let r=t[n];if("string"==typeof r&&(r={type:r}),r.mandatory){let t=r.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 i(e,n,"[Validate format]")}return Fe={validate:function(e,t){let n=r(e),o=s(t);return n&&o},validateFormat:s,validateInput:r,validateLanguage:function(e){return i(e,o,"[Validate language]")}},Fe}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 Xe(){if(Ue)return Ke;Ue=1;const e=Ve(),t=Ge(),n=qe;let o,r={},i={},s=null,a={};function l(e){o=e}function c(){return i[o]}return r.languages=()=>Object.assign({},i),r.currentLanguage=()=>o,r.currentBytes=()=>c().bytes||{},r.currentCurrency=()=>c().currency,r.currentAbbreviations=()=>c().abbreviations,r.currentDelimiters=()=>c().delimiters,r.currentOrdinal=()=>c().ordinal,r.currentDefaults=()=>Object.assign({},c().defaults,a),r.currentOrdinalDefaultFormat=()=>Object.assign({},r.currentDefaults(),c().ordinalFormat),r.currentByteDefaultFormat=()=>Object.assign({},r.currentDefaults(),c().byteFormat),r.currentPercentageDefaultFormat=()=>Object.assign({},r.currentDefaults(),c().percentageFormat),r.currentCurrencyDefaultFormat=()=>Object.assign({},r.currentDefaults(),c().currencyFormat),r.currentTimeDefaultFormat=()=>Object.assign({},r.currentDefaults(),c().timeFormat),r.setDefaults=e=>{e=n.parseFormat(e),t.validateFormat(e)&&(a=e)},r.getZeroFormat=()=>s,r.setZeroFormat=e=>s="string"==typeof e?e:null,r.hasZeroFormat=()=>null!==s,r.languageData=e=>{if(e){if(i[e])return i[e];throw new Error(`Unknown tag "${e}"`)}return c()},r.registerLanguage=(e,n=!1)=>{if(!t.validateLanguage(e))throw new Error("Invalid language data");i[e.languageTag]=e,n&&l(e.languageTag)},r.setLanguage=(t,n=e.languageTag)=>{if(!i[t]){let e=t.split("-")[0],o=Object.keys(i).find((t=>t.split("-")[0]===e));return i[o]?void l(o):void l(n)}l(t)},r.registerLanguage(e),o=e.languageTag,Ke=r}var Ye,Qe={exports:{}};Ye=Qe,function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,r=Math.floor,i="[BigNumber Error] ",s=i+"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 f(e){for(var t,n,o=1,r=e.length,i=e[0]+"";o<r;){for(t=e[o++]+"",n=l-t.length;n--;t="0"+t);i+=t}for(r=i.length;48===i.charCodeAt(--r););return i.slice(0,r+1||1)}function m(e,t){var n,o,r=e.c,i=t.c,s=e.s,a=t.s,l=e.e,c=t.e;if(!s||!a)return null;if(n=r&&!r[0],o=i&&!i[0],n||o)return n?o?0:-a:s;if(s!=a)return s;if(n=s<0,o=l==c,!r||!i)return o?0:!r^n?1:-1;if(!o)return l>c^n?1:-1;for(a=(l=r.length)<(c=i.length)?l:c,s=0;s<a;s++)if(r[s]!=i[s])return r[s]>i[s]^n?1:-1;return l==c?0:l>c^n?1:-1}function g(e,t,n,o){if(e<t||e>n||e!==r(e))throw Error(i+(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 y(e,t,n){var o,r;if(t<0){for(r=n+".";++t;r+=n);e=r+e}else if(++t>(o=e.length)){for(r=n,t-=o;--t;r+=n);e+=r}else t<o&&(e=e.slice(0,t)+"."+e.slice(t));return e}t=function e(t){var w,C,x,S,A,E,k,R,M,I,P=W.prototype={constructor:W,toString:null,valueOf:null},T=new W(1),O=20,$=4,D=-7,N=21,L=-1e7,H=1e7,z=!1,F=1,j=0,B={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},_="0123456789abcdefghijklmnopqrstuvwxyz",V=!0;function W(e,t){var o,i,a,u,d,h,p,f,m=this;if(!(m instanceof W))return new W(e,t);if(null==t){if(e&&!0===e._isBigNumber)return m.s=e.s,void(!e.c||e.e>H?m.c=m.e=null:e.e<L?m.c=[m.e=0]:(m.e=e.e,m.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(m.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,d=e;d>=10;d/=10,u++);return void(u>H?m.c=m.e=null:(m.e=u,m.c=[e]))}f=String(e)}else{if(!n.test(f=String(e)))return x(m,f,h);m.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(u=f.indexOf("."))>-1&&(f=f.replace(".","")),(d=f.search(/e/i))>0?(u<0&&(u=d),u+=+f.slice(d+1),f=f.substring(0,d)):u<0&&(u=f.length)}else{if(g(t,2,_.length,"Base"),10==t&&V)return q(m=new W(e),O+m.e+1,$);if(f=String(e),h="number"==typeof e){if(0*e!=0)return x(m,f,h,t);if(m.s=1/e<0?(f=f.slice(1),-1):1,W.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else m.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(o=_.slice(0,t),u=d=0,p=f.length;d<p;d++)if(o.indexOf(i=f.charAt(d))<0){if("."==i){if(d>u){u=p;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,d=-1,u=0;continue}return x(m,String(e),h,t)}h=!1,(u=(f=C(f,t,10,m.s)).indexOf("."))>-1?f=f.replace(".",""):u=f.length}for(d=0;48===f.charCodeAt(d);d++);for(p=f.length;48===f.charCodeAt(--p););if(f=f.slice(d,++p)){if(p-=d,h&&W.DEBUG&&p>15&&(e>c||e!==r(e)))throw Error(s+m.s*e);if((u=u-d-1)>H)m.c=m.e=null;else if(u<L)m.c=[m.e=0];else{if(m.e=u,m.c=[],d=(u+1)%l,u<0&&(d+=l),d<p){for(d&&m.c.push(+f.slice(0,d)),p-=l;d<p;)m.c.push(+f.slice(d,d+=l));d=l-(f=f.slice(d)).length}else d-=p;for(;d--;f+="0");m.c.push(+f)}}else m.c=[m.e=0]}function G(e,t,n,o){var r,i,s,a,l;if(null==n?n=$:g(n,0,8),!e.c)return e.toString();if(r=e.c[0],s=e.e,null==t)l=f(e.c),l=1==o||2==o&&(s<=D||s>=N)?v(l,s):y(l,s,"0");else if(i=(e=q(new W(e),t,n)).e,a=(l=f(e.c)).length,1==o||2==o&&(t<=i||i<=D)){for(;a<t;l+="0",a++);l=v(l,i)}else if(t-=s,l=y(l,i,"0"),i+1>a){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=i-a)>0)for(i+1==a&&(l+=".");t--;l+="0");return e.s<0&&r?"-"+l:l}function K(e,t){for(var n,o,r=1,i=new W(e[0]);r<e.length;r++)(!(o=new W(e[r])).s||(n=m(i,o))===t||0===n&&i.s===t)&&(i=o);return i}function U(e,t,n){for(var o=1,r=t.length;!t[--r];t.pop());for(r=t[0];r>=10;r/=10,o++);return(n=o+n*l-1)>H?e.c=e.e=null:n<L?e.c=[e.e=0]:(e.e=n,e.c=t),e}function q(e,t,n,i){var s,c,d,h,p,f,m,g=e.c,b=u;if(g){e:{for(s=1,h=g[0];h>=10;h/=10,s++);if((c=t-s)<0)c+=l,d=t,p=g[f=0],m=r(p/b[s-d-1]%10);else if((f=o((c+1)/l))>=g.length){if(!i)break e;for(;g.length<=f;g.push(0));p=m=0,s=1,d=(c%=l)-l+1}else{for(p=h=g[f],s=1;h>=10;h/=10,s++);m=(d=(c%=l)-l+s)<0?0:r(p/b[s-d-1]%10)}if(i=i||t<0||null!=g[f+1]||(d<0?p:p%b[s-d-1]),i=n<4?(m||i)&&(0==n||n==(e.s<0?3:2)):m>5||5==m&&(4==n||i||6==n&&(c>0?d>0?p/b[s-d]:0:g[f-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,i?(t-=e.e+1,g[0]=b[(l-t%l)%l],e.e=-t||0):g[0]=e.e=0,e;if(0==c?(g.length=f,h=1,f--):(g.length=f+1,h=b[l-c],g[f]=d>0?r(p/b[s-d]%b[d])*h:0),i)for(;;){if(0==f){for(c=1,d=g[0];d>=10;d/=10,c++);for(d=g[0]+=h,h=1;d>=10;d/=10,h++);c!=h&&(e.e++,g[0]==a&&(g[0]=1));break}if(g[f]+=h,g[f]!=a)break;g[f--]=0,h=1}for(c=g.length;0===g[--c];g.pop());}e.e>H?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function X(e){var t,n=e.e;return null===n?e.toString():(t=f(e.c),t=n<=D||n>=N?v(t,n):y(t,n,"0"),e.s<0?"-"+t:t)}return W.clone=e,W.ROUND_UP=0,W.ROUND_DOWN=1,W.ROUND_CEIL=2,W.ROUND_FLOOR=3,W.ROUND_HALF_UP=4,W.ROUND_HALF_DOWN=5,W.ROUND_HALF_EVEN=6,W.ROUND_HALF_CEIL=7,W.ROUND_HALF_FLOOR=8,W.EUCLID=9,W.config=W.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(i+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(n=e[t],0,h,t),O=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(n=e[t],0,8,t),$=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(g(n[0],-h,0,t),g(n[1],0,h,t),D=n[0],N=n[1]):(g(n,-h,h,t),D=-(N=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)g(n[0],-h,-1,t),g(n[1],1,h,t),L=n[0],H=n[1];else{if(g(n,-h,h,t),!n)throw Error(i+t+" cannot be zero: "+n);L=-(H=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(i+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw z=!n,Error(i+"crypto unavailable");z=n}else z=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(n=e[t],0,9,t),F=n),e.hasOwnProperty(t="POW_PRECISION")&&(g(n=e[t],0,h,t),j=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(i+t+" not an object: "+n);B=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(i+t+" invalid: "+n);V="0123456789"==n.slice(0,10),_=n}}return{DECIMAL_PLACES:O,ROUNDING_MODE:$,EXPONENTIAL_AT:[D,N],RANGE:[L,H],CRYPTO:z,MODULO_MODE:F,POW_PRECISION:j,FORMAT:B,ALPHABET:_}},W.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!W.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===r(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!==r(n))break e;if(0!==n)return!0}}}else if(null===o&&null===s&&(null===c||1===c||-1===c))return!0;throw Error(i+"Invalid BigNumber: "+e)},W.maximum=W.max=function(){return K(arguments,-1)},W.minimum=W.min=function(){return K(arguments,1)},W.random=(S=9007199254740992,A=Math.random()*S&2097151?function(){return r(Math.random()*S)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,s,a,c,d=0,p=[],f=new W(T);if(null==e?e=O:g(e,0,h),a=o(e/l),z)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 z=!1,Error(i+"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(!z)for(;d<a;)(c=A())<9e15&&(p[d++]=c%1e14);for(a=p[--d],e%=l,a&&e&&(c=u[l-e],p[d]=r(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 f.e=s,f.c=p,f}),W.sum=function(){for(var e=1,t=arguments,n=new W(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 r,i,s=[0],a=0,l=e.length;a<l;){for(i=s.length;i--;s[i]*=t);for(s[0]+=o.indexOf(e.charAt(a++)),r=0;r<s.length;r++)s[r]>n-1&&(null==s[r+1]&&(s[r+1]=0),s[r+1]+=s[r]/n|0,s[r]%=n)}return s.reverse()}return function(n,o,r,i,s){var a,l,c,u,d,h,p,m,g=n.indexOf("."),b=O,v=$;for(g>=0&&(u=j,j=0,n=n.replace(".",""),h=(m=new W(o)).pow(n.length-g),j=u,m.c=t(y(f(h.c),h.e,"0"),10,r,e),m.e=m.c.length),c=u=(p=t(n,o,r,s?(a=_,e):(a=e,_))).length;0==p[--u];p.pop());if(!p[0])return a.charAt(0);if(g<0?--c:(h.c=p,h.e=c,h.s=i,p=(h=w(h,m,b,v,r)).c,d=h.r,c=h.e),g=p[l=c+b+1],u=r/2,d=d||l<0||null!=p[l+1],d=v<4?(null!=g||d)&&(0==v||v==(h.s<0?3:2)):g>u||g==u&&(4==v||d||6==v&&1&p[l-1]||v==(h.s<0?8:7)),l<1||!p[0])n=d?y(a.charAt(1),-b,a.charAt(0)):a.charAt(0);else{if(p.length=l,d)for(--r;++p[--l]>r;)p[l]=0,l||(++c,p=[1].concat(p));for(u=p.length;!p[--u];);for(g=0,n="";g<=u;n+=a.charAt(p[g++]));n=y(n,c,a.charAt(0))}return n}}(),w=function(){function e(e,t,n){var o,r,i,s,a=0,l=e.length,c=t%d,u=t/d|0;for(e=e.slice();l--;)a=((r=c*(i=e[l]%d)+(o=u*i+(s=e[l]/d|0)*c)%d*d+a)/n|0)+(o/d|0)+u*s,e[l]=r%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,o){var r,i;if(n!=o)i=n>o?1:-1;else for(r=i=0;r<n;r++)if(e[r]!=t[r]){i=e[r]>t[r]?1:-1;break}return i}function n(e,t,n,o){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*o+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(o,i,s,c,u){var d,h,f,m,g,b,v,y,w,C,x,S,A,E,k,R,M,I=o.s==i.s?1:-1,P=o.c,T=i.c;if(!(P&&P[0]&&T&&T[0]))return new W(o.s&&i.s&&(P?!T||P[0]!=T[0]:T)?P&&0==P[0]||!T?0*I:I/0:NaN);for(w=(y=new W(I)).c=[],I=s+(h=o.e-i.e)+1,u||(u=a,h=p(o.e/l)-p(i.e/l),I=I/l|0),f=0;T[f]==(P[f]||0);f++);if(T[f]>(P[f]||0)&&h--,I<0)w.push(1),m=!0;else{for(E=P.length,R=T.length,f=0,I+=2,(g=r(u/(T[0]+1)))>1&&(T=e(T,g,u),P=e(P,g,u),R=T.length,E=P.length),A=R,x=(C=P.slice(0,R)).length;x<R;C[x++]=0);M=T.slice(),M=[0].concat(M),k=T[0],T[1]>=u/2&&k++;do{if(g=0,(d=t(T,C,R,x))<0){if(S=C[0],R!=x&&(S=S*u+(C[1]||0)),(g=r(S/k))>1)for(g>=u&&(g=u-1),v=(b=e(T,g,u)).length,x=C.length;1==t(b,C,v,x);)g--,n(b,R<v?M:T,v,u),v=b.length,d=1;else 0==g&&(d=g=1),v=(b=T.slice()).length;if(v<x&&(b=[0].concat(b)),n(C,b,x,u),x=C.length,-1==d)for(;t(T,C,R,x)<1;)g++,n(C,R<x?M:T,x,u),x=C.length}else 0===d&&(g++,C=[0]);w[f++]=g,C[0]?C[x++]=P[A]||0:(C=[P[A]],x=1)}while((A++<E||null!=C[0])&&I--);m=null!=C[0],w[0]||w.splice(0,1)}if(u==a){for(f=1,I=w[0];I>=10;I/=10,f++);q(y,s+(y.e=f+h*l-1)+1,c,m)}else y.e=h,y.r=+m;return y}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,k=/^([^.]+)\.$/,R=/^\.([^.]+)$/,M=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,x=function(e,t,n,o){var r,s=n?t:t.replace(I,"");if(M.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!n&&(s=s.replace(E,(function(e,t,n){return r="x"==(n=n.toLowerCase())?16:"b"==n?2:8,o&&o!=r?e:t})),o&&(r=o,s=s.replace(k,"$1").replace(R,"0.$1")),t!=s))return new W(s,r);if(W.DEBUG)throw Error(i+"Not a"+(o?" base "+o:"")+" number: "+t);e.s=null}e.c=e.e=null},P.absoluteValue=P.abs=function(){var e=new W(this);return e.s<0&&(e.s=1),e},P.comparedTo=function(e,t){return m(this,new W(e,t))},P.decimalPlaces=P.dp=function(e,t){var n,o,r,i=this;if(null!=e)return g(e,0,h),null==t?t=$:g(t,0,8),q(new W(i),e+i.e+1,t);if(!(n=i.c))return null;if(o=((r=n.length-1)-p(this.e/l))*l,r=n[r])for(;r%10==0;r/=10,o--);return o<0&&(o=0),o},P.dividedBy=P.div=function(e,t){return w(this,new W(e,t),O,$)},P.dividedToIntegerBy=P.idiv=function(e,t){return w(this,new W(e,t),0,1)},P.exponentiatedBy=P.pow=function(e,t){var n,s,a,c,u,d,h,p,f=this;if((e=new W(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+X(e));if(null!=t&&(t=new W(t)),u=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return p=new W(Math.pow(+X(f),u?e.s*(2-b(e)):+X(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new W(NaN);(s=!d&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||u&&f.c[1]>=24e7:f.c[0]<8e13||u&&f.c[0]<=9999975e7)))return c=f.s<0&&b(e)?-0:0,f.e>-1&&(c=1/c),new W(d?1/c:c);j&&(c=o(j/l+2))}for(u?(n=new W(.5),d&&(e.s=1),h=b(e)):h=(a=Math.abs(+X(e)))%2,p=new W(T);;){if(h){if(!(p=p.times(f)).c)break;c?p.c.length>c&&(p.c.length=c):s&&(p=p.mod(t))}if(a){if(0===(a=r(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=+X(e)))break;h=a%2}f=f.times(f),c?f.c&&f.c.length>c&&(f.c.length=c):s&&(f=f.mod(t))}return s?p:(d&&(p=T.div(p)),t?p.mod(t):c?q(p,j,$,void 0):p)},P.integerValue=function(e){var t=new W(this);return null==e?e=$:g(e,0,8),q(t,t.e+1,e)},P.isEqualTo=P.eq=function(e,t){return 0===m(this,new W(e,t))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(e,t){return m(this,new W(e,t))>0},P.isGreaterThanOrEqualTo=P.gte=function(e,t){return 1===(t=m(this,new W(e,t)))||0===t},P.isInteger=function(){return!!this.c&&p(this.e/l)>this.c.length-2},P.isLessThan=P.lt=function(e,t){return m(this,new W(e,t))<0},P.isLessThanOrEqualTo=P.lte=function(e,t){return-1===(t=m(this,new W(e,t)))||0===t},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(e,t){var n,o,r,i,s=this,c=s.s;if(t=(e=new W(e,t)).s,!c||!t)return new W(NaN);if(c!=t)return e.s=-t,s.plus(e);var u=s.e/l,d=e.e/l,h=s.c,f=e.c;if(!u||!d){if(!h||!f)return h?(e.s=-t,e):new W(f?s:NaN);if(!h[0]||!f[0])return f[0]?(e.s=-t,e):new W(h[0]?s:3==$?-0:0)}if(u=p(u),d=p(d),h=h.slice(),c=u-d){for((i=c<0)?(c=-c,r=h):(d=u,r=f),r.reverse(),t=c;t--;r.push(0));r.reverse()}else for(o=(i=(c=h.length)<(t=f.length))?c:t,c=t=0;t<o;t++)if(h[t]!=f[t]){i=h[t]<f[t];break}if(i&&(r=h,h=f,f=r,e.s=-e.s),(t=(o=f.length)-(n=h.length))>0)for(;t--;h[n++]=0);for(t=a-1;o>c;){if(h[--o]<f[o]){for(n=o;n&&!h[--n];h[n]=t);--h[n],h[o]+=a}h[o]-=f[o]}for(;0==h[0];h.splice(0,1),--d);return h[0]?U(e,h,d):(e.s=3==$?-1:1,e.c=[e.e=0],e)},P.modulo=P.mod=function(e,t){var n,o,r=this;return e=new W(e,t),!r.c||!e.s||e.c&&!e.c[0]?new W(NaN):!e.c||r.c&&!r.c[0]?new W(r):(9==F?(o=e.s,e.s=1,n=w(r,e,0,3),e.s=o,n.s*=o):n=w(r,e,0,F),(e=r.minus(n.times(e))).c[0]||1!=F||(e.s=r.s),e)},P.multipliedBy=P.times=function(e,t){var n,o,r,i,s,c,u,h,f,m,g,b,v,y,w,C=this,x=C.c,S=(e=new W(e,t)).c;if(!(x&&S&&x[0]&&S[0]))return!C.s||!e.s||x&&!x[0]&&!S||S&&!S[0]&&!x?e.c=e.e=e.s=null:(e.s*=C.s,x&&S?(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)<(m=S.length)&&(v=x,x=S,S=v,r=u,u=m,m=r),r=u+m,v=[];r--;v.push(0));for(y=a,w=d,r=m;--r>=0;){for(n=0,g=S[r]%w,b=S[r]/w|0,i=r+(s=u);i>r;)n=((h=g*(h=x[--s]%w)+(c=b*h+(f=x[s]/w|0)*g)%w*w+v[i]+n)/y|0)+(c/w|0)+b*f,v[i--]=h%y;v[i]=n}return n?++o:v.splice(0,1),U(e,v,o)},P.negated=function(){var e=new W(this);return e.s=-e.s||null,e},P.plus=function(e,t){var n,o=this,r=o.s;if(t=(e=new W(e,t)).s,!r||!t)return new W(NaN);if(r!=t)return e.s=-t,o.minus(e);var i=o.e/l,s=e.e/l,c=o.c,u=e.c;if(!i||!s){if(!c||!u)return new W(r/0);if(!c[0]||!u[0])return u[0]?e:new W(c[0]?o:0*r)}if(i=p(i),s=p(s),c=c.slice(),r=i-s){for(r>0?(s=i,n=u):(r=-r,n=c),n.reverse();r--;n.push(0));n.reverse()}for((r=c.length)-(t=u.length)<0&&(n=u,u=c,c=n,t=r),r=0;t;)r=(c[--t]=c[t]+u[t]+r)/a|0,c[t]=a===c[t]?0:c[t]%a;return r&&(c=[r].concat(c),++s),U(e,c,s)},P.precision=P.sd=function(e,t){var n,o,r,i=this;if(null!=e&&e!==!!e)return g(e,1,h),null==t?t=$:g(t,0,8),q(new W(i),e,t);if(!(n=i.c))return null;if(o=(r=n.length-1)*l+1,r=n[r]){for(;r%10==0;r/=10,o--);for(r=n[0];r>=10;r/=10,o++);}return e&&i.e+1>o&&(o=i.e+1),o},P.shiftedBy=function(e){return g(e,-9007199254740991,c),this.times("1e"+e)},P.squareRoot=P.sqrt=function(){var e,t,n,o,r,i=this,s=i.c,a=i.s,l=i.e,c=O+4,u=new W("0.5");if(1!==a||!s||!s[0])return new W(!a||a<0&&(!s||s[0])?NaN:s?i:1/0);if(0==(a=Math.sqrt(+X(i)))||a==1/0?(((t=f(s)).length+l)%2==0&&(t+="0"),a=Math.sqrt(+t),l=p((l+1)/2)-(l<0||l%2),n=new W(t=a==1/0?"5e"+l:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new W(a+""),n.c[0])for((a=(l=n.e)+c)<3&&(a=0);;)if(r=n,n=u.times(r.plus(w(i,r,c,1))),f(r.c).slice(0,a)===(t=f(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(i));break}if(!o&&(q(r,r.e+O+2,0),r.times(r).eq(i))){n=r;break}c+=4,a+=4,o=1}return q(n,n.e+O+1,$,e)},P.toExponential=function(e,t){return null!=e&&(g(e,0,h),e++),G(this,e,t,1)},P.toFixed=function(e,t){return null!=e&&(g(e,0,h),e=e+this.e+1),G(this,e,t)},P.toFormat=function(e,t,n){var o,r=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(i+"Argument not an object: "+n);if(o=r.toFixed(e,t),r.c){var s,a=o.split("."),l=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",d=a[0],h=a[1],p=r.s<0,f=p?d.slice(1):d,m=f.length;if(c&&(s=l,l=c,c=s,m-=s),l>0&&m>0){for(s=m%l||l,d=f.substr(0,s);s<m;s+=l)d+=u+f.substr(s,l);c>0&&(d+=u+f.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||"")},P.toFraction=function(e){var t,n,o,r,s,a,c,d,h,p,m,g,b=this,v=b.c;if(null!=e&&(!(c=new W(e)).isInteger()&&(c.c||1!==c.s)||c.lt(T)))throw Error(i+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+X(c));if(!v)return new W(b);for(t=new W(T),h=n=new W(T),o=d=new W(T),g=f(v),s=t.e=g.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=H,H=1/0,c=new W(g),d.c[0]=0;p=w(c,t,0,1),1!=(r=n.plus(p.times(o))).comparedTo(e);)n=o,o=r,h=d.plus(p.times(r=h)),d=r,t=c.minus(p.times(r=t)),c=r;return r=w(e.minus(n),o,0,1),d=d.plus(r.times(h)),n=n.plus(r.times(o)),d.s=h.s=b.s,m=w(h,o,s*=2,$).minus(b).abs().comparedTo(w(d,n,s,$).minus(b).abs())<1?[h,o]:[d,n],H=a,m},P.toNumber=function(){return+X(this)},P.toPrecision=function(e,t){return null!=e&&g(e,1,h),G(this,e,t,2)},P.toString=function(e){var t,n=this,o=n.s,r=n.e;return null===r?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=r<=D||r>=N?v(f(n.c),r):y(f(n.c),r,"0"):10===e&&V?t=y(f((n=q(new W(n),O+r+1,$)).c),n.e,"0"):(g(e,2,_.length,"Base"),t=C(y(f(n.c),r,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},P.valueOf=P.toJSON=function(){return X(this)},P._isBigNumber=!0,null!=t&&W.set(t),W}(),t.default=t.BigNumber=t,Ye.exports?Ye.exports=t:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=t)}(Be);var Je=Qe.exports;const Ze=Xe(),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)},rt={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:it,decimalSuffixes:st}=Ze.currentBytes(),at={general:{scale:1024,suffixes:st,marker:"bd"},binary:{scale:1024,suffixes:it,marker:"b"},decimal:{scale:1e3,suffixes:st,marker:"d"}};function lt(e,t,n){let o=t[0],r=Math.abs(e);if(r>=n){for(let i=1;i<t.length;++i){let s=Math.pow(n,i),a=Math.pow(n,i+1);if(r>=s&&r<a){o=t[i],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:r=n.currentDefaults()}){let i=e._value;if(0===i&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(i))return i.toString();let s=Object.assign({},rt,r,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,f=!a&&(void 0===t.optionalMantissa?-1===p:s.optionalMantissa),m=s.trimMantissa,g=s.thousandSeparated,b=s.spaceSeparated,v=s.negative,y=s.forceSign,w=s.exponential,C=s.roundingFunction,x="";if(h){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:o,spaceSeparated:r=!1,totalLength:i=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=(r?" ":"")+a),i){let t=e<0,n=e.toString().split(".")[0],o=t?n.length-1:n.length;c=Math.max(i-o,0)}return{value:e,abbreviation:a,mantissaPrecision:c}}({value:i,forceAverage:u,lowPrecision:d,abbreviations:n.currentAbbreviations(),spaceSeparated:b,roundingFunction:C,totalLength:a});i=e.value,x+=e.abbreviation,a&&(p=e.mantissaPrecision)}if(w){let e=function({value:e,characteristicPrecision:t}){let[n,o]=e.toExponential().split("e"),r=+n;return t?(1<t&&(r*=Math.pow(10,t-1),o=+o-(t-1),o=o>=0?`+${o}`:o),{value:r,abbreviation:`e${o}`}):{value:r,abbreviation:`e${o}`}}({value:i,characteristicPrecision:l});i=e.value,x=e.abbreviation+x}let S=function(e,t,n,o,r,i){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,r]=n.split("e"),[i,s=""]=o.split(".");if(+r>0)n=i+s+ct(r-s.length);else{let e=".";e=+i<0?`-0${e}`:`0${e}`;let o=(ct(-r-1)+Math.abs(i)+s).substr(0,t);o.length<t&&(o+=ct(t-o.length)),n=e+o}return+r>0&&t>0&&(n+=`.${ct(t)}`),n}(e,t):new nt(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,o,i),[a,l=""]=s.toString().split(".");if(l.match(/^0+$/)&&(n||r))return a;let c=l.match(/0+$/);return r&&c?`${a}.${l.toString().slice(0,c.index)}`:s.toString()}(i.toString(),i,f,p,m,C);return S=function(e,t,n,o){let r=e,[i,s]=r.toString().split(".");if(i.match(/^-?0$/)&&n)return s?`${i.replace("0","")}.${s}`:i.replace("0","");const a=t<0&&0===i.indexOf("-");if(a&&(i=i.slice(1),r=r.slice(1)),i.length<o){let e=o-i.length;for(let t=0;t<e;t++)r=`0${r}`}return a&&(r=`-${r}`),r.toString()}(S,i,c,l),S=function(e,t,n,o,r){let i=o.currentDelimiters(),s=i.thousands;r=r||i.decimal;let a=i.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 r=e;r>0;r--)o===t&&(n.unshift(r),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+r+u:c,l}(S,i,g,n,o),(h||w)&&(S=function(e,t){return e+t}(S,x)),(y||i<0)&&(S=function(e,t,n){return 0===t?e:0===+e?e.replace("-",""):t>0?`+${e}`:"sign"===n?e:`(${e.replace("-","")})`}(S,i,v)),S}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),r=t;return n.isNumbro(t)&&(r=t._value),r=new ht(r),e._value=o.minus(r).toNumber(),e}const ft=Xe(),mt=Ge(),gt=(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)}))(St),bt=We();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||"",r=t.postfix||"",i=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){const o=n.currentCurrency();let r,i=Object.assign({},t),s=Object.assign({},rt,i),a="",l=!!s.totalLength||!!s.forceAverage||s.average,c=i.currencyPosition||o.position,u=i.currencySymbol||o.symbol;const d=void 0!==s.spaceSeparatedCurrency?s.spaceSeparatedCurrency:s.spaceSeparated;void 0===i.lowPrecision&&(i.lowPrecision=!1),d&&(a=" "),"infix"===c&&(r=a+u+a);let h=ut({instance:e,providedFormat:i,state:n,decimalSeparator:r});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 r=t.prefixSymbol,i=ut({instance:o(100*e._value),providedFormat:t,state:n}),s=Object.assign({},rt,t);return r?`%${s.spaceSeparated?" ":""}${i}`:`${i}${s.spaceSeparated?" ":""}%`}(e,t=dt(t,Ze.currentPercentageDefaultFormat()),Ze,n);case"byte":return function(e,t,n,o){let r=t.base||"binary",i=Object.assign({},rt,t);const{binarySuffixes:s,decimalSuffixes:a}=n.currentBytes();let l={general:{scale:1024,suffixes:a||st,marker:"bd"},binary:{scale:1024,suffixes:s||it,marker:"b"},decimal:{scale:1e3,suffixes:a||st,marker:"d"}}[r],{value:c,suffix:u}=lt(e._value,l.suffixes,l.scale);return`${ut({instance:o(c),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()})}${i.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(),r=Object.assign({},rt,t),i=ut({instance:e,providedFormat:t,state:n}),s=o(e._value);return`${i}${r.spaceSeparated?" ":""}${s}`}(e,t=dt(t,Ze.currentOrdinalDefaultFormat()),Ze);default:return ut({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return i=function(e,t){return t+e}(i,o),i=function(e,t){return e+t}(i,r),i}(...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}))(St),yt=(e=>({add:(t,n)=>function(e,t,n){let o=new ht(e._value),r=t;return n.isNumbro(t)&&(r=t._value),r=new ht(r),e._value=o.plus(r).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),r=t;return n.isNumbro(t)&&(r=t._value),r=new ht(r),e._value=o.times(r).toNumber(),e}(t,n,e),divide:(t,n)=>function(e,t,n){let o=new ht(e._value),r=t;return n.isNumbro(t)&&(r=t._value),r=new ht(r),e._value=o.dividedBy(r).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}))(St);const wt=qe;class Ct{constructor(e){this._value=e}clone(){return St(this._value)}format(e={}){return vt.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=wt.parseFormat(e)),(e=vt.formatOrDefault(e,ft.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 yt.difference(this,e)}add(e){return yt.add(this,e)}subtract(e){return yt.subtract(this,e)}multiply(e){return yt.multiply(this,e)}divide(e){return yt.divide(this,e)}set(e){return yt.set(this,xt(e))}value(){return this._value}valueOf(){return this._value}}function xt(e){let t=e;return St.isNumbro(e)?t=e._value:"string"==typeof e?t=St.unformat(e):isNaN(e)&&(t=NaN),t}function St(e){return new Ct(xt(e))}St.version="2.5.0",St.isNumbro=function(e){return e instanceof Ct},St.language=ft.currentLanguage,St.registerLanguage=ft.registerLanguage,St.setLanguage=ft.setLanguage,St.languages=ft.languages,St.languageData=ft.languageData,St.zeroFormat=ft.setZeroFormat,St.defaultFormat=ft.currentDefaults,St.setDefaults=ft.setDefaults,St.defaultCurrencyFormat=ft.currentCurrencyDefaultFormat,St.validate=mt.validate,St.loadLanguagesInNode=gt.loadLanguagesInNode,St.unformat=bt.unformat,St.BigNumber=yt.BigNumber;var At=_e(St),Et=n(71409);function kt(e,t){if((0,Et.kf)(e)){const n=t.numericFormat,o=n&&n.culture||"-",r=n&&n.pattern;if(void 0!==o&&!At.languages()[o]){const e=o.replace("-",""),t=At.allLanguages?At.allLanguages[o]:At[e];t&&At.registerLanguage(t)}At.setLanguage(o),e=At(e).format(r||"0")}return e}function Rt(e,t,n,o,r,i,s){let a=i;if((0,Et.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,f.F)(e,t,n,o,r,a,s)}function Mt(e,t,n,o,i,s,a){f.F.apply(this,[e,t,n,o,i,s,a]);const l=a.hashLength||t.innerHTML.length,c=a.hashSymbol||"*";let u="";(0,Et.Ti)(l-1,(()=>{u+=c})),(0,r.Mv)(t,u)}function It(e,t,n,o,r,i,s){f.F.apply(this,[e,t,n,o,r,i,s])}function Pt(e,t,n,o,r,i,s){f.F.apply(this,[e,t,n,o,r,i,s]),t.dir="ltr"}Rt.RENDERER_TYPE="numeric",Mt.RENDERER_TYPE="password",It.RENDERER_TYPE="select",Pt.RENDERER_TYPE="time";var Tt=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,$t(n,t)):$t(n,t)(this.source):t(!0)}function $t(e,t){const n=e;return function(e){let o=!1;for(let t=0,r=e.length;t<r;t++)if(n===e[t]){o=!0;break}t(o)}}function Dt(e,t){const n=(0,be.L3)(re,this.instance);let o=e,r=!0;null==o&&(o="");let i=I(o,this.dateFormat||n.defaultDateFormat,!0).isValid(),s=I(new Date(o)).isValid()||i;if(this.allowEmpty&&""===o&&(s=!0,i=!0),s||(r=!1),!s&&i&&(r=!0),s&&!i)if(!0===this.correctFormat){const e=function(e,t){const n=I(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=I(e,t),r=e.search(/[A-Za-z]/g)>-1;let i;return i=n.isValid()&&n.format("x")===o.format("x")||!o.isValid()||r?n:o,i.format(t)}(o,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),r=!0}else r=!1;t(r)}function Nt(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,Et.kf)(e))}Ot.VALIDATOR_TYPE="autocomplete",Dt.VALIDATOR_TYPE="date",Nt.VALIDATOR_TYPE="dropdown",Lt.VALIDATOR_TYPE="numeric";const Ht=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];function zt(e,t){const n=this.timeFormat||"h:mm:ss a";let o=!0,r=e;null===r&&(r=""),r=/^\d{3,}$/.test(r)?parseInt(r,10):r;const i=/^\d{1,2}$/.test(r);i&&(r+=":00");const s=I(r,Ht,!0).isValid()?I(r):I(r,n);let a=s.isValid(),l=I(r,n,!0).isValid()&&!i;if(this.allowEmpty&&""===r&&(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)}zt.VALIDATOR_TYPE="time";var Ft=n(82993);const jt={CELL_TYPE:"autocomplete",editor:E,renderer:Ce,validator:Ot},Bt={CELL_TYPE:"checkbox",editor:M,renderer:Oe};function _t(e,t,n,o,r,i,s){Ce.apply(this,[e,t,n,o,r,i,s])}_t.RENDERER_TYPE="date";const Vt={CELL_TYPE:"date",editor:ae,renderer:_t,validator:Dt},Wt={CELL_TYPE:"dropdown",editor:ce,renderer:xe,validator:Nt,filter:!1,strict:!0},Gt={CELL_TYPE:"handsontable",editor:c,renderer:De},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:me,renderer:It};var Xt=n(34675);const Yt={CELL_TYPE:"time",editor:ge,renderer:Pt,validator:zt};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",Tt.sl],["validator",Ft.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 we.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,r;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!==(r=t[e])&&void 0!==r?r: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 fn=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,r.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 r=o.col,i=this.hot.getCellMeta(e,r),s=this.hot.getCellRenderer(i),a=t.createElement("td");a.setAttribute("ghost-table",1),s(this.hot,a,e,r,this.hot.colToProp(r),o.value,i),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 r=o.col,i=e.createElement("th");n.push([r,i]),t.appendChild(i)}))})),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 r=o.row,i=this.hot.getCellMeta(r,e),s=this.hot.getCellRenderer(i),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),s(this.hot,a,r,e,this.hot.colToProp(e),o.value,i),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 r=this.hot.getColWidth(e);if(o>1)for(let t=e+1;t<e+o;t++)r+=this.hot.getColWidth(t);return n.style.width=`${r}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"),i=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),i.appendChild(l),o.style.tableLayout="auto",o.style.width="auto"),o.appendChild(i),this.isVertical()&&s.appendChild(l),o.appendChild(s),(0,r.iQ)(o,e),n.appendChild(o),{fragment:n,table:o,tHead:i,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"),i=`htGhostTable htAutoSize ${e.trim()}`;return(0,r.iQ)(o,i),n.appendChild(o),{fragment:n,container:o}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}};function mn(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 gn{static get SAMPLE_COUNT(){return 3}constructor(e){mn(this,"samples",null),mn(this,"dataFactory",null),mn(this,"customSampleCount",null),mn(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:gn.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:r,to:i}="number"==typeof n?{from:n,to:n}:n;return(0,Et.Ti)(r,i,(n=>{const r=this.generateSample(e,t,n);o.set(n,r)})),o}generateSample(e,t,n){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const o=new Map,r="row"===e?"col":"row",i=[];return(0,Et.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&&(!(i.indexOf(l)>-1)||this.allowDuplicates||u)&&(p.strings.push({value:l,[r]:t}),i.push(l),p.needed-=1)})),o}}const bn=gn;var vn=n(94726),yn=n(48386);function wn(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 Sn(e,t){return e.get(En(e,t))}function An(e,t,n){return e.set(En(e,t),n),n}function En(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")}Se.R.getSingleton().register("modifyAutoColumnSizeSeed");const kn="autoColumnSize";var Rn=new WeakMap,Mn=new WeakMap,In=new WeakMap,Pn=new WeakSet;class Tn 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=Pn),t.add(this),xn(this,"ghostTable",new fn(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 r=this.hot.getCellMeta(e,t);let i="";r.spanned||(i=this.hot.getDataAtCell(e,t));let s="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(s=this.hot.runHooks("modifyAutoColumnSizeSeed",s,r,i)),{value:i,bundleSeed:s}}))),xn(this,"inProgress",!1),xn(this,"measuredColumns",0),xn(this,"columnWidthsMap",new yn._),wn(this,Rn,!1),wn(this,Mn,[]),wn(this,In,[]),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,n)=>En(Pn,this,zn).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 En(Pn,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 En(Pn,e,Hn).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 En(Pn,e,jn).call(e,...n)})),this.addHook("beforeRender",(()=>En(Pn,this,Nn).call(this))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("init",(()=>En(Pn,this,Fn).call(this))),super.enablePlugin()}updatePlugin(){An(In,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,n)=>En(Pn,this,zn).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,r="number"==typeof t?{from:t,to:t}:t;(0,Et.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))&&En(Pn,this,$n).call(this,e,r)})),this.ghostTable.columns.length&&(En(Pn,this,Dn).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 r=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,hn.uU)(r),void(this.inProgress=!1);this.calculateColumnsWidth({from:n,to:Math.min(n+Tn.CALCULATION_STEP,o)},e,t),n=n+Tn.CALCULATION_STEP+1,n<o?r=(0,hn.xi)(i):((0,hn.uU)(r),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?i():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=Tn.SYNC_CALCULATION_LIMIT;const n=this.hot.countCols()-1;return(0,s.Gv)(e)&&(t=e.syncLimit,(0,h.Pi)(t)?t=(0,Et.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=Sn(Mn,this).length;return(o-1<n||Sn(Mn,this)[n]!==t)&&e.push(this.hot.toVisualColumn(n)),o-1<n?Sn(Mn,this).push(t):Sn(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)||En(Pn,this,$n).call(this,e,t))})),this.ghostTable.columns.length&&(En(Pn,this,Dn).call(this),this.ghostTable.clean())}function $n(e,t){this.samplesGenerator.generateColumnSamples(e,t).forEach(((e,t)=>this.ghostTable.addColumn(t,e)))}function Dn(){this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const n=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(n,t)}))}),!0)}function Nn(){this.calculateVisibleColumnsWidth(),this.inProgress||(En(Pn,this,On).call(this,Sn(In,this)),An(In,this,[]))}function Ln(e,t){t||this.recalculateAllColumnsWidth()}function Hn(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}),[]);Sn(In,this).push(...t)}function zn(e,t,n){let o=e;return n&&(this.calculateColumnsWidth(t,void 0,!0),o=this.getColumnWidth(t,void 0,!1)),o}function Fn(){An(Mn,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth(),An(Rn,this,!0)}function jn(e){if(!Sn(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}),[]);Sn(In,this).push(...t)}const Bn={horizontal:"horizontal",vertical:"vertical"};function _n(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 Vn(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")}Se.R.getSingleton().register("modifyAutofillRange"),Se.R.getSingleton().register("beforeAutofill"),Se.R.getSingleton().register("afterAutofill");const Wn="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),_n(this,"addingStarted",!1),_n(this,"mouseDownOnCellCorner",!1),_n(this,"mouseDragOutside",!1),_n(this,"handleDraggedCells",0),_n(this,"directions",[]),_n(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return Wn}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[Wn,...Gn]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>Vn(Kn,this,Xn).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>Vn(Kn,this,qn).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>Vn(Kn,this,Yn).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:r}=e.getBottomEndCorner(),i=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:n,endRow:o,endCol:r}]),s=[],a=[],l=[];return(0,u.z0)(i,(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(),r=this.hot.getSelectedRangeLast(),i=r.getTopStartCorner(),s=r.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[i.row,i.col,s.row,s.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(i.row,e),Math.min(i.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,r,i;return t[0]===e[0]&&t[1]<e[1]?(i="left",o=n(t[0],t[1]),r=n(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(i="right",o=n(t[0],e[3]+1),r=n(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(i="up",o=n(t[0],t[1]),r=n(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(i="down",o=n(e[2]+1,t[1]),r=n(t[2],t[3])),o&&o.normalize(),r&&r.normalize(),{directionOfDrag:i,startOfDragCoords:o,endOfDragCoords:r}}(a,l,((e,t)=>this.hot._createCellCoords(e,t)));if(u&&u.row>-1&&u.col>-1){const e=this.getSelectionData(),t=r.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 i=o;const s=o;if(["up","left"].indexOf(c)>-1&&(1!==s.length||0!==s[0].length))if(i=[],"up"===c){const e=d.row-u.row+1,t=e%s.length;for(let n=0;n<e;n++)i.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++){i.push([]);for(let o=0;o<e;o++)i[n].push(s[n][(o+(s[n].length-t))%s[n].length])}}this.hot.populateFromArray(u.row,u.col,i,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",i,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 r=t.getTopStartCorner();(n.col<=e.col||r.col>=e.col)&&(o=this.hot._createCellCoords(n.row,e.col)),(n.row<e.row||r.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 r=e[2]+1;r<n;r++){for(let n=e[1];n<=e[3];n++){const e=t[r][n];if(!(0,d.Im)(e))return-1}const n=t[r][e[1]-1],i=t[r][e[3]+1];(0,d.Im)(n)&&(0,d.Im)(i)||(o=r)}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,r.cY)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,r.DK)(this.hot.table),o=(0,r.cY)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,r.Gq)(this.hot.table);return e.clientY>n&&e.clientX<=o}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>Vn(Kn,this,Qn).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>Vn(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 Xn(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function Yn(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(ro(e,t),n),n}function oo(e,t){return e.get(ro(e,t))}function ro(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 io="autoRowSize";var so=new WeakMap,ao=new WeakMap,lo=new WeakSet;class co extends un{static get PLUGIN_KEY(){return io}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 fn(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 r;return e>=0?r=this.hot.getDataAtCell(e,t):-1===e&&(r=this.hot.getColHeader(t)),{value:r}}))),to(this,"inProgress",!1),to(this,"measuredRows",0),to(this,"rowHeightsMap",new yn._),Zn(this,so,[]),Zn(this,ao,!1),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,n)=>ro(lo,this,po).call(this,e,t,n)))}isEnabled(){const e=this.hot.getSettings()[io];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 ro(lo,e,fo).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 ro(lo,e,mo).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 ro(lo,e,bo).call(e,...n)})),this.addHook("beforeRender",(()=>ro(lo,this,ho).call(this))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("init",(()=>ro(lo,this,go).call(this))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin()}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,n)=>ro(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,r="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,r);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,Et.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,r).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 r=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,hn.uU)(r),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?r=(0,hn.xi)(i):((0,hn.uU)(r),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?i():(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()[io];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,Et.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,Et.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||(ro(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 fo(e,t){t||this.recalculateAllRowsHeight()}function mo(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 go(){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),yo=n(77792);const wo=new Map([["indexesSequence",{getListWithInsertedItems:vo.N,getListWithRemovedItems:vo.H}],["physicallyIndexed",{getListWithInsertedItems:yo.N,getListWithRemovedItems:yo.H}]]),Co=e=>{if(!1===wo.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return wo.get(e)};var xo=n(41895),So=n(13317);const{getListWithInsertedItems:Ao,getListWithRemovedItems:Eo}=Co("physicallyIndexed");class ko extends xo.n{constructor(){super((e=>e))}insert(e,t){const n=(0,So.z)(this.indexedValues,t);this.indexedValues=Ao(n,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=Eo(this.indexedValues,e);this.indexedValues=(0,So.v)(t,e),super.remove(e)}}const Ro=ko,{getListWithInsertedItems:Mo,getListWithRemovedItems:Io}=Co("physicallyIndexed");class Po 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=Io(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}const To="bindRowsWithHeaders",Oo=new Map([["loose",Ro],["strict",Po]]);var $o=new WeakSet;class Do 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=$o),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 To}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[To]}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")}($o,this,No).call(this,e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function No(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}var Lo=n(82617);function Ho(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zo(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 Fo(e,t){return e.get(Bo(e,t))}function jo(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 _o="collapsibleColumns",Vo=["nestedHeaders"],Wo="collapsibleIndicator",Go=_o,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 Xo extends un{constructor(){var e;super(...arguments),Ho(this,e=qo),e.add(this),zo(this,"nestedHeadersPlugin",null),zo(this,"headerStateManager",null),function(e,t){Ho(e,t),t.set(e,null)}(this,Uo)}static get PLUGIN_KEY(){return _o}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[_o,...Vo]}isEnabled(){return!!this.hot.getSettings()[_o]}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."),jo(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,Yo).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),jo(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:r,columnIndex:i}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,n))&&void 0!==e?e:{};if(o)return r?this.expandSection({row:t,col:i}):this.collapseSection({row:t,col:i}),!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,r=function(e){e&&e.parentNode.removeChild(e)};(0,Et.Ti)(0,e-1,(e=>{const i=t.childNodes[e],s=n.childNodes[e],a=o?o.childNodes[e]:null;(0,Et.Ti)(0,i.childNodes.length-1,(e=>{let t=i.childNodes[e].querySelector(`.${Wo}`);r(t),s&&s.childNodes[e]&&(t=s.childNodes[e].querySelector(`.${Wo}`),r(t)),o&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${Wo}`),r(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:r,columnIndex:i,isCollapsed:s}=t;if(!0===n&&o>1&&(s&&"expand"===e||!s&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(r),col:i}}));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:r,col:i}=e;const{collapsible:s,isCollapsed:a}=null!==(n=this.headerStateManager.getHeaderSettings(r,i))&&void 0!==n?n:{};if(!s||a&&"collapse"===t||!a&&"expand"===t)return o=!1,!1}));const r=[],i=[];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&&(i.push(...a),r.push(l))}));const s=this.getCollapsedColumns();let a=[];"collapse"===t?a=(0,u.jF)([...s,...i]):"expand"===t&&(a=(0,u.y0)(s,(e=>!i.includes(e))));const l=Ko.get(t);if(!1===this.hot.runHooks(l.beforeHook,s,a,o))return void(0,u.z0)(r,(e=>{e()}));this.hot.batchExecution((()=>{(0,u.z0)(i,(e=>{Fo(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))&&i.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 Fo(Uo,this).getHiddenIndexes()}destroy(){jo(Uo,this,null),super.destroy()}}function Yo(e,t,n){var o;const{collapsible:i,origColspan:s,isCollapsed:a}=null!==(o=this.headerStateManager.getHeaderSettings(n,e))&&void 0!==o?o:{},l=i&&s>1&&e>=this.hot.getSettings().fixedColumnsStart,c=this.hot.getSettings().ariaTags;let u=t.querySelector(`.${Wo}`);var d;(0,r.De)(t,[(0,m.dV)("")[0]]),l?(u||(u=this.hot.rootDocument.createElement("div"),(0,r.iQ)(u,Wo),t.querySelector("div:first-child").appendChild(u)),(0,r.vy)(u,["collapsed","expanded"]),a?((0,r.iQ)(u,"collapsed"),(0,r.c6)(u,"+"),c&&(0,r.Bq)(t,...(0,m.dV)(!1))):((0,r.iQ)(u,"expanded"),(0,r.c6)(u,"-"),c&&(0,r.Bq)(t,...(0,m.dV)(!0))),c&&(0,r.Bq)(u,...(0,m.MG)())):null===(d=u)||void 0===d||d.remove()}function Qo(e,t){(0,r.nB)(e.target,Wo)&&((0,r.nB)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,r.nB)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,i.CA)(e))}function Jo(){this.updatePlugin()}function Zo(e,t){t||this.updatePlugin()}var er=n(85408),tr=n(31803);function nr(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 or=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];class rr{constructor(e,t){nr(this,"hot",void 0),nr(this,"sortingStates",new tr.z),nr(this,"sortEmptyCells",!1),nr(this,"indicator",!0),nr(this,"headerAction",!0),nr(this,"compareFunctionFactory",void 0),nr(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)=>{or.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 ir(e,t,n){const o=t.locale;return function(t,r){const{sortEmptyCells:i}=n;return"string"==typeof t&&(t=t.toLocaleLowerCase(o)),"string"==typeof r&&(r=r.toLocaleLowerCase(o)),t===r?fr:(0,d.Im)(t)?(0,d.Im)(r)?fr:i&&"asc"===e?mr:gr:(0,d.Im)(r)?i&&"asc"===e?gr:mr:isNaN(t)&&!isNaN(r)?"asc"===e?gr:mr:!isNaN(t)&&isNaN(r)?"asc"===e?mr:gr:(isNaN(t)||isNaN(r)||(t=parseFloat(t),r=parseFloat(r)),t<r?"asc"===e?mr:gr:t>r?"asc"===e?gr:mr:fr)}}n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(37550);const sr="default";var ar=n(34647);const{register:lr,getItem:cr,hasItem:ur}=(0,ar.A)("sorting.compareFunctionFactory"),{register:dr,getItem:hr}=(0,ar.A)("sorting.mainSortComparator");function pr(e){return ur(e)?cr(e):cr(sr)}lr("checkbox",(function(e,t,n){const o=t.checkedTemplate,r=t.uncheckedTemplate,{sortEmptyCells:i}=n;return function(s,a){const l=(0,d.Im)(s),c=(0,d.Im)(a),u=l?r:s,h=c?r:a,p=u===r||u===o,f=h===r||h===o;if(!1===i){if(l&&!1===c)return gr;if(!1===l&&c)return mr}return!1===p&&f?"asc"===e?mr:gr:p&&!1===f?"asc"===e?gr:mr:!1===p&&!1===f?ir(e,t,n)(s,a):u===r&&h===o?"asc"===e?mr:gr:u===o&&h===r?"asc"===e?gr:mr:fr}})),lr("date",(function(e,t,n){return Er(e,t.dateFormat,n)})),lr(sr,ir),lr("numeric",(function(e,t,n){return function(t,o){const r=parseFloat(t),i=parseFloat(o),{sortEmptyCells:s}=n;if(r===i||isNaN(r)&&isNaN(i))return fr;if(s){if((0,d.Im)(t))return"asc"===e?mr:gr;if((0,d.Im)(o))return"asc"===e?gr:mr}return isNaN(r)?gr:isNaN(i)?mr:r<i?"asc"===e?mr:gr:r>i?"asc"===e?gr:mr:fr}})),lr("time",(function(e,t,n){return Er(e,t.timeFormat,n)}));const fr=0,mr=-1,gr=1;var br=n(85975);const vr="asc",yr="desc",wr="colHeader";function Cr(e){if(e!==yr)return e===vr?yr:vr}function xr(e){return e.querySelector(`.${wr}`)}function Sr(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 Ar(e,t,n){return-1===e&&t>=0&&!1===(0,i.nO)(n)}function Er(e,t,n){return function(o,r){const{sortEmptyCells:i}=n;if(o===r)return fr;if((0,d.Im)(o))return(0,d.Im)(r)?fr:i&&"asc"===e?mr:gr;if((0,d.Im)(r))return i&&"asc"===e?gr:mr;const s=I(o,t),a=I(r,t);return s.isValid()?a.isValid()?a.isAfter(s)?"asc"===e?mr:gr:a.isBefore(s)?"asc"===e?gr:mr:fr:mr:gr}}const kr="indicatorDisabled",Rr="columnSorting",Mr="sortAction",Ir=new Map([[vr,"ascending"],[yr,"descending"]]);function Pr(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 Tr(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 Or="columnSorting",$r="append",Dr=Or;dr(Or,(function(e,t){return function(n,o){const[,...r]=n,[,...i]=o;return function(){const n=e[0],o=t[0],s=r[0],a=i[0],l=o.columnSorting;return(l.compareFunctionFactory?l.compareFunctionFactory:pr(o.type))(n,o,l)(s,a)}()}})),Se.R.getSingleton().register("beforeColumnSort"),Se.R.getSingleton().register("afterColumnSort");const Nr=new WeakMap;var Lr=new WeakSet;class Hr 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=Lr),t.add(e),Pr(this,"columnStatesManager",null),Pr(this,"columnMetaCache",null),Pr(this,"pluginKey",Or),Pr(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return Or}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e,t,n=this;if(Nr.has(this.hot)&&Nr.get(this.hot)!==this.pluginKey)return this.hot.updateSettings({[this.pluginKey]:!1}),e=Nr.get(this.hot),t=this.pluginKey,void(0,Lo.R8)(br.O`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
- Only \`${e}\` will work. The \`${t}\` plugin will remain disabled.`);this.enabled||(Nr.set(this.hot,this.pluginKey),this.columnStatesManager=new rr(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new yn._((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)=>Tr(Lr,this,Fr).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 Tr(Lr,n,Br).call(n,...t)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>Tr(Lr,this,zr).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 Tr(Lr,n,jr).call(n,...t)})),this.hot.view&&Tr(Lr,this,zr).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const n=xr(t);!1!==Sr(e,t)&&null!==n&&this.updateHeaderClasses(n)};Nr.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:Dr})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Dr)}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 er.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)&&[vr,yr].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=Cr(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:Cr()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$r;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(e),o=-1!==n,r=this.getSortConfig(),i=this.getColumnNextConfig(e);if(o){if((0,d.b0)(i))return[...r.slice(0,n),...r.slice(n+1)];if(t===$r)return[...r.slice(0,n),...r.slice(n+1),i];if("replace"===t)return[...r.slice(0,n),i,...r.slice(n+1)]}return(0,d.O9)(i)?r.concat(i):r}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),r=Object.getPrototypeOf(o);return Array.isArray(r.columns)?Object.assign(n,t,this.getPluginColumnConfig(r.columns[e])):(0,g.Tn)(r.columns)?Object.assign(n,t,this.getPluginColumnConfig(r.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 r=(0,u.YD)(t,(e=>e[0]));!function(e,t){const n=hr(t);for(var o=arguments.length,r=new Array(o>2?o-2:0),i=2;i<o;i++)r[i-2]=arguments[i];e.sort(n(...r))}(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 i=(0,u.YD)(t,(e=>e[0])),s=new Map((0,u.YD)(r,((e,t)=>[e,i[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,r.vy)(e,Array.from(Ir.values()).concat(Mr,kr,Rr)),!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,r.iQ)(e,function(e,t,n,o){const r=[Rr];if(o&&r.push(Mr),!1===n)return r.push(kr),r;const i=e.getSortOrderOfColumn(t);return(0,d.O9)(i)&&r.push(Ir.get(i)),r}(...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,r.nB)(e.target,wr)}onAfterOnCellMouseDown(e,t){if(!1!==Ar(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 zr(){const e=this.getAllSavedSortSettings();if((0,s.Gv)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function Fr(e,t){const n=xr(t);if(!1===Sr(e,t)||null===n)return;const o=this.getFirstCellSettings(e)[this.pluginKey],i=o.indicator,s=o.headerAction;if(this.updateHeaderClasses(n,this.columnStatesManager,e,i,s),this.hot.getSettings().ariaTags){const n=this.columnStatesManager.getSortOrderOfColumn(e);(0,r.Bq)(t,...(0,m._h)(n?`${n}ending`:"none"))}}function jr(e){!0===e&&this.hot.view&&Tr(Lr,this,zr).call(this)}function Br(e,t,n,o){!1!==Ar(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(o.column=!0)}function _r(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 Vr=class{constructor(e,t){_r(this,"plugin",void 0),_r(this,"hot",void 0),_r(this,"endpoints",[]),_r(this,"settings",void 0),_r(this,"settingsType","array"),_r(this,"currentEndpoint",null),_r(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",r=this.getAllEndpoints();(0,u.z0)(r,(r=>{"row"===o&&r.destinationRow>=t&&("insert_row"===e?r.alterRowOffset=n:"remove_row"===e&&(r.alterRowOffset=-1*n)),"col"===o&&r.destinationColumn>=t&&("insert_col"===e?r.alterColumnOffset=n:"remove_col"===e&&(r.alterColumnOffset=-1*n))})),this.resetAllEndpoints(r,!1)}resetSetupAfterStructureAlteration(e,t,n,o,r){let i=!(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)})),i&&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,r)=>{0===r?t.push(o):e[r]!==e[r-1]+1&&(t.push(e[r-1]),n.push(t),t=[],t.push(o)),r===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,r)=>{o>=t&&(n[r]+=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,r)=>{this.hot.propToCol(o[n][1])===e.sourceColumn&&-1===t.indexOf(r)&&t.push(r)}))})),(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 r=this.hot.toVisualRow(e.destinationRow);if(null!==r){const n=this.hot.getCellMeta(r,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 Wr(e){return null==e||isNaN(e)}function Gr(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 Kr="columnSummary";var Ur=new WeakSet;class qr 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=Ur),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 Kr}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[Kr]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[Kr],this.endpoints=new Vr(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 Gr(Ur,e,Xr).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 Gr(Ur,e,Qr).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 Gr(Ur,e,Yr).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 Gr(Ur,e,Jr).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],r=null,i=0;do{if(r=this.getCellValue(o,t),r=Wr(r)?null:r,null!==r){const e=(`${r}`.split(".")[1]||[]).length||1;e>i&&(i=e)}n+=r||0,o-=1}while(o>=e[0]);return Math.round(n*10**i)/10**i}calculateMinMax(e,t){let n=null;return(0,s.v4)(e.ranges,(o=>{const r=this.getPartialMinMax(o,e.sourceColumn,t);if(null===n&&null!==r&&(n=r),null!==r)switch(t){case"min":n=Math.min(n,r);break;case"max":n=Math.max(n,r)}})),null===n?"Not enough data":n}getPartialMinMax(e,t,n){let o,r=null,i=e[1]||e[0];do{if(o=this.getCellValue(i,t),o=Wr(o)?null:o,null===r)r=o;else if(null!==o)switch(n){case"min":r=Math.min(r,o);break;case"max":r=Math.max(r,o)}i-=1}while(i>=e[0]);return r}countEmpty(e,t){let n,o=0,r=e[1]||e[0];do{n=this.getCellValue(r,t),n=Wr(n)?null:n,null===n&&(o+=1),r-=1}while(r>=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,r=this.countEmpty(n,e.sourceColumn);t+=o,t-=r})),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 r=this.hot.getSourceDataAtCell(e,t),i="";if(null!==n&&null!==o&&(i=this.hot.getCellMeta(n,o).className||""),i.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof r&&(r=r.replace(/,/,".")),r=parseFloat(r)),isNaN(r)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(br.O`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
- numeric format. Cannot do the calculation.`);return r}}function Xr(){this.endpoints.initEndpoints()}function Yr(e){void 0!==e.columns&&this.endpoints.refreshCellMetas()}function Qr(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function Jr(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 Zr=n(77710);function ei(e,t,n){ti(e,t),t.set(e,n)}function ti(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ni(e,t){return e.get(ri(e,t))}function oi(e,t,n){return e.set(ri(e,t),n),n}function ri(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 ii=new WeakMap,si=new WeakMap,ai=new WeakMap,li=new WeakSet;class ci{constructor(){var e;ti(this,e=li),e.add(this),ei(this,ii,!0),ei(this,si,null),ei(this,ai,new ResizeObserver((e=>ri(li,this,ui).call(this,e))))}setObservedElement(e){oi(si,this,e)}unobserve(){ni(ai,this).unobserve(ni(si,this))}observe(){oi(ii,this,!0),ni(ai,this).observe(ni(si,this))}destroy(){ni(ai,this).disconnect()}}function ui(e){!ni(ii,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)})):oi(ii,this,!1)}function di(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 hi(e,t){return e.get(fi(e,t))}function pi(e,t,n){return e.set(fi(e,t),n),n}function fi(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)(ci,Zr.A);var mi=new WeakMap,gi=new WeakMap,bi=new WeakMap,vi=new WeakMap,yi=new WeakMap,wi=new WeakMap,Ci=new WeakMap;class xi{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;di(this,mi,void 0),di(this,gi,!1),di(this,bi,null),di(this,vi,void 0),di(this,yi,void 0),di(this,wi,!0),di(this,Ci,new ci),pi(mi,this,e),pi(gi,this,t),pi(vi,this,this.createEditor()),pi(yi,this,hi(vi,this).style),hi(Ci,this).setObservedElement(this.getInputElement()),hi(Ci,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){hi(yi,this).left=`${e}px`,hi(yi,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,r.Gq)(this.getInputElement()),height:(0,r.DK)(this.getInputElement())}}observeSize(){hi(Ci,this).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){hi(yi,this).display="block",pi(wi,this,!1)}hide(){hi(Ci,this).unobserve(),hi(wi,this)||(hi(yi,this).display="none"),pi(wi,this,!0)}isVisible(){return"block"===hi(yi,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 hi(mi,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=hi(mi,this).createElement("div"),t=hi(mi,this).createElement("textarea");return e.style.display="none",pi(bi,this,hi(mi,this).createElement("div")),hi(bi,this).setAttribute("dir",hi(gi,this)?"rtl":"ltr"),(0,r.iQ)(hi(bi,this),xi.CLASS_EDITOR_CONTAINER),hi(mi,this).body.appendChild(hi(bi,this)),(0,r.iQ)(e,xi.CLASS_EDITOR),(0,r.iQ)(t,xi.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),hi(bi,this).appendChild(e),e}getInputElement(){return hi(vi,this).querySelector(`.${xi.CLASS_INPUT}`)}getEditorElement(){return hi(vi,this)}destroy(){const e=hi(bi,this)?hi(bi,this).parentNode:null;hi(vi,this).parentNode.removeChild(hi(vi,this)),pi(vi,this,null),pi(yi,this,null),hi(Ci,this).destroy(),e&&e.removeChild(hi(bi,this))}}(0,s.co)(xi,Zr.A);const Si=xi;function Ai(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 Ei{constructor(e){Ai(this,"wasLastActionShow",!0),Ai(this,"showDebounced",null),Ai(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,g.sg)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,s.co)(Ei,Zr.A);const ki=Ei,Ri="---------";function Mi(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 Ii(e,t,n,o,r){(0,u.z0)(e,(e=>{e.forAll(((e,i)=>{e>=0&&i>=0&&function(e,t,n,o,r,i){const s=r(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)),i(e,t,"className",a)}(e,i,t,n,o,r)}))}))}function Pi(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function Ti(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 Oi(e,t){const n={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:o,left:r}=e.getBoundingClientRect();n.top=o,n.left=r}return n}function $i(e,t,n){Di(e,t),t.set(e,n)}function Di(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ni(e,t,n){return e.set(Hi(e,t),n),n}function Li(e,t){return e.get(Hi(e,t))}function Hi(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 zi="comments",Fi="comment",ji="value",Bi="style",_i="readOnly",Vi=zi,Wi=`plugin:${zi}`;var Gi=new WeakMap,Ki=new WeakMap,Ui=new WeakMap,qi=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,Qi=new WeakSet;class Ji extends un{constructor(){var e;super(...arguments),Di(this,e=Qi),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",{}),$i(this,Gi,null),$i(this,Ki,null),$i(this,Ui,!1),$i(this,qi,!1),$i(this,Xi,null),$i(this,Yi,"")}static get PLUGIN_KEY(){return zi}static get PLUGIN_PRIORITY(){return 60}static get DEFAULT_SETTINGS(){return{displayDelay:250}}isEnabled(){return!!this.hot.getSettings()[zi]}enablePlugin(){var e=this;this.enabled||(Li(Gi,this)||(Ni(Gi,this,new Si(this.hot.rootDocument,this.hot.isRtl())),Li(Gi,this).addLocalHook("resize",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Hi(Qi,e,ss).call(e,...n)}))),Li(Ki,this)||Ni(Ki,this,new ki(this.getSetting("displayDelay"))),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,n,o,r,i)=>Hi(Qi,this,os).call(this,e,i))),this.addHook("afterScroll",(()=>Hi(Qi,this,ls).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>Hi(Qi,this,as).call(this,e))),this.addHook("beforeCompositionStart",(e=>Hi(Qi,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 Hi(Qi,e,cs).call(e,...n)})),Li(Ki,this).addLocalHook("hide",(()=>this.hide())),Li(Ki,this).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){Li(Ki,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(Wi);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();Ni(qi,this,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(Wi),this.hot._registerTimeout((()=>{Ni(qi,this,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell()},group:Vi}),n.addShortcut({keys:[["Escape"]],callback:()=>{Li(Gi,this).setValue(Li(Yi,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>Li(Gi,this).isVisible()&&Li(Gi,this).isFocused(),group:Vi}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>Li(Gi,this).isVisible()&&Li(Gi,this).isFocused(),group:Vi}),n.addShortcut({keys:[["Shift","Tab"],["Tab"]],forwardToContext:e.getContext("grid"),callback:()=>{Li(Gi,this).setValue(Li(Gi,this).getValue()),this.hide(),e.setActiveContextName("grid")},group:Vi})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Vi)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>Hi(Qi,this,ts).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>Hi(Qi,this,Zi).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>Hi(Qi,this,ns).call(this))),this.eventManager.addEventListener(t,"focus",(()=>Hi(Qi,this,is).call(this))),this.eventManager.addEventListener(t,"blur",(()=>Hi(Qi,this,rs).call(this))),this.eventManager.addEventListener(this.getEditorInputElement(),"mousedown",(e=>Hi(Qi,this,es).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,r.kp)(e.target,"TD","TBODY");return!!(t&&(0,r.nB)(t,"htCommentCell")&&(0,r.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=Li(Gi,this).getValue();let n="";null!=e?n=e:null!=t&&(n=t);const o=this.range.from.row,r=this.range.from.col;this.updateCommentMeta(o,r,{[ji]: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,Fi),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,ji)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,ji)}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 Li(Ki,this).cancelHiding(),Li(Gi,this).setValue(null!==(e=o[Fi]?o[Fi][ji]:null)&&void 0!==e?e:""),Li(Gi,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){Li(Gi,this).hide()}refreshEditor(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&Li(Gi,this).isVisible()))return;const{rowIndexMapper:e,columnIndexMapper:t}=this.hot,{row:n,col:o}=this.range.from;let i=e.getRenderableFromVisualIndex(n),s=t.getRenderableFromVisualIndex(o);const a=null===i;Li(Gi,this).setPosition(0,0),null===i&&(i=e.getRenderableFromVisualIndex(e.getNearestNotHiddenIndex(n,-1))),null===s&&(s=t.getRenderableFromVisualIndex(t.getNearestNotHiddenIndex(o,-1)));const l=null===i,c=null===s;i=null!=i?i:0,s=null!=s?s:0;const{rootWindow:u,view:{_wt:d}}=this.hot,{wtTable:h}=d,p=d.getCell({row:i,col:s},!0),f=this.getCommentMeta(n,o,Bi);f?Li(Gi,this).setSize(f.width,f.height):Li(Gi,this).resetSize();const m=c?0:h.getColumnWidth(s),g=a&&!l?(0,r.DK)(p):0,{left:b,top:v,width:y,height:w}=p.getBoundingClientRect(),{width:C,height:x}=Li(Gi,this).getSize(),{innerWidth:S,innerHeight:A}=this.hot.rootWindow,E=this.hot.rootDocument.documentElement,k=(0,r.XJ)(this.hot.rootDocument),R=(0,r.D1)(this.hot.rootWindow)?k:0,M=(0,r.zO)(this.hot.rootWindow)?k:0;let I=b+u.scrollX+m,P=v+u.scrollY+g;this.hot.isRtl()&&(I-=C+m),this.hot.isLtr()&&b+y+C>S-R?I=b+u.scrollX-C-1:this.hot.isRtl()&&I<-(E.scrollWidth-E.clientWidth)&&(I=b+u.scrollX+m+1),v+x>A-M&&(P-=x-w+1),Li(Gi,this).setPosition(I,P),Li(Gi,this).setReadOnlyState(this.getCommentMeta(n,o,_i)),Li(Gi,this).observeSize()}focusEditor(){Li(Gi,this).focus()}updateCommentMeta(e,t,n){const o=this.hot.getCellMeta(e,t)[Fi];let r;o?(r=(0,s.Go)(o),(0,s.zw)(r,n)):r=n,this.hot.setCellMeta(e,t,Fi,r)}getCommentMeta(e,t,n){const o=this.hot.getCellMeta(e,t);if(o[Fi])return o[Fi][n]}addToContextMenu(e){var t;e.items.push({name:Ri},(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(Ae.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(Ae.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(Ae.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(Ae.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return Ti(this.getSelectedRange(),((t,n)=>e.getCommentMeta(t,n,_i)))?Pi(t):t},callback(){this.getSelectedRangeLast().forAll(((t,n)=>{if(t>=0&&n>=0){const o=!!e.getCommentMeta(t,n,_i);e.updateCommentMeta(t,n,{[_i]:!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 Li(Gi,this).getInputElement()}destroy(){var e,t;null===(e=Li(Gi,this))||void 0===e||e.destroy(),null===(t=Li(Ki,this))||void 0===t||t.destroy(),super.destroy()}}function Zi(e){if(this.hot.view&&this.hot.view._wt&&!Li(Ui,this)&&!this.targetIsCommentTextArea(e)){const t=(0,r.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(!(Li(Ui,this)||Li(Gi,this).isFocused()||(0,r.nB)(e.target,"wtBorder")||Li(Xi,this)===e.target)&&Li(Gi,this))if(Ni(Xi,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));Li(Ki,this).show(t)}else(0,r.aO)(e.target,t)&&!this.targetIsCommentTextArea(e)&&Li(Ki,this).hide()}function ns(){Ni(Ui,this,!1)}function os(e,t){t[Fi]&&t[Fi][ji]&&(0,r.iQ)(e,t.commentedCellClassName)}function rs(){Ni(Yi,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function is(){Ni(Yi,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(Wi)}function ss(e,t){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[Bi]:{width:e,height:t}})}function as(e){Li(Gi,this).isFocused()&&(0,i.CA)(e)}function ls(){Li(qi,this)||this.hide()}function cs(){const e=Li(Gi,this).getEditorElement();(0,r.vy)(e,/ht-theme-.*/g),(0,r.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 r=e.split(":"),i=r[0],a=2===r.length?r[1]:null;let l=this.commands[i];if(!l)throw new Error(`Menu command '${i}' 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(r.join(":")),(0,u.z0)(c,(e=>e.apply(this.hot,n)))}}const hs="alignment",ps="clear_column",fs="col_left",ms="col_right",gs="make_read_only",bs="redo";var vs=n(76396);const ys="remove_col",ws="remove_row",Cs="row_above",xs="row_below",Ss="no_items",As="undo",Es=[Cs,xs,fs,ms,ps,ws,ys,As,bs,gs,hs,Ri,Ss],ks={[Ri]:function(){return{name:Ri}},[Ss]:function(){return{key:Ss,name(){return this.getTranslatedPhrase(Ae.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}},[Cs]:function(){return{key:Cs,name(){return this.getTranslatedPhrase(Ae.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(Ae.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}}},[fs]:function(){return{key:fs,name(){return this.getTranslatedPhrase(Ae.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}}},[ms]:function(){return{key:ms,name(){return this.getTranslatedPhrase(Ae.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(Ae.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}}},[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(Ae.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}}},[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(Ae.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}}},[As]:function(){return{key:As,name(){return this.getTranslatedPhrase(Ae.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(Ae.CONTEXTMENU_ITEMS_REDO)},callback(){this.getPlugin("undoRedo").redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}},[gs]:function(){return{key:gs,checkable:!0,ariaChecked(){return Ti(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))},ariaLabel(){return this.getTranslatedPhrase(Ae.CONTEXTMENU_ITEMS_READ_ONLY)},name(){let e=this.getTranslatedPhrase(Ae.CONTEXTMENU_ITEMS_READ_ONLY);return Ti(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=Pi(e)),e},callback(){const e=this.getSelectedRange(),t=Ti(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(Ae.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(Ae.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT)},callback(){const e=this.getSelectedRange(),t=Mi(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",o="htLeft";this.runHooks("beforeCellAlignment",t,e,n,o),Ii(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(Ae.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER)},callback(){const e=this.getSelectedRange(),t=Mi(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",o="htCenter";this.runHooks("beforeCellAlignment",t,e,n,o),Ii(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(Ae.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT)},callback(){const e=this.getSelectedRange(),t=Mi(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",o="htRight";this.runHooks("beforeCellAlignment",t,e,n,o),Ii(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(Ae.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY)},callback(){const e=this.getSelectedRange(),t=Mi(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",o="htJustify";this.runHooks("beforeCellAlignment",t,e,n,o),Ii(e,n,o,((e,t)=>this.getCellMeta(e,t)),((e,t,n,o)=>this.setCellMeta(e,t,n,o))),this.render()},disabled:!1},{name:Ri},{key:`${hs}:top`,name(){return this.getTranslatedPhrase(Ae.CONTEXTMENU_ITEMS_ALIGNMENT_TOP)},callback(){const e=this.getSelectedRange(),t=Mi(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",o="htTop";this.runHooks("beforeCellAlignment",t,e,n,o),Ii(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(Ae.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE)},callback(){const e=this.getSelectedRange(),t=Mi(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",o="htMiddle";this.runHooks("beforeCellAlignment",t,e,n,o),Ii(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(Ae.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM)},callback(){const e=this.getSelectedRange(),t=Mi(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",o="htBottom";this.runHooks("beforeCellAlignment",t,e,n,o),Ii(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 Is{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===Ri?(t[Ri]=e,o=Ri):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 r=t["string"==typeof e?e:o];r||(r=e),(0,s.Gv)(e)?(0,s.X$)(r,e):"string"==typeof r&&(r={name:r}),void 0===r.key&&(r.key=o),n.push(r)})):(0,u.z0)(o,((e,o)=>{let r=t[e];!r&&Es.indexOf(e)>=0||(r||(r={name:e,key:`${o}`}),(0,s.Gv)(e)&&(0,s.X$)(r,e),void 0===r.key&&(r.key=o),n.push(r))})),n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}function Ps(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,t){Ps(this,"top",void 0),Ps(this,"topRelative",void 0),Ps(this,"left",void 0),Ps(this,"leftRelative",void 0),Ps(this,"scrollTop",void 0),Ps(this,"scrollLeft",void 0),Ps(this,"cellHeight",void 0),Ps(this,"cellWidth",void 0);const n=t.scrollY,o=t.scrollX;let r,i,s,a,l,c;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(r=parseInt(e.top,10),s=parseInt(e.left,10),l=e.height||0,c=e.width||0,i=r,a=s,r+=n,s+=o):"event"===this.type&&(r=parseInt(e.pageY,10),s=parseInt(e.pageX,10),l=e.target.clientHeight,c=e.target.clientWidth,i=r-n,a=s-o),this.top=r,this.topRelative=i,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 $s(e,t){return e.get(Ns(e,t))}function Ds(e,t,n){return e.set(Ns(e,t),n),n}function Ns(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,Hs=new WeakMap,zs=new WeakMap,Fs=new WeakMap,js=new WeakMap;class Bs{constructor(e){Os(this,Ls,void 0),Os(this,Hs,void 0),Os(this,zs,void 0),Os(this,Fs,!1),Os(this,js,{above:0,below:0,left:0,right:0}),Ds(Fs,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return $s(js,this)[e]=t,this}setElement(e){return Ds(Ls,this,e),this}setParentElement(e){return Ds(Hs,this,e),this}updatePosition(e){Ds(zs,this,new Ts(e,$s(Ls,this).ownerDocument.defaultView)),$s(Fs,this)?($s(zs,this).fitsBelow($s(Ls,this))?this.setPositionBelowCursor():$s(zs,this).fitsAbove($s(Ls,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===$s(Ls,this).dir?$s(zs,this).fitsOnLeft($s(Ls,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():$s(zs,this).fitsOnRight($s(Ls,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=$s(js,this).above+$s(zs,this).top-$s(Ls,this).offsetHeight;if($s(Hs,this)){const t=$s(Hs,this).ownerDocument.defaultView.getComputedStyle($s(Hs,this).querySelector(".ht_master")),n=Number.parseInt(t.paddingTop,10),o=Number.parseInt(t.borderTop,10);e=$s(zs,this).top+$s(zs,this).cellHeight-$s(Ls,this).scrollHeight+n+o}$s(Ls,this).style.top=`${e}px`}setPositionBelowCursor(){let e=$s(js,this).below+$s(zs,this).top+1;if($s(Hs,this)){const t=$s(Hs,this).ownerDocument.defaultView.getComputedStyle($s(Hs,this).querySelector(".ht_master")),n=Number.parseInt(t.paddingTop,10),o=Number.parseInt(t.borderTop,10);e=$s(zs,this).top-n-o-1}$s(Ls,this).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=$s(zs,this).left;if($s(Hs,this)){const t=$s(Hs,this).ownerDocument.defaultView,n=Number.parseInt(t.getComputedStyle($s(Hs,this).querySelector(".htCore")).borderRightWidth,10);e+=$s(zs,this).cellWidth+n}else e+=$s(js,this).right;$s(Ls,this).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=$s(js,this).left+$s(zs,this).left-$s(Ls,this).offsetWidth;if($s(Hs,this)){const t=$s(Hs,this).ownerDocument.defaultView;e-=Number.parseInt(t.getComputedStyle($s(Hs,this).querySelector(".htCore")).borderLeftWidth,10)}$s(Ls,this).style.left=`${e}px`}}function _s(e){let{initialPage:t=-1,size:n=()=>0,onItemSelect:o=()=>{},onClear:r=()=>{}}=e;const i=new Set;let s=(0,Et.qE)(t,-1,l()-1);function a(e,t){const n=l()-1;return e<0&&(e=n),e>n&&(e=0),i.has(e)?-1:(i.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&&(i.clear(),s=a(0,1))},toLastItem:function(){l()>0&&(i.clear(),s=a(l()-1,-1))},toNextItem:function(){l()>0&&(i.clear(),s=a(++s,1))},toPreviousItem:function(){l()>0&&(i.clear(),s=a(--s,-1))},getSize:l,clear:function(){i.clear(),s=t,r()}}}function Vs(e){return(0,s.mQ)(e,"submenu")}function Ws(e){return new RegExp(Ri,"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",Xs=qs;function Ys(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 ra{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 we.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),Ys(this,ta,void 0),Ys(this,na,void 0),Ys(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,r.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,g.sg)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let n=!1,o=(0,u.y0)(this.menuItems,(e=>(e.key===Ss&&(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()[Ss]);else if(0===o.length)return;o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ri,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,Ri);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,i,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,r.Ie)(t),(0,r.iQ)(c,"htItemWrapper"),l.getSettings().ariaTags){const e=!Gs(a,l)&&!Ks(a)&&!Ws(a);(0,r.Bq)(t,[...(p=a,!0===p.checkable?[(0,m.pt)(),(0,m.SM)(d),(0,m.Xq)(h)]:[(0,m.ZA)(),(0,m.SM)(u)]),...e?[(0,m.vC)(-1)]:[],...Gs(a,l)?[(0,m._R)()]:[],...Vs(a)?[(0,m.dV)(!1)]:[]])}var p;t.className="",t.appendChild(c),Ws(a)?(0,r.iQ)(t,"htSeparator"):"function"==typeof a.renderer?((0,r.iQ)(t,"htCustomMenuRenderer"),t.appendChild(a.renderer(e,c,n,o,i,u))):(0,r.Mv)(c,u),Gs(a,l)?(0,r.iQ)(t,"htDisabled"):Ks(a)?(0,r.iQ)(t,"htSelectionDisabled"):Vs(a)&&(0,r.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,r)=>{this.hotMenu.view.isMouseDown()&&(r.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,i.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,_s({size:()=>c.countRows(),onItemSelect(e,t){const n=c.getCell(e,0);if(!n||function(e){return(0,r.nB)(e,"htSeparator")}(n)||function(e){return(0,r.nB)(e,"htDisabled")}(n)||function(e){return(0,r.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 r(e,t){const r=s(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>r.removeShortcutsByKeys(e)))})),n.push({shortcuts:e,contextName:t}),o(e,t)}function i(e){return e?`${Xs}:${e}`:Xs}function s(t){var n;const o=e.hotMenu.getShortcutManager(),r=i(t);return null!==(n=o.getContext(r))&&void 0!==n?n:o.addContext(r)}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 r=t.getSettings(),i="function"==typeof r.tabMoves?r.tabMoves(n):r.tabMoves;o.includes("shift")?t.selection.transformStart(-i.row,-i.col):t.selection.transformStart(i.row,i.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;r(t,n)})),{addCustomShortcuts:r,getCustomShortcuts:function(){return[...n]},getContext:s,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(i(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,r.Bq)(t,[(0,m.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,r.nB)(e,"htSubmenu")}(t))return!1;const n=this.hotMenu.getSourceDataAtRow(e),o=new ra(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,r.Bq)(t,[(0,m.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,r.Bq)(o,[(0,m.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||Ws(e)||Gs(e,this.hot)||Vs(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,i=t.holder.style,s=parseInt(o.width,10),a=(0,u.mu)(n,((e,t,n)=>{const o=this.hotMenu.getCell(n,0)?(0,r.DK)(this.hotMenu.getCell(n,0)):0;return e+(t.name===Ri?1:o)}),0);e.isClassicTheme()?(i.width=`${s+3}px`,i.height=`${a+3}px`):(i.width=`${s}px`,i.height=`${a}px`),o.height=i.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,g.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,r.iQ)(n,`htMenu handsontable ${this.options.className}`),o&&(0,r.iQ)(n,o),this.options.container.appendChild(n)),n}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&(0,r.Bq)(this.hotMenu.rootElement,[(0,m.nF)(),(0,m.vC)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,r.aO)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,r.aO)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,r.nB)(e.target,"htCore")&&(0,r.aO)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}function ia(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)(ra,Zr.A);const aa="contextMenu",la=aa;Se.R.getSingleton().register("afterContextMenuDefaultOptions"),Se.R.getSingleton().register("beforeContextMenuShow"),Se.R.getSingleton().register("afterContextMenuShow"),Se.R.getSingleton().register("afterContextMenuHide"),Se.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),ia(this,"commandExecutor",new ds(this.hot)),ia(this,"itemsFactory",null),ia(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,Ri,fs,ms,Ri,ws,ys,Ri,As,bs,Ri,gs,Ri,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 ra(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,fa).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=Oi(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 Is(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,i=e.target;if(this.close(),(0,r.nB)(i,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!n&&!o&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(i)||(0,r.nB)(i,"current")&&(0,r.nB)(i,"wtBorder")))return;const s=Oi(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 fa(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}ua.SEPARATOR={name:Ri};var ma=n(13431);class ga{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}class ba{constructor(){this.clipboardData=new ga}preventDefault(){}composedPath(){return[]}}function va(e,t,n){ya(e,t),t.set(e,n)}function ya(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wa(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 Sa=new WeakMap,Aa=new WeakMap,Ea=new WeakMap,ka=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,Ia=new WeakSet;class Pa{constructor(e){let{countRows:t,countColumns:n,rowsLimit:o,columnsLimit:r,countColumnHeaders:i}=e;var s;ya(this,s=Ia),s.add(this),va(this,Sa,void 0),va(this,Aa,void 0),va(this,Ea,void 0),va(this,ka,void 0),va(this,Ra,void 0),va(this,Ma,void 0),Ca(Aa,this,t),Ca(Ea,this,n),Ca(ka,this,o),Ca(Ra,this,r),Ca(Ma,this,i)}setSelectedRange(e){Ca(Sa,this,e)}getCellsRange(){if(0===wa(Aa,this).call(this)||0===wa(Ea,this).call(this))return null;const{row:e,col:t}=wa(Sa,this).getTopStartCorner(),{row:n,col:o}=wa(Sa,this).getBottomEndCorner(),r=xa(Ia,this,Oa).call(this,e,n),i=xa(Ia,this,Ta).call(this,t,o);return{isRangeTrimmed:n!==r||o!==i,startRow:e,startCol:t,endRow:r,endCol:i}}getMostBottomColumnHeadersRange(){if(0===wa(Ea,this).call(this)||0===wa(Ma,this).call(this))return null;const{col:e}=wa(Sa,this).getTopStartCorner(),{col:t}=wa(Sa,this).getBottomEndCorner(),n=xa(Ia,this,Ta).call(this,e,t);return{isRangeTrimmed:t!==n,startRow:-1,startCol:e,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===wa(Ea,this).call(this)||0===wa(Ma,this).call(this))return null;const{col:e}=wa(Sa,this).getTopStartCorner(),{col:t}=wa(Sa,this).getBottomEndCorner(),n=xa(Ia,this,Ta).call(this,e,t);return{isRangeTrimmed:t!==n,startRow:-wa(Ma,this).call(this),startCol:e,endRow:-1,endCol:n}}}function Ta(e,t){return Math.min(t,Math.max(e+wa(Ra,this).call(this)-1,e))}function Oa(e,t){return Math.min(t,Math.max(e+wa(ka,this).call(this)-1,e))}function $a(e){const t=[],n=[];return(0,u.z0)(e,(e=>{const o=Math.min(e.startRow,e.endRow),r=Math.max(e.startRow,e.endRow);(0,Et.Ti)(o,r,(e=>{-1===t.indexOf(e)&&t.push(e)}));const i=Math.min(e.startCol,e.endCol),s=Math.max(e.startCol,e.endCol);(0,Et.Ti)(i,s,(e=>{-1===n.indexOf(e)&&n.push(e)}))})),{rows:t,columns:n}}var Da=n(22257);function Na(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 Ha(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 za(e,t){return e.get(ja(e,t))}function Fa(e,t,n){return e.set(ja(e,t),n),n}function ja(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")}Se.R.getSingleton().register("afterCopyLimit"),Se.R.getSingleton().register("modifyCopyableRange"),Se.R.getSingleton().register("beforeCut"),Se.R.getSingleton().register("afterCut"),Se.R.getSingleton().register("beforePaste"),Se.R.getSingleton().register("afterPaste"),Se.R.getSingleton().register("beforeCopy"),Se.R.getSingleton().register("afterCopy");const Ba="copyPaste",_a=["fragmentSelection"],Va=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var Wa=new WeakMap,Ga=new WeakMap,Ka=new WeakMap,Ua=new WeakMap,qa=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,Qa=new WeakMap,Ja=new WeakSet;class Za extends un{constructor(){var e;super(...arguments),La(this,e=Ja),e.add(this),Ha(this,"columnsLimit",1/0),Ha(this,"rowsLimit",1/0),Ha(this,"pasteMode","overwrite"),Ha(this,"uiContainer",this.hot.rootDocument.body),Na(this,Wa,!1),Na(this,Ga,!1),Na(this,Ka,!1),Na(this,Ua,"cells-only"),Na(this,qa,!1),Na(this,Xa,!1),Na(this,Ya,new Pa({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),Na(this,Qa,!1),Ha(this,"copyableRanges",[])}static get PLUGIN_KEY(){return Ba}static get SETTING_KEYS(){return[Ba,..._a]}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"),Fa(Wa,this,this.getSetting("copyColumnHeaders")),Fa(Ga,this,this.getSetting("copyColumnGroupHeaders")),Fa(Ka,this,this.getSetting("copyColumnHeadersOnly")),this.uiContainer=null!==(t=this.getSetting("uiContainer"))&&void 0!==t?t:this.uiContainer,this.addHook("afterContextMenuDefaultOptions",(e=>ja(Ja,this,rl).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 ja(Ja,n,il).call(n,...t)})),this.addHook("afterSelectionEnd",(()=>ja(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 ja(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 ja(Ja,n,ll).call(n,...t)})),this.addHook("afterSelection",(()=>ja(Ja,this,cl).call(this)))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){Fa(Ua,this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only"),Fa(qa,this,!0),ja(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(){Fa(Xa,this,!0),ja(Ja,this,el).call(this,"cut")}getRangedCopyableData(e){return(0,ma.A)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:n,columns:o}=$a(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=[]);za(Ya,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===za(Ua,this)?t.set("headers",za(Ya,this).getMostBottomColumnHeadersRange()):("with-column-headers"===za(Ua,this)?t.set("headers",za(Ya,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===za(Ua,this)&&t.set("headers",za(Ya,this).getAllColumnHeadersRange()),t.set("cells",za(Ya,this).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:n,endRow:o,endCol:r}=e;return{startRow:t,startCol:n,endRow:o,endCol:r}})),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:r}=n;this.hot.runHooks("afterCopyLimit",o-e+1,r-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,r=[],{row:i,col:s}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let c=i,u=s,d=i,h=s;for(;r.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=[],f=r.length%n;for(;p.length<o||u<=l;){const{skipColumnOnPaste:t,visualCol:n}=this.hot.getCellMeta(i,u);if(u=n+1,!0===t)continue;h=n;const r=p.length%o;p.push(e[f][r])}r.push(p)}return Fa(Qa,this,!0),this.hot.populateFromArray(i,s,r,void 0,void 0,"CopyPaste.paste",this.pasteMode),[i,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()&&!za(qa,this)||this.isEditorOpened()||(0,r.sb)(t)&&(o&&t!==n||!o&&t!==this.hot.rootDocument.body&&!(0,r.yq)(t,this.hot.rootElement)))return;e.preventDefault(),this.setCopyableText(),Fa(qa,this,!1);const i=this.getRangedData(this.copyableRanges),s=ja(Ja,this,tl).call(this,this.copyableRanges);if(this.hot.runHooks("beforeCopy",i,this.copyableRanges,s)){const t=(0,ma.A)(i);if(e&&e.clipboardData){const n=(0,Da.ub)(i,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[Va,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.runHooks("afterCopy",i,this.copyableRanges,s)}Fa(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()&&!za(Xa,this)||this.isEditorOpened()||(0,r.sb)(t)&&(o&&t!==n||!o&&t!==this.hot.rootDocument.body&&!(0,r.yq)(t,this.hot.rootElement)))return;e.preventDefault(),this.setCopyableText(),Fa(Xa,this,!1);const i=this.getRangedData(this.copyableRanges);if(this.hot.runHooks("beforeCut",i,this.copyableRanges)){const t=(0,ma.A)(i);if(e&&e.clipboardData){const n=(0,Da.ub)(i,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[Va,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",i,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,r.sb)(t)&&(o&&t!==n||!o&&t!==this.hot.rootDocument.body&&!(0,r.yq)(t,this.hot.rootElement)))return;let i;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});i=t&&/(<table)|(<TABLE)/g.test(t)?(0,Da.oh)(t,this.hot.rootDocument).data:e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(i=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof i&&(i=(0,ma.q)(i)),void 0===i||i&&0===i.length)return;if(!1===this.hot.runHooks("beforePaste",i,this.copyableRanges))return;const[s,a,l,c]=this.populateValues(i);this.hot.selectCell(s,a,Math.min(this.hot.countRows()-1,l),Math.min(this.hot.countCols()-1,c)),this.hot.runHooks("afterPaste",i,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,i=this.hot.getCell(n,o,!0);i&&(0,r.C0)(i,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function tl(e){const{rows:t}=$a(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,r.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,r.gj)(o)}}}function rl(e){var t;e.items.push({name:"---------"},(t=this,{key:"copy",name(){return this.getTranslatedPhrase(Ae.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})),za(Wa,this)&&e.items.push(function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,Et.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ae.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)),za(Ga,this)&&e.items.push(function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,Et.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ae.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)),za(Ka,this)&&e.items.push(function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,Et.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ae.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(Ae.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 il(e,t,n,o,r){za(Qa,this)&&(r.value=!0),Fa(Qa,this,!1)}function sl(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function al(){ja(Ja,this,ol).call(this)}function ll(){ja(Ja,this,nl).call(this)}function cl(){ja(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 fl(e,t){let n=!1;return(0,u.z0)(e.getSelectedRange(),(o=>{o.forAll(((o,r)=>{if(o<0||r<0)return;const i=e.getCellMeta(o,r).borders;if(i){if(!t)return n=!0,!1;if(!(0,s.mQ)(i[t],"hide")||!1===i[t].hide)return n=!0,!1}}))})),n}function ml(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}const gl=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(Ae.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return fl(this,t)&&(e=ml(e)),e},callback(n,o){const r=fl(this,t);e.prepareBorder(o,t,r)}}}function vl(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(Ae.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return fl(this,"bottom")&&(e=ml(e)),e},callback(t,n){const o=fl(this,"bottom");e.prepareBorder(n,"bottom",o)}}}function yl(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(Ae.CONTEXTMENU_ITEMS_BORDERS_LEFT);return fl(this,t)&&(e=ml(e)),e},callback(n,o){const r=fl(this,t);e.prepareBorder(o,t,r)}}}function wl(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(Ae.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,n){e.prepareBorder(n,"noBorders")},disabled(){return!fl(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 Sl=new WeakSet;class Al 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=Sl),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(Sl,this,El).call(this,e))),this.addHook("init",(()=>Cl(Sl,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 r=(0,vs.ML)(e),i=(0,vs._e)(r,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,u.z0)(e,(e=>{i(e).forAll(((e,t)=>{(0,u.z0)(n,(n=>{var r,i;this.prepareBorderFromCustomAdded(e,t,o,(r=n,null!==(i=gl.get(r))&&void 0!==i?i:r))}))}))})),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 r=this.hot.countRows(),i=this.hot.countCols();if(e>=r||t>=i)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,Et.Ti)(e.from.row,n,(n=>{(0,Et.Ti)(e.from.col,o,(o=>{const r=pl(n,o);let i=0;n===e.from.row&&(0,s.mQ)(t,"top")&&(i+=1,r.top=t.top),n===e.to.row&&(0,s.mQ)(t,"bottom")&&(i+=1,r.bottom=t.bottom),o===e.from.col&&(0,s.mQ)(t,"start")&&(i+=1,r.start=t.start),o===e.to.col&&(0,s.mQ)(t,"end")&&(i+=1,r.end=t.end),i>0&&(this.hot.setCellMeta(n,o,"borders",hl(r)),this.insertBorderIntoSettings(r))}))}))}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 r=this.hot.getCellMeta(e,t).borders;r=r&&void 0!==r.border?dl(r):pl(e,t),o?(r[n]={hide:!0},4===this.countHide(r)?this.removeAllBorders(e,t):(this.checkCustomSelectionsFromContextMenu(r,n,o)||this.insertBorderIntoSettings(r),this.hot.setCellMeta(e,t,"borders",hl(r)))):(r[n]={width:1,color:"#000"},this.checkCustomSelectionsFromContextMenu(r,n,o)||this.insertBorderIntoSettings(r),this.hot.setCellMeta(e,t,"borders",hl(r)))}prepareBorder(e,t,n){(0,u.z0)(e,(e=>{let{start:o,end:r}=e;if(o.row===r.row&&o.col===r.col)"noBorders"===t?this.removeAllBorders(o.row,o.col):this.setBorder(o.row,o.col,t,n);else switch(t){case"noBorders":(0,Et.Ti)(o.col,r.col,(e=>{(0,Et.Ti)(o.row,r.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,Et.Ti)(o.col,r.col,(e=>{this.setBorder(o.row,e,t,n)}));break;case"bottom":(0,Et.Ti)(o.col,r.col,(e=>{this.setBorder(r.row,e,t,n)}));break;case"start":(0,Et.Ti)(o.row,r.row,(e=>{this.setBorder(e,o.col,t,n)}));break;case"end":(0,Et.Ti)(o.row,r.row,(e=>{this.setBorder(e,r.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:r}=e,i=[t,n,o,r];return(0,u.mu)(i,((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,(r=>{if(e.id===r.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(r);return(0,u.z0)(e,(e=>{e.toggleHiddenClass(t,n)})),o=!0,!1}})),o}checkCustomSelections(e,t,n){const o=this.countHide(e);let r=!1;return 4===o?(this.removeAllBorders(e.row,e.col),r=!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 r=!0,!1}})),r}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 El(e){var t;this.hot.getSettings()[xl]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(Ae.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(Ae.CONTEXTMENU_ITEMS_BORDERS_TOP);return fl(this,"top")&&(e=ml(e)),e},callback(e,n){const o=fl(this,"top");t.prepareBorder(n,"top",o)}}),bl(this),vl(this),yl(this),wl(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 Il="dragToScroll";var Pl=new WeakSet;class Tl 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=Pl),t.add(e),Rl(this,"boundaries",null),Rl(this,"callback",null),Rl(this,"listening",!1)}static get PLUGIN_KEY(){return Il}static get PLUGIN_PRIORITY(){return 100}isEnabled(){return!!this.hot.getSettings()[Il]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>Ml(Pl,this,Ol).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>Ml(Pl,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,r.Ly)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function Ol(e){if((0,i.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,r;const i=null!==(o=t.scrollLeft)&&void 0!==o?o:t.scrollX,s=null!==(r=t.scrollTop)&&void 0!==r?r:t.scrollY;t.scroll(i+50*Math.sign(e),s+20*Math.sign(n))})),this.listen()}function $l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Dl(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 Nl(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")}Se.R.getSingleton().register("afterDropdownMenuDefaultOptions"),Se.R.getSingleton().register("beforeDropdownMenuShow"),Se.R.getSingleton().register("afterDropdownMenuShow"),Se.R.getSingleton().register("afterDropdownMenuHide"),Se.R.getSingleton().register("afterDropdownMenuExecute");const Hl="dropdownMenu",zl="changeType",Fl=Hl;var jl=new WeakMap,Bl=new WeakSet;class _l extends un{static get PLUGIN_KEY(){return Hl}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[fs,ms,Ri,ys,Ri,ps,Ri,gs,Ri,hs]}constructor(e){var t;super(e),$l(this,t=Bl),t.add(this),Dl(this,"commandExecutor",new ds(this.hot)),Dl(this,"itemsFactory",null),Dl(this,"menu",null),function(e,t){$l(e,t),t.set(e,!1)}(this,jl),this.hot.addHook("afterGetColHeader",((e,t)=>Ll(Bl,this,Gl).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[Hl]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new Is(this.hot,_l.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,Yl).call(e,...n)}));const t=this.hot.getSettings()[Hl],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 ra(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,Xl).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=Oi(this.menu.container,this.hot.rootDocument),o=this.hot.getCell(-1,t.col,!0).querySelector(`.${zl}`),r=o.getBoundingClientRect();this.open({left:r.left+n.left,top:r.top+o.offsetHeight+n.top},{left:r.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:Fl},{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:Fl}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Fl)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>Ll(Bl,this,Wl).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 Vl(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function Wl(e){if((0,r.nB)(e.target,zl)){const t=Oi(this.menu.container,this.hot.rootDocument),n=e.target.getBoundingClientRect();e.stopPropagation(),Nl(jl,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,i=Array.prototype.indexOf.call(o,n);if(e<0||i!==o.length-1)return;const s=t.querySelector(`.${zl}`);if(this.enabled&&s)return;if(!this.enabled)return void(s&&s.parentNode.removeChild(s));const a=this.hot.rootDocument.createElement("button");a.className=zl,a.type="button",a.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,r.Bq)(a,[(0,m.MG)(),(0,m.SM)(" ")]),(0,r.Bq)(t,[(0,m.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,Vl).call(this,this.menu)}function ql(e){Ll(Bl,this,Vl).call(this,e)}function Xl(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Yl(e){return(t=jl).get(Ll(t,this))?null:e;var t}function Ql(e){(0,r.nB)(e.target,zl)&&Nl(jl,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}_l.SEPARATOR={name:Ri};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(),r=this.options,i=[];return(0,Et.Ti)(e,n,(e=>{const n=[];!r.exportHiddenRows&&this._isHiddenRow(e)||((0,Et.Ti)(t,o,(t=>{!r.exportHiddenColumns&&this._isHiddenColumn(t)||n.push(this.hot.getDataAtCell(e,t))})),i.push(n))})),i}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:n}=this._getDataRange(),o=this.hot.getRowHeader();(0,Et.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,Et.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,r=t,i=e]=this.options.range;return n=Math.max(n,0),o=Math.max(o,0),r=Math.min(r,t),i=Math.min(i,e),{startRow:n,startCol:o,endRow:r,endCol:i}}_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 rc=String.fromCharCode(13),ic=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(rc)?`'${e}`:e}function fc(e,t){return t.test(e)?`'${e}`:e}const mc="csv",gc={[mc]: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,r=this.dataProvider.getRowHeaders(),i=r.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}))),i&&(s+=e.columnDelimiter),s+=n.join(e.columnDelimiter),s+=e.rowDelimiter),(0,u.z0)(t,((t,n)=>{n>0&&(s+=e.rowDelimiter),i&&(s+=this._escapeCell(r[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,fc).call(this,o,n):"function"==typeof n?o=n(o):n&&(o=oc(hc,this,pc).call(this,o)),(t||o.indexOf(rc)>=0||o.indexOf(ic)>=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,r=this._createTypeFormatter(e,t),i=this._createBlob(r),s=o.URL||o.webkitURL,a=n.createElement("a"),l=`${r.options.filename}.${r.options.fileExtension}`;if(void 0!==a.download){const e=s.createObjectURL(i);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(i,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!gc[e])throw new Error(`Export format type "${e}" is not supported.`);return function(e,t,n){return"function"==typeof gc[e]?new gc[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 yc{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 tr.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)(yc,Zr.A);const wc={};function Cc(e,t){if(!wc[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:n,descriptor:o}=wc[e];let r=t;return o.inputValuesDecorator&&(r=o.inputValuesDecorator(r)),function(e){return n.apply(e.meta.instance,[].concat([e],[r]))}}function xc(e){if(!wc[e])throw Error(`Filter condition "${e}" does not exist.`);return wc[e].descriptor}function Sc(e,t,n){n.key=e,wc[e]={condition:t,descriptor:n}}const Ac="none";Sc(Ac,(function(){return!0}),{name:Ae.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1});const Ec="empty";Sc(Ec,(function(e){return(0,d.Im)(e.value)}),{name:Ae.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0});const kc="not_empty";Sc(kc,(function(e,t){return!Cc(Ec,t)(e)}),{name:Ae.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0});const Rc="eq";Sc(Rc,(function(e,t){let[n]=t;return(0,d.As)(e.value).toLocaleLowerCase(e.meta.locale)===(0,d.As)(n)}),{name:Ae.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0});const Mc="neq";Sc(Mc,(function(e,t){return!Cc(Rc,t)(e)}),{name:Ae.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0}),Sc("gt",(function(e,t){let[n]=t,o=n;return"numeric"===e.meta.type&&(o=parseFloat(o,10)),e.value>o}),{name:Ae.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0}),Sc("gte",(function(e,t){let[n]=t,o=n;return"numeric"===e.meta.type&&(o=parseFloat(o,10)),e.value>=o}),{name:Ae.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0}),Sc("lt",(function(e,t){let[n]=t,o=n;return"numeric"===e.meta.type&&(o=parseFloat(o,10)),e.value<o}),{name:Ae.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0}),Sc("lte",(function(e,t){let[n]=t,o=n;return"numeric"===e.meta.type&&(o=parseFloat(o,10)),e.value<=o}),{name:Ae.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0});const Ic="date_after";Sc(Ic,(function(e,t){let[n]=t;const o=I(e.value,e.meta.dateFormat),r=I(n,e.meta.dateFormat);return!(!o.isValid()||!r.isValid())&&o.diff(r)>=0}),{name:Ae.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0});const Pc="date_before";Sc(Pc,(function(e,t){let[n]=t;const o=I(e.value,e.meta.dateFormat),r=I(n,e.meta.dateFormat);return!(!o.isValid()||!r.isValid())&&o.diff(r)<=0}),{name:Ae.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0});const Tc="between";Sc(Tc,(function(e,t){let[n,o]=t,r=n,i=o;if("numeric"===e.meta.type){const e=parseFloat(r,10),t=parseFloat(i,10);r=Math.min(e,t),i=Math.max(e,t)}else if("date"===e.meta.type){const t=Cc(Pc,[i]),n=Cc(Ic,[r]);return t(e)&&n(e)}return e.value>=r&&e.value<=i}),{name:Ae.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0});const Oc="not_between";Sc(Oc,(function(e,t){return!Cc(Tc,t)(e)}),{name:Ae.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0});const $c="begins_with";Sc($c,(function(e,t){let[n]=t;return(0,d.As)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,d.As)(n))}),{name:Ae.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0});const Dc="ends_with";Sc(Dc,(function(e,t){let[n]=t;return(0,d.As)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,d.As)(n))}),{name:Ae.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0});const Nc="contains";Sc(Nc,(function(e,t){let[n]=t;return(0,d.As)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,d.As)(n))>=0}),{name:Ae.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0});const Lc="not_contains";Sc(Lc,(function(e,t){return!Cc(Nc,t)(e)}),{name:Ae.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0});const Hc="date_tomorrow";Sc(Hc,(function(e){const t=I(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I().subtract(-1,"days").startOf("day"),"d")}),{name:Ae.FILTERS_CONDITIONS_TOMORROW,inputsCount:0});const zc="date_today";Sc(zc,(function(e){const t=I(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I().startOf("day"),"d")}),{name:Ae.FILTERS_CONDITIONS_TODAY,inputsCount:0});const Fc="date_yesterday";Sc(Fc,(function(e){const t=I(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I().subtract(1,"days").startOf("day"),"d")}),{name:Ae.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0});const jc="numeric",Bc="text",_c="date",Vc={[jc]:[Ac,Ri,Ec,kc,Ri,Rc,Mc,Ri,"gt","gte","lt","lte",Tc,Oc],[Bc]:[Ac,Ri,Ec,kc,Ri,Rc,Mc,Ri,$c,Dc,Ri,Nc,Lc],[_c]:[Ac,Ri,Ec,kc,Ri,Rc,Mc,Ri,Pc,Ic,Tc,Ri,Hc,zc,Fc]};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}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){Wc(this,"hot",void 0),Wc(this,"eventManager",new we.A(this)),Wc(this,"options",void 0),Wc(this,"_element",void 0),Wc(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(Ae.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,r.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 Xc(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yc(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,Zr.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)),Xc(this,n=Zc),n.add(this),function(e,t){Xc(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,r.iQ)(this._element,"htUIInput"),(0,r.iQ)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(Yc(Jc,this).type=this.options.type,Yc(Jc,this).placeholder=this.translateIfPossible(this.options.placeholder),Yc(Jc,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&Yc(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 ru(e,t,n){return e.set(su(e,t),n),n}function iu(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 iu(au,this)}registerHooks(){this.addLocalHook("click",(()=>su(hu,this,gu).call(this)))}setItems(e){ru(lu,this,this.translateNames(e)),iu(au,this)&&iu(au,this).setMenuItems(iu(lu,this))}translateNames(e){return(0,u.z0)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),ru(au,this,new ra(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),iu(au,this).setMenuItems(iu(lu,this));const e=new qc(this.hot,{className:"htUISelectCaption"}),t=new qc(this.hot,{className:"htUISelectDropdown"});ru(cu,this,e),ru(uu,this,e.element),ru(du,this,t),this.hot.getSettings().ariaTags&&((0,r.Bq)(t.element,[(0,m.MG)()]),(0,r.Bq)(this._element,[(0,m.$o)()])),(0,u.z0)([e,t],(e=>this._element.appendChild(e.element))),iu(au,this).addLocalHook("select",(e=>su(hu,this,fu).call(this,e))),iu(au,this).addLocalHook("afterClose",(()=>su(hu,this,mu).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:iu(au,this).hot.getTranslatedPhrase(Ae.FILTERS_CONDITIONS_NONE),iu(uu,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();iu(au,this)&&(iu(au,this).open(),iu(au,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),iu(au,this).getNavigator().toFirstItem(),iu(au,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){iu(au,this)&&iu(au,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){iu(au,this)&&(iu(au,this).destroy(),ru(au,this,null)),iu(cu,this)&&iu(cu,this).destroy(),iu(du,this)&&iu(du,this).destroy(),super.destroy()}}function fu(e){e.name!==Ri&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function mu(){this.runLocalHooks("afterClose")}function gu(){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 yu=new WeakSet;class wu extends yc{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=yu),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:Ae.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new eu(this.hot,{placeholder:Ae.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>vu(yu,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(yu,this,xu).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,s.o8)(e.command);t.name.startsWith(Ae.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(Ac),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:Ac);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,i,s)=>{(0,r.iQ)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,r.iQ)(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return(0,r.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(Ac)];if(null!==e){const{visualIndex:n}=e;t=function(e){const t=[];let n=e;return Vc[n]||(n=Bc),(0,u.z0)(Vc[n],(e=>{let n;n=e===Ri?{name:Ri}:(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,i.CA)(e))}const Su={};function Au(e,t,n){Su[e]={name:t,func:n}}const Eu="conjunction",ku=Ae.FILTERS_LABELS_CONJUNCTION;Au(Eu,ku,(function(e,t){return e.every((e=>e.func(t)))}));const Ru="disjunction",Mu=Ae.FILTERS_LABELS_DISJUNCTION;Au(Ru,Mu,(function(e,t){return e.some((e=>e.func(t)))}));const Iu="disjunctionWithExtraCondition",Pu=Ae.FILTERS_LABELS_DISJUNCTION;function Tu(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(Du(e,t))}function $u(e,t,n){return e.set(Du(e,t),n),n}function Du(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")}Au(Iu,Pu,(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 Nu=new WeakMap,Lu=new WeakMap;class Hu extends qc{static get DEFAULTS(){return(0,s.o8)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,s.X$)(Hu.DEFAULTS,t)),Tu(this,Nu,void 0),Tu(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),$u(Lu,this,e),$u(Nu,this,this._element.firstChild),Ou(Nu,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(Nu,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(Ou(Nu,this).checked=e)}focus(){this.isBuilt()&&Ou(Nu,this).focus()}}var zu=new WeakSet;class Fu extends yc{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=zu),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,r.iQ)(t.parentNode,"htFiltersMenuOperators"),(0,u.z0)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[Eu,Ru];(0,u.z0)(e,(t=>{const n=new Hu(this.hot,{name:"operator",label:{htmlFor:t,textContent:(o=t,Su[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")}(zu,this,ju).call(this,e))),this.elements.push(n)}))}setChecked(e){if(this.elements.length<e)throw Error(br.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 Hu&&e.isChecked()));return e?e.getValue():Eu}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]:Eu;t===Iu&&(t=Ru),this.state.setValueAtIndex(e,t)}reset(){this.setChecked(0)}}function ju(e){this.setState(e.target.value)}function Bu(e,t){let n=e;return""===n&&(n=`(${t})`),n}function _u(e){const t=new Set(e);return function(e){return t.has(e)}}function Vu(e){return null==e?"":e}function Wu(e){return Array.from(new Set(e)).map((e=>Vu(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 r=[],i=e===t;let s;return i||(s=_u(t)),e.forEach((e=>{let t=!1;(i||s(e))&&(t=!0);const a={checked:t,value:e,visualValue:Bu(e,n)};o&&o(a),r.push(a)})),r}(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 Xu=new WeakMap;class Yu extends qc{static get DEFAULTS(){return(0,s.o8)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){var n,o,r;super(e,(0,s.X$)(Yu.DEFAULTS,t)),r=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=Xu),o.set(n,r)}build(){var e,t;super.build(),e=Xu,t=this._element.firstChild,e.set(qu(e,this),t)}update(){this.isBuilt()&&(Uu(Xu,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&Uu(Xu,this).focus()}activate(){Uu(Xu,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,rd=new WeakMap,id=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,rd,void 0),Qu(this,id,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:Ae.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),ed(ad,this,new Yu(this.hot,{textContent:Ae.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),ed(ld,this,new Yu(this.hot,{textContent:Ae.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return Zu(rd,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,fd).call(this,e)))}setItems(e){var t;ed(od,this,e),null===(t=Zu(rd,this))||void 0===t||t.loadData(Zu(od,this))}setLocale(e){ed(id,this,e)}getLocale(){return Zu(id,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(rd,this))||void 0===n||n.destroy(),(0,r.iQ)(t,"htUIMultipleSelectHot"),ed(rd,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,r,i)=>{e.title=i.instance.getDataAtRowProp(t,i.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{Zu(rd,this).listen()},modifyColWidth:t=>{const n=Zu(rd,this).container.scrollWidth-(0,r.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(rd,this).init(),this.hot.addHook("afterSetTheme",((e,t)=>{t||Zu(rd,this).useTheme(e)}));const o=Zu(rd,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(rd,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(rd,this).listen()}reset(){Zu(sd,this).reset(),Zu(ad,this).reset(),Zu(ld,this).reset()}update(){this.isBuilt()&&(Zu(rd,this).loadData(function(e,t){const n=_u(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(rd,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(rd,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(rd,this).loadData(n)}function hd(e){this.runLocalHooks("keydown",e,this),(0,g.OH)(p.m0,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,i.CA)(e),Zu(rd,this).listen(),Zu(rd,this).selectCell(0,0))}function pd(e){const t=[];e.preventDefault(),Zu(rd,this).getSourceData().forEach(((e,n)=>{e.checked=!0,t.push((0,Ku.Wm)(e,n)[0])})),Zu(rd,this).setSourceDataAtCell(t)}function fd(e){const t=[];e.preventDefault(),Zu(rd,this).getSourceData().forEach(((e,n)=>{e.checked=!1,t.push((0,Ku.Wm)(e,n)[0])})),Zu(rd,this).setSourceDataAtCell(t)}const md="by_value";function gd(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")}Sc(md,(function(e,t){let[n]=t;return n(e.value)}),{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[_u(t)]},showOperators:!1});var bd,vd=new WeakSet;class yd extends yc{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=>gd(vd,this,wd).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e))),this.hot.addHook("modifyFiltersMultiSelectValue",((e,t)=>gd(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===md){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?Ac:md},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,n,o,r,i)=>{const[s]=(0,u.y0)(n,(e=>e.name===md)),a={},l=this.hot.getTranslatedPhrase(Ae.FILTERS_VALUES_BLANK_CELLS);if(s){const n=r(t,i),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=Wu(c);o&&(s.args[0]=o);const p=[],f=Gu(h,s.args[0],l,(e=>{e.checked&&p.push(e.value),gd(vd,this,Cd).call(this,e,d)})),m=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,m).locale,a.args=[p],a.command=xc(md),a.itemsSnapshot=f}else a.args=[],a.command=xc(Ac);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,i,s)=>{(0,r.iQ)(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return(0,r.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(Ae.FILTERS_VALUES_BLANK_CELLS),t=this._getColumnVisibleValues(),n=t.map((e=>e.value)),o=new Map(t.map((e=>[e.value,e.meta]))),r=Wu(n),i=Gu(r,r,e,(e=>{gd(vd,this,Cd).call(this,e,o)}));this.getMultipleSelectElement().setItems(i),super.reset(),this.getMultipleSelectElement().setValue(r);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:Vu(t),meta:this.hot.getCellMeta(n,e.visualIndex)})))}}function wd(e){(0,p.m0)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,i.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 Sd=new WeakSet;class Ad extends yc{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=Sd),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:Ae.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:Ad.BUTTON_OK})),this.elements.push(new eu(this.hot,{type:"button",value:Ae.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:Ad.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")}(Sd,this,Ed).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,r.iQ)(t.parentNode,"htFiltersMenuActionBar"),(0,u.z0)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function Ed(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=Ad;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 tr.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),r=null!==(n=null==o?void 0:o.conditions)&&void 0!==n?n:[],i=null==o?void 0:o.operation;return this.isMatchInConditions(r,e,i)}isMatchInConditions(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Eu;return!e.length||function(e){if(!Su[e])throw Error(`Operation with id "${e}" does not exist.`);const t=Su[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]:Eu,o=arguments.length>3?arguments[3]:void 0;const r=this.hot.getCellMeta(0,e).locale,i=t.args.map((e=>"string"==typeof e?e.toLocaleLowerCase(r):e)),s=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const a=this.getOperation(e);if(a){if(a!==n)throw Error(br.O`The column of index ${e} has been already applied with a \`${a}\`\x20
- filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
- Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
- use it consequently for a particular column).`)}else if((0,d.b0)(Su[n]))throw new Error(br.O`Unexpected operation named \`${n}\`. Possible ones are\x20
- \`disjunction\` and \`conjunction\`.`);const l=this.getConditions(e);0===l.length?this.filteringStates.setValueAtIndex(e,{operation:n,conditions:[{name:s,args:i,func:Cc(s,i)}]},o):l.push({name:s,args:i,func:Cc(s,i)}),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:r}]=t;return e.push({column:n,operation:o,conditions:r.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,Zr.A);const Id=Md;function Pd(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 Td=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];Pd(this,"conditionCollection",void 0),Pd(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 $d(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 Dd=new WeakSet;class Nd{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];var o,r;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(o=this,r=Dd),r.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=>$d(Dd,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",(()=>$d(Dd,this,Hd).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>$d(Dd,this,zd).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 r=this.conditionCollection.getColumnStackPosition(e);-1===r&&(r=this.latestEditedColumnPosition);const i=o.slice(0,r),s=o.slice(r);s.length&&s[0].column===e&&s.shift();const a=(0,g.cF)((function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=new Id(n.hot,!1),i=[].concat(e,o);r.importAllConditions(i);const s=n.columnDataFactory(t);let a;a=r.isEmpty()?s:new Td(r,(e=>n.columnDataFactory(e))).filter(),a=(0,u.YD)(a,(e=>e.meta.visualRow));const l=_u(a);return r.destroy(),(0,u.y0)(s,(e=>l(e.meta.visualRow)))}))(i),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 Hd(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function zd(){(0,u.z0)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}(0,s.co)(Nd,Zr.A);const Fd=Nd,jd="filters";var Bd=n(41496);function _d(e,t,n){Vd(e,t),t.set(e,n)}function Vd(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wd(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",Xd=qd;var Yd=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,Vd(this,n=Zd),n.add(this),Wd(this,"dropdownMenuPlugin",null),Wd(this,"conditionCollection",null),Wd(this,"conditionUpdateObserver",null),Wd(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),Wd(this,"filtersRowsMap",null),_d(this,Yd,void 0),_d(this,Qd,new WeakSet),_d(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),i=()=>`${this.hot.getTranslatedPhrase(Ae.FILTERS_DIVS_FILTER_BY_CONDITION)}:`;if(!this.components.get("filter_by_condition")){const e=new wu(this.hot,{id:"filter_by_condition",name:i,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 Fu(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new wu(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 yd(this.hot,{id:"filter_by_value",name:()=>`${this.hot.getTranslatedPhrase(Ae.FILTERS_DIVS_FILTER_BY_VALUE)}:`}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new Ad(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new Id(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new Fd(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,ih).call(e,...n)})),this.addHook("beforeDropdownMenuShow",(()=>Ud(Zd,this,rh).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(Yd,this)&&this.dropdownMenuPlugin.enabled){const e=[{focus:()=>{const e=Kd(Yd,this).getMenu(),t=e.getNavigator(),n=Kd(Yd,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(Yd,this,function(e,t){let n,o=-1;const i=(s=t,_s({initialPage:0,size:()=>s.length,onItemSelect:(e,t)=>{const n=s[e];return n instanceof ud?t:!(n.element&&!(0,r.zN)(n.element))&&void n.focus()}}));var s;const a=e=>()=>{n.isOpened()&&n.getKeyboardShortcutsCtrl().listen(jd),i.setCurrentPage(t.indexOf(e))};function l(e){const r=n.getKeyboardShortcutsCtrl(),s=e.getKeyboardShortcutsCtrl();i.clear(),s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:r.getContext(jd),callback:()=>{e.isSubMenu()&&e.close(),r.listen(jd)}}]),e.isSubMenu()||r.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{const t=n.getNavigator();t.getCurrentPage()>-1&&(o=t.getCurrentPage()),t.clear(),e.shiftKey?i.toPreviousItem():i.toNextItem()}},{keys:[["Escape"]],callback:()=>{n.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const n=t[i.getCurrentPage()];n instanceof pu&&(n.openOptions(),e.preventDefault()),n instanceof Yu&&(n.activate(),e.preventDefault()),n instanceof qc||e.preventDefault()}}],jd)}function c(e){e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||i.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),{...i,listen:function(){n.focus(),n.getKeyboardShortcutsCtrl().listen(jd)},setMenu:c,getMenu:function(){return n},getLastMenuPage:function(){return o}}}(this.dropdownMenuPlugin.menu,e));const t=e=>{Kd(Yd,this).listen(),e.preventDefault(),(0,p.m0)(e.keyCode,"TAB")&&(e.shiftKey?Kd(Yd,this).toPreviousItem():Kd(Yd,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:Xd})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Xd)}addCondition(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Eu;const r=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(r,{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 r=this.exportConditions(),i=this.hot.runHooks("beforeFilter",r,Kd(Jd,this));if(!1!==i&&n){const n=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),o=(0,u.YD)(t.filter(),(e=>e.meta.visualRow));const e=_u(o);(0,Et.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===i||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!==i&&(this.hot.runHooks("afterFilter",r),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 r;const{row:i,col:s,visualCol:a,visualRow:l,type:c,instance:u,dateFormat:d,locale:h}=this.hot.getCellMeta(o,t),p=null!==(r=this.hot.getDataAtCell(this.hot.toVisualRow(o),t))&&void 0!==r?r:e;n.push({meta:{row:i,col:s,visualCol:a,visualRow:l,type:c,instance:u,dateFormat:d,locale:h},value:Vu(p)})})),n}updateValueComponentCondition(e){const t=Wu(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 r=e;return r===Ru&&t.command.key!==Ac&&n.command.key!==Ac&&o.command.key!==Ac?r=Iu:o.command.key!==Ac&&(t.command.key!==Ac&&n.command.key!==Ac||(r=Eu)),r}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 Td(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),r=0;r<n;r++)o[r]=arguments[r];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,r=new Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];const s=this.getIndexesOfComponents(...r);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 rh(){const e=this.dropdownMenuPlugin.menu;Kd(Qd,this).has(e)||Kd(Yd,this).setMenu(e),Kd(Qd,this).add(e)}function ih(e){e.items.push({name:Ri}),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(),r=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),s=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),o,r,i);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),o.command.key!==Ac&&(this.conditionCollection.addCondition(t,o,s,a),r.command.key!==Ac&&this.conditionCollection.addCondition(t,r,s,a)),i.command.key!==Ac&&this.conditionCollection.addCondition(t,i,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!==wu||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,r.iQ)(t,"htFiltersActive"):(0,r.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:r}=e;Array.isArray(r)&&Gd(Jd,this,Kd(Jd,this).map((e=>(e.column===o&&n.length>0&&e.conditions.forEach((e=>{"by_value"===e.name&&(e.args=[[...r]])})),e))));const i=n.filter((e=>e.name===md)),s=n.filter((e=>e.name!==md));if(i.length>=2||s.length>=3)(0,Lo.R8)(br.O`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
- The overall amount of conditions exceed the capability of the dropdown menu.\x20
- 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 fh(e){return Object.keys(e).reduce(((t,n)=>("hyperformula"!==n&&(t[n]=e[n]),t)),{})}function mh(){const e="engine_relationship",t=(0,ar.A)(tp);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function gh(){const e="shared_engine_usage",t=(0,ar.A)(tp);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function bh(e){var t;const n=mh(),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=mh(),o=n.get(e),r=gh(),i=r.get(e);o&&o.includes(t)&&(o.splice(o.indexOf(t),1),0===o.length&&n.delete(e)),i&&i.includes(t.guid)&&(i.splice(i.indexOf(t.guid),1),0===i.length&&(r.delete(e),e.destroy()))}}const yh="DD/MM/YYYY";function wh(e,t){return"string"==typeof e&&"date"===t}function Ch(e,t){return I(e,t,!0).isValid()}function xh(e,t){return I(e,t,!0).format(yh)}function Sh(e,t){const n=new Date(Date.UTC(0,0,e+-1));return I(n).format(t)}function Ah(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 r;return 0===t?null!==(r=o[t])&&void 0!==r?r: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 Eh(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 Ih=new WeakMap,Ph=new WeakMap,Th=new WeakMap,Oh=new WeakMap,$h=new WeakMap,Dh=new WeakMap,Nh=new WeakMap;const Lh=class{constructor(e,t,n){Eh(this,Ih,void 0),Eh(this,Ph,void 0),Eh(this,Th,void 0),Eh(this,Oh,[]),Eh(this,$h,[]),Eh(this,Dh,void 0),Eh(this,Nh,[]),Rh(Ih,this,e),Rh(Ph,this,t),Rh(Th,this,n)}setRemovedHfIndexes(e){return Rh(Nh,this,e.map((e=>{const t=kh(Ph,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),kh(Nh,this)}getRemovedHfIndexes(){return kh(Nh,this)}getHfIndexFromVisualIndex(e){const t=kh(Ph,this).getIndexesSequence(),n=kh(Ph,this).getNotTrimmedIndexes();return t.indexOf(n[e],e)}syncMoves(e){const t=`move${(0,h.Ob)(kh(Ih,this))}s`;kh(Th,this).getEngine().batch((()=>{e.forEach((e=>{const n=e.from!==e.to,o=e.from+1!==e.to;n&&o&&kh(Th,this).getEngine()[t](kh(Th,this).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,n){!1!==n&&(Rh($h,this,e.map((e=>this.getHfIndexFromVisualIndex(e)))),Rh(Dh,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(kh(Th,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const n=Ah(kh($h,this),kh(Dh,this),kh(Ph,this).getNumberOfIndexes());null===kh(Th,this).getSheetId()?kh(Th,this).getPostponeAction((()=>this.syncMoves(n))):this.syncMoves(n)}getIndexesChangeSyncMethod(){const e=`set${(0,h.Ob)(kh(Ih,this))}Order`;return t=>{if(kh(Th,this).isPerformingUndoRedo())return;const n=kh(Ph,this).getIndexesSequence();if("update"===t&&n.length>0){const t=kh(Oh,this).map((e=>n.indexOf(e))),o=kh(Th,this).getEngine().getSheetDimensions(kh(Th,this).getSheetId());let r;r="row"===kh(Ih,this)?o.height:o.width;for(let e=t.length;e<r;e+=1)t.push(e);kh(Th,this).getEngine()[e](kh(Th,this).getSheetId(),t)}Rh(Oh,this,n)}}init(){Rh(Oh,this,kh(Ph,this).getIndexesSequence())}};function Hh(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 zh(e,t){return e.get(jh(e,t))}function Fh(e,t,n){return e.set(jh(e,t),n),n}function jh(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,_h=new WeakMap,Vh=new WeakMap,Wh=new WeakMap,Gh=new WeakMap,Kh=new WeakMap,Uh=new WeakMap;const qh=class{constructor(e,t,n){Hh(this,Bh,void 0),Hh(this,_h,void 0),Hh(this,Vh,void 0),Hh(this,Wh,!1),Hh(this,Gh,!1),Hh(this,Kh,null),Hh(this,Uh,null),Fh(Bh,this,new Lh("row",e,this)),Fh(_h,this,new Lh("column",t,this)),Fh(Vh,this,n)}getForAxis(e){return zh("row"===e?Bh:_h,this)}setPerformUndo(e){Fh(Wh,this,e)}setPerformRedo(e){Fh(Gh,this,e)}isPerformingUndoRedo(){return zh(Wh,this)||zh(Gh,this)}getSheetId(){return zh(Uh,this)}getEngine(){return zh(Kh,this)}getPostponeAction(){return zh(Vh,this)}setupSyncEndpoint(e,t){Fh(Kh,this,e),Fh(Uh,this,t),zh(Bh,this).init(),zh(_h,this).init()}};function Xh(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 Yh(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"];Se.R.getSingleton().register("afterNamedExpressionAdded"),Se.R.getSingleton().register("afterNamedExpressionRemoved"),Se.R.getSingleton().register("afterSheetAdded"),Se.R.getSingleton().register("afterSheetRemoved"),Se.R.getSingleton().register("afterSheetRenamed"),Se.R.getSingleton().register("afterFormulasValuesUpdate");const op=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var rp=new WeakMap,ip=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),Yh(this,rp,!1),Yh(this,ip,!1),Yh(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,Ip).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,Pp).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,Tp).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,$p).call(e,...n)}]]),Xh(this,"staticRegister",(0,ar.A)("formulas")),Xh(this,"engine",null),Xh(this,"sheetId",null),Xh(this,"sheetName",null),Xh(this,"indexSyncer",null),Xh(this,"rowAxisSyncer",null),Xh(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 r;if("function"==typeof o.hyperformula||"function"==typeof o)return function(e,t,n){const o=t[tp],r=function(e){var t;const n=e[tp],o=fh(null!=n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),r=ph(e);return{...hh,...o,...r}}(t),i=mh(),s=gh();(function(e,t){t&&t.forEach((t=>{const{name:n,plugin:o,translations:r}=t;try{e.registerFunction(n,o,r)}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(r);return i.set(a,[n]),s.set(a,[n.guid]),function(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:n,expression:o,scope:r,options:i}=t;try{e.addNamedExpression(n,o,r,i)}catch(e){(0,Lo.R8)(e.message)}})),e.resumeEvaluation())}(a,o.namedExpressions),a.on("sheetAdded",(()=>{a.rebuildAndRecalculate()})),a.on("sheetRemoved",(()=>{a.rebuildAndRecalculate()})),a}(null!==(r=o.hyperformula)&&void 0!==r?r:o,t,e);if("object"==typeof o&&(0,d.b0)(o.hyperformula)){const t=mh(),n=gh().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)(br.O`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
- 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,fp).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,fp).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,mp).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,gp).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,yp).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,wp).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,Sp).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,Ap).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,Ep).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,r)=>{this.rowAxisSyncer.calculateAndSyncMoves(o,r)})),this.hot.addHook("afterColumnMove",((e,t,n,o,r)=>{this.columnAxisSyncer.calculateAndSyncMoves(o,r)})),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{...fh(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),r=this.hot.toPhysicalColumn(t);return null!==o&&null!==r?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 r;(t||o!==this.sheetId)&&n.has(o)&&(e.render(),null===(r=e.view)||void 0===r||r.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:n,col:o,sheet:r}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,d.O9)(r)?`${r}:${n}x${o}`:""},n=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var o,r;const{row:i,col:s}=null!==(o=e.address)&&void 0!==o?o:{};if(!1===(0,d.O9)(i)||!1===(0,d.O9)(s)||i>=this.hot.countRows()||s>=this.hot.countCols())return;const a=null==e||null===(r=e.address)||void 0===r?void 0:r.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(i,s),e.getCellMeta(i,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 r=this.hot.getCellMeta(e,t);var i;return wh(n,r.type)&&(Ch(n,r.dateFormat)?n=xh(n,r.dateFormat):!1===("string"==typeof(i=n)&&i.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 r=this.engine.getCellValue(e);return"date"===n.type&&(0,Et.kf)(r)&&(r=Sh(r,n.dateFormat)),"object"==typeof r&&null!==r?r.value:r}return e}function dp(e,t,n){const{row:o,col:r}=t.getTopStartCorner(),{row:i,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(r),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),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:f,col:m}=d.start,{row:g,col:b}=d.end,v=g-f+1,y=b-m+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=f+e%v,r=m+t%y,i=this.hot.getCellMeta(o,r);wh(n,i.type)&&(n.startsWith("'")?p[e][t]=n.slice(1):!1===this.isFormulaCellType(o,r,this.sheetId)&&(p[e][t]=(w=n,C=i.dateFormat,I(w,yh,!0).format(C))))}var w,C;return p}function hp(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,h.Ob)(tp))||Jh(ip,this,(0,d.b0)(this.hot.getSettings().data))}function pp(){if(Zh(ip,this))return void this.switchSheet(this.sheetName);const e=this.hot.getSourceDataArray();e.forEach(((t,n)=>{t.forEach(((t,o)=>{const r=this.hot.getCellMeta(n,o,{skipMetaExtension:!0}),i=r.dateFormat;wh(t,r.type)&&(Ch(t,i)?e[n][o]=xh(t,i):t.startsWith("=")||(e[n][o]=`'${t}`))}))})),Jh(rp,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),Jh(rp,this,!1)}function fp(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(ip,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){Jh(rp,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),Jh(rp,this,!1)}}}function mp(e,t,n,o){if("get"!==o||Zh(rp,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const r=this.hot.toVisualRow(e);if(null===r||null===t)return;const i=this.getCellType(r,t);if("VALUE"===i||"EMPTY"===i)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(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let l=this.engine.getCellValue(a);const c=this.hot.getCellMeta(r,t,{skipMetaExtension:!0});"date"===c.type&&(0,Et.kf)(l)&&(l=Sh(l,c.dateFormat)),n.value="object"==typeof l&&null!==l?l.value:l}function gp(e,t,n,o){if("get"!==o||Zh(rp,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const r=this.hot.toVisualRow(e),i=this.hot.propToCol(t);if(null===r||null===i)return;const s=this.getCellType(r,i);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(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};n.value=this.engine.getCellSerialized(l)}function bp(e,t){if(op(t))return;const n=[],o=[],r=this.engine.batch((()=>{e.forEach((e=>{let[t,r,,i]=e;const s=this.hot.propToCol(r),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,i):n.push([t,s,i]),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(r),this.validateDependentCells(r,o)}function vp(e,t){if(op(t))return;const n=[],o=[];e.forEach((e=>{let[t,r,,i]=e;const s=this.hot.propToCol(r);if(!(0,Et.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,i))):(0,Lo.R8)(`Not possible to set source cell data at ${JSON.stringify(a)}`)})),this.renderDependentSheets(n),this.validateDependentCells(n,o)}function yp(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 wp(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 Sp(e,t,n){if(op(n))return;const o=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(o)}function Ap(e,t,n){if(op(n))return;const o=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(o)}function Ep(e,t,n,o){if(op(o))return;const r=this.rowAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),i=this.engine.batch((()=>{r.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function kp(e,t,n,o){if(op(o))return;const r=this.columnAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),i=this.engine.batch((()=>{r.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function Rp(e,t,n){var o;Jh(rp,this,!0);const r=this.hot.getSourceDataArray(n,0,n+((null===(o=t.__children)||void 0===o?void 0:o.length)||0),this.hot.countSourceCols());Jh(rp,this,!1),r.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 Ip(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function Pp(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function Tp(e){this.hot.runHooks("afterSheetAdded",e)}function Op(e,t){ep(ap,this,cp).call(this,t),this.hot.runHooks("afterSheetRenamed",e,t)}function $p(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}var Dp=n(52246);function Np(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(zp(e,t))}function Hp(e,t,n){return e.set(zp(e,t),n),n}function zp(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")}Se.R.getSingleton().register("beforeHideColumns"),Se.R.getSingleton().register("afterHideColumns"),Se.R.getSingleton().register("beforeUnhideColumns"),Se.R.getSingleton().register("afterUnhideColumns");const Fp="hiddenColumns";var jp=new WeakMap,Bp=new WeakSet;class _p extends un{constructor(){var e;super(...arguments),Np(this,e=Bp),e.add(this),function(e,t){Np(e,t),t.set(e,null)}(this,jp)}static get PLUGIN_KEY(){return Fp}static get PLUGIN_PRIORITY(){return 310}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,columns:[]}}isEnabled(){return!!this.hot.getSettings()[Fp]}enablePlugin(){var e=this;this.enabled||(Hp(jp,this,new Dp.o),Lp(jp,this).addLocalHook("init",(()=>zp(Bp,this,qp).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,Lp(jp,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return zp(Bp,e,Up).call(e,...n)})),this.addHook("afterGetCellMeta",((e,t,n)=>zp(Bp,this,Wp).call(this,e,t,n))),this.addHook("modifyColWidth",((e,t)=>zp(Bp,this,Vp).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 zp(Bp,e,Kp).call(e,...n)})),this.addHook("modifyCopyableRange",(e=>zp(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 r=Lp(jp,this).getValues().slice(),i=e.length>0;if(n&&i){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,u.z0)(t,(e=>{r[e]=!1})),o=(0,u.mu)(r,((e,t,n)=>(t&&e.push(this.hot.toVisualColumn(n)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,o,n&&i)&&(n&&i&&Lp(jp,this).setValues(r),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,o,n&&i,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(jp,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(jp,this).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return Lp(jp,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(){Hp(jp,this,null),super.destroy()}}function Vp(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 Wp(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,r)=>{t.push({startRow:e,endRow:n,startCol:o,endCol:r})};return(0,u.z0)(e,(e=>{let t=!0,o=0;(0,Et.Ti)(e.startCol,e.endCol,(r=>{this.isHidden(r)?(t||n(e.startRow,e.endRow,o,r-1),t=!0):(t&&(o=r),r===e.endCol&&n(e.startRow,e.endRow,o,r),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,r.iQ)(t,n)}function Up(e){var t;e.items.push({name:Ri},(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(Ae.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:e,to:n}=this.getSelectedRangeLast(),o=Math.max(Math.min(e.col,n.col),0),r=Math.max(e.col,n.col),i=[];for(let e=o;e<=r;e+=1)i.push(e);t.hideColumns(i);const s=i[i.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(Ae.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var n,o;if(0===t.length)return;let r=t[0],i=t[t.length-1];r=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(r-1,-1))&&void 0!==n?n:0,i=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==o?o:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(),i-r+1===this.countCols()||this.selectColumns(r,i)},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(),r=o.getTopStartCorner().col,i=o.getBottomEndCorner().col,s=this.columnIndexMapper,a=s.getRenderableFromVisualIndex(r),l=s.getRenderableFromVisualIndex(i),c=s.getNotTrimmedIndexes(),d=[];if(r!==i){if(i-r+1>l-a+1){const e=c.slice(r,i+1);d.push(...e.filter((e=>n.includes(e))))}}else if(0===a&&a<r)d.push(...c.slice(0,r));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>i&&d.push(...c.slice(i+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 Xp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yp(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")}Se.R.getSingleton().register("beforeHideRows"),Se.R.getSingleton().register("afterHideRows"),Se.R.getSingleton().register("beforeUnhideRows"),Se.R.getSingleton().register("afterUnhideRows");const Zp="hiddenRows";var ef=new WeakMap,tf=new WeakSet;class nf extends un{constructor(){var e;super(...arguments),Xp(this,e=tf),e.add(this),function(e,t){Xp(e,t),t.set(e,null)}(this,ef)}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(ef,this,new Dp.o),Yp(ef,this).addLocalHook("init",(()=>Jp(tf,this,cf).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,Yp(ef,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(tf,e,lf).call(e,...n)})),this.addHook("afterGetCellMeta",((e,t,n)=>Jp(tf,this,rf).call(this,e,t,n))),this.addHook("modifyRowHeight",((e,t)=>Jp(tf,this,of).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(tf,e,af).call(e,...n)})),this.addHook("modifyCopyableRange",(e=>Jp(tf,this,sf).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 r=Yp(ef,this).getValues().slice(),i=e.length>0;if(n&&i){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,u.z0)(t,(e=>{r[e]=!1})),o=(0,u.mu)(r,((e,t,n)=>(t&&e.push(this.hot.toVisualRow(n)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,o,n&&i)&&(n&&i&&Yp(ef,this).setValues(r),this.hot.runHooks("afterUnhideRows",t,o,n&&i,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=>{Yp(ef,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)(Yp(ef,this).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return Yp(ef,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(ef,this,null),super.destroy()}}function of(e,t){return this.isHidden(t)?0:e}function rf(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 sf(e){if(this.getSetting("copyPasteEnabled"))return e;const t=[],n=(e,n,o,r)=>{t.push({startRow:e,endRow:n,startCol:o,endCol:r})};return(0,u.z0)(e,(e=>{let t=!0,o=0;(0,Et.Ti)(e.startRow,e.endRow,(r=>{this.isHidden(r)?(t||n(o,r-1,e.startCol,e.endCol),t=!0):(t&&(o=r),r===e.endRow&&n(o,r,e.startCol,e.endCol),t=!1)}))})),t}function af(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,r.iQ)(t,n)}function lf(e){var t;e.items.push({name:Ri},(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(Ae.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:e,to:n}=this.getSelectedRangeLast(),o=Math.max(Math.min(e.row,n.row),0),r=Math.max(e.row,n.row),i=[];for(let e=o;e<=r;e+=1)i.push(e);t.hideRows(i);const s=i[i.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(Ae.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var n,o;if(0===t.length)return;let r=t[0],i=t[t.length-1];r=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(r-1,-1))&&void 0!==n?n:0,i=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==o?o:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(),i-r+1===this.countRows()||this.selectRows(r,i)},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(),r=o.getTopStartCorner().row,i=o.getBottomEndCorner().row,s=this.rowIndexMapper,a=s.getRenderableFromVisualIndex(r),l=s.getRenderableFromVisualIndex(i),c=s.getNotTrimmedIndexes(),d=[];if(r!==i){if(i-r+1>l-a+1){const e=c.slice(r,i+1);d.push(...e.filter((e=>n.includes(e))))}}else if(0===a&&a<r)d.push(...c.slice(0,r));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>i&&d.push(...c.slice(i+1))}return(0,u.z0)(d,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}}(this))}function cf(){const e=this.getSetting("rows");Array.isArray(e)&&this.hideRows(e)}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){return e.get(pf(e,t))}function hf(e,t,n){return e.set(pf(e,t),n),n}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")}Se.R.getSingleton().register("beforeColumnFreeze"),Se.R.getSingleton().register("afterColumnFreeze"),Se.R.getSingleton().register("beforeColumnUnfreeze"),Se.R.getSingleton().register("afterColumnUnfreeze");const ff="manualColumnFreeze";var mf=new WeakMap,gf=new WeakSet;class bf extends un{constructor(){var e;super(...arguments),uf(this,e=gf),e.add(this),function(e,t){uf(e,t),t.set(e,!1)}(this,mf)}static get PLUGIN_KEY(){return ff}static get PLUGIN_PRIORITY(){return 110}isEnabled(){return!!this.hot.getSettings()[ff]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>pf(gf,this,vf).call(this,e))),this.addHook("beforeColumnMove",((e,t)=>pf(gf,this,yf).call(this,e,t))),super.enablePlugin())}disablePlugin(){hf(mf,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;df(mf,this)||hf(mf,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;df(mf,this)||hf(mf,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 vf(e){var t;e.items.push({name:"---------"},(t=this,{key:"freeze_column",name(){return this.getTranslatedPhrase(Ae.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(Ae.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 yf(e,t){if(df(mf,this)){const n=this.hot.getSettings().fixedColumnsStart;if(t<n)return!1;if(e.some((e=>e<n)))return!1}}function wf(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 Cf="px",xf=class{constructor(e){wf(this,"hot",void 0),wf(this,"_element",null),wf(this,"state",0),wf(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,Et.kf)(e)&&(this._element.style.top=e+Cf),(0,Et.kf)(t)&&(this._element.style[this.inlineProperty]=t+Cf)}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,Et.kf)(e)&&(this._element.style.width=e+Cf),(0,Et.kf)(t)&&(this._element.style.height=t+Cf)}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,Et.kf)(e)&&(this._element.style.marginTop=e+Cf),(0,Et.kf)(t)&&(this._element.style[`margin${(0,h.Ob)(this.inlineProperty)}`]=t+Cf)}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}}},Sf=class extends xf{build(){super.build(),(0,r.iQ)(this._element,"ht__manualColumnMove--backlight")}},Af=class extends xf{build(){super.build(),(0,r.iQ)(this._element,"ht__manualColumnMove--guideline")}};function Ef(e,t,n){kf(e,t),t.set(e,n)}function kf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rf(e,t,n){return e.set(If(e,t),n),n}function Mf(e,t){return e.get(If(e,t))}function If(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")}Se.R.getSingleton().register("beforeColumnMove"),Se.R.getSingleton().register("afterColumnMove");const Pf="manualColumnMove",Tf="ht__manualColumnMove",Of="show-ui",$f="on-moving--columns",Df="after-selection--columns";var Nf=new WeakMap,Lf=new WeakMap,Hf=new WeakMap,zf=new WeakMap,Ff=new WeakMap,jf=new WeakMap,Bf=new WeakMap,_f=new WeakMap,Vf=new WeakMap,Wf=new WeakMap,Gf=new WeakMap,Kf=new WeakSet;class Uf extends un{constructor(){var e;super(...arguments),kf(this,e=Kf),e.add(this),Ef(this,Nf,new Sf(this.hot)),Ef(this,Lf,new Af(this.hot)),Ef(this,Hf,[]),Ef(this,zf,0),Ef(this,Ff,!1),Ef(this,jf,{}),Ef(this,Bf,void 0),Ef(this,_f,void 0),Ef(this,Vf,void 0),Ef(this,Wf,void 0),Ef(this,Gf,void 0)}static get PLUGIN_KEY(){return Pf}static get PLUGIN_PRIORITY(){return 120}isEnabled(){return!!this.hot.getSettings()[Pf]}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 If(Kf,e,qf).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 If(Kf,e,Yf).call(e,...n)})),this.addHook("afterScrollVertically",(()=>If(Kf,this,Jf).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 If(Kf,e,Zf).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),(0,r.iQ)(this.hot.rootElement,Tf),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,r.vy)(this.hot.rootElement,Tf),this.unregisterEvents(),Mf(Nf,this).destroy(),Mf(Lf,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const n=Mf(Bf,this),o=this.isMovePossible(e,t),r=this.hot.runHooks("beforeColumnMove",e,t,n,o);if(Rf(Bf,this,void 0),!1===r)return;o&&this.hot.columnIndexMapper.moveIndexes(e,t);const i=o&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,n,o,i),i}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const n=this.countFinalIndex(e,t);return Rf(Bf,this,t),this.moveColumns(e,n)}isMovePossible(e,t){const n=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),o=e.length+t>n,r=t<0,i=e.some((e=>e<0)),s=e.some((e=>e>=n));return!(o||r||i||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 r=e;r<=t;r+=1){const e=n.getRenderableFromVisualIndex(r);r<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()[Pf];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,Et.Ti)(e,t,(e=>{n.push(e)})),n}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(Mf(_f,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 i=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,Mf(_f,this)-1);const s=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=Mf(Nf,this).getOffset().start,c=Mf(Nf,this).getSize().width;let u=0,d=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=(0,r.Gq)(this.hot.rootElement),i=e.innerWidth-Mf(Vf,this)-t;d=e.innerWidth-Mf(jf,this).eventPageX-i-(void 0===n.scrollX?o:0)}else d=Mf(jf,this).eventPageX-(Mf(Vf,this)-(void 0===n.scrollX?o:0));if(Mf(Wf,this)&&(u=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(Mf(_f,this))&&(i+=o),i+=u,Mf(_f,this)<0)Mf(Gf,this)>0?Mf(jf,this).col=0:Mf(jf,this).col=e>0?e-1:e;else if(Mf(jf,this).TD.offsetWidth/2+i<=d){const e=Mf(_f,this)>=Mf(zf,this)?Mf(zf,this)-1:Mf(_f,this);Mf(jf,this).col=e+1,i+=Mf(jf,this).TD.offsetWidth}else Mf(jf,this).col=Mf(_f,this);let h=d,p=i;d+c+l>=s?h=s-c-l:d+l<a+u&&(h=a+u+Math.abs(l)),i>=s-1?p=s-1:0===p?p=1:void 0!==n.scrollX&&Mf(_f,this)<Mf(Gf,this)&&(p-=Mf(Vf,this)<=n.scrollX?Mf(Vf,this):0),Mf(Nf,this).setPosition(null,h),Mf(Lf,this).setPosition(null,p)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>If(Kf,this,Xf).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>If(Kf,this,Qf).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Mf(Nf,this).build(),Mf(Lf,this).build()}destroy(){Mf(Nf,this).destroy(),Mf(Lf,this).destroy(),super.destroy()}}function qf(e,t,n,o){const s=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),c=(0,r.nB)(e.target,"sortAction");if(!l||!a||Mf(Ff,this)||0!==e.button||c)return Rf(Ff,this,!1),Mf(Hf,this).length=0,void(0,r.vy)(this.hot.rootElement,[$f,Of]);const u=Mf(Lf,this).isBuilt()&&!Mf(Lf,this).isAppended(),d=Mf(Nf,this).isBuilt()&&!Mf(Nf,this).isAppended();u&&d&&(Mf(Lf,this).appendTo(s.hider),Mf(Nf,this).appendTo(s.hider));const{from:h,to:p}=l,f=Math.min(h.col,p.col),m=Math.max(h.col,p.col);if(t.row<0&&t.col>=f&&t.col<=m){o.column=!0,Rf(Ff,this,!0);const a=n.firstChild?(0,i.zg)(e,n.firstChild).x:e.offsetX;Mf(jf,this).eventPageX=e.pageX,Rf(_f,this,t.col),Mf(jf,this).TD=n,Mf(jf,this).col=t.col,Rf(Hf,this,this.prepareColumnsToMoving(f,m)),Rf(Wf,this,!!this.hot.getSettings().rowHeaders),Rf(zf,this,this.hot.countCols()),Rf(Gf,this,this.hot.getSettings().fixedColumnsStart),Rf(Vf,this,(0,r.cY)(this.hot.rootElement).left);const l=Mf(Wf,this)?-1:0,c=s.holder.scrollTop+s.getColumnHeaderHeight(0)+1,u=t.col<Mf(Gf,this),d=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),h=Math.abs(a-(this.hot.isRtl()?n.offsetWidth:0)),p=this.getColumnsWidth(f,t.col-1)+h,g=this.getColumnsWidth(l,f-1)+(u?d:0)+p;Mf(Nf,this).setPosition(c,g),Mf(Nf,this).setSize(this.getColumnsWidth(f,m),s.hider.offsetHeight-c),Mf(Nf,this).setOffset(null,-p),(0,r.iQ)(this.hot.rootElement,$f)}else(0,r.vy)(this.hot.rootElement,Df),Rf(Ff,this,!1),Mf(Hf,this).length=0}function Xf(e){Mf(Ff,this)&&(Mf(jf,this).eventPageX=e.pageX,this.refreshPositions())}function Yf(e,t,n,o){this.hot.getSelectedRangeLast()&&Mf(Ff,this)&&(Mf(Hf,this).indexOf(t.col)>-1?(0,r.vy)(this.hot.rootElement,Of):(0,r.iQ)(this.hot.rootElement,Of),o.row=!0,o.column=!0,o.cell=!0,Rf(_f,this,t.col),Mf(jf,this).TD=n)}function Qf(){const e=Mf(jf,this).col,t=Mf(Hf,this).length;if(Rf(_f,this,void 0),Rf(Ff,this,!1),(0,r.vy)(this.hot.rootElement,[$f,Of,Df]),this.hot.selection.isSelectedByColumnHeader()&&(0,r.iQ)(this.hot.rootElement,Df),t<1||void 0===e)return;const n=Mf(Hf,this)[0],o=this.hot.toPhysicalColumn(n),i=this.dragColumns(Mf(Hf,this),e);if(Mf(Hf,this).length=0,!0===i){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 Jf(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;Mf(Nf,this).setPosition(t),Mf(Nf,this).setSize(null,e.hider.offsetHeight-t)}function Zf(){this.moveBySettingsOrLoad()}function em(e,t,n){tm(e,t),t.set(e,n)}function tm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nm(e,t,n){return e.set(rm(e,t),n),n}function om(e,t){return e.get(rm(e,t))}function rm(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 im="manualColumnResize",sm="manualColumnWidths";var am=new WeakMap,lm=new WeakMap,cm=new WeakMap,um=new WeakMap,dm=new WeakMap,hm=new WeakMap,pm=new WeakMap,fm=new WeakMap,mm=new WeakMap,gm=new WeakMap,bm=new WeakMap,vm=new WeakMap,ym=new WeakMap,wm=new WeakMap,Cm=new WeakMap,xm=new WeakMap,Sm=new WeakSet;class Am extends un{static get PLUGIN_KEY(){return im}static get PLUGIN_PRIORITY(){return 130}constructor(e){var t;super(e),tm(this,t=Sm),t.add(this),em(this,am,null),em(this,lm,null),em(this,cm,[]),em(this,um,null),em(this,dm,null),em(this,hm,null),em(this,pm,null),em(this,fm,null),em(this,mm,this.hot.rootDocument.createElement("DIV")),em(this,gm,this.hot.rootDocument.createElement("DIV")),em(this,bm,null),em(this,vm,!1),em(this,ym,0),em(this,wm,null),em(this,Cm,void 0),em(this,xm,void 0),(0,r.iQ)(om(mm,this),"manualColumnResizer"),(0,r.iQ)(om(gm,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[im]}enablePlugin(){var e=this;this.enabled||(nm(Cm,this,new yn._),om(Cm,this).addLocalHook("init",(()=>rm(Sm,this,Em).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,om(Cm,this)),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return rm(Sm,e,Tm).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 rm(Sm,e,Om).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 rm(Sm,e,$m).call(e,...n)})),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){nm(xm,this,om(Cm,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",sm,om(Cm,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",sm,e),e.value}setManualSize(e,t){const n=Math.max(t,20),o=this.hot.toPhysicalColumn(e);return om(Cm,this).setValueAtIndex(o,n),n}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);om(Cm,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;nm(am,this,e);const{_wt:t}=this.hot.view,n=t.wtTable.getCoords(om(am,this)),o=n.col;if(o<0)return;const i=(0,r.DK)(om(am,this)),s=om(am,this).getBoundingClientRect();let a;o<t.getSetting("fixedColumnsStart")&&(a=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(om(am,this),n.row,n.col)),a||(a=t.wtOverlays.topOverlay.getRelativeCellPosition(om(am,this),n.row,n.col)),nm(lm,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(o)),nm(cm,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,Et.Ti)(t,n,(e=>{om(cm,this).includes(e)||om(cm,this).push(e)}))}))}om(cm,this).includes(om(lm,this))||nm(cm,this,[om(lm,this)]),nm(fm,this,a.start-6),nm(pm,this,parseInt(s.width,10)),om(mm,this).style.top=`${a.top}px`,om(mm,this).style[this.inlineDir]=`${om(fm,this)+om(pm,this)}px`,om(mm,this).style.height=`${i}px`,this.hot.rootElement.appendChild(om(mm,this))}refreshHandlePosition(){om(mm,this).style[this.inlineDir]=`${om(fm,this)+om(um,this)}px`}setupGuidePosition(){const e=parseInt((0,r.DK)(om(mm,this)),10),t=parseInt(om(mm,this).style.top,10)+e,n=this.hot.view.getTableHeight();(0,r.iQ)(om(mm,this),"active"),(0,r.iQ)(om(gm,this),"active"),om(gm,this).style.top=`${t}px`,this.refreshGuidePosition(),om(gm,this).style.height=n-e+"px",this.hot.rootElement.appendChild(om(gm,this))}refreshGuidePosition(){om(gm,this).style[this.inlineDir]=om(mm,this).style[this.inlineDir]}hideHandleAndGuide(){(0,r.vy)(om(mm,this),"active"),(0,r.vy)(om(gm,this),"active")}checkIfColumnHeader(e){const t=(0,r.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",om(dm,this),t,!0);void 0!==o&&nm(dm,this,o),this.setManualSize(t,om(dm,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",om(dm,this),t,!0),n&&e()};om(ym,this)>=2&&(om(cm,this).length>1?((0,u.z0)(om(cm,this),(e=>{t(e)})),e()):(0,u.z0)(om(cm,this),(e=>{t(e,!0)}))),nm(ym,this,0),nm(wm,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>rm(Sm,this,km).call(this,e))),this.eventManager.addEventListener(t,"mousedown",(e=>rm(Sm,this,Rm).call(this,e))),this.eventManager.addEventListener(e,"mousemove",(e=>rm(Sm,this,Mm).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>rm(Sm,this,Im).call(this))),this.eventManager.addEventListener(om(mm,this),"contextmenu",(()=>rm(Sm,this,Pm).call(this)))}destroy(){super.destroy()}}function Em(){const e=this.hot.getSettings()[im],t=this.loadManualColumnWidths();void 0!==t?this.hot.batchExecution((()=>{t.forEach(((e,t)=>{om(Cm,this).setValueAtIndex(t,e)}))}),!0):Array.isArray(e)?(this.hot.batchExecution((()=>{e.forEach(((e,t)=>{om(Cm,this).setValueAtIndex(t,e)}))}),!0),nm(xm,this,e)):!0===e&&Array.isArray(om(xm,this))&&this.hot.batchExecution((()=>{om(xm,this).forEach(((e,t)=>{om(Cm,this).setValueAtIndex(t,e)}))}),!0)}function km(e){if(!(0,r.$w)(e.target)&&!0!==om(vm,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const n=t.getAttribute("colspan");!t||null!==n&&"1"!==n||om(bm,this)||this.setupHandlePosition(t)}}function Rm(e){e.target.parentNode===this.hot.rootElement&&(0,r.nB)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(om(am,this)),this.setupGuidePosition(),nm(bm,this,!0),null===om(wm,this)&&(nm(wm,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(om(wm,this))),nm(ym,this,om(ym,this)+1),this.startX=e.pageX,nm(dm,this,om(pm,this)))}function Mm(e){if(om(bm,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();nm(um,this,om(pm,this)+t),(0,u.z0)(om(cm,this),(e=>{nm(dm,this,this.setManualSize(e,om(um,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function Im(){const e=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeColumnResize",om(dm,this),t,!1),n&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",om(dm,this),t,!1)};om(bm,this)&&(this.hideHandleAndGuide(),nm(bm,this,!1),om(dm,this)!==om(pm,this)&&(om(cm,this).length>1?((0,u.z0)(om(cm,this),(e=>{t(e)})),e()):(0,u.z0)(om(cm,this),(e=>{t(e,!0)}))),this.setupHandlePosition(om(am,this)))}function Pm(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(om(mm,this)),this.hot.rootElement.removeChild(om(gm,this)),nm(bm,this,!1),nm(vm,this,!0),this.hot._registerImmediate((()=>{nm(vm,this,!1)}))}function Tm(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),o=om(Cm,this).getValueAtIndex(e);this.hot.getSettings()[im]&&o&&(n=o)}return n}function Om(e,t){const n=om(Cm,this).getValueAtIndex(this.hot.toPhysicalColumn(t));return"number"==typeof n?n:e}function $m(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function Dm(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 Nm="px",Lm=class{constructor(e){Dm(this,"hot",void 0),Dm(this,"_element",null),Dm(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+Nm),void 0!==t&&(this._element.style.left=t+Nm)}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+Nm),t&&(this._element.style.height=t+Nm)}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+Nm),t&&(this._element.style.marginLeft=t+Nm)}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}}},Hm=class extends Lm{build(){super.build(),(0,r.iQ)(this._element,"ht__manualRowMove--backlight")}},zm=class extends Lm{build(){super.build(),(0,r.iQ)(this._element,"ht__manualRowMove--guideline")}};function Fm(e,t,n){jm(e,t),t.set(e,n)}function jm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bm(e,t,n){return e.set(Vm(e,t),n),n}function _m(e,t){return e.get(Vm(e,t))}function Vm(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")}Se.R.getSingleton().register("beforeRowMove"),Se.R.getSingleton().register("afterRowMove");const Wm="manualRowMove",Gm="ht__manualRowMove",Km="show-ui",Um="on-moving--rows",qm="after-selection--rows";var Xm=new WeakMap,Ym=new WeakMap,Qm=new WeakMap,Jm=new WeakMap,Zm=new WeakMap,eg=new WeakMap,tg=new WeakSet;class ng extends un{constructor(){var e;super(...arguments),jm(this,e=tg),e.add(this),Fm(this,Xm,new Hm(this.hot)),Fm(this,Ym,new zm(this.hot)),Fm(this,Qm,[]),Fm(this,Jm,void 0),Fm(this,Zm,{}),Fm(this,eg,void 0)}static get PLUGIN_KEY(){return Wm}static get PLUGIN_PRIORITY(){return 140}isEnabled(){return!!this.hot.getSettings()[Wm]}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 Vm(tg,e,og).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 Vm(tg,e,ig).call(e,...n)})),this.addHook("afterScrollHorizontally",(()=>Vm(tg,this,ag).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 Vm(tg,e,lg).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),(0,r.iQ)(this.hot.rootElement,Gm),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,r.vy)(this.hot.rootElement,Gm),this.unregisterEvents(),_m(Xm,this).destroy(),_m(Ym,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const n=_m(eg,this),o=this.isMovePossible(e,t),r=this.hot.runHooks("beforeRowMove",e,t,n,o);if(Bm(eg,this,void 0),!1===r)return;o&&this.hot.rowIndexMapper.moveIndexes(e,t);const i=o&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,n,o,i),i}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const n=this.countFinalIndex(e,t);return Bm(eg,this,t),this.moveRows(e,n)}isMovePossible(e,t){const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),o=e.length+t>n,r=t<0,i=e.some((e=>e<0)),s=e.some((e=>e>=n));return!(o||r||i||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 r=e;r<=t;r++){const e=n.getRenderableFromVisualIndex(r);null!==e&&(o+=this.hot.view._wt.wtTable.getRowHeight(e)||this.hot.view.getDefaultRowHeight())}return o}moveBySettingsOrLoad(){const e=this.hot.getSettings()[Wm];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,r=Math.min(n.row,o.row),i=Math.max(n.row,o.row);return(0,Et.Ti)(r,i,(e=>{t.push(e)})),t}refreshPositions(){const e=_m(Zm,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 i=this.hot.view._wt.wtTable,s=_m(Zm,this).TD,a=this.hot.rootElement,l=(0,r.cY)(a),c=(0,r.fX)(a),u=i.holder.scrollTop,d=this.hot.rootWindow!==c?c.scrollTop:0,h=l.top-d,p=_m(Zm,this).eventPageY-h+u,f=i.hider.offsetHeight,m=i.TBODY.offsetTop,g=_m(Xm,this).getOffset().top,b=_m(Xm,this).getSize().height,v=s.offsetHeight/2,y=s.offsetHeight;let w=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const C=p>=w+v;this.isFixedRowTop(e.row)&&(w+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?_m(Zm,this).row=t>0?t-1:t:C?(_m(Zm,this).row=e.row+1,w+=0===e.row?y-1:y):_m(Zm,this).row=e.row;let x=p,S=w;p+b+g>=f?x=f-b-g:p+g<m&&(x=m+Math.abs(g)),w>=f-1&&(S=f-1),_m(Xm,this).setPosition(x),_m(Ym,this).setPosition(S)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>Vm(tg,this,rg).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>Vm(tg,this,sg).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){_m(Xm,this).build(),_m(Ym,this).build()}destroy(){_m(Xm,this).destroy(),_m(Ym,this).destroy(),super.destroy()}}function og(e,t,n,o){const{wtTable:i,wtViewport:s}=this.hot.view._wt,a=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeLast();if(!l||!a||_m(Jm,this)||0!==e.button)return Bm(Jm,this,!1),_m(Qm,this).length=0,void(0,r.vy)(this.hot.rootElement,[Um,Km]);const c=_m(Ym,this).isBuilt()&&!_m(Ym,this).isAppended(),u=_m(Xm,this).isBuilt()&&!_m(Xm,this).isAppended();c&&u&&(_m(Ym,this).appendTo(i.hider),_m(Xm,this).appendTo(i.hider));const{from:d,to:h}=l,p=Math.min(d.row,h.row),f=Math.max(d.row,h.row);if(t.col<0&&t.row>=p&&t.row<=f){o.row=!0,Bm(Jm,this,!0),_m(Zm,this).eventPageY=e.pageY,_m(Zm,this).coords=t,_m(Zm,this).TD=n,Bm(Qm,this,this.prepareRowsToMoving());const a=i.holder.scrollLeft+s.getRowHeaderWidth(),l=this.getRowsHeight(p,t.row-1)+(e.clientY-n.getBoundingClientRect().top);_m(Xm,this).setPosition(null,a),_m(Xm,this).setSize(i.hider.offsetWidth-a,this.getRowsHeight(p,f)),_m(Xm,this).setOffset(-l,null),(0,r.iQ)(this.hot.rootElement,Um),this.refreshPositions()}else(0,r.vy)(this.hot.rootElement,qm),Bm(Jm,this,!1),_m(Qm,this).length=0}function rg(e){_m(Jm,this)&&(_m(Zm,this).eventPageY=e.pageY,this.refreshPositions())}function ig(e,t,n,o){this.hot.getSelectedRangeLast()&&_m(Jm,this)&&(_m(Qm,this).indexOf(t.row)>-1?(0,r.vy)(this.hot.rootElement,Km):(0,r.iQ)(this.hot.rootElement,Km),o.row=!0,o.column=!0,o.cell=!0,_m(Zm,this).coords=t,_m(Zm,this).TD=n)}function sg(){const e=_m(Zm,this).row,t=_m(Qm,this).length;if(Bm(Jm,this,!1),(0,r.vy)(this.hot.rootElement,[Um,Km,qm]),this.hot.selection.isSelectedByRowHeader()&&(0,r.iQ)(this.hot.rootElement,qm),t<1||void 0===e)return;const n=_m(Qm,this)[0],o=this.hot.toPhysicalRow(n),i=this.dragRows(_m(Qm,this),e);if(_m(Qm,this).length=0,!0===i){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 ag(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;_m(Xm,this).setPosition(null,t),_m(Xm,this).setSize(e.hider.offsetWidth-t)}function lg(){this.moveBySettingsOrLoad()}function cg(e,t,n){ug(e,t),t.set(e,n)}function ug(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dg(e,t,n){return e.set(pg(e,t),n),n}function hg(e,t){return e.get(pg(e,t))}function pg(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 fg="manualRowResize",mg="manualRowHeights";var gg=new WeakMap,bg=new WeakMap,vg=new WeakMap,yg=new WeakMap,wg=new WeakMap,Cg=new WeakMap,xg=new WeakMap,Sg=new WeakMap,Ag=new WeakMap,Eg=new WeakMap,kg=new WeakMap,Rg=new WeakMap,Mg=new WeakMap,Ig=new WeakMap,Pg=new WeakMap,Tg=new WeakMap,Og=new WeakSet;class $g extends un{static get PLUGIN_KEY(){return fg}static get PLUGIN_PRIORITY(){return 30}constructor(e){var t;super(e),ug(this,t=Og),t.add(this),cg(this,gg,null),cg(this,bg,null),cg(this,vg,[]),cg(this,yg,null),cg(this,wg,null),cg(this,Cg,null),cg(this,xg,null),cg(this,Sg,null),cg(this,Ag,this.hot.rootDocument.createElement("DIV")),cg(this,Eg,this.hot.rootDocument.createElement("DIV")),cg(this,kg,!1),cg(this,Rg,!1),cg(this,Mg,0),cg(this,Ig,null),cg(this,Pg,void 0),cg(this,Tg,void 0),(0,r.iQ)(hg(Ag,this),"manualRowResizer"),(0,r.iQ)(hg(Eg,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[fg]}enablePlugin(){this.enabled||(dg(Pg,this,new yn._),hg(Pg,this).addLocalHook("init",(()=>pg(Og,this,jg).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,hg(Pg,this)),this.addHook("modifyRowHeight",((e,t)=>pg(Og,this,Fg).call(this,e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){dg(Tg,this,hg(Pg,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",mg,hg(Pg,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",mg,e),e.value}setManualSize(e,t){const n=this.hot.toPhysicalRow(e),o=Math.max(t,this.hot.view.getDefaultRowHeight());return hg(Pg,this).setValueAtIndex(n,o),o}getLastDesiredRowHeight(){return hg(yg,this)}setupHandlePosition(e){dg(gg,this,e);const{view:t}=this.hot,{_wt:n}=t,o=n.wtTable.getCoords(hg(gg,this)),i=o.row;if(i<0)return;const s=(0,r.Gq)(hg(gg,this)),a=hg(gg,this).getBoundingClientRect(),l=i<n.getSetting("fixedRowsTop"),c=i>=t.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let d;l?d=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(hg(gg,this),o.row,o.col):c&&(d=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(hg(gg,this),o.row,o.col)),d||(d=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(hg(gg,this),o.row,o.col)),dg(bg,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(i)),dg(vg,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,Et.Ti)(t,n,(e=>{hg(vg,this).includes(e)||hg(vg,this).push(e)}))}))}hg(vg,this).includes(hg(bg,this))||dg(vg,this,[hg(bg,this)]),dg(Sg,this,d.top-6),dg(xg,this,parseInt(a.height,10)),hg(Ag,this).style.top=`${hg(Sg,this)+hg(xg,this)}px`,hg(Ag,this).style[this.inlineDir]=`${d.start}px`,hg(Ag,this).style.width=`${s}px`,this.hot.rootElement.appendChild(hg(Ag,this))}refreshHandlePosition(){hg(Ag,this).style.top=`${hg(Sg,this)+hg(yg,this)}px`}setupGuidePosition(){const e=parseInt((0,r.Gq)(hg(Ag,this)),10),t=parseInt(hg(Ag,this).style[this.inlineDir],10)+e,n=this.hot.view.getTableWidth();(0,r.iQ)(hg(Ag,this),"active"),(0,r.iQ)(hg(Eg,this),"active"),hg(Eg,this).style.top=hg(Ag,this).style.top,hg(Eg,this).style[this.inlineDir]=`${t}px`,hg(Eg,this).style.width=n-e+"px",this.hot.rootElement.appendChild(hg(Eg,this))}refreshGuidePosition(){hg(Eg,this).style.top=hg(Ag,this).style.top}hideHandleAndGuide(){(0,r.vy)(hg(Ag,this),"active"),(0,r.vy)(hg(Eg,this),"active")}checkIfRowHeader(e){const t=(0,r.kp)(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:n,topInlineStartCornerOverlay:o,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.TBODY,o.clone.wtTable.TBODY,i.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&&hg(wg,this)<t?t:hg(wg,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&&dg(wg,this,o),this.setManualSize(t,hg(wg,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),n&&e()};hg(Mg,this)>=2&&(hg(vg,this).length>1?((0,u.z0)(hg(vg,this),(e=>{t(e)})),e()):(0,u.z0)(hg(vg,this),(e=>{t(e,!0)}))),dg(Mg,this,0),dg(Ig,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>pg(Og,this,Dg).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>pg(Og,this,Ng).call(this,e))),this.eventManager.addEventListener(t,"mousemove",(e=>pg(Og,this,Lg).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(()=>pg(Og,this,Hg).call(this))),this.eventManager.addEventListener(hg(Ag,this),"contextmenu",(()=>pg(Og,this,zg).call(this)))}destroy(){super.destroy()}}function Dg(e){if(!(0,r.$w)(e.target)&&!0!==hg(Rg,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(hg(kg,this)||this.setupHandlePosition(t))}}function Ng(e){(0,r.nB)(e.target,"manualRowResizer")&&(this.setupHandlePosition(hg(gg,this)),this.setupGuidePosition(),dg(kg,this,!0),null===hg(Ig,this)&&(dg(Ig,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(hg(Ig,this))),dg(Mg,this,hg(Mg,this)+1),dg(Cg,this,e.pageY),dg(wg,this,hg(xg,this)))}function Lg(e){hg(kg,this)&&(dg(yg,this,hg(xg,this)+(e.pageY-hg(Cg,this))),(0,u.z0)(hg(vg,this),(e=>{dg(wg,this,this.setManualSize(e,hg(yg,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function Hg(){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)};hg(kg,this)&&(this.hideHandleAndGuide(),dg(kg,this,!1),hg(wg,this)!==hg(xg,this)&&(hg(vg,this).length>1?((0,u.z0)(hg(vg,this),(e=>{t(e)})),e()):(0,u.z0)(hg(vg,this),(e=>{t(e,!0)}))),this.setupHandlePosition(hg(gg,this)))}function zg(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(hg(Ag,this)),this.hot.rootElement.removeChild(hg(Eg,this)),dg(kg,this,!1),dg(Rg,this,!0),this.hot._registerImmediate((()=>{dg(Rg,this,!1)}))}function Fg(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),o=hg(Pg,this).getValueAtIndex(e);this.hot.getSettings()[fg]&&o&&(n=o)}return n}function jg(){const e=this.hot.getSettings()[fg],t=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==t?t.forEach(((e,t)=>{hg(Pg,this).setValueAtIndex(t,e)})):Array.isArray(e)?(e.forEach(((e,t)=>{hg(Pg,this).setValueAtIndex(t,e)})),dg(Tg,this,e)):!0===e&&Array.isArray(hg(Tg,this))&&hg(Tg,this).forEach(((e,t)=>{hg(Pg,this).setValueAtIndex(t,e)}))}),!0)}function Bg(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 _g(e,t){return e.get(Wg(e,t))}function Vg(e,t,n){return e.set(Wg(e,t),n),n}function Wg(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 Gg=new WeakMap;const Kg=class{constructor(e,t,n,o,r,i){var s,a,l;Bg(this,"row",void 0),Bg(this,"col",void 0),Bg(this,"rowspan",void 0),Bg(this,"colspan",void 0),Bg(this,"removed",!1),Bg(this,"cellCoordsFactory",void 0),Bg(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=Gg),a.set(s,l),this.row=e,this.col=t,this.rowspan=n,this.colspan=o,this.cellCoordsFactory=r,this.cellRangeFactory=i}static NEGATIVE_VALUES_WARNING(e){let{row:t,col:n,rowspan:o,colspan:r}=e;return br.O`The merged cell declared with {row: ${t}, col: ${n},\x20
- rowspan: ${o}, colspan: ${r}} contains negative values, which is\x20
- not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){let{row:t,col:n}=e;return br.O`The merged cell declared at [${t}, ${n}] is positioned\x20
- (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 br.O`The merged cell declared at [${t}, ${n}] has both "rowspan"\x20
- 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 br.O`The merged cell declared at [${t}, ${n}] has "rowspan"\x20
- 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:r}=e;return t<0||n<0||o<0||r<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),Vg(Gg,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,r=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",s=Math.min(t,o),a=Math.max(t,o),l=this[i],c=this[i]+this[r]-1;if(l>=t&&(this[i]+=n),n>0)t<=c&&t>l&&(this[r]+=n);else if(n<0){if(s<=l&&a>=c)return this.removed=!0,Vg(Gg,this,null),!1;if(l>=s&&l<=a){const e=a-l+1,t=Math.abs(n)-e;this[i]-=t+n,this[r]-=e}else if(l<=s&&c>=a)this[r]+=n;else if(l<=s&&c>=s&&c<a){const e=c-s+1;this[r]-=e}}return Vg(Gg,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 _g(Gg,this)||Vg(Gg,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),_g(Gg,this)}};function Ug(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 qg(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 Xg=new WeakSet;class Yg{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=Xg),n.add(t),Ug(this,"plugin",void 0),Ug(this,"mergedCells",[]),Ug(this,"mergedCellsMatrix",new Map),Ug(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){let{row:t,col:n}=e;return br.O`The merged cell declared at [${t}, ${n}], overlaps\x20
- with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
- 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:r}=e.getBottomEndCorner(),i=this.mergedCells.length;let s=!1;for(let e=0;e<i;e++){const i=this.mergedCells[e],{row:a,col:l,rowspan:c,colspan:u}=i;if(a>=t&&a+c-1<=o&&l>=n&&l+u-1<=r){s=i;break}}return s}filterOverlappingMergeCells(e){const t=new Set;return this.mergedCells.forEach((e=>{const{row:n,col:o,colspan:r,rowspan:i}=e;for(let e=n;e<n+i;e++)for(let n=o;n<o+r;n++)t.add(`r${e},c${n}`)})),e.filter((e=>{const{row:n,col:o,colspan:r,rowspan:i}=e,s=new Set;let a=!1;for(let l=n;l<n+i;l++){for(let n=o;n<o+r;n++){const o=`r${l},c${n}`;if(t.has(o)){(0,Lo.R8)(Yg.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:r,col:i}=e.getBottomEndCorner(),s=[];for(let e=n;e<=r;e++)for(let n=o;n<=i;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,r=e.rowspan,i=e.colspan,s=new Kg(n,o,r,i,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,o),l=!t&&this.isOverlapping(s);return a||l?(l&&(0,Lo.R8)(Yg.IS_OVERLAPPING_WARNING(s)),!1):(this.hot&&s.normalize(this.hot),this.mergedCells.push(s),qg(Xg,this,Jg).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),qg(Xg,this,Zg).call(this,n),n)}clear(){(0,u.z0)(this.mergedCells,(e=>{let{row:t,col:n,rowspan:o,colspan:r}=e;(0,Et.Ti)(t,t+o,(e=>{(0,Et.Ti)(n,n+r,(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:r,rowspan:i,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,Et.qE)(l,o,o+i-1),d=(0,Et.qE)(c,r,r+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),r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1);return this.hot._createCellCoords(o,r)}getStartMostColumnIndex(e,t){const n=qg(Xg,this,Qg).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=qg(Xg,this,Qg).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=qg(Xg,this,Qg).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=qg(Xg,this,Qg).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 r=[];this.mergedCells.forEach((e=>{e.shift(o,t),e.removed&&r.push(e)})),r.forEach((e=>{this.mergedCells.splice(this.mergedCells.indexOf(e),1)})),this.mergedCellsMatrix.clear(),this.mergedCells.forEach((e=>{qg(Xg,this,Jg).call(this,e)}))}}function Qg(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=new Map,r=1===n?e.getTopStartCorner():e.getBottomEndCorner(),i=1===n?e.getBottomEndCorner():e.getTopStartCorner();for(let e=r.row;1===n?e<=i.row:e>=i.row;e+=n)for(let s=r.col;1===n?s<=i.col:s>=i.col;s+=n){const r="row"===t?e:s,i=this.get(e,s);let a=r;i&&(a=1===n?i[t]+i[`${t}span`]-1:i[t]),o.has(r)||o.set(r,new Set),o.get(r).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 Jg(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 Zg(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=Yg;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 r=t.slice(0),i=this.getAutofillSize(e,t,n),[s,a,l,c]=e,u=["up","down"].indexOf(n)>-1?l-s+1:c-a+1,d=i-Math.floor(i/u)*u,h=this.getFarthestCollection(e,t,n,o);if(h)if("down"===n){const e=h.row+h.rowspan-s-d;r[2]+e>=this.plugin.hot.countRows()?r[2]-=d:r[2]+=d?e:0}else if("right"===n){const e=h.col+h.colspan-a-d;r[3]+e>=this.plugin.hot.countCols()?r[3]-=d:r[3]+=d?e:0}else if("up"===n){const e=l-d-h.row+1;r[0]+e<0?r[0]+=d:r[0]-=d?e:0}else if("left"===n){const e=c-d-h.col+1;r[1]+e<0?r[1]+=d:r[1]-=d?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:o,fillSize:i,dragArea:r,cycleLength:u}),r}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,s.X$)(this.currentFillData,e)}getAutofillSize(e,t,n){const[o,r,i,s]=e,[a,l,c,u]=t;switch(n){case"up":return o-a;case"down":return c-i;case"left":return r-l;case"right":return u-s;default:return null}}getDragArea(e,t,n){const[o,r,i,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[i+1,r,c+(e?e.rowspan-1:0),s]}case"left":return[a,l,i,r-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[r,i,s,a]=e,l=["up","down"].indexOf(n)>-1,c=l?s:a,d=l?r:i,h=this.getAutofillSize(e,t,n),p=l?s-r+1:a-i+1,f=h-Math.floor(h/p)*p;let m=null,g=null,b=null;switch(n){case"up":m="includesVertically",b=c-f+1;break;case"left":m="includesHorizontally",b=c-f+1;break;case"down":m="includesVertically",b=d+f-1;break;case"right":m="includesHorizontally",b=d+f-1}return(0,u.z0)(o,(e=>{e[m](b)&&e.isFarther(g,n)&&(g=e)})),g}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,o=this.currentFillData.dragDirection,r=(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 i=0,s=null,a=1;do{for(let e=0;e<n.length;e+=1){if(s=n[e],i=a*this.currentFillData.cycleLength,r(s,i))switch(o){case"up":this.plugin.mergedCellsCollection.add({row:s.row-i,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"down":this.plugin.mergedCellsCollection.add({row:s.row+i,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-i,colspan:s.colspan},!0);break;case"right":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col+i,colspan:s.colspan},!0)}e===n.length-1&&(a+=1)}}while(r(s,i));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],r=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||r<n.min)&&(n.min=r),(null===n.max||r>n.max)&&(n.max=r)})),{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),[r,i,s,a]=o,l=this.plugin.hot._createCellCoords(r,i),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 rb=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 r=Math.min(n[0],n[2]),i=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 r<=l.row&&i<=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 r=0;r<t.length;r+=1)o[r]=t[r].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 ib(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){ib(this,"data",void 0),ib(this,"next",null),ib(this,"prev",null),this.data=e}}const ab=class{constructor(){ib(this,"first",null),ib(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,fb=new WeakMap,mb=new WeakMap,gb=new WeakMap,bb=new WeakMap,vb=new WeakMap,yb=new WeakMap,wb=new WeakSet;class Cb{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:n,columnIndexMapper:o}=e;var r;cb(this,r=wb),r.add(this),lb(this,pb,new ab),lb(this,fb,new ab),lb(this,mb,null),lb(this,gb,null),lb(this,bb,null),lb(this,vb,null),lb(this,yb,null),db(bb,this,t),db(vb,this,n),db(yb,this,o)}getCurrentVerticalNode(){return ub(gb,this).data}getFirstVerticalNode(){return ub(fb,this).first.data}getNextVerticalNode(){return ub(gb,this).next.data}getPrevVerticalNode(){return ub(gb,this).prev.data}getCurrentHorizontalNode(){return ub(mb,this).data}getFirstHorizontalNode(){return ub(pb,this).first.data}getNextHorizontalNode(){return ub(mb,this).next.data}getPrevHorizontalNode(){return ub(mb,this).prev.data}setPrevNodeAsActive(){db(gb,this,ub(gb,this).prev),db(mb,this,ub(mb,this).prev)}setNextNodeAsActive(){db(gb,this,ub(gb,this).next),db(mb,this,ub(mb,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),n=e.getBottomEndCorner(),o=new WeakSet;db(pb,this,new ab);for(let r=t.row;r<=n.row;r++)if(!ub(vb,this).isHidden(r))for(let i=t.col;i<=n.col;i++){if(ub(yb,this).isHidden(i))continue;const t=hb(wb,this,xb).call(this,e,ub(pb,this),o,r,i);t&&db(mb,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 r=new WeakSet;db(fb,this,new ab);for(let o=t.col;o<=n.col;o++)if(!ub(yb,this).isHidden(o))for(let i=t.row;i<=n.row;i++){if(ub(vb,this).isHidden(i))continue;const t=hb(wb,this,xb).call(this,e,ub(fb,this),r,i,o);t&&db(gb,this,t)}ub(fb,this).first&&(ub(fb,this).first.prev=ub(fb,this).last,ub(fb,this).last.next=ub(fb,this).first)}setActiveNode(e,t){return ub(pb,this).inorder((n=>{const{rowStart:o,rowEnd:r,colStart:i,colEnd:s}=n.data;if(e>=o&&e<=r&&t>=i&&t<=s)return db(mb,this,n),!1})),ub(fb,this).inorder((n=>{const{rowStart:o,rowEnd:r,colStart:i,colEnd:s}=n.data;if(e>=o&&e<=r&&t>=i&&t<=s)return db(gb,this,n),!1})),this}}function xb(e,t,n,o,r){const i=e.getTopStartCorner(),s=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),l=ub(bb,this).call(this,o,r);if(l&&n.has(l))return null;const c={colStart:r,colEnd:r,rowStart:o,rowEnd:o};if(l){if(n.add(l),l.row<i.row||l.row+l.rowspan-1>s.row||l.col<i.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&&r===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 Sb(e,t,n){const{view:o,rowIndexMapper:r}=e,i=o.getStylesHandler(),s=o.getDefaultRowHeight();let a=0;for(let o=t;o<t+n;o++){var l;r.isHidden(o)||(a+=null!==(l=e.getRowHeight(o))&&void 0!==l?l:s,0!==o||i.isClassicTheme()||(a+=1))}return a}function Ab(e,t,n){Eb(e,t),t.set(e,n)}function Eb(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(Ib(e,t),n),n}function Mb(e,t){return e.get(Ib(e,t))}function Ib(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")}Se.R.getSingleton().register("beforeMergeCells"),Se.R.getSingleton().register("afterMergeCells"),Se.R.getSingleton().register("beforeUnmergeCells"),Se.R.getSingleton().register("afterUnmergeCells");const Pb="mergeCells",Tb=Pb;var Ob=new WeakMap,$b=new WeakMap,Db=new WeakMap,Nb=new WeakMap,Lb=new WeakSet;class Hb extends un{constructor(){var e;super(...arguments),Eb(this,e=Lb),e.add(this),kb(this,"mergedCellsCollection",null),kb(this,"autofillCalculations",null),kb(this,"selectionCalculations",null),Ab(this,Ob,null),Ab(this,$b,{row:0,col:0}),Ab(this,Db,new Cb({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),Ab(this,Nb,function(e){const{hot:t}=e,{rowIndexMapper:n,columnIndexMapper:o}=t,r=new Map;return{before:function(){},after:function(i,a,l){const c=e.mergedCellsCollection.get(a,l);if(!(0,s.Gv)(c))return i.removeAttribute("rowspan"),i.removeAttribute("colspan"),(0,te.nr)()&&r.has(a)&&!t.getSettings().rowHeaders&&(i.style.height=`${r.get(a)}px`,r.delete(a)),void(i.style.display="");const{row:u,col:d,colspan:h,rowspan:p}=c,[f,m]=e.translateMergedCellToRenderable(u,p,d,h),g=e.getSetting("virtualized");if((0,te.nr)()&&0===d&&!t.getSettings().rowHeaders){const e=Sb(t,u,p);r.set(a,e/p)}const b=f-n.getRenderableFromVisualIndex(a)+1,v=m-o.getRenderableFromVisualIndex(l)+1;let y=n.getNearestNotHiddenIndex(u,1),w=o.getNearestNotHiddenIndex(d,1);if(g){const e=t.view.getActiveOverlayName();["top","top_inline_start_corner"].includes(e)||(y=Math.max(y,t.getFirstRenderedVisibleRow())),["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(e)||(w=Math.max(w,t.getFirstRenderedVisibleColumn()))}const C=Math.min(p,b),x=Math.min(h,v);y===a&&w===l?(i.setAttribute("rowspan",C),i.setAttribute("colspan",x)):(i.removeAttribute("rowspan"),i.removeAttribute("colspan"),i.style.display="none")}}}(this))}static get PLUGIN_KEY(){return Pb}static get PLUGIN_PRIORITY(){return 150}static get DEFAULT_SETTINGS(){return{[rn]:"cells",virtualized:!1,cells:[]}}isEnabled(){return!!this.hot.getSettings()[Pb]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new eb(this),this.autofillCalculations=new nb(this),this.selectionCalculations=new rb(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Ib(Lb,e,zb).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 Ib(Lb,e,jb).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 Ib(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 Ib(Lb,e,_b).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 Ib(Lb,e,Vb).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 Ib(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 Ib(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 Ib(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 Ib(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 Ib(Lb,e,Xb).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 Ib(Lb,e,Wb).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 Ib(Lb,e,Wb).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 Ib(Lb,e,Fb).call(e,...n)})),this.addHook("afterRenderer",(function(){return Mb(Nb,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 Ib(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 Ib(Lb,e,Yb).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 Ib(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 Ib(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 Ib(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 Ib(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 Ib(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 Ib(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 Ib(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 Ib(Lb,e,rv).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 Ib(Lb,e,iv).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 Ib(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 Ib(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 Ib(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 Ib(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,r.gd)(o,"backgroundColor").replace(")",", 0.99)"),e.push(o))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{var t;e.style.background=null===(t=(0,r.gd)(e,"backgroundColor"))||void 0===t?void 0:t.replace(", 0.99)",")")}))}),1)}validateSetting(e){return!(!e||(Kg.containsNegativeValues(e)?((0,Lo.R8)(Kg.NEGATIVE_VALUES_WARNING(e)),1):Kg.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,Lo.R8)(Kg.IS_OUT_OF_BOUNDS_WARNING(e)),1):Kg.isSingleCell(e)?((0,Lo.R8)(Kg.IS_SINGLE_CELL(e)),1):Kg.containsZeroSpan(e)&&((0,Lo.R8)(Kg.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:r,colspan:i}=e,s=this.hot._createCellCoords(t,o),a=this.hot._createCellCoords(t+r-1,o+i-1),l=this.hot._createCellRange(s,s,a);this.mergeRange(l,!0,!0);for(let e=t;e<t+r;e++)for(let r=o;r<o+i;r++)e===t&&r===o||n.push([e,r,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(),r=e.getBottomEndCorner(),i={row:o.row,col:o.col,rowspan:r.row-o.row+1,colspan:r.col-o.col+1},s=[];let a=null;return!!this.canMergeRange(i,t)&&(this.hot.runHooks("beforeMergeCells",e,t),(0,Et.Ti)(0,i.rowspan-1,(e=>{(0,Et.Ti)(0,i.colspan-1,(t=>{let n=null;s[e]||(s[e]=[]),0===e&&0===t?n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i.row),this.hot.toPhysicalColumn(i.col)):this.hot.setCellMeta(i.row+e,i.col+t,"hidden",!0),s[e][t]=n}))})),this.hot.setCellMeta(i.row,i.col,"spanned",!0),!this.mergedCellsCollection.add(i,t)||(n?a=[i.row,i.col,s]:this.hot.populateFromArray(i.row,i.col,s,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,i,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,Et.Ti)(0,e.rowspan-1,(t=>{(0,Et.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 r=this.hot._createCellCoords(e,t),i=this.hot._createCellCoords(n,o);this.mergeRange(this.hot._createCellRange(r,r,i))}unmerge(e,t,n,o){const r=this.hot._createCellCoords(e,t),i=this.hot._createCellCoords(n,o);this.unmergeRange(this.hot._createCellRange(r,r,i))}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:Tb})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Tb)}modifyViewportRowStart(e,t){const n=this.hot.rowIndexMapper,o=n.getVisualFromRenderableIndex(e.startRow);for(let r=0;r<t;r+=1){const i=this.mergedCellsCollection.get(o,r);if((0,s.Gv)(i)){const o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i.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 r=0;r<t;r+=1){const i=this.mergedCellsCollection.get(o,r);if((0,s.Gv)(i)){const o=i.row+i.rowspan-1,r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,-1));if(r>e.endRow)return e.endRow=r,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const n=this.hot.columnIndexMapper,o=n.getVisualFromRenderableIndex(e.startColumn);for(let r=0;r<t;r+=1){const i=this.mergedCellsCollection.get(r,o);if((0,s.Gv)(i)){const o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i.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 r=0;r<t;r+=1){const i=this.mergedCellsCollection.get(r,o);if((0,s.Gv)(i)){const o=i.col+i.colspan-1,r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,-1));if(r>e.endColumn)return e.endColumn=r,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,n,o){const{rowIndexMapper:r,columnIndexMapper:i}=this.hot;let s,a;return s=0===t?r.getNearestNotHiddenIndex(e,1):r.getNearestNotHiddenIndex(e+t-1,-1),a=0===o?i.getNearestNotHiddenIndex(n,1):i.getNearestNotHiddenIndex(n+o-1,-1),[e>=0?r.getRenderableFromVisualIndex(s):e,n>=0?i.getRenderableFromVisualIndex(a):n]}}function zb(){this.generateFromSettings(),this.hot.render()}function Fb(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 jb(e){Mb($b,this).row=e.row,Mb($b,this).col=e.col}function Bb(e){const t=this.hot.getSelectedRangeLast(),{highlight:n}=t,{columnIndexMapper:o,rowIndexMapper:r}=this.hot;Mb(Ob,this)&&(null!==r.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 i=this.mergedCellsCollection.get(n.row,n.col);if(!i)return;const s=i.col,a=i.col+i.colspan-1;if(e.col<0){const t=n.col>=s&&n.col<=a?s-1:a,r=o.getNearestNotHiddenIndex(t,-1);e.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,n.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,n.col)-1,1)}else if(e.col>0){const t=n.col>=s&&n.col<=a?a+1:s,r=o.getNearestNotHiddenIndex(t,1);e.col=null===r?this.hot.view.countRenderableColumnsInRange(n.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(n.col,r)-1,1)}const l=i.row,c=i.row+i.rowspan-1;if(e.row<0){const t=n.row>=l&&n.row<=c?l-1:c,o=r.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=r.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 _b(e){const t=this.hot.getSelectedRangeLast(),n=t.clone(),{to:o}=t,{columnIndexMapper:r,rowIndexMapper:i}=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 i=this.mergedCellsCollection.getStartMostColumnIndex(t,o.col)+e.col;s(o.row,i),"E-W"===t.getHorizontalDirection()&&"E-W"===n.getHorizontalDirection()&&(i=n.getTopStartCorner().col);const a=r.getNearestNotHiddenIndex(i,1);null!==a&&(e.col=-Math.max(this.hot.view.countRenderableColumnsInRange(a,o.col)-1,1))}else if(e.col>0){let i=this.mergedCellsCollection.getEndMostColumnIndex(t,o.col)+e.col;s(o.row,i),"W-E"===t.getHorizontalDirection()&&"W-E"===n.getHorizontalDirection()&&(i=n.getBottomEndCorner().col);const a=r.getNearestNotHiddenIndex(i,-1);null!==a&&(e.col=Math.max(this.hot.view.countRenderableColumnsInRange(o.col,a)-1,1))}if(e.row<0){let r=this.mergedCellsCollection.getTopMostRowIndex(t,o.row)+e.row;s(r,o.col),"S-N"===t.getVerticalDirection()&&"S-N"===n.getVerticalDirection()&&(r=n.getTopStartCorner().row);const a=i.getNearestNotHiddenIndex(r,1);null!==a&&(e.row=-Math.max(this.hot.view.countRenderableRowsInRange(a,o.row)-1,1))}else if(e.row>0){let r=this.mergedCellsCollection.getBottomMostRowIndex(t,o.row)+e.row;s(r,o.col),"N-S"===t.getVerticalDirection()&&"N-S"===n.getVerticalDirection()&&(r=n.getBottomStartCorner().row);const a=i.getNearestNotHiddenIndex(r,-1);null!==a&&(e.row=Math.max(this.hot.view.countRenderableRowsInRange(o.row,a)-1,1))}}function Vb(){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 Wb(e,t,n,o){if(e<0||t<0)return;const r=this.mergedCellsCollection.get(e,t);if(!r)return;const{row:i,col:s,colspan:a,rowspan:l}=r,c=i,u=s,d=i+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,Et.qE)(t,c,d),(0,Et.qE)(n,u,h),(0,Et.qE)(this.hot.getLastRenderedVisibleRow(),c,d),(0,Et.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(Ae.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(Ae.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||Kg.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(Db,this).setActiveNode(o.row,o.col),Mb($b,this).row>0||Mb($b,this).col>0?Mb(Db,this).setPrevNodeAsActive():("E-W"===n&&Mb($b,this).col<0||"S-N"===t&&Mb($b,this).row<0)&&Mb(Db,this).setNextNodeAsActive()}function qb(e,t){const n=this.hot.getSelectedRangeLast(),{columnIndexMapper:o,rowIndexMapper:r}=this.hot;let i=null,s=null;if(Mb($b,this).col<0){const{rowEnd:e,colEnd:t}=Mb(Db,this).getPrevHorizontalNode();s=o.getNearestNotHiddenIndex(t,-1),i=r.getNearestNotHiddenIndex(e,-1)}else if(Mb($b,this).col>0){const{rowStart:e,colStart:t}=Mb(Db,this).getNextHorizontalNode();s=o.getNearestNotHiddenIndex(t,1),i=r.getNearestNotHiddenIndex(e,1)}else if(Mb($b,this).row<0){const{rowEnd:e,colEnd:t}=Mb(Db,this).getPrevVerticalNode();s=o.getNearestNotHiddenIndex(t,-1),i=r.getNearestNotHiddenIndex(e,-1)}else if(Mb($b,this).row>0){const{rowStart:e,colStart:t}=Mb(Db,this).getNextVerticalNode();s=o.getNearestNotHiddenIndex(t,1),i=r.getNearestNotHiddenIndex(e,1)}if(null!==i||null!==s){const o=this.hot._createCellCoords(i,s),r=this.mergedCellsCollection.get(o.row,o.col),a=this.hot.selection.highlight.getFocus();e=o.row,t=o.col,r?n.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(r.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(r.col,1)}):n.highlight.assign(o),a.clear(),a.add(o).commit()}Mb(Db,this).setActiveNode(e,t),Rb($b,this,{row:0,col:0})}function Xb(){this.hot.getSelectedRangeLast().isHeader()||Mb(Db,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function Yb(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]),r=this.hot._createCellCoords(t[2],t[3]),i=this.hot._createCellRange(o,o,r),s=this.mergedCellsCollection.getWithinRange(i);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 rv(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function iv(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 r=this.hot.getSelectedRangeLast(),i=this.mergedCellsCollection.getByRange(r);if(!i)return;const s=this.hot._createCellCoords(i.row,i.col),a=this.hot._createCellCoords(i.row+i.rowspan-1,i.col+i.colspan-1);return 0===this.hot.selection.getLayerLevel()&&r.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,r;if("master"===n)o=this.hot.getFirstRenderedVisibleColumn(),r=this.hot.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(n);o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getFirstRenderedColumn()),r=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getLastRenderedColumn())}if(!this.mergedCellsCollection.get(t,o))return e;const i=this.hot._createCellCoords(t,o),s=this.hot._createCellCoords(t,r),a=this.hot._createCellRange(i,i,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:r}=o,i=0;i="top"===n||"top_inline_start_corner"===n?Math.min(c,this.hot.view.countNotHiddenFixedRowsTop()-t):r-u,e=Math.max(null!=e?e:0,Sb(this.hot,t,i))})),e}const uv="sort";const dv="multiColumnSorting",hv=dv;dr(dv,(function(e,t){return function(n,o){const[,...r]=n,[,...i]=o;return function n(o){const s=e[o],a=t[o],l=r[o],c=i[o],u=a.multiColumnSorting,d=(u.compareFunctionFactory?u.compareFunctionFactory:pr(a.type))(s,a,u)(l,c);if(d===fr){const e=o+1;if(void 0!==t[e])return n(e)}return d}(0)}}));class pv extends Hr{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,$r)),!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,r.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,r.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!==Ar(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,$r))):this.sort(this.getColumnNextConfig(t.col)))}}function fv(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 mv extends un{constructor(){super(...arguments),fv(this,"dragged",[]),fv(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,r.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,r.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,r.nB)(t.target,"topSelectionHandle-HitArea")?(n.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):(0,r.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,r,i,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),r=e.hot.getSelectedRangeLast(),i=r.getWidth(),s=r.getHeight(),a=r.getDirection(),1===i&&1===s&&e.hot.selection.setRangeEnd(o),l=e.getCurrentRangeCoords(r,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,r){const i=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"===r?{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,i.col)};break;case"SE-NW":"bottom"===r&&(c={start:this.hot._createCellCoords(s.row,t.col),end:this.hot._createCellCoords(t.row,i.col)})}break;case"NW-SE":switch(o){case"NE-SW":"top"===r?c={start:t,end:a}:c.end=t;break;case"NW-SE":"top"===r?c={start:t,end:s}:c.end=t;break;case"SE-NW":"top"===r?c={start:t,end:i}:c.end=t;break;case"SW-NE":"top"===r?c={start:t,end:l}:c.end=t}break;case"SW-NE":switch(o){case"NW-SE":c="bottom"===r?{start:this.hot._createCellCoords(t.row,i.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(i.row,t.col),end:this.hot._createCellCoords(t.row,s.col)};break;case"SW-NE":c="top"===r?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,s.col)}:{start:this.hot._createCellCoords(t.row,i.col),end:this.hot._createCellCoords(i.row,t.col)};break;case"SE-NW":"bottom"===r?c={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(i.row,t.col)}:"top"===r&&(c={start:a,end:t})}break;case"SE-NW":switch(o){case"NW-SE":case"NE-SW":case"SW-NE":"top"===r&&(c.end=t);break;case"SE-NW":"top"===r?c.end=t:c={start:t,end:i}}}return c}isDragged(){return this.dragged.length>0}}var gv=n(50192);function bv(){let{label:e="",colspan:t=1,origColspan:n=1,collapsible:o=!1,crossHiddenColumns:r=[],isCollapsed:i=!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:i,crossHiddenColumns:r,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 yv(e,t){return e.get(Cv(e,t))}function wv(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 Sv=new WeakMap,Av=new WeakMap,Ev=new WeakMap;class kv{constructor(){vv(this,Sv,[]),vv(this,Av,0),vv(this,Ev,1/0)}setColumnsLimit(e){wv(Ev,this,e)}setData(){wv(Sv,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 r=0;n.push(o),(0,u.z0)(e,(e=>{const n=bv();if((0,s.Gv)(e)){const{label:t,colspan:o,headerClassName:r}=e;n.label=(0,d.As)(t),"number"==typeof o&&o>1&&(n.colspan=o,n.origColspan=o),"string"==typeof r&&(n.headerClassNames=[...r.split(" ")])}else n.label=(0,d.As)(e);r+=n.origColspan;let i=!1;if(r>=t&&(n.colspan=n.origColspan-(r-t),n.origColspan=n.colspan,i=!0),o.push(n),n.colspan>1)for(let e=0;e<n.colspan-1;e++)o.push({label:"",isPlaceholder:!0});return!i}))}));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]:[],yv(Ev,this))),wv(Av,this,yv(Sv,this).length)}getData(){return yv(Sv,this)}mergeWith(e){(0,u.z0)(e,(e=>{let{row:t,col:n,...o}=e;const r=this.getHeaderSettings(t,n);null!==r&&(0,s.X$)(r,o,xv)}))}map(e){(0,u.z0)(yv(Sv,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>=yv(Av,this)||e<0)return null;const o=yv(Sv,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>=yv(Av,this)||e<0)return o;const r=yv(Sv,this)[e];let i=0;for(let e=t;e<r.length;e++){const t=r[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(i+=t.colspan,o.push(t),t.colspan>1&&(e+=t.colspan-1),i===n)break;if(i>n)throw new Error("The last column settings cannot overlap the other header layers")}return o}getLayersCount(){return yv(Av,this)}getColumnsCount(){return yv(Av,this)>0?yv(Sv,this)[0].length:0}clear(){wv(Sv,this,[]),wv(Av,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",Iv=new Map([[Mv,function e(t,n){let o=t.call(n,this);for(let r=0;r<this.childs.length;r++){if(!1===o)return!1;o=e.call(this.childs[r],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 r=n.shift();n.push(...r.childs),!1!==e.call(t,r)&&o()}()}]]);class Pv{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 Pv({...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(!Iv.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);Iv.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 Tv(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($v(e,t))}function $v(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 Dv=new WeakMap,Nv=new WeakMap,Lv=new WeakMap;class Hv{constructor(e){var t,n;Tv(this,Dv,new Map),Tv(this,Nv,new Map),Tv(this,Lv,null),n=e,(t=Lv).set($v(t,this),n)}getRoots(){return Array.from(Ov(Dv,this).values())}getRootByColumn(e){let t;return Ov(Nv,this).has(e)&&(t=Ov(Dv,this).get(Ov(Nv,this).get(e))),t}getNode(e,t){const n=this.getRootByColumn(t);if(!n)return;const o=t-Ov(Nv,this).get(t);let r,i=0;return n.walkDown((n=>{const{data:{origColspan:s,headerLevel:a}}=n;if(e===a){if(o>=i&&o<=i+s-1)return r=n,r.data.isRoot=t===r.data.columnIndex,!1;i+=s}})),r}rebuildTreeIndex(){let e=0;Ov(Nv,this).clear(),(0,u.z0)(Ov(Dv,this),(t=>{let[,{data:{colspan:n}}]=t;for(let t=e;t<e+n;t++)Ov(Nv,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 Pv;Ov(Dv,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 r=Ov(Lv,this).getHeadersSettings(n,t,o);n+=1,(0,u.z0)(r,(o=>{const r={...o,headerLevel:n-1,columnIndex:t};let i;1===n?(e.data=r,i=e):(i=new Pv(r),e.addChild(i)),n<Ov(Lv,this).getLayersCount()&&this.buildLeaves(i,t,n,o.origColspan),t+=o.origColspan}))}clear(){Ov(Dv,this).clear(),Ov(Nv,this).clear()}}function zv(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 Fv(e,t){let{childs:n}=e;if(0!==n.length)return n[0].data[t]}function jv(e){return Fv(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(jv(e))return Bv(n[0]);t.isCollapsed=!1;const o=n.slice(1),r=new Set;let i=0;if(o.length>0)(0,u.z0)(o,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;i+=t.colspan,zv(e,(e=>{r.add(e)}))}));else{const{colspan:e,origColspan:n,columnIndex:o}=t;i=n-e;for(let e=1;e<n;e++)r.add(o+e)}return e.walkUp((e=>{const{data:t}=e;t.colspan+=i,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):jv(e)&&(t.isCollapsed=Fv(e,"isCollapsed"))})),{rollbackModification:()=>_v(e),affectedColumns:Array.from(r),colspanCompensation:i}}function _v(e){var t;const{data:n,childs:o}=e;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(jv(e))return _v(o[0]);n.isCollapsed=!0;const r=o.slice(1),i=new Set;if(r.length>0)(0,u.z0)(r,(e=>{zv(e,(e=>{i.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;i.add(e)}}const s=n.colspan-(null!==(t=Fv(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):jv(e)&&(t.isCollapsed=Fv(e,"isCollapsed"))})),{rollbackModification:()=>Bv(e),affectedColumns:Array.from(i),colspanCompensation:s}}const Vv=new Map([["collapse",_v],["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(br.O`The passed node is not the last node on the tree. Only for\x20
- 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(br.O`The passed node is not the last node on the tree. Only for\x20
- 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 Wv(e){const t=[];return(0,u.z0)(e,(e=>{e.walkDown((e=>{const n=e.data,{origColspan:o,columnIndex:r,headerLevel:i,crossHiddenColumns:s}=n,a=function(e,t){let n;return Array.isArray(e[t])?n=e[t]:(n=[],e[t]=n),n}(t,i);let l=!1;for(let e=r;e<r+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(Xv(e,t),n),n}function qv(e,t){return e.get(Xv(e,t))}function Xv(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 Yv=new WeakMap,Qv=new WeakMap,Jv=new WeakMap;class Zv{constructor(){Kv(this,Yv,new kv),Kv(this,Qv,new Hv(qv(Yv,this))),Kv(this,Jv,[[]])}setState(e){qv(Yv,this).setData(e);let t=!1;try{qv(Qv,this).buildTree()}catch(e){qv(Qv,this).clear(),qv(Yv,this).clear(),t=!0}return Uv(Jv,this,Wv(qv(Qv,this).getRoots())),t}setColumnsLimit(e){qv(Yv,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(Yv,this).mergeWith(t),qv(Qv,this).buildTree(),Uv(Jv,this,Wv(qv(Qv,this).getRoots()))}mapState(e){qv(Yv,this).map(e),qv(Qv,this).buildTree(),Uv(Jv,this,Wv(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 r;return o&&(r=function(e,t,n){if(!Vv.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return Vv.get(e)(t,n)}(e,o,n),Uv(Jv,this,Wv(qv(Qv,this).getRoots()))),r}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,r=null;for(let i=e;i<=t;i++){const s=qv(Qv,this).getRootByColumn(i);if(!s)break;o=!0,s.walkDown((o=>{const{columnIndex:i,headerLevel:s,origColspan:a,isHidden:l}=o.data;l||a<=n&&i>=e&&i+a-1<=t&&(null===r||s<r)&&(r=s)}),Mv)}return o&&null===r?-1:this.levelToRowCoords(null!=r?r: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 r=t-1;for(;r>=0;){var i;const{isRoot:t}=null!==(i=this.getHeaderSettings(e,r))&&void 0!==i?i:{isRoot:!0};if(t)break;r-=1}return r}findRightMostColumnIndex(e,t){var n;const{isRoot:o,origColspan:r}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0,origColspan:1};if(o)return t+r-1;let i=t+1;for(;i<this.getColumnsCount();){var s;const{isRoot:t}=null!==(s=this.getHeaderSettings(e,i))&&void 0!==s?s:{isRoot:!0};if(t)break;i+=1}return i-1}getLayersCount(){return qv(Yv,this).getLayersCount()}getColumnsCount(){return qv(Yv,this).getColumnsCount()}clear(){Uv(Jv,this,[]),qv(Yv,this).clear(),qv(Qv,this).clear()}}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}const ty=class{constructor(e,t){ey(this,"hot",void 0),ey(this,"nestedHeaderSettingsGetter",void 0),ey(this,"layersCount",0),ey(this,"container",void 0),ey(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(),i=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 i=0;i<a;i++){let a=n.getVisualFromRenderableIndex(i);null===a&&(a=i);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,r.Mv)(l,e),l.colSpan=c.colspan,o.appendChild(l)}}i.appendChild(o)}o.appendChild(i),e.appendChild(o)}clear(){this.widthsMap.clear(),this.container=null}};function ny(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 oy(e,t,n){ry(e,t),t.set(e,n)}function ry(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function iy(e,t,n){return e.set(ay(e,t),n),n}function sy(e,t){return e.get(ay(e,t))}function ay(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 ly="nestedHeaders";var cy=new WeakMap,uy=new WeakMap,dy=new WeakMap,hy=new WeakMap,py=new WeakMap,fy=new WeakSet;class my extends un{constructor(){var e;super(...arguments),ry(this,e=fy),e.add(this),oy(this,cy,new Zv),oy(this,uy,null),oy(this,dy,null),oy(this,hy,!1),oy(this,py,null),ny(this,"ghostTable",new ty(this.hot,((e,t)=>this.getHeaderSettings(e,t)))),ny(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return ly}static get PLUGIN_PRIORITY(){return 280}isEnabled(){return!!this.hot.getSettings()[ly]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||(0,Lo.R8)(br.O`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
- passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>ay(fy,this,Oy).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 ay(fy,e,$y).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 ay(fy,e,wy).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 ay(fy,e,Cy).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 ay(fy,e,xy).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 ay(fy,e,Sy).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 ay(fy,e,Ay).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 ay(fy,e,Ey).call(e,...n)})),this.addHook("afterSelection",(()=>ay(fy,this,gy).call(this))),this.addHook("afterSelectionFocusSet",(()=>ay(fy,this,gy).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 ay(fy,e,by).call(e,...n)})),this.addHook("afterGetColumnHeaderRenderers",(e=>ay(fy,this,Ry).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 ay(fy,e,Iy).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 ay(fy,e,Py).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 ay(fy,e,vy).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 ay(fy,e,yy).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 ay(fy,e,ky).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 ay(fy,e,My).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 ay(fy,e,Ty).call(e,...n)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>ay(fy,this,gy).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>ay(fy,this,gy).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();sy(cy,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=sy(cy,this).setState(e)),this.detectedOverlappedHeaders&&(0,Lo.R8)(br.O`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
- is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const n=!0===e?"hide-column":"show-column";sy(cy,this).triggerColumnModification(n,t)})),!sy(uy,this)&&this.enabled&&iy(uy,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";sy(cy,this).triggerColumnModification(e,n)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),sy(cy,this).clear(),sy(uy,this).unsubscribe(),iy(uy,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return sy(cy,this)}getLayersCount(){return sy(cy,this).getLayersCount()}getHeaderSettings(e,t){return sy(cy,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,i=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=i?i.childNodes[e]:null;for(let e=0,n=t.childNodes.length;e<n;e++)t.childNodes[e].removeAttribute("colspan"),(0,r.vy)(t.childNodes[e],"hiddenHeader"),s&&s.childNodes[e]&&(s.childNodes[e].removeAttribute("colspan"),(0,r.vy)(s.childNodes[e],"hiddenHeader")),i&&a&&a.childNodes[e]&&(a.childNodes[e].removeAttribute("colspan"),(0,r.vy)(a.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const n=this.hot.view._wt.getSetting("fixedColumnsStart");return(o,i)=>{var s;const{columnIndexMapper:a,view:l}=this.hot;let c=a.getVisualFromRenderableIndex(o);null===c&&(c=o),i.removeAttribute("colspan"),(0,r.vy)(i,"hiddenHeader"),(0,r.vy)(i,"hiddenHeaderText");const{colspan:u,isHidden:d,isPlaceholder:h,headerClassNames:p}=null!==(s=sy(cy,this).getHeaderSettings(e,c))&&void 0!==s?s:{label:""};if(h||d)(0,r.iQ)(i,"hiddenHeader");else if(u>1){var f,m,g;const{wtOverlays:e}=l._wt,t=null===(f=e.topInlineStartCornerOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(i),s=null===(m=e.inlineStartOverlay)||void 0===m?void 0:m.clone.wtTable.THEAD.contains(i);(null===(g=e.topOverlay)||void 0===g?void 0:g.clone.wtTable.THEAD.contains(i))&&c<n&&(0,r.iQ)(i,"hiddenHeaderText");const a=t||s?Math.min(u,n-o):u;a>1&&i.setAttribute("colspan",a)}if(this.hot.view.appendColHeader(c,i,(function(){return t.getColumnHeaderValue(...arguments)}),e),!h&&!d){const e=i.querySelector("div.relative");e&&p&&p.length>0&&((0,r.vy)(e,this.hot.getColumnMeta(c).headerClassName),(0,r.iQ)(e,p))}}}getColumnHeaderValue(e,t){var n;const{isHidden:o,isPlaceholder:r}=null!==(n=sy(cy,this).getHeaderSettings(t,e))&&void 0!==n?n:{};return r||o?"":this.hot.getColHeader(e,t)}destroy(){iy(cy,this,null),null!==sy(uy,this)&&(sy(uy,this).unsubscribe(),iy(uy,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return sy(cy,this).getHeaderTreeNodeData(e.row,e.col)}}function gy(){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=sy(cy,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 by(e,t){var n;const o=this.hot.getSelectedRangeLast();if(!o)return e;const{highlight:r}=o,{navigableHeaders:i}=this.hot.getSettings(),s=this.hot.selection.isSelectedByColumnHeader(),a=i?r.row:null===(n=sy(py,this))||void 0===n?void 0:n.row,l=s?e:r.col,c=a<0&&l>=0;if(iy(py,this,null),!c)return e;const u=this.hot.getFirstFullyVisibleColumn(),d=this.hot.getLastFullyVisibleColumn(),h=d-u+1,p=sy(cy,this).findLeftMostColumnIndex(a,l),f=sy(cy,this).findRightMostColumnIndex(a,l),m=f-p+1;if(p<u&&f>d)return p;if(s){let e=null;return p>=u&&f>d?m>h?(t.value="start",e=p):(t.value="end",e=f):p<u&&f<=d&&(m>h?(t.value="end",e=f):(t.value="start",e=p)),e}return p<=u?p:f}function vy(e,t,n){const o=sy(cy,this).getHeaderTreeNodeData(t,e);if(!o)return e;const{columnCursor:r,selectionType:i,selectionWidth:s}=n,{isRoot:a,colspan:l}=sy(cy,this).getHeaderSettings(t,e);if(i===gv.PP){if(!a)return o.columnIndex}else if(i===gv.E6&&(l>s-r||!a))return null;return e}function yy(e,t,n){let{columnHeadersCount:o}=n;if(0!==o)for(let n=0;n<t.length;n++){const{startRow:o,startCol:i,endRow:s,endCol:a}=t[n],l=s-o+1;if(o>=0||1==i-a+1)break;for(let t=i;t<=a;t++)for(let n=o;n<=s;n++){var r;const o=l+n,s=t-i;0!==s&&(!1===(null===(r=sy(cy,this).getHeaderTreeNodeData(n,t))||void 0===r?void 0:r.isRoot)&&(e[o][s]=""))}}}function wy(e,t,n,o){this._getHeaderTreeNodeDataByCoords(t)&&(o.column=!0)}function Cy(e,t){const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;iy(dy,this,t.clone()),iy(hy,this,!0);const{selection:o}=this.hot,r=o.isSelected()?o.getSelectedRange().current():null,s=[],{columnIndex:a,origColspan:l}=n,c=!o.inInSelection(t);e.shiftKey&&r?t.col<r.from.col?s.push(r.getTopEndCorner().col,a,t.row):t.col>r.from.col?s.push(r.getTopStartCorner().col,a+l-1,t.row):s.push(a,a+l-1,t.row):((0,i.Ml)(e)||(0,i.nO)(e)&&c||(0,i.kH)(e))&&s.push(a,a+l-1,t.row),o.selectColumns(...s)}function xy(e,t,n,o){if(!this.hot.view.isMouseDown()||o.column)return;const r=this._getHeaderTreeNodeDataByCoords(t);if(!r)return;const{columnIndex:i,origColspan:s}=r,a=this.hot.getSelectedRangeLast(),l=a.getTopStartCorner(),c=a.getBottomEndCorner(),{from:u}=a;o.column=!0,o.cell=!0;const d=[],h=(0,Et.qE)(t.row,-1/0,-1);t.col<u.col?d.push(c.col,i,h):t.col>u.col?d.push(l.col,i+s-1,h):d.push(i,i+s-1,h),this.hot.selection.selectColumns(...d)}function Sy(){iy(hy,this,!1)}function Ay(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!sy(hy,this)||!e)return;const t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner().col,o=t.getBottomEndCorner().col,{columnIndex:r,origColspan:i}=sy(cy,this).getHeaderTreeNodeData(sy(dy,this).row,sy(dy,this).col);if(t.setHighlight(sy(dy,this)),i>t.getWidth()||r<n||r+i-1>o){const e=sy(cy,this).findTopMostEntireHeaderLevel((0,Et.qE)(n,r,r+i-1),(0,Et.qE)(o,r,r+i-1));t.highlight.row=e,t.highlight.col=t.from.col}}function Ey(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=sy(cy,this).findLeftMostColumnIndex(n.row,n.col),r=sy(cy,this).findRightMostColumnIndex(n.row,n.col);if(e.col<0){const n=t.col>=o&&t.col<=r?o-1:r,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,t.col)-1,1)}else if(e.col>0){const n=t.col>=o&&t.col<=r?r+1:o,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,i)-1,1)}}function ky(e,t,n){const o=e.row,r=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col}),i=this._getHeaderTreeNodeDataByCoords({row:o,col:t.col});iy(py,this,n.clone()),t.col<e.col?(r&&(e.col=r.columnIndex+r.origColspan-1),i&&(t.col=i.columnIndex)):t.col>=e.col&&(r&&(e.col=r.columnIndex),i&&(t.col=i.columnIndex+i.origColspan-1))}function Ry(e){if(sy(cy,this).getLayersCount()>0){e.length=0;for(let t=0;t<sy(cy,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}}function My(e){const t=sy(cy,this).getLayersCount();let n=e.startColumn,o=!!t;for(let r=0;r<t;r++){const t=sy(cy,this).findLeftMostColumnIndex(r,e.startColumn),i=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(o=!1),(0,Et.kf)(i)&&i<e.startColumn){n=i;break}}e.startColumn=o?sy(cy,this).getHeaderTreeNodeData(0,n).columnIndex:n}function Iy(e,t){const n=this.ghostTable.getWidth(t);return e>n?e:n}function Py(e,t,n){var o;const{label:r}=null!==(o=sy(cy,this).getHeaderTreeNodeData(n,t))&&void 0!==o?o:{label:""};return r}function Ty(e,t){if(e<0)return this.hot.getCell(e,sy(cy,this).findLeftMostColumnIndex(e,t),!0)}function Oy(){this.updatePlugin()}function $y(e,t){t||this.updatePlugin()}function Dy(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 Ny=class{constructor(e,t){Dy(this,"hot",void 0),Dy(this,"data",null),Dy(this,"plugin",void 0),Dy(this,"parentReference",new WeakMap),Dy(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,Et.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 r=!1,i=t;if(isNaN(i)&&i.end)return i;let s=e;return s||(s={__children:this.data},r=!0,i-=1),null!=n&&i===n?{result:s,end:!0}:null!=o&&s===o?{result:i,end:!0}:(i+=1,s.__children&&(0,u.z0)(s.__children,(e=>{if(this.parentReference.set(e,r?null:s),i=this.readTreeNodes(e,i,n,o),isNaN(i)&&i.end)return!1})),i)}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 r=e;e||(r=this.mockParent()),r.__children||(r.__children=[]),n||(n=this.mockNode()),r.__children.push(n),this.rewriteCache();const i=this.getRowIndex(n);this.hot.rowIndexMapper.insertIndexes(i,1),this.hot.runHooks("afterCreateRow",i,1),this.hot.runHooks("afterAddChild",e,n)}addChildAtIndex(e,t,n){let o,r=n;if(r||(r=this.mockNode()),this.hot.runHooks("beforeAddChild",e,r,t),e){const n=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",n,1),e.__children.splice(t,null,r),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]);r=this.getDataObject(o),this.hot.runHooks("afterAddChild",e,r,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const n=this.translateTrimmedRow(e),o=this.getRowParent(n),r=this.getRowIndexWithinParent(n);switch(t){case"below":this.addChildAtIndex(o,r+1,null);break;case"above":this.addChildAtIndex(o,r,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;const o=[];Array.isArray(e)?((0,Et.Ti)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);o.push(this.getDataObject(t))})),(0,Et.Ti)(0,o.length-2,(e=>{this.detachFromParent(o[e],!1)})),n=o[o.length-1]):n=e;const r=this.getRowIndex(n),i=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(r+i+1).keys()).splice(-1*(i+1));if(this.hot.runHooks("beforeRemoveRow",r,i+1,e,this.plugin.pluginName),a.__children.splice(s,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",r,i+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,i+1,this.plugin.pluginName),l.__children.push(n)}else u=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",u-2,i+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",u-2,i+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 r=null,i=e;o&&o.__children&&0===o.__children.length?(r=o,i=0):e<this.countAllRows()&&(r=this.getRowParent(e),i=this.getRowIndexWithinParent(e)),r?n?r.__children.splice(i,t,...n):r.__children.splice(i,t):n?this.data.splice(i,t,...n):this.data.splice(i,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 r=t===this.hot.countRows(),i=this.getRowParent(e),s=this.getRowIndexWithinParent(e),a=i.__children.slice(s,s+1),l=e>t;let c=r?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=r||n||o?c.__children.length:this.getRowIndexWithinParent(t),d=i===c;c.__children.splice(u,0,a[0]),i.__children.splice(s+(l&&d?1:0),1),this.syncRowWithRawSource(i),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 Ly(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 Hy=class{constructor(e,t){Ly(this,"hot",void 0),Ly(this,"plugin",void 0),this.hot=t,this.plugin=e}};class zy extends Hy{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),i=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,r.iQ)(t,zy.CSS_CLASSES.indicatorContainer),o){const{rootDocument:e}=this.hot,t=a.cloneNode(!0);s.innerHTML="",(0,Et.Ti)(0,o-1,(()=>{const t=e.createElement("SPAN");(0,r.iQ)(t,zy.CSS_CLASSES.emptyIndicator),s.appendChild(t)})),s.appendChild(t)}if(this.dataManager.hasChildren(i)){const e=this.hot.rootDocument.createElement("DIV");c&&(0,r.Bq)(e,[(0,m.MG)()]),(0,r.iQ)(t,zy.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?((0,r.iQ)(e,`${zy.CSS_CLASSES.button} ${zy.CSS_CLASSES.expandButton}`),c&&(0,r.Bq)(t,[(0,m.dV)(!1)])):((0,r.iQ)(e,`${zy.CSS_CLASSES.button} ${zy.CSS_CLASSES.collapseButton}`),c&&(0,r.Bq)(t,[(0,m.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 Fy=zy,jy=class extends Hy{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,((r,i)=>{r>=e&&r<t&&(n.lastCollapsedRows[i]=r+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,Et.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 r=null,i=null,s=null;return isNaN(e)?(r=e,i=this.dataManager.getRowIndex(r)):(r=this.dataManager.getDataObject(e),i=e),this.dataManager.hasChildren(r)&&(0,u.z0)(r.__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(i)&&this.collapsedRows.push(i),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 r=null,i=null,s=null;return isNaN(e)?(r=e,i=this.dataManager.getRowIndex(e)):(r=this.dataManager.getDataObject(e),i=e),this.collapsedRows.splice(this.collapsedRows.indexOf(i),1),this.dataManager.hasChildren(r)&&(0,u.z0)(r.__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,r.nB)(e.target,Fy.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),(0,i.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 By=new WeakMap;const _y=class extends Hy{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,By,{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(Ae.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(Ae.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,Et.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,Et.Ti)(0,e.items.length-1,(t=>{const n=(o=By,r=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,r)))[e.items[t].key];var o,r;null!=n&&(e.items[t].callback=n)})),e}};function Vy(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 Wy{constructor(e){Vy(this,"plugin",void 0),Vy(this,"hot",void 0),Vy(this,"dataManager",void 0),Vy(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 r=n===this.hot.countRows(),i=r?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,i),t})),l=-1===a.indexOf(i);if(!s||!l)return!1;const c=this.getBaseParent(a),u=this.getTargetParent(r,i),d=c===u;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(u),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,i,d),this.moveRows(a,i,u),this.dataManager.rewriteCache(),this.moveCellsMeta(a,i),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:r}=e;let i=!1;return(0,d.b0)(o)&&((0,Lo.R8)(br.O`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
- when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,n,o,r,!1),i=!0),i}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,r=0;if(this.movedToCollapsed){let i=null;i=e[n-1]<t?this.dataManager.translateTrimmedRow(t-n):this.dataManager.translateTrimmedRow(t);const s=this.dataManager.getRowParent(null===i?this.hot.countSourceRows()-1:i-1),a=this.dataManager.getRowIndex(s);o=this.dataManager.untranslateTrimmedRow(a),r=o}else e[n-1]<t?(r=t-1,o=r-n+1):(o=t,r=o+n-1);this.hot.selectCells([[o,0,r,this.hot.countCols()-1]],!1)}isRowOrderChanged(e,t){return e.some(((e,n)=>e-n!==t))}}function Gy(e,t,n){Ky(e,t),t.set(e,n)}function Ky(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Uy(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 qy(e,t){return e.get(Yy(e,t))}function Xy(e,t,n){return e.set(Yy(e,t),n),n}function Yy(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 Qy="nestedRows",Jy=Qy;var Zy=new WeakMap,ew=new WeakMap,tw=new WeakSet;class nw extends un{constructor(){var e;super(...arguments),Ky(this,e=tw),e.add(this),Uy(this,"dataManager",null),Uy(this,"headersUI",null),Uy(this,"collapsedRowsMap",null),Gy(this,Zy,!1),Gy(this,ew,!1)}static get PLUGIN_KEY(){return Qy}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[Qy]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new Bd.q),this.dataManager=new Ny(this,this.hot),this.collapsingUI=new jy(this,this.hot),this.headersUI=new Fy(this,this.hot),this.contextMenuUI=new _y(this,this.hot),this.rowMoveController=new Wy(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Yy(tw,e,gw).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 Yy(tw,e,bw).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 Yy(tw,e,iw).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 Yy(tw,e,sw).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 Yy(tw,e,aw).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 Yy(tw,e,rw).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 Yy(tw,e,uw).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 Yy(tw,e,cw).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 Yy(tw,e,dw).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 Yy(tw,e,hw).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 Yy(tw,e,pw).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 Yy(tw,e,fw).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 Yy(tw,e,lw).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 Yy(tw,e,mw).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 Yy(tw,e,ow).call(e,...n)})),this.addHook("beforeLoadData",(e=>Yy(tw,this,vw).call(this,e))),this.addHook("beforeUpdateData",(e=>Yy(tw,this,vw).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:Jy,relativeToGroup:a.b,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Jy)}disableCoreAPIModifiers(){Xy(ew,this,!0)}enableCoreAPIModifiers(){Xy(ew,this,!1)}onModifyRowData(e){if(!qy(ew,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!qy(ew,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,n){return!(!qy(ew,this)&&!this.dataManager.isRowHighestLevel(e)&&(this.dataManager.spliceData(e,t,n),1))}destroy(){super.destroy()}}function ow(e,t,n,o){return this.rowMoveController.onBeforeRowMove(e,t,n,o)}function rw(e,t,n){this.collapsingUI.toggleState(e,t,n)}function iw(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),Xy(Zy,this,!0),this.dataManager.getData().slice()}function sw(e){return this.contextMenuUI.appendOptions(e)}function aw(e,t){this.headersUI.appendLevelIndicators(e,t)}function lw(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function cw(e,t,n,o){o!==this.pluginName&&this.hot._registerTimeout((()=>{Xy(Zy,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function uw(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 dw(){this.collapsingUI.collapsedRowsStash.stash()}function hw(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function pw(){this.collapsingUI.collapsedRowsStash.stash()}function fw(e,t,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function mw(){this.dataManager.rewriteCache()}function gw(){this.headersUI.updateRowHeaderWidth()}function bw(e,t){qy(Zy,this)&&(t.skipRender=!0)}function vw(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()[Qy]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}function yw(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 ww=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;yw(this,"rootWindow",void 0),yw(this,"prefix",void 0),yw(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()}};Se.R.getSingleton().register("persistentStateSave"),Se.R.getSingleton().register("persistentStateLoad"),Se.R.getSingleton().register("persistentStateReset");const Cw="persistentState";class xw 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 Cw}static get PLUGIN_PRIORITY(){return 0}isEnabled(){return!!this.hot.getSettings()[Cw]}enablePlugin(){this.enabled||(this.storage||(this.storage=new ww(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 Sw(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 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 Ew="search",kw=function(e,t,n,o,r){e.getCellMeta(t,n).isSearchResult=r},Rw=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 Mw=new WeakSet;class Iw 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=Mw),t.add(e),Sw(this,"callback",kw),Sw(this,"queryMethod",Rw),Sw(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return Ew}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return this.hot.getSettings()[Ew]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Ew];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 Aw(Mw,e,Pw).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 Aw(Mw,e,Pw).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(),r=this.hot.countCols(),i=[],s=this.hot;return(0,Et.Ti)(0,o-1,(o=>{(0,Et.Ti)(0,r-1,(r=>{const a=this.hot.getDataAtCell(o,r),l=this.hot.getCellMeta(o,r),c=l.search.callback||t,u=(l.search.queryMethod||n)(e,a,l);if(u){const e={row:o,col:r,data:a};i.push(e)}c&&c(s,o,r,a,u)}))})),i}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 Pw(e,t,n,o,r,i){const s=i.className||[];let a=[];"string"==typeof s?a=s.split(" "):a.push(...s),this.isEnabled()&&i.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),i.className=a.join(" ")}function Tw(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 Ow{constructor(e){Tw(this,"viewportWidth",void 0),Tw(this,"overwriteColumnWidthFn",void 0),Tw(this,"baseWidths",new Map),Tw(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 $w extends Ow{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 r=this.viewportWidth,i=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]),i+=l):a!==l&&(n.push([s,l]),o.push(s),r-=l)})),r<=vn.j)return void this.stretchedWidths.clear();const s=r/i;let a=-1,l=0;n.forEach(((e,t)=>{let[r,i]=e,c=i;o.includes(r)||(c=Math.round(i*s)),this.stretchedWidths.set(r,c),a=r,t<n.length-1&&(l+=c)})),this.stretchedWidths.size>1&&this.stretchedWidths.set(a,Math.round(this.viewportWidth-l))}}function Dw(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 Nw(e,t){return e.get(Hw(e,t))}function Lw(e,t,n){return e.set(Hw(e,t),n),n}function Hw(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 zw=new WeakMap,Fw=new WeakMap;class jw extends Ow{constructor(){super(...arguments),Dw(this,zw,0),Dw(this,Fw,-1)}prepare(e){super.prepare(e),Lw(zw,this,0),Lw(Fw,this,-1)}setColumnBaseWidth(e,t){super.setColumnBaseWidth(e,t),Lw(Fw,this,e),Lw(zw,this,t)}calculate(){if(-1===Nw(Fw,this))return;const e=Array.from(this.baseWidths).reduce(((e,t)=>{let[,n]=t;return e+n}),0),t=Math.max(this.viewportWidth-e+Nw(zw,this),0);this.stretchedWidths.set(Nw(Fw,this),t)}}function Bw(e,t,n){_w(e,t),t.set(e,n)}function _w(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vw(e,t){return e.get(Gw(e,t))}function Ww(e,t,n){return e.set(Gw(e,t),n),n}function Gw(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 Kw=new WeakMap,Uw=new WeakMap,qw=new WeakMap,Xw=new WeakMap,Yw=new WeakSet;class Qw{constructor(e){var t;_w(this,t=Yw),t.add(this),Bw(this,Kw,void 0),Bw(this,Uw,void 0),Bw(this,qw,new Map([["all",new $w(Gw(Yw,this,eC).bind(this))],["last",new jw(Gw(Yw,this,eC).bind(this))]])),Bw(this,Xw,"none"),Ww(Kw,this,e),Ww(Uw,this,Vw(Kw,this).columnIndexMapper.createAndRegisterIndexMap("stretchColumns","physicalIndexToValue"))}useStrategy(e){Ww(Xw,this,Vw(qw,this).has(e)?e:"none")}refreshStretching(){"none"!==Vw(Xw,this)?Vw(Kw,this).batchExecution((()=>{Vw(Uw,this).clear();const e=Vw(qw,this).get(Vw(Xw,this));let t=Vw(Kw,this).view.getViewportWidth();Gw(Yw,this,Jw).call(this)&&(t-=(0,r.XJ)(Vw(Kw,this).rootDocument)),e.prepare({viewportWidth:t});for(let t=0;t<Vw(Kw,this).countCols();t++)Vw(Kw,this).columnIndexMapper.isHidden(Vw(Kw,this).toPhysicalColumn(t))||e.setColumnBaseWidth(t,Gw(Yw,this,Zw).call(this,t));e.calculate(),e.getWidths().forEach((e=>{let[t,n]=e;Vw(Uw,this).setValueAtIndex(Vw(Kw,this).toPhysicalColumn(t),n)}))}),!0):Vw(Uw,this).clear()}getStretchedWidth(e){return Vw(Uw,this).getValueAtIndex(Vw(Kw,this).toPhysicalColumn(e))}}function Jw(){const{view:e}=Vw(Kw,this);if(e.isVerticallyScrollableByWindow())return!1;const t=e.getViewportHeight(),n=Vw(Kw,this).countRows(),o=e.getStylesHandler().getDefaultRowHeight();let r=0,i=!1;for(let e=0;e<n;e++){var s;if(r+=(null!==(s=Vw(Kw,this).getRowHeight(e))&&void 0!==s?s:o)+(0===e?1:0),r>t){i=!0;break}}return i}function Zw(e){var t;return null!==(t=Vw(Kw,this).getColWidth(e,"StretchColumns"))&&void 0!==t?t:vn.j}function eC(e,t){return Vw(Kw,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(iC(e,t),n),n}function rC(e,t){return e.get(iC(e,t))}function iC(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 Qw(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!==rC(aC,this)&&rC(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||(rC(sC,this).useStrategy(this.hot.getSettings().stretchH),rC(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 iC(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 iC(cC,e,dC).call(e,...n)}),10),super.enablePlugin())}updatePlugin(){rC(sC,this).useStrategy(this.hot.getSettings().stretchH),super.updatePlugin()}disablePlugin(){super.disablePlugin(),rC(lC,this).unobserve(this.hot.rootElement)}getColumnWidth(e){return rC(sC,this).getStretchedWidth(e)}destroy(){rC(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&&rC(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 fC(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 mC=new WeakSet;class gC 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=mC),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",(()=>fC(mC,this,bC).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>fC(mC,this,vC).call(this))),this.addHook("afterMomentumScroll",(()=>fC(mC,this,yC).call(this)))}}function bC(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:n,topInlineStartCornerOverlay:o,bottomInlineStartCornerOverlay:r}=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),r&&r.clone&&this.scrollbars.push(r),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),r&&r.clone&&this.clones.push(r.clone.wtTable.holder.parentNode)}function vC(){this.freezeOverlays=!0,(0,u.z0)(this.clones,(e=>{(0,r.iQ)(e,"hide-tween")}))}function yC(){this.freezeOverlays=!1,(0,u.z0)(this.clones,(e=>{(0,r.vy)(e,"hide-tween"),(0,r.iQ)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,u.z0)(this.clones,(e=>{(0,r.vy)(e,"show-tween")}))}),400),(0,u.z0)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}const wC="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 wC}static get PLUGIN_PRIORITY(){return 330}isEnabled(){return!!this.hot.getSettings()[wC]}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,SC).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[wC];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 r=this.trimmedRowsMap.getValues().slice(),i=e.length>0;n&&i&&((0,u.z0)(e,(e=>{r[e]=!1})),o=(0,u.mu)(r,((e,t,n)=>(t&&e.push(n),e)),[])),!1!==this.hot.runHooks("beforeUntrimRow",t,o,n&&i)&&(n&&i&&this.trimmedRowsMap.setValues(r),this.hot.runHooks("afterUntrimRow",t,o,n&&i,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 SC(){const e=this.hot.getSettings()[wC];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,u.z0)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}class AC{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 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 kC extends AC{constructor(e){let{stateBefore:t,range:n,type:o,alignment:r}=e;super("cell_alignment"),EC(this,"stateBefore",void 0),EC(this,"range",void 0),EC(this,"type",void 0),EC(this,"alignment",void 0),this.stateBefore=t,this.range=n,this.type=o,this.alignment=r}static startRegisteringEvents(e,t){e.addHook("beforeCellAlignment",((e,n,o,r)=>{t.done((()=>new kC({stateBefore:e,range:n,type:o,alignment:r})))}))}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){Ii(this.range,this.type,this.alignment,((t,n)=>e.getCellMeta(t,n)),((t,n,o,r)=>e.setCellMeta(t,n,o,r))),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 AC{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),Ah(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 IC(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 PC extends AC{constructor(e){let{currentSortState:t,newSortState:n}=e;super("col_sort"),IC(this,"previousSortState",void 0),IC(this,"nextSortState",void 0),this.previousSortState=t,this.nextSortState=n}static startRegisteringEvents(e,t){e.addHook("beforeColumnSort",((e,n,o)=>{o&&t.done((()=>new PC({currentSortState:e,newSortState:n})))}))}undo(e,t){const n=e.getPlugin("columnSorting"),o=e.getPlugin("multiColumnSorting"),r=o.isEnabled()?o:n;this.previousSortState.length?r.sort(this.previousSortState):r.clearSort(),t()}redo(e,t){const n=e.getPlugin("columnSorting"),o=e.getPlugin("multiColumnSorting");(o.isEnabled()?o:n).sort(this.nextSortState),t()}}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 OC extends AC{constructor(e){let{index:t,amount:n}=e;super("insert_col"),TC(this,"index",void 0),TC(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 $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 DC extends AC{constructor(e){let{index:t,amount:n}=e;super("insert_row"),$C(this,"index",void 0),$C(this,"amount",void 0),this.index=t,this.amount=n}static startRegisteringEvents(e,t){e.addHook("afterCreateRow",((e,n,o)=>{t.done((()=>new DC({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 NC(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 AC{constructor(e){let{changes:t,selected:n,countCols:o,countRows:r}=e;super("change"),NC(this,"changes",void 0),NC(this,"selected",void 0),NC(this,"countCols",void 0),NC(this,"countRows",void 0),this.changes=t,this.selected=n,this.countCols=o,this.countRows=r}static startRegisteringEvents(e,t){e.addHook("beforeChange",(function(n,o){const r=n&&n.length;r&&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=r>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 r=e.countCols()-this.countCols;r>0&&e.isColumnModificationAllowed()&&e.alter("remove_col",null,r,"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 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 zC extends AC{constructor(e){let{conditionsStack:t,previousConditionsStack:n}=e;super("filter"),HC(this,"conditionsStack",void 0),HC(this,"previousConditionsStack",void 0),this.conditionsStack=t,this.previousConditionsStack=n}static startRegisteringEvents(e,t){e.addHook("beforeFilter",((e,n)=>{t.done((()=>new zC({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 FC extends AC{constructor(e){let{data:t,cellRange:n}=e;var o,r,i;super("merge_cells"),o=this,i=void 0,(r=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+""}(r="cellRange"))in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i,this.cellRange=n,this.data=t}static startRegisteringEvents(e,t){e.addHook("beforeMergeCells",((n,o)=>{if(o)return;const r=n.getTopStartCorner(),i=n.getBottomEndCorner(),s=e.getData(r.row,r.col,i.row,i.col);t.done((()=>new FC({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 jC(e,t,n,o,r){const i=["visualRow","visualCol","row","col","prop"],s=i.length,a=[];return(0,Et.Ti)(o,r,(o=>{(0,Et.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===i.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 _C extends AC{constructor(e){let{index:t,indexes:n,data:o,amount:r,headers:i,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=r,this.headers=i,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,r,i)=>{t.done((()=>{const t=e.getSourceDataArray(),r=(e.countCols()+n)%e.countCols(),i=r+o-1,s=[],a=[],l=[];return(0,Et.Ti)(t.length-1,(n=>{const o=[],a=t[n];(0,Et.Ti)(r,i,(t=>{o.push(a[e.toPhysicalColumn(t)])})),s.push(o)})),(0,Et.Ti)(o-1,(t=>{l.push(e.toPhysicalColumn(r+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,Et.Ti)(o-1,(t=>{a.push(e.getSettings().colHeaders[e.toPhysicalColumn(r+t)]||null)})),new _C({index:r,indexes:l,data:s,amount:o,headers:a,columnPositions:e.columnIndexMapper.getIndexesSequence(),rowPositions:e.rowIndexMapper.getIndexesSequence(),fixedColumnsStart:e.getSettings().fixedColumnsStart,removedCellMetas:jC(e,0,e.countRows(),r,i)})}),i)}))}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])],r=this.data.length,i=[];for(let e=0;e<r;e++)i.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]=i[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,r]=t;e.setCellMetaObject(n,o,r)})),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 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}class WC extends AC{constructor(e){let{index:t,data:n,fixedRowsBottom:o,fixedRowsTop:r,rowIndexesSequence:i,removedCellMetas:s}=e;super("remove_row"),VC(this,"index",void 0),VC(this,"data",void 0),VC(this,"fixedRowsBottom",void 0),VC(this,"fixedRowsTop",void 0),VC(this,"rowIndexesSequence",void 0),VC(this,"removedCellMetas",void 0),this.index=t,this.data=n,this.fixedRowsBottom=o,this.fixedRowsTop=r,this.rowIndexesSequence=i,this.removedCellMetas=s}static startRegisteringEvents(e,t){e.addHook("beforeRemoveRow",((n,o,r,i)=>{t.done((()=>{const t=e.toPhysicalRow(n),r=t+o-1,i=(0,s.Go)(e.getSourceData(t,0,t+o-1,e.countSourceCols()-1));return new WC({index:t,data:i,fixedRowsBottom:e.getSettings().fixedRowsBottom,fixedRowsTop:e.getSettings().fixedRowsTop,rowIndexesSequence:e.rowIndexMapper.getIndexesSequence(),removedCellMetas:jC(e,t,r,0,e.countCols()-1)})}),i)}))}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 r=parseInt(n,10);o.push([this.index+t,isNaN(r)?n:r,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,r]=t;e.setCellMetaObject(n,o,r)})),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 AC{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),Ah(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 AC{constructor(e){let{cellRange:t}=e;var n,o,r;super("unmerge_cells"),n=this,r=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:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,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 XC(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 YC="undoRedo";Se.R.getSingleton().register("beforeUndo"),Se.R.getSingleton().register("afterUndo"),Se.R.getSingleton().register("beforeRedo"),Se.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,r;super(e),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,r=JC),r.add(o),qC(this,"doneActions",[]),qC(this,"undoneActions",[]),qC(this,"ignoreNewActions",!1),t=e,n=this,[kC,MC,PC,OC,DC,LC,zC,FC,_C,WC,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 XC(JC,e,ex).call(e,...n)})),this.registerShortcuts(),XC(JC,this,tx).call(this),super.enablePlugin())}disablePlugin(){super.disablePlugin(),this.clear(),this.unregisterShortcuts(),XC(JC,this,nx).call(this)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:YC};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(YC)}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(),r=this.undoneActions.slice();this.doneActions.push(o),this.hot.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.hot.runHooks("beforeRedoStackChange",r),this.undoneActions.length=0,this.hot.runHooks("afterRedoStackChange",r,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)(br.O`The "${e}" method is deprecated and it will be removed\x20
- from the Core API in the future. Please use the method from the UndoRedo plugin\x20
- (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)(E),(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)(me),(0,be.VA)(o.t),(0,be.VA)(ge),(0,Tt.TS)(Ce),(0,Tt.TS)(ve.j),(0,Tt.TS)(Oe),(0,Tt.TS)(xe),(0,Tt.TS)(De),(0,Tt.TS)(ye),(0,Tt.TS)(Rt),(0,Tt.TS)(Mt),(0,Tt.TS)(It),(0,Tt.TS)(f.F),(0,Tt.TS)(Pt),(0,Ft.qV)(Ot),(0,Ft.qV)(Nt),(0,Ft.qV)(Dt),(0,Ft.qV)(Lt),(0,Ft.qV)(zt),(0,Qt.Gk)(jt),(0,Qt.Gk)(Bt),(0,Qt.Gk)(Vt),(0,Qt.Gk)(Wt),(0,Qt.Gk)(Gt),(0,Qt.Gk)(Kt),(0,Qt.Gk)(Ut),(0,Qt.Gk)(qt),(0,Qt.Gk)(Xt.Y),(0,Qt.Gk)(Yt),(0,Jt.F3)(Tn),(0,Jt.F3)(Un),(0,Jt.F3)(co),(0,Jt.F3)(Do),(0,Jt.F3)(Xo),(0,Jt.F3)(Hr),(0,Jt.F3)(qr),(0,Jt.F3)(Ji),(0,Jt.F3)(ua),(0,Jt.F3)(Za),(0,Jt.F3)(Al),(0,Jt.F3)(Tl),(0,Jt.F3)(_l),(0,Jt.F3)(bc),(0,Jt.F3)(eh),(0,Jt.F3)(lp),(0,Jt.F3)(_p),(0,Jt.F3)(nf),(0,Jt.F3)(bf),(0,Jt.F3)(Uf),(0,Jt.F3)(Am),(0,Jt.F3)(ng),(0,Jt.F3)($g),(0,Jt.F3)(Hb),(0,Jt.F3)(pv),(0,Jt.F3)(mv),(0,Jt.F3)(my),(0,Jt.F3)(nw),(0,Jt.F3)(xw),(0,Jt.F3)(Iw),(0,Jt.F3)(uC),(0,Jt.F3)(gC),(0,Jt.F3)(xC),(0,Jt.F3)(ZC)}},37313:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(3576).A},37353:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>m});var o=n(98587),r=n(77387),i=n(96540),s=n(40961);var a=n(17241),l="unmounted",c="exited",u="entering",d="entered",h="exiting",p=function(e){function t(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=c,o.appearStatus=u):r=d:r=t.unmountOnExit||t.mountOnEnter?l:c,o.state={status:r},o.nextCallback=null,o}(0,r.A)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:c}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==u&&n!==d&&(t=u):n!==u&&n!==d||(t=h)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===u){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:l})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[s.findDOMNode(this),o],i=r[0],a=r[1],l=this.getTimeouts(),c=o?l.appear:l.enter;e||n?(this.props.onEnter(i,a),this.safeSetState({status:u},(function(){t.props.onEntering(i,a),t.onTransitionEnd(c,(function(){t.safeSetState({status:d},(function(){t.props.onEntered(i,a)}))}))}))):this.safeSetState({status:d},(function(){t.props.onEntered(i)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:s.findDOMNode(this);t?(this.props.onExit(o),this.safeSetState({status:h},(function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:c},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:c},(function(){e.props.onExited(o)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],a=r[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===l)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,o.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.createElement(a.A.Provider,{value:null},"function"==typeof n?n(e,r):i.cloneElement(i.Children.only(n),r))},t}(i.Component);function f(){}p.contextType=a.A,p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:f,onEntering:f,onEntered:f,onExit:f,onExiting:f,onExited:f},p.UNMOUNTED=l,p.EXITED=c,p.ENTERING=u,p.ENTERED=d,p.EXITING=h;const m=p},37523:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(96540);var o=n(9792),r=n(74848);const i=(0,o.A)((0,r.jsx)("path",{d:"M19 6.41L17.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")},37603:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var o=n(96540),r=n(34164),i=n(21362),s=n(82777),a=n(98855),l=n(26739),c=n(39241),u=n(20439),d=n(40583),h=n(38329),p=n(37313),f=n(30301),m=n(24566),g=n(42812),b=n(29312),v=n(96148),y=n(1908);function w(e){return(0,y.Ay)("MuiMenuItem",e)}const C=(0,v.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var x=n(74848);const S=(0,l.Ay)(h.A,{shouldForwardProp:e=>(0,a.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,c.A)((({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${C.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${C.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${C.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.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,s.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${C.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${C.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${m.A.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${m.A.inset}`]:{marginLeft:52},[`& .${b.A.root}`]:{marginTop:0,marginBottom:0},[`& .${b.A.inset}`]:{paddingLeft:36},[`& .${g.A.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${g.A.root} svg`]:{fontSize:"1.25rem"}}}]})))),A=o.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiMenuItem"}),{autoFocus:s=!1,component:a="li",dense:l=!1,divider:c=!1,disableGutters:h=!1,focusVisibleClassName:m,role:g="menuitem",tabIndex:b,className:v,...y}=n,C=o.useContext(d.A),A=o.useMemo((()=>({dense:l||C.dense||!1,disableGutters:h})),[C.dense,l,h]),E=o.useRef(null);(0,p.A)((()=>{s&&E.current&&E.current.focus()}),[s]);const k={...n,dense:A.dense,divider:c,disableGutters:h},R=(e=>{const{disabled:t,dense:n,divider:o,disableGutters:r,selected:s,classes:a}=e,l={root:["root",n&&"dense",t&&"disabled",!r&&"gutters",o&&"divider",s&&"selected"]},c=(0,i.A)(l,w,a);return{...a,...c}})(n),M=(0,f.A)(E,t);let I;return n.disabled||(I=void 0!==b?b:-1),(0,x.jsx)(d.A.Provider,{value:A,children:(0,x.jsx)(S,{ref:M,role:g,tabIndex:I,component:a,focusVisibleClassName:(0,r.A)(R.focusVisible,m),className:(0,r.A)(R.root,v),...y,ownerState:k,classes:R})})}))},37768:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var o=n(96540),r=n(34164),i=n(21362),s=n(82777),a=n(54587),l=n(26739),c=n(39241),u=n(1321),d=n(20439),h=n(38329),p=n(8861),f=n(39407),m=n(38490),g=n(74848);const b=(0,l.Ay)(h.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${(0,f.A)(n.color)}`],n.edge&&t[`edge${(0,f.A)(n.edge)}`],t[`size${(0,f.A)(n.size)}`]]}})((0,c.A)((({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]}))),(0,c.A)((({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter((0,u.A)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette).filter((0,u.A)()).map((([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.X4)((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}}))),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${m.A.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${m.A.loading}`]:{color:"transparent"}})))),v=(0,l.Ay)("span",{name:"MuiIconButton",slot:"LoadingIndicator"})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]}))),y=o.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiIconButton"}),{edge:o=!1,children:s,className:l,color:c="default",disabled:u=!1,disableFocusRipple:h=!1,size:y="medium",id:w,loading:C=null,loadingIndicator:x,...S}=n,A=(0,a.A)(w),E=x??(0,g.jsx)(p.A,{"aria-labelledby":A,color:"inherit",size:16}),k={...n,edge:o,color:c,disabled:u,disableFocusRipple:h,loading:C,loadingIndicator:E,size:y},R=(e=>{const{classes:t,disabled:n,color:o,edge:r,size:s,loading:a}=e,l={root:["root",a&&"loading",n&&"disabled","default"!==o&&`color${(0,f.A)(o)}`,r&&`edge${(0,f.A)(r)}`,`size${(0,f.A)(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return(0,i.A)(l,m.G,t)})(k);return(0,g.jsxs)(b,{id:C?A:w,className:(0,r.A)(R.root,l),centerRipple:!0,focusRipple:!h,disabled:u||C,ref:t,...S,ownerState:k,children:["boolean"==typeof C&&(0,g.jsx)("span",{className:R.loadingWrapper,style:{display:"contents"},children:(0,g.jsx)(v,{className:R.loadingIndicator,ownerState:k,children:C&&E})}),s]})}))},37786:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var o=n(96540),r=n(34164),i=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)})))),f=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,i.A)({root:["root"]},d,t)})(a);return(0,h.jsx)(p,{className:(0,r.A)(c.root,o),ref:t,ownerState:a,...s})}))},38221:(e,t,n)=>{var o=n(23805),r=n(10124),i=n(99374),s=Math.max,a=Math.min;e.exports=function(e,t,n){var l,c,u,d,h,p,f=0,m=!1,g=!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,f=t,d=e.apply(o,n)}function y(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-f>=u}function w(){var e=r();if(y(e))return C(e);h=setTimeout(w,function(e){var n=t-(e-p);return g?a(n,u-(e-f)):n}(e))}function C(e){return h=void 0,b&&l?v(e):(l=c=void 0,d)}function x(){var e=r(),n=y(e);if(l=arguments,c=this,p=e,n){if(void 0===h)return function(e){return f=e,h=setTimeout(w,t),m?v(e):d}(p);if(g)return clearTimeout(h),h=setTimeout(w,t),v(p)}return void 0===h&&(h=setTimeout(w,t)),d}return t=i(t)||0,o(n)&&(m=!!n.leading,u=(g="maxWait"in n)?s(i(n.maxWait)||0,t):u,b="trailing"in n?!!n.trailing:b),x.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=c=h=void 0},x.flush=function(){return void 0===h?d:C(r())},x}},38329:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var o=n(96540),r=n(34164),i=n(21362),s=n(49450),a=n(26739),l=n(20439),c=n(30301),u=n(54403),d=n(15870);class h{static create(){return new h}static use(){const e=(0,d.A)(h.create).current,[t,n]=o.useState(!1);return e.shouldMount=t,e.setShouldMount=n,o.useEffect(e.mountEffect,[t]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,o)=>{e=n,t=o}));return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then((()=>this.ref.current?.start(...e)))}stop(...e){this.mount().then((()=>this.ref.current?.stop(...e)))}pulsate(...e){this.mount().then((()=>this.ref.current?.pulsate(...e)))}}var p=n(98587),f=n(58168),m=n(9417),g=n(77387),b=n(17241);function v(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)})),n}function y(e,t,n){return null!=n[t]?n[t]:e.props[t]}function w(e,t,n){var r=v(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o,r=Object.create(null),i=[];for(var s in e)s in t?i.length&&(r[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(r[l])for(o=0;o<r[l].length;o++){var c=r[l][o];a[r[l][o]]=n(c)}a[l]=n(l)}for(o=0;o<i.length;o++)a[i[o]]=n(i[o]);return a}(t,r);return Object.keys(i).forEach((function(s){var a=i[s];if((0,o.isValidElement)(a)){var l=s in t,c=s in r,u=t[s],d=(0,o.isValidElement)(u)&&!u.props.in;!c||l&&!d?c||!l||d?c&&l&&(0,o.isValidElement)(u)&&(i[s]=(0,o.cloneElement)(a,{onExited:n.bind(null,a),in:u.props.in,exit:y(a,"exit",e),enter:y(a,"enter",e)})):i[s]=(0,o.cloneElement)(a,{in:!1}):i[s]=(0,o.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:y(a,"exit",e),enter:y(a,"enter",e)})}})),i}var C=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},x=function(e){function t(t,n){var o,r=(o=e.call(this,t,n)||this).handleExited.bind((0,m.A)(o));return o.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},o}(0,g.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,s=t.handleExited;return{children:t.firstRender?(n=e,r=s,v(n.children,(function(e){return(0,o.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:y(e,"appear",n),enter:y(e,"enter",n),exit:y(e,"exit",n)})}))):w(e,i,s),firstRender:!1}},n.handleExited=function(e,t){var n=v(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,f.A)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,p.A)(e,["component","childFactory"]),i=this.state.contextValue,s=C(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o.createElement(b.A.Provider,{value:i},s):o.createElement(b.A.Provider,{value:i},o.createElement(t,r,s))},t}(o.Component);x.propTypes={},x.defaultProps={component:"div",childFactory:function(e){return e}};const S=x;var A=n(32350),E=n(17437),k=n(74848);var R=n(96148);const M=(0,R.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),I=E.i7`
- 0% {
- transform: scale(0);
- opacity: 0.1;
- }
- 100% {
- transform: scale(1);
- opacity: 0.3;
- }
- `,P=E.i7`
- 0% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
- `,T=E.i7`
- 0% {
- transform: scale(1);
- }
- 50% {
- transform: scale(0.92);
- }
- 100% {
- transform: scale(1);
- }
- `,O=(0,a.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),$=(0,a.Ay)((function(e){const{className:t,classes:n,pulsate:i=!1,rippleX:s,rippleY:a,rippleSize:l,in:c,onExited:u,timeout:d}=e,[h,p]=o.useState(!1),f=(0,r.A)(t,n.ripple,n.rippleVisible,i&&n.ripplePulsate),m={width:l,height:l,top:-l/2+a,left:-l/2+s},g=(0,r.A)(n.child,h&&n.childLeaving,i&&n.childPulsate);return c||h||p(!0),o.useEffect((()=>{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}}),[u,c,d]),(0,k.jsx)("span",{className:f,style:m,children:(0,k.jsx)("span",{className:g})})}),{name:"MuiTouchRipple",slot:"Ripple"})`
- opacity: 0;
- position: absolute;
- &.${M.rippleVisible} {
- opacity: 0.3;
- transform: scale(1);
- animation-name: ${I};
- animation-duration: ${550}ms;
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
- }
- &.${M.ripplePulsate} {
- animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
- }
- & .${M.child} {
- opacity: 1;
- display: block;
- width: 100%;
- height: 100%;
- border-radius: 50%;
- background-color: currentColor;
- }
- & .${M.childLeaving} {
- opacity: 0;
- animation-name: ${P};
- animation-duration: ${550}ms;
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
- }
- & .${M.childPulsate} {
- position: absolute;
- /* @noflip */
- left: 0px;
- top: 0;
- animation-name: ${T};
- animation-duration: 2500ms;
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
- animation-iteration-count: infinite;
- animation-delay: 200ms;
- }
- `,D=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:a,...c}=n,[u,d]=o.useState([]),h=o.useRef(0),p=o.useRef(null);o.useEffect((()=>{p.current&&(p.current(),p.current=null)}),[u]);const f=o.useRef(!1),m=(0,A.A)(),g=o.useRef(null),b=o.useRef(null),v=o.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:o,rippleSize:i,cb:a}=e;d((e=>[...e,(0,k.jsx)($,{classes:{ripple:(0,r.A)(s.ripple,M.ripple),rippleVisible:(0,r.A)(s.rippleVisible,M.rippleVisible),ripplePulsate:(0,r.A)(s.ripplePulsate,M.ripplePulsate),child:(0,r.A)(s.child,M.child),childLeaving:(0,r.A)(s.childLeaving,M.childLeaving),childPulsate:(0,r.A)(s.childPulsate,M.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:o,rippleSize:i},h.current)])),h.current+=1,p.current=a}),[s]),y=o.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:r=i||t.pulsate,fakeElement:s=!1}=t;if("mousedown"===e?.type&&f.current)return void(f.current=!1);"touchstart"===e?.type&&(f.current=!0);const a=s?null:b.current,l=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(r||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(r)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===g.current&&(g.current=()=>{v({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},m.start(80,(()=>{g.current&&(g.current(),g.current=null)}))):v({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[i,v,m]),w=o.useCallback((()=>{y({},{pulsate:!0})}),[y]),C=o.useCallback(((e,t)=>{if(m.clear(),"touchend"===e?.type&&g.current)return g.current(),g.current=null,void m.start(0,(()=>{C(e,t)}));g.current=null,d((e=>e.length>0?e.slice(1):e)),p.current=t}),[m]);return o.useImperativeHandle(t,(()=>({pulsate:w,start:y,stop:C})),[w,y,C]),(0,k.jsx)(O,{className:(0,r.A)(M.root,s.root,a),ref:b,...c,children:(0,k.jsx)(S,{component:null,exit:!0,children:u})})}));var N=n(1908);function L(e){return(0,N.Ay)("MuiButtonBase",e)}const H=(0,R.A)("MuiButtonBase",["root","disabled","focusVisible"]),z=(0,a.Ay)("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${H.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});function F(e,t,n,o=!1){return(0,u.A)((r=>(n&&n(r),o||e[t](r),!0)))}const j=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiButtonBase"}),{action:a,centerRipple:d=!1,children:p,className:f,component:m="button",disabled:g=!1,disableRipple:b=!1,disableTouchRipple:v=!1,focusRipple:y=!1,focusVisibleClassName:w,LinkComponent:C="a",onBlur:x,onClick:S,onContextMenu:A,onDragLeave:E,onFocus:R,onFocusVisible:M,onKeyDown:I,onKeyUp:P,onMouseDown:T,onMouseLeave:O,onMouseUp:$,onTouchEnd:N,onTouchMove:H,onTouchStart:j,tabIndex:B=0,TouchRippleProps:_,touchRippleRef:V,type:W,...G}=n,K=o.useRef(null),U=h.use(),q=(0,c.A)(U.ref,V),[X,Y]=o.useState(!1);g&&X&&Y(!1),o.useImperativeHandle(a,(()=>({focusVisible:()=>{Y(!0),K.current.focus()}})),[]);const Q=U.shouldMount&&!b&&!g;o.useEffect((()=>{X&&y&&!b&&U.pulsate()}),[b,y,X,U]);const J=F(U,"start",T,v),Z=F(U,"stop",A,v),ee=F(U,"stop",E,v),te=F(U,"stop",$,v),ne=F(U,"stop",(e=>{X&&e.preventDefault(),O&&O(e)}),v),oe=F(U,"start",j,v),re=F(U,"stop",N,v),ie=F(U,"stop",H,v),se=F(U,"stop",(e=>{(0,s.A)(e.target)||Y(!1),x&&x(e)}),!1),ae=(0,u.A)((e=>{K.current||(K.current=e.currentTarget),(0,s.A)(e.target)&&(Y(!0),M&&M(e)),R&&R(e)})),le=()=>{const e=K.current;return m&&"button"!==m&&!("A"===e.tagName&&e.href)},ce=(0,u.A)((e=>{y&&!e.repeat&&X&&" "===e.key&&U.stop(e,(()=>{U.start(e)})),e.target===e.currentTarget&&le()&&" "===e.key&&e.preventDefault(),I&&I(e),e.target===e.currentTarget&&le()&&"Enter"===e.key&&!g&&(e.preventDefault(),S&&S(e))})),ue=(0,u.A)((e=>{y&&" "===e.key&&X&&!e.defaultPrevented&&U.stop(e,(()=>{U.pulsate(e)})),P&&P(e),S&&e.target===e.currentTarget&&le()&&" "===e.key&&!e.defaultPrevented&&S(e)}));let de=m;"button"===de&&(G.href||G.to)&&(de=C);const he={};"button"===de?(he.type=void 0===W?"button":W,he.disabled=g):(G.href||G.to||(he.role="button"),g&&(he["aria-disabled"]=g));const pe=(0,c.A)(t,K),fe={...n,centerRipple:d,component:m,disabled:g,disableRipple:b,disableTouchRipple:v,focusRipple:y,tabIndex:B,focusVisible:X},me=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:o,classes:r}=e,s={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,i.A)(s,L,r);return n&&o&&(a.root+=` ${o}`),a})(fe);return(0,k.jsxs)(z,{as:de,className:(0,r.A)(me.root,f),ownerState:fe,onBlur:se,onClick:S,onContextMenu:Z,onFocus:ae,onKeyDown:ce,onKeyUp:ue,onMouseDown:J,onMouseLeave:ne,onMouseUp:te,onDragLeave:ee,onTouchEnd:re,onTouchMove:ie,onTouchStart:oe,ref:pe,tabIndex:g?-1:B,type:W,...he,...G,children:[p,Q?(0,k.jsx)(D,{ref:q,center:d,..._}):null]})}))},38490:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,G:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiIconButton",e)}const s=(0,o.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"])},38572:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var o=n(96540),r=n(32350),i=n(17726),s=n(37353),a=n(53356),l=n(24337),c=n(30301),u=n(74848);function d(e){return`scale(${e}, ${e**2})`}const h={entering:{opacity:1,transform:d(1)},entered:{opacity:1,transform:"none"}},p="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),f=o.forwardRef((function(e,t){const{addEndListener:n,appear:f=!0,children:m,easing:g,in:b,onEnter:v,onEntered:y,onEntering:w,onExit:C,onExited:x,onExiting:S,style:A,timeout:E="auto",TransitionComponent:k=s.Ay,...R}=e,M=(0,r.A)(),I=o.useRef(),P=(0,a.A)(),T=o.useRef(null),O=(0,c.A)(T,(0,i.A)(m),t),$=e=>t=>{if(e){const n=T.current;void 0===t?e(n):e(n,t)}},D=$(w),N=$(((e,t)=>{(0,l.q)(e);const{duration:n,delay:o,easing:r}=(0,l.c)({style:A,timeout:E,easing:g},{mode:"enter"});let i;"auto"===E?(i=P.transitions.getAutoHeightDuration(e.clientHeight),I.current=i):i=n,e.style.transition=[P.transitions.create("opacity",{duration:i,delay:o}),P.transitions.create("transform",{duration:p?i:.666*i,delay:o,easing:r})].join(","),v&&v(e,t)})),L=$(y),H=$(S),z=$((e=>{const{duration:t,delay:n,easing:o}=(0,l.c)({style:A,timeout:E,easing:g},{mode:"exit"});let r;"auto"===E?(r=P.transitions.getAutoHeightDuration(e.clientHeight),I.current=r):r=t,e.style.transition=[P.transitions.create("opacity",{duration:r,delay:n}),P.transitions.create("transform",{duration:p?r:.666*r,delay:p?n:n||.333*r,easing:o})].join(","),e.style.opacity=0,e.style.transform=d(.75),C&&C(e)})),F=$(x);return(0,u.jsx)(k,{appear:f,in:b,nodeRef:T,onEnter:N,onEntered:L,onEntering:D,onExit:z,onExited:F,onExiting:H,addEndListener:e=>{"auto"===E&&M.start(I.current||0,e),n&&n(T.current,e)},timeout:"auto"===E?null:E,...R,children:(e,{ownerState:t,...n})=>o.cloneElement(m,{style:{opacity:0,transform:d(.75),visibility:"exited"!==e||b?void 0:"hidden",...h[e],...A,...m.props.style},ref:O,...n})})}));f&&(f.muiSupportAuto=!0);const m=f},39241:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(18139);const r={theme:void 0},i=function(e){let t,n;return function(i){let s=t;return void 0!==s&&i.theme===n||(r.theme=i.theme,s=(0,o.A)(e(r)),t=s,n=i.theme),s}}},39319:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>v,Is:()=>f});var o=n(96540),r=n(77132);const i="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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}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 r=Object.assign(Object.assign({},n),o);if(!1===r.motion){const e="0s";r.motionDurationFast=e,r.motionDurationMid=e,r.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},r),{colorFillContent:r.colorFillSecondary,colorFillContentHover:r.colorFill,colorFillAlter:r.colorFillQuaternary,colorBgContainerDisabled:r.colorFillTertiary,colorBorderBg:r.colorBgContainer,colorSplit:(0,u.A)(r.colorBorderSecondary,r.colorBgContainer),colorTextPlaceholder:r.colorTextQuaternary,colorTextDisabled:r.colorTextQuaternary,colorTextHeading:r.colorText,colorTextLabel:r.colorTextSecondary,colorTextDescription:r.colorTextTertiary,colorTextLightSolid:r.colorWhite,colorHighlight:r.colorError,colorBgTextHover:r.colorFillSecondary,colorBgTextActive:r.colorFill,colorIcon:r.colorTextTertiary,colorIconHover:r.colorText,colorErrorOutline:(0,u.A)(r.colorErrorBg,r.colorBgContainer),colorWarningOutline:(0,u.A)(r.colorWarningBg,r.colorBgContainer),fontSizeIcon:r.fontSizeSM,lineWidthFocus:3*r.lineWidth,lineWidth:r.lineWidth,controlOutlineWidth:2*r.lineWidth,controlInteractiveSize:r.controlHeight/2,controlItemBgHover:r.colorFillTertiary,controlItemBgActive:r.colorPrimaryBg,controlItemBgActiveHover:r.colorPrimaryBgHover,controlItemBgActiveDisabled:r.colorFill,controlTmpOutline:r.colorFillQuaternary,controlOutline:(0,u.A)(r.colorPrimaryBg,r.colorBgContainer),lineType:r.lineType,borderRadius:r.borderRadius,borderRadiusXS:r.borderRadiusXS,borderRadiusSM:r.borderRadiusSM,borderRadiusLG:r.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:r.sizeXXS,paddingXS:r.sizeXS,paddingSM:r.sizeSM,padding:r.size,paddingMD:r.sizeMD,paddingLG:r.sizeLG,paddingXL:r.sizeXL,paddingContentHorizontalLG:r.sizeLG,paddingContentVerticalLG:r.sizeMS,paddingContentHorizontal:r.sizeMS,paddingContentVertical:r.sizeSM,paddingContentHorizontalSM:r.size,paddingContentVerticalSM:r.sizeXS,marginXXS:r.sizeXXS,marginXS:r.sizeXS,marginSM:r.sizeSM,margin:r.size,marginMD:r.sizeMD,marginLG:r.sizeLG,marginXL:r.sizeXL,marginXXL:r.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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const f={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},m={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},g={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:r}=t,i=p(t,["override"]);let s=Object.assign(Object.assign({},o),{override:r});return s=h(s),i&&Object.entries(i).forEach((([e,t])=>{const{theme:n}=t,o=p(t,["theme"]);let r=o;n&&(r=b(Object.assign(Object.assign({},s),o),{override:o},n)),s[e]=r})),s};function v(){const{token:e,hashed:t,theme:n,override:c,cssVar:u}=o.useContext(s.vG),d=`${i}-${t||""}`,p=n||a.A,[v,y,w]=(0,r.hV)(p,[l.A,e],{salt:d,override:c,getComputedToken:b,formatToken:h,cssVar:u&&{prefix:u.prefix,key:u.key,unitless:f,ignore:m,preserve:g}});return[p,w,t?y:"",v,u]}},39407:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(97102).A},39612:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a,BO:()=>s,Yn:()=>i});var o=n(97102),r=n(7196);function i(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function s(e,t,n,o=n){let r;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:i(e,n)||o,t&&(r=t(r,o,e)),r}const a=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:a,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,a)||{};return(0,r.NI)(e,c,(e=>{let r=s(u,l,e);return e===r&&"string"==typeof e&&(r=s(u,l,`${t}${"default"===e?"":(0,o.A)(e)}`,e)),!1===n?r:{[n]:r}}))};return c.propTypes={},c.filterProps=[t],c}},40346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},40583:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(96540).createContext({})},41519:(e,t,n)=>{"use strict";n.d(t,{j:()=>c});var o=n(58168),r=n(3576),i=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})})))},i=(n,r)=>{if(!r)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!==r?(0,o.A)({},e,{items:(0,o.A)({},e.items,{itemMetaLookup:(0,o.A)({},e.items.itemMetaLookup,{[n]:(0,o.A)({},t,{label:r})})})}):e})),t.onItemLabelChange&&t.onItemLabelChange(n,r)};return(0,r.A)((()=>{e.update((e=>(0,o.A)({},e,{label:(0,o.A)({},e.label,{isItemEditable:t.isItemEditable})})))}),[e,t.isItemEditable]),{instance:{setEditedItem:n,updateItemLabel:i},publicAPI:{setEditedItem:n,updateItemLabel:i}}};c.itemPlugin=({props:e})=>{const{store:t}=(0,s.i)(),{label:n,itemId:o}=e,[r,c]=i.useState(n),u=(0,a.d)(t,l.pF,o),d=(0,a.d)(t,l.XG,o);return i.useEffect((()=>{d||c(n)}),[d,n]),{propsEnhancers:{label:()=>({editable:u}),labelInput:({externalEventHandlers:e,interactions:t})=>u?{value:r??"","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}},41538:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(88612).A},41558:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var o=n(96540),r=n(34164),i=n(21362),s=n(75337),a=n(94034),l=n(26739),c=n(39241),u=n(20439),d=n(30016),h=n(10644),p=n(24902),f=n(78854);function m(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}var g=n(52658),b=n(88612),v=n(244);function y(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function w(e){return parseInt((0,b.A)(e).getComputedStyle(e).paddingRight,10)||0}function C(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&y(e,r)}))}function x(e,t){let n=-1;return e.some(((e,o)=>!!t(e)&&(n=o,!0))),n}const S=()=>{},A=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&y(e.modalRef,!1);const o=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);C(t,e.mount,e.modalRef,o,!0);const r=x(this.containers,(e=>e.container===t));return-1!==r?(this.containers[r].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:o}),n)}mount(e,t){const n=x(this.containers,(t=>t.modals.includes(e))),o=this.containers[n];o.restore||(o.restore=function(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,h.A)(e);return t.body===e?(0,b.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){const e=(0,v.A)((0,b.A)(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${w(o)+e}px`;const t=(0,h.A)(o).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${w(t)+e}px`}))}let e;if(o.parentNode instanceof DocumentFragment)e=(0,h.A)(o).body;else{const t=o.parentElement,n=(0,b.A)(o);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:o}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}(o,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const o=x(this.containers,(t=>t.modals.includes(e))),r=this.containers[o];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(n,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&y(e.modalRef,t),C(r.container,e.mount,e.modalRef,r.hiddenSiblings,!1),this.containers.splice(o,1);else{const e=r.modals[r.modals.length-1];e.modalRef&&y(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};var E=n(96148),k=n(1908);function R(e){return(0,k.Ay)("MuiModal",e)}(0,E.A)("MuiModal",["root","hidden","backdrop"]);var M=n(85078),I=n(74848);const P=(0,l.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((0,c.A)((({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]})))),T=(0,l.Ay)(d.A,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),O=o.forwardRef((function(e,t){const n=(0,u.b)({name:"MuiModal",props:e}),{BackdropComponent:l=T,BackdropProps:c,classes:d,className:b,closeAfterTransition:v=!1,children:w,container:C,component:x,components:E={},componentsProps:k={},disableAutoFocus:O=!1,disableEnforceFocus:$=!1,disableEscapeKeyDown:D=!1,disablePortal:N=!1,disableRestoreFocus:L=!1,disableScrollLock:H=!1,hideBackdrop:z=!1,keepMounted:F=!1,onClose:j,onTransitionEnter:B,onTransitionExited:_,open:V,slotProps:W={},slots:G={},theme:K,...U}=n,q={...n,closeAfterTransition:v,disableAutoFocus:O,disableEnforceFocus:$,disableEscapeKeyDown:D,disablePortal:N,disableRestoreFocus:L,disableScrollLock:H,hideBackdrop:z,keepMounted:F},{getRootProps:X,getBackdropProps:Y,getTransitionProps:Q,portalRef:J,isTopModal:Z,exited:ee,hasTransition:te}=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:c,open:u,rootRef:d}=e,b=o.useRef({}),v=o.useRef(null),w=o.useRef(null),C=(0,p.A)(w,d),[x,E]=o.useState(!u),k=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let R=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(R=!1);const M=()=>(b.current.modalRef=w.current,b.current.mount=v.current,b.current),I=()=>{A.mount(M(),{disableScrollLock:r}),w.current&&(w.current.scrollTop=0)},P=(0,f.A)((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,h.A)(v.current).body;A.add(M(),e),w.current&&I()})),T=()=>A.isTopModal(M()),O=(0,f.A)((e=>{v.current=e,e&&(u&&T()?I():w.current&&y(w.current,R))})),$=o.useCallback((()=>{A.remove(M(),R)}),[R]);o.useEffect((()=>()=>{$()}),[$]),o.useEffect((()=>{u?P():k&&i||$()}),[u,$,k,i,P]);const D=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&T()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},N=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const n=(0,g.A)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const o={...n,...t};return{role:"presentation",...o,onKeyDown:D(o),ref:C}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:N(t),open:u}},getTransitionProps:()=>({onEnter:m((()=>{E(!1),s&&s()}),l?.props.onEnter??S),onExited:m((()=>{E(!0),a&&a(),i&&$()}),l?.props.onExited??S)}),rootRef:C,portalRef:O,isTopModal:T,exited:x,hasTransition:k}}({...q,rootRef:t}),ne={...q,exited:ee},oe=(e=>{const{open:t,exited:n,classes:o}=e,r={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,i.A)(r,R,o)})(ne),re={};if(void 0===w.props.tabIndex&&(re.tabIndex="-1"),te){const{onEnter:e,onExited:t}=Q();re.onEnter=e,re.onExited=t}const ie={slots:{root:E.Root,backdrop:E.Backdrop,...G},slotProps:{...k,...W}},[se,ae]=(0,M.A)("root",{ref:t,elementType:P,externalForwardedProps:{...ie,...U,component:x},getSlotProps:X,ownerState:ne,className:(0,r.A)(b,oe?.root,!ne.open&&ne.exited&&oe?.hidden)}),[le,ce]=(0,M.A)("backdrop",{ref:c?.ref,elementType:l,externalForwardedProps:ie,shouldForwardComponentProp:!0,additionalProps:c,getSlotProps:e=>Y({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:(0,r.A)(c?.className,oe?.backdrop),ownerState:ne});return F||V||te&&!ee?(0,I.jsx)(a.A,{ref:J,container:C,disablePortal:N,children:(0,I.jsxs)(se,{...ae,children:[!z&&l?(0,I.jsx)(le,{...ce}):null,(0,I.jsx)(s.A,{disableEnforceFocus:$,disableAutoFocus:O,disableRestoreFocus:L,isEnabled:Z,open:V,children:o.cloneElement(w,re)})]})}):null}))},41702:(e,t,n)=>{"use strict";var o=n(24994).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(83009));t.default=r.default},41811:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(96540);var o=n(9792),r=n(74848);const i=(0,o.A)((0,r.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},42030:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var o=n(96540),r=n(34164),i=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),f=n(30301),m=n(96148),g=n(1908);function b(e){return(0,g.Ay)("MuiCollapse",e)}(0,m.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var v=n(74848);const y=(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"}}]})))),w=(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:m,collapsedSize:g="0px",component:x,easing:S,in:A,onEnter:E,onEntered:k,onEntering:R,onExit:M,onExited:I,onExiting:P,orientation:T="vertical",style:O,timeout:$=h.p0.standard,TransitionComponent:D=i.Ay,...N}=n,L={...n,orientation:T,collapsedSize:g},H=(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),z=(0,c.A)(),F=(0,s.A)(),j=o.useRef(null),B=o.useRef(),_="number"==typeof g?`${g}px`:g,V="horizontal"===T,W=V?"width":"height",G=o.useRef(null),K=(0,f.A)(t,G),U=e=>t=>{if(e){const n=G.current;void 0===t?e(n):e(n,t)}},q=()=>j.current?j.current[V?"clientWidth":"clientHeight"]:0,X=U(((e,t)=>{j.current&&V&&(j.current.style.position="absolute"),e.style[W]=_,E&&E(e,t)})),Y=U(((e,t)=>{const n=q();j.current&&V&&(j.current.style.position="");const{duration:o,easing:r}=(0,p.c)({style:O,timeout:$,easing:S},{mode:"enter"});if("auto"===$){const t=z.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,B.current=t}else e.style.transitionDuration="string"==typeof o?o:`${o}ms`;e.style[W]=`${n}px`,e.style.transitionTimingFunction=r,R&&R(e,t)})),Q=U(((e,t)=>{e.style[W]="auto",k&&k(e,t)})),J=U((e=>{e.style[W]=`${q()}px`,M&&M(e)})),Z=U(I),ee=U((e=>{const t=q(),{duration:n,easing:o}=(0,p.c)({style:O,timeout:$,easing:S},{mode:"exit"});if("auto"===$){const n=z.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,B.current=n}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[W]=_,e.style.transitionTimingFunction=o,P&&P(e)}));return(0,v.jsx)(D,{in:A,onEnter:X,onEntered:Q,onEntering:Y,onExit:J,onExited:Z,onExiting:ee,addEndListener:e=>{"auto"===$&&F.start(B.current||0,e),l&&l(G.current,e)},nodeRef:G,timeout:"auto"===$?null:$,...N,children:(e,{ownerState:t,...n})=>(0,v.jsx)(y,{as:x,className:(0,r.A)(H.root,m,{entered:H.entered,exited:!A&&"0px"===_&&H.hidden}[e]),style:{[V?"minWidth":"minHeight"]:_,...O},ref:K,ownerState:{...L,state:e},...n,children:(0,v.jsx)(w,{ownerState:{...L,state:e},className:H.wrapper,ref:j,children:(0,v.jsx)(C,{ownerState:{...L,state:e},className:H.wrapperInner,children:u})})})})}));x&&(x.muiSupportAuto=!0);const S=x},42049:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});const o=n(96540).createContext((()=>-1))},42722:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var o=n(96540),r=n(21362),i=n(39407),s=n(98855),a=n(26739),l=n(1152),c=n(76761),u=n(38329),d=n(96148),h=n(1908);function p(e){return(0,h.Ay)("PrivateSwitchBase",e)}(0,d.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var f=n(85078),m=n(74848);const g=(0,a.Ay)(u.A)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),b=(0,a.Ay)("input",{shouldForwardProp:s.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),v=o.forwardRef((function(e,t){const{autoFocus:n,checked:o,checkedIcon:s,defaultChecked:a,disabled:u,disableFocusRipple:d=!1,edge:h=!1,icon:v,id:y,inputProps:w,inputRef:C,name:x,onBlur:S,onChange:A,onFocus:E,readOnly:k,required:R=!1,tabIndex:M,type:I,value:P,slots:T={},slotProps:O={},...$}=e,[D,N]=(0,l.A)({controlled:o,default:Boolean(a),name:"SwitchBase",state:"checked"}),L=(0,c.A)();let H=u;L&&void 0===H&&(H=L.disabled);const z="checkbox"===I||"radio"===I,F={...e,checked:D,disabled:H,disableFocusRipple:d,edge:h},j=(e=>{const{classes:t,checked:n,disabled:o,edge:s}=e,a={root:["root",n&&"checked",o&&"disabled",s&&`edge${(0,i.A)(s)}`],input:["input"]};return(0,r.A)(a,p,t)})(F),B={slots:T,slotProps:{input:w,...O}},[_,V]=(0,f.A)("root",{ref:t,elementType:g,className:j.root,shouldForwardComponentProp:!0,externalForwardedProps:{...B,component:"span",...$},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{E&&E(e),L&&L.onFocus&&L.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{S&&S(e),L&&L.onBlur&&L.onBlur(e)})(t)}}),ownerState:F,additionalProps:{centerRipple:!0,focusRipple:!d,disabled:H,role:void 0,tabIndex:null}}),[W,G]=(0,f.A)("input",{ref:C,elementType:b,className:j.input,externalForwardedProps:B,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;N(t),A&&A(e,t)})(t)}}),ownerState:F,additionalProps:{autoFocus:n,checked:o,defaultChecked:a,disabled:H,id:z?y:void 0,name:x,readOnly:k,required:R,tabIndex:M,type:I,..."checkbox"===I&&void 0===P?{}:{value:P}}});return(0,m.jsxs)(_,{...V,children:[(0,m.jsx)(W,{...G}),D?s:v]})}))},42812:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,f:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiListItemIcon",e)}const s=(0,o.A)("MuiListItemIcon",["root","alignItemsFlexStart"])},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})},43174:(e,t,n)=>{"use strict";n.d(t,{J:()=>g});var o={animationIterationCount:1,aspectRatio: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,scale: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},r=n(36289),i=!1,s=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},u=(0,r.A)((function(e){return l(e)?e:e.replace(s,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===o[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"},h="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,n){if(null==n)return"";var o=n;if(void 0!==o.__emotion_styles)return o;switch(typeof n){case"boolean":return"";case"object":var r=n;if(1===r.anim)return f={name:r.name,styles:r.styles,next:f},r.name;var s=n;if(void 0!==s.styles){var a=s.next;if(void 0!==a)for(;void 0!==a;)f={name:a.name,styles:a.styles,next:f},a=a.next;return s.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=p(e,t,n[r])+";";else for(var s in n){var a=n[s];if("object"!=typeof a){var l=a;null!=t&&void 0!==t[l]?o+=s+"{"+t[l]+"}":c(l)&&(o+=u(s)+":"+d(s,l)+";")}else{if("NO_COMPONENT_SELECTOR"===s&&i)throw new Error(h);if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var f=p(e,t,a);switch(s){case"animation":case"animationName":o+=u(s)+":"+f+";";break;default:o+=s+"{"+f+"}"}}else for(var m=0;m<a.length;m++)c(a[m])&&(o+=u(s)+":"+d(s,a[m])+";")}}return o}(e,t,n);case"function":if(void 0!==e){var l=f,m=n(e);return f=l,p(e,t,m)}}var g=n;if(null==t)return g;var b=t[g];return void 0!==b?b:g}var f,m=/label:\s*([^\s;{]+)\s*(;|$)/g;function g(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";f=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=p(n,t,i)):r+=i[0];for(var s=1;s<e.length;s++)r+=p(n,t,e[s]),o&&(r+=i[s]);m.lastIndex=0;for(var a,l="";null!==(a=m.exec(r));)l+="-"+a[1];var c=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=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(r){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)}(r)+l;return{name:c,styles:r,next:f}}},43203:(e,t,n)=>{"use strict";n.d(t,{f:()=>r,q:()=>i});var o=n(96540);const r=o.createContext(void 0);function i(){const e=o.useContext(r);if(void 0===e)throw new Error("MUI X: Missing context. Quick Filter subcomponents must be placed within a <QuickFilter /> component.");return e}},43210:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(68210);const i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,s){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=i.has(t);if((0,r.Ay)(!l,"Warning: There may be circular references"),l)return!1;if(t===s)return!0;if(n&&a>1)return!1;i.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)}},43547:(e,t,n)=>{"use strict";n.d(t,{z:()=>pf});var o=n(58168),r=n(96540),i=n(5556),s=n(51280),a=n(98587),l=n(34164),c=n(24902),u=n(97102),d=n(21362),h=n(87960);function p(e){return r.memo(e,h.v)}var f=n(26739),m=n(85486),g=n(52504),b=n(74435);const v=r.createContext(void 0);function y(){const e=r.useContext(v);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}const w={width:3,rx:1.5,x:10.5},C=e=>e.current.state.dimensions.hasScrollX&&(!e.current.state.dimensions.hasScrollY||0===e.current.state.dimensions.scrollbarSize),x=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${m.x.autoHeight}`]:t.autoHeight},{[`&.${m.x.autosizing}`]:t.autosizing},{[`&.${m.x["root--densityStandard"]}`]:t["root--densityStandard"]},{[`&.${m.x["root--densityComfortable"]}`]:t["root--densityComfortable"]},{[`&.${m.x["root--densityCompact"]}`]:t["root--densityCompact"]},{[`&.${m.x["root--disableUserSelection"]}`]:t["root--disableUserSelection"]},{[`&.${m.x["root--noToolbar"]}`]:t["root--noToolbar"]},{[`&.${m.x.withVerticalBorder}`]:t.withVerticalBorder},{[`& .${m.x.actionsCell}`]:t.actionsCell},{[`& .${m.x.booleanCell}`]:t.booleanCell},{[`& .${m.x.cell}`]:t.cell},{[`& .${m.x["cell--editable"]}`]:t["cell--editable"]},{[`& .${m.x["cell--editing"]}`]:t["cell--editing"]},{[`& .${m.x["cell--flex"]}`]:t["cell--flex"]},{[`& .${m.x["cell--pinnedLeft"]}`]:t["cell--pinnedLeft"]},{[`& .${m.x["cell--pinnedRight"]}`]:t["cell--pinnedRight"]},{[`& .${m.x["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${m.x["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${m.x["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${m.x["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${m.x["cell--selectionMode"]}`]:t["cell--selectionMode"]},{[`& .${m.x["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${m.x["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${m.x["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${m.x["cell--withLeftBorder"]}`]:t["cell--withLeftBorder"]},{[`& .${m.x["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${m.x.cellCheckbox}`]:t.cellCheckbox},{[`& .${m.x.cellEmpty}`]:t.cellEmpty},{[`& .${m.x.cellOffsetLeft}`]:t.cellOffsetLeft},{[`& .${m.x.cellSkeleton}`]:t.cellSkeleton},{[`& .${m.x.checkboxInput}`]:t.checkboxInput},{[`& .${m.x.columnHeader}`]:t.columnHeader},{[`& .${m.x["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${m.x["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${m.x["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${m.x["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${m.x["columnHeader--emptyGroup"]}`]:t["columnHeader--emptyGroup"]},{[`& .${m.x["columnHeader--filledGroup"]}`]:t["columnHeader--filledGroup"]},{[`& .${m.x["columnHeader--filtered"]}`]:t["columnHeader--filtered"]},{[`& .${m.x["columnHeader--last"]}`]:t["columnHeader--last"]},{[`& .${m.x["columnHeader--lastUnpinned"]}`]:t["columnHeader--lastUnpinned"]},{[`& .${m.x["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${m.x["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${m.x["columnHeader--pinnedLeft"]}`]:t["columnHeader--pinnedLeft"]},{[`& .${m.x["columnHeader--pinnedRight"]}`]:t["columnHeader--pinnedRight"]},{[`& .${m.x["columnHeader--siblingFocused"]}`]:t["columnHeader--siblingFocused"]},{[`& .${m.x["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${m.x["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${m.x["columnHeader--withLeftBorder"]}`]:t["columnHeader--withLeftBorder"]},{[`& .${m.x["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${m.x.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${m.x.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${m.x.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${m.x.columnHeaderTitleContainerContent}`]:t.columnHeaderTitleContainerContent},{[`& .${m.x.columnSeparator}`]:t.columnSeparator},{[`& .${m.x["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${m.x["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${m.x["columnSeparator--sideLeft"]}`]:t["columnSeparator--sideLeft"]},{[`& .${m.x["columnSeparator--sideRight"]}`]:t["columnSeparator--sideRight"]},{[`& .${m.x["container--bottom"]}`]:t["container--bottom"]},{[`& .${m.x["container--top"]}`]:t["container--top"]},{[`& .${m.x.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${m.x["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},{[`& .${m.x.editBooleanCell}`]:t.editBooleanCell},{[`& .${m.x.filterIcon}`]:t.filterIcon},{[`& .${m.x["filler--borderBottom"]}`]:t["filler--borderBottom"]},{[`& .${m.x["filler--pinnedLeft"]}`]:t["filler--pinnedLeft"]},{[`& .${m.x["filler--pinnedRight"]}`]:t["filler--pinnedRight"]},{[`& .${m.x.groupingCriteriaCell}`]:t.groupingCriteriaCell},{[`& .${m.x.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${m.x.groupingCriteriaCellToggle}`]:t.groupingCriteriaCellToggle},{[`& .${m.x.headerFilterRow}`]:t.headerFilterRow},{[`& .${m.x.iconSeparator}`]:t.iconSeparator},{[`& .${m.x.menuIcon}`]:t.menuIcon},{[`& .${m.x.menuIconButton}`]:t.menuIconButton},{[`& .${m.x.menuList}`]:t.menuList},{[`& .${m.x.menuOpen}`]:t.menuOpen},{[`& .${m.x.overlayWrapperInner}`]:t.overlayWrapperInner},{[`& .${m.x.pinnedRows}`]:t.pinnedRows},{[`& .${m.x["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},{[`& .${m.x["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`& .${m.x.row}`]:t.row},{[`& .${m.x["row--borderBottom"]}`]:t["row--borderBottom"]},{[`& .${m.x["row--detailPanelExpanded"]}`]:t["row--detailPanelExpanded"]},{[`& .${m.x["row--dragging"]}`]:t["row--dragging"]},{[`& .${m.x["row--dynamicHeight"]}`]:t["row--dynamicHeight"]},{[`& .${m.x["row--editable"]}`]:t["row--editable"]},{[`& .${m.x["row--editing"]}`]:t["row--editing"]},{[`& .${m.x["row--firstVisible"]}`]:t["row--firstVisible"]},{[`& .${m.x["row--lastVisible"]}`]:t["row--lastVisible"]},{[`& .${m.x.rowReorderCell}`]:t.rowReorderCell},{[`& .${m.x["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${m.x.rowReorderCellContainer}`]:t.rowReorderCellContainer},{[`& .${m.x.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${m.x.rowSkeleton}`]:t.rowSkeleton},{[`& .${m.x.scrollbar}`]:t.scrollbar},{[`& .${m.x["scrollbar--horizontal"]}`]:t["scrollbar--horizontal"]},{[`& .${m.x["scrollbar--vertical"]}`]:t["scrollbar--vertical"]},{[`& .${m.x.scrollbarFiller}`]:t.scrollbarFiller},{[`& .${m.x["scrollbarFiller--borderBottom"]}`]:t["scrollbarFiller--borderBottom"]},{[`& .${m.x["scrollbarFiller--borderTop"]}`]:t["scrollbarFiller--borderTop"]},{[`& .${m.x["scrollbarFiller--header"]}`]:t["scrollbarFiller--header"]},{[`& .${m.x["scrollbarFiller--pinnedRight"]}`]:t["scrollbarFiller--pinnedRight"]},{[`& .${m.x.sortIcon}`]:t.sortIcon},{[`& .${m.x.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${m.x.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${m.x.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${m.x.withBorderColor}`]:t.withBorderColor}]})((()=>{const e=y(),t=(0,b.Nc)(e,C),n=g.f.colors.background.base,o=g.f.header.background.base,r=g.f.cell.background.pinned,i=S(g.f.colors.interactive.hover,1),s=g.f.colors.interactive.hoverOpacity,a=g.f.colors.interactive.selected,l=g.f.colors.interactive.selectedOpacity,c=a,u=`calc(${l} + ${s})`,d=A(n,i,s),h=A(n,a,l),p=A(n,c,u),f=A(r,i,s),v=A(r,a,l),x=A(r,c,u),E=e=>({[`& .${m.x["cell--pinnedLeft"]}, & .${m.x["cell--pinnedRight"]}`]:{backgroundColor:e,"&.Mui-selected":{backgroundColor:A(e,h,l),"&:hover":{backgroundColor:A(e,p,u)}}}}),k=E(f),R=E(v),M=E(x),I={backgroundColor:h,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:h}}};return{"--unstable_DataGrid-radius":g.f.radius.base,"--unstable_DataGrid-headWeight":g.f.typography.fontWeight.medium,"--DataGrid-rowBorderColor":g.f.colors.border.base,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:g.f.colors.border.base,borderRadius:"var(--unstable_DataGrid-radius)",backgroundColor:g.f.colors.background.base,color:g.f.colors.foreground.base,font:g.f.typography.font.body,outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",transform:"translate(0, 0)",[`.${m.x.main} > *:first-child/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${m.x.autoHeight}`]:{height:"auto"},[`&.${m.x.autosizing}`]:{[`& .${m.x.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${m.x.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${m.x.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${m.x.groupingCriteriaCell}`]:{width:"unset"},[`& .${m.x.treeDataGroupingCell}`]:{width:"unset"}},[`&.${m.x.withSidePanel}`]:{flexDirection:"row"},[`& .${m.x.mainContent}`]:{display:"flex",flexDirection:"column",overflow:"hidden",flex:1},[`& .${m.x.columnHeader}, & .${m.x.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${m.x.columnHeader}:focus-within, & .${m.x.cell}:focus-within`]:{outline:`solid ${S(g.f.colors.interactive.focus,.5)} 1px`,outlineOffset:-1},[`& .${m.x.columnHeader}:focus, & .${m.x.cell}:focus`]:{outline:`solid ${g.f.colors.interactive.focus} 1px`,outlineOffset:-1},[`& .${m.x.columnHeader}:focus,\n & .${m.x["columnHeader--withLeftBorder"]},\n & .${m.x["columnHeader--withRightBorder"]},\n & .${m.x["columnHeader--siblingFocused"]},\n & .${m.x["virtualScroller--hasScrollX"]} .${m.x["columnHeader--lastUnpinned"]},\n & .${m.x["virtualScroller--hasScrollX"]} .${m.x["columnHeader--last"]}\n `]:{[`& .${m.x.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${m.x["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${m.x["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${m.x["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${m.x["root--noToolbar"]} [aria-rowindex="1"] .${m.x["columnHeader--last"]}`]:{borderTopRightRadius:t?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${m.x.columnHeaderCheckbox}, & .${m.x.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${m.x.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center",backgroundColor:o},[`& .${m.x["columnHeader--filter"]}`]:{paddingTop:8,paddingBottom:8,paddingRight:5,minHeight:"min-content",overflow:"hidden"},[`& .${m.x["virtualScroller--hasScrollX"]} .${m.x["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${m.x["pivotPanelField--sorted"]} .${m.x.iconButtonContainer},\n & .${m.x["columnHeader--sorted"]} .${m.x.iconButtonContainer},\n & .${m.x["columnHeader--filtered"]} .${m.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${m.x.pivotPanelField}:not(.${m.x["pivotPanelField--sorted"]}) .${m.x.sortButton},\n & .${m.x.columnHeader}:not(.${m.x["columnHeader--sorted"]}) .${m.x.sortButton}`]:{opacity:0,transition:g.f.transition(["opacity"],{duration:g.f.transitions.duration.short})},[`& .${m.x.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:g.f.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${m.x.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${m.x["columnHeader--filledGroup"]} .${m.x.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${m.x.sortIcon}, & .${m.x.filterIcon}`]:{fontSize:"inherit"},[`& .${m.x["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${m.x["columnHeader--alignCenter"]} .${m.x.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${m.x["columnHeader--alignRight"]} .${m.x.columnHeaderDraggableContainer}, & .${m.x["columnHeader--alignRight"]} .${m.x.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${m.x["columnHeader--alignCenter"]} .${m.x.menuIcon}`]:{marginLeft:"auto"},[`& .${m.x["columnHeader--alignRight"]} .${m.x.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${m.x["columnHeader--moving"]}`]:{backgroundColor:d},[`& .${m.x["columnHeader--pinnedLeft"]}, & .${m.x["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:40,background:g.f.header.background.base},[`& .${m.x.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:30,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:10,color:g.f.colors.border.base},[`& .${m.x.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)",backgroundColor:o},"@media (hover: hover)":{[`& .${m.x.columnHeader}:hover`]:{[`& .${m.x.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${m.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"}},[`& .${m.x.columnHeader}:not(.${m.x["columnHeader--sorted"]}):hover .${m.x.sortButton},\n & .${m.x.pivotPanelField}:not(.${m.x["pivotPanelField--sorted"]}):hover .${m.x.sortButton},\n & .${m.x.pivotPanelField}:not(.${m.x["pivotPanelField--sorted"]}) .${m.x.sortButton}:focus-visible`]:{opacity:.5}},"@media (hover: none)":{[`& .${m.x.columnHeader} .${m.x.menuIcon}`]:{width:"auto",visibility:"visible"},[`& .${m.x.columnHeader}:focus,\n & .${m.x["columnHeader--siblingFocused"]}`]:{[`.${m.x["columnSeparator--resizable"]}`]:{color:g.f.colors.foreground.accent}},[`& .${m.x.pivotPanelField}:not(.${m.x["pivotPanelField--sorted"]}) .${m.x.sortButton}`]:{opacity:.5}},[`& .${m.x["columnSeparator--sideLeft"]}`]:{left:-5},[`& .${m.x["columnSeparator--sideRight"]}`]:{right:-5},[`& .${m.x["columnHeader--withRightBorder"]} .${m.x["columnSeparator--sideLeft"]}`]:{left:-5.5},[`& .${m.x["columnHeader--withRightBorder"]} .${m.x["columnSeparator--sideRight"]}`]:{right:-5.5},[`& .${m.x["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${m.x["columnSeparator--resizing"]}`]:{color:g.f.colors.foreground.accent},"@media (hover: none)":{[`& .${m.x.iconSeparator} rect`]:w},"@media (hover: hover)":{"&:hover":{color:g.f.colors.foreground.accent,[`& .${m.x.iconSeparator} rect`]:w}},"& svg":{pointerEvents:"none"}},[`& .${m.x.iconSeparator}`]:{color:"inherit",transition:g.f.transition(["color","width"],{duration:g.f.transitions.duration.short})},[`& .${m.x.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${m.x.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${m.x.headerFilterRow}`]:{[`& .${m.x.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${m.x["row--borderBottom"]} .${m.x.columnHeader},\n & .${m.x["row--borderBottom"]} .${m.x.filler},\n & .${m.x["row--borderBottom"]} .${m.x.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${m.x["row--borderBottom"]} .${m.x.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${m.x.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${m.x["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:d,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${m.x.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":I},[`& .${m.x["container--top"]}, & .${m.x["container--bottom"]}`]:{"[role=row]":{background:g.f.colors.background.base}},[`& .${m.x.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":I},[`& .${m.x["virtualScrollerContent--overflowed"]} .${m.x["row--lastVisible"]} .${m.x.cell}`]:{borderTopColor:"transparent"},[`& .${m.x.pinnedRows} .${m.x.row}, .${m.x.aggregationRowOverlayWrapper} .${m.x.row}`]:{backgroundColor:r,"&:hover":{backgroundColor:f}},[`& .${m.x["pinnedRows--top"]} :first-of-type`]:{[`& .${m.x.cell}, .${m.x.scrollbarFiller}`]:{borderTop:"none"}},[`&.${m.x["root--disableUserSelection"]}`]:{userSelect:"none"},[`& .${m.x["row--dynamicHeight"]} > .${m.x.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${m.x.cellEmpty}`]:{flex:1,padding:0,height:"unset"},[`& .${m.x.cell}.${m.x["cell--selectionMode"]}`]:{cursor:"default"},[`& .${m.x.cell}.${m.x["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:g.f.shadows.base,backgroundColor:g.f.colors.background.overlay,"&:focus-within":{outline:`1px solid ${g.f.colors.interactive.focus}`,outlineOffset:-1}},[`& .${m.x["row--editing"]}`]:{boxShadow:g.f.shadows.base},[`& .${m.x["row--editing"]} .${m.x.cell}`]:{boxShadow:"none",backgroundColor:g.f.colors.background.overlay},[`& .${m.x.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${m.x.booleanCell}[data-value="true"]`]:{color:g.f.colors.foreground.muted},[`& .${m.x.booleanCell}[data-value="false"]`]:{color:g.f.colors.foreground.disabled},[`& .${m.x.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:g.f.spacing(1)},[`& .${m.x.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:g.f.colors.interactive.disabledOpacity},[`& .${m.x["rowReorderCell--draggable"]}`]:{cursor:"grab",opacity:1},[`& .${m.x.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${m.x.withBorderColor}`]:{borderColor:g.f.colors.border.base},[`& .${m.x["cell--withLeftBorder"]}, & .${m.x["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${m.x["cell--withRightBorder"]}, & .${m.x["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${m.x["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${m.x["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${m.x["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${m.x["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${m.x["cell--pinnedLeft"]}, & .${m.x["cell--pinnedRight"]}`]:{position:"sticky",zIndex:30,background:g.f.cell.background.pinned,"&.Mui-selected":{backgroundColor:v}},[`& .${m.x.row}`]:{"&:hover":k,"&.Mui-selected":R,"&.Mui-selected:hover":M},[`& .${m.x.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${m.x.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${m.x.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${m.x.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${m.x["columnHeader--dragging"]}, & .${m.x["row--dragging"]}`]:{background:g.f.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:g.f.colors.interactive.disabledOpacity},[`& .${m.x["row--dragging"]}`]:{background:g.f.colors.background.overlay,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:g.f.colors.interactive.disabledOpacity,[`& .${m.x.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${m.x.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${m.x.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:g.f.spacing(2)},[`& .${m.x.treeDataGroupingCellLoadingContainer}, .${m.x.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${m.x.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${m.x.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:g.f.spacing(2)},[`& .${m.x.columnHeaders} .${m.x.scrollbarFiller}`]:{backgroundColor:o},[`.${m.x.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${m.x["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${m.x["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${m.x["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:g.f.cell.background.pinned,position:"sticky",right:0}},[`& .${m.x.filler}`]:{flex:"1 0 auto"},[`& .${m.x["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${m.x.columnHeaders} .${m.x.filler}`]:{backgroundColor:o},[`& .${m.x["main--hiddenContent"]}`]:{[`& .${m.x.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${m.x["scrollbar--vertical"]}, & .${m.x.pinnedRows}, & .${m.x.virtualScroller} > .${m.x.filler}`]:{display:"none"}}}}));function S(e,t){return`rgba(from ${e} r g b / ${t})`}function A(e,t,n){return`color-mix(in srgb,${e}, ${t} calc(${n} * 100%))`}var E=n(77866);const k=r.createContext(void 0),R=()=>{const e=r.useContext(k);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e};var M=n(74848);const I=r.createContext({className:"unset",tag:(0,M.jsx)("style",{href:"/unset"})});function P(){return r.useContext(I).className}function T(e){const t=R(),n=(0,E.A)(),o=t.hooks.useCSSVariables(),i=r.useMemo((()=>{const e=`MuiDataGridVariables-${o.id}`,t=`.${e}{${function(e){let t="";for(const n in e)Object.hasOwn(e,n)&&void 0!==e[n]&&(t+=`${n}:${e[n]};`);return t}(o.variables)}}`;return{className:e,tag:(0,M.jsx)("style",{href:`/${e}`,nonce:n.nonce,children:t})}}),[n.nonce,o]);return(0,M.jsx)(I.Provider,{value:i,children:e.children})}var O=n(92661);const $={compact:.7,comfortable:1.3,standard:1},D=(0,O.gz)((e=>e.density)),N=(0,O.Mz)(D,(e=>$[e]));var L=n(19888);const H=()=>()=>{},z=()=>!1,F=()=>!0;var j=n(47211);const B=(0,O.gz)((e=>e.preferencePanel)),_=(0,O.Mz)(B,((e,t)=>!(!e.open||e.labelId!==t)));var V=function(e){return e.filters="filters",e.columns="columns",e.aiAssistant="aiAssistant",e}(V||{}),W=n(83753);const G=r.createContext(void 0);function K(){const e=r.useContext(G);if(void 0===e)throw new Error("MUI X: Missing context.");return e}function U({children:e}){const t=r.useRef(null),n=r.useRef(null),o=r.useRef(null),i=r.useMemo((()=>({columnsPanelTriggerRef:t,filterPanelTriggerRef:n,aiAssistantPanelTriggerRef:o})),[]);return(0,M.jsx)(G.Provider,{value:i,children:e})}function q(){const e=(0,W.h)(),t=(0,b.Nc)(e,j.OV),n=(0,E.A)(),r=(0,b.Nc)(e,B),{columnsPanelTriggerRef:i,filterPanelTriggerRef:s,aiAssistantPanelTriggerRef:a}=K(),l=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??V.filters);let c=null;switch(r.openedPanelValue){case V.filters:c=s.current;break;case V.columns:c=i.current;break;case V.aiAssistant:c=a.current}return(0,M.jsx)(n.slots.panel,(0,o.A)({id:r.panelId,open:t.length>0&&r.open,"aria-labelledby":r.labelId,target:c,onClose:()=>e.current.hidePreferences()},n.slotProps?.panel,{children:l}))}function X(){const e=(0,E.A)();return(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(q,{}),e.showToolbar&&(0,M.jsx)(e.slots.toolbar,(0,o.A)({},e.slotProps?.toolbar))]})}var Y=n(14808);const Q=(0,O.gz)((e=>e.dimensions)),J=(0,O.Mz)(Q,(e=>e.columnsTotalWidth)),Z=(0,O.Mz)(Q,(e=>e.rowHeight)),ee=(0,O.Mz)(Q,(e=>e.contentSize.height)),te=(0,O.Mz)(Q,(e=>e.hasScrollX)),ne=(0,O.Mz)(Q,(e=>e.hasScrollY)),oe=(0,O.Mz)(Q,(e=>e.columnsTotalWidth<e.viewportOuterSize.width)),re=(0,O.Mz)(Q,(e=>e.headerHeight)),ie=(0,O.Mz)(Q,(e=>e.groupHeaderHeight)),se=((0,O.Mz)(Q,(e=>e.headerFilterHeight)),(0,O.Mz)(Q,(e=>e.hasScrollX?e.scrollbarSize:0))),ae=(0,O.Mz)(Q,(e=>e.hasScrollY?e.scrollbarSize:0)),le=(0,O.Mz)(Q,se,((e,t)=>{const n=e.viewportOuterSize.height-e.minimumSize.height>0;return!(0===t&&!n)}));var ce=n(78854);class ue{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 de{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 he{static create(){return new he}}const pe={current:"undefined"!=typeof FinalizationRegistry?new de:new ue};let fe=0;function me(e,t,n,o){const i=r.useState(he.create)[0],s=r.useRef(null),a=r.useRef(null);a.current=n;const l=r.useRef(null);if(!s.current&&a.current){const n=(e,t,n)=>{t.defaultMuiPrevented||a.current?.(e,t,n)};s.current=e.current.subscribeEvent(t,n,o),fe+=1,l.current={cleanupToken:fe},pe.current.register(i,(()=>{s.current?.(),s.current=null,l.current=null}),l.current)}else!a.current&&s.current&&(s.current(),s.current=null,l.current&&(pe.current.unregister(l.current),l.current=null));r.useEffect((()=>{if(!s.current&&a.current){const n=(e,t,n)=>{t.defaultMuiPrevented||a.current?.(e,t,n)};s.current=e.current.subscribeEvent(t,n,o)}return l.current&&pe.current&&(pe.current.unregister(l.current),l.current=null),()=>{s.current?.(),s.current=null}}),[e,t,o])}const ge={isFirst:!0};function be(e,t,n){me(e,t,n,ge)}var ve=n(32350),ye=n(19750),we=n(3576);function Ce(e){throw new Error("Failed assertion: should not be rendered")}const xe=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange","slotProps"],Se=(0,f.Ay)(Ce,{name:"MuiDataGrid",slot:"EditInputCell"})({font:g.f.typography.font.body,padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}),Ae=(0,s.R)(((e,t)=>{const n=(0,E.A)(),{id:i,value:s,field:l,colDef:c,hasFocus:u,debounceMs:h=200,isProcessingProps:p,onValueChange:f,slotProps:g}=e,b=(0,a.A)(e,xe),v=(0,W.h)(),y=r.useRef(null),[w,C]=r.useState(s),x=(e=>{const{classes:t}=e;return(0,d.A)({root:["editInputCell"]},m.B,t)})(n),S=r.useCallback((async e=>{const t=e.target.value,n=v.current.getColumn(l);let o=t;n.valueParser&&(o=n.valueParser(t,v.current.getRow(i),n,v)),C(o),v.current.setEditCellValue({id:i,field:l,value:o,debounceMs:h,unstable_skipValueParser:!0},e),f&&await f(e,t)}),[v,h,l,i,f]),A=v.current.unstable_getEditCellMeta(i,l);return r.useEffect((()=>{"debouncedSetEditCellValue"!==A?.changeReason&&C(s)}),[A,s]),(0,we.A)((()=>{u&&y.current.focus()}),[u]),(0,M.jsx)(Se,(0,o.A)({as:n.slots.baseInput,inputRef:y,className:x.root,ownerState:n,fullWidth:!0,type:"number"===c.type?c.type:"text",value:w??"",onChange:S,endAdornment:p?(0,M.jsx)(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},b,g?.root,{ref:t}))}));var Ee=n(24349);const ke=(e,t)=>t&&e.length>1?[e[0]]:e,Re=(e,t)=>n=>(0,o.A)({},n,{sorting:(0,o.A)({},n.sorting,{sortModel:ke(e,t)})}),Me=(e,t)=>{const n=e.indexOf(t);return t&&-1!==n&&n+1!==e.length?e[n+1]:e[0]},Ie=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,Pe=new Intl.Collator,Te=(e,t)=>{const n=Ie(e,t);return null!==n?n:Number(e)-Number(t)},Oe=(e,t)=>{const n=Ie(e,t);return null!==n?n:e>t?1:e<t?-1:0};var $e=n(91092);const De=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","slotProps","clearButton","headerFilterMenu"];function Ne(e){const{item:t,applyValue:n,type:i,apiRef:s,focusElementRef:l,tabIndex:c,disabled:u,slotProps:d,clearButton:h,headerFilterMenu:p}=e,f=(0,a.A)(e,De),m=d?.root,g=(0,ve.A)(),[b,v]=r.useState(Le(t.value)),[y,w]=r.useState(!1),C=(0,$e.A)(),x=(0,E.A)(),S=r.useCallback((e=>{const r=Le(e.target.value);v(r),w(!0),g.start(x.filterDebounceMs,(()=>{const e=(0,o.A)({},t,{value:"number"!==i||Number.isNaN(Number(r))?r:Number(r),fromInput:C});n(e),w(!1)}))}),[g,x.filterDebounceMs,t,i,C,n]);return r.useEffect((()=>{t.fromInput===C&&null!=t.value||v(Le(t.value))}),[C,t]),(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(x.slots.baseTextField,(0,o.A)({id:C,label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),value:b??"",onChange:S,type:i||"text",disabled:u,slotProps:(0,o.A)({},m?.slotProps,{input:(0,o.A)({endAdornment:y?(0,M.jsx)(x.slots.loadIcon,{fontSize:"small",color:"action"}):null},m?.slotProps?.input),htmlInput:(0,o.A)({tabIndex:c},m?.slotProps?.htmlInput)}),inputRef:l},x.slotProps?.baseTextField,f,m)),p,h]})}function Le(e){if(null!=e&&""!==e)return String(e)}function He(e){return"object"==typeof e&&null!==e}function ze(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const Fe=(e,t,n)=>Math.max(t,Math.min(n,e));function je(e,t){return Array.from({length:t-e}).map(((t,n)=>e+n))}function Be(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}const _e=(e,t)=>n=>{e&&t(n)};function Ve(e){const{item:t,applyValue:n,type:i,apiRef:s,focusElementRef:a,slotProps:l}=e,c=(0,$e.A)(),[u,d]=r.useState([]),[h,p]=r.useState(t.value||[]),f=(0,E.A)();r.useEffect((()=>{const e=t.value??[];p(e.map(String))}),[t.value]);const m=r.useCallback(((e,r)=>{p(r.map(String)),n((0,o.A)({},t,{value:[...r.map((e=>"number"===i?Number(e):e))]}))}),[n,t,i]),g=r.useCallback(((e,t)=>{d(""===t?[]:[t])}),[d]),b=f.slots.baseAutocomplete;return(0,M.jsx)(b,(0,o.A)({multiple:!0,freeSolo:!0,options:u,id:c,value:h,onChange:m,onInputChange:g,label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:i||"text",inputRef:a}}},l?.root))}var We=function(e){return e.And="and",e.Or="or",e}(We||{});const Ge={filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},Ke=()=>({items:[],logicOperator:We.And,quickFilterValues:[],quickFilterLogicOperator:We.And});function Ue(e){return{current:e.current.getPublicApi()}}let qe;const Xe=(e,t)=>{const n=(0,o.A)({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operator){const e=(0,j.gv)(t)[n.field];n.operator=e&&e.filterOperators[0].value}return n},Ye=(e,t,n)=>{const r=e.items.length>1;let i;i=r&&t?[e.items[0]]:e.items;const s=r&&i.some((e=>null==e.id));return i.some((e=>null==e.operator))||s?(0,o.A)({},e,{items:i.map((e=>Xe(e,n)))}):e.items!==i?(0,o.A)({},e,{items:i}):e},Qe=(e,t,n)=>r=>(0,o.A)({},r,{filterModel:Ye(e,t,n)}),Je=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,Ze=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const o=n.valueParser;r=Array.isArray(e.value)?e.value?.map((e=>o(e,void 0,n,t))):o(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:i}=t.current.rootProps;i&&(r=Je(r));const s=(0,o.A)({},e,{value:r}),a=n.filterOperators;if(!a?.length)throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const l=a.find((e=>e.value===s.operator));if(!l)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${s.operator}'.`);const c=Ue(t),u=l.getApplyFilterFn(s,n);return"function"!=typeof u?null:{item:s,fn:e=>{let o=t.current.getRowValue(e,n);return i&&(o=Je(o)),u(o,e,n,c)}}};let et=1;const tt=e=>e.quickFilterExcludeHiddenColumns??!0,nt=(e,t,n)=>{const o=((e,t,n)=>{const{items:o}=e,r=o.map((e=>Ze(e,t))).filter((e=>!!e));if(0===r.length)return null;if(n||!function(){if(void 0!==qe)return qe;try{qe=new Function("return true")()}catch(e){qe=!1}return qe}())return(e,t)=>{const n={};for(let o=0;o<r.length;o+=1){const i=r[o];t&&!t(i.item.field)||(n[i.item.id]=i.fn(e))}return n};const i=new Function("appliers","row","shouldApplyFilter",`"use strict";\n${r.map(((e,t)=>`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`)).join("\n")}\n\nconst result$$ = {\n${r.map(((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t} ? false : appliers[${t}].fn(row),`)).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(et)));return et+=1,(e,t)=>i(r,e,t)})(e,t,n),r=((e,t)=>{const n=e.quickFilterValues?.filter(Boolean)??[];if(0===n.length)return null;const o=tt(e)?(0,j.TI)(t):(0,j.JR)(t),r=[],{ignoreDiacritics:i}=t.current.rootProps,s=Ue(t);return o.forEach((e=>{const o=t.current.getColumn(e),a=o?.getApplyQuickFilterFn;a&&r.push({column:o,appliers:n.map((e=>{const t=i?Je(e):e;return{fn:a(t,o,s)}}))})})),function(e,o){const a={};e:for(let l=0;l<n.length;l+=1){const c=n[l];for(let n=0;n<r.length;n+=1){const{column:u,appliers:d}=r[n],{field:h}=u;if(o&&!o(h))continue;const p=d[l];let f=t.current.getRowValue(e,u);if(null!==p.fn&&(i&&(f=Je(f)),p.fn(f,e,u,s))){a[c]=!0;continue e}}a[c]=!1}return a}})(e,t);return function(e,t,n){n.passingFilterItems=o?.(e,t)??null,n.passingQuickFilterValues=r?.(e,t)??null}},ot=e=>null!=e,rt=(e,t,n,o,r)=>{const i=((e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter((e=>null!==Ze(e,t)))),e.cleanedFilterItems))(r,o,n.items),s=e.filter(ot),a=t.filter(ot);if(s.length>0){const e=e=>s.some((t=>t[e.id]));if((n.logicOperator??Ke().logicOperator)===We.And){if(!i.every(e))return!1}else if(!i.some(e))return!1}if(a.length>0&&null!=n.quickFilterValues){const e=e=>a.some((t=>t[e]));if((n.quickFilterLogicOperator??Ke().quickFilterLogicOperator)===We.And){if(!n.quickFilterValues.every(e))return!1}else if(!n.quickFilterValues.some(e))return!1}return!0},it=(e,t)=>n=>{if(!n.value)return null;const o=e?n.value:n.value.trim(),r=new RegExp(ze(o),"i");return e=>{if(null==e)return t;const n=r.test(String(e));return t?!n:n}},st=(e,t)=>n=>{if(!n.value)return null;const o=e?n.value:n.value.trim(),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>{if(null==e)return t;const n=0===r.compare(o,e.toString());return t?!n:n}},at=e=>()=>t=>{const n=""===t||null==t;return e?!n:n},lt={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const n=Ie(e,t);return null!==n?n:"string"==typeof e?Pe.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>[{value:"contains",getApplyFilterFn:it(e,!1),InputComponent:Ne},{value:"doesNotContain",getApplyFilterFn:it(e,!0),InputComponent:Ne},{value:"equals",getApplyFilterFn:st(e,!1),InputComponent:Ne},{value:"doesNotEqual",getApplyFilterFn:st(e,!0),InputComponent:Ne},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(`^${ze(n)}.*$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:Ne},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(`.*${ze(n)}$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:Ne},{value:"isEmpty",getApplyFilterFn:at(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:at(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const n=e?t.value:t.value.map((e=>e.trim())),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&n.some((t=>0===o.compare(t,e.toString()||"")))},InputComponent:Ve}])(),renderEditCell:e=>(0,M.jsx)(Ae,(0,o.A)({},e)),getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp(ze(e),"i");return(e,n,o,r)=>{let i=r.current.getRowFormattedValue(n,o);return r.current.ignoreDiacritics&&(i=Je(i)),null!=i&&t.test(i.toString())}}},ct=e=>null==e?null:Number(e),ut=(0,o.A)({},lt,{type:"number",align:"right",headerAlign:"right",sortComparator:Te,valueParser:e=>""===e?null:Number(e),valueFormatter:e=>function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)?e.toLocaleString():e||"",filterOperators:[{value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>ct(t)===e.value,InputComponent:Ne,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>ct(t)!==e.value,InputComponent:Ne,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ct(t)>e.value,InputComponent:Ne,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ct(t)>=e.value,InputComponent:Ne,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ct(t)<e.value,InputComponent:Ne,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&ct(t)<=e.value,InputComponent:Ne,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:Ve,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:t=>ct(t)===ct(e)}),dt=["item","applyValue","type","apiRef","focusElementRef","slotProps","isFilterActive","headerFilterMenu","clearButton","tabIndex","disabled"];function ht(e,t){if(null==e)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":"date"===t?n.toISOString().substring(0,10):"datetime-local"===t?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function pt(e){const{item:t,applyValue:n,type:i,apiRef:s,focusElementRef:l,slotProps:c,headerFilterMenu:u,clearButton:d,tabIndex:h,disabled:p}=e,f=(0,a.A)(e,dt),m=c?.root.slotProps,g=(0,ve.A)(),[b,v]=r.useState((()=>ht(t.value,i))),[y,w]=r.useState(!1),C=(0,$e.A)(),x=(0,E.A)(),S=r.useCallback((e=>{g.clear();const r=e.target.value;v(r),w(!0),g.start(x.filterDebounceMs,(()=>{const e=new Date(r);n((0,o.A)({},t,{value:Number.isNaN(e.getTime())?void 0:e})),w(!1)}))}),[n,t,x.filterDebounceMs,g]);return r.useEffect((()=>{const e=ht(t.value,i);v(e)}),[t.value,i]),(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(x.slots.baseTextField,(0,o.A)({fullWidth:!0,id:C,label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),value:b,onChange:S,type:i||"text",disabled:p,inputRef:l,slotProps:(0,o.A)({},m,{input:(0,o.A)({endAdornment:y?(0,M.jsx)(x.slots.loadIcon,{fontSize:"small",color:"action"}):null},m?.input),htmlInput:(0,o.A)({max:"datetime-local"===i?"9999-12-31T23:59":"9999-12-31",tabIndex:h},m?.htmlInput)})},x.slotProps?.baseTextField,f,c?.root)),u,d]})}function ft(e,t,n,o){if(!e.value)return null;const r=new Date(e.value);n?r.setSeconds(0,0):(r.setMinutes(r.getMinutes()+r.getTimezoneOffset()),r.setHours(0,0,0,0));const i=r.getTime();return e=>{if(!e)return!1;if(o)return t(e.getTime(),i);const r=new Date(e);return n?r.setSeconds(0,0):r.setHours(0,0,0,0),t(r.getTime(),i)}}const mt=e=>[{value:"is",getApplyFilterFn:t=>ft(t,((e,t)=>e===t),e),InputComponent:pt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>ft(t,((e,t)=>e!==t),e),InputComponent:pt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>ft(t,((e,t)=>e>t),e),InputComponent:pt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>ft(t,((e,t)=>e>=t),e),InputComponent:pt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>ft(t,((e,t)=>e<t),e,!e),InputComponent:pt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFn:t=>ft(t,((e,t)=>e<=t),e),InputComponent:pt,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>null!=e,requiresFilterValue:!1}],gt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange","slotProps"],bt=(0,f.Ay)(Ce)({fontSize:"inherit"});function vt(e){const{id:t,value:n,field:i,colDef:s,hasFocus:l,onValueChange:c,slotProps:u}=e,h=(0,a.A)(e,gt),p="dateTime"===s.type,f=(0,W.h)(),g=r.useRef(null),b=r.useMemo((()=>{let e,t;return e=null==n?null:n instanceof Date?n:new Date((n??"").toString()),t=null==e||Number.isNaN(e.getTime())?"":new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,p?16:10),{parsed:e,formatted:t}}),[n,p]),[v,y]=r.useState(b),w=(0,E.A)(),C=(e=>{const{classes:t}=e;return(0,d.A)({root:["editInputCell"]},m.B,t)})({classes:w.classes}),x=r.useCallback((e=>{if(""===e)return null;const[t,n]=e.split("T"),[o,r,i]=t.split("-"),s=new Date;if(s.setFullYear(Number(o),Number(r)-1,Number(i)),s.setHours(0,0,0,0),n){const[e,t]=n.split(":");s.setHours(Number(e),Number(t),0,0)}return s}),[]),S=r.useCallback((async e=>{const n=e.target.value,o=x(n);c&&await c(e,o),y({parsed:o,formatted:n}),f.current.setEditCellValue({id:t,field:i,value:o},e)}),[f,i,t,c,x]);return r.useEffect((()=>{y((e=>b.parsed!==e.parsed&&b.parsed?.getTime()!==e.parsed?.getTime()?b:e))}),[b]),(0,we.A)((()=>{l&&g.current.focus()}),[l]),(0,M.jsx)(bt,(0,o.A)({as:w.slots.baseInput,inputRef:g,fullWidth:!0,className:C.root,type:p?"datetime-local":"date",value:v.formatted,onChange:S},h,u?.root,{slotProps:{htmlInput:(0,o.A)({max:p?"9999-12-31T23:59":"9999-12-31"},u?.root?.slotProps?.htmlInput)}}))}const yt=e=>(0,M.jsx)(vt,(0,o.A)({},e));var wt=n(65347);const Ct=(0,O.gz)(((e,t)=>wt.gb in t?t[wt.gb]:e.props.getRowId?e.props.getRowId(t):t.id));function xt({value:e,columnType:t,rowId:n,field:o}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${o}".`].join("\n"))}const St=(0,o.A)({},lt,{type:"date",sortComparator:Oe,valueFormatter:(e,t,n,o)=>e?(xt({value:e,columnType:"date",rowId:Ct(o,t),field:n.field}),e.toLocaleDateString()):"",filterOperators:mt(),renderEditCell:yt,pastedValueParser:e=>new Date(e)}),At=(0,o.A)({},lt,{type:"dateTime",sortComparator:Oe,valueFormatter:(e,t,n,o)=>e?(xt({value:e,columnType:"dateTime",rowId:Ct(o,t),field:n.field}),e.toLocaleString()):"",filterOperators:mt(!0),renderEditCell:yt,pastedValueParser:e=>new Date(e)}),Et="__row_group_by_columns_group__",kt="__detail_panel_toggle__";let Rt=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const Mt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"];function It(e){const{value:t,rowNode:n}=e,i=(0,a.A)(e,Mt),s=(0,W.h)(),l=(0,E.A)(),c=(e=>{const{classes:t}=e;return(0,d.A)({root:["booleanCell"]},m.B,t)})({classes:l.classes}),u=(0,b.Nc)(s,Ee.V2)>0&&"group"===n.type&&!1===l.treeData,h=r.useMemo((()=>t?l.slots.booleanCellTrueIcon:l.slots.booleanCellFalseIcon),[l.slots.booleanCellFalseIcon,l.slots.booleanCellTrueIcon,t]);return u&&void 0===t?null:(0,M.jsx)(h,(0,o.A)({fontSize:"small",className:c.root,titleAccess:s.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},i))}const Pt=r.memo(It),Tt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function Ot(e){const{id:t,value:n,field:i,className:s,hasFocus:c,onValueChange:u}=e,h=(0,a.A)(e,Tt),p=(0,W.h)(),f=r.useRef(null),g=(0,$e.A)(),[b,v]=r.useState(n),y=(0,E.A)(),w=(e=>{const{classes:t}=e;return(0,d.A)({root:["editBooleanCell"]},m.B,t)})({classes:y.classes}),C=r.useCallback((async e=>{const n=e.target.checked;u&&await u(e,n),v(n),await p.current.setEditCellValue({id:t,field:i,value:n},e)}),[p,i,t,u]);return r.useEffect((()=>{v(n)}),[n]),(0,we.A)((()=>{c&&f.current.focus()}),[c]),(0,M.jsx)("label",(0,o.A)({htmlFor:g,className:(0,l.A)(w.root,s)},h,{children:(0,M.jsx)(y.slots.baseCheckbox,(0,o.A)({id:g,inputRef:f,checked:Boolean(b),onChange:C,size:"small"},y.slotProps?.baseCheckbox))}))}const $t=["item","applyValue","apiRef","focusElementRef","isFilterActive","headerFilterMenu","clearButton","tabIndex","slotProps"];function Dt(e){return"true"===String(e).toLowerCase()||"false"!==String(e).toLowerCase()&&void 0}const Nt=(0,o.A)({},lt,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:e=>e.field!==Et&&(0,wt.nF)(e.rowNode)?"":(0,M.jsx)(Pt,(0,o.A)({},e)),renderEditCell:e=>(0,M.jsx)(Ot,(0,o.A)({},e)),sortComparator:Te,valueFormatter:(e,t,n,o)=>e?o.current.getLocaleText("booleanCellTrueLabel"):o.current.getLocaleText("booleanCellFalseLabel"),filterOperators:[{value:"is",getApplyFilterFn:e=>{const t=Dt(e.value);return void 0===t?null:e=>Boolean(e)===t},InputComponent:function(e){const{item:t,applyValue:n,apiRef:i,focusElementRef:s,headerFilterMenu:l,clearButton:c,tabIndex:u,slotProps:d}=e,h=(0,a.A)(e,$t),[p,f]=r.useState(Dt(t.value)),m=(0,E.A)(),g=(0,$e.A)(),b=(0,$e.A)(),v=m.slotProps?.baseSelect||{},y=v.native??!1,w=m.slotProps?.baseSelectOption||{},C=r.useCallback((e=>{const r=Dt(e.target.value);f(r),n((0,o.A)({},t,{value:r}))}),[n,t]);r.useEffect((()=>{f(Dt(t.value))}),[t.value]);const x=d?.root.label??i.current.getLocaleText("filterPanelInputLabel"),S=d?.root.slotProps;return(0,M.jsxs)(r.Fragment,{children:[(0,M.jsxs)(m.slots.baseSelect,(0,o.A)({fullWidth:!0,labelId:g,id:b,label:x,value:void 0===p?"":String(p),onChange:C,native:y,slotProps:{htmlInput:(0,o.A)({ref:s,tabIndex:u},S?.htmlInput)}},v,h,d?.root,{children:[(0,M.jsx)(m.slots.baseSelectOption,(0,o.A)({},w,{native:y,value:"",children:i.current.getLocaleText("filterValueAny")})),(0,M.jsx)(m.slots.baseSelectOption,(0,o.A)({},w,{native:y,value:"true",children:i.current.getLocaleText("filterValueTrue")})),(0,M.jsx)(m.slots.baseSelectOption,(0,o.A)({},w,{native:y,value:"false",children:i.current.getLocaleText("filterValueFalse")}))]})),l,c]})}}],getApplyQuickFilterFn:()=>null,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)});var Lt=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Lt||{}),Ht=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Ht||{}),zt=function(e){return e.Cell="cell",e.Row="row",e}(zt||{}),Ft=function(e){return e.Edit="edit",e.View="view",e}(Ft||{}),jt=function(e){return e.Edit="edit",e.View="view",e}(jt||{});function Bt(e){return"singleSelect"===e?.type}function _t(e,t){if(e)return"function"==typeof e.valueOptions?e.valueOptions((0,o.A)({field:e.field},t)):e.valueOptions}function Vt(e,t,n){if(void 0===t)return;const o=t.find((t=>{const o=n(t);return String(o)===String(e)}));return n(o)}const Wt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","slotProps"];function Gt(e){const t=(0,E.A)(),{id:n,value:i,field:s,row:l,colDef:c,hasFocus:u,error:d,onValueChange:h,initialOpen:p=t.editMode===zt.Cell,slotProps:f}=e,m=(0,a.A)(e,Wt),g=(0,W.h)(),b=r.useRef(null),v=r.useRef(null),[y,w]=r.useState(p),C=(t.slotProps?.baseSelect||{}).native??!1;if((0,we.A)((()=>{u&&v.current?.focus()}),[u]),!Bt(c))return null;const x=_t(c,{id:n,row:l});if(!x)return null;const S=c.getOptionValue,A=c.getOptionLabel;return x&&c?(0,M.jsx)(t.slots.baseSelect,(0,o.A)({ref:b,value:i,onChange:async e=>{if(!Bt(c)||!x)return;w(!1);const t=Vt(e.target.value,x,S);h&&await h(e,t),await g.current.setEditCellValue({id:n,field:s,value:t},e)},open:y,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||w(!0)},onClose:(e,r)=>{if(t.editMode!==zt.Row){if("backdropClick"===r||"Escape"===e.key){const t=g.current.getCellParams(n,s);g.current.publishEvent("cellEditStop",(0,o.A)({},t,{reason:"Escape"===e.key?Ht.escapeKeyDown:Ht.cellFocusOut}))}}else w(!1)},error:d,native:C,fullWidth:!0,slotProps:{htmlInput:{ref:v}}},m,f?.root,t.slotProps?.baseSelect,{children:x.map((e=>{const n=S(e);return(0,r.createElement)(t.slots.baseSelectOption,(0,o.A)({},t.slotProps?.baseSelectOption||{},{native:C,key:n,value:n}),A(e))}))})):null}const Kt=["item","applyValue","type","apiRef","focusElementRef","tabIndex","isFilterActive","clearButton","headerFilterMenu","slotProps"],Ut=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:i,isSelectNative:s,baseSelectOptionProps:a})=>["",..._t(e)||[]].map((e=>{const l=i(e);let c=n(e);return""===c&&(c=" "),(0,r.createElement)(t,(0,o.A)({},a,{native:s,key:l,value:l}),c)}));function qt(e){const{item:t,applyValue:n,type:i,apiRef:s,focusElementRef:l,tabIndex:c,clearButton:u,headerFilterMenu:d,slotProps:h}=e,p=(0,a.A)(e,Kt),f=t.value??"",m=(0,$e.A)(),g=(0,$e.A)(),b=(0,E.A)(),v=b.slotProps?.baseSelect?.native??!1;let y=null;if(t.field){const e=s.current.getColumn(t.field);Bt(e)&&(y=e)}const w=y?.getOptionValue,C=y?.getOptionLabel,x=r.useMemo((()=>_t(y)),[y]),S=r.useCallback((e=>{let r=e.target.value;r=Vt(r,x,w),n((0,o.A)({},t,{value:r}))}),[x,w,n,t]);if(!Bt(y))return null;const A=h?.root.label??s.current.getLocaleText("filterPanelInputLabel");return(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(b.slots.baseSelect,(0,o.A)({fullWidth:!0,id:m,label:A,labelId:g,value:f,onChange:S,slotProps:{htmlInput:(0,o.A)({tabIndex:c,ref:l,type:i||"text",placeholder:h?.root.placeholder??s.current.getLocaleText("filterPanelInputPlaceholder")},h?.root.slotProps?.htmlInput)},native:v},b.slotProps?.baseSelect,p,h?.root,{children:Ut({column:y,OptionComponent:b.slots.baseSelectOption,getOptionLabel:C,getOptionValue:w,isSelectNative:v,baseSelectOptionProps:b.slotProps?.baseSelectOption})})),d,u]})}const Xt=["item","applyValue","type","apiRef","focusElementRef","slotProps"];const Yt=e=>null!=e&&He(e)?e.value:e,Qt=(0,o.A)({},lt,{type:"singleSelect",getOptionLabel:e=>He(e)?e.label:String(e),getOptionValue:e=>He(e)?e.value:e,valueFormatter(e,t,n,o){const r=Ct(o,t);if(!Bt(n))return"";const i=_t(n,{id:r,row:t});if(null==e)return"";if(!i)return e;if("object"!=typeof i[0])return n.getOptionLabel(e);const s=i.find((t=>n.getOptionValue(t)===e));return s?n.getOptionLabel(s):""},renderEditCell:e=>(0,M.jsx)(Gt,(0,o.A)({},e)),filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>Yt(t)===Yt(e.value),InputComponent:qt},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:t=>Yt(t)!==Yt(e.value),InputComponent:qt},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(Yt);return e=>t.includes(Yt(e))},InputComponent:function(e){const{item:t,applyValue:n,type:i,apiRef:s,focusElementRef:l,slotProps:c}=e,u=(0,a.A)(e,Xt),d=(0,$e.A)(),h=(0,E.A)();let p=null;if(t.field){const e=s.current.getColumn(t.field);Bt(e)&&(p=e)}const f=p?.getOptionValue,m=p?.getOptionLabel,g=r.useCallback(((e,t)=>f(e)===f(t)),[f]),b=r.useMemo((()=>_t(p)||[]),[p]),v=r.useMemo((()=>Array.isArray(t.value)?t.value.reduce(((e,t)=>{const n=b.find((e=>f(e)===t));return null!=n&&e.push(n),e}),[]):[]),[f,t.value,b]),y=r.useCallback(((e,r)=>{n((0,o.A)({},t,{value:r.map(f)}))}),[n,t,f]),w=h.slots.baseAutocomplete;return(0,M.jsx)(w,(0,o.A)({multiple:!0,options:b,isOptionEqualToValue:g,id:d,value:v,onChange:y,getOptionLabel:m,label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),slotProps:{textField:{type:i||"text",inputRef:l}}},u,c?.root))}}],pastedValueParser:(e,t,n)=>{const o=n,r=_t(o)||[],i=o.getOptionValue;if(r.find((t=>i(t)===e)))return e}});var Jt=n(411);const Zt=["open","target","onClose","children","position","className","onExited"],en=(0,f.Ay)(Ce,{name:"MuiDataGrid",slot:"Menu"})({zIndex:g.f.zIndex.menu,[`& .${m.x.menuList}`]:{outline:0}});function tn(e){const{open:t,target:n,onClose:i,children:s,position:c,className:u,onExited:h}=e,p=(0,a.A)(e,Zt),f=(0,W.h)(),g=(0,E.A)(),b=(e=>{const{classes:t}=e;return(0,d.A)({root:["menu"]},m.B,t)})(g),v=P(),y=r.useRef(null);return(0,we.A)((()=>{t?y.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(y.current?.focus?.(),y.current=null)}),[t]),r.useEffect((()=>{const e=t?"menuOpen":"menuClose";f.current.publishEvent(e,{target:n})}),[f,t,n]),(0,M.jsx)(en,(0,o.A)({as:g.slots.basePopper,className:(0,l.A)(b.root,u,v),ownerState:g,open:t,target:n,transition:!0,placement:c,onClickAway:e=>{e.target&&(n===e.target||n?.contains(e.target))||i(e)},onExited:h,clickAwayMouseEvent:"onMouseDown"},p,g.slotProps?.basePopper,{children:s}))}const nn=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function on(e){const{colDef:t,id:n,hasFocus:i,tabIndex:s,position:l="bottom-end",focusElementRef:c}=e,u=(0,a.A)(e,nn),[d,h]=r.useState(-1),[p,f]=r.useState(!1),g=(0,W.h)(),b=r.useRef(null),v=r.useRef(null),y=r.useRef(!1),w=r.useRef({}),C=(0,Jt.I)(),x=(0,$e.A)(),S=(0,$e.A)(),A=(0,E.A)();if(!(e=>"function"==typeof e.getActions)(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const k=t.getActions(g.current.getRowParams(n)),R=k.filter((e=>!e.props.showInMenu)),I=k.filter((e=>e.props.showInMenu)),P=R.length+(I.length?1:0);r.useLayoutEffect((()=>{i||Object.entries(w.current).forEach((([e,t])=>{t?.stop({},(()=>{delete w.current[e]}))}))}),[i]),r.useEffect((()=>{d<0||!b.current||d>=b.current.children.length||b.current.children[d].focus({preventScroll:!0})}),[d]),r.useEffect((()=>{i||(h(-1),y.current=!1)}),[i]),r.useImperativeHandle(c,(()=>({focus(){if(!y.current){const e=k.findIndex((e=>!e.props.disabled));h(e)}}})),[k]),r.useEffect((()=>{d>=P&&h(P-1)}),[d,P]);const T=()=>{f(!1)},O=e=>t=>{w.current[e]=t},$=(e,t)=>n=>{h(e),y.current=!0,t&&t(n)};return(0,M.jsxs)("div",(0,o.A)({role:"menu",ref:b,tabIndex:-1,className:m.x.actionsCell,onKeyDown:e=>{if(P<=1)return;const t=(e,n)=>{if(e<0||e>k.length)return e;const o=("left"===n?-1:1)*(C?-1:1);return k[e+o]?.props.disabled?t(e+o,n):e+o};let n=d;"ArrowRight"===e.key?n=t(d,"right"):"ArrowLeft"===e.key&&(n=t(d,"left")),n<0||n>=P||n!==d&&(e.preventDefault(),e.stopPropagation(),h(n))}},u,{children:[R.map(((e,t)=>r.cloneElement(e,{key:t,touchRippleRef:O(t),onClick:$(t,e.props.onClick),tabIndex:d===t?s:-1}))),I.length>0&&S&&(0,M.jsx)(A.slots.baseIconButton,(0,o.A)({ref:v,id:S,"aria-label":g.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?x:void 0,role:"menuitem",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),p?T():(f(!0),h(P-1),y.current=!0)},touchRippleRef:O(S),tabIndex:d===R.length?s:-1},A.slotProps?.baseIconButton,{children:(0,M.jsx)(A.slots.moreActionsIcon,{fontSize:"small"})})),I.length>0&&(0,M.jsx)(tn,{open:p,target:v.current,position:l,onClose:T,children:(0,M.jsx)(A.slots.baseMenuList,{id:x,className:m.x.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Escape"].includes(e.key)&&T()},"aria-labelledby":S,autoFocusItem:!0,children:I.map(((e,t)=>r.cloneElement(e,{key:t,closeMenu:T})))})})]}))}const rn="actions",sn=(0,o.A)({},lt,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,M.jsx)(on,(0,o.A)({},e)),getApplyQuickFilterFn:()=>null}),an=(0,O.gz)((e=>e.headerFiltering)),ln=(0,O.Mz)(an,(e=>e?.enabled??!1)),cn=(0,O.Mz)(an,(e=>e.editing)),un=(0,O.Mz)(an,(e=>e.menuOpen)),dn=(0,O.gz)((e=>e.columnGrouping)),hn=(0,O.S)(dn,(e=>e?.unwrappedGroupingModel??{})),pn=(0,O.S)(dn,(e=>e?.lookup??{})),fn=(0,O.S)(dn,(e=>e?.headerStructure??[])),mn=(0,O.Mz)(dn,(e=>e?.maxDepth??0)),gn=["maxWidth","minWidth","width","flex"],bn={string:lt,number:ut,date:St,dateTime:At,boolean:Nt,singleSelect:Qt,[rn]:sn,custom:lt},vn=(e,t)=>{const n={};let r=0,i=0;const s=[];e.orderedFields.forEach((t=>{let a=e.lookup[t],l=0,c=!1;!1!==e.columnVisibilityModel[t]&&(a.flex&&a.flex>0?(r+=a.flex,c=!0):l=Fe(a.width||lt.width,a.minWidth||lt.minWidth,a.maxWidth||lt.maxWidth),i+=l),a.computedWidth!==l&&(a=(0,o.A)({},a,{computedWidth:l})),c&&s.push(a),n[t]=a}));const a=void 0===t?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),l=Math.max(a-i,0);if(r>0&&a>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const o=new Set(n.map((e=>e.field))),r={all:{},frozenFields:[],freeze:e=>{const t=r.all[e];t&&!0!==t.frozen&&(r.all[e].frozen=!0,r.frozenFields.push(e))}};return function i(){if(r.frozenFields.length===o.size)return;const s={min:{},max:{}};let a=e,l=t,c=0;r.frozenFields.forEach((e=>{a-=r.all[e].computedWidth,l-=r.all[e].flex}));for(let e=0;e<n.length;e+=1){const t=n[e];if(r.all[t.field]&&!0===r.all[t.field].frozen)continue;let o=a/l*t.flex;o<t.minWidth?(c+=t.minWidth-o,o=t.minWidth,s.min[t.field]=!0):o>t.maxWidth&&(c+=t.maxWidth-o,o=t.maxWidth,s.max[t.field]=!0),r.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}c<0?Object.keys(s.max).forEach((e=>{r.freeze(e)})):c>0?Object.keys(s.min).forEach((e=>{r.freeze(e)})):n.forEach((({field:e})=>{r.freeze(e)})),i()}(),r.all}({initialFreeSpace:l,totalFlexUnits:r,flexColumns:s});Object.keys(e).forEach((t=>{n[t].computedWidth=e[t].computedWidth}))}return(0,o.A)({},e,{lookup:n})};function yn(e){let t=bn.string;return e&&bn[e]&&(t=bn[e]),t}const wn=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=(0,j.FY)(e),keepOnlyColumnsToUpsert:i=!1,updateInitialVisibilityModel:s=!1})=>{const a=!e.current.state.columns;let l;if(a)l={orderedFields:[],lookup:{},columnVisibilityModel:r,initialColumnVisibilityModel:r};else{const t=(0,j.em)(e);l={orderedFields:i?[]:[...t.orderedFields],lookup:(0,o.A)({},t.lookup),columnVisibilityModel:r,initialColumnVisibilityModel:s?r:t.initialColumnVisibilityModel}}let c={};i&&!a&&(c=Object.keys(l.lookup).reduce(((e,t)=>(0,o.A)({},e,{[t]:!1})),{}));const u={};t.forEach((e=>{const{field:t}=e;u[t]=!0,c[t]=!0;let n=l.lookup[t];null==n?(n=(0,o.A)({},yn(e.type),{field:t,hasBeenResized:!1}),l.orderedFields.push(t)):i&&l.orderedFields.push(t),n&&n.type!==e.type&&(n=(0,o.A)({},yn(e.type),{field:t}));let r=n.hasBeenResized;gn.forEach((t=>{void 0!==e[t]&&(r=!0,-1===e[t]&&(e[t]=1/0))})),l.lookup[t]=(0,ye.A)(n,(0,o.A)({},yn(e.type),e,{hasBeenResized:r}))})),i&&!a&&Object.keys(l.lookup).forEach((e=>{c[e]||delete l.lookup[e]}));const d=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,i=Object.keys(r);if(0===i.length&&0===n.length)return e;const s={},a=[];for(let t=0;t<n.length;t+=1){const o=n[t];e.lookup[o]&&(s[o]=!0,a.push(o))}const l=0===a.length?e.orderedFields:[...a,...e.orderedFields.filter((e=>!s[e]))],c=(0,o.A)({},e.lookup);for(let e=0;e<i.length;e+=1){const t=i[e],n=(0,o.A)({},c[t],{hasBeenResized:!0});Object.entries(r[t]).forEach((([e,t])=>{n[e]=-1===t?1/0:t})),c[t]=n}return(0,o.A)({},e,{orderedFields:l,lookup:c})})(e.current.unstable_applyPipeProcessors("hydrateColumns",l),n);return vn(d,e.current.getRootDimensions?.()??void 0)};function Cn(e,t){if(t.listView)return 0;const n=N(e),o=mn(e),r=ln(e);return Math.floor(t.columnHeaderHeight*n)+Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*n)*o+(r?Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*n):0)}const xn=(0,Y.A)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${m.x["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${m.x["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${m.x["scrollArea--left"]}`]:{left:0},[`&.${m.x["scrollArea--right"]}`]:{right:0}}))),Sn=(0,O.Mz)(Q,((e,t)=>"left"===t?e.leftPinnedWidth:"right"===t?e.rightPinnedWidth+(e.hasScrollX?e.scrollbarSize:0):0));function An(e){const{scrollDirection:t,scrollPosition:n}=e,i=r.useRef(null),s=(0,W.h)(),a=(0,ve.A)(),l=(0,b.Nc)(s,N),c=(0,b.Nc)(s,J),u=(0,b.Nc)(s,Sn,t),h=()=>{const e=Q(s);if("left"===t)return n.current.left>0;if("right"===t){const t=c-e.viewportInnerSize.width;return n.current.left<t}return!1},[p,f]=r.useState(h),g=(0,E.A)(),v=(0,o.A)({},g,{scrollDirection:t}),y=(e=>{const{scrollDirection:t,classes:n}=e,o={root:["scrollArea",`scrollArea--${t}`]};return(0,d.A)(o,m.B,n)})(v),w=Cn(s,g),C=Math.floor(g.columnHeaderHeight*l),x={height:C,top:w-C};"left"===t?x.left=u:"right"===t&&(x.right=u);const S=(0,ce.A)((e=>{let o;if(e.preventDefault(),"left"===t)o=e.clientX-i.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI X: Wrong drag direction");o=Math.max(1,e.clientX-i.current.getBoundingClientRect().left)}o=1.5*(o-1)+1,a.start(0,(()=>{s.current.scroll({left:n.current.left+o,top:n.current.top})}))}));return me(s,"scrollPositionChange",(()=>{f(h)})),p?(0,M.jsx)(xn,{ref:i,className:y.root,ownerState:v,onDragOver:S,style:x}):null}const En=p((function(e){const t=(0,W.h)(),[n,i]=r.useState(!1);return me(t,"columnHeaderDragStart",(()=>i(!0))),me(t,"columnHeaderDragEnd",(()=>i(!1))),n?(0,M.jsx)(An,(0,o.A)({},e)):null}));var kn=n(40961),Rn=n(15870),Mn=n(26630);const In=()=>{};var Pn=n(32067);let Tn=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}({});const On=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):-1===e?n+2:0,$n=e=>({page:0,pageSize:e?0:100}),Dn=(e,t)=>{if(t===Tn.DataGrid&&e>100)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))},Nn=(0,O.gz)((e=>e.pagination)),Ln=(0,O.Mz)(Nn,(e=>e.enabled&&"client"===e.paginationMode)),Hn=(0,O.Mz)(Nn,(e=>e.paginationModel)),zn=(0,O.Mz)(Nn,(e=>e.rowCount)),Fn=(0,O.Mz)(Nn,(e=>e.meta)),jn=(0,O.Mz)(Hn,(e=>e.page)),Bn=(0,O.Mz)(Hn,(e=>e.pageSize)),_n=(0,O.Mz)(Hn,zn,((e,t)=>On(t,e.pageSize,e.page))),Vn=(0,O.S)(Ln,Hn,Ee.qj,Ee.V2,Pn.em,Pn.tW,((e,t,n,o,r,i)=>{if(!e)return null;const s=i.length,a=Math.min(t.pageSize*t.page,s-1),l=-1===t.pageSize?s-1:Math.min(a+t.pageSize-1,s-1);if(-1===a||-1===l)return null;if(o<2)return{firstRowIndex:a,lastRowIndex:l};const c=i[a],u=l-a+1,d=r.findIndex((e=>e.id===c.id));let h=d,p=0;for(;h<r.length&&p<=u;){const e=r[h],t=n[e.id]?.depth;void 0===t?h+=1:((p<u||t>0)&&(h+=1),0===t&&(p+=1))}return{firstRowIndex:d,lastRowIndex:h-1}})),Wn=(0,O.S)(Pn.em,Vn,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),Gn=(0,O.S)(Pn.ux,Vn,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),Kn=(0,O.S)(Ln,Vn,Wn,Pn.em,((e,t,n,o)=>e?{rows:n,range:t,rowIdToIndexMap:n.reduce(((e,t,n)=>(e.set(t.id,n),e)),new Map)}:{rows:o,range:0===o.length?null:{firstRowIndex:0,lastRowIndex:o.length-1},rowIdToIndexMap:o.reduce(((e,t,n)=>(e.set(t.id,n),e)),new Map)})),Un=(e,t)=>Kn(e),qn=(e,t)=>(0,b.Nc)(e,Kn),Xn=("undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"empty").includes("firefox"),Yn=(0,O.gz)((e=>e.rowsMeta)),Qn=(0,O.gz)((e=>e.virtualization)),Jn=((0,O.Mz)(Qn,(e=>e.enabled)),(0,O.Mz)(Qn,(e=>e.enabledForColumns))),Zn=(0,O.Mz)(Qn,(e=>e.enabledForRows)),eo=(0,O.Mz)(Qn,(e=>e.renderContext)),to=(0,O.S)((e=>e.current.state.virtualization.renderContext.firstColumnIndex),(e=>e.current.state.virtualization.renderContext.lastColumnIndex),((e,t)=>({firstColumnIndex:e,lastColumnIndex:t})));function no(e,t,n){const o=r.useRef(!0);(0,we.A)((()=>{o.current=!1,e.current.register(n,t)}),[e,n,t]),o.current&&e.current.register(n,t)}const oo={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},ro=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t,i={enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:oo};return(0,o.A)({},e,{virtualization:i})},io=(0,O.gz)((e=>e.rowSpanning)),so=(0,O.Mz)(io,(e=>e.hiddenCells)),ao=(0,O.Mz)(io,(e=>e.spannedCells)),lo=(0,O.Mz)(io,(e=>e.hiddenCellOriginMap)),co=(0,O.gz)((e=>e.listViewColumn));var uo=n(3068);const ho=(0,O.gz)((e=>e.focus)),po=(0,O.Mz)(ho,(e=>e.cell)),fo=(0,O.Mz)(ho,(e=>e.columnHeader)),mo=((0,O.Mz)(ho,(e=>e.columnHeaderFilter)),(0,O.Mz)(ho,(e=>e.columnGroupHeader))),go=(0,O.gz)((e=>e.tabIndex)),bo=(0,O.Mz)(go,(e=>e.cell)),vo=(0,O.Mz)(go,(e=>e.columnHeader)),yo=((0,O.Mz)(go,(e=>e.columnHeaderFilter)),(0,O.Mz)(go,(e=>e.columnGroupHeader))),wo=(0,O.Mz)(po,eo,Kn,j.iv,((e,t,n,o)=>{if(!e)return!1;const r=n.rowIdToIndexMap.get(e.id),i=o.slice(t.firstColumnIndex,t.lastColumnIndex).findIndex((t=>t.field===e.field));return!(void 0!==r&&-1!==i&&r>=t.firstRowIndex&&r<=t.lastRowIndex)})),Co=(0,O.S)(wo,j.iv,Kn,po,((e,t,n,r)=>{if(!e)return null;const i=n.rowIdToIndexMap.get(r.id);if(void 0===i)return null;const s=t.findIndex((e=>e.field===r.field));return-1===s?null:(0,o.A)({},r,{rowIndex:i,columnIndex:s})}));function xo(e,t){return Math.round(e*10**t)/10**t}const So="undefined"!=typeof window&&/jsdom|HappyDOM/.test(window.navigator.userAgent);class Ao{constructor(e){this.data=void 0,this.data=e.ids}has(e){return this.data.has(e)}select(e){this.data.add(e)}unselect(e){this.data.delete(e)}}class Eo{constructor(e){this.data=void 0,this.data=e.ids}has(e){return!this.data.has(e)}select(e){this.data.delete(e)}unselect(e){this.data.add(e)}}const ko=e=>"include"===e.type?new Ao(e):new Eo(e),Ro=(0,O.gz)((e=>e.rowSelection)),Mo=(0,O.S)(Ro,ko),Io=(0,O.Mz)(Ro,Pn.ee,((e,t)=>"include"===e.type?e.ids.size:t-e.ids.size)),Po=(0,O.S)(Ro,Ee.rI,Ee.A6,((e,t,n)=>{const o=new Map;if("include"===e.type)for(const n of e.ids)o.set(n,t[n]);else for(let r=0;r<n.length;r+=1){const i=n[r];e.ids.has(i)||o.set(i,t[i])}return o}));var To=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(To||{});const Oo={top:0,left:0},$o=Object.freeze(new Map),Do=()=>{const e=y(),t=(0,E.A)(),{listView:n}=t,i=(0,b.Nc)(e,(()=>n?[co(e)]:(0,j.iv)(e))),s=(0,b.Nc)(e,Zn)&&!So,a=(0,b.Nc)(e,Jn)&&!So,l=(0,b.Nc)(e,Ee.$2),c=(0,j.Q1)(e),u=n?uo.u:c,d=l.bottom.length>0,[h,p]=r.useState($o),f=(0,Jt.I)(),m=(0,b.Nc)(e,Mo),g=qn(e),v=e.current.mainElementRef,w=e.current.virtualScrollerRef,C=e.current.virtualScrollbarVerticalRef,x=e.current.virtualScrollbarHorizontalRef,S=(0,b.Nc)(e,j.kw),A=r.useRef(!1),k=(0,b.Nc)(e,Z),R=(0,b.Nc)(e,ee),I=(0,b.Nc)(e,J),P=(0,b.Nc)(e,No),T=(0,b.Nc)(e,ae),O=(0,b.Nc)(e,oe),$=r.useRef(null),D=r.useCallback((t=>{if(v.current=t,!t)return;const n=t.getBoundingClientRect();let o={width:xo(n.width,1),height:xo(n.height,1)};if((!$.current||o.width!==$.current.width&&o.height!==$.current.height)&&($.current=o,e.current.publishEvent("resize",o)),"undefined"==typeof ResizeObserver)return;const r=new ResizeObserver((t=>{const n=t[0];if(!n)return;const r={width:xo(n.contentRect.width,1),height:xo(n.contentRect.height,1)};r.width===o.width&&r.height===o.height||(e.current.publishEvent("resize",r),o=r)}));return r.observe(t),Mn.A>=19?()=>{v.current=null,r.disconnect()}:void 0}),[e,v]),N=r.useRef(t.initialState?.scroll??Oo),L=r.useRef(!1),H=r.useRef(Oo),z=r.useRef(oo),F=(0,b.Nc)(e,eo),B=(0,b.Nc)(e,Co),_=(0,ve.A)(),V=r.useRef(void 0),W=(0,Rn.A)((()=>((e,t,n,o)=>({direction:To.NONE,buffer:Vo(e,To.NONE,t,n,o,300)}))(f,t.rowBufferPx,t.columnBufferPx,15*k))).current,G=r.useCallback((t=>{if(Bo(t,e.current.state.virtualization.renderContext))return;const n=t.firstRowIndex!==z.current.firstRowIndex||t.lastRowIndex!==z.current.lastRowIndex;e.current.setState((e=>(0,o.A)({},e,{virtualization:(0,o.A)({},e.virtualization,{renderContext:t})}))),Q(e).isReady&&n&&(z.current=t,e.current.publishEvent("renderedRowsIntervalChange",t)),H.current=N.current}),[e]),K=(0,ce.A)((()=>{const n=w.current;if(!n)return;const o=Q(e),r=Math.ceil(o.minimumSize.height-o.viewportOuterSize.height),i=Math.ceil(o.minimumSize.width-o.viewportInnerSize.width),l={top:Fe(n.scrollTop,0,r),left:f?Fe(n.scrollLeft,-i,0):Fe(n.scrollLeft,0,i)},c=l.left-N.current.left,u=l.top-N.current.top,d=0!==c||0!==u;N.current=l;const h=d?function(e,t){return 0===e&&0===t?To.NONE:Math.abs(t)>=Math.abs(e)?t>0?To.DOWN:To.UP:e>0?To.RIGHT:To.LEFT}(c,u):To.NONE,p=Math.abs(N.current.top-H.current.top),m=Math.abs(N.current.left-H.current.left),g=p>=k||m>=50,b=W.direction!==h;if(!g&&!b)return F;if(b)switch(h){case To.NONE:case To.LEFT:case To.RIGHT:V.current=void 0;break;default:V.current=F}W.direction=h,W.buffer=Vo(f,h,t.rowBufferPx,t.columnBufferPx,15*k,300);const v=Ho(Lo(e,t,s,a),N.current,W);return Bo(v,F)||(kn.flushSync((()=>{G(v)})),_.start(1e3,K)),v})),U=()=>{if(!Q(e).isReady&&(s||a))return;const n=Ho(Lo(e,t,s,a),N.current,W);V.current=void 0,G(n)},q=(0,ce.A)((()=>{if(L.current)return void(L.current=!1);const t=K();e.current.publishEvent("scrollPositionChange",{top:N.current.top,left:N.current.left,renderContext:t})})),X=(0,ce.A)((t=>{e.current.publishEvent("virtualScrollerWheel",{},t)})),Y=(0,ce.A)((t=>{e.current.publishEvent("virtualScrollerTouchMove",{},t)})),te=r.useMemo((()=>({overflowX:!P||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0})),[P,t.autoHeight,n]),ne=r.useMemo((()=>{const e={width:P?I:"auto",flexBasis:R,flexShrink:0};return 0===e.flexBasis&&(e.flexBasis=wt.SN),e}),[I,R,P]),re=r.useCallback((t=>{t&&e.current.publishEvent("virtualScrollerContentSizeChange",{columnsTotalWidth:I,contentHeight:R})}),[e,I,R]);return(0,we.A)((()=>{A.current&&e.current.updateRenderContext?.()}),[e,a,s]),(0,we.A)((()=>{n&&(w.current.scrollLeft=0)}),[n,w]),(n=>{const o=r.useRef(!1);(0,we.A)((()=>o.current||!n?In:(o.current=!0,(()=>{if(e.current.publishEvent("scrollPositionChange",{top:N.current.top,left:N.current.left,renderContext:F}),A.current=!0,t.initialState?.scroll&&w.current){const n=w.current,{top:o,left:r}=t.initialState.scroll,i={top:!(o>0),left:!(r>0)};if(!i.left&&I&&(n.scrollLeft=r,L.current=!0,i.left=!0),!i.top&&R&&(n.scrollTop=o,L.current=!0,i.top=!0),!i.top||!i.left){const t=e.current.subscribeEvent("virtualScrollerContentSizeChange",(e=>{!i.left&&e.columnsTotalWidth&&(n.scrollLeft=r,L.current=!0,i.left=!0),!i.top&&e.contentHeight&&(n.scrollTop=o,L.current=!0,i.top=!0),i.left&&i.top&&t()}));return t}}})())),[o.current||n])})(F!==oo),e.current.register("private",{updateRenderContext:U}),be(e,"sortedRowsSet",U),be(e,"paginationModelChange",U),be(e,"columnsChange",U),{renderContext:F,setPanels:p,getRows:(n={})=>{if(!n.rows&&!g.range)return[];const r=(0,Ee.qj)(e);let s=F;n.renderContext&&(s=n.renderContext,s.firstColumnIndex=F.firstColumnIndex,s.lastColumnIndex=F.lastColumnIndex);const a=!d&&void 0===n.position||d&&"bottom"===n.position,c=void 0!==n.position;let p;switch(n.position){case"top":p=0;break;case"bottom":p=l.top.length+g.rows.length;break;case void 0:p=l.top.length}const f=n.rows??g.rows,b=s.firstRowIndex,v=Math.min(s.lastRowIndex,f.length),y=n.rows?je(0,n.rows.length):je(b,v);let w=-1;!c&&B&&(B.rowIndex<b&&(y.unshift(B.rowIndex),w=B.rowIndex),B.rowIndex>v&&(y.push(B.rowIndex),w=B.rowIndex));const C=[],x=t.slotProps?.row,A=(0,j.Sw)(e);return y.forEach((l=>{const{id:d,model:b}=f[l];if(!r[d])return;const v=(g?.range?.firstRowIndex||0)+p+l;if(S){const t=u.left.length,n=i.length-u.right.length;e.current.calculateColSpan({rowId:d,minFirstColumn:t,maxLastColumn:n,columns:i}),u.left.length>0&&e.current.calculateColSpan({rowId:d,minFirstColumn:0,maxLastColumn:u.left.length,columns:i}),u.right.length>0&&e.current.calculateColSpan({rowId:d,minFirstColumn:i.length-u.right.length,maxLastColumn:i.length,columns:i})}const y=e.current.rowHasAutoHeight(d)?"auto":e.current.unstable_getRowHeight(d),E=m.has(d)&&e.current.isRowSelectable(d);let k=!1;void 0===n.position&&(k=0===l);let R=!1;const P=l===f.length-1;a&&(c?R=P:l===g.rows.length-1&&(R=!0));let $=s;V.current&&l>=V.current.firstRowIndex&&l<V.current.lastRowIndex&&($=V.current);const D=l===w,N=B?.rowIndex===v,L=_o(A,$,u.left.length),H=P&&"top"===n.position,z=$.firstColumnIndex,F=$.lastColumnIndex;if(C.push((0,M.jsx)(t.slots.row,(0,o.A)({row:b,rowId:d,index:v,selected:E,offsetLeft:L,columnsTotalWidth:I,rowHeight:y,pinnedColumns:u,visibleColumns:i,firstColumnIndex:z,lastColumnIndex:F,focusedColumnIndex:N?B.columnIndex:void 0,isFirstVisible:k,isLastVisible:R,isNotVisible:D,showBottomBorder:H,scrollbarWidth:T,gridHasFiller:O},x),d)),D)return;const j=h.get(d);j&&C.push(j),void 0===n.position&&P&&C.push(e.current.getInfiniteLoadingTriggerElement?.({lastRowId:d}))})),C},getContainerProps:()=>({ref:D}),getScrollerProps:()=>({ref:w,onScroll:q,onWheel:X,onTouchMove:Y,style:te,role:"presentation",tabIndex:Xn?-1:void 0}),getContentProps:()=>({style:ne,role:"presentation",ref:re}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:C,scrollPosition:N}),getScrollbarHorizontalProps:()=>({ref:x,scrollPosition:N}),getScrollAreaProps:()=>({scrollPosition:N})}};function No(e){return e.current.state.dimensions.viewportOuterSize.width>0&&e.current.state.dimensions.columnsTotalWidth>e.current.state.dimensions.viewportOuterSize.width}function Lo(e,t,n,o){const r=Q(e),i=Un(e),s=t.listView?[co(e)]:(0,j.iv)(e),a=lo(e),l=e.current.state.rows.dataRowIds.at(-1),c=s.at(-1);return{enabledForRows:n,enabledForColumns:o,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:r.leftPinnedWidth,columnsTotalWidth:r.columnsTotalWidth,viewportInnerWidth:r.viewportInnerSize.width,viewportInnerHeight:r.viewportInnerSize.height,lastRowHeight:void 0!==l?e.current.unstable_getRowHeight(l):0,lastColumnWidth:c?.computedWidth??0,rowsMeta:Yn(e),columnPositions:(0,j.Sw)(e),rows:i.rows,range:i.range,pinnedColumns:(0,j.Q1)(e),visibleColumns:s,hiddenCellsOriginMap:a,listView:t.listView??!1,virtualizeColumnsWithAutoRowHeight:t.virtualizeColumnsWithAutoRowHeight}}function Ho(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:i,left:s}=t,a=Math.abs(s)+e.leftPinnedWidth;if(e.enabledForRows){let t=Math.min(zo(e,i,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const n=e.hiddenCellsOriginMap[t];if(n){const e=Math.min(...Object.values(n));t=Math.min(t,e)}const o=e.autoHeight?t+e.rows.length:zo(e,i+e.viewportInnerHeight);r.firstRowIndex=t,r.lastRowIndex=o}if(e.listView)return(0,o.A)({},r,{lastColumnIndex:1});if(e.enabledForColumns){let t=0,o=e.columnPositions.length,i=!1;const[s,l]=jo({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});if(!e.virtualizeColumnsWithAutoRowHeight)for(let t=s;t<l&&!i;t+=1){const n=e.rows[t];i=e.apiRef.current.rowHasAutoHeight(n.id)}i&&!e.virtualizeColumnsWithAutoRowHeight||(t=Fo(a,e.columnPositions,{atStart:!0,lastPosition:e.columnsTotalWidth}),o=Fo(a+e.viewportInnerWidth,e.columnPositions)),r.firstColumnIndex=t,r.lastColumnIndex=o}const l=function(e,t,n){const[o,r]=jo({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,s]=jo({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),a=function({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:o,visibleRows:r}){let i=e,s=!1;for(;!s&&i>=0;){s=!0;for(let e=n;e<o;e+=1)if(r[e]){const n=r[e].id,o=t.current.unstable_getCellColSpanInfo(n,i);if(o&&o.spannedByColSpan&&o.leftVisibleCellIndex<i){i=o.leftVisibleCellIndex,s=!1;break}}}return i}({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:o,lastRowToRender:r,visibleRows:e.rows});return{firstRowIndex:o,lastRowIndex:r,firstColumnIndex:a,lastColumnIndex:s}}(e,r,n);return l}function zo(e,t,n){const o=e.apiRef.current.getLastMeasuredRowIndex();let r=o===1/0;e.range?.lastRowIndex&&!r&&(r=o>=e.range.lastRowIndex);const i=Fe(o-(e.range?.firstRowIndex||0),0,e.rowsMeta.positions.length);return r||e.rowsMeta.positions[i]>=t?Fo(t,e.rowsMeta.positions,n):function(e,t,n,o){let r=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=r,r*=2;return Fo(e,t,o,Math.floor(n/2),Math.min(n,t.length))}(t,e.rowsMeta.positions,i,n)}function Fo(e,t,n=void 0,o=0,r=t.length){if(t.length<=0)return-1;if(o>=r)return o;const i=o+Math.floor((r-o)/2),s=t[i];let a;return a=n?.atStart?e-((i===t.length-1?n.lastPosition:t[i+1])-s)<s:e<=s,a?Fo(e,t,n,o,i):Fo(e,t,n,i+1,r)}function jo({firstIndex:e,lastIndex:t,bufferBefore:n,bufferAfter:o,minFirstIndex:r,maxLastIndex:i,positions:s,lastSize:a}){const l=s[e]-n,c=s[t]+o,u=Fo(l,s,{atStart:!0,lastPosition:s[s.length-1]+a}),d=Fo(c,s);return[Fe(u,r,i),Fe(d,r,i)]}function Bo(e,t){return e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex}function _o(e,t,n){const o=(e[t.firstColumnIndex]??0)-(e[n]??0);return Math.abs(o)}function Vo(e,t,n,o,r,i){if(e)switch(t){case To.LEFT:t=To.RIGHT;break;case To.RIGHT:t=To.LEFT}switch(t){case To.NONE:return{rowAfter:n,rowBefore:n,columnAfter:o,columnBefore:o};case To.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case To.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case To.UP:return{rowAfter:0,rowBefore:r,columnAfter:0,columnBefore:0};case To.DOWN:return{rowAfter:r,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const Wo=(0,Y.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e&&"right"!==e})((({overlayType:e,loadingOverlayVariant:t,right:n})=>"skeleton"!==t?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,right:`${n}px`,width:0,height:0,zIndex:"loadingOverlay"===e?5:4}:{})),Go=(0,Y.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e&&"loadingOverlayVariant"!==e})({});function Ko(e){const t=(0,W.h)(),n=(0,E.A)(),r=(0,b.Nc)(t,Q);let i=Math.max(r.viewportOuterSize.height-r.topContainerHeight-r.bottomContainerHeight-(r.hasScrollX?r.scrollbarSize:0),0);0===i&&(i=wt.SN);const s=(e=>{const{classes:t}=e;return(0,d.A)({root:["overlayWrapper"],inner:["overlayWrapperInner"]},m.B,t)})((0,o.A)({},e,{classes:n.classes}));return(0,M.jsx)(Wo,(0,o.A)({className:s.root},e,{right:r.columnsTotalWidth-r.viewportOuterSize.width,children:(0,M.jsx)(Go,(0,o.A)({className:s.inner,style:{height:i,width:r.viewportOuterSize.width}},e))}))}const Uo=(0,O.gz)((e=>e.pivoting)),qo=(0,O.Mz)(Uo,(e=>e?.active)),Xo=new Map,Yo=(0,O.Mz)(Uo,(e=>e?.initialColumns||Xo));(0,O.Mz)(Uo,(e=>e?.panelOpen));var Qo=n(5009);const Jo=(0,O.gz)((e=>e.columnMenu)),Zo=p((function(){const e=y(),t=(0,E.A)(),n=(0,b.Nc)(e,j.iv),r=(0,b.Nc)(e,Pn.od),i=(0,b.Nc)(e,Qo.oF),s=(0,b.Nc)(e,vo),a=(0,b.Nc)(e,(()=>null===bo(e))),l=(0,b.Nc)(e,yo),c=(0,b.Nc)(e,fo),u=(0,b.Nc)(e,mo),d=(0,b.Nc)(e,mn),h=(0,b.Nc)(e,Jo),p=(0,b.Nc)(e,j.FY),f=(0,b.Nc)(e,fn),m=!(null===l&&null===s&&a),g=e.current.columnHeadersContainerRef;return(0,M.jsx)(t.slots.columnHeaders,(0,o.A)({ref:g,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:i,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:l,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:h,columnVisibility:p,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:m},t.slotProps?.columnHeaders))})),er=(0,Y.A)("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),tr=(0,Y.A)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>{const{ownerState:n,loadingOverlayVariant:o,overlayType:r}=e,i="skeleton"===o||"noColumnsOverlay"===r;return[t.main,n.hasPinnedRight&&t["main--hasPinnedRight"],i&&t["main--hiddenContent"]]}})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),nr=(0,s.R)(((e,t)=>{const{ownerState:n}=e,r=(0,E.A)(),i=R().hooks.useGridAriaAttributes();return(0,M.jsxs)(tr,(0,o.A)({ownerState:n,className:e.className,tabIndex:-1},i,r.slotProps?.main,{ref:t,children:[(0,M.jsx)(er,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))})),or=(0,Y.A)("div")({position:"sticky",zIndex:40,top:0});function rr(e){const t=(0,d.A)({root:["topContainer"]},m.B,{});return(0,M.jsx)(or,(0,o.A)({},e,{className:(0,l.A)(t.root,m.x["container--top"]),role:"presentation"}))}const ir=(0,Y.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScrollerContent,n.overflowedContent&&t["virtualScrollerContent--overflowed"]]}})({}),sr=(0,s.R)((function(e,t){const n=(0,E.A)(),r=!n.autoHeight&&"auto"===e.style?.minHeight,i=((e,t)=>{const{classes:n}=e,o={root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]};return(0,d.A)(o,m.B,n)})(n,r),s={classes:n.classes,overflowedContent:r};return(0,M.jsx)(ir,(0,o.A)({},e,{ownerState:s,className:(0,l.A)(i.root,e.className),ref:t}))})),ar=(0,Y.A)("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),lr=(0,Y.A)("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:g.f.cell.background.pinned}),cr=(0,Y.A)(lr)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),ur=(0,Y.A)(lr)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),dr=(0,Y.A)("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"}),hr=p((function({rowsLength:e}){const t=(0,W.h)(),{viewportOuterSize:n,minimumSize:o,hasScrollX:r,hasScrollY:i,scrollbarSize:s,leftPinnedWidth:a,rightPinnedWidth:l}=(0,b.Nc)(t,Q),c=r?s:0,u=n.height-o.height>0;return 0!==c||u?(0,M.jsxs)(ar,{className:m.x.filler,role:"presentation",style:{height:c,"--rowBorderColor":0===e?"transparent":"var(--DataGrid-rowBorderColor)"},children:[a>0&&(0,M.jsx)(cr,{className:m.x["filler--pinnedLeft"],style:{width:a}}),(0,M.jsx)(dr,{}),l>0&&(0,M.jsx)(ur,{className:m.x["filler--pinnedRight"],style:{width:l+(i?s:0)}})]}):null})),pr=["className"],fr=(0,Y.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone"})({position:"absolute",display:"flex",flexDirection:"column"}),mr=(0,s.R)((function(e,t){const{className:n}=e,r=(0,a.A)(e,pr),i=(0,W.h)(),s=(0,E.A)(),c=(e=>{const{classes:t}=e;return(0,d.A)({root:["virtualScrollerRenderZone"]},m.B,t)})(s),u=(0,b.Nc)(i,(()=>{const e=eo(i);return Yn(i).positions[e.firstRowIndex]??0}));return(0,M.jsx)(fr,(0,o.A)({className:(0,l.A)(c.root,n),ownerState:s,style:{transform:`translate3d(0, ${u}px, 0)`}},r,{ref:t}))}));var gr=n(53172);const br=(0,Y.A)("div")({position:"absolute",display:"inline-block",zIndex:60,"&:hover":{zIndex:70},"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),vr=(0,Y.A)(br)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),yr=(0,Y.A)(br)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),wr=(0,s.R)((function(e,t){const n=y(),o=(0,E.A)(),i=r.useRef(!1),s=r.useRef(0),a=r.useRef(null),l=r.useRef(null),u=((e,t)=>{const{classes:n}=e,o={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return(0,d.A)(o,m.B,n)})(o,e.position),h=(0,b.Nc)(n,Q),p="vertical"===e.position?"height":"width",f="vertical"===e.position?"scrollTop":"scrollLeft",g="vertical"===e.position?"top":"left",v="vertical"===e.position?h.hasScrollX:h.hasScrollY,w=h.minimumSize[p]+(v?h.scrollbarSize:0),C=("vertical"===e.position?h.viewportInnerSize.height:h.viewportOuterSize.width)*(w/h.viewportOuterSize[p]),x=(0,ce.A)((()=>{const t=a.current,n=e.scrollPosition.current;if(!t)return;if(n[g]===s.current)return;if(s.current=n[g],i.current)return void(i.current=!1);i.current=!0;const o=n[g]/w;t[f]=o*C})),S=(0,ce.A)((()=>{const e=n.current.virtualScrollerRef.current,t=a.current;if(!t)return;if(i.current)return void(i.current=!1);i.current=!0;const o=t[f]/C;e[f]=o*w}));(0,gr.A)((()=>{const e=n.current.virtualScrollerRef.current,t=a.current,o={passive:!0};return e.addEventListener("scroll",x,o),t.addEventListener("scroll",S,o),()=>{e.removeEventListener("scroll",x,o),t.removeEventListener("scroll",S,o)}})),r.useEffect((()=>{l.current.style.setProperty(p,`${C}px`)}),[C,p]);const A="vertical"===e.position?vr:yr;return(0,M.jsx)(A,{ref:(0,c.A)(t,a),className:u.root,style:"vertical"===e.position&&o.listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",onFocus:e=>{e.target.blur()},children:(0,M.jsx)("div",{ref:l,className:u.content})})})),Cr=(0,Y.A)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.virtualScroller,n.hasScrollX&&t["virtualScroller--hasScrollX"]]}})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0}),xr=e=>e.current.state.dimensions.rightPinnedWidth>0;function Sr(e){const t=(0,W.h)(),n=(0,E.A)(),r=(0,b.Nc)(t,ne),i=(0,b.Nc)(t,te),s=(0,b.Nc)(t,xr),a=(0,b.Nc)(t,le),{getOverlay:l,overlaysProps:c}=(()=>{const e=(0,W.h)(),t=(0,E.A)(),n=(0,b.Nc)(e,Ee.H0),r=(0,b.Nc)(e,Pn.O7),i=(0,b.Nc)(e,Ee.OQ),s=(0,b.Nc)(e,j.iv),a=0===n&&0===i,l=(0,b.Nc)(e,Ee.Dl),c=(0,b.Nc)(e,qo),u=!l&&a,d=!l&&n>0&&0===r,h=!l&&0===s.length;let p=null,f=null;u&&(p="noRowsOverlay"),h&&(p="noColumnsOverlay"),u&&c&&(p="emptyPivotOverlay"),d&&(p="noResultsOverlay"),l&&(p="loadingOverlay",f=t.slotProps?.loadingOverlay?.[a?"noRowsVariant":"variant"]??(a?"skeleton":"linear-progress"));const m={overlayType:p,loadingOverlayVariant:f};return{getOverlay:()=>{if(!p)return null;const e=t.slots?.[p],n=t.slotProps?.[p];return(0,M.jsx)(Ko,(0,o.A)({},m,{children:(0,M.jsx)(e,(0,o.A)({},n))}))},overlaysProps:m}})(),u=(0,o.A)({classes:n.classes,hasScrollX:i,hasPinnedRight:s},c),h=(e=>{const{classes:t,hasScrollX:n,hasPinnedRight:o,loadingOverlayVariant:r,overlayType:i}=e,s={root:["main",o&&"main--hasPinnedRight",("skeleton"===r||"noColumnsOverlay"===i)&&"main--hiddenContent"],scroller:["virtualScroller",n&&"virtualScroller--hasScrollX"]};return(0,d.A)(s,m.B,t)})(u),p=Do(),{getContainerProps:f,getScrollerProps:g,getContentProps:v,getRenderZoneProps:y,getScrollbarVerticalProps:w,getScrollbarHorizontalProps:C,getRows:x,getScrollAreaProps:S}=p,A=x();return(0,M.jsxs)(nr,(0,o.A)({className:h.root},f(),{ownerState:u,children:[(0,M.jsx)(En,(0,o.A)({scrollDirection:"left"},S())),(0,M.jsx)(En,(0,o.A)({scrollDirection:"right"},S())),(0,M.jsxs)(Cr,(0,o.A)({className:h.scroller},g(),{ownerState:u,children:[(0,M.jsxs)(rr,{children:[!n.listView&&(0,M.jsx)(Zo,{}),(0,M.jsx)(n.slots.pinnedRows,{position:"top",virtualScroller:p})]}),l(),(0,M.jsx)(sr,(0,o.A)({},v(),{children:(0,M.jsxs)(mr,(0,o.A)({},y(),{children:[A,(0,M.jsx)(n.slots.detailPanels,{virtualScroller:p})]}))})),a&&(0,M.jsx)(hr,{rowsLength:A.length}),(0,M.jsx)(n.slots.bottomContainer,{children:(0,M.jsx)(n.slots.pinnedRows,{position:"bottom",virtualScroller:p})})]})),i&&!n.listView&&(0,M.jsx)(wr,(0,o.A)({position:"horizontal"},C())),r&&(0,M.jsx)(wr,(0,o.A)({position:"vertical"},w())),e.children]}))}function Ar(){const e=(0,E.A)();return e.hideFooter?null:(0,M.jsx)(e.slots.footer,(0,o.A)({},e.slotProps?.footer))}const Er=["className","children","sidePanel"],kr=(0,s.R)((function(e,t){const n=(0,E.A)(),{className:i,children:s,sidePanel:h}=e,p=(0,a.A)(e,Er),f=y(),g=(0,b.Nc)(f,D),v=f.current.rootElementRef,w=r.useCallback((e=>{null!==e&&f.current.publishEvent("rootMount",e)}),[f]),C=(0,c.A)(v,t,w),S=n,A=((e,t)=>{const{autoHeight:n,classes:o,showCellVerticalBorder:r}=e,i={root:["root",n&&"autoHeight",`root--density${(0,u.A)(t)}`,null===e.slots.toolbar&&"root--noToolbar","withBorderColor",r&&"withVerticalBorder"]};return(0,d.A)(i,m.B,o)})(S,g),k=r.useContext(I);return(0,L.useSyncExternalStore)(H,z,F)?null:(0,M.jsxs)(x,(0,o.A)({className:(0,l.A)(A.root,i,k.className,h&&m.x.withSidePanel),ownerState:S},p,{ref:C,children:[(0,M.jsxs)("div",{className:m.x.mainContent,role:"presentation",children:[(0,M.jsx)(X,{}),(0,M.jsx)(Sr,{children:s}),(0,M.jsx)(Ar,{})]}),h,k.tag]}))})),Rr=p(kr);function Mr(e,t){const n=(0,Ee.qj)(e),o=(0,Qo.RJ)(e),r=(0,Pn.wx)(e),i=n[t];if(!i||"group"!==i.type)return[];const s=[];for(let a=o.findIndex((e=>e===t))+1;a<o.length&&n[o[a]]?.depth>i.depth;a+=1){const t=o[a];!1!==r[t]&&e.current.isRowSelectable(t)&&s.push(t)}return s}const Ir=(0,O.Mz)(Ee.qj,Pn.wx,Mo,((e,t,n,{groupId:o,autoSelectParents:r})=>{const i=e[o];if(!i||"group"!==i.type||n.has(o))return{isIndeterminate:!1,isChecked:n.has(o)};let s=!1,a=!1;const l=o=>{if(!1===t[o]||s&&a)return;const r=e[o];"group"===r?.type&&r.children.forEach(l),n.has(o)?s=!0:a=!0};return l(o),{isIndeterminate:s&&a,isChecked:!!r&&s&&!a}}));function Pr(e){return e.signature===Tn.DataGrid?e.checkboxSelection&&!0!==e.disableMultipleRowSelection:!e.disableMultipleRowSelection}const Tr=(e,t,n,o,r,i,s=Mo(e))=>{const a=(0,Pn.wx)(e),l=new Set([]);if((o||r)&&!1!==a[n]){if(o){const o=t[n];"group"===o?.type&&Mr(e,n).forEach((e=>{i(e),l.add(e)}))}if(r){const o=e=>{if(!s.has(e)&&!l.has(e))return!1;const n=t[e];return!!n&&("group"!==n.type||n.children.every(o))},r=n=>{const s=((e,t,n)=>{const o=e[n];if(!o)return[];const r=o.parent;return null==r?[]:e[r].children.filter((e=>e!==n&&!1!==t[e]))})(t,a,n);if(0===s.length||s.every(o)){const o=t[n],s=o?.parent;null!=s&&s!==wt.OL&&e.current.isRowSelectable(s)&&(i(s),l.add(s),r(s))}};r(n)}}},Or=(e,t,n,o,r,i)=>{const s=Mo(e);if(r||o){if(r){const e=((e,t)=>{const n=[];let o=t;for(;null!=o&&o!==wt.OL;){const t=e[o];if(!t)return n;n.push(o),o=t.parent}return n})(t,n);e.forEach((e=>{s.has(e)&&i(e)}))}if(o){const o=t[n];"group"===o?.type&&Mr(e,n).forEach((e=>{i(e)}))}}};var $r=n(55174),Dr=n(77147);function Nr({privateApiRef:e,configuration:t,props:n,children:o}){const i=r.useRef(e.current.getPublicApi());return(0,M.jsx)(k.Provider,{value:t,children:(0,M.jsx)(Dr.y.Provider,{value:n,children:(0,M.jsx)(v.Provider,{value:e,children:(0,M.jsx)($r.k.Provider,{value:i,children:(0,M.jsx)(U,{children:(0,M.jsx)(T,{children:o})})})})})})}const Lr=function(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}()&&null!=window.localStorage.getItem("DEBUG"),Hr=()=>{},zr={debug:Hr,info:Hr,warn:Hr,error:Hr},Fr=["debug","info","warn","error"];function jr(e,t,n=console){const o=Fr.indexOf(t);if(-1===o)throw new Error(`MUI X: Log level ${t} not recognized.`);return Fr.reduce(((t,r,i)=>(t[r]=i>=o?(...t)=>{const[o,...i]=t;n[r](`MUI X: ${e} - ${o}`,...i)}:Hr,t)),{})}var Br=n(20816);let _r=function(e){return e.DataSource="dataSource",e.RowTree="rowTree",e}({});const Vr="none",Wr={dataSourceRowsUpdate:_r.DataSource,rowTreeCreation:_r.RowTree,filtering:_r.RowTree,sorting:_r.RowTree,visibleRowsLookupCreation:_r.RowTree},Gr=(e,t)=>(0,o.A)({},e,{props:{getRowId:t.getRowId}}),Kr=(e,t,n)=>{const o=r.useRef(!1);o.current||(t.current.state=e(t.current.state,n,t),o.current=!0)};function Ur(e,t){const n=r.useRef(null);if(n.current)return n.current;const o=e.current.getLogger(t);return n.current=o,o}const qr=(e,t,n,o,r)=>{const i=Ur(e,"useNativeEventListener");be(e,"rootMount",(()=>{const e=t();if(e&&n)return i.debug(`Binding native ${n} event`),e.addEventListener(n,o,r),()=>{i.debug(`Clearing native ${n} event`),e.removeEventListener(n,o,r)}}))},Xr=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],Yr=(0,s.R)((function(e,t){const{field:n,id:i,rowNode:s,tabIndex:l}=e,c=(0,a.A)(e,Xr),u=(0,W.h)(),h=(0,E.A)(),p=(e=>{const{classes:t}=e;return(0,d.A)({root:["checkboxInput"]},m.B,t)})({classes:h.classes});r.useLayoutEffect((()=>{if(0===l){const e=u.current.getCellElement(i,n);e&&(e.tabIndex=-1)}}),[u,l,i,n]);const f=r.useCallback((e=>{" "===e.key&&e.stopPropagation()}),[]),g=u.current.isRowSelectable(i),{isIndeterminate:v,isChecked:y}=(0,b.Nc)(u,Ir,{groupId:i,autoSelectParents:h.rowSelectionPropagation?.parents??!1});if("footer"===s.type||"pinnedRow"===s.type)return null;const w=u.current.getLocaleText(y&&!v?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,M.jsx)(h.slots.baseCheckbox,(0,o.A)({tabIndex:l,checked:y&&!v,onChange:e=>{const t={value:e.target.checked,id:i};u.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:p.root,slotProps:{htmlInput:{"aria-label":w,name:"select_row"}},onKeyDown:f,indeterminate:v,disabled:!g},h.slotProps?.baseCheckbox,c,{ref:t}))})),Qr=Yr,Jr=["field","colDef"],Zr=(0,s.R)((function(e,t){const n=(0,a.A)(e,Jr),[,i]=r.useState(!1),s=(0,W.h)(),l=(0,E.A)(),c=(e=>{const{classes:t}=e;return(0,d.A)({root:["checkboxInput"]},m.B,t)})({classes:l.classes}),u=(0,b.Nc)(s,vo),h=(0,b.Nc)(s,Ro),p=(0,b.Nc)(s,Pn.ux),f=(0,b.Nc)(s,Gn),g=r.useMemo((()=>{const e=l.isRowSelectable;if("function"!=typeof e)return h;if("exclude"===h.type)return h;const t={type:"include",ids:new Set};for(const n of h.ids)l.keepNonExistentRowsSelected&&t.ids.add(n),s.current.getRow(n)&&e(s.current.getRowParams(n))&&t.ids.add(n);return t}),[s,l.isRowSelectable,l.keepNonExistentRowsSelected,h]),v=r.useMemo((()=>{const e=l.pagination&&l.checkboxSelectionVisibleOnly&&"server"!==l.paginationMode?f:p,t=new Set;for(let n=0;n<e.length;n+=1){const o=e[n];s.current.getRow(o)&&s.current.isRowSelectable(o)&&t.add(o)}return t}),[s,l.pagination,l.paginationMode,l.checkboxSelectionVisibleOnly,f,p]),y=r.useMemo((()=>{const e=ko(g);let t=0;for(const n of v)e.has(n)&&(t+=1);return t}),[g,v]),w=r.useMemo((()=>{if(0===g.ids.size)return!1;const e=ko(g);for(const t of v)if(!e.has(t))return!0;return!1}),[g,v]),C=y>0,x=null!==u&&u.field===e.field?0:-1;r.useLayoutEffect((()=>{const t=s.current.getColumnHeaderElement(e.field);0===x&&t&&(t.tabIndex=-1)}),[x,s,e.field]);const S=r.useCallback((e=>{" "===e.key&&s.current.publishEvent("headerSelectionCheckboxChange",{value:!C})}),[s,C]),A=r.useCallback((()=>{i((e=>!e))}),[]);r.useEffect((()=>s.current.subscribeEvent("rowSelectionChange",A)),[s,A]);const k=s.current.getLocaleText(C&&!w?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,M.jsx)(l.slots.baseCheckbox,(0,o.A)({indeterminate:w,checked:C&&!w,onChange:e=>{const t={value:e.target.checked};s.current.publishEvent("headerSelectionCheckboxChange",t)},className:c.root,slotProps:{htmlInput:{"aria-label":k,name:"select_all_rows"}},tabIndex:x,onKeyDown:S,disabled:!Pr(l)},l.slotProps?.baseCheckbox,n,{ref:t}))})),ei="__check__",ti=(0,o.A)({},Nt,{type:"custom",field:ei,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:()=>null,display:"flex",valueGetter:(e,t,n,o)=>{const r=Ct(o,t);return o.current.isRowSelected(r)},renderHeader:e=>(0,M.jsx)(Zr,(0,o.A)({},e)),renderCell:e=>(0,M.jsx)(Qr,(0,o.A)({},e))});function ni(e,t){if(null==e)return"";const n="string"==typeof e?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const e=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(e[0])?`"'${e}"`:[t.delimiter,"\n","\r",'"'].some((e=>n.includes(e)))?`"${e}"`:e}return n}const oi=(e,t)=>{const{csvOptions:n,ignoreValueFormatter:o}=t;let r;if(o){const t=e.colDef.type;r="number"===t?String(e.value):"date"===t||"dateTime"===t?e.value?.toISOString():"function"==typeof e.value?.toString?e.value.toString():e.value}else r=e.formattedValue;return ni(r,n)};class ri{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}function ii(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const si=e=>0===e.indexOf("Arrow")||0===e.indexOf("Page")||" "===e||"Home"===e||"End"===e,ai=e=>"Tab"===e||"Escape"===e;function li(e){return(e.ctrlKey||e.metaKey)&&"V"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}function ci(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const o=window.getSelection();o.removeAllRanges(),o.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const ui=e=>(0,o.A)({},e,{columnMenu:{open:!1}}),di=e=>{const t=r.useRef(!0);t.current&&(t.current=!1,e())},hi=(e,t,n,o=!0)=>{const i=r.useRef(null),s=r.useRef(`mui-${Math.round(1e9*Math.random())}`),a=r.useCallback((()=>{i.current=e.current.registerPipeProcessor(t,s.current,n)}),[e,n,t]);di((()=>{o&&a()}));const l=r.useRef(!0);r.useEffect((()=>(l.current?l.current=!1:o&&a(),()=>{i.current&&(i.current(),i.current=null)})),[a,o])},pi=(e,t,n)=>{const o=r.useRef(null),i=r.useRef(`mui-${Math.round(1e9*Math.random())}`),s=r.useCallback((()=>{o.current=e.current.registerPipeApplier(t,i.current,n)}),[e,n,t]);di((()=>{s()}));const a=r.useRef(!0);r.useEffect((()=>(a.current?a.current=!1:s(),()=>{o.current&&(o.current(),o.current=null)})),[s])},fi=(e,t,n)=>{const r=wn({apiRef:n,columnsToUpsert:t.columns,initialState:t.initialState?.columns,columnVisibilityModel:t.columnVisibilityModel??t.initialState?.columns?.columnVisibilityModel??{},keepOnlyColumnsToUpsert:!0});return(0,o.A)({},e,{columns:r,pinnedColumns:e.pinnedColumns??uo.u})};function mi(e){return t=>(0,o.A)({},t,{columns:e})}const gi=(e,t)=>(0,o.A)({},e,{density:t.initialState?.density??t.density??"standard"}),bi=({apiRef:e,options:t})=>{const n=(0,j.OV)(e);return t.fields?t.fields.reduce(((e,t)=>{const o=n.find((e=>e.field===t));return o&&e.push(o),e}),[]):(t.allColumns?n:(0,j.iv)(e)).filter((e=>!e.disableExport))},vi=({apiRef:e})=>{const t=(0,Pn.qA)(e),n=(0,Ee.qj)(e),o=Io(e),r=t.filter((e=>"footer"!==n[e].type)),i=(0,Ee.$2)(e),s=i?.top?.map((e=>e.id))||[],a=i?.bottom?.map((e=>e.id))||[];if(r.unshift(...s),r.push(...a),o>0){const t=Po(e);return r.filter((e=>t.has(e)))}return r},yi=(0,s.R)((function(e,t){const{children:n,slotProps:i={}}=e,s=i.button||{},a=i.tooltip||{},l=(0,W.h)(),u=(0,E.A)(),d=(0,$e.A)(),h=(0,$e.A)(),[p,f]=r.useState(!1),g=r.useRef(null),b=(0,c.A)(t,g),v=()=>f(!1);return null==n?null:(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(u.slots.baseTooltip,(0,o.A)({title:l.current.getLocaleText("toolbarExportLabel"),enterDelay:1e3},u.slotProps?.baseTooltip,a,{children:(0,M.jsx)(u.slots.baseButton,(0,o.A)({size:"small",startIcon:(0,M.jsx)(u.slots.exportIcon,{}),"aria-expanded":p,"aria-label":l.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":p?h:void 0,id:d},u.slotProps?.baseButton,s,{onClick:e=>{f((e=>!e)),s.onClick?.(e)},ref:b,children:l.current.getLocaleText("toolbarExport")}))})),(0,M.jsx)(tn,{open:p,target:g.current,onClose:v,position:"bottom-end",children:(0,M.jsx)(u.slots.baseMenuList,{id:h,className:m.x.menuList,"aria-labelledby":d,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),ai(e.key)&&v()},autoFocusItem:p,children:r.Children.map(n,(e=>r.isValidElement(e)?r.cloneElement(e,{hideMenu:v}):e))})})]})})),wi=["hideMenu","options"],Ci=["hideMenu","options"],xi=["csvOptions","printOptions","excelOptions"];function Si(e){const t=(0,W.h)(),n=(0,E.A)(),{hideMenu:r,options:i}=e,s=(0,a.A)(e,wi);return(0,M.jsx)(n.slots.baseMenuItem,(0,o.A)({onClick:()=>{t.current.exportDataAsCsv(i),r?.()}},s,{children:t.current.getLocaleText("toolbarExportCSV")}))}function Ai(e){const t=(0,W.h)(),n=(0,E.A)(),{hideMenu:r,options:i}=e,s=(0,a.A)(e,Ci);return(0,M.jsx)(n.slots.baseMenuItem,(0,o.A)({onClick:()=>{t.current.exportDataAsPrint(i),r?.()}},s,{children:t.current.getLocaleText("toolbarExportPrint")}))}(0,s.R)((function(e,t){const n=e,{csvOptions:i={},printOptions:s={},excelOptions:l}=n,c=(0,a.A)(n,xi),u=(0,W.h)().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:l,csvOptions:i,printOptions:s}).sort(((e,t)=>e.componentName>t.componentName?1:-1));return 0===u.length?null:(0,M.jsx)(yi,(0,o.A)({},c,{ref:t,children:u.map(((e,t)=>r.cloneElement(e.component,{key:t})))}))}));const Ei=(e,t)=>{const n=Ur(e,"useGridCsvExport"),o=t.ignoreValueFormatterDuringExport,i=("object"==typeof o?o?.csvExport:o)||!1,s=r.useCallback(((t={})=>(n.debug("Get data as CSV"),function(e){const{columns:t,rowIds:n,csvOptions:o,ignoreValueFormatter:r,apiRef:i}=e,s=n.reduce(((e,n)=>`${e}${(({id:e,columns:t,getCellParams:n,csvOptions:o,ignoreValueFormatter:r})=>{const i=new ri({csvOptions:o});return t.forEach((t=>{const s=n(e,t.field);i.addValue(oi(s,{ignoreValueFormatter:r,csvOptions:o}))})),i.getRowString()})({id:n,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:r,csvOptions:o})}\r\n`),"").trim();if(!o.includeHeaders)return s;const a=t.filter((e=>e.field!==ti.field)),l=[];if(o.includeColumnGroupsHeaders){const e=i.current.getAllGroupDetails();let t=0;const n=a.reduce(((e,n)=>{const o=i.current.getColumnGroupPath(n.field);return e[n.field]=o,t=Math.max(t,o.length),e}),{});for(let r=0;r<t;r+=1){const t=new ri({csvOptions:o,sanitizeCellValue:ni});l.push(t),a.forEach((o=>{const i=(n[o.field]||[])[r],s=e[i];t.addValue(s?s.headerName||s.groupId:"")}))}}const c=new ri({csvOptions:o,sanitizeCellValue:ni});return a.forEach((e=>{c.addValue(e.headerName||e.field)})),l.push(c),`${l.map((e=>e.getRowString())).join("\r\n")}\r\n${s}`.trim()}({columns:bi({apiRef:e,options:t}),rowIds:(t.getRowsToExport??vi)({apiRef:e}),csvOptions:{delimiter:t.delimiter||",",shouldAppendQuotes:t.shouldAppendQuotes??!0,includeHeaders:t.includeHeaders??!0,includeColumnGroupsHeaders:t.includeColumnGroupsHeaders??!0,escapeFormulas:t.escapeFormulas??!0},ignoreValueFormatter:i,apiRef:e}))),[n,e,i]),a=r.useCallback((e=>{n.debug("Export data as CSV");const t=s(e);!function(e,t="csv",n=document.title||"untitled"){const o=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),n=document.createElement("a");return n.href=t,n.download=o,n.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI X: exportAs not supported.")}(new Blob([e?.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",e?.fileName)}),[n,s]);no(e,{getDataAsCsv:s,exportDataAsCsv:a},"public");const l=r.useCallback(((e,t)=>t.csvOptions?.disableToolbarButton?e:[...e,{component:(0,M.jsx)(Si,{options:t.csvOptions}),componentName:"csvExport"}]),[]);hi(e,"exportMenu",l)};var ki=n(10644),Ri=n(322);const Mi=(e,t,n)=>{let r=e.paginationModel;const i=e.rowCount,s=n?.pageSize??r.pageSize,a=n?.page??r.page,l=On(i,s,a);!n||n?.page===r.page&&n?.pageSize===r.pageSize||(r=n);const c=-1===s?0:((e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0))(r.page,l);return c!==r.page&&(r=(0,o.A)({},r,{page:c})),Dn(r.pageSize,t),r};var Ii=n(25508);const Pi=(e,t,n,o)=>{const i=r.useCallback((()=>{e.current.registerStrategyProcessor(t,n,o)}),[e,o,n,t]);di((()=>{i()}));const s=r.useRef(!0);r.useEffect((()=>{s.current?s.current=!1:i()}),[i])},Ti=(e,t,n)=>{const r=t.filterModel??t.initialState?.filter?.filterModel??Ke();return(0,o.A)({},e,{filter:(0,o.A)({filterModel:Ye(r,t.disableMultipleColumnsFiltering,n)},Ge),visibleRowsLookup:{}})},Oi=e=>e.filteredRowsLookup;function $i(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function Di(){return(0,Ii.i5)(Object.values)}const Ni=e=>(0,o.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}});function Li(e,t){return e.closest(`.${t}`)}function Hi(e){return e.replace(/["\\]/g,"\\$&")}function zi(e){return`.${m.x.row}[data-id="${Hi(String(e))}"]`}function Fi(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}function ji(e,t){return e.rootElementRef.current.querySelector(`.${m.x[t]}`)}const Bi=({api:e,colIndex:t,position:n,filterFn:o})=>{if(null===t)return[];const r=[];return Vi(e).forEach((e=>{e.getAttribute("data-id")&&e.querySelectorAll(`.${m.x["left"===n?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach((e=>{const t=Wi(e);null!==t&&o(t)&&r.push(e)}))})),r},_i=({api:e,colIndex:t,position:n,filterFn:o})=>{if(!e.columnHeadersContainerRef?.current)return[];if(null===t)return[];const r=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${m.x["left"===n?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach((e=>{const t=Wi(e);null!==t&&o(t,e)&&r.push(e)})),r};function Vi(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${m.x.row}`)}function Wi(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}const Gi=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:o})=>{if(o){if(e<n)return e+1}else if(!o&&e>t)return e-1;return null},Ki=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:o})=>{if(o){if(e>t)return e-1}else if(!o&&e<n)return e+1;return null},Ui=(0,O.S)(Kn,Ee.$2,((e,t)=>(t.top||[]).concat(e.rows,t.bottom||[]))),qi=(e,t)=>{const n=(0,o.A)({},$n(t.autoPageSize),t.paginationModel??t.initialState?.pagination?.paginationModel);Dn(n.pageSize,t.signature);const r=t.rowCount??t.initialState?.pagination?.rowCount??("client"===t.paginationMode?e.rows?.totalRowCount:void 0),i=t.paginationMeta??t.initialState?.pagination?.meta??{};return(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{paginationModel:n,rowCount:r,meta:i,enabled:!0===t.pagination,paginationMode:t.paginationMode})})},Xi=(e,t)=>(0,o.A)({},e,{preferencePanel:t.initialState?.preferencePanel??{open:!1}}),Yi=(0,O.gz)((e=>e.editRows)),Qi=(0,O.Mz)(Yi,((e,{rowId:t,editMode:n})=>n===zt.Row&&Boolean(e[t]))),Ji=(0,O.Mz)(Yi,((e,{rowId:t,field:n})=>e[t]?.[n]??null)),Zi=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;default:return""}},es=["id","field"],ts=["id","field"];var ns=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(ns||{}),os=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(os||{});const rs=["id"],is=["id"],ss=e=>(0,o.A)({},e,{editRows:{}});var as=n(34790);const ls=(e,t,n)=>{const r=!!t.dataSource;return n.current.caches.rows=(0,wt.Z)({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,o.A)({},e,{rows:(0,wt.TW)({apiRef:n,rowCountProp:t.rowCount,loadingProp:!!r||t.loading,previousTree:null,previousTreeDepths:null})})},cs=e=>"full"===e.updates.type?(e=>{const t={[wt.OL]:(0,o.A)({},(0,wt.Mk)(),{children:e})};for(let n=0;n<e.length;n+=1){const o=e[n];t[o]={id:o,depth:0,parent:wt.OL,type:"leaf",groupingKey:null}}return{groupingName:Vr,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(({previousTree:e,actions:t})=>{const n=(0,o.A)({},e),r={};for(let e=0;e<t.remove.length;e+=1){const o=t.remove[e];r[o]=!0,delete n[o]}for(let e=0;e<t.insert.length;e+=1){const o=t.insert[e];n[o]={id:o,depth:0,parent:wt.OL,type:"leaf",groupingKey:null}}const i=n[wt.OL];let s=[...i.children,...t.insert];return Object.values(r).length&&(s=s.filter((e=>!r[e]))),n[wt.OL]=(0,o.A)({},i,{children:s}),{groupingName:Vr,tree:n,treeDepths:{0:s.length},dataRowIds:s}})({previousTree:e.previousTree,actions:e.updates.actions});class us extends Error{}const ds={type:"include",ids:new Set},hs=(e,t)=>(0,o.A)({},e,{rowSelection:t.rowSelection?t.rowSelectionModel??ds:ds}),ps=(e,t)=>{const n=t.sortModel??t.initialState?.sorting?.sortModel??[];return(0,o.A)({},e,{sorting:{sortModel:ke(n,t.disableMultipleColumnsSorting),sortedRows:[]}})};function fs(e){const{containerSize:t,scrollPosition:n,elementSize:o,elementOffset:r}=e,i=r+o;return o>t?r:i-t>n?i-t:r<n?r:void 0}const ms={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:"\t",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:zt.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rows:[],rowSelection:!0,rowSpacingType:"margin",rowSpanning:!1,showCellVerticalBorder:!1,showColumnVerticalBorder:!1,showToolbar:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,virtualizeColumnsWithAutoRowHeight:!1},gs={width:0,height:0},bs={isReady:!1,root:gs,viewportOuterSize:gs,viewportInnerSize:gs,contentSize:gs,minimumSize:gs,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},vs=(e,t,n)=>{const r=bs,i=N(n);return(0,o.A)({},e,{dimensions:(0,o.A)({},r,Cs(t,n,i,(0,j.Q1)(n)))})},ys=(0,O.Mz)(j.iv,j.Sw,((e,t)=>{const n=e.length;return 0===n?0:xo(t[n-1]+e[n-1].computedWidth,1)}));function ws(e,t){const n=(t,n)=>e.style.setProperty(t,n);n("--DataGrid-hasScrollX",`${Number(t.hasScrollX)}`),n("--DataGrid-hasScrollY",`${Number(t.hasScrollY)}`),n("--DataGrid-scrollbarSize",`${t.scrollbarSize}px`),n("--DataGrid-rowWidth",`${t.rowWidth}px`),n("--DataGrid-columnsTotalWidth",`${t.columnsTotalWidth}px`),n("--DataGrid-leftPinnedWidth",`${t.leftPinnedWidth}px`),n("--DataGrid-rightPinnedWidth",`${t.rightPinnedWidth}px`),n("--DataGrid-headerHeight",`${t.headerHeight}px`),n("--DataGrid-headersTotalHeight",`${t.headersTotalHeight}px`),n("--DataGrid-topContainerHeight",`${t.topContainerHeight}px`),n("--DataGrid-bottomContainerHeight",`${t.bottomContainerHeight}px`),n("--height",`${t.rowHeight}px`)}function Cs(e,t,n,o){const r=(0,wt.Qy)(e.rowHeight,ms.rowHeight,wt.Oq);return{rowHeight:Math.floor(r*n),headerHeight:Math.floor(e.columnHeaderHeight*n),groupHeaderHeight:Math.floor((e.columnGroupHeaderHeight??e.columnHeaderHeight)*n),headerFilterHeight:Math.floor((e.headerFilterHeight??e.columnHeaderHeight)*n),columnsTotalWidth:ys(t),headersTotalHeight:Cn(t,e),leftPinnedWidth:o.left.reduce(((e,t)=>e+t.computedWidth),0),rightPinnedWidth:o.right.reduce(((e,t)=>e+t.computedWidth),0)}}const xs=new WeakMap,Ss=void 0!==globalThis.ResizeObserver?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},As=(e,t,n)=>{n.current.caches.rowsMeta={heights:new Map};const r=Z(n),i=(0,Ee.H0)(n),s=Nn(n),a=Math.min(s.enabled?s.paginationModel.pageSize:i,i);return(0,o.A)({},e,{rowsMeta:{currentPageTotalHeight:a*r,positions:Array.from({length:a},((e,t)=>t*r)),pinnedTopRowsTotalHeight:0,pinnedBottomRowsTotalHeight:0}})};function Es(e){const{apiRef:t,lookup:n,columnIndex:o,rowId:r,minFirstColumnIndex:i,maxLastColumnIndex:s,columns:a}=e,l=a.length,c=a[o],u=t.current.getRow(r),d=t.current.getRowValue(u,c),h="function"==typeof c.colSpan?c.colSpan(d,u,c,t):c.colSpan;if(!h||1===h)return ks(n,r,o,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let p=c.computedWidth;for(let e=1;e<h;e+=1){const t=o+e;t>=i&&t<s&&(p+=a[t].computedWidth,ks(n,r,o+e,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(o+h,l-1),leftVisibleCellIndex:o})),ks(n,r,o,{spannedByColSpan:!1,cellProps:{colSpan:h,width:p}})}return{colSpan:h}}function ks(e,t,n,o){e[t]||(e[t]={}),e[t][n]=o}function Rs(e){return void 0!==e.field}const Ms=(e,t,n)=>{if(Rs(e)){if(void 0!==n[e.field])throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:o,children:r}=e;r.forEach((e=>{Ms(e,[...t,o],n)}))},Is=e=>{if(!e)return{};const t={};return e.forEach((e=>{Ms(e,[],t)})),t},Ps=(e,t,n)=>{const o=e=>t[e]??[],r=[],i=Math.max(...e.map((e=>o(e).length))),s=(e,t,n)=>(0,Ri.H)(o(e).slice(0,n+1),o(t).slice(0,n+1));for(let t=0;t<i;t+=1){const i=e.reduce(((e,r)=>{const i=o(r)[t]??null;if(0===e.length)return[{columnFields:[r],groupId:i}];const a=e[e.length-1],l=a.columnFields[a.columnFields.length-1];return a.groupId!==i||!s(l,r,t)||(c=l,u=r,n?.left&&n.left.includes(c)&&!n.left.includes(u)||n?.right&&!n.right.includes(c)&&n.right.includes(u))?[...e,{columnFields:[r],groupId:i}]:[...e.slice(0,e.length-1),{columnFields:[...a.columnFields,r],groupId:i}];var c,u}),[]);r.push(i)}return r},Ts=["groupId","children"],Os=e=>{let t={};return e.forEach((e=>{if(Rs(e))return;const{groupId:n,children:r}=e,i=(0,a.A)(e,Ts);if(!n)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const s=(0,o.A)({},i,{groupId:n}),l=Os(r);if(void 0!==l[n]||void 0!==t[n])throw new Error(`MUI X: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=(0,o.A)({},t,l,{[n]:s})})),(0,o.A)({},t)},$s=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=(0,j.JR)(n),i=(0,j.TI)(n),s=Os(t.columnGroupingModel??[]),a=Is(t.columnGroupingModel??[]),l=Ps(r,a,n.current.state.pinnedColumns??{}),c=0===i.length?0:Math.max(...i.map((e=>a[e]?.length??0)));return(0,o.A)({},e,{columnGrouping:{lookup:s,unwrappedGroupingModel:a,headerStructure:l,maxDepth:c}})},Ds={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1,disableColumnVirtualization:!0};function Ns(e,t){if(void 0!==t&&e.changedTouches){for(let n=0;n<e.changedTouches.length;n+=1){const o=e.changedTouches[n];if(o.identifier===t)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function Ls(e,t,n,o){let r=e;return r+="Right"===o?t-n.left:n.right-t,r}function Hs(e){e.preventDefault(),e.stopImmediatePropagation()}const zs=e=>(0,o.A)({},e,{columnResize:{resizingColumnField:""}});function Fs(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const js=(e,t)=>{const n=(0,Jt.I)(),i=Ur(e,"useGridColumnResize"),s=(0,Rn.A)(Fs).current,a=r.useRef(null),l=r.useRef(null),c=(0,ve.A)(),u=r.useRef(void 0),d=t=>{i.debug(`Updating width to ${t} for col ${s.colDef.field}`);const n=s.columnHeaderElement.offsetWidth,o=t-n,r=t-s.initialColWidth;if(r>0){const t=s.initialTotalWidth+r;e.current.rootElementRef?.current?.style.setProperty("--DataGrid-rowWidth",`${t}px`)}s.colDef.computedWidth=t,s.colDef.width=t,s.colDef.flex=0,s.columnHeaderElement.style.width=`${t}px`;const a=s.headerFilterElement;a&&(a.style.width=`${t}px`),s.groupHeaderElements.forEach((e=>{const n=e;let r;r="1"===n.getAttribute("aria-colspan")?`${t}px`:`${n.offsetWidth+o}px`,n.style.width=r})),s.cellElements.forEach((e=>{const n=e;let r;r="1"===n.getAttribute("aria-colspan")?`${t}px`:`${n.offsetWidth+o}px`,n.style.setProperty("--width",r)}));const l=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,s.colDef.field);l===uo.K.LEFT&&(Bs(s.fillerLeft,"width",o),s.leftPinnedCellsAfter.forEach((e=>{Bs(e,"left",o)})),s.leftPinnedHeadersAfter.forEach((e=>{Bs(e,"left",o)}))),l===uo.K.RIGHT&&(Bs(s.fillerRight,"width",o),s.rightPinnedCellsBefore.forEach((e=>{Bs(e,"right",o)})),s.rightPinnedHeadersBefore.forEach((e=>{Bs(e,"right",o)})))},h=t=>{if(C(),s.previousMouseClickEvent){const n=s.previousMouseClickEvent,o=n.timeStamp,r=n.clientX,i=n.clientY;if(t.timeStamp-o<300&&t.clientX===r&&t.clientY===i)return s.previousMouseClickEvent=void 0,void e.current.publishEvent("columnResizeStop",null,t)}if(s.colDef){e.current.setColumnWidth(s.colDef.field,s.colDef.width),i.debug(`Updating col ${s.colDef.field} with new width: ${s.colDef.width}`);const t=(0,j.em)(e);s.groupHeaderElements.forEach((e=>{const n=e,o=`${e.getAttribute("data-fields").slice(2,-2).split("-|-").reduce(((e,n)=>!1!==t.columnVisibilityModel[n]?e+t.lookup[n].computedWidth:e),0)}px`;n.style.width=o}))}c.start(0,(()=>{e.current.publishEvent("columnResizeStop",null,t)}))},p=(t,o,r)=>{const i=e.current.rootElementRef.current;var c,u;s.initialColWidth=t.computedWidth,s.initialTotalWidth=e.current.getRootDimensions().rowWidth,s.colDef=t,s.columnHeaderElement=(c=e.current.columnHeadersContainerRef.current,u=t.field,c.querySelector(`[data-field="${Hi(u)}"]`));const d=i.querySelector(`.${m.x.headerFilterRow} [data-field="${Hi(t.field)}"]`);d&&(s.headerFilterElement=d),s.groupHeaderElements=function(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${Hi(t)}-|"]`)??[])}(e.current.columnHeadersContainerRef?.current,t.field),s.cellElements=function(e,t){if(!Li(e,m.x.root))throw new Error("MUI X: The root element is not found.");const n=e.getAttribute("aria-colindex");if(!n)return[];const o=Number(n)-1,r=[];return t.virtualScrollerRef?.current?(Vi(t).forEach((e=>{const n=e.getAttribute("data-id");if(!n)return;let i=o;const s=t.unstable_getCellColSpanInfo(n,o);s&&s.spannedByColSpan&&(i=s.leftVisibleCellIndex);const a=e.querySelector(`[data-colindex="${i}"]`);a&&r.push(a)})),r):[]}(s.columnHeaderElement,e.current),s.fillerLeft=ji(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),s.fillerRight=ji(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const h=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,s.colDef.field);s.leftPinnedCellsAfter=h!==uo.K.LEFT?[]:function(e,t,n){const o=Wi(t);return Bi({api:e,colIndex:o,position:n?"right":"left",filterFn:e=>n?e<o:e>o})}(e.current,s.columnHeaderElement,n),s.rightPinnedCellsBefore=h!==uo.K.RIGHT?[]:function(e,t,n){const o=Wi(t);return Bi({api:e,colIndex:o,position:n?"left":"right",filterFn:e=>n?e>o:e<o})}(e.current,s.columnHeaderElement,n),s.leftPinnedHeadersAfter=h!==uo.K.LEFT?[]:function(e,t,n){const o=Wi(t);return _i({api:e,position:n?"right":"left",colIndex:o,filterFn:e=>n?e<o:e>o})}(e.current,s.columnHeaderElement,n),s.rightPinnedHeadersBefore=h!==uo.K.RIGHT?[]:function(e,t,n){const o=Wi(t);return _i({api:e,position:n?"left":"right",colIndex:o,filterFn:(e,t)=>!t.classList.contains(m.x["columnHeader--last"])&&(n?e>o:e<o)})}(e.current,s.columnHeaderElement,n),l.current=function(e,t){const n=e.classList.contains(m.x["columnSeparator--sideRight"])?"Right":"Left";return t?function(e){return"Right"===e?"Left":"Right"}(n):n}(o,n),a.current=function(e,t,n){return"Left"===n?e-t.left:t.right-e}(r,s.columnHeaderElement.getBoundingClientRect(),l.current)},f=(0,ce.A)(h),g=(0,ce.A)((t=>{if(0===t.buttons)return void f(t);let n=Ls(a.current,t.clientX,s.columnHeaderElement.getBoundingClientRect(),l.current);n=Fe(n,s.colDef.minWidth,s.colDef.maxWidth),d(n);const o={element:s.columnHeaderElement,colDef:s.colDef,width:n};e.current.publishEvent("columnResize",o,t)})),v=(0,ce.A)((e=>{Ns(e,u.current)&&h(e)})),y=(0,ce.A)((t=>{const n=Ns(t,u.current);if(!n)return;if("mousemove"===t.type&&0===t.buttons)return void v(t);let o=Ls(a.current,n.x,s.columnHeaderElement.getBoundingClientRect(),l.current);o=Fe(o,s.colDef.minWidth,s.colDef.maxWidth),d(o);const r={element:s.columnHeaderElement,colDef:s.colDef,width:o};e.current.publishEvent("columnResize",r,t)})),w=(0,ce.A)((t=>{const n=Li(t.target,m.x["columnSeparator--resizable"]);if(!n)return;const o=t.changedTouches[0];null!=o&&(u.current=o.identifier);const r=Li(t.target,m.x.columnHeader).getAttribute("data-field"),s=e.current.getColumn(r);i.debug(`Start Resize on col ${s.field}`),e.current.publishEvent("columnResizeStart",{field:r},t),p(s,n,o.clientX);const a=(0,ki.A)(t.currentTarget);a.addEventListener("touchmove",y),a.addEventListener("touchend",v)})),C=r.useCallback((()=>{const t=(0,ki.A)(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",g),t.removeEventListener("mouseup",f),t.removeEventListener("touchmove",y),t.removeEventListener("touchend",v),setTimeout((()=>{t.removeEventListener("click",Hs,!0)}),100),s.columnHeaderElement&&(s.columnHeaderElement.style.pointerEvents="unset")}),[e,s,g,f,y,v]),x=r.useCallback((({field:t})=>{e.current.setState((e=>(0,o.A)({},e,{columnResize:(0,o.A)({},e.columnResize,{resizingColumnField:t})})))}),[e]),S=r.useCallback((()=>{e.current.setState((e=>(0,o.A)({},e,{columnResize:(0,o.A)({},e.columnResize,{resizingColumnField:""})})))}),[e]),A=(0,ce.A)((({colDef:t},n)=>{if(0!==n.button)return;if(!n.currentTarget.classList.contains(m.x["columnSeparator--resizable"]))return;n.preventDefault(),i.debug(`Start Resize on col ${t.field}`),e.current.publishEvent("columnResizeStart",{field:t.field},n),p(t,n.currentTarget,n.clientX);const o=(0,ki.A)(e.current.rootElementRef.current);o.body.style.cursor="col-resize",s.previousMouseClickEvent=n.nativeEvent,o.addEventListener("mousemove",g),o.addEventListener("mouseup",f),o.addEventListener("click",Hs,!0)})),E=(0,ce.A)(((n,r)=>{if(t.disableAutosize)return;if(0!==r.button)return;const i=e.current.state.columns.lookup[n.field];!1!==i.resizable&&e.current.autosizeColumns((0,o.A)({},t.autosizeOptions,{disableColumnVirtualization:!1,columns:[i.field]}))})),k=function(e){const t=r.useRef(void 0),n=()=>Jn(e),o=(0,b.Nc)(e,n);return r.useEffect((()=>{t.current&&!1===o&&(t.current.resolve(),t.current=void 0)})),()=>{if(!t.current){if(!1===n())return Promise.resolve();t.current=function(){let e,t;const n=new Promise(((n,o)=>{e=n,t=o}));return n.resolve=e,n.reject=t,n}()}return t.current}}(e),R=r.useRef(!1),M=r.useCallback((async n=>{const r=e.current.rootElementRef?.current;if(!r)return;if(R.current)return;R.current=!0;const i=(0,j.em)(e),s=(0,o.A)({},Ds,n,{columns:n?.columns??i.orderedFields});s.columns=s.columns.filter((e=>!1!==i.columnVisibilityModel[e]));const a=s.columns.map((t=>e.current.state.columns.lookup[t]));try{!t.disableVirtualization&&s.disableColumnVirtualization&&(e.current.unstable_setColumnVirtualization(!1),await k());const n=function(e,t,n){const o={},r=e.current.rootElementRef.current;return r.classList.add(m.x.autosizing),n.forEach((n=>{const r=function(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${Hi(t)}"][role="gridcell"]`))}(e.current,n.field),i=r.map((e=>e.getBoundingClientRect().width??0)),s=t.includeOutliers?i:function(e,t){if(e.length<4)return e;const n=e.slice();n.sort(((e,t)=>e-t));const o=n[Math.floor(.25*n.length)],r=n[Math.floor(.75*n.length)-1],i=r-o,s=i<5?5:i*t;return n.filter((e=>e>o-s&&e<r+s))}(i,t.outliersFactor);if(t.includeHeaders){const t=(a=e.current,l=n.field,a.columnHeadersContainerRef.current.querySelector(`:scope > div > [data-field="${Hi(l)}"][role="columnheader"]`));if(t){const e=t.querySelector(`.${m.x.columnHeaderTitle}`),n=t.querySelector(`.${m.x.columnHeaderTitleContainerContent}`),o=t.querySelector(`.${m.x.iconButtonContainer}`),r=t.querySelector(`.${m.x.menuIcon}`),i=e??n,a=window.getComputedStyle(t,null),l=parseInt(a.paddingLeft,10)+parseInt(a.paddingRight,10),c=i.scrollWidth+1+l+(o?.clientWidth??0)+(r?.clientWidth??0);s.push(c)}}var a,l;const c=n.minWidth!==-1/0&&void 0!==n.minWidth,u=n.maxWidth!==1/0&&void 0!==n.maxWidth,d=c?n.minWidth:0,h=u?n.maxWidth:1/0,p=0===s.length?0:Math.max(...s);o[n.field]=Fe(p,d,h)})),r.classList.remove(m.x.autosizing),o}(e,s,a),r=a.map((e=>(0,o.A)({},e,{width:n[e.field],computedWidth:n[e.field],flex:0})));if(s.expand){const t=i.orderedFields.map((e=>i.lookup[e])).filter((e=>!1!==i.columnVisibilityModel[e.field])).reduce(((e,t)=>e+(n[t.field]??t.computedWidth??t.width)),0),o=e.current.getRootDimensions().viewportInnerSize.width-t;if(o>0){const e=o/(r.length||1);r.forEach((t=>{t.width+=e,t.computedWidth+=e}))}}e.current.updateColumns(r),r.forEach(((t,n)=>{if(t.width!==a[n].width){const n=t.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t.field),colDef:t,width:n})}}))}finally{t.disableVirtualization||e.current.unstable_setColumnVirtualization(!0),R.current=!1}}),[e,k,t.disableVirtualization]);r.useEffect((()=>C),[C]),(0,gr.A)((()=>{t.autosizeOnMount&&Promise.resolve().then((()=>{e.current.autosizeColumns(t.autosizeOptions)}))})),qr(e,(()=>e.current.columnHeadersContainerRef?.current),"touchstart",w,{passive:!0}),no(e,{autosizeColumns:M},"public"),me(e,"columnResizeStop",S),me(e,"columnResizeStart",x),me(e,"columnSeparatorMouseDown",A),me(e,"columnSeparatorDoubleClick",E),be(e,"columnResize",t.onColumnResize),be(e,"columnWidthChange",t.onColumnWidthChange)};function Bs(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function _s(e){return 0!==e.firstRowIndex||0!==e.lastRowIndex}const Vs=(e,t,n)=>{if(!e)return null;let o=e[t.field];const r=t.rowSpanValueGetter??t.valueGetter;return r&&(o=r(o,e,t,n)),o},Ws={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},Gs={firstRowIndex:0,lastRowIndex:0},Ks=new Set([ei,"__reorder__",kt]),Us=(e,t,n,r,i,s,a)=>{const l=s?{}:(0,o.A)({},e.current.state.rowSpanning.spannedCells),c=s?{}:(0,o.A)({},e.current.state.rowSpanning.hiddenCells),u=s?{}:(0,o.A)({},e.current.state.rowSpanning.hiddenCellOriginMap);return s&&(a=Gs),t.forEach((t=>{if(!Ks.has(t.field)){for(let o=i.firstRowIndex;o<i.lastRowIndex;o+=1){const s=n[o];if(c[s.id]?.[t.field])continue;const a=Vs(s.model,t,e);if(null==a)continue;let d=s.id,h=o,p=0;const f=[];if(o===i.firstRowIndex){let i=o-1,s=n[i];for(;i>=r.firstRowIndex&&s&&Vs(s.model,t,e)===a;){const e=n[i+1];c[e.id]?c[e.id][t.field]=!0:c[e.id]={[t.field]:!0},f.push(o),p+=1,d=s.id,h=i,i-=1,s=n[i]}}f.forEach((e=>{u[e]?u[e][t.field]=h:u[e]={[t.field]:h}}));let m=o+1;for(;m<=r.lastRowIndex&&n[m]&&Vs(n[m].model,t,e)===a;){const e=n[m];c[e.id]?c[e.id][t.field]=!0:c[e.id]={[t.field]:!0},u[m]?u[m][t.field]=h:u[m]={[t.field]:h},m+=1,p+=1}p>0&&(l[d]?l[d][t.field]=p+1:l[d]={[t.field]:p+1})}a={firstRowIndex:Math.min(a.firstRowIndex,i.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,i.lastRowIndex)}}})),{spannedCells:l,hiddenCells:c,hiddenCellOriginMap:u,processedRange:a}},qs=(e,t)=>{const n=(0,Ee.A6)(t).length;if(e.pagination){const e=Bn(t);let o=20;return e>0&&(o=e-1),{firstRowIndex:0,lastRowIndex:Math.min(o,n)}}return{firstRowIndex:0,lastRowIndex:Math.min(20,n)}},Xs=(e,t,n)=>{if(!t.rowSpanning)return(0,o.A)({},e,{rowSpanning:Ws});const r=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],s=e.rows.dataRowIdToModelLookup,a=e.columns.lookup,l=Boolean(e.filter.filterModel.items.length)||Boolean(e.filter.filterModel.quickFilterValues?.length);if(!r.length||!i.length||!s||!a||l)return(0,o.A)({},e,{rowSpanning:Ws});const c=qs(t,n),u=r.map((e=>({id:e,model:s[e]}))),d=i.map((e=>a[e])),{spannedCells:h,hiddenCells:p,hiddenCellOriginMap:f}=Us(n,d,u,c,c,!0,Gs);return(0,o.A)({},e,{rowSpanning:{spannedCells:h,hiddenCells:p,hiddenCellOriginMap:f}})};new Set;const Ys=(e,t,n)=>(0,o.A)({},e,{listViewColumn:t.listViewColumn?(0,o.A)({},t.listViewColumn,{computedWidth:Qs(n)}):void 0});function Qs(e){return Q(e).viewportInnerSize.width}var Js=n(52044);const Zs=(0,O.Mz)(Pn.ZI,Qo.XU,Hn,((e,t,n)=>({groupKeys:[],paginationModel:n,sortModel:t,filterModel:e,start:n.page*n.pageSize,end:n.page*n.pageSize+n.pageSize-1})));let ea=function(e){return e.Default="set-new-rows",e.LazyLoading="replace-row-range",e}({});class ta{constructor(e){this.chunkSize=void 0,this.getCacheKeys=e=>{if(this.chunkSize<1||"number"!=typeof e.start)return[e];const t=[];for(let n=e.start;n<e.end;n+=this.chunkSize){const r=Math.min(n+this.chunkSize-1,e.end);t.push((0,o.A)({},e,{start:n,end:r}))}return t},this.splitResponse=(e,t)=>{const n=this.getCacheKeys(e),r=new Map;return n.forEach((n=>{const i=n.end===e.end,s=(0,o.A)({},t,{pageInfo:(0,o.A)({},t.pageInfo,{hasNextPage:void 0!==t.pageInfo?.hasNextPage&&!i||t.pageInfo?.hasNextPage,nextCursor:void 0===t.pageInfo?.nextCursor||i?t.pageInfo?.nextCursor:t.rows[n.end+1].id}),rows:"number"!=typeof n.start||"number"!=typeof e.start?t.rows:t.rows.slice(n.start-e.start,n.end-e.start+1)});r.set(n,s)})),r},this.chunkSize=e}}function na(e){return JSON.stringify([e.filterModel,e.sortModel,e.start,e.end])}ta.mergeResponses=e=>1===e.length?e[0]:e.reduce(((e,t)=>({rows:[...e.rows,...t.rows],rowCount:t.rowCount,pageInfo:t.pageInfo})),{rows:[],rowCount:0,pageInfo:{}});class oa{constructor({ttl:e=3e5,getKey:t=na}){this.cache=void 0,this.ttl=void 0,this.getKey=void 0,this.cache={},this.ttl=e,this.getKey=t}set(e,t){const n=this.getKey(e),o=Date.now()+this.ttl;this.cache[n]={value:t,expiry:o}}get(e){const t=this.getKey(e),n=this.cache[t];if(n){if(!(Date.now()>n.expiry))return n.value;delete this.cache[t]}}clear(){this.cache={}}}class ra extends Error{constructor(e){super(e.message),this.params=void 0,this.cause=void 0,this.name="GridGetRowsError",this.params=e.params,this.cause=e.cause}}class ia extends Error{constructor(e){super(e.message),this.params=void 0,this.cause=void 0,this.name="GridUpdateRowError",this.params=e.params,this.cause=e.cause}}const sa={clear:()=>{},get:()=>{},set:()=>{}};function aa(e,t={}){return null===e?sa:e??new oa(t)}const la=(e,t)=>{((e,t)=>{(e=>{const t=r.useRef(null),n=r.useRef(null),o=r.useRef(null),i=r.useRef(null),s=r.useRef(null),a=r.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:o,virtualScrollbarVerticalRef:i,virtualScrollbarHorizontalRef:s,columnHeadersContainerRef:a})})(e),((e,t)=>{r.useEffect((()=>{e.current.setState((e=>(0,o.A)({},e,{props:{getRowId:t.getRowId}})))}),[e,t.getRowId])})(e,t),(e=>{const t=(0,Jt.I)();void 0===e.current.state.isRtl&&(e.current.state.isRtl=t);const n=r.useRef(!0);r.useEffect((()=>{n.current?n.current=!1:e.current.setState((e=>(0,o.A)({},e,{isRtl:t})))}),[e,t])})(e),((e,t)=>{no(e,{getLogger:r.useCallback((e=>Lr?jr(e,"debug",t.logger):t.logLevel?jr(e,t.logLevel.toString(),t.logger):zr),[t.logLevel,t.logger])},"private")})(e,t),(e=>{const t=r.useRef({}),n=r.useCallback((e=>{t.current[e.stateId]=e}),[]),i=r.useCallback(((n,o)=>{let r;if(r="function"==typeof n?n(e.current.state):n,e.current.state===r)return!1;const i={current:{state:r}};let s=!1;const a=[];if(Object.keys(t.current).forEach((n=>{const o=t.current[n],r=o.stateSelector(e),l=o.stateSelector(i);l!==r&&(a.push({stateId:o.stateId,hasPropChanged:l!==o.propModel}),void 0!==o.propModel&&l!==o.propModel&&(s=!0))})),a.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${a[0].stateId}, therefore, you're not allowed to update ${a.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(s||(e.current.state=r,e.current.publishEvent("stateChange",r),e.current.store.update(r)),1===a.length){const{stateId:n,hasPropChanged:r}=a[0],l=t.current[n],c=l.stateSelector(i);l.propOnChange&&r&&l.propOnChange(c,{reason:o,api:e.current}),s||e.current.publishEvent(l.changeEvent,c,{reason:o})}return!s}),[e]),s={updateControlState:r.useCallback(((t,n,r)=>e.current.setState((e=>(0,o.A)({},e,{[t]:n(e[t])})),r)),[e]),registerControlState:n};no(e,{setState:i},"public"),no(e,s,"private")})(e),(e=>{const t=r.useRef({}),n=r.useRef(!1),o=r.useCallback((e=>{!n.current&&e&&(n.current=!0,Object.values(e.appliers).forEach((e=>{e()})),n.current=!1)}),[]),i=r.useCallback(((e,n,r)=>{t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{}});const i=t.current[e];return i.processors.get(n)!==r&&(i.processors.set(n,r),i.processorsAsArray=Array.from(t.current[e].processors.values()).filter((e=>null!==e)),o(i)),()=>{t.current[e].processors.set(n,null),t.current[e].processorsAsArray=Array.from(t.current[e].processors.values()).filter((e=>null!==e))}}),[o]),s=r.useCallback(((e,n,o)=>(t.current[e]||(t.current[e]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[e].appliers[n]=o,()=>{const o=t.current[e].appliers,r=(0,a.A)(o,[n].map(Br.A));t.current[e].appliers=r})),[]),l=r.useCallback((e=>{o(t.current[e])}),[o]),c={unstable_applyPipeProcessors:r.useCallback(((...e)=>{const[n,o,r]=e;if(!t.current[n])return o;const i=t.current[n].processorsAsArray;let s=o;for(let e=0;e<i.length;e+=1)s=i[e](s,r);return s}),[])};no(e,{registerPipeProcessor:i,registerPipeApplier:s,requestPipeProcessorsApplication:l},"private"),no(e,c,"public")})(e),(e=>{const t=r.useRef(new Map),n=r.useRef({}),o=r.useCallback(((t,o,r)=>{const i=()=>{const e=n.current[o],r=(0,a.A)(e,[t].map(Br.A));n.current[o]=r};n.current[o]||(n.current[o]={});const s=n.current[o],l=s[t];return s[t]=r,l&&l!==r?(t===e.current.getActiveStrategy(Wr[o])&&e.current.publishEvent("activeStrategyProcessorChange",o),i):i}),[e]),i=r.useCallback(((t,o)=>{const r=e.current.getActiveStrategy(Wr[t]);if(null==r)throw new Error("Can't apply a strategy processor before defining an active strategy");const i=n.current[t];if(!i||!i[r])throw new Error(`No processor found for processor "${t}" on strategy "${r}"`);return(0,i[r])(o)}),[e]),s=r.useCallback((e=>{const n=Array.from(t.current.entries()).find((([,t])=>t.group===e&&t.isAvailable()));return n?.[0]??Vr}),[]),l=r.useCallback(((n,o,r)=>{t.current.set(o,{group:n,isAvailable:r}),e.current.publishEvent("strategyAvailabilityChange")}),[e]);no(e,{registerStrategyProcessor:o,applyStrategyProcessor:i,getActiveStrategy:s,setStrategyAvailability:l},"private")})(e),((e,t)=>{const n=r.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.register("public",{getLocaleText:n})})(e,t),e.current.register("private",{rootProps:t})})(e,t),((e,t)=>{const n=(e=>{const{classes:t}=e;return r.useMemo((()=>(0,d.A)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},m.B,t)),[t])})({classes:t.classes}),i=r.useCallback((r=>{const i=(0,o.A)({},ti,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,a=null!=r.lookup[ei];return s&&!a?(r.lookup[ei]=i,r.orderedFields=[ei,...r.orderedFields]):!s&&a?(delete r.lookup[ei],r.orderedFields=r.orderedFields.filter((e=>e!==ei))):s&&a&&(r.lookup[ei]=(0,o.A)({},i,r.lookup[ei]),t.columns.some((e=>e.field===ei))||(r.orderedFields=[ei,...r.orderedFields.filter((e=>e!==ei))])),r}),[e,n,t.columns,t.checkboxSelection]);hi(e,"hydrateColumns",i)})(e,t),(e=>{Pi(e,Vr,"rowTreeCreation",cs)})(e),Kr(Gr,e,t),Kr(hs,e,t),Kr(fi,e,t),Kr(ls,e,t),Kr(qi,e,t),Kr(ss,e,t),Kr(Ni,e,t),Kr(ps,e,t),Kr(Xi,e,t),Kr(Ti,e,t),Kr(Xs,e,t),Kr(gi,e,t),Kr(zs,e,t),Kr(ui,e,t),Kr($s,e,t),Kr(ro,e,t),Kr(vs,e,t),Kr(As,e,t),Kr(Ys,e,t),((e,t)=>{const n=Ur(e,"useGridKeyboardNavigation"),o=(0,Jt.I)(),i=t.listView,s=r.useCallback((()=>Ui(e)),[e]),a="DataGrid"!==t.signature&&t.headerFilters,l=r.useCallback(((t,o,r="left",s="up")=>{const a=(0,Pn.em)(e),l=e.current.unstable_getCellColSpanInfo(o,t);l&&l.spannedByColSpan&&("left"===r?t=l.leftVisibleCellIndex:"right"===r&&(t=l.rightVisibleCellIndex));const c=i?co(e).field:(0,j.TI)(e)[t],u=function(e,t,n,o){const r=so(e);if(!r[t]?.[n])return t;const i=(0,Pn.qA)(e);let s=i.indexOf(t)+("down"===o?1:-1);for(;s>=0&&s<i.length;){const e=i[s];if(!r[e]?.[n])return e;s+="down"===o?1:-1}return t}(e,o,c,s),d=a.findIndex((e=>e.id===u));n.debug(`Navigating to cell row ${d}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:d}),e.current.setCellFocus(u,c)}),[e,n,i]),c=r.useCallback(((t,o)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const r=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(r,o)}),[e,n]),u=r.useCallback(((t,o)=>{n.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const r=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(r,o)}),[e,n]),d=r.useCallback(((t,o,r)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:i}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(i,o,r)}),[e,n]),h=r.useCallback((e=>s()[e]?.id),[s]),p=r.useCallback(((t,n)=>{const r=n.currentTarget.querySelector(`.${m.x.columnHeaderTitleContainerContent}`);if(r&&r.contains(n.target)&&t.field!==ti.field)return;const i=s(),p=e.current.getViewportPageSize(),f=t.field?e.current.getColumnIndex(t.field):0,g=i.length>0?0:null,b=i.length-1,v=(0,j.iv)(e).length-1,y=mn(e);let w=!0;switch(n.key){case"ArrowDown":a?u(f,n):null!==g&&l(f,h(g));break;case"ArrowRight":{const e=Ki({currentColIndex:f,firstColIndex:0,lastColIndex:v,isRtl:o});null!==e&&c(e,n);break}case"ArrowLeft":{const e=Gi({currentColIndex:f,firstColIndex:0,lastColIndex:v,isRtl:o});null!==e&&c(e,n);break}case"ArrowUp":y>0&&d(f,y-1,n);break;case"PageDown":null!==g&&null!==b&&l(f,h(Math.min(g+p,b)));break;case"Home":c(0,n);break;case"End":c(v,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:w=!1}w&&n.preventDefault()}),[e,s,a,u,l,h,o,c,d]),f=r.useCallback(((t,n)=>{const r=cn(e)===t.field,i=un(e)===t.field;if(r||i||!si(n.key))return;const a=s(),d=e.current.getViewportPageSize(),p=t.field?e.current.getColumnIndex(t.field):0,f=a.length-1,m=(0,j.iv)(e).length-1;let g=!0;switch(n.key){case"ArrowDown":{const e=h(0);null!=e&&l(p,e);break}case"ArrowRight":{const e=Ki({currentColIndex:p,firstColIndex:0,lastColIndex:m,isRtl:o});null!==e&&u(e,n);break}case"ArrowLeft":{const r=Gi({currentColIndex:p,firstColIndex:0,lastColIndex:m,isRtl:o});null!==r?u(r,n):e.current.setColumnHeaderFilterFocus(t.field,n);break}case"ArrowUp":c(p,n);break;case"PageDown":null!==f&&l(p,h(Math.min(0+d,f)));break;case"Home":u(0,n);break;case"End":u(m,n);break;case" ":break;default:g=!1}g&&n.preventDefault()}),[e,s,u,o,c,l,h]),g=r.useCallback(((t,n)=>{const o=mo(e);if(null===o)return;const{field:r,depth:i}=o,{fields:a,depth:u,maxDepth:p}=t,f=s(),m=e.current.getViewportPageSize(),g=e.current.getColumnIndex(r),b=r?e.current.getColumnIndex(r):0,v=f.length-1,y=(0,j.iv)(e).length-1;let w=!0;switch(n.key){case"ArrowDown":u===p-1?c(g,n):d(g,i+1,n);break;case"ArrowUp":u>0&&d(g,i-1,n);break;case"ArrowRight":{const e=a.length-a.indexOf(r)-1;g+e+1<=y&&d(g+e+1,i,n);break}case"ArrowLeft":{const e=a.indexOf(r);g-e-1>=0&&d(g-e-1,i,n);break}case"PageDown":null!==v&&l(b,h(Math.min(0+m,v)));break;case"Home":d(0,i,n);break;case"End":d(y,i,n);break;case" ":break;default:w=!1}w&&n.preventDefault()}),[e,s,c,d,l,h]),b=r.useCallback(((t,n)=>{if(Fi(n))return;const r=e.current.getCellParams(t.id,t.field);if(r.cellMode===Ft.Edit||!si(n.key))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:n,cell:r}))return;const d=s();if(0===d.length)return;const p=e.current.getViewportPageSize(),f=i?()=>0:e.current.getColumnIndex,m=t.field?f(t.field):0,g=d.findIndex((e=>e.id===t.id)),b=d.length-1,v=(i?[co(e)]:(0,j.iv)(e)).length-1;let y=!0;switch(n.key){case"ArrowDown":g<b&&l(m,h(g+1),o?"right":"left","down");break;case"ArrowUp":g>0?l(m,h(g-1)):a?u(m,n):c(m,n);break;case"ArrowRight":{const e=Ki({currentColIndex:m,firstColIndex:0,lastColIndex:v,isRtl:o});null!==e&&l(e,h(g),o?"left":"right");break}case"ArrowLeft":{const e=Gi({currentColIndex:m,firstColIndex:0,lastColIndex:v,isRtl:o});null!==e&&l(e,h(g),o?"right":"left");break}case"Tab":n.shiftKey&&m>0?l(m-1,h(g),"left"):!n.shiftKey&&m<v&&l(m+1,h(g),"right");break;case" ":{if(t.field===kt)break;const e=t.colDef;if(e&&("__tree_data_group__"===e.field||(w=e.field)===Et||null!==(e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null})(w)))break;!n.shiftKey&&g<b&&l(m,h(Math.min(g+p,b)));break}case"PageDown":g<b&&l(m,h(Math.min(g+p,b)));break;case"PageUp":{const e=Math.max(g-p,0);e!==g&&e>=0?l(m,h(e)):c(m,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?l(0,h(0)):l(0,h(g));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?l(v,h(b)):l(v,h(g));break;default:y=!1}var w;y&&n.preventDefault()}),[e,s,o,l,h,a,u,c,i]),v=r.useCallback(((e,{event:t})=>" "!==t.key&&e),[]);hi(e,"canStartEditing",v),me(e,"columnHeaderKeyDown",p),me(e,"headerFilterKeyDown",f),me(e,"columnGroupHeaderKeyDown",g),me(e,"cellKeyDown",b)})(e,t),((e,t)=>{const n=Ur(e,"useGridSelection"),i=r.useCallback((e=>(...n)=>{t.rowSelection&&e(...n)}),[t.rowSelection]),s=t.signature!==Tn.DataGrid&&(t.rowSelectionPropagation?.parents||t.rowSelectionPropagation?.descendants),a=r.useMemo((()=>t.rowSelectionModel),[t.rowSelectionModel]),l=r.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:a,propOnChange:t.onRowSelectionModelChange,stateSelector:Ro,changeEvent:"rowSelectionChange"});const{checkboxSelection:c,disableRowSelectionOnClick:u,isRowSelectable:d}=t,h=Pr(t),p=(0,b.Nc)(e,Ee.qj),f=(0,b.Nc)(e,Ee.V2)>1,g=r.useCallback((t=>{let n=t;const o=l.current??t,r=e.current.isRowSelected(t);if(r){const t=(0,Pn.ux)(e),r=t.findIndex((e=>e===o)),i=t.findIndex((e=>e===n));if(r===i)return;n=r>i?t[i+1]:t[i-1]}l.current=t,e.current.selectRowRange({startId:o,endId:n},!r)}),[e]),v=(0,ce.A)((()=>t.pagination&&t.checkboxSelectionVisibleOnly&&"client"===t.paginationMode?Gn(e):(0,Pn.ux)(e))),y=r.useCallback(((r,i)=>{if(t.signature===Tn.DataGrid&&!h&&("include"!==r.type||r.ids.size>1))throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));Ro(e)!==r&&(n.debug("Setting selection model"),e.current.setState((e=>(0,o.A)({},e,{rowSelection:t.rowSelection?r:ds})),i))}),[e,n,t.rowSelection,t.signature,h]),w=r.useCallback((t=>Mo(e).has(t)),[e]),C=r.useCallback((n=>{if(!1===t.rowSelection)return!1;if(d&&!d(e.current.getRowParams(n)))return!1;const o=(0,Ee.Qu)(e,n);return"footer"!==o?.type&&"pinnedRow"!==o?.type}),[e,t.rowSelection,d]),x=r.useCallback((()=>Po(e)),[e]),S=r.useCallback(((o,r=!0,i=!1)=>{if(e.current.isRowSelectable(o))if(l.current=o,i){n.debug(`Setting selection for row ${o}`);const i={type:"include",ids:new Set},a=e=>{i.ids.add(e)};r&&(a(o),s&&Tr(e,p,o,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,a)),e.current.setRowSelectionModel(i,"singleRowSelection")}else{n.debug(`Toggling selection for row ${o}`);const i=Ro(e),a={type:i.type,ids:new Set(i.ids)},l=ko(a);l.unselect(o);const c=e=>{l.select(e)},u=e=>{l.unselect(e)};r?(c(o),s&&Tr(e,p,o,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,c)):s&&Or(e,p,o,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,u),("include"===a.type&&a.ids.size<2||h)&&e.current.setRowSelectionModel(a,"singleRowSelection")}}),[e,n,s,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,h]),A=r.useCallback(((o,r=!0,i=!1)=>{if(n.debug("Setting selection for several rows"),!1===t.rowSelection)return;const a=new Set;for(let t=0;t<o.length;t+=1){const n=o[t];e.current.isRowSelectable(n)&&a.add(n)}const l=Ro(e);let c;if(i){if(c={type:"include",ids:a},r){const n=ko(c);if(s){const o=e=>{n.select(e)};for(const n of a)Tr(e,p,n,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,o)}}else c.ids=new Set;if(l.type===c.type&&c.ids.size===l.ids.size&&Array.from(c.ids).every((e=>l.ids.has(e))))return}else{c={type:l.type,ids:new Set(l.ids)};const n=ko(c),o=e=>{n.select(e)},i=e=>{n.unselect(e)};for(const l of a)r?(n.select(l),s&&Tr(e,p,l,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,o)):(i(l),s&&Or(e,p,l,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,i))}("include"===c.type&&c.ids.size<2||h)&&e.current.setRowSelectionModel(c,"multipleRowsSelection")}),[n,s,h,e,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,t.rowSelection]),E=r.useCallback((n=>{if(!f||!s||0===n.ids.size&&"include"===n.type)return n;const o={type:n.type,ids:new Set(n.ids)},r=ko(o),i=e=>{r.select(e)};for(const o of n.ids)Tr(e,p,o,t.rowSelectionPropagation?.descendants??!1,t.rowSelectionPropagation?.parents??!1,i,r);return o}),[e,p,t.rowSelectionPropagation?.descendants,t.rowSelectionPropagation?.parents,f,s]),k={selectRows:A,selectRowRange:r.useCallback((({startId:t,endId:o},r=!0,i=!1)=>{if(!e.current.getRow(t)||!e.current.getRow(o))return;n.debug(`Expanding selection from row ${t} to row ${o}`);const s=(0,Pn.ux)(e),a=s.indexOf(t),l=s.indexOf(o),[c,u]=a>l?[l,a]:[a,l],d=s.slice(c,u+1);e.current.selectRows(d,r,i)}),[e,n]),getPropagatedRowSelectionModel:E};no(e,{selectRow:S,setRowSelectionModel:y,getSelectedRows:x,isRowSelected:w,isRowSelectable:C},"public"),no(e,k,t.signature===Tn.DataGrid?"private":"public");const R=r.useRef(!0),M=r.useCallback(((n=!1)=>{if(R.current)return;const o=Ro(e),r=(0,Ee.rI)(e),i=(0,Pn.wx)(e),s=e=>"server"===t.filterMode?!r[e]:!r[e]||!1===i[e],a={type:o.type,ids:new Set(o.ids)},l=ko(a);let c=!1;for(const e of o.ids){if(s(e)){if(t.keepNonExistentRowsSelected)continue;l.unselect(e),c=!0;continue}if(!t.rowSelectionPropagation?.parents)continue;const n=p[e];if("group"===n?.type){if(n.isAutoGenerated){l.unselect(e),c=!0;continue}n.children.every((e=>!1===i[e]))||(l.unselect(e),c=!0)}}const u=f&&t.rowSelectionPropagation?.parents&&(a.ids.size>0||"exclude"===a.type);if(c||u&&!n)if(u)if("exclude"===a.type){const n=v(),o=[];for(let e=0;e<n.length;e+=1){const r=n[e];!t.keepNonExistentRowsSelected&&s(r)||!l.has(r)||o.push(r)}e.current.selectRows(o,!0,!0)}else e.current.selectRows(Array.from(a.ids),!0,!0);else e.current.setRowSelectionModel(a,"multipleRowsSelection")}),[e,f,t.rowSelectionPropagation?.parents,t.keepNonExistentRowsSelected,t.filterMode,p,v]),I=r.useCallback(((t,n)=>{const o=n.metaKey||n.ctrlKey,r=!c&&!o&&!(e=>!!e.key)(n),i=!h||r,s=e.current.isRowSelected(t),a=Io(e)>1&&i||!s;e.current.selectRow(t,a,i)}),[e,h,c]),P=r.useCallback(((t,n)=>{if(u)return;const o=n.target.closest(`.${m.x.cell}`)?.getAttribute("data-field");if(o!==ti.field&&o!==kt){if(o){const t=e.current.getColumn(o);if(t?.type===rn)return}"pinnedRow"!==(0,Ee.Qu)(e,t.id).type&&(n.shiftKey&&h?g(t.id):I(t.id,n))}}),[u,h,e,g,I]),T=r.useCallback(((e,t)=>{h&&t.shiftKey&&window.getSelection()?.removeAllRanges()}),[h]),O=r.useCallback(((t,n)=>{h&&n.nativeEvent.shiftKey?g(t.id):e.current.selectRow(t.id,t.value,!h)}),[e,g,h]),$=r.useCallback((n=>{const o=(0,Pn.ZI)(e),r=(0,Pn.q6)(e),i=o.items.length>0||r?.some((e=>e.length));t.isRowSelectable||t.checkboxSelectionVisibleOnly||!s||i?e.current.selectRows(v(),n):e.current.setRowSelectionModel({type:n?"exclude":"include",ids:new Set})}),[e,s,v,t.checkboxSelectionVisibleOnly,t.isRowSelectable]),D=r.useCallback((e=>{$(e.value)}),[$]),N=r.useCallback(((t,n)=>{if(e.current.getCellMode(t.id,t.field)!==Ft.Edit&&!Fi(n)){if(si(n.key)&&n.shiftKey){const o=po(e);if(o&&o.id!==t.id){n.preventDefault();const r=e.current.isRowSelected(o.id);if(!h)return void e.current.selectRow(o.id,!r,!0);const i=e.current.getRowIndexRelativeToVisibleRows(o.id),s=e.current.getRowIndexRelativeToVisibleRows(t.id);let a,l;i>s?r?(a=s,l=i-1):(a=s,l=i):r?(a=i+1,l=s):(a=i,l=s);const c=Un(e),u=[];for(let e=a;e<=l;e+=1)u.push(c.rows[e].id);return void e.current.selectRows(u,!r)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void I(t.id,n);"A"===String.fromCharCode(n.keyCode)&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),$(!0))}}),[e,h,I,$]),L=(0,ce.A)((()=>{if(!t.rowSelection)return void e.current.setRowSelectionModel(ds);if(void 0===a)return;if(!s||!f||"include"===a.type&&0===a.ids.size)return void e.current.setRowSelectionModel(a);const n=e.current.getPropagatedRowSelectionModel(a);n.type===a.type&&n.ids.size===a.ids.size&&Array.from(a.ids).every((e=>n.ids.has(e)))?e.current.setRowSelectionModel(a):e.current.setRowSelectionModel(n)}));me(e,"sortedRowsSet",i((()=>M(!0)))),me(e,"filteredRowsSet",i((()=>M()))),me(e,"rowClick",i(P)),me(e,"rowSelectionCheckboxChange",i(O)),me(e,"headerSelectionCheckboxChange",D),me(e,"cellMouseDown",i(T)),me(e,"cellKeyDown",i(N)),r.useEffect((()=>{L()}),[e,a,t.rowSelection,L]);const H=null!=a;r.useEffect((()=>{if(H||!t.rowSelection||"function"!=typeof C)return;const n=Ro(e);if("include"!==n.type)return;const o=new Set;for(const e of n.ids)C(e)&&o.add(e);o.size<n.ids.size&&e.current.setRowSelectionModel({type:n.type,ids:o})}),[e,C,H,t.rowSelection]),r.useEffect((()=>{if(!t.rowSelection||H)return;const n=Ro(e);!h&&("include"===n.type&&n.ids.size>1||"exclude"===n.type)&&e.current.setRowSelectionModel(ds)}),[e,h,c,H,t.rowSelection]),r.useEffect((()=>{i(M)}),[M,i]),r.useEffect((()=>{R.current&&(R.current=!1)}),[])})(e,t),function(e,t){const n=Ur(e,"useGridColumns"),i=r.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:j.FY,changeEvent:"columnVisibilityModelChange"});const s=r.useCallback((t=>{n.debug("Updating columns state."),e.current.setState(mi(t)),e.current.publishEvent("columnsChange",t.orderedFields)}),[n,e]),a=r.useCallback((t=>(0,j.gv)(e)[t]),[e]),l=r.useCallback((()=>(0,j.OV)(e)),[e]),c=r.useCallback((()=>(0,j.iv)(e)),[e]),u=r.useCallback(((t,n=!0)=>(n?(0,j.iv)(e):(0,j.OV)(e)).findIndex((e=>e.field===t))),[e]),d=r.useCallback((t=>{const n=u(t);return(0,j.Sw)(e)[n]}),[e,u]),h=r.useCallback((t=>{(0,j.FY)(e)!==t&&(e.current.setState((n=>(0,o.A)({},n,{columns:wn({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),e.current.updateRenderContext?.())}),[e]),p=r.useCallback((t=>{if(qo(e))return void e.current.updateNonPivotColumns(t);const n=wn({apiRef:e,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1,updateInitialVisibilityModel:!0});s(n)}),[e,s]),f=r.useCallback(((t,n)=>{const r=(0,j.FY)(e);if(n!==(r[t]??!0)){const i=(0,o.A)({},r,{[t]:n});e.current.setColumnVisibilityModel(i)}}),[e]),m=r.useCallback((t=>(0,j.JR)(e).findIndex((e=>e===t))),[e]),g=r.useCallback(((t,r)=>{const i=(0,j.JR)(e),a=m(t);if(a===r)return;n.debug(`Moving column ${t} to index ${r}`);const l=[...i],c=l.splice(a,1)[0];l.splice(r,0,c),s((0,o.A)({},(0,j.em)(e),{orderedFields:l}));const u={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:a};e.current.publishEvent("columnIndexChange",u)}),[e,n,s,m]),b=r.useCallback(((t,r)=>{n.debug(`Updating column ${t} width to ${r}`);const i=(0,j.em)(e),a=i.lookup[t],l=(0,o.A)({},a,{width:r,hasBeenResized:!0});s(vn((0,o.A)({},i,{lookup:(0,o.A)({},i.lookup,{[t]:l})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:l,width:r})}),[e,n,s]),v={setColumnIndex:g};no(e,{getColumn:a,getAllColumns:l,getColumnIndex:u,getColumnPosition:d,getVisibleColumns:c,getColumnIndexRelativeToVisibleColumns:m,updateColumns:p,setColumnVisibilityModel:h,setColumnVisibility:f,setColumnWidth:b},"public"),no(e,v,t.signature===Tn.DataGrid?"private":"public");const y=r.useCallback(((n,r)=>{const i={},s=(0,j.FY)(e);(!r.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(t.initialState?.columns?.columnVisibilityModel??{}).length>0||Object.keys(s).length>0)&&(i.columnVisibilityModel=s),i.orderedFields=(0,j.JR)(e);const a=(0,j.OV)(e),l={};return a.forEach((e=>{if(e.hasBeenResized){const t={};gn.forEach((n=>{let o=e[n];o===1/0&&(o=-1),t[n]=o})),l[e.field]=t}})),Object.keys(l).length>0&&(i.dimensions=l),(0,o.A)({},n,{columns:i})}),[e,t.columnVisibilityModel,t.initialState?.columns]),w=r.useCallback(((t,n)=>{const o=n.stateToRestore.columns?.columnVisibilityModel,r=n.stateToRestore.columns;if(null==o&&null==r)return t;const i=wn({apiRef:e,columnsToUpsert:[],initialState:r,columnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(mi(i)),null!=r&&e.current.publishEvent("columnsChange",i.orderedFields),t}),[e]),C=r.useCallback(((e,n)=>{if(n===V.columns){const e=t.slots.columnsPanel;return(0,M.jsx)(e,(0,o.A)({},t.slotProps?.columnsPanel))}return e}),[t.slots.columnsPanel,t.slotProps?.columnsPanel]),x=r.useCallback((n=>{const o=qo(e);return t.disableColumnSelector||o?n:[...n,"columnMenuColumnsItem"]}),[t.disableColumnSelector,e]);hi(e,"columnMenu",x),hi(e,"exportState",y),hi(e,"restoreState",w),hi(e,"preferencePanel",C);const S=r.useRef(null);me(e,"viewportInnerSizeChange",(t=>{if(S.current!==t.width){if(S.current=t.width,!(0,j.iv)(e).some((e=>e.flex&&e.flex>0)))return;s(vn((0,j.em)(e),e.current.getRootDimensions()))}}));const A=r.useCallback((()=>{n.info("Columns pipe processing have changed, regenerating the columns");const t=wn({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});s(t)}),[e,n,s]);pi(e,"hydrateColumns",A);const E=r.useRef(!0);r.useEffect((()=>{if(E.current)return void(E.current=!1);if(n.info(`GridColumns have changed, new length ${t.columns.length}`),i.current===t.columns)return;const o=wn({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0,updateInitialVisibilityModel:!0});i.current=t.columns,s(o)}),[n,e,s,t.columns]),r.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,n,t.columnVisibilityModel])}(e,t),((e,t)=>{const n=Ur(e,"useGridRows"),i=r.useRef(Date.now()),s=r.useRef(t.rowCount),a=(0,ve.A)(),l=r.useCallback((t=>{const n=(0,Ee.rI)(e)[t];if(n)return n;const o=(0,Ee.Qu)(e,t);return o&&(0,wt.nF)(o)?{[wt.gb]:t}:null}),[e]),c=r.useCallback((t=>Ct(e,t)),[e]),u=r.useCallback((({cache:n,throttle:r})=>{const s=()=>{i.current=Date.now(),e.current.setState((n=>(0,o.A)({},n,{rows:(0,wt.TW)({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:(0,Ee.qj)(e),previousTreeDepths:(0,Ee.Mz)(e),previousGroupsToFetch:(0,Ee.r)(e)})}))),e.current.publishEvent("rowsSet")};if(a.clear(),e.current.caches.rows=n,!r)return void s();const l=t.throttleRowsMs-(Date.now()-i.current);l>0?a.start(l,s):s()}),[t.throttleRowsMs,t.rowCount,t.loading,e,a]),d=r.useCallback((o=>{if(n.debug(`Updating all rows, new length ${o.length}`),qo(e))return void e.current.updateNonPivotRows(o,!1);const r=(0,wt.Z)({rows:o,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),i=e.current.caches.rows;r.rowsBeforePartialUpdates=i.rowsBeforePartialUpdates,u({cache:r,throttle:!0})}),[n,t.getRowId,t.loading,t.rowCount,u,e]),h=r.useCallback((n=>{if(t.signature===Tn.DataGrid&&n.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(qo(e))return void e.current.updateNonPivotRows(n);const o=(0,wt.ro)(e,n,t.getRowId),r=(0,wt.Ze)({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows});u({cache:r,throttle:!0})}),[t.signature,t.getRowId,u,e]),p=r.useCallback(((n,o)=>{const r=(0,wt.ro)(e,n,t.getRowId),i=(0,wt.Ze)({updates:r,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:o??[]});u({cache:i,throttle:!1})}),[t.getRowId,u,e]),f=r.useCallback((t=>{n.debug(`Setting loading to ${t}`),e.current.setState((e=>(0,o.A)({},e,{rows:(0,o.A)({},e.rows,{loading:t})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=t}),[e,n]),m=r.useCallback((()=>{const t=(0,Ee.A6)(e),n=(0,Ee.rI)(e);return new Map(t.map((e=>[e,n[e]??{}])))}),[e]),g=r.useCallback((()=>(0,Ee.H0)(e)),[e]),b=r.useCallback((()=>(0,Ee.A6)(e)),[e]),v=r.useCallback((t=>{const{rowIdToIndexMap:n}=Un(e);return n.get(t)}),[e]),y=r.useCallback(((t,n)=>{const r=(0,Ee.Qu)(e,t);if(!r)throw new Error(`MUI X: No row with id #${t} found.`);if("group"!==r.type)throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const i=(0,o.A)({},r,{childrenExpanded:n});e.current.setState((e=>(0,o.A)({},e,{rows:(0,o.A)({},e.rows,{tree:(0,o.A)({},e.rows.tree,{[t]:i})})}))),e.current.publishEvent("rowExpansionChange",i)}),[e]),w=r.useCallback((t=>(0,Ee.Qu)(e,t)??null),[e]),C=r.useCallback((({skipAutoGeneratedRows:t=!0,groupId:n,applySorting:o,applyFiltering:r})=>{const i=(0,Ee.qj)(e);let s;if(o){const o=i[n];if(!o)return[];const r=(0,Qo.RJ)(e);s=[];for(let e=r.findIndex((e=>e===n))+1;e<r.length&&i[r[e]].depth>o.depth;e+=1){const n=r[e];t&&(0,wt.nF)(i[n])||s.push(n)}}else s=(0,wt.l_)(i,n,t);if(r){const t=(0,Pn.wx)(e);s=(0,as.Z)(t)?s:s.filter((e=>!1!==t[e]))}return s}),[e]),x=r.useCallback(((t,r)=>{const i=(0,Ee.Qu)(e,t);if(!i)throw new Error(`MUI X: No row with id #${t} found.`);if(i.parent!==wt.OL)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if("leaf"!==i.type)throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState((i=>{const s=(0,Ee.qj)(e)[wt.OL],a=s.children,l=a.findIndex((e=>e===t));if(-1===l||l===r)return i;n.debug(`Moving row ${t} to index ${r}`);const c=[...a];return c.splice(r,0,c.splice(l,1)[0]),(0,o.A)({},i,{rows:(0,o.A)({},i.rows,{tree:(0,o.A)({},i.rows.tree,{[wt.OL]:(0,o.A)({},s,{children:c})})})})})),e.current.publishEvent("rowsSet")}),[e,n]),S={getRow:l,setLoading:f,getRowId:c,getRowModels:m,getRowsCount:g,getAllRowIds:b,setRows:d,updateRows:h,getRowNode:w,getRowIndexRelativeToVisibleRows:v,unstable_replaceRows:r.useCallback(((n,r)=>{if(t.signature===Tn.DataGrid&&r.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===r.length)return;if((0,Ee.V2)(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const i=(0,o.A)({},(0,Ee.qj)(e)),s=(0,o.A)({},(0,Ee.rI)(e)),a=i[wt.OL],l=[...a.children],c=new Set;for(let e=0;e<r.length;e+=1){const o=r[e],a=(0,wt.HZ)(o,t.getRowId,"A row was provided without id when calling replaceRows()."),[u]=l.splice(n+e,1,a);c.has(u)||(delete s[u],delete i[u]);const d={id:a,depth:0,parent:wt.OL,type:"leaf",groupingKey:null};s[a]=o,i[a]=d,c.add(a)}i[wt.OL]=(0,o.A)({},a,{children:l});const u=l.filter((e=>"leaf"===i[e]?.type));e.current.caches.rows.dataRowIdToModelLookup=s,e.current.setState((e=>(0,o.A)({},e,{rows:(0,o.A)({},e.rows,{loading:t.loading,totalRowCount:Math.max(t.rowCount||0,l.length),dataRowIdToModelLookup:s,dataRowIds:u,tree:i})}))),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId,t.loading,t.rowCount])},A={setRowIndex:x,setRowChildrenExpansion:y,getRowGroupChildren:C},E={updateNestedRows:p},k=r.useCallback((()=>{let r;n.info("Row grouping pre-processing have changed, regenerating the row tree"),r=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?(0,o.A)({},e.current.caches.rows,{updates:{type:"full",rows:(0,Ee.A6)(e)}}):(0,wt.Z)({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),u({cache:r,throttle:!1})}),[n,e,t.rows,t.getRowId,t.loading,t.rowCount,u]),R=(0,Rn.A)((()=>t.dataSource)),M=r.useCallback((e=>{t.dataSource&&t.dataSource!==R.current?R.current=t.dataSource:"rowTreeCreation"===e&&k()}),[k,R,t.dataSource]),I=r.useCallback((()=>{e.current.getActiveStrategy(_r.RowTree)!==(0,Ee.Y1)(e)&&k()}),[e,k]);me(e,"activeStrategyProcessorChange",M),me(e,"strategyAvailabilityChange",I);const P=r.useCallback((()=>{e.current.setState((n=>{const r=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:(0,Ee.qj)(e),treeDepths:(0,Ee.Mz)(e),dataRowIds:(0,Ee.A6)(e),dataRowIdToModelLookup:(0,Ee.rI)(e)});return(0,o.A)({},n,{rows:(0,o.A)({},n.rows,r,{totalTopLevelRowCount:(0,wt.fS)({tree:r.tree,rowCountProp:t.rowCount})})})})),e.current.publishEvent("rowsSet")}),[e,t.rowCount]);pi(e,"hydrateRows",P),no(e,S,"public"),no(e,A,t.signature===Tn.DataGrid?"private":"public"),no(e,E,"private");const T=r.useRef(!0);r.useEffect((()=>{if(T.current)return void(T.current=!1);let r=!1;t.rowCount!==s.current&&(r=!0,s.current=t.rowCount);const i=t.dataSource?(0,Ee.Zy)(e):t.rows,a=e.current.caches.rows.rowsBeforePartialUpdates===i,l=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,c=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;a&&(l||(e.current.setState((e=>(0,o.A)({},e,{rows:(0,o.A)({},e.rows,{loading:t.loading})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading),c||(e.current.setState((e=>(0,o.A)({},e,{rows:(0,o.A)({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount),!r)||(n.debug(`Updating all rows, new length ${i?.length}`),u({cache:(0,wt.Z)({rows:i,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))}),[t.rows,t.rowCount,t.getRowId,t.loading,t.dataSource,n,u,e])})(e,t),((e,t)=>{const n=(0,Rn.A)((()=>e.current.state.rowSpanning!==Ws?qs(t,e):Gs)),i=r.useCallback(((r,i=!1)=>{const{range:s,rows:a}=Un(e,(t.pagination,t.paginationMode));if(null===s||!_s(r))return;i&&(n.current=Gs);const l=function(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex<t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?{firstRowIndex:e.firstRowIndex,lastRowIndex:t.firstRowIndex-1}:e}({firstRowIndex:r.firstRowIndex,lastRowIndex:Math.min(r.lastRowIndex,s.lastRowIndex+1)},n.current);if(null===l)return;const c=(0,j.iv)(e),{spannedCells:u,hiddenCells:d,hiddenCellOriginMap:h,processedRange:p}=Us(e,c,a,s,l,i,n.current);n.current=p;const f=Object.keys(u).length,m=Object.keys(d).length,g=Object.keys(e.current.state.rowSpanning.spannedCells).length,b=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(i||f!==g||m!==b)&&(0!==f||0!==g)&&e.current.setState((e=>(0,o.A)({},e,{rowSpanning:{spannedCells:u,hiddenCells:d,hiddenCellOriginMap:h}})))}),[e,n,t.pagination,t.paginationMode]),s=r.useCallback((()=>{const t=eo(e);_s(t)&&i(t,!0)}),[e,i]);me(e,"renderedRowsIntervalChange",_e(t.rowSpanning,i)),me(e,"sortedRowsSet",_e(t.rowSpanning,s)),me(e,"paginationModelChange",_e(t.rowSpanning,s)),me(e,"filteredRowsSet",_e(t.rowSpanning,s)),me(e,"columnsChange",_e(t.rowSpanning,s)),r.useEffect((()=>{t.rowSpanning?e.current.state.rowSpanning===Ws&&s():e.current.state.rowSpanning!==Ws&&e.current.setState((e=>(0,o.A)({},e,{rowSpanning:Ws})))}),[e,s,t.rowSpanning])})(e,t),function(e,t){const n=r.useCallback((t=>({field:t,colDef:e.current.getColumn(t)})),[e]),o=r.useCallback((t=>{const n=e.current.getRow(t);if(!n)throw new us(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:n}}),[e]),i=r.useCallback(((t,n,o,{cellMode:r,colDef:i,hasFocus:s,rowNode:a,tabIndex:l})=>{const c=o[n],u=i?.valueGetter?i.valueGetter(c,o,i,e):c,d={id:t,field:n,row:o,rowNode:a,colDef:i,cellMode:r,hasFocus:s,tabIndex:l,value:u,formattedValue:u,isEditable:!1,api:e.current};return i&&i.valueFormatter&&(d.formattedValue=i.valueFormatter(u,o,i,e)),d.isEditable=i&&e.current.isCellEditable(d),d}),[e]),s=r.useCallback(((n,o)=>{const r=e.current.getRow(n),i=(0,Ee.Qu)(e,n);if(!r||!i)throw new us(`No row with id #${n} found`);const s=po(e),a=bo(e),l=e.current.getCellMode(n,o);return e.current.getCellParamsForRow(n,o,r,{colDef:t.listView&&t.listViewColumn?.field===o?co(e):e.current.getColumn(o),rowNode:i,hasFocus:null!==s&&s.field===o&&s.id===n,tabIndex:a&&a.field===o&&a.id===n?0:-1,cellMode:l})}),[e,t.listView,t.listViewColumn?.field]),a=r.useCallback(((t,n)=>{const o=e.current.getColumn(n),r=e.current.getRow(t);if(!r)throw new us(`No row with id #${t} found`);return o&&o.valueGetter?o.valueGetter(r[o.field],r,o,e):r[n]}),[e]),l=r.useCallback(((t,n)=>(0,wt.e$)(t,n,e)),[e]),c=r.useCallback(((t,n)=>{const o=l(t,n);return n&&n.valueFormatter?n.valueFormatter(o,t,n,e):o}),[e,l]),u=r.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${Hi(t)}"]`)}(e.current.rootElementRef.current,t):null),[e]),d=r.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(zi(t))}(e.current.rootElementRef.current,t):null),[e]),h=r.useCallback(((t,n)=>e.current.rootElementRef.current?function(e,{id:t,field:n}){const o=`${zi(t)} .${m.x.cell}[data-field="${Hi(n)}"]`;return e.querySelector(o)}(e.current.rootElementRef.current,{id:t,field:n}):null),[e]),p={getCellParamsForRow:i};no(e,{getCellValue:a,getCellParams:s,getCellElement:h,getRowValue:l,getRowFormattedValue:c,getRowParams:o,getRowElement:d,getColumnHeaderParams:n,getColumnHeaderElement:u},"public"),no(e,p,"private")}(e,t),(e=>{const t=r.useRef({}),n=()=>{t.current={}},o={resetColSpan:n,calculateColSpan:r.useCallback((({rowId:n,minFirstColumn:o,maxLastColumn:r,columns:i})=>{for(let s=o;s<r;s+=1){const a=Es({apiRef:e,lookup:t.current,columnIndex:s,rowId:n,minFirstColumnIndex:o,maxLastColumnIndex:r,columns:i});a.colSpan>1&&(s+=a.colSpan-1)}}),[e])};no(e,{unstable_getCellColSpanInfo:(e,n)=>t.current[e]?.[n]},"public"),no(e,o,"private"),me(e,"columnOrderChange",n)})(e),((e,t)=>{const n=r.useCallback((t=>hn(e)[t]??[]),[e]),i=r.useCallback((()=>pn(e)),[e]);no(e,{getColumnGroupPath:n,getAllGroupDetails:i},"public");const s=r.useCallback((()=>{const n=Is(t.columnGroupingModel??[]);e.current.setState((e=>{const t=e.columns?.orderedFields??[],r=e.pinnedColumns??{},i=Ps(t,n,r);return(0,o.A)({},e,{columnGrouping:(0,o.A)({},e.columnGrouping,{headerStructure:i})})}))}),[e,t.columnGroupingModel]),a=r.useCallback((t=>{const n=e.current.getPinnedColumns?.()??{},r=(0,j.JR)(e),i=(0,j.TI)(e),s=Os(t??[]),a=Is(t??[]),l=Ps(r,a,n),c=0===i.length?0:Math.max(...i.map((e=>a[e]?.length??0)));e.current.setState((e=>(0,o.A)({},e,{columnGrouping:{lookup:s,unwrappedGroupingModel:a,headerStructure:l,maxDepth:c}})))}),[e]);me(e,"columnIndexChange",s),me(e,"columnsChange",(()=>{a(t.columnGroupingModel)})),me(e,"columnVisibilityModelChange",(()=>{a(t.columnGroupingModel)})),r.useEffect((()=>{a(t.columnGroupingModel)}),[a,t.columnGroupingModel])})(e,t),((e,t)=>{((e,t)=>{const[n,i]=r.useState({}),s=r.useRef(n),l=r.useRef({}),{processRowUpdate:c,onProcessRowUpdateError:u,cellModesModel:d,onCellModesModelChange:h}=t,p=e=>(...n)=>{t.editMode===zt.Cell&&e(...n)},f=r.useCallback(((t,n)=>{const o=e.current.getCellParams(t,n);if(!e.current.isCellEditable(o))throw new Error(`MUI X: The cell with id=${t} and field=${n} is not editable.`)}),[e]),m=r.useCallback(((t,n,o)=>{if(e.current.getCellMode(t,n)!==o)throw new Error(`MUI X: The cell with id=${t} and field=${n} is not in ${o} mode.`)}),[e]),g=r.useCallback(((t,n)=>{if(!t.isEditable)return;if(t.cellMode===Ft.Edit)return;const r=(0,o.A)({},t,{reason:Lt.cellDoubleClick});e.current.publishEvent("cellEditStart",r,n)}),[e]),b=r.useCallback(((t,n)=>{if(t.cellMode===Ft.View)return;if(e.current.getCellMode(t.id,t.field)===Ft.View)return;const r=(0,o.A)({},t,{reason:Ht.cellFocusOut});e.current.publishEvent("cellEditStop",r,n)}),[e]),v=r.useCallback(((t,n)=>{if(t.cellMode===Ft.Edit){if(229===n.which)return;let r;if("Escape"===n.key?r=Ht.escapeKeyDown:"Enter"===n.key?r=Ht.enterKeyDown:"Tab"===n.key&&(r=n.shiftKey?Ht.shiftTabKeyDown:Ht.tabKeyDown,n.preventDefault()),r){const i=(0,o.A)({},t,{reason:r});e.current.publishEvent("cellEditStop",i,n)}}else if(t.isEditable){let r;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:t,editMode:"cell"}))return;if(ii(n)?r=Lt.printableKeyDown:li(n)?r=Lt.pasteKeyDown:"Enter"===n.key?r=Lt.enterKeyDown:"Backspace"!==n.key&&"Delete"!==n.key||(r=Lt.deleteKeyDown),r){const i=(0,o.A)({},t,{reason:r,key:n.key});e.current.publishEvent("cellEditStart",i,n)}}}),[e]),y=r.useCallback((t=>{const{id:n,field:o,reason:r}=t,i={id:n,field:o};r!==Lt.printableKeyDown&&r!==Lt.deleteKeyDown&&r!==Lt.pasteKeyDown||(i.deleteValue=!0),e.current.startCellEditMode(i)}),[e]),w=r.useCallback((t=>{const{id:n,field:o,reason:r}=t;let i;e.current.runPendingEditCellValueMutation(n,o),r===Ht.enterKeyDown?i="below":r===Ht.tabKeyDown?i="right":r===Ht.shiftTabKeyDown&&(i="left");const s="escapeKeyDown"===r;e.current.stopCellEditMode({id:n,field:o,ignoreModifications:s,cellToFocusAfter:i})}),[e]);var C;me(e,"cellDoubleClick",p(g)),me(e,"cellFocusOut",p(b)),me(e,"cellKeyDown",p(v)),me(e,"cellEditStart",p(y)),me(e,"cellEditStop",p(w)),be(e,"cellEditStart",t.onCellEditStart),be(e,"cellEditStop",(C=t.onCellEditStop,async(...t)=>{if(C){const{id:n,field:o}=t[0],r=e.current.state.editRows,i=r[n][o]?.error;i||C(...t)}}));const x=r.useCallback(((t,n)=>{const o=Yi(e);return o[t]&&o[t][n]?Ft.Edit:Ft.View}),[e]),S=(0,ce.A)((n=>{const o=n!==t.cellModesModel;h&&o&&h(n,{api:e.current}),t.cellModesModel&&o||(i(n),s.current=n,e.current.publishEvent("cellModesModelChange",n))})),A=r.useCallback(((e,t,n)=>{const r=(0,o.A)({},s.current);if(null!==n)r[e]=(0,o.A)({},r[e],{[t]:(0,o.A)({},n)});else{const n=r[e],o=(0,a.A)(n,[t].map(Br.A));r[e]=o,0===Object.keys(r[e]).length&&delete r[e]}S(r)}),[S]),E=r.useCallback(((t,n,r)=>{e.current.setState((e=>{const i=(0,o.A)({},e.editRows);return null!==r?i[t]=(0,o.A)({},i[t],{[n]:(0,o.A)({},r)}):(delete i[t][n],0===Object.keys(i[t]).length&&delete i[t]),(0,o.A)({},e,{editRows:i})}))}),[e]),k=r.useCallback((e=>{const{id:t,field:n}=e,r=(0,a.A)(e,es);f(t,n),m(t,n,Ft.View),A(t,n,(0,o.A)({mode:Ft.Edit},r))}),[f,m,A]),R=(0,ce.A)((async t=>{const{id:n,field:r,deleteValue:i,initialValue:s}=t,a=e.current.getCellValue(n,r);let l=a;i?l=Zi(e.current.getColumn(r)):s&&(l=s);const c=e.current.getColumn(r),u=!!c.preProcessEditCellProps&&i;let d={value:l,error:!1,isProcessingProps:u};if(E(n,r,d),e.current.setCellFocus(n,r),u&&(d=await Promise.resolve(c.preProcessEditCellProps({id:n,row:e.current.getRow(n),props:d,hasChanged:l!==a})),e.current.getCellMode(n,r)===Ft.Edit)){const t=Yi(e);E(n,r,(0,o.A)({},d,{value:t[n][r].value,isProcessingProps:!1}))}})),M=r.useCallback((e=>{const{id:t,field:n}=e,r=(0,a.A)(e,ts);m(t,n,Ft.Edit),A(t,n,(0,o.A)({mode:Ft.View},r))}),[m,A]),I=(0,ce.A)((async n=>{const{id:o,field:r,ignoreModifications:i,cellToFocusAfter:s="none"}=n;m(o,r,Ft.Edit),e.current.runPendingEditCellValueMutation(o,r);const a=()=>{E(o,r,null),A(o,r,null),"none"!==s&&e.current.moveFocusToRelativeCell(o,r,s)};if(i)return void a();const d=Yi(e),{error:h,isProcessingProps:p}=d[o][r],f=e.current.getRow(o);if(h||p)return l.current[o][r].mode=Ft.Edit,void A(o,r,{mode:Ft.Edit});const g=e.current.getRowWithUpdatedValuesFromCellEditing(o,r);if(t.dataSource?.updateRow){if((0,Ri.H)(f,g))return void a();const t=()=>{l.current[o][r].mode=Ft.Edit,A(o,r,{mode:Ft.Edit})},n={rowId:o,updatedRow:g,previousRow:f};try{await e.current.dataSource.editRow(n),a()}catch{t()}}else if(c){const t=e=>{l.current[o][r].mode=Ft.Edit,A(o,r,{mode:Ft.Edit}),u&&u(e)};try{Promise.resolve(c(g,f,{rowId:o})).then((t=>{e.current.updateRows([t]),a()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([g]),a()})),P={setCellEditingEditCellValue:r.useCallback((async t=>{const{id:n,field:r,value:i,debounceMs:s,unstable_skipValueParser:a}=t;f(n,r),m(n,r,Ft.Edit);const l=e.current.getColumn(r),c=e.current.getRow(n);let u=i;l.valueParser&&!a&&(u=l.valueParser(i,c,l,e));let d=Yi(e),h=(0,o.A)({},d[n][r],{value:u,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(l.preProcessEditCellProps){const e=i!==d[n][r].value;h=(0,o.A)({},h,{isProcessingProps:!0}),E(n,r,h),h=await Promise.resolve(l.preProcessEditCellProps({id:n,row:c,props:h,hasChanged:e}))}return e.current.getCellMode(n,r)!==Ft.View&&(d=Yi(e),h=(0,o.A)({},h,{isProcessingProps:!1}),h.value=l.preProcessEditCellProps?d[n][r].value:u,E(n,r,h),d=Yi(e),!d[n]?.[r]?.error)}),[e,f,m,E]),getRowWithUpdatedValuesFromCellEditing:r.useCallback(((t,n)=>{const r=e.current.getColumn(n),i=Yi(e),s=e.current.getRow(t);if(!i[t]||!i[t][n])return e.current.getRow(t);const{value:a}=i[t][n];return r.valueSetter?r.valueSetter(a,s,r,e):(0,o.A)({},s,{[n]:a})}),[e])};no(e,{getCellMode:x,startCellEditMode:k,stopCellEditMode:M},"public"),no(e,P,"private"),r.useEffect((()=>{d&&S(d)}),[d,S]),(0,we.A)((()=>{const t=(0,Ee.rI)(e),r=l.current;l.current=Be(n),Object.entries(n).forEach((([n,i])=>{Object.entries(i).forEach((([i,s])=>{const a=r[n]?.[i]?.mode||Ft.View,l=t[n]?e.current.getRowId(t[n]):n;s.mode===Ft.Edit&&a===Ft.View?R((0,o.A)({id:l,field:i},s)):s.mode===Ft.View&&a===Ft.Edit&&I((0,o.A)({id:l,field:i},s))}))}))}),[e,n,R,I])})(e,t),((e,t)=>{const[n,i]=r.useState({}),s=r.useRef(n),l=r.useRef({}),c=r.useRef({}),u=r.useRef(void 0),d=r.useRef(null),{processRowUpdate:h,onProcessRowUpdateError:p,rowModesModel:f,onRowModesModelChange:m}=t,g=e=>(...n)=>{t.editMode===zt.Row&&e(...n)},b=r.useCallback(((t,n)=>{const o=e.current.getCellParams(t,n);if(!e.current.isCellEditable(o))throw new Error(`MUI X: The cell with id=${t} and field=${n} is not editable.`)}),[e]),v=r.useCallback(((t,n)=>{if(e.current.getRowMode(t)!==n)throw new Error(`MUI X: The row with id=${t} is not in ${n} mode.`)}),[e]),y=r.useCallback((t=>{const n=Yi(e);return Object.values(n[t]).some((e=>e.error))}),[e]),w=r.useCallback(((t,n)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===jt.Edit)return;const r=e.current.getRowParams(t.id),i=(0,o.A)({},r,{field:t.field,reason:ns.cellDoubleClick});e.current.publishEvent("rowEditStart",i,n)}),[e]),C=r.useCallback((e=>{d.current=e}),[]),x=r.useCallback(((t,n)=>{t.isEditable&&e.current.getRowMode(t.id)!==jt.View&&(d.current=null,u.current=setTimeout((()=>{if(d.current?.id!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===jt.View)return;if(y(t.id))return;const r=e.current.getRowParams(t.id),i=(0,o.A)({},r,{field:t.field,reason:os.rowFocusOut});e.current.publishEvent("rowEditStop",i,n)}})))}),[e,y]);r.useEffect((()=>()=>{clearTimeout(u.current)}),[]);const S=r.useCallback(((t,n)=>{if(t.cellMode===jt.Edit){if(229===n.which)return;let r;if("Escape"===n.key)r=os.escapeKeyDown;else if("Enter"===n.key)r=os.enterKeyDown;else if("Tab"===n.key){const o=(0,j.TI)(e).filter((n=>e.current.getColumn(n).type===rn||e.current.isCellEditable(e.current.getCellParams(t.id,n))));if(n.shiftKey?t.field===o[0]&&(r=os.shiftTabKeyDown):t.field===o[o.length-1]&&(r=os.tabKeyDown),n.preventDefault(),!r){const r=o.findIndex((e=>e===t.field)),i=o[n.shiftKey?r-1:r+1];e.current.setCellFocus(t.id,i)}}if(r){if(r!==os.escapeKeyDown&&y(t.id))return;const i=(0,o.A)({},e.current.getRowParams(t.id),{reason:r,field:t.field});e.current.publishEvent("rowEditStop",i,n)}}else if(t.isEditable){let r;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:t,editMode:"row"}))return;if(ii(n)||li(n)?r=ns.printableKeyDown:"Enter"===n.key?r=ns.enterKeyDown:"Backspace"!==n.key&&"Delete"!==n.key||(r=ns.deleteKeyDown),r){const i=e.current.getRowParams(t.id),s=(0,o.A)({},i,{field:t.field,reason:r});e.current.publishEvent("rowEditStart",s,n)}}}),[e,y]),A=r.useCallback((t=>{const{id:n,field:o,reason:r}=t,i={id:n,fieldToFocus:o};r!==ns.printableKeyDown&&r!==ns.deleteKeyDown||(i.deleteValue=!!o),e.current.startRowEditMode(i)}),[e]),E=r.useCallback((t=>{const{id:n,reason:o,field:r}=t;let i;e.current.runPendingEditCellValueMutation(n),o===os.enterKeyDown?i="below":o===os.tabKeyDown?i="right":o===os.shiftTabKeyDown&&(i="left");const s="escapeKeyDown"===o;e.current.stopRowEditMode({id:n,ignoreModifications:s,field:r,cellToFocusAfter:i})}),[e]);me(e,"cellDoubleClick",g(w)),me(e,"cellFocusIn",g(C)),me(e,"cellFocusOut",g(x)),me(e,"cellKeyDown",g(S)),me(e,"rowEditStart",g(A)),me(e,"rowEditStop",g(E)),be(e,"rowEditStart",t.onRowEditStart),be(e,"rowEditStop",t.onRowEditStop);const k=r.useCallback((n=>Qi(e,{rowId:n,editMode:t.editMode})?jt.Edit:jt.View),[e,t.editMode]),R=(0,ce.A)((n=>{const o=n!==t.rowModesModel;m&&o&&m(n,{api:e.current}),t.rowModesModel&&o||(i(n),s.current=n,e.current.publishEvent("rowModesModelChange",n))})),M=r.useCallback(((e,t)=>{const n=(0,o.A)({},s.current);null!==t?n[e]=(0,o.A)({},t):delete n[e],R(n)}),[R]),I=r.useCallback(((t,n)=>{e.current.setState((e=>{const r=(0,o.A)({},e.editRows);return null!==n?r[t]=n:delete r[t],(0,o.A)({},e,{editRows:r})}))}),[e]),P=r.useCallback(((t,n,r)=>{e.current.setState((e=>{const i=(0,o.A)({},e.editRows);return null!==r?i[t]=(0,o.A)({},i[t],{[n]:(0,o.A)({},r)}):(delete i[t][n],0===Object.keys(i[t]).length&&delete i[t]),(0,o.A)({},e,{editRows:i})}))}),[e]),T=r.useCallback((e=>{const{id:t}=e,n=(0,a.A)(e,rs);v(t,jt.View),M(t,(0,o.A)({mode:jt.Edit},n))}),[v,M]),O=(0,ce.A)((t=>{const{id:n,fieldToFocus:r,deleteValue:i,initialValue:s}=t,a=e.current.getRow(n),l=(0,j.OV)(e),u=l.reduce(((t,o)=>{const a=o.field;if(!e.current.getCellParams(n,a).isEditable)return t;const l=e.current.getColumn(a);let c=e.current.getCellValue(n,a);return r===a&&(i||s)&&(i?c=Zi(l):s&&(c=s)),t[a]={value:c,error:!1,isProcessingProps:l.editable&&!!l.preProcessEditCellProps&&i},t}),{});c.current[n]=a,I(n,u),r&&e.current.setCellFocus(n,r),l.filter((e=>e.editable&&!!e.preProcessEditCellProps&&i)).forEach((t=>{const r=t.field,l=e.current.getCellValue(n,r),c=i?Zi(t):s??l;Promise.resolve(t.preProcessEditCellProps({id:n,row:a,props:u[r],hasChanged:c!==l})).then((t=>{if(e.current.getRowMode(n)===jt.Edit){const i=Yi(e);P(n,r,(0,o.A)({},t,{value:i[n][r].value,isProcessingProps:!1}))}}))}))})),$=r.useCallback((e=>{const{id:t}=e,n=(0,a.A)(e,is);v(t,jt.Edit),M(t,(0,o.A)({mode:jt.View},n))}),[v,M]),D=(0,ce.A)((async n=>{const{id:o,ignoreModifications:r,field:i,cellToFocusAfter:s="none"}=n;e.current.runPendingEditCellValueMutation(o);const a=()=>{"none"!==s&&i&&e.current.moveFocusToRelativeCell(o,i,s),I(o,null),M(o,null),delete c.current[o]};if(r)return void a();const u=Yi(e),d=c.current[o];if(Object.values(u[o]).some((e=>e.isProcessingProps)))return void(l.current[o].mode=jt.Edit);if(y(o))return l.current[o].mode=jt.Edit,void M(o,{mode:jt.Edit});const f=e.current.getRowWithUpdatedValuesFromRowEditing(o);if(t.dataSource?.updateRow){if((0,Ri.H)(d,f))return void a();const t=()=>{l.current[o].mode=jt.Edit,M(o,{mode:jt.Edit})},n={rowId:o,updatedRow:f,previousRow:d};try{await e.current.dataSource.editRow(n),a()}catch{t()}}else if(h){const t=e=>{l.current[o]&&(l.current[o].mode=jt.Edit,M(o,{mode:jt.Edit})),p&&p(e)};try{Promise.resolve(h(f,d,{rowId:o})).then((t=>{e.current.updateRows([t]),a()})).catch(t)}catch(e){t(e)}}else e.current.updateRows([f]),a()})),N={setRowEditingEditCellValue:r.useCallback((t=>{const{id:n,field:r,value:i,debounceMs:s,unstable_skipValueParser:l}=t;b(n,r);const c=e.current.getColumn(r),u=e.current.getRow(n);let d=i;c.valueParser&&!l&&(d=c.valueParser(i,u,c,e));let h=Yi(e),p=(0,o.A)({},h[n][r],{value:d,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});return c.preProcessEditCellProps||P(n,r,p),new Promise((t=>{const i=[];if(c.preProcessEditCellProps){const s=p.value!==h[n][r].value;p=(0,o.A)({},p,{isProcessingProps:!0}),P(n,r,p);const l=h[n],f=(0,a.A)(l,[r].map(Br.A)),m=Promise.resolve(c.preProcessEditCellProps({id:n,row:u,props:p,hasChanged:s,otherFieldsProps:f})).then((i=>{e.current.getRowMode(n)!==jt.View?(h=Yi(e),(i=(0,o.A)({},i,{isProcessingProps:!1})).value=c.preProcessEditCellProps?h[n][r].value:d,P(n,r,i)):t(!1)}));i.push(m)}Object.entries(h[n]).forEach((([s,l])=>{if(s===r)return;const c=e.current.getColumn(s);if(!c.preProcessEditCellProps)return;l=(0,o.A)({},l,{isProcessingProps:!0}),P(n,s,l),h=Yi(e);const d=h[n],p=(0,a.A)(d,[s].map(Br.A)),f=Promise.resolve(c.preProcessEditCellProps({id:n,row:u,props:l,hasChanged:!1,otherFieldsProps:p})).then((r=>{e.current.getRowMode(n)!==jt.View?(r=(0,o.A)({},r,{isProcessingProps:!1}),P(n,s,r)):t(!1)}));i.push(f)})),Promise.all(i).then((()=>{e.current.getRowMode(n)===jt.Edit?(h=Yi(e),t(!h[n][r].error)):t(!1)}))}))}),[e,b,P]),getRowWithUpdatedValuesFromRowEditing:r.useCallback((t=>{const n=Yi(e),r=e.current.getRow(t);if(!n[t])return e.current.getRow(t);let i=(0,o.A)({},c.current[t],r);return Object.entries(n[t]).forEach((([t,n])=>{const o=e.current.getColumn(t);o?.valueSetter?i=o.valueSetter(n.value,i,o,e):i[t]=n.value})),i}),[e])};no(e,{getRowMode:k,startRowEditMode:T,stopRowEditMode:$},"public"),no(e,N,"private"),r.useEffect((()=>{f&&R(f)}),[f,R]),(0,we.A)((()=>{const t=(0,Ee.rI)(e),r=l.current;l.current=Be(n);const i=new Set([...Object.keys(n),...Object.keys(r)]);Array.from(i).forEach((i=>{const s=n[i]??{mode:jt.View},a=r[i]?.mode||jt.View,l=t[i]?e.current.getRowId(t[i]):i;s.mode===jt.Edit&&a===jt.View?O((0,o.A)({id:l},s)):s.mode===jt.View&&a===jt.Edit&&D((0,o.A)({id:l},s))}))}),[e,n,O,D])})(e,t);const n=r.useRef({}),{isCellEditable:i}=t,s=r.useCallback((e=>!(0,wt.nF)(e.rowNode)&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!i||i(e))),[i]);r.useEffect((()=>{const e=n.current;return()=>{Object.entries(e).forEach((([t,n])=>{Object.keys(n).forEach((n=>{const[o]=e[t][n];clearTimeout(o),delete e[t][n]}))}))}}),[]);const l=r.useCallback(((e,t)=>{if(n.current[e])if(t){if(n.current[e][t]){const[,o]=n.current[e][t];o()}}else Object.keys(n.current[e]).forEach((t=>{const[,o]=n.current[e][t];o()}))}),[]),c=r.useCallback((o=>{const{id:r,field:i,debounceMs:s}=o;return new Promise((a=>{((e,t,o,r)=>{if(!o)return void r();if(n.current[e]||(n.current[e]={}),n.current[e][t]){const[o]=n.current[e][t];clearTimeout(o)}const i=setTimeout((()=>{r(),delete n.current[e][t]}),o);n.current[e][t]=[i,()=>{const[o]=n.current[e][t];clearTimeout(o),r(),delete n.current[e][t]}]})(r,i,s,(async()=>{const n=t.editMode===zt.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(r,i)===Ft.Edit){const e=await n(o);a(e)}}))}))}),[e,t.editMode]),u=r.useCallback(((n,o)=>t.editMode===zt.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(n,o):e.current.getRowWithUpdatedValuesFromRowEditing(n)),[e,t.editMode]),d=r.useCallback(((t,n)=>{const o=Yi(e);return o[t]?.[n]??null}),[e]),h={runPendingEditCellValueMutation:l};no(e,{isCellEditable:s,setEditCellValue:c,getRowWithUpdatedValues:u,unstable_getEditCellMeta:d},"public"),no(e,h,"private")})(e,t),((e,t)=>{const n=Ur(e,"useGridFocus"),i=r.useRef(null),s=null!==e.current.rootElementRef.current,a=r.useCallback(((t,n)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),n)}),[e]),l=r.useCallback(((t,r)=>{const i=po(e);i?.id===t&&i?.field===r||(e.current.setState((e=>(n.debug(`Focusing on cell with id=${t} and field=${r}`),(0,o.A)({},e,{tabIndex:{cell:{id:t,field:r},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:r},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))),e.current.getRow(t)&&(i&&a(i,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,r))))}),[e,n,a]),c=r.useCallback(((t,r={})=>{const i=po(e);a(i,r),e.current.setState((e=>(n.debug(`Focusing on column header with colIndex=${t}`),(0,o.A)({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))))}),[e,n,a]),u=r.useCallback(((t,r={})=>{const i=po(e);a(i,r),e.current.setState((e=>(n.debug(`Focusing on column header filter with colIndex=${t}`),(0,o.A)({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}}))))}),[e,n,a]),d=r.useCallback(((t,n,r={})=>{const i=po(e);i&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(i.id,i.field),r),e.current.setState((e=>(0,o.A)({},e,{tabIndex:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null}})))}),[e]),h=r.useCallback((()=>mo(e)),[e]),p=r.useCallback(((n,o,r)=>{let i=e.current.getColumnIndex(o);const s=(0,j.iv)(e),a=Un(e,(t.pagination,t.paginationMode)),l=(0,Ee.$2)(e),c=[].concat(l.top||[],a.rows,l.bottom||[]);let u=c.findIndex((e=>e.id===n));"right"===r?i+=1:"left"===r?i-=1:u+=1,i>=s.length?(u+=1,u<c.length&&(i=0)):i<0&&(u-=1,u>=0&&(i=s.length-1)),u=Fe(u,0,c.length-1);const d=c[u];if(!d)return;const h=e.current.unstable_getCellColSpanInfo(d.id,i);h&&h.spannedByColSpan&&("left"===r||"below"===r?i=h.leftVisibleCellIndex:"right"===r&&(i=h.rightVisibleCellIndex)),i=Fe(i,0,s.length-1);const p=s[i];e.current.setCellFocus(d.id,p.field)}),[e,t.pagination,t.paginationMode]),f=r.useCallback((({id:t,field:n})=>{e.current.setCellFocus(t,n)}),[e]),g=r.useCallback(((t,n)=>{"Enter"===n.key||"Tab"===n.key||"Shift"===n.key||si(n.key)||e.current.setCellFocus(t.id,t.field)}),[e]),b=r.useCallback((({field:t},n)=>{n.target===n.currentTarget&&e.current.setColumnHeaderFocus(t,n)}),[e]),v=r.useCallback((({fields:t,depth:n},o)=>{if(o.target!==o.currentTarget)return;const r=mo(e);null!==r&&r.depth===n&&t.includes(r.field)||e.current.setColumnGroupHeaderFocus(t[0],n,o)}),[e]),y=r.useCallback(((t,r)=>{r.relatedTarget?.getAttribute("class")?.includes(m.x.columnHeader)||(n.debug("Clearing focus"),e.current.setState((e=>(0,o.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))))}),[n,e]),w=r.useCallback((e=>{i.current=e}),[]),C=r.useCallback((t=>{const n=i.current;i.current=null;const r=po(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:n}))return;if(!r)return void(n&&e.current.setCellFocus(n.id,n.field));if(n?.id===r.id&&n?.field===r.field)return;const s=e.current.getCellElement(r.id,r.field);s?.contains(t.target)||(n?e.current.setCellFocus(n.id,n.field):(e.current.setState((e=>(0,o.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),a(r,t)))}),[e,a]),x=r.useCallback((t=>{if("view"===t.cellMode)return;const n=po(e);n?.id===t.id&&n?.field===t.field||e.current.setCellFocus(t.id,t.field)}),[e]),S=r.useCallback((()=>{const n=po(e);if(n&&!e.current.getRow(n.id)){const r=n.id;let i=null;if(void 0!==r){const n=e.current.getRowElement(r),o=n?.dataset.rowindex?Number(n?.dataset.rowindex):0,s=Un(e,(t.pagination,t.paginationMode)),a=s.rows[Fe(o,0,s.rows.length-1)];i=a?.id??null}e.current.setState((e=>(0,o.A)({},e,{focus:{cell:null===i?null:{id:i,field:n.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))}}),[e,t.pagination,t.paginationMode]),A=(0,ce.A)((()=>{const n=po(e);if(!n)return;const r=Un(e,(t.pagination,t.paginationMode));if(r.rows.find((e=>e.id===n.id)))return;const i=(0,j.iv)(e);e.current.setState((e=>(0,o.A)({},e,{tabIndex:{cell:{id:r.rows[0].id,field:i[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}})))})),E={moveFocusToRelativeCell:p,setColumnGroupHeaderFocus:d,getColumnGroupHeaderFocus:h};no(e,{setCellFocus:l,setColumnHeaderFocus:c,setColumnHeaderFilterFocus:u},"public"),no(e,E,"private"),r.useEffect((()=>{const t=(0,ki.A)(e.current.rootElementRef.current);return t.addEventListener("mouseup",C),()=>{t.removeEventListener("mouseup",C)}}),[e,s,C]),me(e,"columnHeaderBlur",y),me(e,"cellDoubleClick",f),me(e,"cellMouseDown",w),me(e,"cellKeyDown",g),me(e,"cellModeChange",x),me(e,"columnHeaderFocus",b),me(e,"columnGroupHeaderFocus",v),me(e,"rowsSet",S),me(e,"paginationModelChange",A)})(e,t),((e,t)=>{const n=Ur(e,"useGridPreferencesPanel"),i=r.useCallback((()=>{e.current.setState((t=>{if(!t.preferencePanel.open)return t;n.debug("Hiding Preferences Panel");const r=B(e);return e.current.publishEvent("preferencePanelClose",{openedPanelValue:r.openedPanelValue}),(0,o.A)({},t,{preferencePanel:{open:!1}})}))}),[e,n]),s=r.useCallback(((t,r,i)=>{n.debug("Opening Preferences Panel"),e.current.setState((e=>(0,o.A)({},e,{preferencePanel:(0,o.A)({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:r,labelId:i})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t})}),[n,e]);no(e,{showPreferences:s,hidePreferences:i},"public");const a=r.useCallback(((n,r)=>{const i=B(e);return!r.exportOnlyDirtyModels||null!=t.initialState?.preferencePanel||i.open?(0,o.A)({},n,{preferencePanel:i}):n}),[e,t.initialState?.preferencePanel]),l=r.useCallback(((t,n)=>{const r=n.stateToRestore.preferencePanel;return null!=r&&e.current.setState((e=>(0,o.A)({},e,{preferencePanel:r}))),t}),[e]);hi(e,"exportState",a),hi(e,"restoreState",l)})(e,t),((e,t)=>{const n=Ur(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Pn.ZI,changeEvent:"filterModelChange"});const i=r.useCallback((()=>{e.current.setState((t=>{const n=(0,Pn.ZI)(e),r=e.current.getFilterState(n),i=(0,o.A)({},t,{filter:(0,o.A)({},t.filter,r)}),s=$i(e,i);return(0,o.A)({},i,{visibleRowsLookup:s})})),e.current.publishEvent("filteredRowsSet")}),[e]),s=r.useCallback(((e,n)=>null==n||!1===n.filterable||t.disableColumnFilter?e:[...e,"columnMenuFilterItem"]),[t.disableColumnFilter]),a=r.useCallback((t=>{const n=(0,Pn.ZI)(e),r=[...n.items],i=r.findIndex((e=>e.id===t.id));-1===i?r.push(t):r[i]=t,e.current.setFilterModel((0,o.A)({},n,{items:r}),"upsertFilterItem")}),[e]),l=r.useCallback((t=>{const n=(0,Pn.ZI)(e),r=[...n.items];t.forEach((e=>{const t=r.findIndex((t=>t.id===e.id));-1===t?r.push(e):r[t]=e})),e.current.setFilterModel((0,o.A)({},n,{items:r}),"upsertFilterItems")}),[e]),c=r.useCallback((t=>{const n=(0,Pn.ZI)(e),r=n.items.filter((e=>e.id!==t.id));r.length!==n.items.length&&e.current.setFilterModel((0,o.A)({},n,{items:r}),"deleteFilterItem")}),[e]),u=r.useCallback(((r,i,s)=>{if(n.debug("Displaying filter panel"),r){const n=(0,Pn.ZI)(e),i=n.items.filter((t=>{if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const n=e.current.getColumn(t.field),o=n.filterOperators?.find((e=>e.value===t.operator));return!(void 0===o?.requiresFilterValue||o?.requiresFilterValue)}));let s;const a=i.find((e=>e.field===r)),l=e.current.getColumn(r);s=a?i:t.disableMultipleColumnsFiltering?[Xe({field:r,operator:l.filterOperators[0].value},e)]:[...i,Xe({field:r,operator:l.filterOperators[0].value},e)],e.current.setFilterModel((0,o.A)({},n,{items:s}))}e.current.showPreferences(V.filters,i,s)}),[e,n,t.disableMultipleColumnsFiltering]),d=r.useCallback((()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,n]),h=r.useCallback((t=>{const n=(0,Pn.ZI)(e);n.logicOperator!==t&&e.current.setFilterModel((0,o.A)({},n,{logicOperator:t}),"changeLogicOperator")}),[e]),p=r.useCallback((t=>{const n=(0,Pn.ZI)(e);(0,Ri.H)(n.quickFilterValues,t)||e.current.setFilterModel((0,o.A)({},n,{quickFilterValues:[...t]}))}),[e]),f=r.useCallback(((o,r)=>{(0,Pn.ZI)(e)!==o&&(n.debug("Setting filter model"),e.current.updateControlState("filter",Qe(o,t.disableMultipleColumnsFiltering,e),r),e.current.unstable_applyFilters())}),[e,n,t.disableMultipleColumnsFiltering]),m=r.useCallback((n=>{const r=Ye(n,t.disableMultipleColumnsFiltering,e),i="client"===t.filterMode?nt(r,e,t.disableEval):null,s=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:i,filterModel:r??Ke()});return(0,o.A)({},s,{filterModel:r})}),[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),g={setFilterLogicOperator:h,unstable_applyFilters:i,deleteFilterItem:c,upsertFilterItem:a,upsertFilterItems:l,setFilterModel:f,showFilterPanel:u,hideFilterPanel:d,setQuickFilterValues:p,ignoreDiacritics:t.ignoreDiacritics,getFilterState:m};no(e,g,"public");const b=r.useCallback(((n,r)=>{const i=(0,Pn.ZI)(e);return i.items.forEach((e=>{delete e.fromInput})),r.exportOnlyDirtyModels&&null==t.filterModel&&null==t.initialState?.filter?.filterModel&&(0,Ri.H)(i,Ke())?n:(0,o.A)({},n,{filter:{filterModel:i}})}),[e,t.filterModel,t.initialState?.filter?.filterModel]),v=r.useCallback(((n,r)=>{const i=r.stateToRestore.filter?.filterModel;return null==i?n:(e.current.updateControlState("filter",Qe(i,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,o.A)({},n,{callbacks:[...n.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),y=r.useCallback(((e,n)=>{if(n===V.filters){const e=t.slots.filterPanel;return(0,M.jsx)(e,(0,o.A)({},t.slotProps?.filterPanel))}return e}),[t.slots.filterPanel,t.slotProps?.filterPanel]),{getRowId:w}=t,C=(0,Rn.A)(Di),x=r.useCallback((n=>{if("client"!==t.filterMode||!n.isRowMatchingFilters||!n.filterModel.items.length&&!n.filterModel.quickFilterValues?.length)return Ge;const o=(0,Ee.rI)(e),r={},{isRowMatchingFilters:i}=n,s={},a={passingFilterItems:null,passingQuickFilterValues:null},l=C.current(e.current.state.rows.dataRowIdToModelLookup);for(let t=0;t<l.length;t+=1){const o=l[t],c=w?w(o):o.id;i(o,void 0,a);const u=rt([a.passingFilterItems],[a.passingQuickFilterValues],n.filterModel,e,s);u||(r[c]=u)}const c="auto-generated-group-footer-root";return o[c]&&(r[c]=!0),{filteredRowsLookup:r,filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}}}),[e,t.filterMode,w,C]);hi(e,"columnMenu",s),hi(e,"exportState",b),hi(e,"restoreState",v),hi(e,"preferencePanel",y),Pi(e,Vr,"filtering",x),Pi(e,Vr,"visibleRowsLookupCreation",Oi);const S=r.useCallback((()=>{n.debug("onColUpdated - GridColumns changed, applying filters");const t=(0,Pn.ZI)(e),r=(0,j.gv)(e),i=t.items.filter((e=>e.field&&r[e.field]));i.length<t.items.length&&e.current.setFilterModel((0,o.A)({},t,{items:i}))}),[e,n]),A=r.useCallback((t=>{"filtering"===t&&e.current.unstable_applyFilters()}),[e]),E=r.useCallback((()=>{e.current.setState((t=>(0,o.A)({},t,{visibleRowsLookup:$i(e,t)})))}),[e]);me(e,"rowsSet",i),me(e,"columnsChange",S),me(e,"activeStrategyProcessorChange",A),me(e,"rowExpansionChange",E),me(e,"columnVisibilityModelChange",(()=>{const t=(0,Pn.ZI)(e);t.quickFilterValues&&tt(t)&&e.current.unstable_applyFilters()})),di((()=>{e.current.unstable_applyFilters()})),(0,we.A)((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,n,t.filterModel])})(e,t),((e,t)=>{const n=Ur(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Qo.XU,changeEvent:"sortModelChange"});const i=r.useCallback(((t,n)=>{const o=(0,Qo.XU)(e),r=o.findIndex((e=>e.field===t));let i=[...o];return r>-1?null==n?.sort?i.splice(r,1):i.splice(r,1,n):i=[...o,n],i}),[e]),s=r.useCallback(((n,r)=>{const i=(0,Qo.XU)(e).find((e=>e.field===n.field));if(i){const e=void 0===r?Me(n.sortingOrder??t.sortingOrder,i.sort):r;return void 0===e?void 0:(0,o.A)({},i,{sort:e})}return{field:n.field,sort:void 0===r?Me(n.sortingOrder??t.sortingOrder):r}}),[e,t.sortingOrder]),a=r.useCallback(((e,n)=>null==n||!1===n.sortable||t.disableColumnSorting?e:(n.sortingOrder||t.sortingOrder).some((e=>!!e))?[...e,"columnMenuSortItem"]:e),[t.sortingOrder,t.disableColumnSorting]),l=r.useCallback((()=>{e.current.setState((r=>{if("server"===t.sortingMode)return n.debug("Skipping sorting rows as sortingMode = server"),(0,o.A)({},r,{sorting:(0,o.A)({},r.sorting,{sortedRows:(0,wt.l_)((0,Ee.qj)(e),wt.OL,!1)})});const i=((e,t)=>{const n=e.map((e=>((e,t)=>{const n=t.current.getColumn(e.field);if(!n||null===e.sort)return null;let o;return o=n.getSortComparator?n.getSortComparator(e.sort):"desc"===e.sort?(...e)=>-1*n.sortComparator(...e):n.sortComparator,o?{getSortCellParams:e=>({id:e,field:n.field,rowNode:(0,Ee.Qu)(t,e),value:t.current.getCellValue(e,n.field),api:t.current}),comparator:o}:null})(e,t))).filter((e=>!!e));return 0===n.length?null:e=>e.map((e=>({node:e,params:n.map((t=>t.getSortCellParams(e.id)))}))).sort(((e,t)=>{return o=e,r=t,n.reduce(((e,t,n)=>{if(0!==e)return e;const i=o.params[n],s=r.params[n];return t.comparator(i.value,s.value,i,s)}),0);var o,r})).map((e=>e.node.id))})((0,Qo.XU)(e),e),s=e.current.applyStrategyProcessor("sorting",{sortRowList:i});return(0,o.A)({},r,{sorting:(0,o.A)({},r.sorting,{sortedRows:s})})})),e.current.publishEvent("sortedRowsSet")}),[e,n,t.sortingMode]),c=r.useCallback((o=>{(0,Qo.XU)(e)!==o&&(n.debug("Setting sort model"),e.current.setState(Re(o,t.disableMultipleColumnsSorting)),e.current.applySorting())}),[e,n,t.disableMultipleColumnsSorting]),u=r.useCallback(((n,o,r)=>{const a=e.current.getColumn(n),l=s(a,o);let c;c=!r||t.disableMultipleColumnsSorting?null==l?.sort?[]:[l]:i(a.field,l),e.current.setSortModel(c)}),[e,i,s,t.disableMultipleColumnsSorting]),d=r.useCallback((()=>(0,Qo.XU)(e)),[e]),h=r.useCallback((()=>(0,Qo.J6)(e).map((e=>e.model))),[e]),p=r.useCallback((()=>(0,Qo.RJ)(e)),[e]),f=r.useCallback((t=>e.current.getSortedRowIds()[t]),[e]);no(e,{getSortModel:d,getSortedRows:h,getSortedRowIds:p,getRowIdFromRowIndex:f,setSortModel:c,sortColumn:u,applySorting:l},"public");const m=r.useCallback(((n,r)=>{const i=(0,Qo.XU)(e);return!r.exportOnlyDirtyModels||null!=t.sortModel||null!=t.initialState?.sorting?.sortModel||i.length>0?(0,o.A)({},n,{sorting:{sortModel:i}}):n}),[e,t.sortModel,t.initialState?.sorting?.sortModel]),g=r.useCallback(((n,r)=>{const i=r.stateToRestore.sorting?.sortModel;return null==i?n:(e.current.setState(Re(i,t.disableMultipleColumnsSorting)),(0,o.A)({},n,{callbacks:[...n.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),b=r.useCallback((t=>{const n=(0,Ee.qj)(e),o=n[wt.OL],r=t.sortRowList?t.sortRowList(o.children.map((e=>n[e]))):[...o.children];return null!=o.footerId&&r.push(o.footerId),r}),[e]);hi(e,"exportState",m),hi(e,"restoreState",g),Pi(e,Vr,"sorting",b);const v=r.useCallback((({field:e,colDef:n},o)=>{if(!n.sortable||t.disableColumnSorting)return;const r="always"===t.multipleColumnsSortingMode||o.shiftKey||o.metaKey||o.ctrlKey;u(e,void 0,r)}),[u,t.disableColumnSorting,t.multipleColumnsSortingMode]),y=r.useCallback((({field:e,colDef:n},o)=>{n.sortable&&!t.disableColumnSorting&&("Enter"!==o.key||o.ctrlKey||o.metaKey||u(e,void 0,"always"===t.multipleColumnsSortingMode||o.shiftKey))}),[u,t.disableColumnSorting,t.multipleColumnsSortingMode]),w=r.useCallback((()=>{const t=(0,Qo.XU)(e),n=(0,j.gv)(e);if(t.length>0){const o=t.filter((e=>n[e.field]));o.length<t.length&&e.current.setSortModel(o)}}),[e]),C=r.useCallback((t=>{"sorting"===t&&e.current.applySorting()}),[e]);hi(e,"columnMenu",a),me(e,"columnHeaderClick",v),me(e,"columnHeaderKeyDown",y),me(e,"rowsSet",e.current.applySorting),me(e,"columnsChange",w),me(e,"activeStrategyProcessorChange",C),di((()=>{e.current.applySorting()})),(0,we.A)((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(e,t),((e,t)=>{const n=Ur(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:D,changeEvent:"densityChange"});const i=(0,ce.A)((t=>{D(e)!==t&&(n.debug(`Set grid density to ${t}`),e.current.setState((e=>(0,o.A)({},e,{density:t}))))}));no(e,{setDensity:i},"public");const s=r.useCallback(((n,r)=>{const i=D(e);return r.exportOnlyDirtyModels&&null==t.density&&null==t.initialState?.density?n:(0,o.A)({},n,{density:i})}),[e,t.density,t.initialState?.density]),a=r.useCallback(((t,n)=>{const r=n.stateToRestore?.density?n.stateToRestore.density:D(e);return e.current.setState((e=>(0,o.A)({},e,{density:r}))),t}),[e]);hi(e,"exportState",s),hi(e,"restoreState",a),r.useEffect((()=>{t.density&&e.current.setDensity(t.density)}),[e,t.density])})(e,t),js(e,t),((e,t)=>{((e,t)=>{const n=Ur(e,"useGridPaginationMeta"),i=(0,b.Nc)(e,Fn);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:Fn,changeEvent:"paginationMetaChange"});const s=r.useCallback((t=>{i!==t&&(n.debug("Setting 'paginationMeta' to",t),e.current.setState((e=>(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{meta:t})}))))}),[e,n,i]);no(e,{setPaginationMeta:s},"public");const a=r.useCallback(((n,r)=>{const i=Fn(e);return r.exportOnlyDirtyModels&&null==t.paginationMeta&&null==t.initialState?.pagination?.meta?n:(0,o.A)({},n,{pagination:(0,o.A)({},n.pagination,{meta:i})})}),[e,t.paginationMeta,t.initialState?.pagination?.meta]),l=r.useCallback(((t,n)=>{const r=n.stateToRestore.pagination?.meta?n.stateToRestore.pagination.meta:Fn(e);return e.current.setState((e=>(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{meta:r})}))),t}),[e]);hi(e,"exportState",a),hi(e,"restoreState",l),r.useEffect((()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)}),[e,t.paginationMeta])})(e,t),((e,t)=>{const n=Ur(e,"useGridPaginationModel"),i=(0,b.Nc)(e,N),s=r.useRef((0,Pn.ZI)(e)),a=Math.floor(t.rowHeight*i);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Hn,changeEvent:"paginationModelChange"});const l=r.useCallback((t=>{const o=Hn(e);t!==o.page&&(n.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:o.pageSize}))}),[e,n]),c=r.useCallback((t=>{const o=Hn(e);t!==o.pageSize&&(n.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:o.page}))}),[e,n]),u=r.useCallback((r=>{const i=Hn(e);r!==i&&(n.debug("Setting 'paginationModel' to",r),e.current.setState((e=>(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{paginationModel:Mi(e.pagination,t.signature,r)})})),"setPaginationModel"))}),[e,n,t.signature]);no(e,{setPage:l,setPageSize:c,setPaginationModel:u},"public");const d=r.useCallback(((n,r)=>{const i=Hn(e);return!r.exportOnlyDirtyModels||null!=t.paginationModel||null!=t.initialState?.pagination?.paginationModel||0!==i.page&&i.pageSize!==(t.autoPageSize?0:100)?(0,o.A)({},n,{pagination:(0,o.A)({},n.pagination,{paginationModel:i})}):n}),[e,t.paginationModel,t.initialState?.pagination?.paginationModel,t.autoPageSize]),h=r.useCallback(((n,r)=>{const i=r.stateToRestore.pagination?.paginationModel?(0,o.A)({},$n(t.autoPageSize),r.stateToRestore.pagination?.paginationModel):Hn(e);return e.current.setState((e=>(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{paginationModel:Mi(e.pagination,t.signature,i)})})),"stateRestorePreProcessing"),n}),[e,t.autoPageSize,t.signature]);hi(e,"exportState",d),hi(e,"restoreState",h);const p=r.useCallback((()=>{if(!t.autoPageSize)return;const n=e.current.getRootDimensions(),o=Math.max(1,Math.floor(n.viewportInnerSize.height/a));e.current.setPageSize(o)}),[e,t.autoPageSize,a]),f=r.useCallback((t=>{if(null==t)return;const n=Hn(e);if(0===n.page)return;const o=_n(e);n.page>o-1&&e.current.setPage(Math.max(0,o-1))}),[e]),m=r.useCallback((()=>{0!==Hn(e).page&&e.current.setPage(0),0!==e.current.getScrollPosition().top&&e.current.scroll({top:0})}),[e]),g=r.useCallback((t=>{const n=(0,o.A)({},t,{items:(0,Pn.Ai)(e)});(0,Ri.H)(n,s.current)||(s.current=n,m())}),[e,m]);me(e,"viewportInnerSizeChange",p),me(e,"paginationModelChange",(()=>{const t=Hn(e);e.current.virtualScrollerRef?.current&&e.current.scrollToIndexes({rowIndex:t.page*t.pageSize})})),me(e,"rowCountChange",f),me(e,"sortModelChange",m),me(e,"filterModelChange",g);const v=r.useRef(!0);r.useEffect((()=>{v.current?v.current=!1:t.pagination&&e.current.setState((e=>(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{paginationModel:Mi(e.pagination,t.signature,t.paginationModel)})})))}),[e,t.paginationModel,t.signature,t.pagination]),r.useEffect((()=>{e.current.setState((e=>{const n=!0===t.pagination;return e.pagination.paginationMode===t.paginationMode||e.pagination.enabled===n?e:(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{paginationMode:t.paginationMode,enabled:!0===t.pagination})})}))}),[e,t.paginationMode,t.pagination]),r.useEffect(p,[p])})(e,t),((e,t)=>{const n=Ur(e,"useGridRowCount"),i=(0,b.Nc)(e,Pn.RN),s=(0,b.Nc)(e,zn),a=(0,b.Nc)(e,Fn),l=(0,b.Nc)(e,Hn),c=(0,Rn.A)((()=>Hn(e).pageSize));e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:zn,changeEvent:"rowCountChange"});const u=r.useCallback((t=>{s!==t&&(n.debug("Setting 'rowCount' to",t),e.current.setState((e=>(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{rowCount:t})}))))}),[e,n,s]);no(e,{setRowCount:u},"public");const d=r.useCallback(((n,r)=>{const i=zn(e);return r.exportOnlyDirtyModels&&null==t.rowCount&&null==t.initialState?.pagination?.rowCount?n:(0,o.A)({},n,{pagination:(0,o.A)({},n.pagination,{rowCount:i})})}),[e,t.rowCount,t.initialState?.pagination?.rowCount]),h=r.useCallback(((t,n)=>{const r=n.stateToRestore.pagination?.rowCount?n.stateToRestore.pagination.rowCount:zn(e);return e.current.setState((e=>(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{rowCount:r})}))),t}),[e]);hi(e,"exportState",d),hi(e,"restoreState",h);const p=r.useCallback((n=>{"client"!==t.paginationMode&&c.current&&n.pageSize!==c.current&&(c.current=n.pageSize,-1===s&&e.current.setPage(0))}),[t.paginationMode,c,s,e]);me(e,"paginationModelChange",p),r.useEffect((()=>{"client"===t.paginationMode?e.current.setRowCount(i):null!=t.rowCount&&e.current.setRowCount(t.rowCount)}),[e,t.paginationMode,i,t.rowCount]);const f=!1===a.hasNextPage;r.useEffect((()=>{f&&-1===s&&e.current.setRowCount(l.pageSize*l.page+i)}),[e,i,f,s,l])})(e,t)})(e,t),((e,t)=>{const{getRowHeight:n,getRowSpacing:i,getEstimatedRowHeight:s}=t,a=e.current.caches.rowsMeta.heights,l=r.useRef(-1),c=r.useRef(!1),u=r.useRef(!1),d=(0,b.Nc)(e,N),h=qn(e),p=(0,b.Nc)(e,Ee.$2),f=(0,b.Nc)(e,Z),m=r.useCallback((t=>{const r=Q(e).rowHeight,a=e.current.getRowHeightEntry(t.id);if(n){const e=n((0,o.A)({},t,{densityFactor:d}));if("auto"===e){if(a.needsFirstMeasurement){const e=s?s((0,o.A)({},t,{densityFactor:d})):r;a.content=e??r}c.current=!0,a.autoHeight=!0}else a.content=(0,wt.Qy)(e,r,wt.nW),a.needsFirstMeasurement=!1,a.autoHeight=!1}else a.content=r,a.needsFirstMeasurement=!1;if(i){const n=e.current.getRowIndexRelativeToVisibleRows(t.id),r=i((0,o.A)({},t,{isFirstVisible:0===n,isLastVisible:n===h.rows.length-1,indexRelativeToCurrentPage:n}));a.spacingTop=r.top??0,a.spacingBottom=r.bottom??0}else a.spacingTop=0,a.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",a,t),a}),[e,h.rows,n,s,f,i,d]),g=r.useCallback((()=>{c.current=!1;const t=p.top.reduce(((e,t)=>{const n=m(t);return e+n.content+n.spacingTop+n.spacingBottom+n.detail}),0),n=p.bottom.reduce(((e,t)=>{const n=m(t);return e+n.content+n.spacingTop+n.spacingBottom+n.detail}),0),r=[],i=h.rows.reduce(((e,t)=>{r.push(e);const n=m(t);return e+(n.content+n.spacingTop+n.spacingBottom+n.detail)}),0);c.current||(l.current=1/0);const s=t!==e.current.state.rowsMeta.pinnedTopRowsTotalHeight||n!==e.current.state.rowsMeta.pinnedBottomRowsTotalHeight||i!==e.current.state.rowsMeta.currentPageTotalHeight,a={currentPageTotalHeight:i,positions:r,pinnedTopRowsTotalHeight:t,pinnedBottomRowsTotalHeight:n};e.current.setState((e=>(0,o.A)({},e,{rowsMeta:a}))),s&&e.current.updateDimensions(),u.current=!0}),[e,p,h.rows,m]),v=(0,Rn.A)((()=>new Ss((t=>{for(let n=0;n<t.length;n+=1){const o=t[n],r=o.borderBoxSize&&o.borderBoxSize.length>0?o.borderBoxSize[0].blockSize:o.contentRect.height,i=o.target.__mui_id,s=Co(e)?.id;if(s===i&&0===r)return;e.current.unstable_storeRowHeightMeasurement(i,r)}u.current||requestAnimationFrame((()=>{e.current.requestPipeProcessorsApplication("rowHeight")}))})))).current;pi(e,"rowHeight",g),(0,we.A)((()=>{g()}),[g]);const y={unstable_getRowHeight:e=>a.get(e)?.content??f,unstable_setLastMeasuredRowIndex:e=>{c.current&&e>l.current&&(l.current=e)},unstable_storeRowHeightMeasurement:(t,n)=>{const o=e.current.getRowHeightEntry(t),r=o.content!==n;o.needsFirstMeasurement=!1,o.content=n,u.current&&=!r},resetRowHeights:()=>{a.clear(),g()}},w={hydrateRowsMeta:g,observeRowHeight:(e,t)=>(e.__mui_id=t,v.observe(e),()=>v.unobserve(e)),rowHasAutoHeight:e=>a.get(e)?.autoHeight??!1,getRowHeightEntry:e=>{let t=a.get(e);return void 0===t&&(t={content:f,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},a.set(e,t)),t},getLastMeasuredRowIndex:()=>l.current};no(e,y,"public"),no(e,w,"private")})(e,t),((e,t)=>{const n=(0,Jt.I)(),o=Ur(e,"useGridScroll"),i=e.current.columnHeadersContainerRef,s=e.current.virtualScrollerRef,a=(0,b.Nc)(e,Pn.em),l=r.useCallback((n=>{const r=Q(e),i=(0,Ee.H0)(e),l=t.listView?[co(e)]:(0,j.iv)(e);if(null!=n.rowIndex&&0===i||0===l.length)return!1;o.debug(`Scrolling to cell at row ${n.rowIndex}, col: ${n.colIndex} `);let c={};if(void 0!==n.colIndex){const t=(0,j.Sw)(e);let o;if(void 0!==n.rowIndex){const t=a[n.rowIndex]?.id,r=e.current.unstable_getCellColSpanInfo(t,n.colIndex);r&&!r.spannedByColSpan&&(o=r.cellProps.width)}void 0===o&&(o=l[n.colIndex].computedWidth),c.left=fs({containerSize:r.viewportOuterSize.width,scrollPosition:Math.abs(s.current.scrollLeft),elementSize:o,elementOffset:t[n.colIndex]})}if(void 0!==n.rowIndex){const o=Yn(e),i=jn(e),a=Bn(e),l=t.pagination?n.rowIndex-i*a:n.rowIndex,u=o.positions[l+1]?o.positions[l+1]-o.positions[l]:o.currentPageTotalHeight-o.positions[l];c.top=fs({containerSize:r.viewportInnerSize.height,scrollPosition:s.current.scrollTop,elementSize:u,elementOffset:o.positions[l]})}return c=e.current.unstable_applyPipeProcessors("scrollToIndexes",c,n),(void 0!==typeof c.left||void 0!==typeof c.top)&&(e.current.scroll(c),!0)}),[o,e,s,t.pagination,a,t.listView]),c=r.useCallback((e=>{if(s.current&&void 0!==e.left&&i.current){const t=n?-1:1;i.current.scrollLeft=e.left,s.current.scrollLeft=t*e.left,o.debug(`Scrolling left: ${e.left}`)}s.current&&void 0!==e.top&&(s.current.scrollTop=e.top,o.debug(`Scrolling top: ${e.top}`)),o.debug("Scrolling, updating container, and viewport")}),[s,n,i,o]),u=r.useCallback((()=>s?.current?{top:s.current.scrollTop,left:s.current.scrollLeft}:{top:0,left:0}),[s]);no(e,{scroll:c,scrollToIndexes:l,getScrollPosition:u},"public")})(e,t),(e=>{const t=Ur(e,"useGridColumnMenu"),n=r.useCallback((n=>{const r=Jo(e),i=n;(!0!==r.open||i!==r.field)&&(e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===n?e:(t.debug("Opening Column Menu"),(0,o.A)({},e,{columnMenu:{open:!0,field:n}})))),e.current.hidePreferences())}),[e,t]),i=r.useCallback((()=>{const n=Jo(e);if(n.field){const t=(0,j.gv)(e),o=(0,j.FY)(e),r=(0,j.JR)(e);let i=n.field;if(t[i]||(i=r[0]),!1===o[i]){const e=r.filter((e=>e===i||!1!==o[e])),t=e.indexOf(i);i=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(i)}const r={open:!1,field:void 0};(r.open!==n.open||r.field!==n.field)&&e.current.setState((e=>(t.debug("Hiding Column Menu"),(0,o.A)({},e,{columnMenu:r}))))}),[e,t]),s=r.useCallback((o=>{t.debug("Toggle Column Menu");const r=Jo(e);r.open&&r.field===o?i():n(o)}),[e,t,n,i]);no(e,{showColumnMenu:n,hideColumnMenu:i,toggleColumnMenu:s},"public"),me(e,"columnResizeStart",i),me(e,"virtualScrollerWheel",e.current.hideColumnMenu),me(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(e),Ei(e,t),((e,t)=>{const n=null!==e.current.rootElementRef.current,i=Ur(e,"useGridPrintExport"),s=r.useRef(null),a=r.useRef(null),l=r.useRef({}),c=r.useRef([]),u=r.useRef(null);r.useEffect((()=>{s.current=(0,ki.A)(e.current.rootElementRef.current)}),[e,n]);const d=r.useCallback(((t,n,o)=>new Promise((r=>{const i=bi({apiRef:e,options:{fields:t,allColumns:n}}).map((e=>e.field)),s=(0,j.OV)(e),a={};s.forEach((e=>{a[e.field]=i.includes(e.field)})),o&&(a[ti.field]=!0),e.current.setColumnVisibilityModel(a),r()}))),[e]),h=r.useCallback((t=>{const n=t({apiRef:e}).reduce(((t,n)=>{const o=e.current.getRow(n);return o[wt.gb]||t.push(o),t}),[]);e.current.setRows(n)}),[e]),p=r.useCallback(((n,r)=>{const i=(0,o.A)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},r),a=n.contentDocument;if(!a)return;const l=Yn(e),c=e.current.rootElementRef.current,u=c.cloneNode(!0);u.querySelector(`.${m.x.main}`).style.overflow="visible",u.style.contain="size";let d=c.querySelector(`.${m.x.toolbarContainer}`)?.offsetHeight||0,h=c.querySelector(`.${m.x.footerContainer}`)?.offsetHeight||0;const p=u.querySelector(`.${m.x.footerContainer}`);i.hideToolbar&&(u.querySelector(`.${m.x.toolbarContainer}`)?.remove(),d=0),i.hideFooter&&p&&(p.remove(),h=0);const f=l.currentPageTotalHeight+Cn(e,t)+d+h;u.style.height=`${f}px`,u.style.boxSizing="content-box",!i.hideFooter&&p&&(p.style.position="absolute",p.style.width="100%",p.style.top=f-h+"px");const g=document.createElement("div");g.appendChild(u),a.body.style.marginTop="0px",a.body.innerHTML=g.innerHTML;const b="function"==typeof i.pageStyle?i.pageStyle():i.pageStyle;if("string"==typeof b){const e=a.createElement("style");e.appendChild(a.createTextNode(b)),a.head.appendChild(e)}i.bodyClassName&&a.body.classList.add(...i.bodyClassName.split(" "));let v=[];if(i.copyStyles){const e=c.getRootNode();v=function(e,t){const n=[],o=t.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t<o.length;t+=1){const r=o[t];if("STYLE"===r.tagName){const t=e.createElement(r.tagName),n=r.sheet;if(n){let o="";for(let e=0;e<n.cssRules.length;e+=1)"string"==typeof n.cssRules[e].cssText&&(o+=`${n.cssRules[e].cssText}\r\n`);t.appendChild(e.createTextNode(o)),e.head.appendChild(t)}}else if(r.getAttribute("href")){const t=e.createElement(r.tagName);for(let e=0;e<r.attributes.length;e+=1){const n=r.attributes[e];n&&t.setAttribute(n.nodeName,n.nodeValue||"")}n.push(new Promise((e=>{t.addEventListener("load",(()=>e()))}))),e.head.appendChild(t)}}return n}(a,"ShadowRoot"===e.constructor.name?e:s.current)}Promise.all(v).then((()=>{n.contentWindow.print()}))}),[e,s,t]),f=r.useCallback((t=>{s.current.body.removeChild(t),e.current.restoreState(a.current||{}),a.current?.columns?.columnVisibilityModel||e.current.setColumnVisibilityModel(l.current),e.current.setState((e=>(0,o.A)({},e,{virtualization:u.current}))),e.current.setRows(c.current),a.current=null,l.current={},c.current=[]}),[e]),g=r.useCallback((async n=>{if(i.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(a.current=e.current.exportState(),l.current=(0,j.FY)(e),c.current=e.current.getSortedRows().filter((e=>!e[wt.gb])),t.pagination){const t={page:0,pageSize:(0,Pn.O7)(e)};e.current.setState((e=>(0,o.A)({},e,{pagination:(0,o.A)({},e.pagination,{paginationModel:Mi(e.pagination,"DataGridPro",t)})})))}u.current=e.current.state.virtualization,e.current.setState((e=>(0,o.A)({},e,{virtualization:(0,o.A)({},e.virtualization,{enabled:!1,enabledForColumns:!1})}))),await d(n?.fields,n?.allColumns,n?.includeCheckboxes),h(n?.getRowsToExport??vi),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const r=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(n?.fileName);r.onload=()=>{p(r,n),r.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&f(r)}))},s.current.body.appendChild(r)}),[t,i,e,p,f,d,h]);no(e,{exportDataAsPrint:g},"public");const b=r.useCallback(((e,t)=>t.printOptions?.disableToolbarButton?e:[...e,{component:(0,M.jsx)(Ai,{options:t.printOptions}),componentName:"printExport"}]),[]);hi(e,"exportMenu",b)})(e,t),((e,t)=>{const n=t.ignoreValueFormatterDuringExport,o=("object"==typeof n?n?.clipboardExport:n)||!1,i=t.clipboardCopyCellDelimiter,s=r.useCallback((t=>{if(!function(e){return(e.ctrlKey||e.metaKey)&&"C"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey}(t))return;if(n=t.target,window.getSelection()?.toString()||n&&(n.selectionEnd||0)-(n.selectionStart||0)>0)return;var n;let r="";if(Io(e)>0)r=e.current.getDataAsCsv({includeHeaders:!1,delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1});else{const t=po(e);if(t){const n=e.current.getCellParams(t.id,t.field);r=oi(n,{csvOptions:{delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:o})}}var s;r=e.current.unstable_applyPipeProcessors("clipboardCopy",r),r&&(s=r,navigator.clipboard?navigator.clipboard.writeText(s).catch((()=>{ci(s)})):ci(s),e.current.publishEvent("clipboardCopy",r))}),[e,o,i]);qr(e,(()=>e.current.rootElementRef.current),"keydown",s),be(e,"clipboardCopy",t.onClipboardCopy)})(e,t),function(e,t){const n=Ur(e,"useResizeContainer"),i=r.useRef(!1),s=r.useRef(gs),a=(0,b.Nc)(e,j.Q1),l=(0,b.Nc)(e,N),c=(0,b.Nc)(e,ys),u=r.useRef(!0),{rowHeight:d,headerHeight:h,groupHeaderHeight:p,headerFilterHeight:f,headersTotalHeight:m,leftPinnedWidth:g,rightPinnedWidth:v}=Cs(t,e,l,a),y=r.useCallback((()=>Q(e)),[e]),w=r.useCallback((t=>{e.current.setState((e=>(0,o.A)({},e,{dimensions:t}))),e.current.rootElementRef.current&&ws(e.current.rootElementRef.current,Q(e))}),[e]),C=r.useCallback((()=>{const n=Q(e);if(!n.isReady)return 0;const o=Un(e);if(t.getRowHeight){const t=eo(e),n=t.lastRowIndex-t.firstRowIndex;return Math.min(n-1,o.rows.length)}const r=Math.floor(n.viewportInnerSize.height/d);return Math.min(r,o.rows.length)}),[e,t.getRowHeight,d]),x=r.useCallback((()=>{if(u.current)return;const n=function(e,t){if(void 0!==t)return t;if(null===e)return 0;const n=xs.get(e);if(void 0!==n)return n;const o=(0,ki.A)(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const r=o.offsetWidth-o.clientWidth;return e.removeChild(o),xs.set(e,r),r}(e.current.mainElementRef.current,t.scrollbarSize),o=Yn(e),r=m+o.pinnedTopRowsTotalHeight,i=o.pinnedBottomRowsTotalHeight,a={width:c,height:xo(o.currentPageTotalHeight,1)};let l,b,y=!1,C=!1;if(t.autoHeight)C=!1,y=Math.round(c)>Math.round(s.current.width),l={width:s.current.width,height:r+i+a.height},b={width:Math.max(0,l.width-(C?n:0)),height:Math.max(0,l.height-(y?n:0))};else{l={width:s.current.width,height:s.current.height},b={width:Math.max(0,l.width),height:Math.max(0,l.height-r-i)};const e=a,t=b,o=e.width>t.width,c=e.height>t.height;(o||c)&&(C=c,y=e.width+(C?n:0)>t.width,y&&(C=e.height+n>t.height)),C&&(b.width-=n),y&&(b.height-=n)}const x=Math.max(l.width,c+(C?n:0)),S={width:c,height:r+a.height+i},A={isReady:!0,root:s.current,viewportOuterSize:l,viewportInnerSize:b,contentSize:a,minimumSize:S,hasScrollX:y,hasScrollY:C,scrollbarSize:n,headerHeight:h,groupHeaderHeight:p,headerFilterHeight:f,rowWidth:x,rowHeight:d,columnsTotalWidth:c,leftPinnedWidth:g,rightPinnedWidth:v,headersTotalHeight:m,topContainerHeight:r,bottomContainerHeight:i},E=e.current.state.dimensions;var k,R;(0,Ri.H)(E,A)||(w(A),k=A.viewportInnerSize,R=E.viewportInnerSize,(k.width!==R.width||k.height!==R.height)&&e.current.publishEvent("viewportInnerSizeChange",A.viewportInnerSize),e.current.updateRenderContext?.())}),[e,w,t.scrollbarSize,t.autoHeight,d,h,p,f,c,m,g,v]),S=(0,ce.A)(x),A=r.useMemo((()=>t.resizeThrottleMs>0?function(e,t=166){let n,o;const r=()=>{n=void 0,e(...o)};function i(...e){o=e,void 0===n&&(n=setTimeout(r,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}((()=>{S(),e.current.publishEvent("debouncedResize",s.current)}),t.resizeThrottleMs):void 0),[e,t.resizeThrottleMs,S]);r.useEffect((()=>A?.clear),[A]);const E={getRootDimensions:y},k={updateDimensions:x,getViewportPageSize:C};(0,we.A)(x,[x]),no(e,E,"public"),no(e,k,"private");const R=r.useCallback((t=>{ws(t,Q(e))}),[e]),M=r.useCallback((e=>{if(s.current=e,0!==e.height||i.current||t.autoHeight||So||(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),i.current=!0),0!==e.width||i.current||So||(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),i.current=!0),u.current||!A)return u.current=!1,void x();A()}),[x,t.autoHeight,A,n]);be(e,"rootMount",R),be(e,"resize",M),be(e,"debouncedResize",t.onResize)}(e,t),function(e,t){be(e,"columnHeaderClick",t.onColumnHeaderClick),be(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),be(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),be(e,"columnHeaderOver",t.onColumnHeaderOver),be(e,"columnHeaderOut",t.onColumnHeaderOut),be(e,"columnHeaderEnter",t.onColumnHeaderEnter),be(e,"columnHeaderLeave",t.onColumnHeaderLeave),be(e,"cellClick",t.onCellClick),be(e,"cellDoubleClick",t.onCellDoubleClick),be(e,"cellKeyDown",t.onCellKeyDown),be(e,"preferencePanelClose",t.onPreferencePanelClose),be(e,"preferencePanelOpen",t.onPreferencePanelOpen),be(e,"menuOpen",t.onMenuOpen),be(e,"menuClose",t.onMenuClose),be(e,"rowDoubleClick",t.onRowDoubleClick),be(e,"rowClick",t.onRowClick),be(e,"stateChange",t.onStateChange)}(e,t),(e=>{const t=r.useCallback(((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t)),[e]),n=r.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()}))}),[e]);no(e,{exportState:t,restoreState:n},"public")})(e),function(e,t){const n=n=>{e.current.setState((e=>(0,o.A)({},e,{virtualization:(0,o.A)({},e.virtualization,{enabled:n,enabledForColumns:n,enabledForRows:n&&!t.autoHeight})})))},i={unstable_setVirtualization:n,unstable_setColumnVirtualization:t=>{e.current.setState((e=>(0,o.A)({},e,{virtualization:(0,o.A)({},e.virtualization,{enabledForColumns:t})})))}};no(e,i,"public"),r.useEffect((()=>{n(!t.disableVirtualization)}),[t.disableVirtualization,t.autoHeight])}(e,t),function(e,t){const n=()=>{e.current.setState((t=>t.listViewColumn?(0,o.A)({},t,{listViewColumn:(0,o.A)({},t.listViewColumn,{computedWidth:Qs(e)})}):t))},i=r.useRef(null);me(e,"viewportInnerSizeChange",(e=>{i.current!==e.width&&(i.current=e.width,n())})),me(e,"columnVisibilityModelChange",n),(0,we.A)((()=>{const n=t.listViewColumn;n&&e.current.setState((t=>(0,o.A)({},t,{listViewColumn:(0,o.A)({},n,{computedWidth:Qs(e)})})))}),[e,t.listViewColumn]),r.useEffect((()=>{t.listView&&t.listViewColumn}),[t.listView,t.listViewColumn])}(e,t),((e,t)=>{const{api:n,strategyProcessor:i,events:s,setStrategyAvailability:a}=((e,t,n={})=>{const i=r.useCallback((()=>{e.current.setStrategyAvailability(_r.DataSource,ea.Default,t.dataSource?()=>!0:()=>!1)}),[e,t.dataSource]),[s,a]=r.useState(!1),l=(0,b.Nc)(e,Hn),c=r.useRef(0),u=t.onDataSourceError,d=(0,Rn.A)((()=>{const e=t.pageSizeOptions.map((e=>"number"==typeof e?e:e.value)).sort(((e,t)=>e-t)),n=Math.min(l.pageSize,e[0]);return new ta(n)})).current,[h,p]=r.useState((()=>aa(t.dataSourceCache,n.cacheOptions))),f=r.useCallback((async(r,i)=>{const a=t.dataSource?.getRows;if(!a)return;if(r&&r!==wt.OL&&"DataGrid"!==t.signature)return void n.fetchRowChildren?.([r]);n.clearDataSourceState?.();const l=(0,o.A)({},Zs(e),e.current.unstable_applyPipeProcessors("getRowsParams",{}),i),p=d.getCacheKeys(l).map((e=>h.get(e)));if(p.every((e=>void 0!==e)))return void e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:ta.mergeResponses(p),fetchParams:l});(s||0===e.current.getRowsCount())&&e.current.setLoading(!0);const f=c.current+1;c.current=f;try{const t=await a(l);d.splitResponse(l,t).forEach(((e,t)=>h.set(t,e))),c.current===f&&e.current.applyStrategyProcessor("dataSourceRowsUpdate",{response:t,fetchParams:l})}catch(t){c.current===f&&(e.current.applyStrategyProcessor("dataSourceRowsUpdate",{error:t,fetchParams:l}),"function"==typeof u&&u(new ra({message:t?.message,params:l,cause:t})))}finally{s&&c.current===f&&e.current.setLoading(!1)}}),[d,h,e,s,t.dataSource?.getRows,u,n,t.signature]),m=r.useCallback((()=>{a(e.current.getActiveStrategy(_r.DataSource)===ea.Default)}),[e]),g=r.useCallback((t=>{if("error"in t)return void e.current.setRows([]);const{response:n}=t;void 0!==n.rowCount&&e.current.setRowCount(n.rowCount),e.current.setRows(n.rows),e.current.unstable_applyPipeProcessors("processDataSourceRows",{params:t.fetchParams,response:n},!0)}),[e]),v=t.dataSource?.updateRow,y=n.handleEditRow,w=r.useCallback((async t=>{if(v)try{const n=await v(t);return"function"==typeof y?(y(t,n),n):(e.current.updateNestedRows([n],[]),n&&!(0,Ri.H)(n,t.previousRow)&&e.current.dataSource.cache.clear(),n)}catch(e){throw"function"==typeof u&&u(new ia({message:e?.message,params:t,cause:e})),e}}),[e,v,u,y]),C={dataSource:{fetchRows:f,cache:h,editRow:w}},x=r.useMemo((()=>(0,Js.A)(f,0)),[f]),S=r.useRef(!0);return r.useEffect((()=>{if(S.current)return void(S.current=!1);if(void 0===t.dataSourceCache)return;const e=aa(t.dataSourceCache,n.cacheOptions);p((t=>t!==e?e:t))}),[t.dataSourceCache,n.cacheOptions]),r.useEffect((()=>{t.dataSource&&(e.current.dataSource.cache.clear(),e.current.dataSource.fetchRows())}),[e,t.dataSource]),{api:{public:C},debouncedFetchRows:x,strategyProcessor:{strategyName:ea.Default,group:"dataSourceRowsUpdate",processor:g},setStrategyAvailability:i,cacheChunkManager:d,cache:h,events:{strategyAvailabilityChange:m,sortModelChange:_e(s,(()=>x())),filterModelChange:_e(s,(()=>x())),paginationModelChange:_e(s,(()=>x()))}}})(e,t);no(e,n.public,"public"),Pi(e,i.strategyName,i.group,i.processor),Object.entries(s).forEach((([t,n])=>{me(e,t,n)})),r.useEffect((()=>{a()}),[a])})(e,t)};var ca=n(53356),ua=n(46343);const da={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",noColumnsOverlayLabel:"No columns",noColumnsOverlayManageColumns:"Manage columns",emptyPivotOverlayLabel:"Add fields to rows, columns, and values to create a pivot table",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",toolbarPivot:"Pivot",toolbarAssistant:"AI Assistant",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",columnsManagementDeleteIconLabel:"Clear",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",headerFilterClear:"Clear filter",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuAriaLabel:e=>`${e} column menu`,columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnMenuManagePivot:"Manage pivot",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",paginationRowsPerPage:"Rows per page:",paginationDisplayedRows:({from:e,to:t,count:n,estimated:o})=>o?`${e}–${t} of ${-1!==n?n:o&&o>t?`around ${o}`:`more than ${t}`}`:`${e}–${t} of ${-1!==n?n:`more than ${t}`}`,paginationItemAriaLabel:e=>"first"===e?"Go to first page":"last"===e?"Go to last page":"next"===e?"Go to next page":"Go to previous page",rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size",pivotToggleLabel:"Pivot",pivotRows:"Rows",pivotColumns:"Columns",pivotValues:"Values",pivotCloseButton:"Close pivot settings",pivotSearchButton:"Search fields",pivotSearchControlPlaceholder:"Search fields",pivotSearchControlLabel:"Search fields",pivotSearchControlClear:"Clear search",pivotNoFields:"No fields",pivotMenuMoveUp:"Move up",pivotMenuMoveDown:"Move down",pivotMenuMoveToTop:"Move to top",pivotMenuMoveToBottom:"Move to bottom",pivotMenuRows:"Rows",pivotMenuColumns:"Columns",pivotMenuValues:"Values",pivotMenuOptions:"Field options",pivotMenuAddToRows:"Add to Rows",pivotMenuAddToColumns:"Add to Columns",pivotMenuAddToValues:"Add to Values",pivotMenuRemove:"Remove",pivotDragToRows:"Drag here to create rows",pivotDragToColumns:"Drag here to create columns",pivotDragToValues:"Drag here to create values",pivotYearColumnHeaderName:"(Year)",pivotQuarterColumnHeaderName:"(Quarter)",aiAssistantPanelTitle:"AI Assistant",aiAssistantPanelClose:"Close AI Assistant",aiAssistantPanelNewConversation:"New conversation",aiAssistantPanelConversationHistory:"Conversation history",aiAssistantPanelEmptyConversation:"No prompt history",aiAssistantSuggestions:"Suggestions",promptFieldLabel:"Prompt",promptFieldPlaceholder:"Type a prompt…",promptFieldPlaceholderWithRecording:"Type or record a prompt…",promptFieldPlaceholderListening:"Listening for prompt…",promptFieldSpeechRecognitionNotSupported:"Speech recognition is not supported in this browser",promptFieldSend:"Send",promptFieldRecord:"Record",promptFieldStopRecording:"Stop recording",promptRerun:"Run again",promptProcessing:"Processing…",promptAppliedChanges:"Applied changes",promptChangeGroupDescription:e=>`Group by ${e}`,promptChangeAggregationLabel:(e,t)=>`${e} (${t})`,promptChangeAggregationDescription:(e,t)=>`Aggregate ${e} (${t})`,promptChangeFilterLabel:(e,t,n)=>"is any of"===t?`${e} is any of: ${n}`:`${e} ${t} ${n}`,promptChangeFilterDescription:(e,t,n)=>"is any of"===t?`Filter where ${e} is any of: ${n}`:`Filter where ${e} ${t} ${n}`,promptChangeSortDescription:(e,t)=>`Sort by ${e} (${t})`,promptChangePivotEnableLabel:"Pivot",promptChangePivotEnableDescription:"Enable pivot",promptChangePivotColumnsLabel:e=>`Columns (${e})`,promptChangePivotColumnsDescription:(e,t)=>`${e}${t?` (${t})`:""}`,promptChangePivotRowsLabel:e=>`Rows (${e})`,promptChangePivotValuesLabel:e=>`Values (${e})`,promptChangePivotValuesDescription:(e,t)=>`${e} (${t})`},ha=["field","type","align","width","height","empty","style","className"],pa="1.3em",fa=[40,80],ma={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},ga=function(){const e=(t=12345,()=>{let e=t+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296});var t;return(t,n)=>t+(n-t)*e()}(),ba=p((function(e){const{field:t,type:n,align:i,width:s,height:c,empty:h=!1,style:p,className:f}=e,g=(0,a.A)(e,ha),b=(0,E.A)(),v=(e=>{const{align:t,classes:n,empty:o}=e,r={root:["cell","cellSkeleton",`cell--text${t?(0,u.A)(t):"Left"}`,o&&"cellEmpty"]};return(0,d.A)(r,m.B,n)})({classes:b.classes,align:i,empty:h}),y=r.useMemo((()=>{if("boolean"===n||"actions"===n)return{variant:"circular",width:pa,height:pa};const[e,t]=n?ma[n]??fa:fa;return{variant:"text",width:`${Math.round(ga(e,t))}%`,height:"1.2em"}}),[n]);return(0,M.jsx)("div",(0,o.A)({"data-field":t,className:(0,l.A)(v.root,f),style:(0,o.A)({height:c,maxWidth:s,minWidth:s},p)},g,{children:!h&&(0,M.jsx)(b.slots.baseSkeleton,(0,o.A)({},y))}))})),va=["className"],ya=(0,Y.A)("div",{name:"MuiDataGrid",slot:"IconButtonContainer"})((()=>({display:"flex",visibility:"hidden",width:0}))),wa=(0,s.R)((function(e,t){const{className:n}=e,r=(0,a.A)(e,va),i=(0,E.A)(),s=(e=>{const{classes:t}=e;return(0,d.A)({root:["iconButtonContainer"]},m.B,t)})(i);return(0,M.jsx)(ya,(0,o.A)({className:(0,l.A)(s.root,n),ownerState:i},r,{ref:t}))}));function Ca(e){const{counter:t,field:n,onClick:i}=e,s=(0,W.h)(),a=(0,E.A)(),l=(e=>{const{classes:t}=e;return(0,d.A)({icon:["filterIcon"]},m.B,t)})((0,o.A)({},e,{classes:a.classes})),c=(0,$e.A)(),u=(0,b.Nc)(s,_,c),h=(0,$e.A)(),p=r.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:o}=B(s);t&&o===V.filters?s.current.hideFilterPanel():s.current.showFilterPanel(void 0,h,c),i&&i(s.current.getColumnHeaderParams(n),e)}),[s,n,i,h,c]);if(!t)return null;const f=(0,M.jsx)(a.slots.baseIconButton,(0,o.A)({id:c,onClick:p,"aria-label":s.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?h:void 0},a.slotProps?.baseIconButton,{children:(0,M.jsx)(a.slots.columnFilteredIcon,{className:l.icon,fontSize:"small"})}));return(0,M.jsx)(a.slots.baseTooltip,(0,o.A)({title:s.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},a.slotProps?.baseTooltip,{children:(0,M.jsxs)(wa,{children:[t>1&&(0,M.jsx)(a.slots.baseBadge,{badgeContent:t,color:"default",children:f}),1===t&&f]})}))}const xa=["sortingOrder"],Sa=r.memo((function(e){const{sortingOrder:t}=e,n=(0,a.A)(e,xa),r=(0,E.A)(),[i]=t,s="asc"===i?r.slots.columnSortedAscendingIcon:r.slots.columnSortedDescendingIcon;return s?(0,M.jsx)(s,(0,o.A)({},n)):null})),Aa=["direction","index","sortingOrder","disabled","className"],Ea=(0,Y.A)(Ce,{name:"MuiDataGrid",slot:"SortButton"})({transition:g.f.transition(["opacity"],{duration:g.f.transitions.duration.short,easing:g.f.transitions.easing.easeInOut})});function ka(e){const{direction:t,index:n,sortingOrder:i,disabled:s,className:c}=e,u=(0,a.A)(e,Aa),h=(0,W.h)(),p=(0,E.A)(),f=(0,o.A)({},e,{classes:p.classes}),g=(e=>{const{classes:t}=e;return(0,d.A)({root:["sortButton"],icon:["sortIcon"]},m.B,t)})(f),b=function(e,t,n,r){let i;const s={};return"asc"===t?i=e.columnSortedAscendingIcon:"desc"===t?i=e.columnSortedDescendingIcon:(i=Sa,s.sortingOrder=r),i?(0,M.jsx)(i,(0,o.A)({fontSize:"small",className:n},s)):null}(p.slots,t,g.icon,i);if(!b)return null;const v=(0,M.jsx)(Ea,(0,o.A)({as:p.slots.baseIconButton,ownerState:f,"aria-label":h.current.getLocaleText("columnHeaderSortIconLabel"),title:h.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:s,className:(0,l.A)(g.root,c)},p.slotProps?.baseIconButton,u,{children:b}));return(0,M.jsxs)(r.Fragment,{children:[null!=n&&(0,M.jsx)(p.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:v}),null==n&&v]})}function Ra(e){return(0,M.jsx)(wa,{children:(0,M.jsx)(ka,(0,o.A)({},e,{tabIndex:-1}))})}const Ma=r.memo(Ra),Ia=["className","selectedRowCount"],Pa=(0,Y.A)("div",{name:"MuiDataGrid",slot:"SelectedRowCount"})({alignItems:"center",display:"flex",margin:g.f.spacing(0,2),visibility:"hidden",width:0,height:0,[g.f.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}),Ta=(0,s.R)((function(e,t){const{className:n,selectedRowCount:r}=e,i=(0,a.A)(e,Ia),s=(0,W.h)(),c=(0,E.A)(),u=(e=>{const{classes:t}=e;return(0,d.A)({root:["selectedRowCount"]},m.B,t)})(c),h=s.current.getLocaleText("footerRowSelected")(r);return(0,M.jsx)(Pa,(0,o.A)({className:(0,l.A)(u.root,n),ownerState:c},i,{ref:t,children:h}))})),Oa=["className"],$a=(0,Y.A)("div",{name:"MuiDataGrid",slot:"FooterContainer"})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),Da=(0,s.R)((function(e,t){const{className:n}=e,r=(0,a.A)(e,Oa),i=(0,E.A)(),s=(e=>{const{classes:t}=e;return(0,d.A)({root:["footerContainer","withBorderColor"]},m.B,t)})(i);return(0,M.jsx)($a,(0,o.A)({className:(0,l.A)(s.root,n),ownerState:i},r,{ref:t}))})),Na=(0,s.R)((function(e,t){const n=(0,W.h)(),r=(0,E.A)(),i=(0,b.Nc)(n,Ee.O8),s=(0,b.Nc)(n,Io),a=(0,b.Nc)(n,Pn.RN),l=!r.hideFooterSelectedRowCount&&s>0?(0,M.jsx)(Ta,{selectedRowCount:s}):(0,M.jsx)("div",{}),c=r.hideFooterRowCount||r.pagination?null:(0,M.jsx)(r.slots.footerRowCount,(0,o.A)({},r.slotProps?.footerRowCount,{rowCount:i,visibleRowCount:a})),u=r.pagination&&!r.hideFooterPagination&&r.slots.pagination&&(0,M.jsx)(r.slots.pagination,{});return(0,M.jsxs)(Da,(0,o.A)({},e,{ref:t,children:[l,c,u]}))})),La=["className","rowCount","visibleRowCount"],Ha=(0,Y.A)("div",{name:"MuiDataGrid",slot:"RowCount"})({alignItems:"center",display:"flex",margin:g.f.spacing(0,2)}),za=(0,s.R)((function(e,t){const{className:n,rowCount:r,visibleRowCount:i}=e,s=(0,a.A)(e,La),c=(0,W.h)(),u=(0,E.A)(),h=(e=>{const{classes:t}=e;return(0,d.A)({root:["rowCount"]},m.B,t)})(u);if(0===r)return null;const p=i<r?c.current.getLocaleText("footerTotalVisibleRows")(i,r):r.toLocaleString();return(0,M.jsxs)(Ha,(0,o.A)({className:(0,l.A)(h.root,n),ownerState:u},s,{ref:t,children:[c.current.getLocaleText("footerTotalRows")," ",p]}))})),Fa=["className"],ja=(0,Y.A)("div",{name:"MuiDataGrid",slot:"Overlay"})({width:"100%",height:"100%",display:"flex",gap:g.f.spacing(1),flexDirection:"column",alignSelf:"center",alignItems:"center",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:g.f.colors.background.backdrop}),Ba=(0,s.R)((function(e,t){const{className:n}=e,r=(0,a.A)(e,Fa),i=(0,E.A)(),s=(e=>{const{classes:t}=e;return(0,d.A)({root:["overlay"]},m.B,t)})(i);return(0,M.jsx)(ja,(0,o.A)({className:(0,l.A)(s.root,n),ownerState:i},r,{ref:t}))})),_a=(e,t,n,o,r,i)=>{let s;switch(e){case Rt.LEFT:s=o[n];break;case Rt.RIGHT:s=r-o[n]-t+i;break;default:s=void 0}return s},Va=(e,t,n,o,r)=>{const i=t===n-1;return!(e!==Rt.LEFT||!i)||!!o&&(e===Rt.LEFT||(e===Rt.RIGHT?!i:!i||r))},Wa=(e,t)=>e===Rt.RIGHT&&0===t,Ga={root:m.x.scrollbarFiller,header:m.x["scrollbarFiller--header"],borderTop:m.x["scrollbarFiller--borderTop"],borderBottom:m.x["scrollbarFiller--borderBottom"],pinnedRight:m.x["scrollbarFiller--pinnedRight"]};function Ka({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:o}){return(0,M.jsx)("div",{role:"presentation",className:(0,l.A)(Ga.root,e&&Ga.header,t&&Ga.borderTop,n&&Ga.borderBottom,o&&Ga.pinnedRight)})}const Ua=(e,t)=>{if(e)if(t){if(e===Rt.LEFT)return"right";if(e===Rt.RIGHT)return"left"}else{if(e===Rt.LEFT)return"left";if(e===Rt.RIGHT)return"right"}};function qa(e,t,n,o){const r=Ua(n,t);return r&&void 0!==o?(e[r]=o,e):e}const Xa=["skeletonRowsCount","visibleColumns","showFirstRowBorder"],Ya=(0,Y.A)("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay"})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),Qa=e=>parseInt(e.getAttribute("data-colindex"),10),Ja=(0,s.R)((function(e,t){const n=(0,E.A)(),{slots:i}=n,s=(0,Jt.I)(),u=(e=>{const{classes:t}=e;return(0,d.A)({root:["skeletonLoadingOverlay"]},m.B,t)})({classes:n.classes}),h=r.useRef(null),p=(0,c.A)(h,t),f=(0,W.h)(),g=(0,b.Nc)(f,Q),v=(0,b.Nc)(f,J),y=(0,b.Nc)(f,j.Sw),w=r.useMemo((()=>y.filter((e=>e<=v)).length),[v,y]),{skeletonRowsCount:C,visibleColumns:x,showFirstRowBorder:S}=e,A=(0,a.A)(e,Xa),k=(0,b.Nc)(f,j.iv),R=r.useMemo((()=>k.slice(0,w)),[k,w]),I=(0,b.Nc)(f,j.Q1),P=r.useCallback((e=>-1!==I.left.findIndex((t=>t.field===e))?Rt.LEFT:-1!==I.right.findIndex((t=>t.field===e))?Rt.RIGHT:void 0),[I.left,I.right]),T=r.useMemo((()=>{const e=[];for(let t=0;t<C;t+=1){const r=[];for(let e=0;e<R.length;e+=1){const a=R[e],c=P(a.field),u=c===Rt.LEFT,d=c===Rt.RIGHT,h=Ua(c,s),p=h?I[h].length:R.length-I.left.length-I.right.length,f=h?I[h].findIndex((e=>e.field===a.field)):e-I.left.length,b=g.hasScrollY?g.scrollbarSize:0,v=qa({},s,c,_a(c,a.computedWidth,e,y,g.columnsTotalWidth,b)),w=g.columnsTotalWidth<g.viewportOuterSize.width,C=Va(c,f,p,n.showCellVerticalBorder,w),S=Wa(c,f),A=e===R.length-1,E=d&&0===f,k=E&&w,T=A&&!E&&w,O=g.viewportOuterSize.width-g.columnsTotalWidth,$=Math.max(0,O),D=(0,M.jsx)(i.skeletonCell,{width:$,empty:!0},`skeleton-filler-column-${t}`),N=A&&0!==b;k&&r.push(D),r.push((0,M.jsx)(i.skeletonCell,{field:a.field,type:a.type,align:a.align,width:"var(--width)",height:g.rowHeight,"data-colindex":e,empty:x&&!x.has(a.field),className:(0,l.A)(u&&m.x["cell--pinnedLeft"],d&&m.x["cell--pinnedRight"],C&&m.x["cell--withRightBorder"],S&&m.x["cell--withLeftBorder"]),style:(0,o.A)({"--width":`${a.computedWidth}px`},v)},`skeleton-column-${t}-${a.field}`)),T&&r.push(D),N&&r.push((0,M.jsx)(Ka,{pinnedRight:I.right.length>0},`skeleton-scrollbar-filler-${t}`))}e.push((0,M.jsx)("div",{className:(0,l.A)(m.x.row,m.x.rowSkeleton,0===t&&!S&&m.x["row--firstVisible"]),children:r},`skeleton-row-${t}`))}return e}),[C,R,P,s,I,g.hasScrollY,g.scrollbarSize,g.columnsTotalWidth,g.viewportOuterSize.width,g.rowHeight,y,n.showCellVerticalBorder,i,x,S]);return me(f,"columnResize",(e=>{const{colDef:t,width:n}=e,o=h.current?.querySelectorAll(`[data-field="${Hi(t.field)}"]`);if(!o)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const r=R.findIndex((e=>e.field===t.field)),i=P(t.field),s=i===Rt.LEFT,a=i===Rt.RIGHT,l=getComputedStyle(o[0]).getPropertyValue("--width"),c=parseInt(l,10)-n;if(o&&o.forEach((e=>{e.style.setProperty("--width",`${n}px`)})),s){const e=h.current?.querySelectorAll(`.${m.x["cell--pinnedLeft"]}`);e?.forEach((e=>{Qa(e)>r&&(e.style.left=parseInt(getComputedStyle(e).left,10)-c+"px")}))}if(a){const e=h.current?.querySelectorAll(`.${m.x["cell--pinnedRight"]}`);e?.forEach((e=>{Qa(e)<r&&(e.style.right=`${parseInt(getComputedStyle(e).right,10)+c}px`)}))}})),(0,M.jsx)(Ya,(0,o.A)({className:u.root},A,{ref:p,children:T}))})),Za=(0,s.R)((function(e,t){const n=(0,W.h)(),r=(0,b.Nc)(n,Q),i=r?.viewportInnerSize.height??0,s=Math.ceil(i/r.rowHeight);return(0,M.jsx)(Ja,(0,o.A)({},e,{skeletonRowsCount:s,ref:t}))})),el=["variant","noRowsVariant","style"],tl={"circular-progress":{component:e=>e.slots.baseCircularProgress,style:{}},"linear-progress":{component:e=>e.slots.baseLinearProgress,style:{display:"block"}},skeleton:{component:()=>Za,style:{display:"block"}}},nl=(0,s.R)((function(e,t){const{variant:n="linear-progress",noRowsVariant:r="skeleton",style:i}=e,s=(0,a.A)(e,el),l=(0,W.h)(),c=(0,E.A)(),u=(0,b.Nc)(l,Ee.H0),d=tl[0===u?r:n],h=d.component(c);return(0,M.jsx)(Ba,(0,o.A)({style:(0,o.A)({},d.style,i)},s,{ref:t,children:(0,M.jsx)(h,{})}))})),ol=(0,s.R)((function(e,t){const n=(0,W.h)().current.getLocaleText("noRowsLabel");return(0,M.jsx)(Ba,(0,o.A)({},e,{ref:t,children:n}))})),rl=(0,s.R)((function(e,t){const n=(0,E.A)(),r=(0,W.h)(),i=(0,b.Nc)(r,j.JR),s=!n.disableColumnSelector&&i.length>0;return(0,M.jsxs)(Ba,(0,o.A)({},e,{ref:t,children:[r.current.getLocaleText("noColumnsOverlayLabel"),s&&(0,M.jsx)(n.slots.baseButton,(0,o.A)({size:"small"},n.slotProps?.baseButton,{onClick:()=>{r.current.showPreferences(V.columns)},children:r.current.getLocaleText("noColumnsOverlayManageColumns")}))]}))})),il=(0,f.Ay)(Ce)({maxHeight:"calc(100% + 1px)",flexGrow:1}),sl=["className"],al=(0,Y.A)("div",{name:"MuiDataGrid",slot:"PanelContent"})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,padding:g.f.spacing(2.5,1.5,2,1),gap:g.f.spacing(2.5)});function ll(e){const{className:t}=e,n=(0,a.A)(e,sl),r=(0,E.A)(),i=(e=>{const{classes:t}=e;return(0,d.A)({root:["panelContent"]},m.B,t)})(r);return(0,M.jsx)(al,(0,o.A)({className:(0,l.A)(i.root,t),ownerState:r},n))}const cl=["className"],ul=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"PanelFooter"})({padding:g.f.spacing(1),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${g.f.colors.border.base}`});function dl(e){const{className:t}=e,n=(0,a.A)(e,cl),r=(0,E.A)(),i=(e=>{const{classes:t}=e;return(0,d.A)({root:["panelFooter"]},m.B,t)})(r);return(0,M.jsx)(ul,(0,o.A)({className:(0,l.A)(i.root,t),ownerState:r},n))}const hl=["className"],pl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"PanelWrapper"})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),fl=(0,s.R)((function(e,t){const{className:n}=e,r=(0,a.A)(e,hl),i=(0,E.A)(),s=(e=>{const{classes:t}=e;return(0,d.A)({root:["panelWrapper"]},m.B,t)})(i);return(0,M.jsx)(pl,(0,o.A)({tabIndex:-1,className:(0,l.A)(s.root,n),ownerState:i},r,{ref:t}))})),ml=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],gl=["InputComponentProps"],bl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"FilterForm"})({display:"flex",gap:g.f.spacing(1.5)}),vl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon"})({flexShrink:0,display:"flex",justifyContent:"center",alignItems:"center"}),yl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput"})({minWidth:75,justifyContent:"end"}),wl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput"})({width:150}),Cl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput"})({width:150}),xl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormValueInput"})({width:190}),Sl=e=>e.headerName||e.field,Al=new Intl.Collator,El=(0,s.R)((function(e,t){const{item:n,hasMultipleFilters:i,deleteFilter:s,applyFilterChanges:c,showMultiFilterOperators:h,disableMultiFilterOperator:p,applyMultiFilterOperatorChanges:f,focusElementRef:g,logicOperators:v=[We.And,We.Or],columnsSort:y,filterColumns:w,deleteIconProps:C={},logicOperatorInputProps:x={},operatorInputProps:S={},columnInputProps:A={},valueInputProps:k={},readOnly:R}=e,I=(0,a.A)(e,ml),P=(0,W.h)(),T=(0,b.Nc)(P,j.gv),O=(0,b.Nc)(P,j.Oe),$=(0,b.Nc)(P,Pn.ZI),D=(0,$e.A)(),N=(0,$e.A)(),L=(0,$e.A)(),H=(0,$e.A)(),z=(0,E.A)(),F=(e=>{const{classes:t}=e;return(0,d.A)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},m.B,t)})(z),B=r.useRef(null),_=r.useRef(null),V=$.logicOperator??We.And,G=i&&v.length>0,K=(z.slotProps?.baseSelect||{}).native??!1,U=z.slotProps?.baseSelectOption||{},{InputComponentProps:q}=k,X=(0,a.A)(k,gl),Y=(0,b.Nc)(P,qo),Q=(0,b.Nc)(P,Yo),{filteredColumns:J,selectedField:Z}=r.useMemo((()=>{let e=n.field;const t=!1===T[n.field].filterable?T[n.field]:null;if(t)return{filteredColumns:[t],selectedField:e};if(Y)return{filteredColumns:O.filter((e=>void 0!==Q.get(e.field))),selectedField:e};if(void 0===w||"function"!=typeof w)return{filteredColumns:O,selectedField:e};const o=w({field:n.field,columns:O,currentFilters:$?.items||[]});return{filteredColumns:O.filter((t=>{const r=o.includes(t.field);return t.field!==n.field||r||(e=void 0),r})),selectedField:e}}),[n.field,T,Y,w,O,$?.items,Q]),ee=r.useMemo((()=>{switch(y){case"asc":return J.sort(((e,t)=>Al.compare(Sl(e),Sl(t))));case"desc":return J.sort(((e,t)=>-Al.compare(Sl(e),Sl(t))));default:return J}}),[J,y]),te=n.field?P.current.getColumn(n.field):null,ne=r.useMemo((()=>n.operator&&te?te.filterOperators?.find((e=>e.value===n.operator)):null),[n,te]),oe=r.useCallback((e=>{const t=e.target.value,r=P.current.getColumn(t);if(r.field===te.field)return;const i=r.filterOperators.find((e=>e.value===n.operator))||r.filterOperators[0];let s=i.InputComponent&&i.InputComponent===ne?.InputComponent&&r.type===te.type?n.value:void 0;if("singleSelect"===r.type&&void 0!==s){const e=r,t=_t(e);Array.isArray(s)?s=s.filter((n=>void 0!==Vt(n,t,e?.getOptionValue))):void 0===Vt(n.value,t,e?.getOptionValue)&&(s=void 0)}c((0,o.A)({},n,{field:t,operator:i.value,value:s}))}),[P,c,n,te,ne]),re=r.useCallback((e=>{const t=e.target.value,r=te?.filterOperators.find((e=>e.value===t)),i=!r?.InputComponent||r?.InputComponent!==ne?.InputComponent;c((0,o.A)({},n,{operator:t,value:i?void 0:n.value}))}),[c,n,te,ne]),ie=r.useCallback((e=>{const t=e.target.value===We.And.toString()?We.And:We.Or;f(t)}),[f]);return r.useImperativeHandle(g,(()=>({focus:()=>{ne?.InputComponent?B?.current?.focus():_.current.focus()}})),[ne]),(0,M.jsxs)(bl,(0,o.A)({className:F.root,"data-id":n.id,ownerState:z},I,{ref:t,children:[(0,M.jsx)(vl,(0,o.A)({},C,{className:(0,l.A)(F.deleteIcon,C.className),ownerState:z,children:(0,M.jsx)(z.slots.baseIconButton,(0,o.A)({"aria-label":P.current.getLocaleText("filterPanelDeleteIconLabel"),title:P.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{s(n)},size:"small",disabled:R},z.slotProps?.baseIconButton,{children:(0,M.jsx)(z.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,M.jsx)(yl,(0,o.A)({as:z.slots.baseSelect,sx:[G?{display:"flex"}:{display:"none"},h?{visibility:"visible"}:{visibility:"hidden"},x.sx],className:(0,l.A)(F.logicOperatorInput,x.className),ownerState:z},x,{size:"small",slotProps:{htmlInput:{"aria-label":P.current.getLocaleText("filterPanelLogicOperator")}},value:V??"",onChange:ie,disabled:!!p||1===v.length,native:K},z.slotProps?.baseSelect,{children:v.map((e=>(0,r.createElement)(z.slots.baseSelectOption,(0,o.A)({},U,{native:K,key:e.toString(),value:e.toString()}),P.current.getLocaleText((e=>{switch(e){case We.And:return"filterPanelOperatorAnd";case We.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(e)))))})),(0,M.jsx)(wl,(0,o.A)({as:z.slots.baseSelect},A,{className:(0,l.A)(F.columnInput,A.className),ownerState:z,size:"small",labelId:N,id:D,label:P.current.getLocaleText("filterPanelColumns"),value:Z??"",onChange:oe,native:K,disabled:R},z.slotProps?.baseSelect,{children:ee.map((e=>(0,r.createElement)(z.slots.baseSelectOption,(0,o.A)({},U,{native:K,key:e.field,value:e.field}),Sl(e))))})),(0,M.jsx)(Cl,(0,o.A)({as:z.slots.baseSelect,size:"small"},S,{className:(0,l.A)(F.operatorInput,S.className),ownerState:z,labelId:H,label:P.current.getLocaleText("filterPanelOperator"),id:L,value:n.operator,onChange:re,native:K,inputRef:_,disabled:R},z.slotProps?.baseSelect,{children:te?.filterOperators?.map((e=>(0,r.createElement)(z.slots.baseSelectOption,(0,o.A)({},U,{native:K,key:e.value,value:e.value}),e.label||P.current.getLocaleText(`filterOperator${(0,u.A)(e.value)}`))))})),(0,M.jsx)(xl,(0,o.A)({},X,{className:(0,l.A)(F.valueInput,X.className),ownerState:z,children:ne?.InputComponent?(0,M.jsx)(ne.InputComponent,(0,o.A)({apiRef:P,item:n,applyValue:c,focusElementRef:B,disabled:R,slotProps:{root:{size:"small"}}},ne.InputComponentProps,q),n.field):null}))]}))})),kl=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],Rl=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),Ml=(0,s.R)((function(e,t){const n=(0,W.h)(),i=(0,E.A)(),s=(0,b.Nc)(n,Pn.ZI),l=(0,b.Nc)(n,j.Oe),c=(0,b.Nc)(n,j.U8),u=r.useRef(null),d=r.useRef(null),{logicOperators:h=[We.And,We.Or],columnsSort:p,filterFormProps:f,getColumnForNewFilter:m,disableAddFilterButton:g=!1,disableRemoveAllButton:v=!1}=e,y=(0,a.A)(e,kl),w=n.current.upsertFilterItem,C=r.useCallback((e=>{n.current.setFilterLogicOperator(e)}),[n]),x=r.useCallback((()=>{let e;if(m&&"function"==typeof m){const t=m({currentFilters:s?.items||[],columns:l});if(null===t)return null;e=l.find((({field:e})=>e===t))}else e=l.find((e=>e.filterOperators?.length));return e?Rl(e):null}),[s?.items,l,m]),S=r.useCallback((()=>{if(void 0===m||"function"!=typeof m)return x();const e=s.items.length?s.items:[x()].filter(Boolean),t=m({currentFilters:e,columns:l});if(null===t)return null;const n=l.find((({field:e})=>e===t));return n?Rl(n):null}),[s.items,l,m,x]),A=r.useMemo((()=>s.items.length?s.items:(d.current||(d.current=x()),d.current?[d.current]:[])),[s.items,x]),k=A.length>1,{readOnlyFilters:R,validFilters:I}=r.useMemo((()=>A.reduce(((e,t)=>(c[t.field]?e.validFilters.push(t):e.readOnlyFilters.push(t),e)),{readOnlyFilters:[],validFilters:[]})),[A,c]),P=r.useCallback((()=>{const e=S();e&&n.current.upsertFilterItems([...A,e])}),[n,S,A]),T=r.useCallback((e=>{const t=1===I.length;n.current.deleteFilterItem(e),t&&n.current.hideFilterPanel()}),[n,I.length]),O=r.useCallback((()=>1===I.length&&void 0===I[0].value?(n.current.deleteFilterItem(I[0]),n.current.hideFilterPanel()):n.current.setFilterModel((0,o.A)({},s,{items:R}),"removeAllFilterItems")),[n,R,s,I]);return r.useEffect((()=>{h.length>0&&s.logicOperator&&!h.includes(s.logicOperator)&&C(h[0])}),[h,C,s.logicOperator]),r.useEffect((()=>{I.length>0&&u.current.focus()}),[I.length]),(0,M.jsxs)(fl,(0,o.A)({},y,{ref:t,children:[(0,M.jsxs)(ll,{children:[R.map(((e,t)=>(0,M.jsx)(El,(0,o.A)({item:e,applyFilterChanges:w,deleteFilter:T,hasMultipleFilters:k,showMultiFilterOperators:t>0,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:C,focusElementRef:null,readOnly:!0,logicOperators:h,columnsSort:p},f),null==e.id?t:e.id))),I.map(((e,t)=>(0,M.jsx)(El,(0,o.A)({item:e,applyFilterChanges:w,deleteFilter:T,hasMultipleFilters:k,showMultiFilterOperators:R.length+t>0,disableMultiFilterOperator:R.length+t!==1,applyMultiFilterOperatorChanges:C,focusElementRef:t===I.length-1?u:null,logicOperators:h,columnsSort:p},f),null==e.id?t+R.length:e.id)))]}),i.disableMultipleColumnsFiltering||g&&v?null:(0,M.jsxs)(dl,{children:[g?(0,M.jsx)("span",{}):(0,M.jsx)(i.slots.baseButton,(0,o.A)({onClick:P,startIcon:(0,M.jsx)(i.slots.filterPanelAddIcon,{})},i.slotProps?.baseButton,{children:n.current.getLocaleText("filterPanelAddFilter")})),!v&&I.length>0?(0,M.jsx)(i.slots.baseButton,(0,o.A)({onClick:O,startIcon:(0,M.jsx)(i.slots.filterPanelRemoveAllIcon,{})},i.slotProps?.baseButton,{children:n.current.getLocaleText("filterPanelRemoveAll")})):null]})]}))}));var Il=n(26410);const Pl=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;var Tl=n(17437);const Ol=["children"],$l=(0,Tl.i7)({from:{opacity:0},to:{opacity:1}}),Dl=(0,Tl.i7)({"from, to":{"--scrollable":'" "'}}),Nl=(0,Y.A)("div",{name:"MuiDataGrid",slot:"ShadowScrollArea"})`
- flex: 1;
- display: flex;
- flex-direction: column;
- animation: ${Dl};
- animation-timeline: --scroll-timeline;
- animation-fill-mode: none;
- box-sizing: border-box;
- overflow: auto;
- scrollbar-width: thin;
- scroll-timeline: --scroll-timeline block;
- &::before,
- &::after {
- content: '';
- flex-shrink: 0;
- display: block;
- position: sticky;
- left: 0;
- width: 100%;
- height: 4px;
- animation: ${$l} linear both;
- animation-timeline: --scroll-timeline;
- // Custom property toggle trick:
- // - Detects if the element is scrollable
- // - https://css-tricks.com/the-css-custom-property-toggle-trick/
- --visibility-scrollable: var(--scrollable) visible;
- --visibility-not-scrollable: hidden;
- visibility: var(--visibility-scrollable, var(--visibility-not-scrollable));
- }
- &::before {
- top: 0;
- background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0, transparent 100%);
- animation-range: 0 4px;
- }
- &::after {
- bottom: 0;
- background: linear-gradient(to top, rgba(0, 0, 0, 0.05) 0, transparent 100%);
- animation-direction: reverse;
- animation-range: calc(100% - 4px) 100%;
- }
- `,Ll=(0,s.R)((function(e,t){const{children:n}=e,r=(0,a.A)(e,Ol);return(0,M.jsx)(Nl,(0,o.A)({},r,{ref:t,children:n}))})),Hl=new Intl.Collator,zl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagement"})({display:"flex",flexDirection:"column",padding:g.f.spacing(.5,1.5)}),Fl=(0,f.Ay)(Ll,{name:"MuiDataGrid",slot:"ColumnsManagementScrollArea"})({maxHeight:300}),jl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader"})({padding:g.f.spacing(1.5,2),borderBottom:`1px solid ${g.f.colors.border.base}`}),Bl=(0,f.Ay)(Ce,{name:"MuiDataGrid",slot:"ColumnsManagementSearchInput"})({[`& .${Il.A.input}::-webkit-search-decoration,\n & .${Il.A.input}::-webkit-search-cancel-button,\n & .${Il.A.input}::-webkit-search-results-button,\n & .${Il.A.input}::-webkit-search-results-decoration`]:{display:"none"}}),_l=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter"})({padding:g.f.spacing(1,1,1,1.5),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${g.f.colors.border.base}`}),Vl=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsManagementEmptyText"})({padding:g.f.spacing(1,0),alignSelf:"center",font:g.f.typography.font.body});var Wl=n(96148);const Gl=["children","className","classes","onClose"],Kl=(0,Wl.A)("MuiDataGrid",["panel","paper"]),Ul=(0,f.Ay)(Ce,{name:"MuiDataGrid",slot:"panel"})({zIndex:g.f.zIndex.panel}),ql=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"panelContent"})({backgroundColor:g.f.colors.background.overlay,borderRadius:g.f.radius.base,boxShadow:g.f.shadows.overlay,display:"flex",maxWidth:`calc(100vw - ${g.f.spacing(2)})`,overflow:"auto"}),Xl=(0,s.R)(((e,t)=>{const{children:n,className:i,onClose:s}=e,c=(0,a.A)(e,Gl),u=(0,W.h)(),d=(0,E.A)(),h=Kl,[p,f]=r.useState(!1),m=P(),g=(0,ce.A)((()=>f(!0))),b=(0,ce.A)((()=>f(!1))),v=(0,ce.A)((()=>{s?.()})),y=(0,ce.A)((e=>{"Escape"===e.key&&s?.()})),[w,C]=r.useState(null);return r.useEffect((()=>{const e=u.current.rootElementRef?.current?.querySelector('[data-id="gridPanelAnchor"]');e&&C(e)}),[u]),w?(0,M.jsx)(Ul,(0,o.A)({as:d.slots.basePopper,ownerState:d,placement:"bottom-end",className:(0,l.A)(h.panel,i,m),flip:!0,onDidShow:g,onDidHide:b,onClickAway:v,clickAwayMouseEvent:"onPointerUp",clickAwayTouchEvent:!1,focusTrap:!0},c,d.slotProps?.basePopper,{target:e.target??w,ref:t,children:(0,M.jsx)(ql,{className:h.paper,ownerState:d,onKeyDown:y,children:p&&n})})):null})),Yl=["selected","rowId","row","index","style","rowHeight","className","visibleColumns","pinnedColumns","offsetLeft","columnsTotalWidth","firstColumnIndex","lastColumnIndex","focusedColumnIndex","isFirstVisible","isLastVisible","isNotVisible","showBottomBorder","scrollbarWidth","gridHasFiller","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],Ql=(0,O.Mz)(Yi,((e,t)=>!!t&&!!(0,as.Z)(e))),Jl=(0,s.R)((function(e,t){const{selected:n,rowId:i,row:s,index:u,style:h,rowHeight:p,className:f,visibleColumns:g,pinnedColumns:v,offsetLeft:w,columnsTotalWidth:C,firstColumnIndex:x,lastColumnIndex:S,focusedColumnIndex:A,isFirstVisible:k,isLastVisible:I,isNotVisible:P,showBottomBorder:T,scrollbarWidth:O,gridHasFiller:$,onClick:D,onDoubleClick:N,onMouseEnter:L,onMouseLeave:H,onMouseOut:z,onMouseOver:F}=e,B=(0,a.A)(e,Yl),_=y(),V=R(),W=r.useRef(null),G=(0,E.A)(),K=qn(_),U=(0,b.Nc)(_,Qo.XU),q=(0,b.Nc)(_,Ee.V2),X=(0,b.Nc)(_,j.Sw),Y=G.rowReordering,Q=(0,b.Nc)(_,Ql,Y),J=(0,c.A)(W,t),Z=(0,Ee.Qu)(_,i),ee=(0,b.Nc)(_,Qi,{rowId:i,editMode:G.editMode}),te=G.editMode===zt.Row,ne=void 0!==A,oe=ne&&A>=v.left.length&&A<x,re=ne&&A<g.length-v.right.length&&A>=S,ie=function(e,t){return(0,d.A)(t,m.B,e)}(G.classes,{root:["row",n&&"selected",te&&"row--editable",ee&&"row--editing",k&&"row--firstVisible",I&&"row--lastVisible",T&&"row--borderBottom","auto"===p&&"row--dynamicHeight"]}),se=V.hooks.useGridRowAriaAttributes();r.useLayoutEffect((()=>{if(K.range){const e=_.current.getRowIndexRelativeToVisibleRows(i);void 0!==e&&_.current.unstable_setLastMeasuredRowIndex(e)}if(W.current&&"auto"===p)return _.current.observeRowHeight(W.current,i)}),[_,K.range,p,i]);const ae=r.useCallback(((e,t)=>n=>{Fi(n)||_.current.getRow(i)&&(_.current.publishEvent(e,_.current.getRowParams(i),n),t&&t(n))}),[_,i]),le=r.useCallback((e=>{const t=Li(e.target,m.x.cell),n=t?.getAttribute("data-field");if(n){if(n===ti.field)return;if(n===kt)return;if("__reorder__"===n)return;if(_.current.getCellMode(i,n)===Ft.Edit)return;const e=_.current.getColumn(n);if(e?.type===rn)return}ae("rowClick",D)(e)}),[_,D,ae,i]),{slots:ce,slotProps:ue,disableColumnReorder:de}=G,he=(0,b.Nc)(_,(()=>(0,o.A)({},_.current.getRowHeightEntry(i))),void 0,b.TJ),pe=r.useMemo((()=>{if(P)return{opacity:0,width:0,height:0};const e=(0,o.A)({},h,{maxHeight:"auto"===p?"none":p,minHeight:p,"--height":"number"==typeof p?`${p}px`:p});if(he.spacingTop&&(e["border"===G.rowSpacingType?"borderTopWidth":"marginTop"]=he.spacingTop),he.spacingBottom){const t="border"===G.rowSpacingType?"borderBottomWidth":"marginBottom";let n=e[t];"number"!=typeof n&&(n=parseInt(n||"0",10)),n+=he.spacingBottom,e[t]=n}return e}),[P,p,h,he,G.rowSpacingType]),fe=_.current.unstable_applyPipeProcessors("rowClassName",[],i),me=se(Z,u);if("function"==typeof G.getRowClassName){const e=u-(K.range?.firstRowIndex||0),t=(0,o.A)({},_.current.getRowParams(i),{isFirstVisible:0===e,isLastVisible:e===K.rows.length-1,indexRelativeToCurrentPage:e});fe.push(G.getRowClassName(t))}const ge=(e,t,n,r,a=Rt.NONE)=>{const l=_.current.unstable_getCellColSpanInfo(i,n);if(l?.spannedByColSpan)return null;const c=l?.cellProps.width??e.computedWidth,u=l?.cellProps.colSpan??1,d=_a(a,e.computedWidth,n,X,C,O);if("skeletonRow"===Z.type)return(0,M.jsx)(ce.skeletonCell,{type:e.type,width:c,height:p,field:e.field,align:e.align},e.field);const h="__reorder__"===e.field,f=!(de||e.disableReorder),m=Q&&!U.length&&q<=1,g=!(f||h&&m),b=a===Rt.VIRTUAL,v=Wa(a,t),y=Va(a,t,r,G.showCellVerticalBorder,$);return(0,M.jsx)(ce.cell,(0,o.A)({column:e,width:c,rowId:i,align:e.align||"left",colIndex:n,colSpan:u,disableDragEvents:g,isNotVisible:b,pinnedOffset:d,pinnedPosition:a,showLeftBorder:v,showRightBorder:y,row:s,rowNode:Z},ue?.cell),e.field)},be=v.left.map(((e,t)=>ge(e,t,t,v.left.length,Rt.LEFT))),ve=v.right.map(((e,t)=>{const n=g.length-v.right.length+t;return ge(e,t,n,v.right.length,Rt.RIGHT)})),ye=g.length-v.left.length-v.right.length,we=[];oe&&we.push(ge(g[A],A-v.left.length,A,ye,Rt.VIRTUAL));for(let e=x;e<S;e+=1){const t=g[e],n=e-v.left.length;t&&we.push(ge(t,n,e,ye))}re&&we.push(ge(g[A],A-v.left.length,A,ye,Rt.VIRTUAL));const Ce=s?{onClick:le,onDoubleClick:ae("rowDoubleClick",N),onMouseEnter:ae("rowMouseEnter",L),onMouseLeave:ae("rowMouseLeave",H),onMouseOut:ae("rowMouseOut",z),onMouseOver:ae("rowMouseOver",F)}:null;return(0,M.jsxs)("div",(0,o.A)({"data-id":i,"data-rowindex":u,role:"row",className:(0,l.A)(...fe,ie.root,f),style:pe},me,Ce,B,{ref:J,children:[be,(0,M.jsx)("div",{role:"presentation",className:m.x.cellOffsetLeft,style:{width:w}}),we,(0,M.jsx)("div",{role:"presentation",className:(0,l.A)(m.x.cell,m.x.cellEmpty)}),ve,0!==O&&(0,M.jsx)(Ka,{pinnedRight:v.right.length>0,borderTop:!k})]}))})),Zl=p(Jl);let ec;const tc=["column","row","rowId","rowNode","align","children","colIndex","width","className","style","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","showRightBorder","showLeftBorder","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],nc=["changeReason","unstable_updateValueOnRender"];Rt.LEFT,uo.K.LEFT,Rt.RIGHT,uo.K.RIGHT,Rt.NONE,Rt.VIRTUAL;const oc=(0,s.R)((function(e,t){const{column:n,row:i,rowId:s,rowNode:h,align:p,colIndex:f,width:g,className:v,style:w,colSpan:C,disableDragEvents:x,isNotVisible:S,pinnedOffset:A,pinnedPosition:k,showRightBorder:I,showLeftBorder:P,onClick:T,onDoubleClick:O,onMouseDown:$,onMouseUp:D,onMouseOver:N,onKeyDown:L,onKeyUp:H,onDragEnter:z,onDragOver:F}=e,j=(0,a.A)(e,tc),B=y(),_=(0,E.A)(),V=(0,Jt.I)(),W=n.field,G=(0,b.Nc)(B,Ji,{rowId:s,field:W}),K=R().hooks.useCellAggregationResult(s,W),U=G?Ft.Edit:Ft.View,q=B.current.getCellParamsForRow(s,W,i,{colDef:n,cellMode:U,rowNode:h,tabIndex:(0,b.Nc)(B,(()=>{const e=bo(B);return e&&e.field===W&&e.id===s?0:-1})),hasFocus:(0,b.Nc)(B,(()=>{const e=po(B);return e?.id===s&&e.field===W}))});q.api=B.current,K&&(q.value=K.value,q.formattedValue=n.valueFormatter?n.valueFormatter(q.value,i,n,B):q.value);const X=(0,b.Nc)(B,(()=>B.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:s,field:W}))),Y=(0,b.Nc)(B,so),Q=(0,b.Nc)(B,ao),{hasFocus:J,isEditable:Z=!1,value:ee}=q,te="actions"===n.type&&n.getActions?.(B.current.getRowParams(s)).some((e=>!e.props.disabled)),ne="view"!==U&&Z||te?-1:q.tabIndex,{classes:oe,getCellClassName:re}=_,ie=[(0,b.Nc)(B,(()=>B.current.unstable_applyPipeProcessors("cellClassName",[],{id:s,field:W}).filter(Boolean).join(" ")))];n.cellClassName&&ie.push("function"==typeof n.cellClassName?n.cellClassName(q):n.cellClassName),"flex"===n.display&&ie.push(m.x["cell--flex"]),re&&ie.push(re(q));const se=q.formattedValue??ee,ae=r.useRef(null),le=(0,c.A)(t,ae),ce=r.useRef(null),ue=_.cellSelection??!1,de=(e=>{const{align:t,showLeftBorder:n,showRightBorder:o,pinnedPosition:r,isEditable:i,isSelected:s,isSelectionMode:a,classes:l}=e,c={root:["cell",`cell--text${(0,u.A)(t)}`,s&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",o&&"cell--withRightBorder",r===Rt.LEFT&&"cell--pinnedLeft",r===Rt.RIGHT&&"cell--pinnedRight",a&&!i&&"cell--selectionMode"]};return(0,d.A)(c,m.B,l)})({align:p,showLeftBorder:P,showRightBorder:I,isEditable:Z,classes:_.classes,pinnedPosition:k,isSelected:X,isSelectionMode:ue}),he=r.useCallback((e=>t=>{const n=B.current.getCellParams(s,W||"");B.current.publishEvent(e,n,t),D&&D(t)}),[B,W,D,s]),pe=r.useCallback((e=>t=>{const n=B.current.getCellParams(s,W||"");B.current.publishEvent(e,n,t),$&&$(t)}),[B,W,$,s]),fe=r.useCallback(((e,t)=>n=>{if(!B.current.getRow(s))return;const o=B.current.getCellParams(s,W||"");B.current.publishEvent(e,o,n),t&&t(n)}),[B,W,s]),me=Y[s]?.[W]??!1,ge=Q[s]?.[W]??1,be=r.useMemo((()=>{if(S)return{padding:0,opacity:0,width:0,height:0,border:0};const e=qa((0,o.A)({"--width":`${g}px`},w),V,k,A),t=k===Rt.LEFT,n=k===Rt.RIGHT;return ge>1&&(e.height=`calc(var(--height) * ${ge})`,e.zIndex=10,(t||n)&&(e.zIndex=40)),e}),[g,S,w,A,k,V,ge]);if(r.useEffect((()=>{if(!J||U===Ft.Edit)return;const e=(0,ki.A)(B.current.rootElementRef.current);if(ae.current&&!ae.current.contains(e.activeElement)){const e=ae.current.querySelector('[tabindex="0"]'),t=ce.current||e||ae.current;if(void 0===ec&&document.createElement("div").focus({get preventScroll(){return ec=!0,!1}}),ec)t.focus({preventScroll:!0});else{const e=B.current.getScrollPosition();t.focus(),B.current.scroll(e)}}}),[J,U,B]),me)return(0,M.jsx)("div",{"data-colindex":f,role:"presentation",style:(0,o.A)({width:"var(--width)"},be)});let ve,ye,we=j.onFocus;if(null===G&&n.renderCell&&(ve=n.renderCell(q)),null!==G&&n.renderEditCell){const e=B.current.getRowWithUpdatedValues(s,n.field),t=(0,a.A)(G,nc),r=n.valueFormatter?n.valueFormatter(G.value,e,n,B):q.formattedValue,i=(0,o.A)({},q,{row:e,formattedValue:r},t);ve=n.renderEditCell(i),ie.push(m.x["cell--editing"]),ie.push(oe?.["cell--editing"])}if(void 0===ve){const e=se?.toString();ve=e,ye=e}r.isValidElement(ve)&&te&&(ve=r.cloneElement(ve,{focusElementRef:ce}));const Ce=x?null:{onDragEnter:fe("cellDragEnter",z),onDragOver:fe("cellDragOver",F)};return(0,M.jsx)("div",(0,o.A)({className:(0,l.A)(de.root,ie,v),role:"gridcell","data-field":W,"data-colindex":f,"aria-colindex":f+1,"aria-colspan":C,"aria-rowspan":ge,style:be,title:ye,tabIndex:ne,onClick:fe("cellClick",T),onDoubleClick:fe("cellDoubleClick",O),onMouseOver:fe("cellMouseOver",N),onMouseDown:pe("cellMouseDown"),onMouseUp:he("cellMouseUp"),onKeyDown:fe("cellKeyDown",L),onKeyUp:fe("cellKeyUp",H)},Ce,j,{onFocus:we,ref:le,children:ve}))})),rc=p(oc),ic=r.memo((e=>{const{colDef:t,open:n,columnMenuId:i,columnMenuButtonId:s,iconButtonRef:a}=e,l=(0,W.h)(),c=(0,E.A)(),u=(e=>{const{classes:t,open:n}=e,o={root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]};return(0,d.A)(o,m.B,t)})((0,o.A)({},e,{classes:c.classes})),h=r.useCallback((e=>{e.preventDefault(),e.stopPropagation(),l.current.toggleColumnMenu(t.field)}),[l,t.field]),p=t.headerName??t.field;return(0,M.jsx)("div",{className:u.root,children:(0,M.jsx)(c.slots.baseTooltip,(0,o.A)({title:l.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},c.slotProps?.baseTooltip,{children:(0,M.jsx)(c.slots.baseIconButton,(0,o.A)({ref:a,tabIndex:-1,className:u.button,"aria-label":l.current.getLocaleText("columnMenuAriaLabel")(p),size:"small",onClick:h,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?i:void 0,id:s},c.slotProps?.baseIconButton,{children:(0,M.jsx)(c.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})}));function sc({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:i,open:s,target:a,onExited:l}){const c=(0,W.h)(),u=c.current.getColumn(i),d=(0,ce.A)((e=>{e&&(e.stopPropagation(),a?.contains(e.target))||c.current.hideColumnMenu()}));return a&&u?(0,M.jsx)(tn,{position:"bottom-"+("right"===u.align?"start":"end"),open:s,target:a,onClose:d,onExited:l,children:(0,M.jsx)(n,(0,o.A)({colDef:u,hideMenu:d,open:s,id:e,labelledby:t},r))}):null}const ac=["className","aria-label"],lc=(0,Y.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle"})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),cc=(0,s.R)((function(e,t){const{className:n}=e,r=(0,a.A)(e,ac),i=(0,E.A)(),s=(e=>{const{classes:t}=e;return(0,d.A)({root:["columnHeaderTitle"]},m.B,t)})(i);return(0,M.jsx)(lc,(0,o.A)({className:(0,l.A)(s.root,n),ownerState:i},r,{ref:t}))}));function uc(e){const{label:t,description:n}=e,i=(0,E.A)(),s=r.useRef(null),[a,l]=r.useState(""),c=r.useCallback((()=>{if(!n&&s?.current){const n=(e=s.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;l(n?t:"")}var e}),[n,t]);return(0,M.jsx)(i.slots.baseTooltip,(0,o.A)({title:n||a},i.slotProps?.baseTooltip,{children:(0,M.jsx)(cc,{onMouseOver:c,ref:s,children:t})}))}const dc=["resizable","resizing","height","side"];var hc=function(e){return e.Left="left",e.Right="right",e}(hc||{});function pc(e){const{height:t,side:n=hc.Right}=e,i=(0,a.A)(e,dc),s=(0,E.A)(),l=(e=>{const{resizable:t,resizing:n,classes:o,side:r}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",r&&`columnSeparator--side${(0,u.A)(r)}`],icon:["iconSeparator"]};return(0,d.A)(i,m.B,o)})((0,o.A)({},e,{side:n,classes:s.classes})),c=r.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return(0,M.jsx)("div",(0,o.A)({className:l.root,style:{minHeight:t}},i,{onClick:c,children:(0,M.jsx)(s.slots.columnResizeIcon,{className:l.icon})}))}const fc=r.memo(pc),mc=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],gc=(0,s.R)((function(e,t){const{classes:n,colIndex:i,height:s,isResizing:u,sortDirection:d,hasFocus:h,tabIndex:p,separatorSide:f,isDraggable:m,headerComponent:g,description:b,width:v,columnMenuIconButton:w=null,columnMenu:C=null,columnTitleIconButtons:x=null,headerClassName:S,label:A,resizable:k,draggableContainerProps:R,columnHeaderSeparatorProps:I,style:P}=e,T=(0,a.A)(e,mc),O=y(),$=(0,E.A)(),D=r.useRef(null),N=(0,c.A)(D,t);let L="none";return null!=d&&(L="asc"===d?"ascending":"descending"),r.useLayoutEffect((()=>{const e=O.current.state.columnMenu;if(h&&!e.open){const e=D.current.querySelector('[tabindex="0"]')||D.current;e?.focus(),O.current.columnHeadersContainerRef?.current&&(O.current.columnHeadersContainerRef.current.scrollLeft=0)}}),[O,h]),(0,M.jsxs)("div",(0,o.A)({className:(0,l.A)(n.root,S),style:(0,o.A)({},P,{width:v}),role:"columnheader",tabIndex:p,"aria-colindex":i+1,"aria-sort":L},T,{ref:N,children:[(0,M.jsxs)("div",(0,o.A)({className:n.draggableContainer,draggable:m,role:"presentation"},R,{children:[(0,M.jsxs)("div",{className:n.titleContainer,role:"presentation",children:[(0,M.jsx)("div",{className:n.titleContainerContent,children:void 0!==g?g:(0,M.jsx)(uc,{label:A,description:b,columnWidth:v})}),x]}),w]})),(0,M.jsx)(fc,(0,o.A)({resizable:!$.disableColumnResize&&!!k,resizing:u,height:s,side:f},I)),C]}))})),bc=p((function(e){const{colDef:t,columnMenuOpen:n,colIndex:i,headerHeight:s,isResizing:a,isLast:c,sortDirection:u,sortIndex:h,filterItemsCounter:p,hasFocus:f,tabIndex:g,disableReorder:b,separatorSide:v,showLeftBorder:w,showRightBorder:C,pinnedPosition:x,pinnedOffset:S}=e,A=y(),k=(0,E.A)(),R=(0,Jt.I)(),I=r.useRef(null),P=(0,$e.A)(),T=(0,$e.A)(),O=r.useRef(null),[$,D]=r.useState(n),N=r.useMemo((()=>!k.disableColumnReorder&&!b&&!t.disableReorder),[k.disableColumnReorder,b,t.disableReorder]);let L;t.renderHeader&&(L=t.renderHeader(A.current.getColumnHeaderParams(t.field)));const H=(e=>{const{colDef:t,classes:n,isDragging:o,sortDirection:r,showRightBorder:i,showLeftBorder:s,filterItemsCounter:a,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,h=null!=r,p=null!=a&&a>0,f="number"===t.type,g={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",o&&"columnHeader--moving",h&&"columnHeader--sorted",p&&"columnHeader--filtered",f&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",s&&"columnHeader--withLeftBorder",l===Rt.LEFT&&"columnHeader--pinnedLeft",l===Rt.RIGHT&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,d.A)(g,m.B,n)})((0,o.A)({},e,{classes:k.classes,showRightBorder:C,showLeftBorder:w})),z=r.useCallback((e=>n=>{Fi(n)||A.current.publishEvent(e,A.current.getColumnHeaderParams(t.field),n)}),[A,t.field]),F=r.useMemo((()=>({onClick:z("columnHeaderClick"),onContextMenu:z("columnHeaderContextMenu"),onDoubleClick:z("columnHeaderDoubleClick"),onMouseOver:z("columnHeaderOver"),onMouseOut:z("columnHeaderOut"),onMouseEnter:z("columnHeaderEnter"),onMouseLeave:z("columnHeaderLeave"),onKeyDown:z("columnHeaderKeyDown"),onFocus:z("columnHeaderFocus"),onBlur:z("columnHeaderBlur")})),[z]),j=r.useMemo((()=>N?{onDragStart:z("columnHeaderDragStart"),onDragEnter:z("columnHeaderDragEnter"),onDragOver:z("columnHeaderDragOver"),onDragEndCapture:z("columnHeaderDragEnd")}:{}),[N,z]),B=r.useMemo((()=>({onMouseDown:z("columnSeparatorMouseDown"),onDoubleClick:z("columnSeparatorDoubleClick")})),[z]);r.useEffect((()=>{$||D(n)}),[$,n]);const _=r.useCallback((()=>{D(!1)}),[]),V=!k.disableColumnMenu&&!t.disableColumnMenu&&(0,M.jsx)(ic,{colDef:t,columnMenuId:P,columnMenuButtonId:T,open:$,iconButtonRef:O}),W=(0,M.jsx)(sc,{columnMenuId:P,columnMenuButtonId:T,field:t.field,open:n,target:O.current,ContentComponent:k.slots.columnMenu,contentComponentProps:k.slotProps?.columnMenu,onExited:_}),G=t.sortingOrder??k.sortingOrder,K=(t.sortable||null!=u)&&!t.hideSortIcons&&!k.disableColumnSorting,U=(0,M.jsxs)(r.Fragment,{children:[!k.disableColumnFilter&&(0,M.jsx)(k.slots.columnHeaderFilterIconButton,(0,o.A)({field:t.field,counter:p},k.slotProps?.columnHeaderFilterIconButton)),K&&(0,M.jsx)(k.slots.columnHeaderSortIcon,(0,o.A)({field:t.field,direction:u,index:h,sortingOrder:G,disabled:!t.sortable},k.slotProps?.columnHeaderSortIcon))]});r.useLayoutEffect((()=>{const e=A.current.state.columnMenu;if(f&&!e.open){const e=I.current.querySelector('[tabindex="0"]')||I.current;e?.focus(),A.current.columnHeadersContainerRef?.current&&(A.current.columnHeadersContainerRef.current.scrollLeft=0)}}),[A,f]);const q="function"==typeof t.headerClassName?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,X=t.headerName??t.field,Y=r.useMemo((()=>qa((0,o.A)({},e.style),R,x,S)),[x,S,e.style,R]);return(0,M.jsx)(gc,(0,o.A)({ref:I,classes:H,columnMenuOpen:n,colIndex:i,height:s,isResizing:a,sortDirection:u,hasFocus:f,tabIndex:g,separatorSide:v,isDraggable:N,headerComponent:L,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:V,columnTitleIconButtons:U,headerClassName:(0,l.A)(q,c&&m.x["columnHeader--last"]),label:X,resizable:!k.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:W,draggableContainerProps:j,columnHeaderSeparatorProps:B,style:Y},F))}));function vc(e){const{groupId:t,width:n,depth:i,maxDepth:s,fields:a,height:l,colIndex:c,hasFocus:u,tabIndex:h,isLastColumn:p,pinnedPosition:f,pinnedOffset:g}=e,v=(0,E.A)(),y=(0,Jt.I)(),w=r.useRef(null),C=(0,W.h)(),x=(0,b.Nc)(C,pn),S=t?x[t]:{},{headerName:A=t??"",description:k="",headerAlign:R}=S;let I;const P=t&&x[t]?.renderHeaderGroup,T=r.useMemo((()=>({groupId:t,headerName:A,description:k,depth:i,maxDepth:s,fields:a,colIndex:c,isLastColumn:p})),[t,A,k,i,s,a,c,p]);t&&P&&(I=P(T));const O=(0,o.A)({},e,{classes:v.classes,headerAlign:R,depth:i,isDragging:!1}),$=A??t,D=(0,$e.A)(),N=null===t?`empty-group-cell-${D}`:t,L=(e=>{const{classes:t,headerAlign:n,isDragging:o,isLastColumn:r,showLeftBorder:i,showRightBorder:s,groupId:a,pinnedPosition:l}=e,c={root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",o&&"columnHeader--moving",s&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",null===a?"columnHeader--emptyGroup":"columnHeader--filledGroup",l===Rt.LEFT&&"columnHeader--pinnedLeft",l===Rt.RIGHT&&"columnHeader--pinnedRight",r&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,d.A)(c,m.B,t)})(O);r.useLayoutEffect((()=>{if(u){const e=w.current.querySelector('[tabindex="0"]')||w.current;e?.focus()}}),[C,u]);const H=r.useCallback((e=>t=>{Fi(t)||C.current.publishEvent(e,T,t)}),[C,T]),z=r.useMemo((()=>({onKeyDown:H("columnGroupHeaderKeyDown"),onFocus:H("columnGroupHeaderFocus"),onBlur:H("columnGroupHeaderBlur")})),[H]),F="function"==typeof S.headerClassName?S.headerClassName(T):S.headerClassName,j=r.useMemo((()=>qa((0,o.A)({},e.style),y,f,g)),[f,g,e.style,y]);return(0,M.jsx)(gc,(0,o.A)({ref:w,classes:L,columnMenuOpen:!1,colIndex:c,height:l,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:h,isDraggable:!1,headerComponent:I,headerClassName:F,description:k,elementId:N,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:$,"aria-colspan":a.length,"data-fields":`|-${a.join("-|-")}-|`,style:j},z))}const yc=(0,f.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow"})({display:"flex"}),wc=["className"],Cc=(0,Y.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaders"})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),xc=(0,s.R)((function(e,t){const{className:n}=e,r=(0,a.A)(e,wc),i=(0,E.A)(),s=(e=>{const{classes:t}=e;return(0,d.A)({root:["columnHeaders"]},m.B,t)})(i);return(0,M.jsx)(Cc,(0,o.A)({className:(0,l.A)(s.root,n),ownerState:i},r,{role:"presentation",ref:t}))})),Sc=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],Ac=p((0,s.R)((function(e,t){const{visibleColumns:n,sortColumnLookup:i,filterColumnLookup:s,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:u,columnHeaderFocus:d,columnGroupHeaderFocus:h,headerGroupingMaxDepth:p,columnMenuState:f,columnVisibility:g,columnGroupsHeaderStructure:v,hasOtherElementInTabSequence:w}=e,C=(0,a.A)(e,Sc),{getInnerProps:x,getColumnHeadersRow:S,getColumnGroupHeadersRows:A}=(e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:i,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:a,columnHeaderFocus:c,columnGroupHeaderFocus:u,headerGroupingMaxDepth:d,columnMenuState:h,columnVisibility:p,columnGroupsHeaderStructure:f,hasOtherElementInTabSequence:g}=e,[v,w]=r.useState(""),[C,x]=r.useState(""),S=y(),A=(0,E.A)(),k=(0,b.Nc)(S,hn),R=(0,b.Nc)(S,j.Sw),I=(0,b.Nc)(S,to),P=(0,b.Nc)(S,j.Q1),T=(0,b.Nc)(S,j.gv),O=_o(R,I,P.left.length),$=(0,b.Nc)(S,J),D=(0,b.Nc)(S,oe),N=(0,b.Nc)(S,re),L=(0,b.Nc)(S,ie),H=(0,b.Nc)(S,ae),z=r.useCallback((e=>x(e.field)),[]),F=r.useCallback((()=>x("")),[]),B=r.useCallback((e=>w(e.field)),[]),_=r.useCallback((()=>w("")),[]),V=r.useMemo((()=>P.left.length?{firstColumnIndex:0,lastColumnIndex:P.left.length}:null),[P.left.length]),W=r.useMemo((()=>P.right.length?{firstColumnIndex:t.length-P.right.length,lastColumnIndex:t.length}:null),[P.right.length,t.length]);me(S,"columnResizeStart",z),me(S,"columnResizeStop",F),me(S,"columnHeaderDragStart",B),me(S,"columnHeaderDragEndNative",_);const G=e=>{const{renderContext:n=I}=e||{},o=n.firstColumnIndex,r=n.lastColumnIndex;return{renderedColumns:t.slice(o,r),firstColumnToRender:o,lastColumnToRender:r}},K=(e,t,n,o=!1)=>{const i=e?.position===Rt.RIGHT,s=void 0===e?.position,a=P.right.length>0&&i||0===P.right.length&&s,c=O-n;return(0,M.jsxs)(r.Fragment,{children:[s&&(0,M.jsx)("div",{role:"presentation",style:{width:c}}),t,s&&(0,M.jsx)("div",{role:"presentation",className:(0,l.A)(m.x.filler,o&&m.x["filler--borderBottom"])}),a&&(0,M.jsx)(Ka,{header:!0,pinnedRight:i,borderBottom:o,borderTop:!1})]})},U=(e,t={})=>{const{renderedColumns:r,firstColumnToRender:a}=G(e),l=[];for(let u=0;u<r.length;u+=1){const d=r[u],p=a+u,f=0===p,m=null!==s&&s.field===d.field||f&&!g?0:-1,b=null!==c&&c.field===d.field,y=h.open&&h.field===d.field,w=e?.position,x=_a(w,d.computedWidth,p,R,$,H),S=w===Rt.RIGHT?r[u-1]:r[u+1],E=!!S&&null!==c&&c.field===S.field,k=p+1===R.length-P.right.length,I=u,T=r.length,O=Wa(w,I),L=Va(w,I,T,A.showColumnVerticalBorder,D);l.push((0,M.jsx)(bc,(0,o.A)({},n[d.field],{columnMenuOpen:y,filterItemsCounter:i[d.field]&&i[d.field].length,headerHeight:N,isDragging:d.field===v,colDef:d,colIndex:p,isResizing:C===d.field,isLast:p===R.length-1,hasFocus:b,tabIndex:m,pinnedPosition:w,pinnedOffset:x,isLastUnpinned:k,isSiblingFocused:E,showLeftBorder:O,showRightBorder:L},t),d.field))}return K(e,l,0)},q=({depth:e,params:n})=>{const r=G(n);if(0===r.renderedColumns.length)return null;const{firstColumnToRender:i,lastColumnToRender:s}=r,l=f[e],c=t[i].field,h=k[c]?.[e]??null,m=l.findIndex((({groupId:e,columnFields:t})=>e===h&&t.includes(c))),g=t[s-1].field,b=k[g]?.[e]??null,v=l.findIndex((({groupId:e,columnFields:t})=>e===b&&t.includes(g))),y=l.slice(m,v+1).map((e=>(0,o.A)({},e,{columnFields:e.columnFields.filter((e=>!1!==p[e]))}))).filter((e=>e.columnFields.length>0)),w=y[0].columnFields.indexOf(c),C=y[0].columnFields.slice(0,w).reduce(((e,t)=>e+(T[t].computedWidth??0)),0);let x=i;const S=y.map((({groupId:t,columnFields:o},r)=>{const i=null!==u&&u.depth===e&&o.includes(u.field),s=null!==a&&a.depth===e&&o.includes(a.field)?0:-1,l={groupId:t,width:o.reduce(((e,t)=>e+T[t].computedWidth),0),fields:o,colIndex:x,hasFocus:i,tabIndex:s},c=n.position,h=_a(c,l.width,x,R,$,H);x+=o.length;let p=r;return c===Rt.LEFT&&(p=x-1),(0,M.jsx)(vc,{groupId:t,width:l.width,fields:l.fields,colIndex:l.colIndex,depth:e,isLastColumn:r===y.length-1,maxDepth:d,height:L,hasFocus:i,tabIndex:s,pinnedPosition:c,pinnedOffset:h,showLeftBorder:Wa(c,p),showRightBorder:Va(c,p,y.length,A.showColumnVerticalBorder,D)},r)}));return K(n,S,C)};return{renderContext:I,leftRenderContext:V,rightRenderContext:W,pinnedColumns:P,visibleColumns:t,columnPositions:R,getFillers:K,getColumnHeadersRow:()=>(0,M.jsxs)(yc,{role:"row","aria-rowindex":d+1,ownerState:A,className:m.x["row--borderBottom"],style:{height:N},children:[V&&U({position:Rt.LEFT,renderContext:V},{disableReorder:!0}),U({renderContext:I}),W&&U({position:Rt.RIGHT,renderContext:W},{disableReorder:!0,separatorSide:hc.Left})]}),getColumnsToRender:G,getColumnGroupHeadersRows:()=>{if(0===d)return null;const e=[];for(let t=0;t<d;t+=1)e.push((0,M.jsxs)(yc,{role:"row","aria-rowindex":t+1,ownerState:A,style:{height:L},children:[V&&q({depth:t,params:{position:Rt.LEFT,renderContext:V,maxLastColumn:V.lastColumnIndex}}),q({depth:t,params:{renderContext:I}}),W&&q({depth:t,params:{position:Rt.RIGHT,renderContext:W,maxLastColumn:W.lastColumnIndex}})]},t));return e},getPinnedCellOffset:_a,isDragging:!!v,getInnerProps:()=>({role:"rowgroup"})}})({visibleColumns:n,sortColumnLookup:i,filterColumnLookup:s,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:u,columnHeaderFocus:d,columnGroupHeaderFocus:h,headerGroupingMaxDepth:p,columnMenuState:f,columnVisibility:g,columnGroupsHeaderStructure:v,hasOtherElementInTabSequence:w});return(0,M.jsxs)(xc,(0,o.A)({},C,x(),{ref:t,children:[A(),S()]}))}))),Ec=["displayOrder"],kc=["hideMenu","colDef","id","labelledby","className","children","open"],Rc=(0,f.Ay)(Ce)((()=>({minWidth:248}))),Mc=(0,s.R)((function(e,t){const{hideMenu:n,id:i,labelledby:s,className:c,children:u,open:d}=e,h=(0,a.A)(e,kc),p=(0,E.A)(),f=r.useCallback((e=>{"Tab"===e.key&&e.preventDefault(),ai(e.key)&&n(e)}),[n]);return(0,M.jsx)(Rc,(0,o.A)({as:p.slots.baseMenuList,id:i,className:(0,l.A)(m.x.menuList,c),"aria-labelledby":s,onKeyDown:f,autoFocus:d},h,{ref:t,children:u}))}));function Ic(e){const{colDef:t,onClick:n}=e,o=(0,W.h)(),i=(0,E.A)(),s=1===(0,j.iv)(o).filter((e=>!0!==e.disableColumnMenu)).length,a=r.useCallback((e=>{s||(o.current.setColumnVisibility(t.field,!1),n(e))}),[o,t.field,n,s]);return i.disableColumnSelector||!1===t.hideable?null:(0,M.jsx)(i.slots.baseMenuItem,{onClick:a,disabled:s,iconStart:(0,M.jsx)(i.slots.columnMenuHideIcon,{fontSize:"small"}),children:o.current.getLocaleText("columnMenuHideColumn")})}function Pc(e){const{onClick:t}=e,n=(0,W.h)(),o=(0,E.A)(),i=r.useCallback((e=>{t(e),n.current.showPreferences(V.columns)}),[n,t]);return o.disableColumnSelector?null:(0,M.jsx)(o.slots.baseMenuItem,{onClick:i,iconStart:(0,M.jsx)(o.slots.columnMenuManageColumnsIcon,{fontSize:"small"}),children:n.current.getLocaleText("columnMenuManageColumns")})}const Tc=["defaultSlots","defaultSlotProps","slots","slotProps"],Oc={columnMenuSortItem:function(e){const{colDef:t,onClick:n}=e,o=(0,W.h)(),i=(0,b.Nc)(o,Qo.XU),s=(0,E.A)(),a=r.useMemo((()=>{if(!t)return null;const e=i.find((e=>e.field===t.field));return e?.sort}),[t,i]),l=t.sortingOrder??s.sortingOrder,c=r.useCallback((e=>{n(e);const r=e.currentTarget.getAttribute("data-value")||null;o.current.sortColumn(t.field,r===a?null:r)}),[o,t,n,a]);if(s.disableColumnSorting||!t||!t.sortable||!l.some((e=>!!e)))return null;const u=e=>{const n=o.current.getLocaleText(e);return"function"==typeof n?n(t):n};return(0,M.jsxs)(r.Fragment,{children:[l.includes("asc")&&"asc"!==a?(0,M.jsx)(s.slots.baseMenuItem,{onClick:c,"data-value":"asc",iconStart:(0,M.jsx)(s.slots.columnMenuSortAscendingIcon,{fontSize:"small"}),children:u("columnMenuSortAsc")}):null,l.includes("desc")&&"desc"!==a?(0,M.jsx)(s.slots.baseMenuItem,{onClick:c,"data-value":"desc",iconStart:(0,M.jsx)(s.slots.columnMenuSortDescendingIcon,{fontSize:"small"}),children:u("columnMenuSortDesc")}):null,l.includes(null)&&null!=a?(0,M.jsx)(s.slots.baseMenuItem,{onClick:c,iconStart:s.slots.columnMenuUnsortIcon?(0,M.jsx)(s.slots.columnMenuUnsortIcon,{fontSize:"small"}):(0,M.jsx)("span",{}),children:o.current.getLocaleText("columnMenuUnsort")}):null]})},columnMenuFilterItem:function(e){const{colDef:t,onClick:n}=e,o=(0,W.h)(),i=(0,E.A)(),s=r.useCallback((e=>{n(e),o.current.showFilterPanel(t.field)}),[o,t.field,n]);return i.disableColumnFilter||!t.filterable?null:(0,M.jsx)(i.slots.baseMenuItem,{onClick:s,iconStart:(0,M.jsx)(i.slots.columnMenuFilterIcon,{fontSize:"small"}),children:o.current.getLocaleText("columnMenuFilter")})},columnMenuColumnsItem:function(e){return(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(Ic,(0,o.A)({},e)),(0,M.jsx)(Pc,(0,o.A)({},e))]})}},$c={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},Dc=(0,s.R)((function(e,t){const{defaultSlots:n,defaultSlotProps:i,slots:s,slotProps:l}=e,c=(0,a.A)(e,Tc),u=(e=>{const t=y(),n=(0,E.A)(),{defaultSlots:i,defaultSlotProps:s,slots:l={},slotProps:c={},hideMenu:u,colDef:d,addDividers:h=!0}=e,p=r.useMemo((()=>(0,o.A)({},i,l)),[i,l]),f=r.useMemo((()=>{if(!c||0===Object.keys(c).length)return s;const e=(0,o.A)({},c);return Object.entries(s).forEach((([t,n])=>{e[t]=(0,o.A)({},n,c[t]||{})})),e}),[s,c]),m=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),g=r.useMemo((()=>{const e=Object.keys(i);return Object.keys(l).filter((t=>!e.includes(t)))}),[l,i]);return r.useMemo((()=>{const e=Array.from(new Set([...m,...g])).filter((e=>null!=p[e])).sort(((e,t)=>{const n=f[e],o=f[t];return(Number.isFinite(n?.displayOrder)?n.displayOrder:100)-(Number.isFinite(o?.displayOrder)?o.displayOrder:100)}));return e.reduce(((t,r,i)=>{let s={colDef:d,onClick:u};const l=f[r];if(l){const e=(0,a.A)(l,Ec);s=(0,o.A)({},s,e)}return h&&i!==e.length-1?[...t,[p[r],s],[n.slots.baseDivider,{}]]:[...t,[p[r],s]]}),[])}),[h,d,m,u,p,f,g,n.slots.baseDivider])})((0,o.A)({},c,{defaultSlots:n,defaultSlotProps:i,slots:s,slotProps:l}));return(0,M.jsx)(Mc,(0,o.A)({},c,{ref:t,children:u.map((([e,t],n)=>(0,M.jsx)(e,(0,o.A)({},t),n)))}))})),Nc=(0,s.R)((function(e,t){return(0,M.jsx)(Dc,(0,o.A)({},e,{ref:t,defaultSlots:Oc,defaultSlotProps:$c}))})),Lc=(0,s.R)((function(e,t){const n=(0,W.h)().current.getLocaleText("noResultsOverlayLabel");return(0,M.jsx)(Ba,(0,o.A)({},e,{ref:t,children:n}))}));var Hc=n(16014),zc=n(16082);var Fc=n(39241),jc=n(1321),Bc=n(20439),_c=n(39407),Vc=n(1908);function Wc(e){return(0,Vc.Ay)("MuiBadge",e)}const Gc=(0,Wl.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]);var Kc=n(85078);const Uc=(0,f.Ay)("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),qc=(0,f.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${(0,_c.A)(n.anchorOrigin.vertical)}${(0,_c.A)(n.anchorOrigin.horizontal)}${(0,_c.A)(n.overlap)}`],"default"!==n.color&&t[`color${(0,_c.A)(n.color)}`],n.invisible&&t.invisible]}})((0,Fc.A)((({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter((0,jc.A)(["contrastText"])).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Gc.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Gc.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Gc.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Gc.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Gc.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Gc.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Gc.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Gc.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}))));function Xc(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const Yc=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiBadge"}),{anchorOrigin:o,className:r,classes:i,component:s,components:a={},componentsProps:c={},children:u,overlap:h="rectangular",color:p="default",invisible:f=!1,max:m=99,badgeContent:g,slots:b,slotProps:v,showZero:y=!1,variant:w="standard",...C}=n,{badgeContent:x,invisible:S,max:A,displayValue:E}=function(e){const{badgeContent:t,invisible:n=!1,max:o=99,showZero:r=!1}=e,i=(0,zc.A)({badgeContent:t,max:o});let s=n;!1!==n||0!==t||r||(s=!0);const{badgeContent:a,max:l=o}=s?i:e;return{badgeContent:a,invisible:s,max:l,displayValue:a&&Number(a)>l?`${l}+`:a}}({max:m,invisible:f,badgeContent:g,showZero:y}),k=(0,zc.A)({anchorOrigin:Xc(o),color:p,overlap:h,variant:w,badgeContent:g}),R=S||null==x&&"dot"!==w,{color:I=p,overlap:P=h,anchorOrigin:T,variant:O=w}=R?k:n,$=Xc(T),D="dot"!==O?E:void 0,N={...n,badgeContent:x,invisible:R,max:A,displayValue:D,showZero:y,anchorOrigin:$,color:I,overlap:P,variant:O},L=(e=>{const{color:t,anchorOrigin:n,invisible:o,overlap:r,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,o&&"invisible",`anchorOrigin${(0,_c.A)(n.vertical)}${(0,_c.A)(n.horizontal)}`,`anchorOrigin${(0,_c.A)(n.vertical)}${(0,_c.A)(n.horizontal)}${(0,_c.A)(r)}`,`overlap${(0,_c.A)(r)}`,"default"!==t&&`color${(0,_c.A)(t)}`]};return(0,d.A)(a,Wc,s)})(N),H={slots:{root:b?.root??a.Root,badge:b?.badge??a.Badge},slotProps:{root:v?.root??c.root,badge:v?.badge??c.badge}},[z,F]=(0,Kc.A)("root",{elementType:Uc,externalForwardedProps:{...H,...C},ownerState:N,className:(0,l.A)(L.root,r),ref:t,additionalProps:{as:s}}),[j,B]=(0,Kc.A)("badge",{elementType:qc,externalForwardedProps:H,ownerState:N,className:L.badge});return(0,M.jsxs)(z,{...F,children:[u,(0,M.jsx)(j,{...B,children:D})]})})),Qc=Yc;var Jc=n(27629),Zc=n(17862),eu=n(8861),tu=n(82777),nu=n(24566);const ou=(0,f.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((0,Fc.A)((({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,tu.X4)(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]})))),ru=(0,f.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((0,Fc.A)((({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]})))),iu=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiDivider"}),{absolute:o=!1,children:r,className:i,orientation:s="horizontal",component:a=(r||"vertical"===s?"div":"hr"),flexItem:c=!1,light:u=!1,role:h=("hr"!==a?"separator":void 0),textAlign:p="center",variant:f="fullWidth",...m}=n,g={...n,absolute:o,component:a,flexItem:c,light:u,orientation:s,role:h,textAlign:p,variant:f},b=(e=>{const{absolute:t,children:n,classes:o,flexItem:r,light:i,orientation:s,textAlign:a,variant:l}=e,c={root:["root",t&&"absolute",l,i&&"light","vertical"===s&&"vertical",r&&"flexItem",n&&"withChildren",n&&"vertical"===s&&"withChildrenVertical","right"===a&&"vertical"!==s&&"textAlignRight","left"===a&&"vertical"!==s&&"textAlignLeft"],wrapper:["wrapper","vertical"===s&&"wrapperVertical"]};return(0,d.A)(c,nu.K,o)})(g);return(0,M.jsx)(ou,{as:a,className:(0,l.A)(b.root,i),role:h,ref:t,ownerState:g,"aria-orientation":"separator"!==h||"hr"===a&&"vertical"!==s?void 0:s,...m,children:r?(0,M.jsx)(ru,{className:b.wrapper,ownerState:g,children:r}):null})}));iu&&(iu.muiSkipListHighlight=!0);const su=iu;var au=n(79844),lu=n(75337);function cu(e){return(0,Vc.Ay)("MuiLinearProgress",e)}(0,Wl.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const uu=Tl.i7`
- 0% {
- left: -35%;
- right: 100%;
- }
- 60% {
- left: 100%;
- right: -90%;
- }
- 100% {
- left: 100%;
- right: -90%;
- }
- `,du="string"!=typeof uu?Tl.AH`
- animation: ${uu} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
- `:null,hu=Tl.i7`
- 0% {
- left: -200%;
- right: 100%;
- }
- 60% {
- left: 107%;
- right: -8%;
- }
- 100% {
- left: 107%;
- right: -8%;
- }
- `,pu="string"!=typeof hu?Tl.AH`
- animation: ${hu} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
- `:null,fu=Tl.i7`
- 0% {
- opacity: 1;
- background-position: 0 -23px;
- }
- 60% {
- opacity: 0;
- background-position: 0 -23px;
- }
- 100% {
- opacity: 1;
- background-position: -200px -23px;
- }
- `,mu="string"!=typeof fu?Tl.AH`
- animation: ${fu} 3s infinite linear;
- `:null,gu=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,tu.a)(e.palette[t].main,.62):(0,tu.e$)(e.palette[t].main,.5),bu=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,_c.A)(n.color)}`],t[n.variant]]}})((0,Fc.A)((({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter((0,jc.A)()).map((([t])=>({props:{color:t},style:{backgroundColor:gu(e,t)}}))),{props:({ownerState:e})=>"inherit"===e.color&&"buffer"!==e.variant,style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]})))),vu=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${(0,_c.A)(n.color)}`]]}})((0,Fc.A)((({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter((0,jc.A)()).map((([t])=>{const n=gu(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}}))]}))),mu||{animation:`${fu} 3s infinite linear`}),yu=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${(0,_c.A)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((0,Fc.A)((({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter((0,jc.A)()).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}}))),{props:{variant:"determinate"},style:{transition:"transform .4s linear"}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .4s linear"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:du||{animation:`${uu} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]})))),wu=(0,f.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${(0,_c.A)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((0,Fc.A)((({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter((0,jc.A)()).map((([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}}))),{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"!==e.color,style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"===e.color,style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter((0,jc.A)()).map((([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:gu(e,t),transition:"transform .4s linear"}}))),{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:pu||{animation:`${hu} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]})))),Cu=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiLinearProgress"}),{className:o,color:r="primary",value:i,valueBuffer:s,variant:a="indeterminate",...c}=n,u={...n,color:r,variant:a},h=(e=>{const{classes:t,variant:n,color:o}=e,r={root:["root",`color${(0,_c.A)(o)}`,n],dashed:["dashed",`dashedColor${(0,_c.A)(o)}`],bar1:["bar","bar1",`barColor${(0,_c.A)(o)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","bar2","buffer"!==n&&`barColor${(0,_c.A)(o)}`,"buffer"===n&&`color${(0,_c.A)(o)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,d.A)(r,cu,t)})(u),p=(0,Jt.I)(),f={},m={bar1:{},bar2:{}};if(("determinate"===a||"buffer"===a)&&void 0!==i){f["aria-valuenow"]=Math.round(i),f["aria-valuemin"]=0,f["aria-valuemax"]=100;let e=i-100;p&&(e=-e),m.bar1.transform=`translateX(${e}%)`}if("buffer"===a&&void 0!==s){let e=(s||0)-100;p&&(e=-e),m.bar2.transform=`translateX(${e}%)`}return(0,M.jsxs)(bu,{className:(0,l.A)(h.root,o),ownerState:u,role:"progressbar",...f,ref:t,...c,children:["buffer"===a?(0,M.jsx)(vu,{className:h.dashed,ownerState:u}):null,(0,M.jsx)(yu,{className:h.bar1,ownerState:u,style:m.bar1}),"determinate"===a?null:(0,M.jsx)(wu,{className:h.bar2,ownerState:u,style:m.bar2})]})})),xu=Cu;var Su=n(42812),Au=n(40583);const Eu=(0,f.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((0,Fc.A)((({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]})))),ku=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiListItemIcon"}),{className:o,...i}=n,s=r.useContext(Au.A),a={...n,alignItems:s.alignItems},c=(e=>{const{alignItems:t,classes:n}=e,o={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,d.A)(o,Su.f,n)})(a);return(0,M.jsx)(Eu,{className:(0,l.A)(c.root,o),ownerState:a,ref:t,...i})})),Ru=ku;var Mu=n(91790),Iu=n(35124),Pu=n(29312);const Tu=(0,f.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Pu.A.primary}`]:t.primary},{[`& .${Pu.A.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${Mu.A.root}:where(& .${Pu.A.primary})`]:{display:"block"},[`.${Mu.A.root}:where(& .${Pu.A.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Ou=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiListItemText"}),{children:o,className:i,disableTypography:s=!1,inset:a=!1,primary:c,primaryTypographyProps:u,secondary:h,secondaryTypographyProps:p,slots:f={},slotProps:m={},...g}=n,{dense:b}=r.useContext(Au.A);let v=null!=c?c:o,y=h;const w={...n,disableTypography:s,inset:a,primary:!!v,secondary:!!y,dense:b},C=(e=>{const{classes:t,inset:n,primary:o,secondary:r,dense:i}=e,s={root:["root",n&&"inset",i&&"dense",o&&r&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,d.A)(s,Pu.b,t)})(w),x={slots:f,slotProps:{primary:u,secondary:p,...m}},[S,A]=(0,Kc.A)("root",{className:(0,l.A)(C.root,i),elementType:Tu,externalForwardedProps:{...x,...g},ownerState:w,ref:t}),[E,k]=(0,Kc.A)("primary",{className:C.primary,elementType:Iu.A,externalForwardedProps:x,ownerState:w}),[R,I]=(0,Kc.A)("secondary",{className:C.secondary,elementType:Iu.A,externalForwardedProps:x,ownerState:w});return null==v||v.type===Iu.A||s||(v=(0,M.jsx)(E,{variant:b?"body2":"body1",component:k?.variant?void 0:"span",...k,children:v})),null==y||y.type===Iu.A||s||(y=(0,M.jsx)(R,{variant:"body2",color:"textSecondary",...I,children:y})),(0,M.jsxs)(S,{...A,children:[v,y]})})),$u=Ou;var Du=n(71026),Nu=n(37603),Lu=n(83508),Hu=n(98300),zu=n(76761);function Fu(e){return(0,Vc.Ay)("MuiFormControlLabel",e)}const ju=(0,Wl.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var Bu=n(93583);const _u=(0,f.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ju.label}`]:t.label},t.root,t[`labelPlacement${(0,_c.A)(n.labelPlacement)}`]]}})((0,Fc.A)((({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${ju.disabled}`]:{cursor:"default"},[`& .${ju.label}`]:{[`&.${ju.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]})))),Vu=(0,f.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk"})((0,Fc.A)((({theme:e})=>({[`&.${ju.error}`]:{color:(e.vars||e).palette.error.main}})))),Wu=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:s={},control:a,disabled:c,disableTypography:u,inputRef:h,label:p,labelPlacement:f="end",name:m,onChange:g,required:b,slots:v={},slotProps:y={},value:w,...C}=n,x=(0,zu.A)(),S=c??a.props.disabled??x?.disabled,A=b??a.props.required,E={disabled:S,required:A};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===a.props[e]&&void 0!==n[e]&&(E[e]=n[e])}));const k=(0,Bu.A)({props:n,muiFormControl:x,states:["error"]}),R={...n,disabled:S,labelPlacement:f,required:A,error:k.error},I=(e=>{const{classes:t,disabled:n,labelPlacement:o,error:r,required:i}=e,s={root:["root",n&&"disabled",`labelPlacement${(0,_c.A)(o)}`,r&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",r&&"error"]};return(0,d.A)(s,Fu,t)})(R),P={slots:v,slotProps:{...s,...y}},[T,O]=(0,Kc.A)("typography",{elementType:Iu.A,externalForwardedProps:P,ownerState:R});let $=p;return null==$||$.type===Iu.A||u||($=(0,M.jsx)(T,{component:"span",...O,className:(0,l.A)(I.label,O?.className),children:$})),(0,M.jsxs)(_u,{className:(0,l.A)(I.root,i),ownerState:R,ref:t,...C,children:[r.cloneElement(a,E),A?(0,M.jsxs)("div",{children:[$,(0,M.jsxs)(Vu,{ownerState:R,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):$]})})),Gu=Wu;var Ku=n(7388),Uu=n(42722);function qu(e){return(0,Vc.Ay)("MuiSwitch",e)}const Xu=(0,Wl.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Yu=(0,f.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,_c.A)(n.edge)}`],t[`size${(0,_c.A)(n.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Xu.thumb}`]:{width:16,height:16},[`& .${Xu.switchBase}`]:{padding:4,[`&.${Xu.checked}`]:{transform:"translateX(16px)"}}}}]}),Qu=(0,f.Ay)(Uu.A,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${Xu.input}`]:t.input},"default"!==n.color&&t[`color${(0,_c.A)(n.color)}`]]}})((0,Fc.A)((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Xu.checked}`]:{transform:"translateX(20px)"},[`&.${Xu.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Xu.checked} + .${Xu.track}`]:{opacity:.5},[`&.${Xu.disabled} + .${Xu.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${Xu.input}`]:{left:"-100%",width:"300%"}}))),(0,Fc.A)((({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,tu.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((0,jc.A)(["light"])).map((([t])=>({props:{color:t},style:{[`&.${Xu.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,tu.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xu.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,tu.a)(e.palette[t].main,.62):(0,tu.e$)(e.palette[t].main,.55)}`}},[`&.${Xu.checked} + .${Xu.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}})))]})))),Ju=(0,f.Ay)("span",{name:"MuiSwitch",slot:"Track"})((0,Fc.A)((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)})))),Zu=(0,f.Ay)("span",{name:"MuiSwitch",slot:"Thumb"})((0,Fc.A)((({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})))),ed=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiSwitch"}),{className:o,color:r="primary",edge:i=!1,size:s="medium",sx:a,slots:c={},slotProps:u={},...h}=n,p={...n,color:r,edge:i,size:s},f=(e=>{const{classes:t,edge:n,size:o,color:r,checked:i,disabled:s}=e,a={root:["root",n&&`edge${(0,_c.A)(n)}`,`size${(0,_c.A)(o)}`],switchBase:["switchBase",`color${(0,_c.A)(r)}`,i&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,d.A)(a,qu,t);return{...t,...l}})(p),m={slots:c,slotProps:u},[g,b]=(0,Kc.A)("root",{className:(0,l.A)(f.root,o),elementType:Yu,externalForwardedProps:m,ownerState:p,additionalProps:{sx:a}}),[v,y]=(0,Kc.A)("thumb",{className:f.thumb,elementType:Zu,externalForwardedProps:m,ownerState:p}),w=(0,M.jsx)(v,{...y}),[C,x]=(0,Kc.A)("track",{className:f.track,elementType:Ju,externalForwardedProps:m,ownerState:p});return(0,M.jsxs)(g,{...b,children:[(0,M.jsx)(Qu,{type:"checkbox",icon:w,checkedIcon:w,ref:t,ownerState:p,...h,classes:{...f,root:f.switchBase},slots:{...c.switchBase&&{root:c.switchBase},...c.input&&{input:c.input}},slotProps:{...u.switchBase&&{root:"function"==typeof u.switchBase?u.switchBase(p):u.switchBase},...u.input&&{input:"function"==typeof u.input?u.input(p):u.input}}}),(0,M.jsx)(C,{...x})]})})),td=ed;var nd=n(60431),od=n(38490),rd=n(37768),id=n(96258),sd=n(56416),ad=n(73514);const ld=r.createContext(),cd=r.createContext();function ud(e){return(0,Vc.Ay)("MuiTableCell",e)}const dd=(0,Wl.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),hd=(0,f.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,_c.A)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,_c.A)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,_c.A)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((0,Fc.A)((({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?(0,tu.a)((0,tu.X4)(e.palette.divider,1),.88):(0,tu.e$)((0,tu.X4)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${dd.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]})))),pd=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiTableCell"}),{align:o="inherit",className:i,component:s,padding:a,scope:c,size:u,sortDirection:h,variant:p,...f}=n,m=r.useContext(ld),g=r.useContext(cd),b=g&&"head"===g.variant;let v;v=s||(b?"th":"td");let y=c;"td"===v?y=void 0:!y&&b&&(y="col");const w=p||g&&g.variant,C={...n,align:o,component:v,padding:a||(m&&m.padding?m.padding:"normal"),size:u||(m&&m.size?m.size:"medium"),sortDirection:h,stickyHeader:"head"===w&&m&&m.stickyHeader,variant:w},x=(e=>{const{classes:t,variant:n,align:o,padding:r,size:i,stickyHeader:s}=e,a={root:["root",n,s&&"stickyHeader","inherit"!==o&&`align${(0,_c.A)(o)}`,"normal"!==r&&`padding${(0,_c.A)(r)}`,`size${(0,_c.A)(i)}`]};return(0,d.A)(a,ud,t)})(C);let S=null;return h&&(S="asc"===h?"ascending":"descending"),(0,M.jsx)(hd,{as:v,ref:t,className:(0,l.A)(x.root,i),"aria-sort":S,scope:y,ownerState:C,...f})})),fd=pd;function md(e){return(0,Vc.Ay)("MuiToolbar",e)}(0,Wl.A)("MuiToolbar",["root","gutters","regular","dense"]);const gd=(0,f.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((0,Fc.A)((({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]})))),bd=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiToolbar"}),{className:o,component:r="div",disableGutters:i=!1,variant:s="regular",...a}=n,c={...n,component:r,disableGutters:i,variant:s},u=(e=>{const{classes:t,disableGutters:n,variant:o}=e,r={root:["root",!n&&"gutters",o]};return(0,d.A)(r,md,t)})(c);return(0,M.jsx)(gd,{as:r,className:(0,l.A)(u.root,o),ref:t,ownerState:c,...a})})),vd=bd;var yd=n(56536),wd=n(1883),Cd=n(9792);const xd=(0,Cd.A)((0,M.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),Sd=(0,Cd.A)((0,M.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),Ad=r.forwardRef((function(e,t){const{backIconButtonProps:n,count:o,disabled:r=!1,getItemAriaLabel:i,nextIconButtonProps:s,onPageChange:a,page:l,rowsPerPage:c,showFirstButton:u,showLastButton:d,slots:h={},slotProps:p={},...f}=e,m=(0,Jt.I)(),g=h.firstButton??rd.A,b=h.lastButton??rd.A,v=h.nextButton??rd.A,y=h.previousButton??rd.A,w=h.firstButtonIcon??Sd,C=h.lastButtonIcon??xd,x=h.nextButtonIcon??wd.A,S=h.previousButtonIcon??yd.A,A=m?b:g,E=m?v:y,k=m?y:v,R=m?g:b,I=m?p.lastButton:p.firstButton,P=m?p.nextButton:p.previousButton,T=m?p.previousButton:p.nextButton,O=m?p.firstButton:p.lastButton;return(0,M.jsxs)("div",{ref:t,...f,children:[u&&(0,M.jsx)(A,{onClick:e=>{a(e,0)},disabled:r||0===l,"aria-label":i("first",l),title:i("first",l),...I,children:m?(0,M.jsx)(C,{...p.lastButtonIcon}):(0,M.jsx)(w,{...p.firstButtonIcon})}),(0,M.jsx)(E,{onClick:e=>{a(e,l-1)},disabled:r||0===l,color:"inherit","aria-label":i("previous",l),title:i("previous",l),...P??n,children:m?(0,M.jsx)(x,{...p.nextButtonIcon}):(0,M.jsx)(S,{...p.previousButtonIcon})}),(0,M.jsx)(k,{onClick:e=>{a(e,l+1)},disabled:r||-1!==o&&l>=Math.ceil(o/c)-1,color:"inherit","aria-label":i("next",l),title:i("next",l),...T??s,children:m?(0,M.jsx)(S,{...p.previousButtonIcon}):(0,M.jsx)(x,{...p.nextButtonIcon})}),d&&(0,M.jsx)(R,{onClick:e=>{a(e,Math.max(0,Math.ceil(o/c)-1))},disabled:r||l>=Math.ceil(o/c)-1,"aria-label":i("last",l),title:i("last",l),...O,children:m?(0,M.jsx)(w,{...p.firstButtonIcon}):(0,M.jsx)(C,{...p.lastButtonIcon})})]})}));var Ed=n(54587);function kd(e){return(0,Vc.Ay)("MuiTablePagination",e)}const Rd=(0,Wl.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Md;const Id=(0,f.Ay)(fd,{name:"MuiTablePagination",slot:"Root"})((0,Fc.A)((({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})))),Pd=(0,f.Ay)(vd,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${Rd.actions}`]:t.actions,...t.toolbar})})((0,Fc.A)((({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Rd.actions}`]:{flexShrink:0,marginLeft:20}})))),Td=(0,f.Ay)("div",{name:"MuiTablePagination",slot:"Spacer"})({flex:"1 1 100%"}),Od=(0,f.Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel"})((0,Fc.A)((({theme:e})=>({...e.typography.body2,flexShrink:0})))),$d=(0,f.Ay)(Ku.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${Rd.selectIcon}`]:t.selectIcon,[`& .${Rd.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Rd.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Dd=(0,f.Ay)(Nu.A,{name:"MuiTablePagination",slot:"MenuItem"})({}),Nd=(0,f.Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows"})((0,Fc.A)((({theme:e})=>({...e.typography.body2,flexShrink:0}))));function Ld({from:e,to:t,count:n}){return`${e}–${t} of ${-1!==n?n:`more than ${t}`}`}function Hd(e){return`Go to ${e} page`}const zd=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiTablePagination"}),{ActionsComponent:o=Ad,backIconButtonProps:i,colSpan:s,component:a=fd,count:c,disabled:u=!1,getItemAriaLabel:h=Hd,labelDisplayedRows:p=Ld,labelRowsPerPage:f="Rows per page:",nextIconButtonProps:m,onPageChange:g,onRowsPerPageChange:b,page:v,rowsPerPage:y,rowsPerPageOptions:w=[10,25,50,100],SelectProps:C={},showFirstButton:x=!1,showLastButton:S=!1,slotProps:A={},slots:E={},...k}=n,R=n,I=(e=>{const{classes:t}=e;return(0,d.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},kd,t)})(R),P=A?.select??C,T=P.native?"option":Dd;let O;a!==fd&&"td"!==a||(O=s||1e3);const $=(0,Ed.A)(P.id),D=(0,Ed.A)(P.labelId),N={slots:E,slotProps:A},[L,H]=(0,Kc.A)("root",{ref:t,className:I.root,elementType:Id,externalForwardedProps:{...N,component:a,...k},ownerState:R,additionalProps:{colSpan:O}}),[z,F]=(0,Kc.A)("toolbar",{className:I.toolbar,elementType:Pd,externalForwardedProps:N,ownerState:R}),[j,B]=(0,Kc.A)("spacer",{className:I.spacer,elementType:Td,externalForwardedProps:N,ownerState:R}),[_,V]=(0,Kc.A)("selectLabel",{className:I.selectLabel,elementType:Od,externalForwardedProps:N,ownerState:R,additionalProps:{id:D}}),[W,G]=(0,Kc.A)("select",{className:I.select,elementType:$d,externalForwardedProps:N,ownerState:R}),[K,U]=(0,Kc.A)("menuItem",{className:I.menuItem,elementType:T,externalForwardedProps:N,ownerState:R}),[q,X]=(0,Kc.A)("displayedRows",{className:I.displayedRows,elementType:Nd,externalForwardedProps:N,ownerState:R});return(0,M.jsx)(L,{...H,children:(0,M.jsxs)(z,{...F,children:[(0,M.jsx)(j,{...B}),w.length>1&&(0,M.jsx)(_,{...V,children:f}),w.length>1&&(0,M.jsx)(W,{variant:"standard",...!P.variant&&{input:Md||(Md=(0,M.jsx)(au.Ay,{}))},value:y,onChange:b,id:$,labelId:D,...P,classes:{...P.classes,root:(0,l.A)(I.input,I.selectRoot,(P.classes||{}).root),select:(0,l.A)(I.select,(P.classes||{}).select),icon:(0,l.A)(I.selectIcon,(P.classes||{}).icon)},disabled:u,...G,children:w.map((e=>(0,r.createElement)(K,{...U,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e)))}),(0,M.jsx)(q,{...X,children:p({from:0===c?0:v*y+1,to:-1===c?(v+1)*y:-1===y?c:Math.min(c,(v+1)*y),count:-1===c?-1:c,page:v})}),(0,M.jsx)(o,{className:I.actions,backIconButtonProps:i,count:c,nextIconButtonProps:m,onPageChange:g,page:v,rowsPerPage:y,showFirstButton:x,showLastButton:S,slotProps:A.actions,slots:E.actions,getItemAriaLabel:h,disabled:u})]})})})),Fd=zd;var jd=n(27519),Bd=n(17726);function _d(e){return e.substring(2).toLowerCase()}function Vd(e){const{children:t,disableReactTree:n=!1,mouseEvent:o="onClick",onClickAway:i,touchEvent:s="onTouchEnd"}=e,a=r.useRef(!1),l=r.useRef(null),u=r.useRef(!1),d=r.useRef(!1);r.useEffect((()=>(setTimeout((()=>{u.current=!0}),0),()=>{u.current=!1})),[]);const h=(0,c.A)((0,Bd.A)(t),l),p=(0,ce.A)((e=>{const t=d.current;d.current=!1;const o=(0,ki.A)(l.current);if(!u.current||!l.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,o))return;if(a.current)return void(a.current=!1);let r;r=e.composedPath?e.composedPath().includes(l.current):!o.documentElement.contains(e.target)||l.current.contains(e.target),r||!n&&t||i(e)})),f=e=>n=>{d.current=!0;const o=t.props[e];o&&o(n)},m={ref:h};return!1!==s&&(m[s]=f(s)),r.useEffect((()=>{if(!1!==s){const e=_d(s),t=(0,ki.A)(l.current),n=()=>{a.current=!0};return t.addEventListener(e,p),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,p),t.removeEventListener("touchmove",n)}}}),[p,s]),!1!==o&&(m[o]=f(o)),r.useEffect((()=>{if(!1!==o){const e=_d(o),t=(0,ki.A)(l.current);return t.addEventListener(e,p),()=>{t.removeEventListener(e,p)}}}),[p,o]),r.cloneElement(t,m)}var Wd=n(38572),Gd=n(49565),Kd=n(80688);function Ud(e){return(0,Vc.Ay)("MuiSkeleton",e)}(0,Wl.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const qd=Tl.i7`
- 0% {
- opacity: 1;
- }
- 50% {
- opacity: 0.4;
- }
- 100% {
- opacity: 1;
- }
- `,Xd=Tl.i7`
- 0% {
- transform: translateX(-100%);
- }
- 50% {
- /* +0.5s of delay between each loop */
- transform: translateX(100%);
- }
- 100% {
- transform: translateX(100%);
- }
- `,Yd="string"!=typeof qd?Tl.AH`
- animation: ${qd} 2s ease-in-out 0.5s infinite;
- `:null,Qd="string"!=typeof Xd?Tl.AH`
- &::after {
- animation: ${Xd} 2s linear 0.5s infinite;
- }
- `:null,Jd=(0,f.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((0,Fc.A)((({theme:e})=>{const t=(r=e.shape.borderRadius,String(r).match(/[\d.\-+]*\s*(.*)/)[1]||""||"px"),n=(o=e.shape.borderRadius,parseFloat(o));var o,r;return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,tu.X4)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:Yd||{animation:`${qd} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(e.vars||e).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:Qd||{"&::after":{animation:`${Xd} 2s linear 0.5s infinite`}}}]}}))),Zd=r.forwardRef((function(e,t){const n=(0,Bc.b)({props:e,name:"MuiSkeleton"}),{animation:o="pulse",className:r,component:i="span",height:s,style:a,variant:c="text",width:u,...h}=n,p={...n,animation:o,component:i,variant:c,hasChildren:Boolean(h.children)},f=(e=>{const{classes:t,variant:n,animation:o,hasChildren:r,width:i,height:s}=e,a={root:["root",n,o,r&&"withChildren",r&&!i&&"fitContent",r&&!s&&"heightAuto"]};return(0,d.A)(a,Ud,t)})(p);return(0,M.jsx)(Jd,{as:i,ref:t,className:(0,l.A)(f.root,r),ownerState:p,...h,style:{width:u,height:s,...a}})})),eh=Zd,th=Cd.A,nh=th((0,M.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),oh=th((0,M.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),rh=th((0,M.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),ih=th((0,M.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),sh=th((0,M.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),ah=th((0,M.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),lh=th((0,M.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 19l-4.99-5zm-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 14z"}),"Search"),ch=(th((0,M.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),th((0,M.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),th((0,M.jsx)("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ColumnIcon")),uh=th((0,M.jsx)("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),dh=th((0,M.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),hh=th((0,M.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),ph=th((0,M.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),fh=th((0,M.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),mh=th((0,M.jsx)("path",{d:"M19 6.41L17.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"),gh=th((0,M.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),bh=th((0,M.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),vh=th((0,M.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),yh=th((0,M.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),wh=th((0,M.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Ch=th((0,M.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),xh=th((0,M.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),Sh=th((0,M.jsx)("g",{children:(0,M.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),Ah=th((0,M.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"}),"Clear"),Eh=(th((0,M.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),th((0,M.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete")),kh=th((0,M.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download"),Rh=["id","label","labelId","material","disabled","slotProps","onChange","onKeyDown","onOpen","onClose","size","style","fullWidth"],Mh=["onRowsPerPageChange","material","disabled"],Ih=["material"],Ph=["autoFocus","label","fullWidth","slotProps","className","material"],Th=["material"],Oh=["material"],$h=["material"],Dh=["material"],Nh=["material"],Lh=["material"],Hh=["material"],zh=["material"],Fh=["material","label","className"],jh=["material"],Bh=["inert","iconStart","iconEnd","children","material"],_h=["slotProps","material"],Vh=["id","multiple","freeSolo","options","getOptionLabel","isOptionEqualToValue","value","onChange","label","placeholder","slotProps","material"],Wh=["key"],Gh=["inputProps","InputProps","InputLabelProps"],Kh=["slotProps","material"],Uh=["ref","open","children","className","clickAwayTouchEvent","clickAwayMouseEvent","flip","focusTrap","onExited","onClickAway","onDidShow","onDidHide","id","target","transition","placement","material"],qh=["native"],Xh=(0,f.Ay)(id.A)((({theme:e})=>({[`&.${sd.A.positionEnd} .${od.A.sizeSmall}`]:{marginRight:e.spacing(-.75)}}))),Yh=(0,f.Ay)(Gu,{shouldForwardProp:e=>"fullWidth"!==e})((({theme:e})=>({gap:e.spacing(.5),margin:0,overflow:"hidden",[`& .${ju.label}`]:{fontSize:e.typography.pxToRem(14),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variants:[{props:{fullWidth:!0},style:{width:"100%"}}]}))),Qh=(0,f.Ay)(Jc.A,{shouldForwardProp:e=>"density"!==e})((({theme:e})=>({variants:[{props:{density:"compact"},style:{padding:e.spacing(.5)}}]}))),Jh=(0,f.Ay)($u)({[`& .${Pu.A.primary}`]:{overflowX:"clip",textOverflow:"ellipsis",maxWidth:"300px"}}),Zh=(0,s.R)((function(e,t){const{id:n,label:r,labelId:i,material:s,disabled:l,slotProps:c,onChange:u,onKeyDown:d,onOpen:h,onClose:p,size:f,style:m,fullWidth:g}=e,b=(0,a.A)(e,Rh),v={PaperProps:{onKeyDown:d}};return p&&(v.onClose=p),(0,M.jsxs)(Hu.A,{size:f,fullWidth:g,style:m,disabled:l,ref:t,children:[(0,M.jsx)(Kd.A,{id:i,htmlFor:n,shrink:!0,variant:"outlined",children:r}),(0,M.jsx)(Ku.A,(0,o.A)({id:n,labelId:i,label:r,displayEmpty:!0,onChange:u},b,{variant:"outlined",notched:!0,inputProps:c?.htmlInput,onOpen:h,MenuProps:v,size:f},s))]})})),ep=(0,f.Ay)(Fd)((({theme:e})=>({[`& .${Rd.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Rd.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}}))),tp=(0,s.R)((function(e,t){const{onRowsPerPageChange:n,material:i,disabled:s}=e,l=(0,a.A)(e,Mh),c=r.useMemo((()=>{if(s)return{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}}),[s]),u=(0,W.h)(),d=(0,E.A)(),{estimatedRowCount:h}=d;return(0,M.jsx)(ep,(0,o.A)({component:"div",onRowsPerPageChange:(0,ce.A)((e=>{n?.(Number(e.target.value))})),labelRowsPerPage:u.current.getLocaleText("paginationRowsPerPage"),labelDisplayedRows:e=>u.current.getLocaleText("paginationDisplayedRows")((0,o.A)({},e,{estimated:h})),getItemAriaLabel:u.current.getLocaleText("paginationItemAriaLabel")},c,l,i,{ref:t}))})),np=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,Ih);return(0,M.jsx)(Qc,(0,o.A)({},r,n,{ref:t}))})),op=(0,s.R)((function(e,t){const{autoFocus:n,label:i,fullWidth:s,slotProps:u,className:d,material:h}=e,p=(0,a.A)(e,Ph),f=r.useRef(null),m=(0,c.A)(f,t),g=r.useRef(null);return r.useEffect((()=>{if(n){const e=f.current?.querySelector("input");e?.focus({preventScroll:!0})}else!1===n&&g.current&&g.current.stop({})}),[n]),i?(0,M.jsx)(Yh,{className:d,control:(0,M.jsx)(Qh,(0,o.A)({},p,h,{inputProps:u?.htmlInput,ref:m,touchRippleRef:g})),label:i,fullWidth:s}):(0,M.jsx)(Qh,(0,o.A)({},p,h,{className:(0,l.A)(d,h?.className),inputProps:u?.htmlInput,ref:m,touchRippleRef:g}))})),rp=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,Th);return(0,M.jsx)(eu.A,(0,o.A)({},r,n,{ref:t}))})),ip=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,Oh);return(0,M.jsx)(su,(0,o.A)({},r,n,{ref:t}))})),sp=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,$h);return(0,M.jsx)(xu,(0,o.A)({},r,n,{ref:t}))})),ap=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,Dh);return(0,M.jsx)(nd.A,(0,o.A)({},r,n,{ref:t}))})),lp=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,Nh);return(0,M.jsx)(Zc.A,(0,o.A)({},r,n,{ref:t}))})),cp=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,Lh);return(0,M.jsx)(rd.A,(0,o.A)({},r,n,{ref:t}))})),up=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,Hh);return(0,M.jsx)(ad.A,(0,o.A)({},r,n,{ref:t}))})),dp=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,zh);return(0,M.jsx)(eh,(0,o.A)({},r,n,{ref:t}))})),hp=(0,s.R)((function(e,t){const{material:n,label:r,className:i}=e,s=(0,a.A)(e,Fh);return r?(0,M.jsx)(Yh,{className:i,control:(0,M.jsx)(td,(0,o.A)({},s,n,{ref:t})),label:r}):(0,M.jsx)(td,(0,o.A)({},s,n,{className:i,ref:t}))})),pp=(0,s.R)((function(e,t){const{material:n}=e,r=(0,a.A)(e,jh);return(0,M.jsx)(Du.A,(0,o.A)({},r,n,{ref:t}))}));function fp(e,t=!0){if(!e)return;const{slotProps:n,material:r}=e,i=(0,a.A)(e,Kh);t&&(i.startAdornment&&(i.startAdornment=(0,M.jsx)(Xh,{position:"start",children:i.startAdornment})),i.endAdornment&&(i.endAdornment=(0,M.jsx)(Xh,{position:"end",children:i.endAdornment})));for(const e in r)Object.hasOwn(r,e)&&(i[e]=r[e]);return n?.htmlInput&&(i.inputProps?i.inputProps=(0,o.A)({},i.inputProps,n?.htmlInput):i.inputProps=n?.htmlInput),i}const mp={"bottom-start":"top left","bottom-end":"top right"};function gp(e,t){return function(e,t){return void 0===e.focusTrap?t:(0,M.jsx)(lu.A,{open:!0,disableEnforceFocus:!0,disableAutoFocus:!0,children:(0,M.jsx)("div",{tabIndex:-1,children:t})})}(e,function(e,t){return void 0===e.onClickAway?t:(0,M.jsx)(Vd,{onClickAway:e.onClickAway,touchEvent:e.clickAwayTouchEvent,mouseEvent:e.clickAwayMouseEvent,children:t})}(e,t))}const bp={booleanCellTrueIcon:wh,booleanCellFalseIcon:mh,columnMenuIcon:fh,openFilterButtonIcon:sh,filterPanelDeleteIcon:mh,columnFilteredIcon:ah,columnSelectorIcon:ch,columnSortedAscendingIcon:nh,columnSortedDescendingIcon:oh,columnResizeIcon:uh,densityCompactIcon:dh,densityStandardIcon:hh,densityComfortableIcon:ph,exportIcon:kh,moreActionsIcon:Ch,treeDataCollapseIcon:ih,treeDataExpandIcon:rh,groupingCriteriaCollapseIcon:ih,groupingCriteriaExpandIcon:rh,detailPanelExpandIcon:gh,detailPanelCollapseIcon:bh,rowReorderIcon:yh,quickFilterIcon:lh,quickFilterClearIcon:Ah,columnMenuHideIcon:xh,columnMenuSortAscendingIcon:nh,columnMenuSortDescendingIcon:oh,columnMenuUnsortIcon:null,columnMenuFilterIcon:ah,columnMenuManageColumnsIcon:Sh,columnMenuClearIcon:Ah,loadIcon:vh,filterPanelAddIcon:gh,filterPanelRemoveAllIcon:Eh,columnReorderIcon:yh,menuItemCheckIcon:wh},vp={baseAutocomplete:function(e){const t=(0,E.A)(),{id:n,multiple:r,freeSolo:i,options:s,getOptionLabel:l,isOptionEqualToValue:c,value:u,onChange:d,label:h,placeholder:p,slotProps:f,material:m}=e,g=(0,a.A)(e,Vh);return(0,M.jsx)(Hc.A,(0,o.A)({id:n,multiple:r,freeSolo:i,options:s,getOptionLabel:l,isOptionEqualToValue:c,value:u,onChange:d,renderTags:(e,t)=>e.map(((e,n)=>{const r=t({index:n}),{key:i}=r,s=(0,a.A)(r,Wh);return(0,M.jsx)(Zc.A,(0,o.A)({variant:"outlined",size:"small",label:"string"==typeof e?e:l?.(e)},s),i)})),renderInput:e=>{const{inputProps:n,InputProps:r,InputLabelProps:i}=e,s=(0,a.A)(e,Gh);return(0,M.jsx)(Lu.A,(0,o.A)({},s,{label:h,placeholder:p,inputProps:n,InputProps:fp(r,!1),InputLabelProps:(0,o.A)({shrink:!0},i)},f?.textField,t.slotProps?.baseTextField))}},g,m))},baseBadge:np,baseCheckbox:op,baseChip:lp,baseCircularProgress:rp,baseDivider:ip,baseInput:function(e){return(0,M.jsx)(au.Ay,(0,o.A)({},fp(e)))},baseLinearProgress:sp,baseMenuList:pp,baseMenuItem:function(e){const{inert:t,iconStart:n,iconEnd:i,children:s,material:l}=e,c=(0,a.A)(e,Bh);return t&&(c.disableRipple=!0),r.createElement(Nu.A,(0,o.A)({},c,l),[n&&(0,M.jsx)(Ru,{children:n},"1"),(0,M.jsx)(Jh,{children:s},"2"),i&&(0,M.jsx)(Ru,{children:i},"3")])},baseTextField:function(e){const{slotProps:t,material:n}=e,r=(0,a.A)(e,_h);return(0,M.jsx)(Lu.A,(0,o.A)({variant:"outlined"},r,n,{inputProps:t?.htmlInput,InputProps:fp(t?.input),InputLabelProps:(0,o.A)({shrink:!0},t?.inputLabel)}))},baseButton:ap,baseIconButton:cp,baseTooltip:up,basePagination:tp,basePopper:function(e){const{open:t,children:n,className:i,flip:s,onExited:l,onDidShow:c,onDidHide:u,id:d,target:h,transition:p,placement:f,material:m}=e,g=(0,a.A)(e,Uh),b=r.useMemo((()=>{const e=[{name:"preventOverflow",options:{padding:8}}];return s&&e.push({name:"flip",enabled:!0,options:{rootBoundary:"document"}}),(c||u)&&e.push({name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c?.()},effect:()=>()=>{u?.()}}),e}),[s,c,u]);let v;if(p){const t=e=>t=>{e&&e(),l&&l(t)};v=r=>gp(e,(0,M.jsx)(Wd.A,(0,o.A)({},r.TransitionProps,{style:{transformOrigin:mp[r.placement]},onExited:t(r.TransitionProps?.onExited),children:(0,M.jsx)(Gd.A,{children:n})})))}else v=gp(e,n);return(0,M.jsx)(jd.A,(0,o.A)({id:d,className:i,open:t,anchorEl:h,transition:p,placement:f,modifiers:b},g,m,{children:v}))},baseSelect:Zh,baseSelectOption:function(e){let{native:t}=e,n=(0,a.A)(e,qh);return t?(0,M.jsx)("option",(0,o.A)({},n)):(0,M.jsx)(Nu.A,(0,o.A)({},n))},baseSkeleton:dp,baseSwitch:hp},yp=(0,o.A)({},vp,bp),wp=(0,Y.A)("div")({position:"sticky",zIndex:40,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});var Cp=n(57618),xp=n(16620),Sp=n(25054);const Ap=["render","className","onClick","onPointerUp"],Ep=(0,s.R)((function(e,t){const{render:n,className:i,onClick:s,onPointerUp:l}=e,u=(0,a.A)(e,Ap),d=(0,E.A)(),h=(0,$e.A)(),p=(0,$e.A)(),f=(0,W.h)(),m=(0,b.Nc)(f,B),g=m.open&&m.openedPanelValue===V.filters,v=(0,b.Nc)(f,Pn.Ai).length,y={open:g,filterCount:v},w="function"==typeof i?i(y):i,{filterPanelTriggerRef:C}=K(),x=(0,c.A)(t,C),S=(0,Sp._)(d.slots.baseButton,n,(0,o.A)({},d.slotProps?.baseButton,{id:h,"aria-haspopup":"true","aria-expanded":g?"true":void 0,"aria-controls":g?p:void 0,onClick:e=>{g?f.current.hidePreferences():f.current.showPreferences(V.filters,p,h),s?.(e)},onPointerUp:e=>{g&&e.stopPropagation(),l?.(e)},className:w},u,{ref:x}),y);return(0,M.jsx)(r.Fragment,{children:S})})),kp=["render","className","onClick","onPointerUp"],Rp=(0,s.R)((function(e,t){const{render:n,className:i,onClick:s,onPointerUp:l}=e,u=(0,a.A)(e,kp),d=(0,E.A)(),h=(0,$e.A)(),p=(0,$e.A)(),f=(0,W.h)(),m=(0,b.Nc)(f,B),g=m.open&&m.openedPanelValue===V.columns,v={open:g},y="function"==typeof i?i(v):i,{columnsPanelTriggerRef:w}=K(),C=(0,c.A)(t,w),x=(0,Sp._)(d.slots.baseButton,n,(0,o.A)({},d.slotProps?.baseButton,{id:h,"aria-haspopup":"true","aria-expanded":g?"true":void 0,"aria-controls":g?p:void 0,className:y},u,{onPointerUp:e=>{g&&e.stopPropagation(),l?.(e)},onClick:e=>{g?f.current.hidePreferences():f.current.showPreferences(V.columns,p,h),s?.(e)},ref:C}),v);return(0,M.jsx)(r.Fragment,{children:x})})),Mp=["render","options","onClick"],Ip=(0,s.R)((function(e,t){const{render:n,options:i,onClick:s}=e,l=(0,a.A)(e,Mp),c=(0,E.A)(),u=(0,W.h)(),d=(0,Sp._)(c.slots.baseButton,n,(0,o.A)({},c.slotProps?.baseButton,{onClick:e=>{u.current.exportDataAsPrint(i),s?.(e)}},l,{ref:t}));return(0,M.jsx)(r.Fragment,{children:d})})),Pp=["render","options","onClick"],Tp=(0,s.R)((function(e,t){const{render:n,options:i,onClick:s}=e,l=(0,a.A)(e,Pp),c=(0,E.A)(),u=(0,W.h)(),d=(0,Sp._)(c.slots.baseButton,n,(0,o.A)({},c.slotProps?.baseButton,{onClick:e=>{u.current.exportDataAsCsv(i),s?.(e)}},l,{ref:t}));return(0,M.jsx)(r.Fragment,{children:d})}));var Op=n(57798),$p=n(32675),Dp=n(49945),Np=n(28525);const Lp=["quickFilterParser","quickFilterFormatter","debounceMs","className","slotProps"],Hp=["ref","slotProps"],zp=(0,Y.A)("div",{name:"MuiDataGrid",slot:"ToolbarQuickFilter"})({display:"grid",alignItems:"center"}),Fp=(0,Y.A)(xp.I,{name:"MuiDataGrid",slot:"ToolbarQuickFilterTrigger"})((({ownerState:e})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:e.expanded?0:1,pointerEvents:e.expanded?"none":"auto",transition:g.f.transition(["opacity"])}))),jp=(0,Y.A)((e=>{throw new Error("Failed assertion: should not be rendered")}),{name:"MuiDataGrid",slot:"ToolbarQuickFilterControl"})((({ownerState:e})=>({gridArea:"1 / 1",overflowX:"clip",width:e.expanded?260:"var(--trigger-width)",opacity:e.expanded?1:0,transition:g.f.transition(["width","opacity"])})));function Bp(e){const t=(0,W.h)(),n=(0,E.A)(),r={classes:n.classes,expanded:!1},i=(e=>{const{classes:t}=e;return(0,d.A)({root:["toolbarQuickFilter"],trigger:["toolbarQuickFilterTrigger"],control:["toolbarQuickFilterControl"]},m.B,t)})(r),{quickFilterParser:s,quickFilterFormatter:c,debounceMs:u,className:h,slotProps:p}=e,f=(0,a.A)(e,Lp);return(0,M.jsx)(Op.e,{parser:s,formatter:c,debounceMs:u,render:(e,s)=>{const c=(0,o.A)({},r,{expanded:s.expanded});return(0,M.jsxs)(zp,(0,o.A)({},e,{className:(0,l.A)(i.root,h),children:[(0,M.jsx)($p.m,{render:e=>(0,M.jsx)(n.slots.baseTooltip,{title:t.current.getLocaleText("toolbarQuickFilterLabel"),enterDelay:0,children:(0,M.jsx)(Fp,(0,o.A)({className:i.trigger},e,{ownerState:c,color:"default","aria-disabled":s.expanded,children:(0,M.jsx)(n.slots.quickFilterIcon,{fontSize:"small"})}))})}),(0,M.jsx)(Dp.X,{render:e=>{let{ref:r,slotProps:s}=e,l=(0,a.A)(e,Hp);return(0,M.jsx)(jp,(0,o.A)({as:n.slots.baseTextField,className:i.control,ownerState:c,inputRef:r,"aria-label":t.current.getLocaleText("toolbarQuickFilterLabel"),placeholder:t.current.getLocaleText("toolbarQuickFilterPlaceholder"),size:"small",slotProps:(0,o.A)({input:(0,o.A)({startAdornment:(0,M.jsx)(n.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:l.value?(0,M.jsx)(Np.x,{render:(0,M.jsx)(n.slots.baseIconButton,{size:"small",edge:"end","aria-label":t.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),children:(0,M.jsx)(n.slots.quickFilterClearIcon,{fontSize:"small"})})}):null},s?.input)},s)},n.slotProps?.baseTextField,l,p?.root,f))}})]}))}})}const _p=["className"],Vp=["className"],Wp=e=>{const{classes:t}=e;return(0,d.A)({divider:["toolbarDivider"],label:["toolbarLabel"]},m.B,t)},Gp=(0,Y.A)(Ce,{name:"MuiDataGrid",slot:"ToolbarDivider"})({height:"50%",margin:g.f.spacing(0,.5)}),Kp=(0,Y.A)("span",{name:"MuiDataGrid",slot:"ToolbarLabel"})({flex:1,font:g.f.typography.font.large,fontWeight:g.f.typography.fontWeight.medium,margin:g.f.spacing(0,.5),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"});function Up(e){const t=(0,a.A)(e,_p),n=(0,E.A)(),r=Wp(n);return(0,M.jsx)(Gp,(0,o.A)({as:n.slots.baseDivider,orientation:"vertical",className:r.divider},t))}function qp(e){const t=(0,a.A)(e,Vp),n=(0,E.A)(),r=Wp(n);return(0,M.jsx)(Kp,(0,o.A)({className:r.label},t))}const Xp=(0,o.A)({},yp,{cell:rc,skeletonCell:ba,columnHeaderFilterIconButton:function(e){return e.counter?(0,M.jsx)(Ca,(0,o.A)({},e)):null},columnHeaderSortIcon:Ma,columnMenu:Nc,columnHeaders:Ac,detailPanels:function(e){return null},bottomContainer:function(e){const t=(0,d.A)({root:["bottomContainer"]},m.B,{});return(0,M.jsx)(wp,(0,o.A)({},e,{className:(0,l.A)(t.root,m.x["container--bottom"]),role:"presentation"}))},footer:Na,footerRowCount:za,toolbar:function(e){const{showQuickFilter:t=!0,quickFilterProps:n,csvOptions:i,printOptions:s,additionalItems:a,additionalExportMenuItems:l}=e,c=(0,W.h)(),u=(0,E.A)(),[d,h]=r.useState(!1),p=r.useRef(null),f=(0,$e.A)(),m=(0,$e.A)(),g=!i?.disableToolbarButton||!s?.disableToolbarButton||l,b=()=>h(!1);return(0,M.jsxs)(Cp.M,{children:[u.label&&(0,M.jsx)(qp,{children:u.label}),!u.disableColumnSelector&&(0,M.jsx)(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarColumns"),children:(0,M.jsx)(Rp,{render:(0,M.jsx)(xp.I,{}),children:(0,M.jsx)(u.slots.columnSelectorIcon,{fontSize:"small"})})}),!u.disableColumnFilter&&(0,M.jsx)(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarFilters"),children:(0,M.jsx)(Ep,{render:(e,t)=>(0,M.jsx)(xp.I,(0,o.A)({},e,{color:t.filterCount>0?"primary":"default",children:(0,M.jsx)(u.slots.baseBadge,{badgeContent:t.filterCount,color:"primary",variant:"dot",children:(0,M.jsx)(u.slots.openFilterButtonIcon,{fontSize:"small"})})}))})}),a,g&&(!u.disableColumnFilter||!u.disableColumnSelector)&&(0,M.jsx)(Up,{}),g&&(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(u.slots.baseTooltip,{title:c.current.getLocaleText("toolbarExport"),children:(0,M.jsx)(xp.I,{ref:p,id:m,"aria-controls":f,"aria-haspopup":"true","aria-expanded":d?"true":void 0,onClick:()=>h(!d),children:(0,M.jsx)(u.slots.exportIcon,{fontSize:"small"})})}),(0,M.jsx)(tn,{target:p.current,open:d,onClose:b,position:"bottom-end",children:(0,M.jsxs)(u.slots.baseMenuList,(0,o.A)({id:f,"aria-labelledby":m,autoFocusItem:!0},u.slotProps?.baseMenuList,{children:[!s?.disableToolbarButton&&(0,M.jsx)(Ip,{render:(0,M.jsx)(u.slots.baseMenuItem,(0,o.A)({},u.slotProps?.baseMenuItem)),options:s,onClick:b,children:c.current.getLocaleText("toolbarExportPrint")}),!i?.disableToolbarButton&&(0,M.jsx)(Tp,{render:(0,M.jsx)(u.slots.baseMenuItem,(0,o.A)({},u.slotProps?.baseMenuItem)),options:i,onClick:b,children:c.current.getLocaleText("toolbarExportCSV")}),l?.(b)]}))})]}),t&&(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(Up,{}),(0,M.jsx)(Bp,(0,o.A)({},n))]})]})},pinnedRows:function(e){return null},loadingOverlay:nl,noResultsOverlay:Lc,noRowsOverlay:ol,noColumnsOverlay:rl,pagination:function(){const e=(0,W.h)(),t=(0,E.A)(),n=(0,b.Nc)(e,Hn),o=(0,b.Nc)(e,zn),i=(0,b.Nc)(e,_n),{paginationMode:s,loading:a}=t,l=-1===o&&"server"===s&&a,c=r.useMemo((()=>Math.max(0,i-1)),[i]),u=r.useMemo((()=>-1===o||n.page<=c?n.page:c),[c,n.page,o]),d=r.useCallback((t=>{e.current.setPageSize(t)}),[e]),h=r.useCallback(((t,n)=>{e.current.setPage(n)}),[e]),p=(e=>{for(let n=0;n<t.pageSizeOptions.length;n+=1){const o=t.pageSizeOptions[n];if("number"==typeof o){if(o===e)return!0}else if(o.value===e)return!0}return!1})(n.pageSize)?t.pageSizeOptions:[];return(0,M.jsx)(il,{as:t.slots.basePagination,count:o,page:u,rowsPerPageOptions:p,rowsPerPage:n.pageSize,onPageChange:h,onRowsPerPageChange:d,disabled:l})},filterPanel:Ml,columnsPanel:function(e){const t=(0,E.A)();return(0,M.jsx)(fl,(0,o.A)({},e,{children:(0,M.jsx)(t.slots.columnsManagement,(0,o.A)({},t.slotProps?.columnsManagement))}))},columnsManagement:function(e){const t=(0,W.h)(),n=r.useRef(null),i=(0,b.Nc)(t,j.FX),s=(0,b.Nc)(t,j.FY),a=(0,E.A)(),[l,c]=r.useState(""),u=(e=>{const{classes:t}=e;return(0,d.A)({root:["columnsManagement"],header:["columnsManagementHeader"],searchInput:["columnsManagementSearchInput"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},m.B,t)})(a),h=(0,b.Nc)(t,j.OV),p=(0,b.Nc)(t,qo),f=(0,b.Nc)(t,Yo),g=r.useMemo((()=>p?Array.from(f.values()):h),[p,f,h]),{sort:v,searchPredicate:y=Pl,autoFocusSearchField:w=!0,disableShowHideToggle:C=!1,disableResetButton:x=!1,toggleAllMode:S="all",getTogglableColumns:A,searchInputProps:k}=e,R=r.useMemo((()=>((e,t)=>{const n=new Set(Object.keys(e).filter((t=>!1===e[t]))),o=new Set(Object.keys(t).filter((e=>!1===t[e])));if(n.size!==o.size)return!1;let r=!0;return n.forEach((e=>{o.has(e)||(r=!1)})),r})(s,i)),[s,i]),I=r.useMemo((()=>{switch(v){case"asc":return[...g].sort(((e,t)=>Hl.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...g].sort(((e,t)=>-Hl.compare(e.headerName||e.field,t.headerName||t.field)));default:return g}}),[g,v]),P=e=>{const{name:n}=e.target;t.current.setColumnVisibility(n,!1===s[n])},T=r.useMemo((()=>{const e=A?A(I):null,t=e?I.filter((({field:t})=>e.includes(t))):I;return l?t.filter((e=>y(e,l.toLowerCase()))):t}),[I,l,y,A]),O=r.useCallback((e=>{const n=(0,j.FY)(t),r=(0,o.A)({},n),i=A?A(g):null;return("filteredOnly"===S?T:g).forEach((t=>{t.hideable&&(null==i||i.includes(t.field))&&(e?delete r[t.field]:r[t.field]=!1)})),t.current.setColumnVisibilityModel(r)}),[t,g,A,S,T]),$=r.useCallback((e=>{c(e.target.value)}),[]),D=r.useMemo((()=>T.filter((e=>e.hideable))),[T]),N=r.useMemo((()=>D.every((e=>null==s[e.field]||!1!==s[e.field]))),[s,D]),L=r.useMemo((()=>D.every((e=>!1===s[e.field]))),[s,D]),H=r.useRef(null);r.useEffect((()=>{w?n.current?.focus():H.current&&"function"==typeof H.current.focus&&H.current.focus()}),[w]);let z=!1;const F=e=>!1===z&&!1!==e.hideable&&(z=!0,!0),B=r.useCallback((()=>{c(""),n.current?.focus()}),[]);return(0,M.jsxs)(r.Fragment,{children:[(0,M.jsx)(jl,{className:u.header,ownerState:a,children:(0,M.jsx)(Bl,(0,o.A)({as:a.slots.baseTextField,ownerState:a,placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,className:u.searchInput,value:l,onChange:$,size:"small",type:"search",slotProps:{input:{startAdornment:(0,M.jsx)(a.slots.quickFilterIcon,{fontSize:"small"}),endAdornment:(0,M.jsx)(a.slots.baseIconButton,(0,o.A)({size:"small","aria-label":t.current.getLocaleText("columnsManagementDeleteIconLabel"),style:l?{visibility:"visible"}:{visibility:"hidden"},tabIndex:-1,onClick:B,edge:"end"},a.slotProps?.baseIconButton,{children:(0,M.jsx)(a.slots.quickFilterClearIcon,{fontSize:"small"})}))},htmlInput:{"aria-label":t.current.getLocaleText("columnsManagementSearchTitle")}},autoComplete:"off",fullWidth:!0},a.slotProps?.baseTextField,k))}),(0,M.jsx)(Fl,{ownerState:a,children:(0,M.jsxs)(zl,{className:u.root,ownerState:a,children:[T.map((e=>(0,M.jsx)(a.slots.baseCheckbox,(0,o.A)({className:u.row,disabled:!1===e.hideable||p,checked:!1!==s[e.field],onChange:P,name:e.field,inputRef:F(e)?H:void 0,label:e.headerName||e.field,density:"compact",fullWidth:!0},a.slotProps?.baseCheckbox),e.field))),0===T.length&&(0,M.jsx)(Vl,{ownerState:a,children:t.current.getLocaleText("columnsManagementNoColumns")})]})}),C&&x?null:(0,M.jsxs)(_l,{ownerState:a,className:u.footer,children:[C?(0,M.jsx)("span",{}):(0,M.jsx)(a.slots.baseCheckbox,(0,o.A)({disabled:0===D.length||p,checked:N,indeterminate:!N&&!L,onChange:()=>O(!N),name:t.current.getLocaleText("columnsManagementShowHideAllText"),label:t.current.getLocaleText("columnsManagementShowHideAllText"),density:"compact"},a.slotProps?.baseCheckbox)),x?null:(0,M.jsx)(a.slots.baseButton,(0,o.A)({onClick:()=>t.current.setColumnVisibilityModel(i),disabled:R||p},a.slotProps?.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]})]})},panel:Xl,row:Zl}),Yp={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",listView:!1},Qp=Xp,Jp=new TextEncoder;let Zp=2048,ef=new ArrayBuffer(Zp),tf=new Uint8Array(ef),nf=new Int32Array(ef);function of(e,t){return e<<t|e>>>32-t}function rf(e){return function(e){return`rgba(from ${e} r g b / 1)`}(e)}function sf(e){if(e)return`${e.fontWeight} ${e.fontSize} / ${e.lineHeight} ${e.fontFamily}`}class af{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()),r=Array.from(n.regular.keys());for(let e=o.length-1;e>=0;e-=1){const r=o[e];n.highPriority.has(r)&&r.apply(this,t)}for(let e=0;e<r.length;e+=1){const o=r[e];n.regular.has(o)&&o.apply(this,t)}}once(e,t){const n=this;this.on(e,(function o(...r){n.removeListener(e,o),t.apply(n,r)}))}}class lf{static create(e){return new lf(e)}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=>{this.value=e,this.listeners.forEach((t=>t(e)))},this.value=e,this.listeners=new Set}}const cf=Symbol("mui.api_private");let uf=0;const df={hooks:{useCSSVariables:function(){const e=(0,ca.A)();return r.useMemo((()=>{const t=function(e){const t=2*e.length;t>Zp&&(Zp=t+(4-t%4),ef=new ArrayBuffer(Zp),tf=new Uint8Array(ef),nf=new Int32Array(ef));const n=0|Jp.encodeInto(e,tf).written;let o=0,r=374761393+(0+n|0)|0;if(n<16)for(;(o+3|0)<n;o=o+4|0)r=Math.imul(0|of(r+Math.imul(0|nf[o],3266489917)|0,17),668265263);else{let e=606290984,t=-2048144777,i=0,s=1640531535;for(;(o+15|0)<n;o=o+16|0)e=Math.imul(0|of(e+Math.imul(0|nf[o+0|0],2246822519)|0,13),2654435761),t=Math.imul(0|of(t+Math.imul(0|nf[o+4|0],2246822519)|0,13),2654435761),i=Math.imul(0|of(i+Math.imul(0|nf[o+8|0],2246822519)|0,13),2654435761),s=Math.imul(0|of(s+Math.imul(0|nf[o+12|0],2246822519)|0,13),2654435761);for(r=(((of(e,1)|0+of(t,7)|0)+of(i,12)|0)+of(s,18)|0)+n|0;(o+3|0)<n;o=o+4|0)r=Math.imul(0|of(r+Math.imul(0|nf[o],3266489917)|0,17),668265263)}for(;o<n;o=o+1|0)r=Math.imul(0|of(r+Math.imul(0|tf[o],374761393)|0,11),2654435761);return r=Math.imul(r^r>>>15,2246822519),r=Math.imul(r^r>>>13,3266489917),((r^r>>>16)>>>0).toString()}(function(e){const t=new WeakSet;return JSON.stringify(e,((e,n)=>{if(null!==n&&"object"==typeof n){if(t.has(n))return null;t.add(n)}return n}))}(e)),n=function(e){const t=function(e){return e.vars?e.vars.palette.TableCell.border:"light"===e.palette.mode?(0,tu.a)((0,tu.X4)(e.palette.divider,1),.88):(0,tu.e$)((0,tu.X4)(e.palette.divider,1),.68)}(e),n=e.palette.DataGrid,o=n?.bg??(e.vars||e).palette.background.default,r=n?.headerBg??o,i=n?.pinnedBg??o,s=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:(0,tu.X4)(e.palette.background.default,e.palette.action.disabledOpacity),a="dark"===e.palette.mode?`color-mix(in srgb, ${(e.vars||e).palette.background.paper} 95%, #fff)`:(e.vars||e).palette.background.paper,l=e.vars?`rgb(${e.vars.palette.primary.mainChannel})`:e.palette.primary.main,c=function(e){return e.vars?e.vars.shape.borderRadius:"number"==typeof e.shape.borderRadius?`${e.shape.borderRadius}px`:e.shape.borderRadius}(e),u=e.vars?.font?.body2??sf(e.typography.body2),d=e.vars?.font?.caption??sf(e.typography.caption),h=e.vars?.font?.body1??sf(e.typography.body1),p=g.f.keys;return{[p.spacingUnit]:e.vars?e.vars.spacing??e.spacing(1):e.spacing(1),[p.colors.border.base]:t,[p.colors.background.base]:o,[p.colors.background.overlay]:a,[p.colors.background.backdrop]:s,[p.colors.foreground.base]:(e.vars||e).palette.text.primary,[p.colors.foreground.muted]:(e.vars||e).palette.text.secondary,[p.colors.foreground.accent]:(e.vars||e).palette.primary.dark,[p.colors.foreground.disabled]:(e.vars||e).palette.text.disabled,[p.colors.foreground.error]:(e.vars||e).palette.error.dark,[p.colors.interactive.hover]:(e.vars||e).palette.action.hover,[p.colors.interactive.hoverOpacity]:(e.vars||e).palette.action.hoverOpacity,[p.colors.interactive.focus]:rf((e.vars||e).palette.primary.main),[p.colors.interactive.focusOpacity]:(e.vars||e).palette.action.focusOpacity,[p.colors.interactive.disabled]:rf((e.vars||e).palette.action.disabled),[p.colors.interactive.disabledOpacity]:(e.vars||e).palette.action.disabledOpacity,[p.colors.interactive.selected]:l,[p.colors.interactive.selectedOpacity]:(e.vars||e).palette.action.selectedOpacity,[p.header.background.base]:r,[p.cell.background.pinned]:i,[p.radius.base]:c,[p.typography.fontFamily.base]:e.typography.fontFamily,[p.typography.fontWeight.light]:e.typography.fontWeightLight,[p.typography.fontWeight.regular]:e.typography.fontWeightRegular,[p.typography.fontWeight.medium]:e.typography.fontWeightMedium,[p.typography.fontWeight.bold]:e.typography.fontWeightBold,[p.typography.font.body]:u,[p.typography.font.small]:d,[p.typography.font.large]:h,[p.transitions.easing.easeIn]:e.transitions.easing.easeIn,[p.transitions.easing.easeOut]:e.transitions.easing.easeOut,[p.transitions.easing.easeInOut]:e.transitions.easing.easeInOut,[p.transitions.duration.short]:`${e.transitions.duration.shorter}ms`,[p.transitions.duration.base]:`${e.transitions.duration.short}ms`,[p.transitions.duration.long]:`${e.transitions.duration.standard}ms`,[p.shadows.base]:(e.vars||e).shadows[2],[p.shadows.overlay]:(e.vars||e).shadows[8],[p.zIndex.panel]:(e.vars||e).zIndex.modal,[p.zIndex.menu]:(e.vars||e).zIndex.modal}}(e);return{id:t,variables:n}}),[e])},useGridAriaAttributes:()=>{const e=y(),t=(0,E.A)(),n=(0,b.Nc)(e,j.iv),o=(0,b.Nc)(e,Pn.O7),r=(0,b.Nc)(e,mn),i=(0,b.Nc)(e,Ee.OQ),s=t["aria-label"],a=t["aria-labelledby"];return{role:"grid","aria-label":s||a||!t.label?s:t.label,"aria-labelledby":a,"aria-colcount":n.length,"aria-rowcount":r+1+i+o,"aria-multiselectable":Pr(t)}},useGridRowAriaAttributes:()=>{const e=y(),t=(0,b.Nc)(e,mn);return r.useCallback(((n,o)=>{const r={},i=o+t+2;return r["aria-rowindex"]=i,e.current.isRowSelectable(n.id)&&(r["aria-selected"]=e.current.isRowSelected(n.id)),r}),[e,t])},useCellAggregationResult:()=>null}},hf=function(e,t){const n=(e=>{const t=(0,ca.A)(),n=r.useMemo((()=>(0,ua.A)({props:e,theme:t,name:"MuiDataGrid"})),[t,e]),i=r.useMemo((()=>(0,o.A)({},da,n.localeText)),[n.localeText]),s=r.useMemo((()=>function({defaultSlots:e,slots:t}){const n=t;if(!n||0===Object.keys(n).length)return e;const r=(0,o.A)({},e);return Object.keys(n).forEach((e=>{const t=e;void 0!==n[t]&&(r[t]=n[t])})),r}({defaultSlots:Qp,slots:n.slots})),[n.slots]),a=r.useMemo((()=>Object.keys(ms).reduce(((e,t)=>(e[t]=n[t]??ms[t],e)),{})),[n]);return r.useMemo((()=>(0,o.A)({},n,a,{localeText:i,slots:s},(e=>(0,o.A)({},Yp,e.dataSource?{filterMode:"server",sortingMode:"server",paginationMode:"server"}:{}))(n))),[n,i,s,a])})(e),i=function(e,t){const n=r.useRef(null),o=r.useRef(null);o.current||(o.current=function(e){const t=e.current?.[cf];if(t)return t;const n={},o={state:n,store:lf.create(n),instanceId:{id:uf}};return uf+=1,o.getPublicApi=()=>e.current,o.register=(t,n)=>{Object.keys(n).forEach((r=>{const i=n[r],s=o[r];if(!0===s?.spying?s.target=i:o[r]=i,"public"===t){const t=e.current,n=t[r];!0===n?.spying?n.target=i:t[r]=i}}))},o.register("private",{caches:{},eventManager:new af}),o}(n)),n.current||(n.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[cf]:e.current}}(o));const i=r.useCallback(((...e)=>{const[n,r,i={}]=e;if(i.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(i)&&i.isPropagationStopped())return;const s=t.signature===Tn.DataGridPro||t.signature===Tn.DataGridPremium?{api:o.current.getPublicApi()}:{};o.current.eventManager.emit(n,r,i,s)}),[o,t.signature]),s=r.useCallback(((e,t,n)=>{o.current.eventManager.on(e,t,n);const r=o.current;return()=>{r.eventManager.removeListener(e,t)}}),[o]);return no(o,{subscribeEvent:s,publishEvent:i},"public"),e&&!e.current?.state&&(e.current=n.current),r.useImperativeHandle(e,(()=>n.current),[n]),r.useEffect((()=>{const e=o.current;return()=>{e.publishEvent("unmount")}}),[o]),o}(n.apiRef,n);return la(i,n),(0,M.jsx)(Nr,{privateApiRef:i,configuration:df,props:n,children:(0,M.jsx)(Rr,(0,o.A)({className:n.className,style:n.style,sx:n.sx},n.slotProps?.root,{ref:t}))})},pf=r.memo((0,s.R)(hf));hf.propTypes={apiRef:i.shape({current:i.object}),"aria-label":i.string,"aria-labelledby":i.string,autoHeight:i.bool,autoPageSize:i.bool,autosizeOnMount:i.bool,autosizeOptions:i.shape({columns:i.arrayOf(i.string),disableColumnVirtualization:i.bool,expand:i.bool,includeHeaders:i.bool,includeOutliers:i.bool,outliersFactor:i.number}),cellModesModel:i.object,checkboxSelection:i.bool,classes:i.object,className:i.string,clipboardCopyCellDelimiter:i.string,columnBufferPx:i.number,columnGroupHeaderHeight:i.number,columnGroupingModel:i.arrayOf(i.object),columnHeaderHeight:i.number,columns:i.arrayOf(i.object).isRequired,columnVisibilityModel:i.object,dataSource:i.shape({getRows:i.func.isRequired,updateRow:i.func}),dataSourceCache:i.shape({clear:i.func.isRequired,get:i.func.isRequired,set:i.func.isRequired}),density:i.oneOf(["comfortable","compact","standard"]),disableAutosize:i.bool,disableColumnFilter:i.bool,disableColumnMenu:i.bool,disableColumnResize:i.bool,disableColumnSelector:i.bool,disableColumnSorting:i.bool,disableDensitySelector:i.bool,disableEval:i.bool,disableMultipleRowSelection:i.bool,disableRowSelectionOnClick:i.bool,disableVirtualization:i.bool,editMode:i.oneOf(["cell","row"]),estimatedRowCount:i.number,experimentalFeatures:i.shape({warnIfFocusStateIsNotSynced:i.bool}),filterDebounceMs:i.number,filterMode:i.oneOf(["client","server"]),filterModel:i.shape({items:i.arrayOf(i.shape({field:i.string.isRequired,id:i.oneOfType([i.number,i.string]),operator:i.string.isRequired,value:i.any})).isRequired,logicOperator:i.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:i.bool,quickFilterLogicOperator:i.oneOf(["and","or"]),quickFilterValues:i.array}),getCellClassName:i.func,getDetailPanelContent:i.func,getEstimatedRowHeight:i.func,getRowClassName:i.func,getRowHeight:i.func,getRowId:i.func,getRowSpacing:i.func,hideFooter:i.bool,hideFooterPagination:i.bool,hideFooterSelectedRowCount:i.bool,ignoreDiacritics:i.bool,ignoreValueFormatterDuringExport:i.oneOfType([i.shape({clipboardExport:i.bool,csvExport:i.bool}),i.bool]),initialState:i.object,isCellEditable:i.func,isRowSelectable:i.func,keepNonExistentRowsSelected:i.bool,label:i.string,loading:i.bool,localeText:i.object,logger:i.shape({debug:i.func.isRequired,error:i.func.isRequired,info:i.func.isRequired,warn:i.func.isRequired}),logLevel:i.oneOf(["debug","error","info","warn",!1]),nonce:i.string,onCellClick:i.func,onCellDoubleClick:i.func,onCellEditStart:i.func,onCellEditStop:i.func,onCellKeyDown:i.func,onCellModesModelChange:i.func,onClipboardCopy:i.func,onColumnHeaderClick:i.func,onColumnHeaderContextMenu:i.func,onColumnHeaderDoubleClick:i.func,onColumnHeaderEnter:i.func,onColumnHeaderLeave:i.func,onColumnHeaderOut:i.func,onColumnHeaderOver:i.func,onColumnOrderChange:i.func,onColumnResize:i.func,onColumnVisibilityModelChange:i.func,onColumnWidthChange:i.func,onDataSourceError:i.func,onDensityChange:i.func,onFilterModelChange:i.func,onMenuClose:i.func,onMenuOpen:i.func,onPaginationMetaChange:i.func,onPaginationModelChange:i.func,onPreferencePanelClose:i.func,onPreferencePanelOpen:i.func,onProcessRowUpdateError:i.func,onResize:i.func,onRowClick:i.func,onRowCountChange:i.func,onRowDoubleClick:i.func,onRowEditStart:i.func,onRowEditStop:i.func,onRowModesModelChange:i.func,onRowSelectionModelChange:i.func,onSortModelChange:i.func,onStateChange:i.func,pageSizeOptions:i.arrayOf(i.oneOfType([i.number,i.shape({label:i.string.isRequired,value:i.number.isRequired})]).isRequired),pagination:i.oneOf([!0]),paginationMeta:i.shape({hasNextPage:i.bool}),paginationMode:i.oneOf(["client","server"]),paginationModel:i.shape({page:i.number.isRequired,pageSize:i.number.isRequired}),processRowUpdate:i.func,resizeThrottleMs:i.number,rowBufferPx:i.number,rowCount:i.number,rowHeight:i.number,rowModesModel:i.object,rows:i.arrayOf(i.object),rowSelection:i.bool,rowSelectionModel:i.shape({ids:i.instanceOf(Set).isRequired,type:i.oneOf(["exclude","include"]).isRequired}),rowSpacingType:i.oneOf(["border","margin"]),rowSpanning:i.bool,scrollbarSize:i.number,showCellVerticalBorder:i.bool,showColumnVerticalBorder:i.bool,showToolbar:i.bool,slotProps:i.object,slots:i.object,sortingMode:i.oneOf(["client","server"]),sortingOrder:i.arrayOf(i.oneOf(["asc","desc"])),sortModel:i.arrayOf(i.shape({field:i.string.isRequired,sort:i.oneOf(["asc","desc"])})),style:i.object,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),virtualizeColumnsWithAutoRowHeight:i.bool}},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),r=n(40346);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==o(e)}},45748:(e,t,n)=>{"use strict";n.d(t,{z1:()=>E,cM:()=>m,UA:()=>P,uy:()=>g});var o=n(2616),r=2,i=.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)-r*t:Math.round(e.h)+r*t:n?Math.round(e.h)+r*t:Math.round(e.h)-r*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-i*t:t===u?e.s+i: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 f(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 m(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=new o.Y(e),i=r.toHsv(),s=c;s>0;s-=1){var a=new o.Y({h:h(i,s,!0),s:p(i,s,!0),v:f(i,s,!0)});n.push(a)}n.push(r);for(var l=1;l<=u;l+=1){var m=new o.Y({h:h(i,l),s:p(i,l),v:f(i,l)});n.push(m)}return"dark"===t.theme?d.map((function(e){var r=e.index,i=e.amount;return new o.Y(t.backgroundColor||"#141414").mix(n[r],i).toHexString()})):n.map((function(e){return e.toHexString()}))}var g={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 y=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];y.primary=y[5];var w=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];w.primary=w[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 S=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];S.primary=S[5];var A=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];A.primary=A[5];var E=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];E.primary=E[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 I=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];I.primary=I[5];var P={red:b,volcano:v,orange:y,gold:w,yellow:C,lime:x,green:S,cyan:A,blue:E,geekblue:k,purple:R,magenta:M,grey:I},T=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];T.primary=T[5];var O=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];O.primary=O[5];var $=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];$.primary=$[5];var D=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];D.primary=D[5];var N=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];N.primary=N[5];var L=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];L.primary=L[5];var H=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];H.primary=H[5];var z=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];z.primary=z[5];var F=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];F.primary=F[5];var j=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];j.primary=j[5];var B=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];B.primary=B[5];var _=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];_.primary=_[5];var V=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];V.primary=V[5]},46343:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(19750);function r(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,o.A)(t.components[n].defaultProps,r):r}},46942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.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?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},47195:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var o,r=n(96540),i=n(21362),s=n(98855),a=n(26739),l=n(39241),c=n(74848);const u=(0,a.Ay)("fieldset",{shouldForwardProp:s.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),d=(0,a.Ay)("legend",{shouldForwardProp:s.A})((0,l.A)((({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}))));var h=n(76761),p=n(93583),f=n(1321),m=n(20439),g=n(24890),b=n(79844),v=n(85078);const y=(0,a.Ay)(b.Sh,{shouldForwardProp:e=>(0,s.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:b.WC})((0,l.A)((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${g.A.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${g.A.focused} .${g.A.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter((0,f.A)()).map((([t])=>({props:{color:t},style:{[`&.${g.A.focused} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${g.A.error} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${g.A.disabled} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}}))),w=(0,a.Ay)((function(e){const{children:t,classes:n,className:r,label:i,notched:s,...a}=e,l=null!=i&&""!==i,h={...e,notched:s,withLabel:l};return(0,c.jsx)(u,{"aria-hidden":!0,className:r,ownerState:h,...a,children:(0,c.jsx)(d,{ownerState:h,children:l?(0,c.jsx)("span",{children:i}):o||(o=(0,c.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}),{name:"MuiOutlinedInput",slot:"NotchedOutline"})((0,l.A)((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}))),C=(0,a.Ay)(b.ck,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:b.Oj})((0,l.A)((({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]})))),x=r.forwardRef((function(e,t){const n=(0,m.b)({props:e,name:"MuiOutlinedInput"}),{components:o={},fullWidth:s=!1,inputComponent:a="input",label:l,multiline:u=!1,notched:d,slots:f={},slotProps:x={},type:S="text",...A}=n,E=(e=>{const{classes:t}=e,n=(0,i.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},g.v,t);return{...t,...n}})(n),k=(0,h.A)(),R=(0,p.A)({props:n,muiFormControl:k,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),M={...n,color:R.color||"primary",disabled:R.disabled,error:R.error,focused:R.focused,formControl:k,fullWidth:s,hiddenLabel:R.hiddenLabel,multiline:u,size:R.size,type:S},I=f.root??o.Root??y,P=f.input??o.Input??C,[T,O]=(0,v.A)("notchedOutline",{elementType:w,className:E.notchedOutline,shouldForwardComponentProp:!0,ownerState:M,externalForwardedProps:{slots:f,slotProps:x},additionalProps:{label:null!=l&&""!==l&&R.required?(0,c.jsxs)(r.Fragment,{children:[l," ","*"]}):l}});return(0,c.jsx)(b.Ay,{slots:{root:I,input:P},slotProps:x,renderSuffix:e=>(0,c.jsx)(T,{...O,notched:void 0!==d?d:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:s,inputComponent:a,multiline:u,ref:t,type:S,...A,classes:{...E,notchedOutline:null}})}));x.muiName="Input";const S=x},47211:(e,t,n)=>{"use strict";n.d(t,{OV:()=>c,JR:()=>a,gv:()=>l,Sw:()=>b,FY:()=>u,em:()=>s,Oe:()=>v,U8:()=>y,kw:()=>w,FX:()=>d,iv:()=>h,TI:()=>p,Q1:()=>m});var o=n(92661),r=n(3068);const i=(0,o.gz)((e=>e.isRtl)),s=(0,o.gz)((e=>e.columns)),a=(0,o.Mz)(s,(e=>e.orderedFields)),l=(0,o.Mz)(s,(e=>e.lookup)),c=(0,o.S)(a,l,((e,t)=>e.map((e=>t[e])))),u=(0,o.Mz)(s,(e=>e.columnVisibilityModel)),d=(0,o.Mz)(s,(e=>e.initialColumnVisibilityModel)),h=(0,o.S)(c,u,((e,t)=>e.filter((e=>!1!==t[e.field])))),p=(0,o.S)(h,(e=>e.map((e=>e.field)))),f=(0,o.gz)((e=>e.pinnedColumns)),m=((0,o.S)(f,a,i,((e,t,n)=>g(e,t,n))),(0,o.S)(s,f,p,i,((e,t,n,o)=>{const r=g(t,n,o);return{left:r.left.map((t=>e.lookup[t])),right:r.right.map((t=>e.lookup[t]))}})));function g(e,t,n){if(!Array.isArray(e.left)&&!Array.isArray(e.right))return r.u;if(0===e.left?.length&&0===e.right?.length)return r.u;const o=(e,t)=>Array.isArray(e)?e.filter((e=>t.includes(e))):[],i=o(e.left,t),s=t.filter((e=>!i.includes(e))),a=o(e.right,s);return n?{left:a,right:i}:{left:i,right:a}}const b=(0,o.S)(h,(e=>{const t=[];let n=0;for(let o=0;o<e.length;o+=1)t.push(n),n+=e[o].computedWidth;return t})),v=(0,o.S)(c,(e=>e.filter((e=>e.filterable)))),y=(0,o.S)(c,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{}))),w=(0,o.S)(c,(e=>e.some((e=>void 0!==e.colSpan))))},47510:(e,t,n)=>{"use strict";n.d(t,{K:()=>_e});var o=n(58168),r=n(98587),i=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),f=n(1321),m=n(49565),g=n(96148),b=n(1908);function v(e){return(0,b.Ay)("MuiAlert",e)}const y=(0,g.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 w=n(37768),C=n(9792),x=n(74848);const S=(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"),A=(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"),E=(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)(m.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,f.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),[`& .${y.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}}}))),...Object.entries(e.palette).filter((0,f.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}`,[`& .${y.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}}))),...Object.entries(e.palette).filter((0,f.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)}}})))]}}))),I=(0,c.Ay)("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),P=(0,c.Ay)("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),T=(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)(S,{fontSize:"inherit"}),warning:(0,x.jsx)(A,{fontSize:"inherit"}),error:(0,x.jsx)(E,{fontSize:"inherit"}),info:(0,x.jsx)(k,{fontSize:"inherit"})},$=i.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiAlert"}),{action:o,children:r,className:i,closeText:l="Close",color:c,components:u={},componentsProps:f={},icon:m,iconMapping:g=O,onClose:b,role:y="alert",severity:C="success",slotProps:S={},slots:A={},variant:E="standard",...k}=n,$={...n,color:c,severity:C,variant:E,colorSeverity:c||C},D=(e=>{const{variant:t,color:n,severity:o,classes:r}=e,i={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)(i,v,r)})($),N={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...A},slotProps:{...f,...S}},[L,H]=(0,h.A)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,s.A)(D.root,i),elementType:M,externalForwardedProps:{...N,...k},ownerState:$,additionalProps:{role:y,elevation:0}}),[z,F]=(0,h.A)("icon",{className:D.icon,elementType:I,externalForwardedProps:N,ownerState:$}),[j,B]=(0,h.A)("message",{className:D.message,elementType:P,externalForwardedProps:N,ownerState:$}),[_,V]=(0,h.A)("action",{className:D.action,elementType:T,externalForwardedProps:N,ownerState:$}),[W,G]=(0,h.A)("closeButton",{elementType:w.A,externalForwardedProps:N,ownerState:$}),[K,U]=(0,h.A)("closeIcon",{elementType:R.A,externalForwardedProps:N,ownerState:$});return(0,x.jsxs)(L,{...H,children:[!1!==m?(0,x.jsx)(z,{...F,children:m||g[C]||O[C]}):null,(0,x.jsx)(j,{...B,children:r}),null!=o?(0,x.jsx)(_,{...V,children:o}):null,null==o&&b?(0,x.jsx)(_,{...V,children:(0,x.jsx)(W,{size:"small","aria-label":l,title:l,color:"inherit",onClick:b,...G,children:(0,x.jsx)(K,{fontSize:"small",...U})})}):null]})}));var D=n(35124),N=n(53948);function L(e){return(0,b.Ay)("MuiRichTreeView",e)}(0,g.A)("MuiRichTreeView",["root","item","itemContent","itemGroupTransition","itemIconContainer","itemLabel","itemCheckbox","itemLabelInput"]);var H=n(9553),z=n(24902);class F{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()),r=Array.from(n.regular.keys());for(let e=o.length-1;e>=0;e-=1){const r=o[e];n.highPriority.has(r)&&r.apply(this,t)}for(let e=0;e<r.length;e+=1){const o=r[e];n.regular.has(o)&&o.apply(this,t)}}once(e,t){const n=this;this.on(e,(function o(...r){n.removeListener(e,o),t.apply(n,r)}))}}const j=()=>{const[e]=i.useState((()=>new F));return{instance:{$$publishEvent:i.useCallback(((...t)=>{const[n,o,r={}]=t;r.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(r)&&r.isPropagationStopped()||e.emit(n,o,r)}),[e]),$$subscribeEvent:i.useCallback(((t,n)=>(e.on(t,n),()=>{e.removeListener(t,n)})),[e])}}};j.params={};const B=({plugins:e})=>{const t=new Set(e);return{instance:{getAvailablePlugins:()=>t}}};B.params={};var _=n(29401),V=n(25149),W=n(80886);const G=({params:e,store:t})=>{i.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,W.Y)()})})))}),[t,e.id]);const n=(0,_.d)(t,V.U);return{getRootProps:()=>({id:n})}};G.params={id:!0},G.getInitialState=({id:e})=>({id:{treeId:void 0,providedTreeId:e}});const K=[j,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 X=0;var Y=n(29677),Q=n(19268);const J={};function Z(e){const{contextValue:t,classes:n=J,slots:o=J,slotProps:r=J,children:s}=e,a=i.useMemo((()=>({classes:n,slots:{collapseIcon:o.collapseIcon,expandIcon:o.expandIcon,endIcon:o.endIcon},slotProps:{collapseIcon:r.collapseIcon,expandIcon:r.expandIcon,endIcon:r.endIcon}})),[n,o.collapseIcon,o.expandIcon,o.endIcon,r.collapseIcon,r.expandIcon,r.endIcon]);return(0,x.jsx)(Y.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),re=n(10786);const ie=({disabledItemsFocusable:e,items:t,isItemDisabled:n,getItemLabel:o,getItemChildren:r,getItemId:i,initialDepth:s=0,initialParentId:a=null,getChildrenCount:l,ignoreChildren:c=!1})=>{const u={},d={},h={[ne.T2]:[]},p=(e,t,s)=>{const a=i?i(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 f=o?o(e):e.label;if(null==f)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 m=r?r(e):e.children;u[a]={id:a,label:f,parentId:s,idAttribute:void 0,expandable:l?l(e)>0:!!m?.length,disabled:!!n&&n(e),depth:t},d[a]=e;const g=s??ne.T2;h[g]||(h[g]=[]),h[g].push(a),c||m?.forEach((e=>p(e,t+1,a)))};t?.forEach((e=>p(e,s,a)));const f={};return Object.keys(h).forEach((e=>{f[e]=(0,ne.vB)(h[e])})),{disabledItemsFocusable:e,itemMetaLookup:u,itemModelLookup:d,itemOrderedChildrenIdsLookup:h,itemChildrenIndexesLookup:f}},se=({instance:e,params:t,store:n})=>{const r=i.useCallback((e=>(0,re.EJ)(n.value,e)),[n]),s=i.useCallback((e=>{const t=(0,re.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 r=(0,o.A)({},n.items.itemMetaLookup);return r[e]=(0,o.A)({},r[e],{disabled:t??!r[e].disabled}),(0,o.A)({},n,{items:(0,o.A)({},n.items,{itemMetaLookup:r})})}))})),u=i.useCallback((()=>{const e=t=>{const o=(0,re.EJ)(n.value,t),r=(0,re.p1)(n.value,t);return r.length>0?o.children=r.map(e):delete o.children,o};return(0,re.p1)(n.value,null).map(e)}),[n]),d=i.useCallback((e=>(0,re.p1)(n.value,e)),[n]),h=e=>{const t=(0,re.uP)(n.value,e);if(null==t)return null;const o=(0,W.Q)({treeId:(0,V.U)(n.value),itemId:e,id:t.idAttribute});return document.getElementById(o)},p=i.useRef(!1),f=i.useCallback((()=>{p.current=!0}),[]),m=i.useCallback((()=>p.current),[]);return i.useEffect((()=>{e.areItemUpdatesPrevented()||n.update((n=>{const r=ie({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=>{r.itemMetaLookup[t.id]||te(e,"removeItem",{id:t.id})})),(0,o.A)({},n,{items:(0,o.A)({},n.items,r)})}))}),[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:r,getItemDOMElement:h,getItemTree:u,getItemOrderedChildrenIds:d,setIsItemDisabled:c,getParentId:s},instance:{getItemDOMElement:h,preventItemUpdates:f,areItemUpdatesPrevented:m,addItems:({items:r,parentId:i,depth:s,getChildrenCount:a})=>{if(r){const l=ie({disabledItemsFocusable:t.disabledItemsFocusable,items:r,isItemDisabled:t.isItemDisabled,getItemId:t.getItemId,getItemLabel:t.getItemLabel,getItemChildren:t.getItemChildren,getChildrenCount:a,initialDepth:s,initialParentId:i,ignoreChildren:!0});n.update((t=>{let n;return n=i?{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 r=Object.keys(n.items.itemMetaLookup).reduce(((r,i)=>{const s=n.items.itemMetaLookup[i];return s.parentId===t?(te(e,"removeItem",{id:s.id}),r):(0,o.A)({},r,{[s.id]:s})}),{}),i=n.items.itemOrderedChildrenIdsLookup,s=n.items.itemChildrenIndexesLookup;return delete s[t],delete i[t],(0,o.A)({},n,{items:(0,o.A)({},n.items,{itemMetaLookup:r,itemOrderedChildrenIdsLookup:i,itemChildrenIndexesLookup:s})})}))},handleItemClick:(0,ee.A)(((e,n)=>{t.onItemClick&&t.onItemClick(e,n)}))}}};se.getInitialState=e=>({items:(0,o.A)({},ie({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:re.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 r=(e,r)=>{void 0===n.expandedItems&&t.update((e=>(0,o.A)({},e,{expansion:(0,o.A)({},e.expansion,{expandedItems:r})}))),n.onExpandedItemsChange?.(e,r)},i=(0,ee.A)((({itemId:e,event:o,shouldBeExpanded:i})=>{const s=(0,le.l$)(t.value);let a;a=i?[e].concat(s):s.filter((t=>t!==e)),n.onItemExpansionToggle&&n.onItemExpansionToggle(o,e,i),r(o,a)})),s=(0,ee.A)((({itemId:n,event:o=null,shouldBeExpanded:r})=>{const i=(0,le.QQ)(t.value,n),s=r??!i;if(i===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:i,expandAllSiblings:(e,o)=>{const i=(0,re.uP)(t.value,o);if(null==i)return;const s=(0,re.p1)(t.value,i.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)})),r(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 fe=e=>{const t={};return e.forEach((e=>{t[e]=!0})),t},me=({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)))}},ge=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,!ge(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,re.p1)(e,t).length)return{disabled:!o,visible:n,indeterminate:!1,checked:!1};let r=!1,i=!1;const s=n=>{n!==t&&((0,pe.cs)(e,n)?r=!0:i=!0),(0,re.p1)(e,n).forEach(s)};return s(t),{disabled:!o,visible:n,indeterminate:r&&i,checked:!!(0,pe.Fj)(e).parents&&r&&!i}}const ye=({store:e,params:t})=>{t.selectedItems,t.defaultSelectedItems;const n=i.useRef(null),r=i.useRef({}),s=(n,r,i)=>{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:r})=>{if(!t.descendants&&!t.parents)return n;let i=!1;const s=fe(n),a=me({store:e,newModel:n,oldModel:o});return r?.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&&(i=!0,s[o]=!0),(0,re.p1)(e.value,o).forEach(t)};t(n)}if(t.parents){const t=n=>!!s[n]&&(0,re.p1)(e.value,n).every(t),o=n=>{const r=(0,re.YW)(e.value,n);null!=r&&(0,re.p1)(e.value,r).every(t)&&(i=!0,s[r]=!0,o(r))};o(n)}})),a.removed.forEach((n=>{if(t.parents){let t=(0,re.YW)(e.value,n);for(;null!=t;)s[t]&&(i=!0,delete s[t]),t=(0,re.YW)(e.value,t)}if(t.descendants){const t=o=>{o!==n&&(i=!0,delete s[o]),(0,re.p1)(e.value,o).forEach(t)};t(n)}})),i?Object.keys(s):n})({store:e,selectionPropagation:t.selectionPropagation,newModel:r,oldModel:s,additionalItemsToPropagate:i}):r,t.onItemSelectionToggle)if(l){const o=me({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:i=!1,shouldBeSelected:a})=>{if(!(0,pe.BF)(e.value))return;let l;const c=(0,pe.UK)(e.value);if(i){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,r.current={}},l=(t,[n,o])=>{if(!(0,pe.UK)(e.value))return;let i=(0,pe.Go)(e.value).slice();Object.keys(r.current).length>0&&(i=i.filter((e=>!r.current[e])));const a=fe(i),l=(0,he.c2)(e.value,n,o),c=l.filter((e=>!a[e]));i=i.concat(c),s(t,i),r.current=fe(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),r.current=fe(n)},expandSelectionRange:(t,o)=>{if(null!=n.current){const[r,i]=(0,he.XR)(e.value,o,n.current);l(t,[r,i])}},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 i=(0,pe.Go)(e.value).slice();0===Object.keys(r.current).length?(i.push(o),r.current={[n]:!0,[o]:!0}):(r.current[n]||(r.current={}),r.current[o]?(i=i.filter((e=>e!==n)),delete r.current[n]):(i.push(o),r.current[o]=!0)),s(t,i)}}}};ye.itemPlugin=({props:e})=>{const{itemId:t}=e,{store:n}=(0,Y.i)(),r=(0,_.d)(n,ve,t,be);return{propsEnhancers:{checkbox:({externalEventHandlers:e,interactions:i})=>(0,o.A)({tabIndex:-1,onChange:o=>{e.onChange?.(o),o.defaultMuiPrevented||(0,pe.AJ)(n.value,t)&&i.handleCheckboxSelection(o)}},r)}}};const we=[],Ce={};ye.applyDefaultValuesToParams=({params:e})=>(0,o.A)({},e,{disableSelection:e.disableSelection??!1,multiSelect:e.multiSelect??!1,checkboxSelection:e.checkboxSelection??!1,defaultSelectedItems:e.defaultSelectedItems??(e.multiSelect?we:null),selectionPropagation:e.selectionPropagation??Ce}),ye.getInitialState=e=>({selection:{selectedItems:void 0===e.selectedItems?e.defaultSelectedItems:e.selectedItems,isEnabled:!e.disableSelection,isMultiSelectEnabled:e.multiSelect,isCheckboxSelectionEnabled:e.checkboxSelection,selectionPropagation:e.selectionPropagation}}),ye.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 Se{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 Ae{}const Ee=function(e){let t=0;return function(n,o,r){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new Se:new xe);const[s]=i.useState(new Ae),a=i.useRef(null),l=i.useRef(void 0);l.current=r;const c=i.useRef(null);if(!a.current&&l.current){const r=(e,t)=>{t.defaultMuiPrevented||l.current?.(e,t)};a.current=n.$$subscribeEvent(o,r),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));i.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 r=(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})})))})),i=(n,o)=>{const i=e.getItemDOMElement(o);i&&i.focus(),r(o),t.onItemFocus&&t.onItemFocus(n,o)},s=(0,ee.A)(((e,t)=>{(e=>{const t=(0,re.uP)(n.value,e);return t&&(null==t.parentId||(0,le.QQ)(n.value,t.parentId))})(t)&&i(e,t)})),a=(0,ee.A)((()=>{const t=(0,ke.L6)(n.value);if(null!=t){if((0,re.uP)(n.value,t)){const n=e.getItemDOMElement(t);n&&n.blur()}r(null)}}));Ee(e,"removeItem",(({id:e})=>{const t=(0,ke.L6)(n.value),o=(0,ke.hc)(n.value);t===e&&null!=o&&i(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&&i(t,o)},c=e=>t=>{e.onBlur?.(t),t.defaultMuiPrevented||r(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),Ie=n(65658),Pe=n(41519),Te=n(81326);const Oe=({instance:e,store:t,params:n})=>{const o=(0,Me.I)(),r=i.useRef({}),s=(0,ee.A)((e=>{r.current=e(r.current)})),a=(0,_.d)(t,re.Ks);i.useEffect((()=>{if(e.areItemUpdatesPrevented())return;const t={};Object.values(a).forEach((e=>{t[e.id]=e.label.substring(0,1).toLowerCase()})),r.current=t}),[a,n.getItemId,e]);const l=e=>(0,pe.BF)(t.value)&&!(0,re.lj)(t.value,e),c=e=>!(0,re.lj)(t.value,e)&&(0,le.Rt)(t.value,e);return{instance:{updateFirstCharMap:s,handleItemKeyDown:async(n,i)=>{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(i):n.preventDefault(),u&&n.shiftKey?e.expandSelectionRange(n,i):e.setItemSelection({event:n,itemId:i,keepExistingSelection:u,shouldBeSelected:void 0});break;case"Enter"===a:(0,Ie.M)(e,Pe.j)&&(0,Te.pF)(t.value,i)&&!(0,Te.XG)(t.value,i)?e.setEditedItem(i):c(i)?(e.setItemExpansion({event:n,itemId:i}),n.preventDefault()):l(i)&&(u?(n.preventDefault(),e.setItemSelection({event:n,itemId:i,keepExistingSelection:!0})):(0,pe.cs)(t.value,i)||(e.setItemSelection({event:n,itemId:i}),n.preventDefault()));break;case"ArrowDown"===a:{const o=(0,he.ig)(t.value,i);o&&(n.preventDefault(),e.focusItem(n,o),u&&n.shiftKey&&l(o)&&e.selectItemFromArrowNavigation(n,i,o));break}case"ArrowUp"===a:{const o=(0,he.eI)(t.value,i);o&&(n.preventDefault(),e.focusItem(n,o),u&&n.shiftKey&&l(o)&&e.selectItemFromArrowNavigation(n,i,o));break}case"ArrowRight"===a&&!o||"ArrowLeft"===a&&o:if(s)return;if((0,le.QQ)(t.value,i)){const o=(0,he.ig)(t.value,i);o&&(e.focusItem(n,o),n.preventDefault())}else c(i)&&(e.setItemExpansion({event:n,itemId:i}),n.preventDefault());break;case"ArrowLeft"===a&&!o||"ArrowRight"===a&&o:if(s)return;if(c(i)&&(0,le.QQ)(t.value,i))e.setItemExpansion({event:n,itemId:i}),n.preventDefault();else{const o=(0,re.YW)(t.value,i);o&&(e.focusItem(n,o),n.preventDefault())}break;case"Home"===a:l(i)&&u&&s&&n.shiftKey?e.selectRangeFromStartToItem(n,i):e.focusItem(n,(0,he.F1)(t.value)),n.preventDefault();break;case"End"===a:l(i)&&u&&s&&n.shiftKey?e.selectRangeFromItemToEnd(n,i):e.focusItem(n,(0,he.HG)(t.value)),n.preventDefault();break;case"*"===a:e.expandAllSiblings(n,i),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(),i=e=>{const n=(0,he.ig)(t.value,e);return null===n?(0,he.F1)(t.value):n};let s=null,a=i(e);const l={};for(;null==s&&!l[a];)r.current[a]===o?s=a:(l[a]=!0,a=i(a));return s})(i,a);null!=o&&(e.focusItem(n,o),n.preventDefault());break}}var d}}}};Oe.params={};const $e=[se,ue,ye,Re,Oe,Pe.j];var De=n(63543);const Ne=["ownerState"],Le=i.createContext(null),He=i.memo((function({itemSlot:e,itemSlotProps:t,itemId:n}){const s=i.useContext(Le),{store:a}=(0,Y.i)(),l=(0,_.d)(a,re.uP,n),c=(0,_.d)(a,re.p1,n),u=e??De.yh,d=(0,N.A)({elementType:u,externalSlotProps:t,additionalProps:{label:l?.label,id:l?.idAttribute,itemId:n},ownerState:{itemId:n,label:l?.label}}),h=(0,r.A)(d,Ne);return(0,x.jsx)(u,(0,o.A)({},h,{children:c?.map(s)}))}),be);function ze(e){const{slots:t,slotProps:n}=e,{store:o}=(0,Y.i)(),r=t?.item,s=n?.item,a=(0,_.d)(o,re.p1,null),l=i.useCallback((e=>(0,x.jsx)(He,{itemSlot:r,itemSlotProps:s,itemId:e},e)),[r,s]);return(0,x.jsx)(Le.Provider,{value:l,children:a.map(l)})}const Fe=["slots","slotProps"],je=(0,H.h)("MuiRichTreeView"),Be=(0,c.Ay)("ul",{name:"MuiRichTreeView",slot:"Root"})({padding:0,margin:0,listStyle:"none",outline:0,position:"relative"}),_e=i.forwardRef((function(e,t){const n=je({props:e,name:"MuiRichTreeView"}),{slots:s,slotProps:l}=n,c=(0,r.A)(n,Fe),{getRootProps:u,contextValue:d}=(({plugins:e,rootRef:t,props:n})=>{const s=i.useMemo((()=>[...K,...e]),[e]),{pluginParams:a,forwardedProps:l,apiRef:c}=(e=>{let{props:{apiRef:t},plugins:n}=e,o=(0,r.A)(e.props,U);const s=i.useMemo((()=>{const e={};return n.forEach((t=>{Object.assign(e,t.params)})),e}),[n]),{forwardedProps:a,pluginParams:l}=i.useMemo((()=>{const e={},t={};Object.keys(o).forEach((n=>{const r=o[n];s[n]?e[n]=r:t[n]=r}));const r=n.reduce(((e,t)=>t.applyDefaultValuesToParams?t.applyDefaultValuesToParams({params:e}):e),e);return{forwardedProps:t,pluginParams:r}}),[n,o,s]);return{forwardedProps:a,pluginParams:l,apiRef:t}})({plugins:s,props:n}),u=i.useRef({}).current,d=function(e){const t=i.useRef({});return e?function(e){return null==e.current&&(e.current={}),e}(e):t}(c),h=i.useRef(null),p=(0,z.A)(h,t),f=i.useRef(null);if(null==f.current){X+=1;const e={cacheKey:{id:X}};s.forEach((t=>{t.getInitialState&&Object.assign(e,t.getInitialState(a))})),f.current=new q(e)}const m=(e=>{const{plugins:t,instance:n,publicAPI:o,store:r,rootRef:s}=e,a=i.useCallback((e=>{let n=null,o=null;const r=[],i={};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&&(r.push(s.propsEnhancers),Object.keys(s.propsEnhancers).forEach((e=>{i[e]=!0})))}));const s=Object.fromEntries(Object.keys(i).map((e=>{return[e,(t=e,e=>{const n={};return r.forEach((o=>{const r=o[t];null!=r&&Object.assign(n,r(e))})),n})];var t})));return{contentRef:o,rootRef:n,propsEnhancers:s}}),[t]),l=i.useCallback((({itemId:e,children:o,idAttribute:r})=>{let i=o;for(let o=t.length-1;o>=0;o-=1){const s=t[o];s.wrapItem&&(i=s.wrapItem({instance:n,itemId:e,children:i,idAttribute:r}))}return i}),[t,n]),c=i.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 i.useMemo((()=>({runItemPlugins:a,wrapItem:l,wrapRoot:c,instance:n,publicAPI:o,store:r,rootRef:s})),[a,l,c,n,o,r,s])})({plugins:s,instance:u,publicAPI:d.current,store:f.current,rootRef:h}),g=[];return s.forEach((e=>{const t=e({instance:u,params:a,rootRef:h,plugins:s,store:f.current});t.getRootProps&&g.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 g.forEach((n=>{Object.assign(t,n(e))})),t},rootRef:p,contextValue:m}})({plugins:$e,rootRef:t,props:c}),h=(0,_.d)(d.store,re.DW),p=(0,_.d)(d.store,re.nt),f=(e=>{const{classes:t}=e;return i.useMemo((()=>(0,a.A)({root:["root"],item:["item"],itemContent:["itemContent"],itemGroupTransition:["itemGroupTransition"],itemIconContainer:["itemIconContainer"],itemLabel:["itemLabel"],itemLabelInput:["itemLabelInput"],itemCheckbox:["itemCheckbox"]},L,t)),[t])})(n),m=s?.root??Be,g=(0,N.A)({elementType:m,externalSlotProps:l?.root,className:f.root,getSlotProps:u,ownerState:n});return h?(0,x.jsx)(D.A,{children:"Loading..."}):p?(0,x.jsx)($,{severity:"error",children:p.message}):(0,x.jsx)(Z,{contextValue:d,classes:f,slots:s,slotProps:l,children:(0,x.jsx)(m,(0,o.A)({},g,{children:(0,x.jsx)(ze,{slots:s,slotProps:l})}))})}))},48224:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,c:()=>i});var o=n(96540);const r=o.createContext(void 0),i=({children:e,size:t})=>{const n=o.useContext(r);return o.createElement(r.Provider,{value:t||n},e)},s=r},48646:(e,t,n)=>{"use strict";var o=n(69565),r=n(28551),i=n(1767),s=n(50851);e.exports=function(e,t){t&&"string"==typeof e||r(e);var n=s(e);return i(r(void 0!==n?o(n,e):e))}},49450:(e,t,n)=>{"use strict";function o(e){try{return e.matches(":focus-visible")}catch(e){}return!1}n.d(t,{A:()=>o})},49565:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var o=n(96540),r=n(34164),i=n(21362),s=n(82777),a=n(26739),l=n(53356),c=n(39241),u=n(20439),d=n(34578),h=n(96148),p=n(1908);function f(e){return(0,p.Ay)("MuiPaper",e)}(0,h.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(74848);const g=(0,a.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((0,c.A)((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]})))),b=o.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiPaper"}),o=(0,l.A)(),{className:a,component:c="div",elevation:h=1,square:p=!1,variant:b="elevation",...v}=n,y={...n,component:c,elevation:h,square:p,variant:b},w=(e=>{const{square:t,elevation:n,variant:o,classes:r}=e,s={root:["root",o,!t&&"rounded","elevation"===o&&`elevation${n}`]};return(0,i.A)(s,f,r)})(y);return(0,m.jsx)(g,{as:c,ownerState:y,className:(0,r.A)(w.root,a),ref:t,...v,style:{..."elevation"===b&&{"--Paper-shadow":(o.vars||o).shadows[h],...o.vars&&{"--Paper-overlay":o.vars.overlays?.[h]},...!o.vars&&"dark"===o.palette.mode&&{"--Paper-overlay":`linear-gradient(${(0,s.X4)("#fff",(0,d.A)(h))}, ${(0,s.X4)("#fff",(0,d.A)(h))})`}},...v.style}})}))},49640:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(53954),r=n(52176),i=n(82284),s=n(9417);function a(e){var t=(0,r.A)();return function(){var n,r=(0,o.A)(e);if(t){var a=(0,o.A)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==(0,i.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)}}},49649:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>b,HX:()=>v,tT:()=>w});var o=n(58168),r=n(24684),i=n(43174),s=n(71287),a=n(30041),l=n(96540),c=n(36289),u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=(0,c.A)((function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),h=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?d:h},f=function(e,t,n){var o;if(t){var r=t.shouldForwardProp;o=e.__emotion_forwardProp&&r?function(t){return e.__emotion_forwardProp(t)&&r(t)}:r}return"function"!=typeof o&&n&&(o=e.__emotion_forwardProp),o},m=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return(0,a.SF)(t,n,o),(0,s.s)((function(){return(0,a.sk)(t,n,o)})),null},g=function e(t,n){var s,c,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==n&&(s=n.label,c=n.target);var h=f(t,n,u),g=h||p(d),b=!g("as");return function(){var v=arguments,y=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==s&&y.push("label:"+s+";"),null==v[0]||void 0===v[0].raw)y.push.apply(y,v);else{var w=v[0];y.push(w[0]);for(var C=v.length,x=1;x<C;x++)y.push(v[x],w[x])}var S=(0,r.w)((function(e,t,n){var o=b&&e.as||d,s="",u=[],f=e;if(null==e.theme){for(var v in f={},e)f[v]=e[v];f.theme=l.useContext(r.T)}"string"==typeof e.className?s=(0,a.Rk)(t.registered,u,e.className):null!=e.className&&(s=e.className+" ");var w=(0,i.J)(y.concat(u),t.registered,f);s+=t.key+"-"+w.name,void 0!==c&&(s+=" "+c);var C=b&&void 0===h?p(o):g,x={};for(var S in e)b&&"as"===S||C(S)&&(x[S]=e[S]);return x.className=s,n&&(x.ref=n),l.createElement(l.Fragment,null,l.createElement(m,{cache:t,serialized:w,isStringTag:"string"==typeof o}),l.createElement(o,x))}));return S.displayName=void 0!==s?s:"Styled("+("string"==typeof d?d:d.displayName||d.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=d,S.__emotion_styles=y,S.__emotion_forwardProp=h,Object.defineProperty(S,"toString",{value:function(){return"."+c}}),S.withComponent=function(t,r){return e(t,(0,o.A)({},n,r,{shouldForwardProp:f(S,r,!0)})).apply(void 0,y)},S}}.bind(null);function b(e,t){return g(e,t)}function v(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){g[e]=g(e)}));const y=[];function w(e){return y[0]=e,(0,i.J)(y)}},49806:(e,t,n)=>{"use strict";n.d(t,{sb:()=>i,vG:()=>s});var o=n(96540),r=n(50723);const i={token:r.A,override:{override:r.A},hashed:!0},s=o.createContext(i)},49900:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(836);const r=function(e,t){return t?(0,o.A)(e,t,{clone:!1}):e}},49945:(e,t,n)=>{"use strict";n.d(t,{X:()=>p});var o=n(58168),r=n(98587),i=n(96540),s=n(24902),a=n(51280),l=n(25054),c=n(77866),u=n(43203),d=n(74848);const h=["render","className","slotProps","onKeyDown","onChange"],p=(0,a.R)((function(e,t){const{render:n,className:a,slotProps:p,onKeyDown:f,onChange:m}=e,g=(0,r.A)(e,h),b=(0,c.A)(),{state:v,controlId:y,controlRef:w,onValueChange:C,onExpandedChange:x,clearValue:S}=(0,u.q)(),A="function"==typeof a?a(v):a,E=(0,s.A)(w,t),k=(0,l._)(b.slots.baseTextField,n,(0,o.A)({},b.slotProps?.baseTextField,{slotProps:(0,o.A)({htmlInput:(0,o.A)({role:"searchbox",id:y,tabIndex:v.expanded?void 0:-1},p?.htmlInput,{onBlur:e=>{""===v.value&&x(!1),p?.htmlInput?.onBlur?.(e)}})},p),value:v.value,className:A},g,{onChange:e=>{v.expanded||x(!0),C(e),m?.(e)},onKeyDown:e=>{"Escape"===e.key&&(""===v.value?x(!1):S()),f?.(e)},ref:E}),v);return(0,d.jsx)(i.Fragment,{children:k})}))},50723:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,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"},r=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})},51280:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var o=n(96540),r=n(26630);const i=e=>{if(r.A>=19){const t=t=>e(t,t.ref??null);return t.displayName=e.displayName??e.name,t}return o.forwardRef(e)}},51873:(e,t,n)=>{var o=n(9325).Symbol;e.exports=o},52044:(e,t,n)=>{"use strict";function o(e,t=166){let n;function o(...o){clearTimeout(n),n=setTimeout((()=>{e.apply(this,o)}),t)}return o.clear=()=>{clearTimeout(n)},o}n.d(t,{A:()=>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})},52504:(e,t,n)=>{"use strict";n.d(t,{f:()=>a});var o=n(58168);const r={values:{xs:0,sm:600,md:900,lg:1200,xl:1536},up:e=>{const t=r.values;return`@media (min-width:${"number"==typeof t[e]?t[e]:e}px)`}},i={spacingUnit:"--DataGrid-t-spacing-unit",colors:{border:{base:"--DataGrid-t-color-border-base"},foreground:{base:"--DataGrid-t-color-foreground-base",muted:"--DataGrid-t-color-foreground-muted",accent:"--DataGrid-t-color-foreground-accent",disabled:"--DataGrid-t-color-foreground-disabled",error:"--DataGrid-t-color-foreground-error"},background:{base:"--DataGrid-t-color-background-base",overlay:"--DataGrid-t-color-background-overlay",backdrop:"--DataGrid-t-color-background-backdrop"},interactive:{hover:"--DataGrid-t-color-interactive-hover",hoverOpacity:"--DataGrid-t-color-interactive-hover-opacity",focus:"--DataGrid-t-color-interactive-focus",focusOpacity:"--DataGrid-t-color-interactive-focus-opacity",disabled:"--DataGrid-t-color-interactive-disabled",disabledOpacity:"--DataGrid-t-color-interactive-disabled-opacity",selected:"--DataGrid-t-color-interactive-selected",selectedOpacity:"--DataGrid-t-color-interactive-selected-opacity"}},header:{background:{base:"--DataGrid-t-header-background-base"}},cell:{background:{pinned:"--DataGrid-t-cell-background-pinned"}},radius:{base:"--DataGrid-t-radius-base"},typography:{font:{body:"--DataGrid-t-typography-font-body",small:"--DataGrid-t-typography-font-small",large:"--DataGrid-t-typography-font-large"},fontFamily:{base:"--DataGrid-t-typography-font-family-base"},fontWeight:{light:"--DataGrid-t-typography-font-weight-light",regular:"--DataGrid-t-typography-font-weight-regular",medium:"--DataGrid-t-typography-font-weight-medium",bold:"--DataGrid-t-typography-font-weight-bold"}},transitions:{easing:{easeIn:"--DataGrid-t-transition-easing-ease-in",easeOut:"--DataGrid-t-transition-easing-ease-out",easeInOut:"--DataGrid-t-transition-easing-ease-in-out"},duration:{short:"--DataGrid-t-transition-duration-short",base:"--DataGrid-t-transition-duration-base",long:"--DataGrid-t-transition-duration-long"}},shadows:{base:"--DataGrid-t-shadow-base",overlay:"--DataGrid-t-shadow-overlay"},zIndex:{panel:"--DataGrid-t-z-index-panel",menu:"--DataGrid-t-z-index-menu"}},s=function e(t){if("string"==typeof t)return`var(${t})`;const n={};for(const o in t)Object.hasOwn(t,o)&&(n[o]=e(t[o]));return n}(i),a=(0,o.A)({breakpoints:r,spacing:function(e,t,n,o){return void 0===e?l(1):void 0===t?l(e):void 0===n?l(e)+" "+l(t):void 0===o?l(e)+" "+l(t)+" "+l(n):l(e)+" "+l(t)+" "+l(n)+" "+l(o)},transition:function(e,t){const{duration:n=a.transitions.duration.base,easing:o=a.transitions.easing.easeInOut,delay:r=0}=t??{};return e.map((e=>`${e} ${n} ${o} ${r}ms`)).join(", ")},keys:i},s);function l(e){return 0===e?"0":`calc(var(--DataGrid-t-spacing-unit) * ${e})`}},52658:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}},52764:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(9792),r=n(74848);const i=(0,o.A)((0,r.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")},53172:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(96540);const r=[];function i(e){o.useEffect(e,r)}},53356:(e,t,n)=>{"use strict";n.d(t,{A:()=>s}),n(96540);var o=n(14921),r=n(4894),i=n(31355);function s(){const e=(0,o.A)(r.A);return e[i.A]||e}},53830:(e,t,n)=>{"use strict";n.d(t,{A:()=>S});var o=n(96540),r=n(34164),i=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),f=n(74848);const m=(0,d.A)(),g=(0,l.A)("div",{name:"MuiStack",slot:"Root"});function b(e){return(0,c.A)({props:e,name:"MuiStack",defaultTheme:m})}function v(e,t){const n=o.Children.toArray(e).filter(Boolean);return n.reduce(((e,r,i)=>(e.push(r),i<n.length-1&&e.push(o.cloneElement(t,{key:`separator-${i}`})),e)),[])}const y=({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),r=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:r}),a=(0,h.kW)({values:e.spacing,base:r});"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${r=n?s[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[r]}`]:(0,p._W)(o,t)}};var r};n=(0,i.A)(n,(0,h.NI)({theme:t},a,l))}return n=(0,h.iZ)(t.breakpoints,n),n};var w=n(26739),C=n(20439);const x=function(e={}){const{createStyledComponent:t=g,useThemeProps:n=b,componentName:i="MuiStack"}=e,l=t(y),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:m,children:g,className:b,useFlexGap:y=!1,...w}=c,C={direction:h,spacing:p,useFlexGap:y},x=(0,a.A)({root:["root"]},(e=>(0,s.Ay)(i,e)),{});return(0,f.jsx)(l,{as:d,ownerState:C,ref:t,className:(0,r.A)(x.root,b),...w,children:m?v(g,m):g})}));return c}({createStyledComponent:(0,w.Ay)("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>(0,C.b)({props:e,name:"MuiStack"})}),S=x},53948:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(24902),r=n(92296),i=n(82227),s=n(33044);const a=function(e){const{elementType:t,externalSlotProps:n,ownerState:a,skipResolvingSlotProps:l=!1,...c}=e,u=l?{}:(0,s.A)(n,a),{props:d,internalRef:h}=(0,i.A)({...c,externalSlotProps:u}),p=(0,o.A)(h,u?.ref,e.additionalProps?.ref);return(0,r.A)(t,{...d,ref:p},a)}},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),r=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(r,""):e}},54403:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(78854).A},54405:(e,t)=>{"use strict";Symbol.for("react.transitional.element"),Symbol.for("react.portal");var n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler");Symbol.for("react.provider");var i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=(Symbol.for("react.view_transition"),Symbol.for("react.client.reference"));t.Hy=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===r||e===o||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===s||e.$$typeof===i||e.$$typeof===a||e.$$typeof===h||void 0!==e.getModuleId)}},54587:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(91092).A},55174:(e,t,n)=>{"use strict";n.d(t,{k:()=>o});const o=n(96540).createContext(void 0)},55655:(e,t,n)=>{"use strict";n.d(t,{A:()=>oe});var o=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),r=Math.abs,i=String.fromCharCode,s=Object.assign;function a(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function h(e){return e.length}function p(e){return e.length}function f(e,t){return t.push(e),e}var m=1,g=1,b=0,v=0,y=0,w="";function C(e,t,n,o,r,i,s){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:m,column:g,length:s,return:""}}function x(e,t){return s(C("",null,null,"",null,null,0),e,{length:-e.length},t)}function S(){return y=v>0?u(w,--v):0,g--,10===y&&(g=1,m--),y}function A(){return y=v<b?u(w,v++):0,g++,10===y&&(g=1,m++),y}function E(){return u(w,v)}function k(){return v}function R(e,t){return d(w,e,t)}function M(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 I(e){return m=g=1,b=h(w=e),v=0,[]}function P(e){return w="",e}function T(e){return a(R(v-1,D(91===e?e+2:40===e?e+1:e)))}function O(e){for(;(y=E())&&y<33;)A();return M(e)>2||M(y)>3?"":" "}function $(e,t){for(;--t&&A()&&!(y<48||y>102||y>57&&y<65||y>70&&y<97););return R(e,k()+(t<6&&32==E()&&32==A()))}function D(e){for(;A();)switch(y){case e:return v;case 34:case 39:34!==e&&39!==e&&D(y);break;case 40:41===e&&D(e);break;case 92:A()}return v}function N(e,t){for(;A()&&e+y!==57&&(e+y!==84||47!==E()););return"/*"+R(t,v-1)+"*"+i(47===e?e:A())}function L(e){for(;!M(E());)A();return R(e,v)}var H="-ms-",z="-moz-",F="-webkit-",j="comm",B="rule",_="decl",V="@keyframes";function W(e,t){for(var n="",o=p(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function G(e,t,n,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case _:return e.return=e.return||e.value;case j:return"";case V:return e.return=e.value+"{"+W(e.children,o)+"}";case B:e.value=e.props.join(",")}return h(n=W(e.children,o))?e.return=e.value+"{"+n+"}":""}function K(e){return P(U("",null,null,null,[""],e=I(e),0,[0],e))}function U(e,t,n,o,r,s,a,d,p){for(var m=0,g=0,b=a,v=0,y=0,w=0,C=1,x=1,R=1,M=0,I="",P=r,D=s,H=o,z=I;x;)switch(w=M,M=A()){case 40:if(108!=w&&58==u(z,b-1)){-1!=c(z+=l(T(M),"&","&\f"),"&\f")&&(R=-1);break}case 34:case 39:case 91:z+=T(M);break;case 9:case 10:case 13:case 32:z+=O(w);break;case 92:z+=$(k()-1,7);continue;case 47:switch(E()){case 42:case 47:f(X(N(A(),k()),t,n),p);break;default:z+="/"}break;case 123*C:d[m++]=h(z)*R;case 125*C:case 59:case 0:switch(M){case 0:case 125:x=0;case 59+g:-1==R&&(z=l(z,/\f/g,"")),y>0&&h(z)-b&&f(y>32?Y(z+";",o,n,b-1):Y(l(z," ","")+";",o,n,b-2),p);break;case 59:z+=";";default:if(f(H=q(z,t,n,m,g,r,d,I,P=[],D=[],b),s),123===M)if(0===g)U(z,t,H,H,P,s,b,d,D);else switch(99===v&&110===u(z,3)?100:v){case 100:case 108:case 109:case 115:U(e,H,H,o&&f(q(e,H,H,0,0,r,d,I,r,P=[],b),D),r,D,b,d,o?P:D);break;default:U(z,H,H,H,[""],D,0,d,D)}}m=g=y=0,C=R=1,I=z="",b=a;break;case 58:b=1+h(z),y=w;default:if(C<1)if(123==M)--C;else if(125==M&&0==C++&&125==S())continue;switch(z+=i(M),M*C){case 38:R=g>0?1:(z+="\f",-1);break;case 44:d[m++]=(h(z)-1)*R,R=1;break;case 64:45===E()&&(z+=T(A())),v=E(),g=b=h(I=z+=L(k())),M++;break;case 45:45===w&&2==h(z)&&(C=0)}}return s}function q(e,t,n,o,i,s,c,u,h,f,m){for(var g=i-1,b=0===i?s:[""],v=p(b),y=0,w=0,x=0;y<o;++y)for(var S=0,A=d(e,g+1,g=r(w=c[y])),E=e;S<v;++S)(E=a(w>0?b[S]+" "+A:l(A,/&\f/g,b[S])))&&(h[x++]=E);return C(e,t,n,0===i?B:u,h,f,m)}function X(e,t,n){return C(e,t,n,j,i(y),d(e,2,-2),0)}function Y(e,t,n,o){return C(e,t,n,_,d(e,0,o),d(e,o+1,-1),o)}var Q=function(e,t,n){for(var o=0,r=0;o=r,r=E(),38===o&&12===r&&(t[n]=1),!M(r);)A();return R(e,v)},J=new WeakMap,Z=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!o){J.set(e,!0);for(var r=[],s=function(e,t){return P(function(e,t){var n=-1,o=44;do{switch(M(o)){case 0:38===o&&12===E()&&(t[n]=1),e[n]+=Q(v-1,t,n);break;case 2:e[n]+=T(o);break;case 4:if(44===o){e[++n]=58===E()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(o)}}while(o=A());return e}(I(e),t))}(t,r),a=n.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)e.props[c]=r[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},ee=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function te(e,t){switch(function(e,t){return 45^u(e,0)?(((t<<2^u(e,0))<<2^u(e,1))<<2^u(e,2))<<2^u(e,3):0}(e,t)){case 5103:return F+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return F+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return F+e+z+e+H+e+e;case 6828:case 4268:return F+e+H+e+e;case 6165:return F+e+H+"flex-"+e+e;case 5187:return F+e+l(e,/(\w+).+(:[^]+)/,F+"box-$1$2"+H+"flex-$1$2")+e;case 5443:return F+e+H+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return F+e+H+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return F+e+H+l(e,"shrink","negative")+e;case 5292:return F+e+H+l(e,"basis","preferred-size")+e;case 6060:return F+"box-"+l(e,"-grow","")+F+e+H+l(e,"grow","positive")+e;case 4554:return F+l(e,/([^-])(transform)/g,"$1"+F+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,F+"$1"),/(image-set)/,F+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,F+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,F+"box-pack:$3"+H+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+F+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,F+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(e)-1-t>6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+F+"$2-$3$1"+z+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+F)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+F+(45===u(e,14)?"inline-":"")+"box$3$1"+F+"$2$3$1"+H+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return F+e+H+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return F+e+H+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return F+e+H+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return F+e+H+e+e}return e}var ne=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case _:e.return=te(e.value,e.length);break;case V:return W([x(e,{value:l(e.value,"@","@"+F)})],o);case B:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return W([x(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return W([x(e,{props:[l(t,/:(plac\w+)/,":"+F+"input-$1")]}),x(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),x(e,{props:[l(t,/:(plac\w+)/,H+"input-$1")]})],o)}return""}))}}],oe=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,s=e.stylisPlugins||ne,a={},l=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;l.push(e)}));var c,u,d,h,f=[G,(h=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&h(e)})],m=(u=[Z,ee].concat(s,f),d=p(u),function(e,t,n,o){for(var r="",i=0;i<d;i++)r+=u[i](e,t,n,o)||"";return r});i=function(e,t,n,o){c=n,W(K(e?e+"{"+t.styles+"}":t.styles),m),o&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new o({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return g.sheet.hydrate(l),g}},56301:(e,t,n)=>{"use strict";n.d(t,{A:()=>V});var o=n(96540),r=n(34164),i=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 f=n(37313),m=n(41538),g=n(74848);const b={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var v=n(56536),y=n(1883),w=n(38329),C=n(96148),x=n(1908);function S(e){return(0,x.Ay)("MuiTabScrollButton",e)}const A=(0,C.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),E=(0,l.Ay)(w.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,[`&.${A.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,...f}=n,m=(0,s.I)(),b={isRtl:m,...n},w=(e=>{const{classes:t,orientation:n,disabled:o}=e,r={root:["root",n,o&&"disabled"]};return(0,i.A)(r,S,t)})(b),C=l.StartScrollButtonIcon??v.A,x=l.EndScrollButtonIcon??y.A,A=(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,g.jsx)(E,{component:"div",className:(0,r.A)(w.root,o),ref:t,role:null,ownerState:b,tabIndex:null,...f,style:{...f.style,..."vertical"===h&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:"left"===u?(0,g.jsx)(C,{...A}):(0,g.jsx)(x,{...k})})}));var R=n(54403);function M(e){return(0,x.Ay)("MuiTabs",e)}const I=(0,C.A)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var P=n(33983),T=n(85078);const O=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,$=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,D=(e,t,n)=>{let o=!1,r=n(e,t);for(;r;){if(r===e.firstChild){if(o)return;o=!0}const t=r.disabled||"true"===r.getAttribute("aria-disabled");if(r.hasAttribute("tabindex")&&!t)return void r.focus();r=n(e,r)}},N=(0,l.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${I.scrollButtons}`]:t.scrollButtons},{[`& .${I.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:{[`& .${I.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"}}]}),H=(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"}}]}),z=(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}}]})))),F=(0,l.Ay)((function(e){const{onChange:t,...n}=e,r=o.useRef(),i=o.useRef(null),s=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return(0,f.A)((()=>{const e=(0,h.A)((()=>{const e=r.current;s(),e!==r.current&&t(r.current)})),n=(0,m.A)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),o.useEffect((()=>{s(),t(r.current)}),[t]),(0,g.jsx)("div",{style:b,...n,ref:i})}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),j={},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":f,"aria-labelledby":b,action:v,centered:y=!1,children:w,className:C,component:x="div",allowScrollButtonsMobile:S=!1,indicatorColor:A="primary",onChange:E,orientation:I="horizontal",ScrollButtonComponent:B,scrollButtons:_="auto",selectionFollowsFocus:V,slots:W={},slotProps:G={},TabIndicatorProps:K={},TabScrollButtonProps:U={},textColor:q="primary",value:X,variant:Y="standard",visibleScrollbar:Q=!1,...J}=n,Z="scrollable"===Y,ee="vertical"===I,te=ee?"scrollTop":"scrollLeft",ne=ee?"top":"left",oe=ee?"bottom":"right",re=ee?"clientHeight":"clientWidth",ie=ee?"height":"width",se={...n,component:x,allowScrollButtonsMobile:S,indicatorColor:A,orientation:I,vertical:ee,scrollButtons:_,textColor:q,variant:Y,visibleScrollbar:Q,fixed:!Z,hideScrollbar:Z&&!Q,scrollableX:Z&&!ee,scrollableY:Z&&ee,centered:y&&!Z,scrollButtonsHideMobile:!S},ae=(e=>{const{vertical:t,fixed:n,hideScrollbar:o,scrollableX:r,scrollableY:s,centered:a,scrollButtonsHideMobile:l,classes:c}=e,u={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",o&&"hideScrollbar",r&&"scrollableX",s&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[r&&"scrollableX"],hideScrollbar:[o&&"hideScrollbar"]};return(0,i.A)(u,M,c)})(se),le=(0,a.A)({elementType:W.StartScrollButtonIcon,externalSlotProps:G.startScrollButtonIcon,ownerState:se}),ce=(0,a.A)({elementType:W.EndScrollButtonIcon,externalSlotProps:G.endScrollButtonIcon,ownerState:se}),[ue,de]=o.useState(!1),[he,pe]=o.useState(j),[fe,me]=o.useState(!1),[ge,be]=o.useState(!1),[ve,ye]=o.useState(!1),[we,Ce]=o.useState({overflow:"hidden",scrollbarWidth:0}),xe=new Map,Se=o.useRef(null),Ae=o.useRef(null),Ee={slots:W,slotProps:{indicator:K,scrollButton:U,...G}},ke=()=>{const e=Se.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!==X){const e=Ae.current.children;if(e.length>0){const t=e[xe.get(X)];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 r={[n]:o,[ie]:t?t[ie]:0};if("number"!=typeof he[n]||"number"!=typeof he[ie])pe(r);else{const e=Math.abs(he[n]-r[n]),t=Math.abs(he[ie]-r[ie]);(e>=1||t>=1)&&pe(r)}})),Me=(e,{animation:t=!0}={})=>{t?function(e,t,n,o={},r=()=>{}){const{ease:i=p,duration:s=300}=o;let a=null;const l=t[e];let c=!1;const u=o=>{if(c)return void r(new Error("Animation cancelled"));null===a&&(a=o);const d=Math.min(1,(o-a)/s);t[e]=i(d)*(n-l)+l,d>=1?requestAnimationFrame((()=>{r(null)})):requestAnimationFrame(u)};l===n?r(new Error("Element already at target position")):requestAnimationFrame(u)}(te,Se.current,e,{duration:l.transitions.duration.standard}):Se.current[te]=e},Ie=e=>{let t=Se.current[te];t+=ee?e:e*(u?-1:1),Me(t)},Pe=()=>{const e=Se.current[re];let t=0;const n=Array.from(Ae.current.children);for(let o=0;o<n.length;o+=1){const r=n[o];if(t+r[re]>e){0===o&&(t=e);break}t+=r[re]}return t},Te=()=>{Ie(-1*Pe())},Oe=()=>{Ie(Pe())},[$e,{onChange:De,...Ne}]=(0,T.A)("scrollbar",{className:(0,r.A)(ae.scrollableX,ae.hideScrollbar),elementType:F,shouldForwardComponentProp:!0,externalForwardedProps:Ee,ownerState:se}),Le=o.useCallback((e=>{De?.(e),Ce({overflow:null,scrollbarWidth:e})}),[De]),[He,ze]=(0,T.A)("scrollButtons",{className:(0,r.A)(ae.scrollButtons,U.className),elementType:k,externalForwardedProps:Ee,ownerState:se,additionalProps:{orientation:I,slots:{StartScrollButtonIcon:W.startScrollButtonIcon||W.StartScrollButtonIcon,EndScrollButtonIcon:W.endScrollButtonIcon||W.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:le,endScrollButtonIcon:ce}}}),Fe=(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})}})),je=(0,R.A)((()=>{Z&&!1!==_&&ye(!ve)}));o.useEffect((()=>{const e=(0,h.A)((()=>{Se.current&&Re()}));let t;const n=(0,m.A)(Se.current);let o;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Ae.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(),je()})),o.observe(Ae.current,{childList:!0})),()=>{e.clear(),n.removeEventListener("resize",e),o?.disconnect(),t?.disconnect()}}),[Re,je]),o.useEffect((()=>{const e=Array.from(Ae.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&Z&&!1!==_){const n=e[0],o=e[t-1],r={root:Se.current,threshold:.99},i=new IntersectionObserver((e=>{me(!e[0].isIntersecting)}),r);i.observe(n);const s=new IntersectionObserver((e=>{be(!e[0].isIntersecting)}),r);return s.observe(o),()=>{i.disconnect(),s.disconnect()}}}),[Z,_,ve,w?.length]),o.useEffect((()=>{de(!0)}),[]),o.useEffect((()=>{Re()})),o.useEffect((()=>{Fe(j!==he)}),[Fe,he]),o.useImperativeHandle(v,(()=>({updateIndicator:Re,updateScrollButtons:je})),[Re,je]);const[Be,_e]=(0,T.A)("indicator",{className:(0,r.A)(ae.indicator,K.className),elementType:z,externalForwardedProps:Ee,ownerState:se,additionalProps:{style:he}}),Ve=(0,g.jsx)(Be,{..._e});let We=0;const Ge=o.Children.map(w,(e=>{if(!o.isValidElement(e))return null;const t=void 0===e.props.value?We:e.props.value;xe.set(t,We);const n=t===X;return We+=1,o.cloneElement(e,{fullWidth:"fullWidth"===Y,indicator:n&&!ue&&Ve,selected:n,selectionFollowsFocus:V,onChange:E,textColor:q,value:t,...1!==We||!1!==X||e.props.tabIndex?{}:{tabIndex:0}})})),Ke=(()=>{const e={};e.scrollbarSizeListener=Z?(0,g.jsx)($e,{...Ne,onChange:Le}):null;const t=Z&&("auto"===_&&(fe||ge)||!0===_);return e.scrollButtonStart=t?(0,g.jsx)(He,{direction:u?"right":"left",onClick:Te,disabled:!fe,...ze}):null,e.scrollButtonEnd=t?(0,g.jsx)(He,{direction:u?"left":"right",onClick:Oe,disabled:!ge,...ze}):null,e})(),[Ue,qe]=(0,T.A)("root",{ref:t,className:(0,r.A)(ae.root,C),elementType:N,externalForwardedProps:{...Ee,...J,component:x},ownerState:se}),[Xe,Ye]=(0,T.A)("scroller",{ref:Se,className:ae.scroller,elementType:L,externalForwardedProps:Ee,ownerState:se,additionalProps:{style:{overflow:we.overflow,[ee?"margin"+(u?"Left":"Right"):"marginBottom"]:Q?void 0:-we.scrollbarWidth}}}),[Qe,Je]=(0,T.A)("list",{ref:Ae,className:(0,r.A)(ae.list,ae.flexContainer),elementType:H,externalForwardedProps:Ee,ownerState:se,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;const t=Ae.current,n=(0,P.A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let o="horizontal"===I?"ArrowLeft":"ArrowUp",r="horizontal"===I?"ArrowRight":"ArrowDown";switch("horizontal"===I&&u&&(o="ArrowRight",r="ArrowLeft"),e.key){case o:e.preventDefault(),D(t,n,$);break;case r:e.preventDefault(),D(t,n,O);break;case"Home":e.preventDefault(),D(t,null,O);break;case"End":e.preventDefault(),D(t,null,$)}})(t),e.onKeyDown?.(t)}})});return(0,g.jsxs)(Ue,{...qe,children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,(0,g.jsxs)(Xe,{...Ye,children:[(0,g.jsx)(Qe,{"aria-label":f,"aria-labelledby":b,"aria-orientation":"vertical"===I?"vertical":null,role:"tablist",...Je,children:Ge}),ue&&Ve]}),Ke.scrollButtonEnd]})}));var _=n(65836);const V=o.forwardRef((function(e,t){const{children:n,...r}=e,i=(0,_.QM)();if(null===i)throw new TypeError("No TabContext provided");const s=o.Children.map(n,(e=>o.isValidElement(e)?o.cloneElement(e,{"aria-controls":(0,_.eR)(i,e.props.value),id:(0,_.vU)(i,e.props.value)}):null));return(0,g.jsx)(B,{...r,ref:t,value:i.value,children:s})}))},56416:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,P:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiInputAdornment",e)}const s=(0,o.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"])},56536:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(96540);var o=n(9792),r=n(74848);const i=(0,o.A)((0,r.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},57514:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(836),r=n(98762);const i=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??r.A;return Object.keys(e).forEach((o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]})),t};function s(e){const{sx:t,...n}=e,{systemProps:r,otherProps:s}=i(n);let a;return a=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return(0,o.Q)(n)?{...r,...n}:r}:{...r,...t},{...s,sx:a}}},57536:(e,t,n)=>{"use strict";var o=n(24994).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(12897)),i=n(89569),s=(0,r.default)((0,r.default)({},i.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},57618:(e,t,n)=>{"use strict";n.d(t,{M:()=>y});var o=n(58168),r=n(98587),i=n(96540),s=n(14808),a=n(21362),l=n(34164),c=n(51280),u=n(25054),d=n(52504),h=n(85486),p=n(27961),f=n(77866);function m(e,t){if(!e.ref.current||!t.ref.current)return 0;const n=e.ref.current.compareDocumentPosition(t.ref.current);return n?n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0:0}var g=n(74848);const b=["render","className"],v=(0,s.A)("div",{name:"MuiDataGrid",slot:"Toolbar"})({flex:0,display:"flex",alignItems:"center",justifyContent:"end",gap:d.f.spacing(.25),padding:d.f.spacing(.75),minHeight:52,boxSizing:"border-box",borderBottom:`1px solid ${d.f.colors.border.base}`}),y=(0,c.R)((function(e,t){const{render:n,className:s}=e,c=(0,r.A)(e,b),d=(0,f.A)(),y=(e=>{const{classes:t}=e;return(0,a.A)({root:["toolbar"]},h.B,t)})(d),[w,C]=i.useState(null),[x,S]=i.useState([]),A=i.useCallback((()=>x.sort(m)),[x]),E=i.useCallback(((e,t,n=!0)=>{let o=e;const r=A(),i=r.length;for(let e=0;e<i;e+=1){if(o+=t,o>=i){if(!n)return-1;o=0}else if(o<0){if(!n)return-1;o=i-1}if(!r[o].ref.current?.disabled&&"true"!==r[o].ref.current?.ariaDisabled)return o}return-1}),[A]),k=i.useCallback(((e,t)=>{S((n=>[...n,{id:e,ref:t}]))}),[]),R=i.useCallback((e=>{S((t=>t.filter((t=>t.id!==e))))}),[]),M=i.useCallback((e=>{if(!w)return;const t=A(),n=t.findIndex((e=>e.id===w));let o=-1;if("ArrowRight"===e.key?(e.preventDefault(),o=E(n,1)):"ArrowLeft"===e.key?(e.preventDefault(),o=E(n,-1)):"Home"===e.key?(e.preventDefault(),o=E(-1,1,!1)):"End"===e.key&&(e.preventDefault(),o=E(t.length,-1,!1)),o>=0&&o<t.length){const e=t[o];C(e.id),e.ref.current?.focus()}}),[A,w,E]),I=i.useCallback((e=>{w!==e&&C(e)}),[w,C]),P=i.useCallback((e=>{const t=A(),n=t.findIndex((t=>t.id===e)),o=E(n,1);if(o>=0&&o<t.length){const e=t[o];C(e.id),e.ref.current?.focus()}}),[A,E]);i.useEffect((()=>{const e=A();if(e.length>0){if(!w)return void C(e[0].id);const t=e.findIndex((e=>e.id===w));if(e[t]){if(-1===t){const n=e[t];n&&(C(n.id),n.ref.current?.focus())}}else{const t=e[e.length-1];t&&(C(t.id),t.ref.current?.focus())}}}),[A,E]);const T=i.useMemo((()=>({focusableItemId:w,registerItem:k,unregisterItem:R,onItemKeyDown:M,onItemFocus:I,onItemDisabled:P})),[w,k,R,M,I,P]),O=(0,u._)(v,n,(0,o.A)({role:"toolbar","aria-orientation":"horizontal","aria-label":d.label||void 0,className:(0,l.A)(y.root,s)},c,{ref:t}));return(0,g.jsx)(p.P.Provider,{value:T,children:O})}))},57787:(e,t)=>{"use strict";var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=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"),f=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 r:case s:case i:case d:case h:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case f:case p:case a:return e;default:return t}}case o:return t}}}(e)===p}},57798:(e,t,n)=>{"use strict";n.d(t,{e:()=>w});var o=n(58168),r=n(98587),i=n(96540),s=n(52044),a=n(3576),l=n(91092),c=n(322),u=n(25054),d=n(43203),h=n(83753),p=n(74435),f=n(32067),m=n(77866),g=n(74848);const b=["render","className","parser","formatter","debounceMs","defaultExpanded","expanded","onExpandedChange"],v=e=>e.split(" ").filter((e=>""!==e)),y=e=>e.join(" ");function w(e){const t=(0,m.A)(),{render:n,className:w,parser:C=v,formatter:x=y,debounceMs:S=t.filterDebounceMs,defaultExpanded:A,expanded:E,onExpandedChange:k}=e,R=(0,r.A)(e,b),M=(0,h.h)(),I=i.useRef(null),P=i.useRef(null),T=(0,p.Nc)(M,f.q6),[O,$]=i.useState(x(T??[])),[D,N]=i.useState(A??O.length>0),L=E??D,H=i.useMemo((()=>({value:O,expanded:L})),[O,L]),z="function"==typeof w?w(H):w,F=i.useRef(null),j=(0,l.A)(),B=i.useCallback((e=>{k&&k(e),void 0===E&&N(e)}),[k,E]),_=i.useRef(T);i.useEffect((()=>{(0,c.H)(_.current,T)||(_.current=T,$((e=>(0,c.H)(C(e),T)?e:x(T??[]))))}),[T,x,C]);const V=i.useRef(!0),W=i.useRef(L);i.useEffect((()=>{V.current?V.current=!1:W.current!==L&&(L?requestAnimationFrame((()=>{I.current?.focus({preventScroll:!0})})):P.current?.focus({preventScroll:!0}),W.current=L)}),[L]);const G=i.useMemo((()=>(0,s.A)((e=>{const t=C(e);_.current=t,M.current.setQuickFilterValues(t)}),S)),[M,S,C]);i.useEffect((()=>G.clear),[G]);const K=i.useCallback((e=>{const t=e.target.value;$(t),G(t)}),[G]),U=i.useCallback((()=>{$(""),M.current.setQuickFilterValues([]),I.current?.focus()}),[M,I]),q=i.useMemo((()=>({controlRef:I,triggerRef:P,state:H,controlId:j,clearValue:U,onValueChange:K,onExpandedChange:B})),[j,H,K,U,B]);(0,a.A)((()=>{F.current&&P.current&&F.current.style.setProperty("--trigger-width",`${P.current?.offsetWidth}px`)}),[]);const X=(0,u._)("div",n,(0,o.A)({className:z},R,{ref:F}),H);return(0,g.jsx)(d.f.Provider,{value:q,children:X})}},58168:(e,t,n)=>{"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(null,arguments)}n.d(t,{A:()=>o})},58296:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(21124),r=n(4894),i=n(31355);function s({props:e,name:t}){return(0,o.A)({props:e,name:t,defaultTheme:r.A,themeId:i.A})}},58493:(e,t,n)=>{"use strict";var o=n(96540),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=o.useState,s=o.useEffect,a=o.useLayoutEffect,l=o.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),o=i({inst:{value:n,getSnapshot:t}}),r=o[0].inst,u=o[1];return a((function(){r.value=n,r.getSnapshot=t,c(r)&&u({inst:r})}),[e,n,t]),s((function(){return c(r)&&u({inst:r}),e((function(){c(r)&&u({inst:r})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:u},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:()=>w});var o=n(96540),r=n(34164),i=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 f=(0,d.A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]);var m=n(85078),g=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),[`&.${f.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${f.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${f.disabled})`]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{[`&.${f.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}),[`&.${f.expanded}`]:{margin:"20px 0"}}}]})))),y=(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}),[`&.${f.expanded}`]:{transform:"rotate(180deg)"}})))),w=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:f,slotProps:w,...C}=n,{disabled:x=!1,disableGutters:S,expanded:A,toggle:E}=o.useContext(u.A),k={...n,expanded:A,disabled:x,disableGutters:S},R=(e=>{const{classes:t,expanded:n,disabled:o,disableGutters:r}=e,s={root:["root",n&&"expanded",o&&"disabled",!r&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!r&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,i.A)(s,p,t)})(k),M={slots:f,slotProps:w},[I,P]=(0,m.A)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,r.A)(R.root,a),elementType:b,externalForwardedProps:{...M,...C},ownerState:k,additionalProps:{focusRipple:!1,disableRipple:!0,disabled:x,"aria-expanded":A,focusVisibleClassName:(0,r.A)(R.focusVisible,d)},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),(e=>{E&&E(e),h&&h(e)})(t)}})}),[T,O]=(0,m.A)("content",{className:R.content,elementType:v,externalForwardedProps:M,ownerState:k}),[$,D]=(0,m.A)("expandIconWrapper",{className:R.expandIconWrapper,elementType:y,externalForwardedProps:M,ownerState:k});return(0,g.jsxs)(I,{...P,children:[(0,g.jsx)(T,{...O,children:s}),c&&(0,g.jsx)($,{...D,children:c})]})}))},60431:(e,t,n)=>{"use strict";n.d(t,{A:()=>P});var o=n(96540),r=n(34164),i=n(19750),s=n(21362),a=n(82777),l=n(54587),c=n(98855),u=n(26739),d=n(39241),h=n(20439),p=n(38329),f=n(8861),m=n(39407),g=n(1321),b=n(96148),v=n(1908);function y(e){return(0,v.Ay)("MuiButton",e)}const w=(0,b.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),C=o.createContext({}),x=o.createContext(void 0);var S=n(74848);const A=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],E=(0,u.Ay)(p.A,{shouldForwardProp:e=>(0,c.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,m.A)(n.color)}`],t[`size${(0,m.A)(n.size)}`],t[`${n.variant}Size${(0,m.A)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})((0,d.A)((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${w.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${w.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${w.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${w.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,g.A)()).map((([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,a.X4)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}}}))),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.X4)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${w.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${w.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${w.loading}`]:{color:"transparent"}}}]}}))),k=(0,u.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${(0,m.A)(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...A]}))),R=(0,u.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${(0,m.A)(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...A]}))),M=(0,u.Ay)("span",{name:"MuiButton",slot:"LoadingIndicator"})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]}))),I=(0,u.Ay)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),P=o.forwardRef((function(e,t){const n=o.useContext(C),a=o.useContext(x),c=(0,i.A)(n,e),u=(0,h.b)({props:c,name:"MuiButton"}),{children:d,color:p="primary",component:g="button",className:b,disabled:v=!1,disableElevation:w=!1,disableFocusRipple:A=!1,endIcon:P,focusVisibleClassName:T,fullWidth:O=!1,id:$,loading:D=null,loadingIndicator:N,loadingPosition:L="center",size:H="medium",startIcon:z,type:F,variant:j="text",...B}=u,_=(0,l.A)($),V=N??(0,S.jsx)(f.A,{"aria-labelledby":_,color:"inherit",size:16}),W={...u,color:p,component:g,disabled:v,disableElevation:w,disableFocusRipple:A,fullWidth:O,loading:D,loadingIndicator:V,loadingPosition:L,size:H,type:F,variant:j},G=(e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:i,loading:a,loadingPosition:l,classes:c}=e,u={root:["root",a&&"loading",i,`${i}${(0,m.A)(t)}`,`size${(0,m.A)(r)}`,`${i}Size${(0,m.A)(r)}`,`color${(0,m.A)(t)}`,n&&"disableElevation",o&&"fullWidth",a&&`loadingPosition${(0,m.A)(l)}`],startIcon:["icon","startIcon",`iconSize${(0,m.A)(r)}`],endIcon:["icon","endIcon",`iconSize${(0,m.A)(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=(0,s.A)(u,y,c);return{...c,...d}})(W),K=(z||D&&"start"===L)&&(0,S.jsx)(k,{className:G.startIcon,ownerState:W,children:z||(0,S.jsx)(I,{className:G.loadingIconPlaceholder,ownerState:W})}),U=(P||D&&"end"===L)&&(0,S.jsx)(R,{className:G.endIcon,ownerState:W,children:P||(0,S.jsx)(I,{className:G.loadingIconPlaceholder,ownerState:W})}),q=a||"",X="boolean"==typeof D?(0,S.jsx)("span",{className:G.loadingWrapper,style:{display:"contents"},children:D&&(0,S.jsx)(M,{className:G.loadingIndicator,ownerState:W,children:V})}):null;return(0,S.jsxs)(E,{ownerState:W,className:(0,r.A)(n.className,G.root,b,q),component:g,disabled:v||D,focusRipple:!A,focusVisibleClassName:(0,r.A)(G.focusVisible,T),ref:t,type:F,id:D?_:$,...B,classes:G,children:[K,"end"!==L&&X,d,"end"===L&&X,U]})}))},60436:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(43145),r=n(73893),i=n(27800);function s(e){return function(e){if(Array.isArray(e))return(0,o.A)(e)}(e)||(0,r.A)(e)||(0,i.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:()=>i,vB:()=>r});const o="__TREE_VIEW_ROOT_PARENT_ID__",r=e=>{const t={};return e.forEach(((e,n)=>{t[e]=n})),t},i=(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)({})},61626:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const o=e=>e,r=(()=>{let e=o;return{configure(t){e=t},generate:t=>e(t),reset(){e=o}}})()},62279:(e,t,n)=>{"use strict";n.d(t,{QO:()=>a,TP:()=>u,lJ:()=>s,pM:()=>i,yH:()=>r});var o=n(96540);const r="ant",i="anticon",s=["outlined","borderless","filled","underlined"],a=o.createContext({getPrefixCls:(e,t)=>t||(e?`${r}-${e}`:r),iconPrefixCls:i}),{Consumer:l}=a,c={};function u(e){const t=o.useContext(a),{getPrefixCls:n,direction:r,getPopupContainer:i}=t,s=t[e];return Object.assign(Object.assign({classNames:c,styles:c},s),{getPrefixCls:n,direction:r,getPopupContainer:i})}},63132:(e,t,n)=>{"use strict";function o(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)}));return n.length?n.reduce(((e,n)=>{const o=t[n];return delete e[n],e[n]=o,e}),{...t}):t}function r(e,t){return"@"===t||t.startsWith("@")&&(e.some((e=>t.startsWith(`@${e}`)))||!!t.match(/^@\d/))}function i(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,o,r]=n,i=Number.isNaN(+o)?o||0:+o;return e.containerQueries(r).up(i)}function s(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,o){n.up=(...n)=>t(e.breakpoints.up(...n),o),n.down=(...n)=>t(e.breakpoints.down(...n),o),n.between=(...n)=>t(e.breakpoints.between(...n),o),n.only=(...n)=>t(e.breakpoints.only(...n),o),n.not=(...n)=>{const r=t(e.breakpoints.not(...n),o);return r.includes("not all and")?r.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):r}}const o={},r=e=>(n(o,e),o);return n(r),{...e,containerQueries:r}}n.d(t,{Ay:()=>s,CT:()=>i,_S:()=>o,ob:()=>r})},63248:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>p,MC:()=>c});var o=n(49649),r=n(836),i=n(65387),s=n(95548),a=n(18139);const l=(0,i.A)();function c(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function u(e){return e?(t,n)=>n[e]:null}function d(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>d(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...o}=n;t=o}return h(e,n.variants,[t])}return n?.isProcessed?n.style:n}function h(e,t,n=[]){let o;e:for(let r=0;r<t.length;r+=1){const i=t[r];if("function"==typeof i.props){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(o))continue}else for(const t in i.props)if(e[t]!==i.props[t]&&e.ownerState?.[t]!==i.props[t])continue e;"function"==typeof i.style?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(i.style(o))):n.push(i.style)}return n}function p(e={}){const{themeId:t,defaultTheme:n=l,rootShouldForwardProp:i=c,slotShouldForwardProp:p=c}=e;function m(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{(0,o.HX)(e,(e=>e.filter((e=>e!==s.A))));const{name:n,slot:l,skipVariantsResolver:g,skipSx:b,overridesResolver:v=u(f(l)),...y}=t,w=void 0!==g?g:l&&"Root"!==l&&"root"!==l||!1,C=b||!1;let x=c;"Root"===l||"root"===l?x=i:l?x=p:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(x=void 0);const S=(0,o.Ay)(e,{shouldForwardProp:x,label:void 0,...y}),A=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return d(t,e)};if((0,r.Q)(e)){const t=(0,a.A)(e);return t.variants?function(e){return d(e,t)}:t.style}return e},E=(...t)=>{const o=[],r=t.map(A),i=[];if(o.push(m),n&&v&&i.push((function(e){const t=e.theme,o=t.components?.[n]?.styleOverrides;if(!o)return null;const r={};for(const t in o)r[t]=d(e,o[t]);return v(e,r)})),n&&!w&&i.push((function(e){const t=e.theme,o=t?.components?.[n]?.variants;return o?h(e,o):null})),C||i.push(s.A),Array.isArray(r[0])){const e=r.shift(),t=new Array(o.length).fill(""),n=new Array(i.length).fill("");let s;s=[...t,...e,...n],s.raw=[...t,...e.raw,...n],o.unshift(s)}const a=[...o,...r,...i],l=S(...a);return e.muiName&&(l.muiName=e.muiName),l};return S.withConfig&&(E.withConfig=S.withConfig),E}}function f(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}},63518:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(9792),r=n(74848);const i=(0,o.A)((0,r.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),r=n(58168),i=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),f=n(9553),m=n(26739),g=n(52658),b=n(24902),v=n(29677),y=n(41519),w=n(65658),C=n(29401),x=n(27668),S=n(31418),A=n(10786),E=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)),I=(0,k.M)([R,(e,t)=>t],((e,t)=>e.loading[t]||!1)),P=(0,k.M)([R,(e,t)=>t],((e,t)=>e.errors[t]||null));var T=n(81326);const O=e=>Array.isArray(e)?e.length>0&&e.some(O):Boolean(e);var $=n(42049),D=n(28540),N=n(80886),L=n(25149);var H=n(65348),z=n(33044),F=n(19268),j=n(9792),B=n(74848);const _=(0,j.A)((0,B.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"TreeViewExpandIcon"),V=(0,j.A)((0,B.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"TreeViewCollapseIcon");function W(e){const{slots:t,slotProps:n,status:o}=e,{slots:i,slotProps:s}=(0,F.P)(),a={collapseIcon:t?.collapseIcon??i.collapseIcon??V,expandIcon:t?.expandIcon??i.expandIcon??_,endIcon:t?.endIcon??i.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,r.A)({},(0,z.A)(s[l],e),(0,z.A)(n?.[l],e)),ownerState:{}});return c?(0,B.jsx)(c,(0,r.A)({},u)):null}const G=(0,m.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,r.A)({},e))}function U(e){const{children:t,itemId:n,id:o}=e,{wrapItem:r,instance:s,store:a}=(0,v.i)(),l=(0,C.d)(a,L.U),c=(0,N.Q)({itemId:n,treeId:l,id:o});return(0,B.jsx)(i.Fragment,{children:r({children:t,itemId:n,instance:s,idAttribute:c})})}const q=(0,m.Ay)("input",{name:"MuiTreeItem",slot:"LabelInput"})((({theme:e})=>(0,r.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}`}}))),X=["visible"],Y=["id","itemId","label","disabled","children","slots","slotProps","classes"],Q=(0,f.h)("MuiTreeItem"),J=(0,m.Ay)("li",{name:"MuiTreeItem",slot:"Root"})({listStyle:"none",margin:0,padding:0,outline:0}),Z=(0,m.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,m.Ay)("div",{name:"MuiTreeItem",slot:"Label",shouldForwardProp:e=>(0,h.MC)(e)&&"editable"!==e})((({theme:e})=>(0,r.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,m.Ay)("div",{name:"MuiTreeItem",slot:"IconContainer"})({width:16,display:"flex",flexShrink:0,justifyContent:"center",position:"relative","& svg":{fontSize:18}}),ne=(0,m.Ay)(c.A,{name:"MuiTreeItem",slot:"GroupTransition",overridesResolver:(e,t)=>t.groupTransition})({margin:0,padding:0}),oe=(0,m.Ay)("div",{name:"MuiTreeItem",slot:"ErrorIcon"})({position:"absolute",right:-3,width:7,height:7,borderRadius:"50%",backgroundColor:"red"}),re=(0,m.Ay)(a.A,{name:"MuiTreeItem",slot:"LoadingIcon"})({color:"text.primary"}),ie=(0,m.Ay)(i.forwardRef(((e,t)=>{const{visible:n}=e,i=(0,o.A)(e,X);return n?(0,B.jsx)(u.A,(0,r.A)({},i,{ref:t})):null})),{name:"MuiTreeItem",slot:"Checkbox"})({padding:0}),se=i.forwardRef((function(e,t){const n=Q({props:e,name:"MuiTreeItem"}),{id:a,itemId:l,label:c,disabled:u,children:h,slots:f={},slotProps:m={},classes:k}=n,R=(0,o.A)(n,Y),{getContextProviderProps:z,getRootProps:j,getContentProps:_,getIconContainerProps:V,getCheckboxProps:G,getLabelProps:X,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=i.useContext($.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:f,contentRef:m,propsEnhancers:k}=t(e),{interactions:R,status:H}=(({itemId:e,children:t})=>{const{instance:n,store:o,publicAPI:r}=(0,v.i)(),i=(0,C.d)(o,x.Rt,e),s=(0,C.d)(o,M),a=(0,C.d)(o,E.UK),l=(0,C.d)(o,(t=>!!s&&I(t,e))),c=(0,C.d)(o,(t=>!!s&&Boolean(P(t,e)))),u=O(t)||i,d=(0,C.d)(o,x.QQ,e),h=(0,C.d)(o,S.I$,e),p=(0,C.d)(o,E.cs,e),f=(0,C.d)(o,A.lj,e),m=(0,C.d)(o,T.XG,e),g=(0,C.d)(o,T.pF,e),b={expandable:u,expanded:d,focused:h,selected:p,disabled:f,editing:m,editable:g,loading:l,error:c},k=()=>{(0,w.M)(n,y.j)&&(m?n.setEditedItem(null):n.setEditedItem(e))};return{interactions:{handleExpansion:t=>{if(b.disabled)return;b.focused||n.focusItem(t,e);const r=a&&(t.shiftKey||t.ctrlKey||t.metaKey);!b.expandable||r&&(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,r)=>{(0,w.M)(n,y.j)&&(0,T.XG)(o.value,e)&&(n.updateItemLabel(e,r),k(),n.focusItem(t,e))},handleCancelItemLabelEditing:t=>{(0,w.M)(n,y.j)&&(0,T.XG)(o.value,e)&&(k(),n.focusItem(t,e))}},status:b,publicAPI:r}})({itemId:u,children:h}),z=i.useRef(null),F=i.useRef(null),j=(0,b.A)(p,f,z),B=(0,b.A)(m,F),_=i.useRef(null),V=(0,C.d)(s,L.U),W=(0,C.d)(s,E.AJ,u),G=(0,C.d)(s,E.Ye),K=(0,N.Q)({itemId:u,treeId:V,id:c}),U=(0,C.d)(s,S.U_,u),q={rootRefObject:z,contentRefObject:F,interactions:R},X=e=>t=>{if(e.onBlur?.(t),t.defaultMuiPrevented)return;const o=n.getItemDOMElement(u);H.editing||t.relatedTarget&&(0,D.HZ)(t.relatedTarget,o)&&(t.target&&"labelInput"===t.target?.dataset?.element&&(0,D.HZ)(t.target,o)||"labelInput"===t.relatedTarget?.dataset?.element)||n.removeFocusedItem()},Y=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||H.disabled)&&t.preventDefault()};return{getContextProviderProps:()=>({itemId:u,id:c}),getRootProps:(t={})=>{const o=(0,r.A)({},(0,g.A)(e),(0,g.A)(t));let i;i=!!H.selected||!W&&void 0;const a=(0,r.A)({},o,{ref:j,role:"treeitem",tabIndex:U?0:-1,id:K,"aria-expanded":H.expandable?H.expanded:void 0,"aria-selected":i,"aria-disabled":H.disabled||void 0},t,{style:(0,r.A)({},t.style??{},{"--TreeView-itemDepth":l}),onFocus:(c=o,e=>{c.onFocus?.(e),e.defaultMuiPrevented||!H.focused&&(0,A.P$)(s.value,u)&&e.currentTarget===e.target&&n.focusItem(e,u)}),onBlur:X(o),onKeyDown:Y(o)});var c;const d=k.root?.((0,r.A)({},q,{externalEventHandlers:o}))??{};return(0,r.A)({},a,d)},getContentProps:(e={})=>{const t=(0,g.A)(e),o=(0,r.A)({},t,e,{ref:B,onClick:(i=t,e=>{i.onClick?.(e),n.handleItemClick(e,u),e.defaultMuiPrevented||_.current?.contains(e.target)||("content"===(0,x.cP)(s.value)&&R.handleExpansion(e),G||R.handleSelection(e))}),onMouseDown:Q(t),status:H});var i;["expanded","selected","focused","disabled","editing","editable"].forEach((e=>{H[e]&&(o[`data-${e}`]="")}));const a=k.content?.((0,r.A)({},q,{externalEventHandlers:t}))??{};return(0,r.A)({},o,a)},getGroupTransitionProps:(e={})=>{const t=(0,g.A)(e);return(0,r.A)({},t,{unmountOnExit:!0,component:"ul",role:"group",in:H.expanded,children:h},e)},getIconContainerProps:(e={})=>{const t=(0,g.A)(e);return(0,r.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,g.A)(e),n=(0,r.A)({},t,{ref:_},e),o=k.checkbox?.((0,r.A)({},q,{externalEventHandlers:t}))??{};return(0,r.A)({},n,o)},getLabelProps:(e={})=>{const t=(0,r.A)({},(0,g.A)(e)),n=(0,r.A)({},t,{children:d},e,{onDoubleClick:(o=t,e=>{o.onDoubleClick?.(e),e.defaultMuiPrevented||R.toggleItemEditing()})});var o;const i=k.label?.((0,r.A)({},q,{externalEventHandlers:t}))??{};return(0,r.A)({},i,n)},getLabelInputProps:(e={})=>{const t=(0,g.A)(e),n=k.labelInput?.((0,r.A)({},q,{externalEventHandlers:t}))??{};return(0,r.A)({},e,n)},getDragAndDropOverlayProps:(e={})=>{const t=(0,g.A)(e),n=k.dragAndDropOverlay?.((0,r.A)({},q,{externalEventHandlers:t}))??{};return(0,r.A)({},e,n)},getErrorContainerProps:(e={})=>{const t=(0,g.A)(e);return(0,r.A)({},t,e)},getLoadingContainerProps:(e={})=>{const t=(0,g.A)(e);return(0,r.A)({size:"12px",thickness:6},t,e)},rootRef:j,status:H,publicAPI:o}})({id:a,itemId:l,children:h,label:c,disabled:u}),he=(e=>{const{classes:t}=(0,F.P)(),n=(0,r.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"]},H.K,n)})(k),pe=f.root??J,fe=(0,d.A)({elementType:pe,getSlotProps:j,externalForwardedProps:R,externalSlotProps:m.root,additionalProps:{ref:t},ownerState:{},className:he.root}),me=f.content??Z,ge=(0,d.A)({elementType:me,getSlotProps:_,externalSlotProps:m.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=f.iconContainer??te,ve=(0,d.A)({elementType:be,getSlotProps:V,externalSlotProps:m.iconContainer,ownerState:{},className:he.iconContainer}),ye=f.label??ee,we=(0,d.A)({elementType:ye,getSlotProps:X,externalSlotProps:m.label,ownerState:{},className:he.label}),Ce=f.checkbox??ie,xe=(0,d.A)({elementType:Ce,getSlotProps:G,externalSlotProps:m.checkbox,ownerState:{},className:he.checkbox}),Se=f.groupTransition??void 0,Ae=(0,d.A)({elementType:Se,getSlotProps:se,externalSlotProps:m.groupTransition,ownerState:{},className:he.groupTransition}),Ee=f.labelInput??q,ke=(0,d.A)({elementType:Ee,getSlotProps:ae,externalSlotProps:m.labelInput,ownerState:{},className:he.labelInput}),Re=f.dragAndDropOverlay??K,Me=(0,d.A)({elementType:Re,getSlotProps:le,externalSlotProps:m.dragAndDropOverlay,ownerState:{},className:he.dragAndDropOverlay}),Ie=f.errorIcon??oe,Pe=(0,d.A)({elementType:Ie,getSlotProps:ce,externalSlotProps:m.errorIcon,ownerState:{},className:he.errorIcon}),Te=f.loadingIcon??re,Oe=(0,d.A)({elementType:Te,getSlotProps:ue,externalSlotProps:m.loadingIcon,ownerState:{},className:he.loadingIcon});return(0,B.jsx)(U,(0,r.A)({},z(),{children:(0,B.jsxs)(pe,(0,r.A)({},fe,{children:[(0,B.jsxs)(me,(0,r.A)({},ge,{children:[(0,B.jsxs)(be,(0,r.A)({},ve,{children:[de.error&&(0,B.jsx)(Ie,(0,r.A)({},Pe)),de.loading?(0,B.jsx)(Te,(0,r.A)({},Oe)):(0,B.jsx)(W,{status:de,slots:f,slotProps:m})]})),(0,B.jsx)(Ce,(0,r.A)({},xe)),de.editing?(0,B.jsx)(Ee,(0,r.A)({},ke)):(0,B.jsx)(ye,(0,r.A)({},we)),(0,B.jsx)(Re,(0,r.A)({},Me))]})),h&&(0,B.jsx)(ne,(0,r.A)({as:Se},Ae))]}))}))}))},63662:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}n.d(t,{A:()=>o})},63984:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var o=n(96540),r=n(836),i=n(21362),s=n(79844),a=n(98855),l=n(26739),c=n(39241),u=n(1321),d=n(20439),h=n(89026),p=n(39407),f=n(74848);const m=(0,l.Ay)(s.Sh,{shouldForwardProp:e=>(0,a.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,s.WC)(e,t),!n.disableUnderline&&t.underline]}})((0,c.A)((({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${h.A.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${h.A.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${h.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${h.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${h.A.disabled}, .${h.A.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${h.A.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter((0,u.A)()).map((([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}}))),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}}))),g=(0,l.Ay)(s.ck,{name:"MuiFilledInput",slot:"Input",overridesResolver:s.Oj})((0,c.A)((({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]})))),b=o.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:a={},componentsProps:l,fullWidth:c=!1,hiddenLabel:u,inputComponent:b="input",multiline:v=!1,slotProps:y,slots:w={},type:C="text",...x}=n,S={...n,disableUnderline:o,fullWidth:c,inputComponent:b,multiline:v,type:C},A=(e=>{const{classes:t,disableUnderline:n,startAdornment:o,endAdornment:r,size:s,hiddenLabel:a,multiline:l}=e,c={root:["root",!n&&"underline",o&&"adornedStart",r&&"adornedEnd","small"===s&&`size${(0,p.A)(s)}`,a&&"hiddenLabel",l&&"multiline"],input:["input"]},u=(0,i.A)(c,h.N,t);return{...t,...u}})(n),E={root:{ownerState:S},input:{ownerState:S}},k=y??l?(0,r.A)(E,y??l):E,R=w.root??a.Root??m,M=w.input??a.Input??g;return(0,f.jsx)(s.Ay,{slots:{root:R,input:M},slotProps:k,fullWidth:c,inputComponent:b,multiline:v,ref:t,type:C,...x,classes:A})}));b.muiName="Input";const v=b},64467:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(20816);function r(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:()=>i});var o=n(9792),r=n(74848);const i=(0,o.A)((0,r.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:()=>f,Go:()=>a,T:()=>s,UK:()=>u,Ye:()=>h,cs:()=>c});var o=n(31216),r=n(10786);const i=e=>e.selection,s=(0,o.M)([i],(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)([i],(e=>e.isEnabled&&e.isMultiSelectEnabled)),d=(0,o.M)([i],(e=>e.isEnabled)),h=(0,o.M)([i],(e=>e.isCheckboxSelectionEnabled)),p=(0,o.M)([r.lj,d],((e,t)=>t&&!e)),f=(0,o.M)([i],(e=>e.selectionPropagation))},64951:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var o=n(96540),r=n(34164),i=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 f=(0,d.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]);var m=n(74848);const g=(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,{[`& .${f.iconWrapper}`]:t.iconWrapper},{[`& .${f.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:{[`& > .${f.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${f.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${f.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${f.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${f.selected}`]:{opacity:1},[`&.${f.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${f.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${f.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${f.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${f.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:f="top",indicator:b,label:v,onChange:y,onClick:w,onFocus:C,selected:x,selectionFollowsFocus:S,textColor:A="inherit",value:E,wrapped:k=!1,...R}=n,M={...n,disabled:l,disableFocusRipple:c,selected:x,icon:!!h,iconPosition:f,label:!!v,fullWidth:d,textColor:A,wrapped:k},I=(e=>{const{classes:t,textColor:n,fullWidth:o,wrapped:r,icon:s,label:l,selected:c,disabled:u}=e,d={root:["root",s&&l&&"labelIcon",`textColor${(0,a.A)(n)}`,o&&"fullWidth",r&&"wrapped",c&&"selected",u&&"disabled"],icon:["iconWrapper","icon"]};return(0,i.A)(d,p,t)})(M),P=h&&v&&o.isValidElement(h)?o.cloneElement(h,{className:(0,r.A)(I.icon,h.props.className)}):h;return(0,m.jsxs)(g,{focusRipple:!c,className:(0,r.A)(I.root,s),ref:t,role:"tab","aria-selected":x,disabled:l,onClick:e=>{!x&&y&&y(e,E),w&&w(e)},onFocus:e=>{S&&!x&&y&&y(e,E),C&&C(e)},ownerState:M,tabIndex:x?0:-1,...R,children:["top"===f||"start"===f?(0,m.jsxs)(o.Fragment,{children:[P,v]}):(0,m.jsxs)(o.Fragment,{children:[v,P]}),b]})}))},65347:(e,t,n)=>{"use strict";n.d(t,{HZ:()=>l,Mk:()=>a,OL:()=>i,Oq:()=>y,Qy:()=>v,SN:()=>g,TW:()=>h,Z:()=>u,Ze:()=>m,e$:()=>c,fS:()=>d,gb:()=>s,l_:()=>f,nF:()=>p,nW:()=>w,ro:()=>b});var o=n(58168),r=n(24349);const i="auto-generated-group-node-root",s=Symbol("mui.id_autogenerated"),a=()=>({type:"group",id:i,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null}),l=(e,t,n)=>{const o=t?t(e):e.id;return function(e,t,n="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join("\n"))}(o,e,n),o},c=(e,t,n)=>{const o=t.field;if(!t||!t.valueGetter)return e[o];const r=e[t.field];return t.valueGetter(r,e,t,n)},u=({rows:e,getRowId:t,loading:n,rowCount:o})=>{const r={type:"full",rows:[]},i={};for(let n=0;n<e.length;n+=1){const o=e[n],s=l(o,t);i[s]=o,r.rows.push(s)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:o,updates:r,dataRowIdToModelLookup:i}},d=({tree:e,rowCountProp:t=0})=>{const n=e[i];return Math.max(t,n.children.length+(null==n.footerId?0:1))},h=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:i,previousGroupsToFetch:s})=>{const a=e.current.caches.rows,{tree:l,treeDepths:c,dataRowIds:u,groupingName:h,groupsToFetch:p=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:i,updates:a.updates,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:s}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:l,treeDepths:c,dataRowIds:u,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,o.A)({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:d({tree:f.tree,rowCountProp:t}),groupingName:h,loading:n,groupsToFetch:p})},p=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,f=(e,t,n)=>{const o=e[t];if("group"!==o.type)return[];const r=[];for(let t=0;t<o.children.length;t+=1){const i=o.children[t];n&&p(e[i])||r.push(i);const s=f(e,i,n);for(let e=0;e<s.length;e+=1)r.push(s[e])}return n||null==o.footerId||r.push(o.footerId),r},m=({previousCache:e,getRowId:t,updates:n,groupKeys:r})=>{if("full"===e.updates.type)throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const i=new Map;n.forEach((e=>{const n=l(e,t,"A row was provided without id when calling updateRows():");i.has(n)?i.set(n,(0,o.A)({},i.get(n),e)):i.set(n,e)}));const s={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:(0,o.A)({},e.updates.idToActionLookup),groupKeys:r},a=(0,o.A)({},e.dataRowIdToModelLookup),c={insert:{},modify:{},remove:{}};i.forEach(((e,t)=>{const n=s.idToActionLookup[t];if("delete"===e._action){if("remove"===n||!a[t])return;return null!=n&&(c[n][t]=!0),s.actions.remove.push(t),void delete a[t]}const r=a[t];if(r)return"remove"===n?(c.remove[t]=!0,s.actions.modify.push(t)):null==n&&s.actions.modify.push(t),void(a[t]=(0,o.A)({},r,e));"remove"===n?(c.remove[t]=!0,s.actions.insert.push(t)):null==n&&s.actions.insert.push(t),a[t]=e}));const u=Object.keys(c);for(let e=0;e<u.length;e+=1){const t=u[e],n=c[t];Object.keys(n).length>0&&(s.actions[t]=s.actions[t].filter((e=>!n[e])))}return{dataRowIdToModelLookup:a,updates:s,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}},g="var(--DataGrid-overlayHeight, calc(var(--height) * 2))";function b(e,t,n){const i=[];return t.forEach((t=>{const s=l(t,n,"A row was provided without id when calling updateRows():"),a=(0,r.Qu)(e,s);if("pinnedRow"===a?.type){const n=e.current.caches.pinnedRows,r=n.idLookup[s];r&&(n.idLookup[s]=(0,o.A)({},r,t))}else i.push(t)})),i}const v=(e,t,n)=>"number"==typeof e&&e>0?e:t,y=["MUI X: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),w=["MUI X: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n")},65348:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,m:()=>i});var o=n(1908);function r(e){return(0,o.Ay)("MuiTreeItem",e)}const i=(0,n(96148).A)("MuiTreeItem",["root","content","groupTransition","iconContainer","label","checkbox","labelInput","dragAndDropOverlay","errorIcon","loadingIcon","expanded","selected","focused","disabled","editable","editing"])},65387:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var o=n(836);var r=n(63132);const i={borderRadius:4};var s=n(33372),a=n(95548),l=n(98762);function c(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let o=n.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}const u=function(e={},...t){const{breakpoints:n={},palette:u={},spacing:d,shape:h={},...p}=e,f=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5,...r}=e,i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),s=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function c(e,r){const i=s.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[s[i]]?t[s[i]]:r)-o/100}${n})`}return{keys:s,values:i,up:a,down:l,between:c,only:function(e){return s.indexOf(e)+1<s.length?c(e,s[s.indexOf(e)+1]):a(e)},not:function(e){const t=s.indexOf(e);return 0===t?a(s[1]):t===s.length-1?l(s[t]):c(e,s[s.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...r}}(n),m=(0,s.A)(d);let g=(0,o.A)({breakpoints:f,direction:"ltr",components:{},palette:{mode:"light",...u},spacing:m,shape:{...i,...h}},p);return g=(0,r.Ay)(g),g.applyStyles=c,g=t.reduce(((e,t)=>(0,o.A)(e,t)),g),g.unstable_sxConfig={...l.A,...p?.unstable_sxConfig},g.unstable_sx=function(e){return(0,a.A)({sx:e,theme:this})},g}},65418:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=n(52044).A},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),r=n(74848);const i=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,r.jsx)(i.Provider,{value:a,children:t})}function a(){return o.useContext(i)}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),r=n(96540),i=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 r.Component?null===(t=i.findDOMNode)||void 0===t?void 0:t.call(i,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:"页码"}},67246:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,B:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiInput",e)}const s={...n(26410).A,...(0,o.A)("MuiInput",["root","underline","input"])}},68210:(e,t,n)=>{"use strict";n.d(t,{$e:()=>i,Ay:()=>c});var o={},r=[];function i(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(i,e,t)}l.preMessage=function(e){r.push(e)},l.resetWarned=function(){o={}},l.noteOnce=function(e,t){a(s,e,t)};const c=l},71026:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var o=n(96540),r=n(33983),i=n(34164),s=n(21362),a=n(26739),l=n(20439),c=n(40583),u=n(96148),d=n(1908);function h(e){return(0,d.Ay)("MuiList",e)}(0,u.A)("MuiList",["root","padding","dense","subheader"]);var p=n(74848);const f=(0,a.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),m=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiList"}),{children:r,className:a,component:u="ul",dense:d=!1,disablePadding:m=!1,subheader:g,...b}=n,v=o.useMemo((()=>({dense:d})),[d]),y={...n,component:u,dense:d,disablePadding:m},w=(e=>{const{classes:t,disablePadding:n,dense:o,subheader:r}=e,i={root:["root",!n&&"padding",o&&"dense",r&&"subheader"]};return(0,s.A)(i,h,t)})(y);return(0,p.jsx)(c.A.Provider,{value:v,children:(0,p.jsxs)(f,{as:u,className:(0,i.A)(w.root,a),ref:t,ownerState:y,...b,children:[g,r]})})})),g=n(244).A;var b=n(30301),v=n(37313),y=n(41538);function w(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function C(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function x(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function S(e,t,n,o,r,i){let s=!1,a=r(e,t,!!t&&n);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const t=!o&&(a.disabled||"true"===a.getAttribute("aria-disabled"));if(a.hasAttribute("tabindex")&&x(a,i)&&!t)return a.focus(),!0;a=r(e,a,n)}return!1}const A=o.forwardRef((function(e,t){const{actions:n,autoFocus:i=!1,autoFocusItem:s=!1,children:a,className:l,disabledItemsFocusable:c=!1,disableListWrap:u=!1,onKeyDown:d,variant:h="selectedMenu",...f}=e,A=o.useRef(null),E=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,v.A)((()=>{i&&A.current.focus()}),[i]),o.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!A.current.style.width;if(e.clientHeight<A.current.clientHeight&&n){const n=`${g((0,y.A)(e))}px`;A.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,A.current.style.width=`calc(100% + ${n})`}return A.current}})),[]);const k=(0,b.A)(A,t);let R=-1;o.Children.forEach(a,((e,t)=>{o.isValidElement(e)?(e.props.disabled||("selectedMenu"===h&&e.props.selected||-1===R)&&(R=t),R===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(R+=1,R>=a.length&&(R=-1))):R===t&&(R+=1,R>=a.length&&(R=-1))}));const M=o.Children.map(a,((e,t)=>{if(t===R){const t={};return s&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===h&&(t.tabIndex=0),o.cloneElement(e,t)}return e}));return(0,p.jsx)(m,{role:"menu",ref:k,className:l,onKeyDown:e=>{const t=A.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(d&&d(e));const o=(0,r.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),S(t,o,u,c,w);else if("ArrowUp"===n)e.preventDefault(),S(t,o,u,c,C);else if("Home"===n)e.preventDefault(),S(t,null,u,c,w);else if("End"===n)e.preventDefault(),S(t,null,u,c,C);else if(1===n.length){const r=E.current,i=n.toLowerCase(),s=performance.now();r.keys.length>0&&(s-r.lastTime>500?(r.keys=[],r.repeating=!0,r.previousKeyMatched=!0):r.repeating&&i!==r.keys[0]&&(r.repeating=!1)),r.lastTime=s,r.keys.push(i);const a=o&&!r.repeating&&x(o,r);r.previousKeyMatched&&(a||S(t,o,!1,c,w,r))?e.preventDefault():r.previousKeyMatched=!1}d&&d(e)},tabIndex:i?0:-1,...f,children:M})}))},71287:(e,t,n)=>{"use strict";var o;n.d(t,{i:()=>a,s:()=>s});var r=n(96540),i=!!(o||(o=n.t(r,2))).useInsertionEffect&&(o||(o=n.t(r,2))).useInsertionEffect,s=i||function(e){return e()},a=i||r.useLayoutEffect},72552:(e,t,n)=>{var o=n(51873),r=n(659),i=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)?r(e):i(e)}},73404:(e,t,n)=>{"use strict";e.exports=n(3072)},73514:(e,t,n)=>{"use strict";n.d(t,{A:()=>N});var o=n(96540),r=n(34164),i=n(32350),s=n(21362),a=n(82777),l=n(411),c=n(49450),u=n(17726),d=n(26739),h=n(53356),p=n(39241),f=n(20439),m=n(39407),g=n(38572),b=n(27519),v=n(54403),y=n(30301),w=n(54587),C=n(1152),x=n(85078),S=n(96148),A=n(1908);function E(e){return(0,A.Ay)("MuiTooltip",e)}const k=(0,S.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);var R=n(74848);const M=(0,d.Ay)(b.A,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((0,p.A)((({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${k.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${k.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${k.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${k.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${k.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${k.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${k.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${k.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]})))),I=(0,d.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,m.A)(n.placement.split("-")[0])}`]]}})((0,p.A)((({theme:e})=>{return{backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,a.X4)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${k.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${k.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${k.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${k.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(t=16/14,Math.round(1e5*t)/1e5+"em"),fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${k.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${k.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${k.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${k.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${k.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${k.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${k.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${k.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${k.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${k.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]};var t}))),P=(0,d.Ay)("span",{name:"MuiTooltip",slot:"Arrow"})((0,p.A)((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,a.X4)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))));let T=!1;const O=new i.E;let $={x:0,y:0};function D(e,t){return(n,...o)=>{t&&t(n,...o),e(n,...o)}}const N=o.forwardRef((function(e,t){const n=(0,f.b)({props:e,name:"MuiTooltip"}),{arrow:a=!1,children:d,classes:p,components:S={},componentsProps:A={},describeChild:k=!1,disableFocusListener:N=!1,disableHoverListener:L=!1,disableInteractive:H=!1,disableTouchListener:z=!1,enterDelay:F=100,enterNextDelay:j=0,enterTouchDelay:B=700,followCursor:_=!1,id:V,leaveDelay:W=0,leaveTouchDelay:G=1500,onClose:K,onOpen:U,open:q,placement:X="bottom",PopperComponent:Y,PopperProps:Q={},slotProps:J={},slots:Z={},title:ee,TransitionComponent:te,TransitionProps:ne,...oe}=n,re=o.isValidElement(d)?d:(0,R.jsx)("span",{children:d}),ie=(0,h.A)(),se=(0,l.I)(),[ae,le]=o.useState(),[ce,ue]=o.useState(null),de=o.useRef(!1),he=H||_,pe=(0,i.A)(),fe=(0,i.A)(),me=(0,i.A)(),ge=(0,i.A)(),[be,ve]=(0,C.A)({controlled:q,default:!1,name:"Tooltip",state:"open"});let ye=be;const we=(0,w.A)(V),Ce=o.useRef(),xe=(0,v.A)((()=>{void 0!==Ce.current&&(document.body.style.WebkitUserSelect=Ce.current,Ce.current=void 0),ge.clear()}));o.useEffect((()=>xe),[xe]);const Se=e=>{O.clear(),T=!0,ve(!0),U&&!ye&&U(e)},Ae=(0,v.A)((e=>{O.start(800+W,(()=>{T=!1})),ve(!1),K&&ye&&K(e),pe.start(ie.transitions.duration.shortest,(()=>{de.current=!1}))})),Ee=e=>{de.current&&"touchstart"!==e.type||(ae&&ae.removeAttribute("title"),fe.clear(),me.clear(),F||T&&j?fe.start(T?j:F,(()=>{Se(e)})):Se(e))},ke=e=>{fe.clear(),me.start(W,(()=>{Ae(e)}))},[,Re]=o.useState(!1),Me=e=>{(0,c.A)(e.target)||(Re(!1),ke(e))},Ie=e=>{ae||le(e.currentTarget),(0,c.A)(e.target)&&(Re(!0),Ee(e))},Pe=e=>{de.current=!0;const t=re.props;t.onTouchStart&&t.onTouchStart(e)};o.useEffect((()=>{if(ye)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&Ae(e)}}),[Ae,ye]);const Te=(0,y.A)((0,u.A)(re),le,t);ee||0===ee||(ye=!1);const Oe=o.useRef(),$e={},De="string"==typeof ee;k?($e.title=ye||!De||L?null:ee,$e["aria-describedby"]=ye?we:null):($e["aria-label"]=De?ee:null,$e["aria-labelledby"]=ye&&!De?we:null);const Ne={...$e,...oe,...re.props,className:(0,r.A)(oe.className,re.props.className),onTouchStart:Pe,ref:Te,..._?{onMouseMove:e=>{const t=re.props;t.onMouseMove&&t.onMouseMove(e),$={x:e.clientX,y:e.clientY},Oe.current&&Oe.current.update()}}:{}},Le={};z||(Ne.onTouchStart=e=>{Pe(e),me.clear(),pe.clear(),xe(),Ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ge.start(B,(()=>{document.body.style.WebkitUserSelect=Ce.current,Ee(e)}))},Ne.onTouchEnd=e=>{re.props.onTouchEnd&&re.props.onTouchEnd(e),xe(),me.start(G,(()=>{Ae(e)}))}),L||(Ne.onMouseOver=D(Ee,Ne.onMouseOver),Ne.onMouseLeave=D(ke,Ne.onMouseLeave),he||(Le.onMouseOver=Ee,Le.onMouseLeave=ke)),N||(Ne.onFocus=D(Ie,Ne.onFocus),Ne.onBlur=D(Me,Ne.onBlur),he||(Le.onFocus=Ie,Le.onBlur=Me));const He={...n,isRtl:se,arrow:a,disableInteractive:he,placement:X,PopperComponentProp:Y,touch:de.current},ze="function"==typeof J.popper?J.popper(He):J.popper,Fe=o.useMemo((()=>{let e=[{name:"arrow",enabled:Boolean(ce),options:{element:ce,padding:4}}];return Q.popperOptions?.modifiers&&(e=e.concat(Q.popperOptions.modifiers)),ze?.popperOptions?.modifiers&&(e=e.concat(ze.popperOptions.modifiers)),{...Q.popperOptions,...ze?.popperOptions,modifiers:e}}),[ce,Q.popperOptions,ze?.popperOptions]),je=(e=>{const{classes:t,disableInteractive:n,arrow:o,touch:r,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",o&&"popperArrow"],tooltip:["tooltip",o&&"tooltipArrow",r&&"touch",`tooltipPlacement${(0,m.A)(i.split("-")[0])}`],arrow:["arrow"]};return(0,s.A)(a,E,t)})(He),Be="function"==typeof J.transition?J.transition(He):J.transition,_e={slots:{popper:S.Popper,transition:S.Transition??te,tooltip:S.Tooltip,arrow:S.Arrow,...Z},slotProps:{arrow:J.arrow??A.arrow,popper:{...Q,...ze??A.popper},tooltip:J.tooltip??A.tooltip,transition:{...ne,...Be??A.transition}}},[Ve,We]=(0,x.A)("popper",{elementType:M,externalForwardedProps:_e,ownerState:He,className:(0,r.A)(je.popper,Q?.className)}),[Ge,Ke]=(0,x.A)("transition",{elementType:g.A,externalForwardedProps:_e,ownerState:He}),[Ue,qe]=(0,x.A)("tooltip",{elementType:I,className:je.tooltip,externalForwardedProps:_e,ownerState:He}),[Xe,Ye]=(0,x.A)("arrow",{elementType:P,className:je.arrow,externalForwardedProps:_e,ownerState:He,ref:ue});return(0,R.jsxs)(o.Fragment,{children:[o.cloneElement(re,Ne),(0,R.jsx)(Ve,{as:Y??b.A,placement:X,anchorEl:_?{getBoundingClientRect:()=>({top:$.y,left:$.x,right:$.x,bottom:$.y,width:0,height:0})}:ae,popperRef:Oe,open:!!ae&&ye,id:we,transition:!0,...Le,...We,popperOptions:Fe,children:({TransitionProps:e})=>(0,R.jsx)(Ge,{timeout:ie.transitions.duration.shorter,...e,...Ke,children:(0,R.jsxs)(Ue,{...qe,children:[ee,a?(0,R.jsx)(Xe,{...Ye}):null]})})})]})}))},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})},74435:(e,t,n)=>{"use strict";n.d(t,{Nc:()=>f,TJ:()=>l,U9:()=>u});var o=n(96540),r=n(87960),i=n(19888),s=n(15870);const a=Object.is,l=r.v,c=(e,t)=>e===t||e.length===t.length&&e.every(((e,n)=>e===t[n])),u=(e,t)=>{let n=Object.is;return t instanceof Array?n=c:t instanceof Object&&(n=l),n(e,t)},d=()=>({state:null,equals:null,selector:null,args:void 0}),h=[],p=()=>null,f=(e,t,n=void 0,r=a)=>{const l=(0,s.A)(d),c=null!==l.current.selector,[f,m]=o.useState(c?null:t(e,n));l.current.state=f,l.current.equals=r,l.current.selector=t;const g=l.current.args;if(l.current.args=n,c&&!u(g,n)){const t=l.current.selector(e,l.current.args);l.current.equals(l.current.state,t)||(l.current.state=t,m(t))}const b=o.useCallback((()=>(l.current.subscription||(l.current.subscription=e.current.store.subscribe((()=>{const t=l.current.selector(e,l.current.args);l.current.equals(l.current.state,t)||(l.current.state=t,m(t))}))),null)),h),v=o.useCallback((()=>()=>{l.current.subscription&&(l.current.subscription(),l.current.subscription=void 0)}),h);return(0,i.useSyncExternalStore)(v,b,p),f}},75337:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var o=n(96540),r=n(24902),i=n(10644),s=n(17726),a=n(74848);const l=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function c(e){const t=[],n=[];return Array.from(e.querySelectorAll(l)).forEach(((e,o)=>{const r=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==r&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===r?t.push(e):n.push({documentOrder:o,tabIndex:r,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function u(){return!0}const d=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:l=!1,disableRestoreFocus:d=!1,getTabbable:h=c,isEnabled:p=u,open:f}=e,m=o.useRef(!1),g=o.useRef(null),b=o.useRef(null),v=o.useRef(null),y=o.useRef(null),w=o.useRef(!1),C=o.useRef(null),x=(0,r.A)((0,s.A)(t),C),S=o.useRef(null);o.useEffect((()=>{f&&C.current&&(w.current=!n)}),[n,f]),o.useEffect((()=>{if(!f||!C.current)return;const e=(0,i.A)(C.current);return C.current.contains(e.activeElement)||(C.current.hasAttribute("tabIndex")||C.current.setAttribute("tabIndex","-1"),w.current&&C.current.focus()),()=>{d||(v.current&&v.current.focus&&(m.current=!0,v.current.focus()),v.current=null)}}),[f]),o.useEffect((()=>{if(!f||!C.current)return;const e=(0,i.A)(C.current),t=t=>{S.current=t,!l&&p()&&"Tab"===t.key&&e.activeElement===C.current&&t.shiftKey&&(m.current=!0,b.current&&b.current.focus())},n=()=>{const t=C.current;if(null===t)return;if(!e.hasFocus()||!p()||m.current)return void(m.current=!1);if(t.contains(e.activeElement))return;if(l&&e.activeElement!==g.current&&e.activeElement!==b.current)return;if(e.activeElement!==y.current)y.current=null;else if(null!==y.current)return;if(!w.current)return;let n=[];if(e.activeElement!==g.current&&e.activeElement!==b.current||(n=h(C.current)),n.length>0){const e=Boolean(S.current?.shiftKey&&"Tab"===S.current?.key),t=n[0],o=n[n.length-1];"string"!=typeof t&&"string"!=typeof o&&(e?o.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,l,d,p,f,h]);const A=e=>{null===v.current&&(v.current=e.relatedTarget),w.current=!0};return(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)("div",{tabIndex:f?0:-1,onFocus:A,ref:g,"data-testid":"sentinelStart"}),o.cloneElement(t,{ref:x,onFocus:e=>{null===v.current&&(v.current=e.relatedTarget),w.current=!0,y.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,a.jsx)("div",{tabIndex:f?0:-1,onFocus:A,ref:b,"data-testid":"sentinelEnd"})]})}},76288:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(82284),r=Symbol.for("react.element"),i=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function a(e){return e&&"object"===(0,o.A)(e)&&(e.$$typeof===r||e.$$typeof===i)&&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})},76761:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(96540),r=n(1713);function i(){return o.useContext(r.A)}},77132:(e,t,n)=>{"use strict";n.d(t,{Mo:()=>nt,J:()=>y,an:()=>R,Ki:()=>L,zA:()=>D,RC:()=>et,hV:()=>Q,IV:()=>Je});var o=n(64467),r=n(5544),i=n(60436),s=n(89379);const a=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=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(r){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 f(e){return e.join(p)}const m=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(f(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(f(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 g="data-token-hash",b="data-css-hash",v="__cssinjs_instance__";const y=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,r=t.getAttribute(b);o[r]?t[v]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):o[r]=!0}))}return new m(e)}(),defaultCache:!0});var w=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],r={map:this.cache};return e.forEach((function(e){var t;r=r?null===(t=r)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):void 0})),null!==(t=r)&&void 0!==t&&t.value&&o&&(r.value[1]=this.cacheCallTimes++),null===(n=r)||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 i=this.keys.reduce((function(e,t){var n=(0,r.A)(e,2)[1];return o.internalGet(t)[1]<n?[t,o.internalGet(t)[1]]:e}),[this.keys[0],this.cacheCallTimes]),s=(0,r.A)(i,1)[0];this.delete(s)}this.keys.push(t)}var a=this.cache;t.forEach((function(e,r){if(r===t.length-1)a.set(e,{value:[n,o.cacheCallTimes++]});else{var i=a.get(e);i?i.map||(i.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 r=this.deleteByPath(o.map,t.slice(1));return o.map&&0!==o.map.size||o.value||e.delete(t[0]),r}},{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 S=n(68210),A=0,E=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=A,0===t.length&&(0,S.$e)(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),A+=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 E(t)),k.get(t)}var M=new WeakMap,I={},P=new WeakMap;function T(e){var t=P.get(e)||"";return t||(Object.keys(e).forEach((function(n){var o=e[n];t+=n,o instanceof E?t+=o.id:o&&"object"===(0,w.A)(o)?t+=T(o):t+=o})),t=a(t),P.set(e,t)),t}function O(e,t){return a("".concat(t,"_").concat(T(e)))}"random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var $=(0,C.A)();function D(e){return"number"==typeof e?"".concat(e,"px"):e}function N(e,t,n){var r,i=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)({},i),{},(r={},(0,o.A)(r,g,t),(0,o.A)(r,b,n),r)),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()},H=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,r.A)(e,2),n=t[0],o=t[1];return"".concat(n,":").concat(o,";")})).join(""),"}"):""},z=function(e,t,n){var o={},i={};return Object.entries(e).forEach((function(e){var t,s,a=(0,r.A)(e,2),l=a[0],c=a[1];if(null!=n&&null!==(t=n.preserve)&&void 0!==t&&t[l])i[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"),i[l]="var(".concat(d,")")}})),[i,H(o,t,{scope:null==n?void 0:n.scope})]},F=n(30981),j=(0,s.A)({},u).useInsertionEffect;const B=j?function(e,t,n){return j((function(){return e(),t()}),n)}:function(e,t,n){c.useMemo(e,n),(0,F.A)((function(){return t(!0)}),n)},_=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()}},V=function(){return!1};function W(e,t,n,o,s){var a=c.useContext(y).cache,l=f([e].concat((0,i.A)(t))),u=_([l]),d=(V(),function(e){a.opUpdate(l,(function(t){var o=t||[void 0,void 0],i=(0,r.A)(o,2),s=i[0],a=[void 0===s?0:s,i[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,r.A)(t,2),o=n[0],i=n[1];return e&&0===o&&(null==s||s(h)),[o+1,i]})),function(){a.opUpdate(l,(function(t){var n=t||[],i=(0,r.A)(n,2),s=i[0],c=void 0===s?0:s,d=i[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 X=function(e,t,n,o){var r=n.getDerivativeToken(e),i=(0,s.A)((0,s.A)({},r),t);return o&&(i=o(i)),i},Y="token";function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=(0,c.useContext)(y),u=o.cache.instanceId,d=o.container,h=n.salt,p=void 0===h?"":h,f=n.override,m=void 0===f?G:f,w=n.formatToken,C=n.getComputedToken,x=n.cssVar,S=function(e,n){for(var o=M,r=0;r<n.length;r+=1){var s=n[r];o.has(s)||o.set(s,new WeakMap),o=o.get(s)}return o.has(I)||o.set(I,Object.assign.apply(Object,[{}].concat((0,i.A)(t)))),o.get(I)}(0,t),A=T(S),E=T(m),k=x?T(x):"",R=W(Y,[p,e.id,A,E,k],(function(){var t,n=C?C(S,m,e):X(S,m,e,w),o=(0,s.A)({},n),i="";if(x){var l=z(n,x.key,{prefix:x.prefix,ignore:x.ignore,unitless:x.unitless,preserve:x.preserve}),c=(0,r.A)(l,2);n=c[0],i=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,i,(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(g,'="').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,r.A)(e,4),n=t[0],o=t[3];if(x&&o){var i=(0,l.BD)(o,a("css-variables-".concat(n._themeKey)),{mark:b,prepend:"queue",attachTo:d,priority:-999});i[v]=u,i.setAttribute(g,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",re="@namespace",ie="@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 fe(e){return e.length}function me(e,t){return t.push(e),e}function ge(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 re:case ne:return e.return=e.return||e.value;case ee:return"";case ie:return e.return=e.value+"{"+ge(e.children,o)+"}";case te:if(!fe(e.value=e.props.join(",")))return""}return fe(n=ge(e.children,o))?e.return=e.value+"{"+n+"}":""}Object.assign;var ve=1,ye=1,we=0,Ce=0,xe=0,Se="";function Ae(e,t,n,o,r,i,s,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:ve,column:ye,length:s,return:"",siblings:a}}function Ee(){return xe=Ce>0?he(Se,--Ce):0,ye--,10===xe&&(ye=1,ve--),xe}function ke(){return xe=Ce<we?he(Se,Ce++):0,ye++,10===xe&&(ye=1,ve++),xe}function Re(){return he(Se,Ce)}function Me(){return Ce}function Ie(e,t){return pe(Se,e,t)}function Pe(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 Te(e){return ce(Ie(Ce-1,De(91===e?e+2:40===e?e+1:e)))}function Oe(e){for(;(xe=Re())&&xe<33;)ke();return Pe(e)>2||Pe(xe)>3?"":" "}function $e(e,t){for(;--t&&ke()&&!(xe<48||xe>102||xe>57&&xe<65||xe>70&&xe<97););return Ie(e,Me()+(t<6&&32==Re()&&32==ke()))}function De(e){for(;ke();)switch(xe){case e:return Ce;case 34:case 39:34!==e&&39!==e&&De(xe);break;case 40:41===e&&De(e);break;case 92:ke()}return Ce}function Ne(e,t){for(;ke()&&e+xe!==57&&(e+xe!==84||47!==Re()););return"/*"+Ie(t,Ce-1)+"*"+le(47===e?e:ke())}function Le(e){for(;!Pe(Re());)ke();return Ie(e,Ce)}function He(e){return function(e){return Se="",e}(ze("",null,null,null,[""],e=function(e){return ve=ye=1,we=fe(Se=e),Ce=0,[]}(e),0,[0],e))}function ze(e,t,n,o,r,i,s,a,l){for(var c=0,u=0,d=s,h=0,p=0,f=0,m=1,g=1,b=1,v=0,y="",w=r,C=i,x=o,S=y;g;)switch(f=v,v=ke()){case 40:if(108!=f&&58==he(S,d-1)){-1!=de(S+=ue(Te(v),"&","&\f"),"&\f",ae(c?a[c-1]:0))&&(b=-1);break}case 34:case 39:case 91:S+=Te(v);break;case 9:case 10:case 13:case 32:S+=Oe(f);break;case 92:S+=$e(Me()-1,7);continue;case 47:switch(Re()){case 42:case 47:me(je(Ne(ke(),Me()),t,n,l),l),5!=Pe(f||1)&&5!=Pe(Re()||1)||!fe(S)||" "===pe(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*m:a[c++]=fe(S)*b;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==b&&(S=ue(S,/\f/g,"")),p>0&&(fe(S)-d||0===m&&47===f)&&me(p>32?Be(S+";",o,n,d-1,l):Be(ue(S," ","")+";",o,n,d-2,l),l);break;case 59:S+=";";default:if(me(x=Fe(S,t,n,c,u,r,a,y,w=[],C=[],d,i),i),123===v)if(0===u)ze(S,t,x,x,w,i,d,a,C);else{switch(h){case 99:if(110===he(S,3))break;case 108:if(97===he(S,2))break;default:u=0;case 100:case 109:case 115:}u?ze(e,x,x,o&&me(Fe(e,x,x,0,0,r,a,y,r,w=[],d,C),C),r,C,d,a,o?w:C):ze(S,x,x,x,[""],C,0,a,C)}}c=u=p=0,m=b=1,y=S="",d=s;break;case 58:d=1+fe(S),p=f;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==Ee())continue;switch(S+=le(v),v*m){case 38:b=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(fe(S)-1)*b,b=1;break;case 64:45===Re()&&(S+=Te(ke())),h=Re(),u=d=fe(y=S+=Le(Me())),v++;break;case 45:45===f&&2==fe(S)&&(m=0)}}return i}function Fe(e,t,n,o,r,i,s,a,l,c,u,d){for(var h=r-1,p=0===r?i:[""],f=function(e){return e.length}(p),m=0,g=0,b=0;m<o;++m)for(var v=0,y=pe(e,h+1,h=ae(g=s[m])),w=e;v<f;++v)(w=ce(g>0?p[v]+" "+y:ue(y,/&\f/g,p[v])))&&(l[b++]=w);return Ae(e,t,n,0===r?te:a,l,c,u,d)}function je(e,t,n,o){return Ae(e,t,n,ee,le(xe),pe(e,2,-2),0,o)}function Be(e,t,n,o,r){return Ae(e,t,n,ne,pe(e,0,o),pe(e,o+1,-1),o,r)}var _e,Ve="data-ant-cssinjs-cache-path",We="_FILE_STYLE__",Ge=!0;var Ke="_multi_value_";function Ue(e){return ge(He(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,f=void 0===p?[]:p,m=(n.linters,""),g={};function b(t){var o=t.getName(u);if(!g[o]){var i=e(t.style,n,{root:!1,parentSelectors:c}),s=(0,r.A)(i,1)[0];g[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)m+="".concat(o,"\n");else if(o._keyframe)b(o);else{var d=f.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,w.A)(o)||!o||"animationName"===t&&o._keyframe||function(e){return"object"===(0,w.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)),m+="".concat(n,":").concat(o,";")}var f=null!==(p=null==o?void 0:o.value)&&void 0!==p?p:o;"object"===(0,w.A)(o)&&null!=o&&o[Ke]&&Array.isArray(f)?f.forEach((function(e){k(t,e)})):k(t,f)}else{var v=!1,y=t.trim(),C=!1;(a||l)&&u?y.startsWith("@")?v=!0:y=function(e,t,n){if(!t)return e;var o=".".concat(t),r="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(r).concat(o.slice(s.length))].concat((0,i.A)(n.slice(1))).join(" ")})).join(",")}("&"===y?"":t,u,h):!a||u||"&"!==y&&""!==y||(y="",C=!0);var x=e(o,n,{root:C,injectHash:v,parentSelectors:[].concat((0,i.A)(c),[y])}),S=(0,r.A)(x,2),A=S[0],E=S[1];g=(0,s.A)((0,s.A)({},g),E),m+="".concat(y).concat(A)}}))}})),a?d&&(m&&(m="@layer ".concat(d.name," {").concat(m,"}")),d.dependencies&&(g["@layer ".concat(d.name)]=d.dependencies.map((function(e){return"@layer ".concat(e,", ").concat(d.name,";")})).join("\n"))):m="{".concat(m,"}"),[m,g]};function Xe(e,t){return a("".concat(e.join("%")).concat(t))}function Ye(){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,f=e.order,m=void 0===f?0:f,w=c.useContext(y),x=w.autoClear,S=(w.mock,w.defaultCache),A=w.hashPriority,E=w.container,k=w.ssrInline,R=w.transformers,M=w.linters,I=w.cache,P=w.layer,T=n._tokenKey,O=[T];P&&O.push("layer"),O.push.apply(O,(0,i.A)(a));var D=$,N=W(Qe,O,(function(){var e=O.join("|");if(function(e){return function(){if(!_e&&(_e={},(0,C.A)())){var e=document.createElement("div");e.className=Ve,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,r.A)(t,2),o=n[0],i=n[1];_e[o]=i}));var n,o=document.querySelector("style[".concat(Ve,"]"));o&&(Ge=!1,null===(n=o.parentNode)||void 0===n||n.removeChild(o)),document.body.removeChild(e)}}(),!!_e[e]}(e)){var n=function(e){var t=_e[e],n=null;if(t&&(0,C.A)())if(Ge)n=We;else{var o=document.querySelector("style[".concat(b,'="').concat(_e[e],'"]'));o?n=o.innerHTML:delete _e[e]}return[n,t]}(e),o=(0,r.A)(n,2),i=o[0],s=o[1];if(i)return[i,T,s,{},p,m]}var l=t(),c=qe(l,{hashId:u,hashPriority:A,layer:P?d:void 0,path:a.join("-"),transformers:R,linters:M}),h=(0,r.A)(c,2),f=h[0],g=h[1],v=Ue(f),y=Xe(O,v);return[v,T,y,g,p,m]}),(function(e,t){var n=(0,r.A)(e,3)[2];(t||x)&&$&&(0,l.m6)(n,{mark:b})}),(function(e){var t=(0,r.A)(e,4),n=t[0],o=(t[1],t[2]),i=t[3];if(D&&n!==We){var a={mark:b,prepend:!P&&"queue",attachTo:E,priority:m},c="function"==typeof h?h():h;c&&(a.csp={nonce:c});var u=[],d=[];Object.keys(i).forEach((function(e){e.startsWith("@layer")?u.push(e):d.push(e)})),u.forEach((function(e){(0,l.BD)(Ue(i[e]),"_layer-".concat(e),(0,s.A)((0,s.A)({},a),{},{prepend:!0}))}));var p=(0,l.BD)(n,o,a);p[v]=I.instanceId,p.setAttribute(g,T),d.forEach((function(e){(0,l.BD)(Ue(i[e]),"_effect-".concat(e),a)}))}})),L=(0,r.A)(N,3),H=L[0],z=L[1],F=L[2];return function(e){var t,n;return t=k&&!D&&S?c.createElement("style",(0,J.A)({},(n={},(0,o.A)(n,g,z),(0,o.A)(n,b,F),n),{dangerouslySetInnerHTML:{__html:H}})):c.createElement(Ye,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)(y),f=p.cache.instanceId,m=p.container,w=u._tokenKey,C=[].concat((0,i.A)(e.path),[n,h,w]);return W(Ze,C,(function(){var e=t(),i=z(e,n,{prefix:o,unitless:s,ignore:a,scope:h}),l=(0,r.A)(i,2),c=l[0],u=l[1];return[c,u,Xe(C,u),n]}),(function(e){var t=(0,r.A)(e,3)[2];$&&(0,l.m6)(t,{mark:b})}),(function(e){var t=(0,r.A)(e,3),o=t[1],i=t[2];if(o){var s=(0,l.BD)(o,i,{mark:b,prepend:"queue",attachTo:m,priority:-999});s[v]=f,s.setAttribute(g,n)}}))};var tt;tt={},(0,o.A)(tt,Qe,(function(e,t,n){var o=(0,r.A)(e,6),i=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=i,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=N(i,s,a,p,d),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=N(Ue(l[e]),s,"_effect-".concat(e),p,d);e.startsWith("@layer")?h=n+h:h+=n}})),[u,a,h]})),(0,o.A)(tt,Y,(function(e,t,n){var o=(0,r.A)(e,5),i=o[2],s=o[3],a=o[4],l=(n||{}).plain;if(!s)return null;var c=i._tokenKey;return[-999,c,N(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,r.A)(e,4),i=o[1],s=o[2],a=o[3],l=(n||{}).plain;return i?[-999,s,N(i,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"])},77147:(e,t,n)=>{"use strict";n.d(t,{y:()=>o});const o=n(96540).createContext(void 0)},77387:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(63662);function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,o.A)(e,t)}},77722:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var o=n(96540),r=n(34164),i=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),f=n(96148),m=n(1908);function g(e){return(0,m.Ay)("MuiAccordion",e)}const b=(0,f.A)("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]);var v=n(74848);const y=(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"}}}]})))),w=(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:f=!1,disableGutters:m=!1,expanded:b,onChange:C,square:x=!1,slots:S={},slotProps:A={},TransitionComponent:E,TransitionProps:k,...R}=n,[M,I]=(0,h.A)({controlled:b,default:u,name:"Accordion",state:"expanded"}),P=o.useCallback((e=>{I(!M),C&&C(e,!M)}),[M,C,I]),[T,...O]=o.Children.toArray(s),$=o.useMemo((()=>({expanded:M,disabled:f,disableGutters:m,toggle:P})),[M,f,m,P]),D={...n,square:x,disabled:f,disableGutters:m,expanded:M},N=(e=>{const{classes:t,square:n,expanded:o,disabled:r,disableGutters:s}=e,a={root:["root",!n&&"rounded",o&&"expanded",r&&"disabled",!s&&"gutters"],heading:["heading"],region:["region"]};return(0,i.A)(a,g,t)})(D),L={slots:{transition:E,...S},slotProps:{transition:k,...A}},[H,z]=(0,p.A)("root",{elementType:y,externalForwardedProps:{...L,...R},className:(0,r.A)(N.root,a),shouldForwardComponentProp:!0,ownerState:D,ref:t,additionalProps:{square:x}}),[F,j]=(0,p.A)("heading",{elementType:w,externalForwardedProps:L,className:N.heading,ownerState:D}),[B,_]=(0,p.A)("transition",{elementType:c.A,externalForwardedProps:L,ownerState:D});return(0,v.jsxs)(H,{...z,children:[(0,v.jsx)(F,{...j,children:(0,v.jsx)(d.A.Provider,{value:$,children:T})}),(0,v.jsx)(B,{in:M,timeout:"auto",..._,children:(0,v.jsx)("div",{"aria-labelledby":T.props.id,id:T.props["aria-controls"],role:"region",className:N.region,children:O})})]})}))},77736:(e,t,n)=>{var o=n(73738).default,r=n(89045);e.exports=function(e){var t=r(e,"string");return"symbol"==o(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},77866:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(96540),r=n(77147);const i=()=>{const e=o.useContext(r.y);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e}},78164:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var o=n(96540),r=n(21362),i=n(836),s=n(79844),a=n(98855),l=n(26739),c=n(39241),u=n(1321),d=n(20439),h=n(67246),p=n(74848);const f=(0,l.Ay)(s.Sh,{shouldForwardProp:e=>(0,a.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,s.WC)(e,t),!n.disableUnderline&&t.underline]}})((0,c.A)((({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${h.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${h.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${h.A.disabled}, .${h.A.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${h.A.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter((0,u.A)()).map((([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})))]}}))),m=(0,l.Ay)(s.ck,{name:"MuiInput",slot:"Input",overridesResolver:s.Oj})({}),g=o.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiInput"}),{disableUnderline:o=!1,components:a={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:g=!1,slotProps:b,slots:v={},type:y="text",...w}=n,C=(e=>{const{classes:t,disableUnderline:n}=e,o={root:["root",!n&&"underline"],input:["input"]},i=(0,r.A)(o,h.B,t);return{...t,...i}})(n),x={root:{ownerState:{disableUnderline:o}}},S=b??l?(0,i.A)(b??l,x):x,A=v.root??a.Root??f,E=v.input??a.Input??m;return(0,p.jsx)(s.Ay,{slots:{root:A,input:E},slotProps:S,fullWidth:c,inputComponent:u,multiline:g,ref:t,type:y,...w,classes:C})}));g.muiName="Input";const b=g},78418:(e,t,n)=>{"use strict";e.exports=n(85160)},78854:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(96540),r=n(3576);const i=function(e){const t=o.useRef(e);return(0,r.A)((()=>{t.current=e})),o.useRef(((...e)=>(0,t.current)(...e))).current}},79844:(e,t,n)=>{"use strict";n.d(t,{ck:()=>D,Sh:()=>$,Ay:()=>L,Oj:()=>O,WC:()=>T});var o=n(4076),r=n(96540),i=n(34164),s=n(21362),a=n(52044),l=n(24902),c=n(3576),u=n(78854),d=n(88612),h=n(74848);function p(e){return parseInt(e,10)||0}const f={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function m(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const g=r.forwardRef((function(e,t){const{onChange:n,maxRows:o,minRows:i=1,style:s,value:g,...b}=e,{current:v}=r.useRef(null!=g),y=r.useRef(null),w=(0,l.A)(t,y),C=r.useRef(null),x=r.useRef(null),S=r.useCallback((()=>{const t=y.current,n=x.current;if(!t||!n)return;const r=(0,d.A)(t).getComputedStyle(t);if("0px"===r.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=r.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const s=r.boxSizing,a=p(r.paddingBottom)+p(r.paddingTop),l=p(r.borderBottomWidth)+p(r.borderTopWidth),c=n.scrollHeight;n.value="x";const u=n.scrollHeight;let h=c;return i&&(h=Math.max(Number(i)*u,h)),o&&(h=Math.min(Number(o)*u,h)),h=Math.max(h,u),{outerHeightStyle:h+("border-box"===s?a+l:0),overflowing:Math.abs(h-c)<=1}}),[o,i,e.placeholder]),A=(0,u.A)((()=>{const e=y.current,t=S();if(!e||!t||m(t))return!1;const n=t.outerHeightStyle;return null!=C.current&&C.current!==n})),E=r.useCallback((()=>{const e=y.current,t=S();if(!e||!t||m(t))return;const n=t.outerHeightStyle;C.current!==n&&(C.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""}),[S]),k=r.useRef(-1);return(0,c.A)((()=>{const e=(0,a.A)(E),t=y?.current;if(!t)return;const n=(0,d.A)(t);let o;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver((()=>{A()&&(o.unobserve(t),cancelAnimationFrame(k.current),E(),k.current=requestAnimationFrame((()=>{o.observe(t)})))})),o.observe(t)),()=>{e.clear(),cancelAnimationFrame(k.current),n.removeEventListener("resize",e),o&&o.disconnect()}}),[S,E,A]),(0,c.A)((()=>{E()})),(0,h.jsxs)(r.Fragment,{children:[(0,h.jsx)("textarea",{value:g,onChange:e=>{v||E();const t=e.target,o=t.value.length,r=t.value.endsWith("\n"),i=t.selectionStart===o;r&&i&&t.setSelectionRange(o,o),n&&n(e)},ref:w,rows:i,style:s,...b}),(0,h.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:x,tabIndex:-1,style:{...f,...s,paddingTop:0,paddingBottom:0}})]})}));var b,v=n(10104),y=n(93583),w=n(1713),C=n(76761),x=n(26739),S=n(4977),A=n(39241),E=n(20439),k=n(39407),R=n(30301),M=n(37313),I=n(99692),P=n(26410);const T=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,k.A)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},O=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},$=(0,x.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:T})((0,A.A)((({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${P.A.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]})))),D=(0,x.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:O})((0,A.A)((({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},r=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${P.A.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":r,"&:focus::-moz-placeholder":r,"&:focus::-ms-input-placeholder":r},[`&.${P.A.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}}))),N=(0,S.Dp)({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),L=r.forwardRef((function(e,t){const n=(0,E.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:l,autoFocus:c,className:u,color:d,components:p={},componentsProps:f={},defaultValue:m,disabled:x,disableInjectingGlobalStyles:S,endAdornment:A,error:T,fullWidth:O=!1,id:L,inputComponent:H="input",inputProps:z={},inputRef:F,margin:j,maxRows:B,minRows:_,multiline:V=!1,name:W,onBlur:G,onChange:K,onClick:U,onFocus:q,onKeyDown:X,onKeyUp:Y,placeholder:Q,readOnly:J,renderSuffix:Z,rows:ee,size:te,slotProps:ne={},slots:oe={},startAdornment:re,type:ie="text",value:se,...ae}=n,le=null!=z.value?z.value:se,{current:ce}=r.useRef(null!=le),ue=r.useRef(),de=r.useCallback((e=>{}),[]),he=(0,R.A)(ue,F,z.ref,de),[pe,fe]=r.useState(!1),me=(0,C.A)(),ge=(0,y.A)({props:n,muiFormControl:me,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ge.focused=me?me.focused:pe,r.useEffect((()=>{!me&&x&&pe&&(fe(!1),G&&G())}),[me,x,pe,G]);const be=me&&me.onFilled,ve=me&&me.onEmpty,ye=r.useCallback((e=>{(0,I.lq)(e)?be&&be():ve&&ve()}),[be,ve]);(0,M.A)((()=>{ce&&ye({value:le})}),[le,ye,ce]),r.useEffect((()=>{ye(ue.current)}),[]);let we=H,Ce=z;V&&"input"===we&&(Ce=ee?{type:void 0,minRows:ee,maxRows:ee,...Ce}:{type:void 0,maxRows:B,minRows:_,...Ce},we=g),r.useEffect((()=>{me&&me.setAdornedStart(Boolean(re))}),[me,re]);const xe={...n,color:ge.color||"primary",disabled:ge.disabled,endAdornment:A,error:ge.error,focused:ge.focused,formControl:me,fullWidth:O,hiddenLabel:ge.hiddenLabel,multiline:V,size:ge.size,startAdornment:re,type:ie},Se=(e=>{const{classes:t,color:n,disabled:o,error:r,endAdornment:i,focused:a,formControl:l,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:h,size:p,startAdornment:f,type:m}=e,g={root:["root",`color${(0,k.A)(n)}`,o&&"disabled",r&&"error",c&&"fullWidth",a&&"focused",l&&"formControl",p&&"medium"!==p&&`size${(0,k.A)(p)}`,d&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",h&&"readOnly"],input:["input",o&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",h&&"readOnly"]};return(0,s.A)(g,P.g,t)})(xe),Ae=oe.root||p.Root||$,Ee=ne.root||f.root||{},ke=oe.input||p.Input||D;return Ce={...Ce,...ne.input??f.input},(0,h.jsxs)(r.Fragment,{children:[!S&&"function"==typeof N&&(b||(b=(0,h.jsx)(N,{}))),(0,h.jsxs)(Ae,{...Ee,ref:t,onClick:e=>{ue.current&&e.currentTarget===e.target&&ue.current.focus(),U&&U(e)},...ae,...!(0,v.A)(Ae)&&{ownerState:{...xe,...Ee.ownerState}},className:(0,i.A)(Se.root,Ee.className,u,J&&"MuiInputBase-readOnly"),children:[re,(0,h.jsx)(w.A.Provider,{value:null,children:(0,h.jsx)(ke,{"aria-invalid":ge.error,"aria-describedby":a,autoComplete:l,autoFocus:c,defaultValue:m,disabled:ge.disabled,id:L,onAnimationStart:e=>{ye("mui-auto-fill-cancel"===e.animationName?ue.current:{value:"x"})},name:W,placeholder:Q,readOnly:J,required:ge.required,rows:ee,value:le,onKeyDown:X,onKeyUp:Y,type:ie,...Ce,...!(0,v.A)(ke)&&{as:we,ownerState:{...xe,...Ce.ownerState}},ref:he,className:(0,i.A)(Se.input,Ce.className,J&&"MuiInputBase-readOnly"),onBlur:e=>{G&&G(e),z.onBlur&&z.onBlur(e),me&&me.onBlur?me.onBlur(e):fe(!1)},onChange:(e,...t)=>{if(!ce){const t=e.target||ue.current;if(null==t)throw new Error((0,o.A)(1));ye({value:t.value})}z.onChange&&z.onChange(e,...t),K&&K(e,...t)},onFocus:e=>{q&&q(e),z.onFocus&&z.onFocus(e),me&&me.onFocus?me.onFocus(e):fe(!0)}})}),A,Z?Z({...ge,startAdornment:re}):null]})]})}))},80045:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(98587);function r(e,t){if(null==e)return{};var n,r,i=(0,o.A)(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},80436:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var o=n(96069),r=n(89379);const i=(0,r.A)((0,r.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"]},i),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"}}},80688:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var o=n(96540),r=n(21362),i=n(34164),s=n(93583),a=n(76761),l=n(39407),c=n(26739),u=n(39241),d=n(1321),h=n(20439),p=n(96148),f=n(1908);function m(e){return(0,f.Ay)("MuiFormLabel",e)}const g=(0,p.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var b=n(74848);const v=(0,c.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})((0,u.A)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter((0,d.A)()).map((([t])=>({props:{color:t},style:{[`&.${g.focused}`]:{color:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${g.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}}}]})))),y=(0,c.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk"})((0,u.A)((({theme:e})=>({[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}})))),w=o.forwardRef((function(e,t){const n=(0,h.b)({props:e,name:"MuiFormLabel"}),{children:o,className:c,color:u,component:d="label",disabled:p,error:f,filled:g,focused:w,required:C,...x}=n,S=(0,a.A)(),A=(0,s.A)({props:n,muiFormControl:S,states:["color","required","focused","disabled","error","filled"]}),E={...n,color:A.color||"primary",component:d,disabled:A.disabled,error:A.error,filled:A.filled,focused:A.focused,required:A.required},k=(e=>{const{classes:t,color:n,focused:o,disabled:i,error:s,filled:a,required:c}=e,u={root:["root",`color${(0,l.A)(n)}`,i&&"disabled",s&&"error",a&&"filled",o&&"focused",c&&"required"],asterisk:["asterisk",s&&"error"]};return(0,r.A)(u,m,t)})(E);return(0,b.jsxs)(v,{as:d,ownerState:E,className:(0,i.A)(k.root,c),ref:t,...x,children:[o,A.required&&(0,b.jsxs)(y,{ownerState:E,"aria-hidden":!0,className:k.asterisk,children:[" ","*"]})]})}));var C=n(98855);function x(e){return(0,f.Ay)("MuiInputLabel",e)}(0,p.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const S=(0,c.Ay)(w,{shouldForwardProp:e=>(0,C.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${g.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((0,u.A)((({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:n})=>"filled"===e&&t.shrink&&"small"===n,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]})))),A=o.forwardRef((function(e,t){const n=(0,h.b)({name:"MuiInputLabel",props:e}),{disableAnimation:o=!1,margin:c,shrink:u,variant:d,className:p,...f}=n,m=(0,a.A)();let g=u;void 0===g&&m&&(g=m.filled||m.focused||m.adornedStart);const v=(0,s.A)({props:n,muiFormControl:m,states:["size","variant","required","focused"]}),y={...n,disableAnimation:o,formControl:m,shrink:g,size:v.size,variant:v.variant,required:v.required,focused:v.focused},w=(e=>{const{classes:t,formControl:n,size:o,shrink:i,disableAnimation:s,variant:a,required:c}=e,u={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",o&&"medium"!==o&&`size${(0,l.A)(o)}`,a],asterisk:[c&&"asterisk"]},d=(0,r.A)(u,x,t);return{...t,...d}})(y);return(0,b.jsx)(S,{"data-shrink":g,ref:t,className:(0,i.A)(w.root,p),...f,ownerState:y,classes:w})}))},80886:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i,Y:()=>r});let o=0;const r=()=>(o+=1,`mui-tree-view-${o}`),i=({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),r=n(10786);const i=e=>e.label,s=(0,o.M)([i,(e,t)=>(0,r.EJ)(e,t)],((e,t)=>!(!t||!e)&&("boolean"==typeof e.isItemEditable?e.isItemEditable:e.isItemEditable(t)))),a=(0,o.M)([i,(e,t)=>t],((e,t)=>!!t&&e?.editedItemId===t));(0,o.M)(i,(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)},82227:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(34164),r=n(52658);const i=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t},s=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:s,externalForwardedProps:a,className:l}=e;if(!t){const e=(0,o.A)(n?.className,l,a?.className,s?.className),t={...n?.style,...a?.style,...s?.style},r={...n,...a,...s};return e.length>0&&(r.className=e),Object.keys(t).length>0&&(r.style=t),{props:r,internalRef:void 0}}const c=(0,r.A)({...a,...s}),u=i(s),d=i(a),h=t(c),p=(0,o.A)(h?.className,n?.className,l,a?.className,s?.className),f={...h?.style,...n?.style,...a?.style,...s?.style},m={...h,...n,...d,...u};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:h.ref}}},82284:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(t,{A:()=>o})},82345:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>G});var o=n(96540),r=n.t(o,2),i=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 f=()=>p.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),d.A.Modal);var m=n(60685);const g=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;o.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return p.push(t),h=f(),()=>{p=p.filter((e=>e!==t)),h=f()}}h=Object.assign({},d.A.Modal)}(null==t?void 0:t.Modal);return e}),[t]);const i=o.useMemo((()=>Object.assign(Object.assign({},t),{exist:!0})),[t]);return o.createElement(m.A.Provider,{value:i},n)};var b=n(15265),v=n(49806),y=n(50723),w=n(62279),C=n(45748),x=n(2616),S=n(20998),A=n(34552);const E=`-ant-${Date.now()}-${Math.random()}`;var k=n(98119),R=n(48224);var M=n(43210);const I=Object.assign({},r),{useId:P}=I,T=void 0===P?()=>"":P;var O=n(90754),$=n(39319);const D=o.createContext(!0);function N(e){const t=o.useContext(D),{children:n}=e,[,r]=(0,$.Ay)(),{motion:i}=r,s=o.useRef(!1);return s.current||(s.current=t!==i),s.current?o.createElement(D.Provider,{value:i},o.createElement(O.Kq,{motion:i},n)):n}const L=()=>null;var H=n(25905);const z=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let F,j,B,_;const V=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:h,anchor:p,form:f,locale:m,componentSize:C,direction:x,space:S,splitter:A,virtual:E,dropdownMatchSelectWidth:I,popupMatchSelectWidth:P,popupOverflow:O,legacyLocale:D,parentContext:F,iconPrefixCls:j,theme:B,componentDisabled:_,segmented:V,statistic:W,spin:G,calendar:K,carousel:U,cascader:q,collapse:X,typography:Y,checkbox:Q,descriptions:J,divider:Z,drawer:ee,skeleton:te,steps:ne,image:oe,layout:re,list:ie,mentions:se,modal:ae,progress:le,result:ce,slider:ue,breadcrumb:de,menu:he,pagination:pe,input:fe,textArea:me,empty:ge,badge:be,radio:ve,rate:ye,switch:we,transfer:Ce,avatar:xe,message:Se,tag:Ae,table:Ee,card:ke,tabs:Re,timeline:Me,timePicker:Ie,upload:Pe,notification:Te,tree:Oe,colorPicker:$e,datePicker:De,rangePicker:Ne,flex:Le,wave:He,dropdown:ze,warning:Fe,tour:je,tooltip:Be,popover:_e,popconfirm:Ve,floatButtonGroup:We,variant:Ge,inputNumber:Ke,treeSelect:Ue}=e,qe=o.useCallback(((t,n)=>{const{prefixCls:o}=e;if(n)return n;const r=o||F.getPrefixCls("");return t?`${r}-${t}`:r}),[F.getPrefixCls,e.prefixCls]),Xe=j||F.iconPrefixCls||w.pM,Ye=n||F.csp;((e,t)=>{const[n,o]=(0,$.Ay)();(0,i.IV)({theme:n,token:o,hashId:"",path:["ant-design-icons",e],nonce:()=>null==t?void 0:t.nonce,layer:{name:"antd"}},(()=>[(0,H.jz)(e)]))})(Xe,Ye);const Qe=function(e,t,n){var o;(0,c.rJ)("ConfigProvider");const r=e||{},i=!1!==r.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=T();return(0,a.A)((()=>{var o,a;if(!e)return t;const l=Object.assign({},i.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=r.cssVar)&&void 0!==o?o:i.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:null==n?void 0:n.prefixCls},"object"==typeof i.cssVar?i.cssVar:{}),"object"==typeof r.cssVar?r.cssVar:{}),{key:"object"==typeof r.cssVar&&(null===(a=r.cssVar)||void 0===a?void 0:a.key)||c});return Object.assign(Object.assign(Object.assign({},i),r),{token:Object.assign(Object.assign({},i.token),r.token),components:l,cssVar:u})}),[r,i],((e,t)=>e.some(((e,n)=>{const o=t[n];return!(0,M.A)(e,o,!0)}))))}(B,F.theme,{prefixCls:qe("")}),Je={csp:Ye,autoInsertSpaceInButton:r,alert:h,anchor:p,locale:m||D,direction:x,space:S,splitter:A,virtual:E,popupMatchSelectWidth:null!=P?P:I,popupOverflow:O,getPrefixCls:qe,iconPrefixCls:Xe,theme:Qe,segmented:V,statistic:W,spin:G,calendar:K,carousel:U,cascader:q,collapse:X,typography:Y,checkbox:Q,descriptions:J,divider:Z,drawer:ee,skeleton:te,steps:ne,image:oe,input:fe,textArea:me,layout:re,list:ie,mentions:se,modal:ae,progress:le,result:ce,slider:ue,breadcrumb:de,menu:he,pagination:pe,empty:ge,badge:be,radio:ve,rate:ye,switch:we,transfer:Ce,avatar:xe,message:Se,tag:Ae,table:Ee,card:ke,tabs:Re,timeline:Me,timePicker:Ie,upload:Pe,notification:Te,tree:Oe,colorPicker:$e,datePicker:De,rangePicker:Ne,flex:Le,wave:He,dropdown:ze,warning:Fe,tour:je,tooltip:Be,popover:_e,popconfirm:Ve,floatButtonGroup:We,variant:Ge,inputNumber:Ke,treeSelect:Ue},Ze=Object.assign({},F);Object.keys(Je).forEach((e=>{void 0!==Je[e]&&(Ze[e]=Je[e])})),z.forEach((t=>{const n=e[t];n&&(Ze[t]=n)})),void 0!==r&&(Ze.button=Object.assign({autoInsertSpace:r},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(i.J),nt=o.useMemo((()=>({prefixCls:Xe,csp:Ye,layer:tt?"antd":void 0})),[Xe,Ye,tt]);let ot=o.createElement(o.Fragment,null,o.createElement(L,{dropdownMatchSelectWidth:I}),t);const rt=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==f?void 0:f.validateMessages)||{})}),[et,null==f?void 0:f.validateMessages]);Object.keys(rt).length>0&&(ot=o.createElement(u.Provider,{value:rt},ot)),m&&(ot=o.createElement(g,{locale:m,_ANT_MARK__:"internalMark"},ot)),(Xe||Ye)&&(ot=o.createElement(s.A.Provider,{value:nt},ot)),C&&(ot=o.createElement(R.c,{size:C},ot)),ot=o.createElement(N,null,ot);const it=o.useMemo((()=>{const e=Qe||{},{algorithm:t,token:n,components:o,cssVar:r}=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 r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(e,["algorithm","token","components","cssVar"]),a=t&&(!Array.isArray(t)||t.length>0)?(0,i.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,i.an)(n.algorithm)),delete n.algorithm),l[e]=n}));const c=Object.assign(Object.assign({},y.A),n);return Object.assign(Object.assign({},s),{theme:a,token:c,components:l,override:Object.assign({override:c},l),cssVar:r})}),[Qe]);return B&&(ot=o.createElement(v.vG.Provider,{value:it},ot)),et.warning&&(ot=o.createElement(c._n.Provider,{value:et.warning},ot)),void 0!==_&&(ot=o.createElement(k.X,{disabled:_},ot)),o.createElement(w.QO.Provider,{value:et},ot)},W=e=>{const t=o.useContext(w.QO),n=o.useContext(m.A);return o.createElement(V,Object.assign({parentContext:t,legacyLocale:n},e))};W.ConfigContext=w.QO,W.SizeContext=R.A,W.config=e=>{const{prefixCls:t,iconPrefixCls:n,theme:o,holderRender:r}=e;void 0!==t&&(F=t),void 0!==n&&(j=n),"holderRender"in e&&(_=r),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()},r=(e,t)=>{const r=new x.Y(e),i=(0,C.cM)(r.toRgbString());n[`${t}-color`]=o(r),n[`${t}-color-disabled`]=i[1],n[`${t}-color-hover`]=i[4],n[`${t}-color-active`]=i[6],n[`${t}-color-outline`]=r.clone().setA(.2).toRgbString(),n[`${t}-color-deprecated-bg`]=i[0],n[`${t}-color-deprecated-border`]=i[2]};if(t.primaryColor){r(t.primaryColor,"primary");const e=new x.Y(t.primaryColor),i=(0,C.cM)(e.toRgbString());i.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(i[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&&r(t.successColor,"success"),t.warningColor&&r(t.warningColor,"warning"),t.errorColor&&r(t.errorColor,"error"),t.infoColor&&r(t.infoColor,"info"),`\n :root {\n ${Object.keys(n).map((t=>`--${e}-${t}: ${n[t]};`)).join("\n")}\n }\n `.trim()}(e,t);(0,S.A)()&&(0,A.BD)(n,`${E}-dynamic-theme`)}(F||w.yH,o):B=o)},W.useConfig=function(){return{componentDisabled:(0,o.useContext)(k.A),componentSize:(0,o.useContext)(R.A)}},Object.defineProperty(W,"SizeContext",{get:()=>R.A});const G=W},82348:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]}},82777:(e,t,n)=>{"use strict";n.d(t,{X4:()=>h,e$:()=>f,eM:()=>d,YL:()=>c,a:()=>g,Cg:()=>p,Me:()=>a,Nd:()=>m,Y9:()=>v,j4:()=>b});var o=n(4076);const r=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))};function i(e,t=0,n=1){return r(e,t,n)}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error((0,o.A)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error((0,o.A)(10,r))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:r}}const a=(e,t)=>{try{return(e=>{const t=s(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(t){return e}};function l(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return t.includes("rgb")?o=o.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),o=t.includes("color")?`${n} ${o.join(" ")}`:`${o.join(", ")}`,`${t}(${o})`}function c(e){e=s(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),a=(e,t=(e+n/30)%12)=>r-i*Math.max(Math.min(t-3,9-t,1),-1);let c="rgb";const u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),l({type:c,values:u})}function u(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(c(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e,t){const n=u(e),o=u(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function h(e,t){return e=s(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function p(e,t,n){try{return h(e,t)}catch(t){return e}}function f(e,t){if(e=s(e),t=i(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function m(e,t,n){try{return f(e,t)}catch(t){return e}}function g(e,t){if(e=s(e),t=i(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)}function b(e,t,n){try{return g(e,t)}catch(t){return e}}function v(e,t,n){try{return function(e,t=.15){return u(e)>.5?f(e,t):g(e,t)}(e,t)}catch(t){return e}}},83009:(e,t,n)=>{"use strict";var o=n(24994).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(57536)),i=o(n(82348));const s={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},r.default),timePickerLocale:Object.assign({},i.default)};s.lang.ok="确定",t.default=s},83508:(e,t,n)=>{"use strict";n.d(t,{A:()=>T});var o=n(96540),r=n(34164),i=n(21362),s=n(91092),a=n(26739),l=n(20439),c=n(78164),u=n(63984),d=n(47195),h=n(80688),p=n(98300),f=n(93583),m=n(76761),g=n(39241),b=n(39407),v=n(96148),y=n(1908);function w(e){return(0,y.Ay)("MuiFormHelperText",e)}const C=(0,v.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var x,S=n(74848);const A=(0,a.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${(0,b.A)(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((0,g.A)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${C.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${C.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]})))),E=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiFormHelperText"}),{children:o,className:s,component:a="p",disabled:c,error:u,filled:d,focused:h,margin:p,required:g,variant:v,...y}=n,C=(0,m.A)(),E=(0,f.A)({props:n,muiFormControl:C,states:["variant","size","disabled","error","filled","focused","required"]}),k={...n,component:a,contained:"filled"===E.variant||"outlined"===E.variant,variant:E.variant,size:E.size,disabled:E.disabled,error:E.error,filled:E.filled,focused:E.focused,required:E.required};delete k.ownerState;const R=(e=>{const{classes:t,contained:n,size:o,disabled:r,error:s,filled:a,focused:l,required:c}=e,u={root:["root",r&&"disabled",s&&"error",o&&`size${(0,b.A)(o)}`,n&&"contained",l&&"focused",a&&"filled",c&&"required"]};return(0,i.A)(u,w,t)})(k);return(0,S.jsx)(A,{as:a,className:(0,r.A)(R.root,s),ref:t,...y,ownerState:k,children:" "===o?x||(x=(0,S.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""})):o})}));var k=n(7388);function R(e){return(0,y.Ay)("MuiTextField",e)}(0,v.A)("MuiTextField",["root"]);var M=n(85078);const I={standard:c.A,filled:u.A,outlined:d.A},P=(0,a.Ay)(p.A,{name:"MuiTextField",slot:"Root"})({}),T=o.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiTextField"}),{autoComplete:o,autoFocus:a=!1,children:c,className:u,color:d="primary",defaultValue:p,disabled:f=!1,error:m=!1,FormHelperTextProps:g,fullWidth:b=!1,helperText:v,id:y,InputLabelProps:w,inputProps:C,InputProps:x,inputRef:A,label:T,maxRows:O,minRows:$,multiline:D=!1,name:N,onBlur:L,onChange:H,onFocus:z,placeholder:F,required:j=!1,rows:B,select:_=!1,SelectProps:V,slots:W={},slotProps:G={},type:K,value:U,variant:q="outlined",...X}=n,Y={...n,autoFocus:a,color:d,disabled:f,error:m,fullWidth:b,multiline:D,required:j,select:_,variant:q},Q=(e=>{const{classes:t}=e;return(0,i.A)({root:["root"]},R,t)})(Y),J=(0,s.A)(y),Z=v&&J?`${J}-helper-text`:void 0,ee=T&&J?`${J}-label`:void 0,te=I[q],ne={slots:W,slotProps:{input:x,inputLabel:w,htmlInput:C,formHelperText:g,select:V,...G}},oe={},re=ne.slotProps.inputLabel;"outlined"===q&&(re&&void 0!==re.shrink&&(oe.notched=re.shrink),oe.label=T),_&&(V&&V.native||(oe.id=void 0),oe["aria-describedby"]=void 0);const[ie,se]=(0,M.A)("root",{elementType:P,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,...X},ownerState:Y,className:(0,r.A)(Q.root,u),ref:t,additionalProps:{disabled:f,error:m,fullWidth:b,required:j,color:d,variant:q}}),[ae,le]=(0,M.A)("input",{elementType:te,externalForwardedProps:ne,additionalProps:oe,ownerState:Y}),[ce,ue]=(0,M.A)("inputLabel",{elementType:h.A,externalForwardedProps:ne,ownerState:Y}),[de,he]=(0,M.A)("htmlInput",{elementType:"input",externalForwardedProps:ne,ownerState:Y}),[pe,fe]=(0,M.A)("formHelperText",{elementType:E,externalForwardedProps:ne,ownerState:Y}),[me,ge]=(0,M.A)("select",{elementType:k.A,externalForwardedProps:ne,ownerState:Y}),be=(0,S.jsx)(ae,{"aria-describedby":Z,autoComplete:o,autoFocus:a,defaultValue:p,fullWidth:b,multiline:D,name:N,rows:B,maxRows:O,minRows:$,type:K,value:U,id:J,inputRef:A,onBlur:L,onChange:H,onFocus:z,placeholder:F,inputProps:he,slots:{input:W.htmlInput?de:void 0},...le});return(0,S.jsxs)(ie,{...se,children:[null!=T&&""!==T&&(0,S.jsx)(ce,{htmlFor:J,id:ee,...ue,children:T}),_?(0,S.jsx)(me,{"aria-describedby":Z,id:J,labelId:ee,value:U,input:be,...ge,children:c}):be,v&&(0,S.jsx)(pe,{id:Z,...fe,children:v})]})}))},83753:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var o=n(96540),r=n(55174);function i(){const e=o.useContext(r.k);if(void 0===e)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join("\n"));return e}},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 r{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,r=e?t.split(e):[t],i=r.length;for(let e=0;e<i&&(o=n=n[r[e]],n);e++);return o}static deepClone(e,t,n=[]){var o={}.__proto__,r=[].__proto__;for(var i in t||(t=Object.assign(Array.isArray(e)?[]:{},e)),e){let s,a,l=e[i];null==l||"object"!=typeof l||l.__proto__!==o&&l.__proto__!==r||(s=n.findIndex((e=>e.subject===l)),s>-1?t[i]=n[s].copy:(a=Object.assign(Array.isArray(l)?[]:{},l),n.unshift({subject:l,copy:a}),t[i]=this.deepClone(l,a,n)))}return t}}let i=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=r.elOffset(this.container);n-=e.left,o-=e.top}return{x:n,y:o}}elementPositionCoords(e,t="right"){var n,o,i,s=r.elOffset(e);switch(this.container!==document.body&&(n=r.elOffset(this.container),s.left-=n.left,s.top-=n.top),t){case"right":o=s.left+e.offsetWidth,i=s.top-1;break;case"bottom":o=s.left,i=s.top+e.offsetHeight;break;case"left":o=s.left,i=s.top-1;break;case"top":o=s.left,i=s.top;break;case"center":o=s.left+e.offsetWidth/2,i=s.top+e.offsetHeight/2}return{x:o,y:i,offset:s}}show(e,t){var n,o,r,i,s;return this.destroyed||this.table.destroyed||(e instanceof HTMLElement?(r=e,i=(s=this.elementPositionCoords(e,t)).offset,n=s.x,o=s.y):"number"==typeof e?(i={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,r,i,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",(e=>{e.stopPropagation()}))),this}_fitToScreen(e,t,n,o,r){var i=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,i?this.container.scrollHeight:0);t+this.element.offsetHeight>s&&(n?this.element.style.top="bottom"===r?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 i(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,r,i){return i.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 r,i="accessor"+(o.charAt(0).toUpperCase()+o.slice(1));e.definition[i]&&(r=this.lookupAccessor(e.definition[i]))&&(t=!0,n[i]={accessor:r,params:e.definition[i+"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(),i=r.deepClone(e.data||{});return this.table.columnManager.traverse((function(e){var r,s,a,l;e.modules.accessor&&(s=e.modules.accessor[n]||e.modules.accessor.accessor||!1)&&"undefined"!=(r=e.getFieldValue(i))&&(l=e.getComponent(),a="function"==typeof s.params?s.params(r,i,t,l,o):s.params,e.setFieldValue(i,s.accessor(r,i,t,a,l,o)))})),i}}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(((r,i)=>{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=>{r(e)})).catch((e=>{i(e),console.warn("Ajax Load Error - Invalid JSON returned",e)})):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),i(e))})).catch((e=>{console.error("Ajax Load Error - Connection Error: ",e),i(e)}))):(console.warn("Ajax Load Error - No URL Set"),r([]))}))}function f(e,t){var n=[];if(t=t||"",Array.isArray(e))e.forEach(((e,o)=>{n=n.concat(f(e,t?t+"["+o+"]":o))}));else if("object"==typeof e)for(var o in e)n=n.concat(f(e[o],t?t+"["+o+"]":o));else n.push({key:t,value:e});return n}var m={json:{headers:{"Content-Type":"application/json"},body:function(e,t,n){return JSON.stringify(n)}},form:{headers:{},body:function(e,t,n){var o=f(n),r=new FormData;return o.forEach((function(e){r.append(e.key,e.value)})),r}}};class g extends s{static moduleName="ajax";static defaultConfig=c;static defaultURLGenerator=h;static defaultLoaderPromise=p;static contentTypeFormatters=m;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=g.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||g.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||g.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 r=this.table.options.ajaxParams;return r&&("function"==typeof r&&(r=r.call(this.table)),o=Object.assign(Object.assign({},r),o)),o}requestDataCheck(e,t,n,o){return!((e||!this.url)&&"string"!=typeof e)}requestData(e,t,n,o,r){var i;return!r&&this.requestDataCheck(e)?(e&&this.setUrl(e),i=this.generateConfig(n),this.sendRequest(this.url,t,i)):r}setDefaultConfig(e={}){this.config=Object.assign({},g.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,r=[],i=[];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?r.push(t):n=!1})),n||(n=!0,r=[],t[0].forEach((function(e){var t=o.find((function(t){return e&&t.field&&e.trim()&&t.field.trim()===e.trim()}));t?r.push(t):n=!1})),n||(r=this.table.columnManager.columnsByIndex)),n&&t.shift(),t.forEach((function(e){var t={};e.forEach((function(e,n){r[n]&&(t[r[n].field]=e)})),i.push(t)})),i)}},y={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 w extends s{static moduleName="clipboard";static moduleExtensions=y;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=w.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=w.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 S 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 A{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 E={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=E;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||" "})):n.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,(n=>{this._formatColumnHeaderTitle(t,n||e.title||" ")})):this._formatColumnHeaderTitle(t,e.title||" ");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,r=o.length;for(let e=0;e<r&&(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,r=o.length;for(let e=0;e<r;e++)if(e==r-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 S(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 A(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&&r.elVisible(this.element),o={};return new Promise(((r,i)=>{"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 r=e.getFieldValue(t);o.getValue()!==r&&(o.setValueProcessData(r),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()),r()}))}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 I={avg:function(e,t,n){var o=0,r=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!==r?o.toFixed(r):o),parseFloat(o).toString()},max:function(e,t,n){var o=null,r=void 0!==n.precision&&n.precision;return e.forEach((function(e){((e=Number(e))>o||null===o)&&(o=e)})),null!==o?!1!==r?o.toFixed(r):o:""},min:function(e,t,n){var o=null,r=void 0!==n.precision&&n.precision;return e.forEach((function(e){((e=Number(e))<o||null===o)&&(o=e)})),null!==o?!1!==r?o.toFixed(r):o:""},sum:function(e,t,n){var o=0,r=void 0!==n.precision&&n.precision;return e.length&&e.forEach((function(e){e=Number(e),o+=isNaN(e)?0:Number(e)})),!1!==r?o.toFixed(r):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 P extends s{static moduleName="columnCalcs";static calculations=I;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":P.calculations[t.topCalc]?n.topCalc=P.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":P.calculations[t.bottomCalc]?n.botCalc=P.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 r=new S(this.genColumn,n);r.getElement(),r.column=o,r.setWidth(),o.cells.push(r),t.push(r),o.visible||r.hide()})),n.cells=t},n}generateRowData(e,t){var n,o,r={},i="top"==e?this.topCalcs:this.botCalcs,s="top"==e?"topCalc":"botCalc";return i.forEach((function(e){var i=[];e.modules.columnCalcs&&e.modules.columnCalcs[s]&&(t.forEach((function(t){i.push(e.getFieldValue(t))})),o=s+"Params",n="function"==typeof e.modules.columnCalcs[o]?e.modules.columnCalcs[o](i,t):e.modules.columnCalcs[o],e.setFieldValue(r,e.modules.columnCalcs[s](i,t,n)))})),r}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 T={csv:function(e,t={},n){var o=t.delimiter?t.delimiter:",",r=[],i=[];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&&(i[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('""')+'"')}})),r.push(t.join(o))}})),i.length&&r.unshift(i.join(o)),r=r.join("\n"),t.bom&&(r="\ufeff"+r),n(r,"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,r,i=[],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":i.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"),r=new o(u),t.autoTable&&(a="function"==typeof t.autoTable?t.autoTable(r)||{}:t.autoTable),d&&(a.didDrawPage=function(e){r.text(d,40,30)}),a.head=i,a.body=s,r.autoTable(a),t.documentProcessing&&t.documentProcessing(r),n(r.output("arraybuffer"),"application/pdf")},xlsx:function(e,t,n){var r=t.sheetName||"Sheet1",i=this.dependencyRegistry.lookup("XLSX"),s=i.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={},r={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 r=[];e.columns.forEach((function(e,t){e?(r.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}})):r.push("")})),t.push(r)})),i.utils.sheet_add_aoa(o,t),o["!ref"]=i.utils.encode_range(r),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(r),s.Sheets[r]=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}(i.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=T;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,r){var i=!1;if("function"==typeof e?i=e:O.downloaders[e]?i=O.downloaders[e]:console.warn("Download Error - No such download type found: ",e),i){var s=this.generateExportList(o);i.call(this.table,s,n||{},function(n,o){r?!0===r?this.triggerDownload(n,o,e,t,!0):r(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,r){var i=document.createElement("a"),s=this.table.options.downloadEncoder(e,t);s&&(r?window.open(window.URL.createObjectURL(s)):(o=o||"Tabulator."+("function"==typeof n?"txt":n),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(s,o):(i.setAttribute("href",window.URL.createObjectURL(s)),i.setAttribute("download",o),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,n){"intercept"===t&&this.download(n.type,"",n.options,n.active,n.intercept)}}function $(e,t){var n=t.mask,o=void 0!==t.maskLetterChar?t.maskLetterChar:"A",r=void 0!==t.maskNumberChar?t.maskNumberChar:"9",i=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*";function s(t){var a=n[t];void 0!==a&&a!==i&&a!==o&&a!==r&&(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 r:if(isNaN(a))return t.preventDefault(),t.stopPropagation(),!1;break;case i: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 D=class{constructor(e,t,n,o,r,i){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(i),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:r},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&&$(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,r,i,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((r=n[a])!==(i=o[a++]))return isFinite(r)&&isFinite(i)?("0"===r.charAt(0)&&(r="."+r),"0"===i.charAt(0)&&(i="."+i),r-i):r>i?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 N={input:function(e,t,n,o,r){var i=e.getValue(),s=document.createElement("input");if(s.setAttribute("type",r.search?"search":"text"),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),s.setAttribute(e,s.getAttribute(e)+r.elementAttributes["+"+e])):s.setAttribute(e,r.elementAttributes[e]);function a(e){null==i&&""!==s.value||s.value!==i?n(s.value)&&(i=s.value):o()}return s.value=void 0!==i?i:"",t((function(){"cell"===e.getType()&&(s.focus({preventScroll:!0}),s.style.height="100%",r.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()}})),r.mask&&$(s,r),s},textarea:function(e,t,n,o,r){var i=e.getValue(),s=r.verticalNavigation||"hybrid",a=String(null!=i?i:""),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",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),l.setAttribute(e,l.getAttribute(e)+r.elementAttributes["+"+e])):l.setAttribute(e,r.elementAttributes[e]);function u(t){null==i&&""!==l.value||l.value!==i?(n(l.value)&&(i=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(),r.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&&r.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()}})),r.mask&&$(l,r),l},number:function(e,t,n,o,r){var i=e.getValue(),s=r.verticalNavigation||"editor",a=document.createElement("input");if(a.setAttribute("type","number"),void 0!==r.max&&a.setAttribute("max",r.max),void 0!==r.min&&a.setAttribute("min",r.min),void 0!==r.step&&a.setAttribute("step",r.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),a.setAttribute(e,a.getAttribute(e)+r.elementAttributes["+"+e])):a.setAttribute(e,r.elementAttributes[e]);a.value=i;var l=function(e){c()};function c(){var e=a.value;isNaN(e)||""===e||(e=Number(e)),e!==i?n(e)&&(i=e):o()}return t((function(){"cell"===e.getType()&&(a.removeEventListener("blur",l),a.focus({preventScroll:!0}),a.style.height="100%",a.addEventListener("blur",l),r.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()}})),r.mask&&$(a,r),a},range:function(e,t,n,o,r){var i=e.getValue(),s=document.createElement("input");if(s.setAttribute("type","range"),void 0!==r.max&&s.setAttribute("max",r.max),void 0!==r.min&&s.setAttribute("min",r.min),void 0!==r.step&&s.setAttribute("step",r.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),s.setAttribute(e,s.getAttribute(e)+r.elementAttributes["+"+e])):s.setAttribute(e,r.elementAttributes[e]);function a(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!=i?n(e)&&(i=e):o()}return s.value=i,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,r){var i=r.format,s=r.verticalNavigation||"editor",a=i?window.DateTime||luxon.DateTime:null,l=e.getValue(),c=document.createElement("input");function u(e){return(a.isDateTime(e)?e:"iso"===i?a.fromISO(String(e)):a.fromFormat(String(e),i)).toFormat("yyyy-MM-dd")}if(c.type="date",c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",r.max&&c.setAttribute("max",i?u(r.max):r.max),r.min&&c.setAttribute("min",i?u(r.min):r.min),r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),c.setAttribute(e,c.getAttribute(e)+r.elementAttributes["+"+e])):c.setAttribute(e,r.elementAttributes[e]);function d(){var e,t=c.value;if(null==l&&""!==t||t!==l){if(t&&i)switch(e=a.fromFormat(String(t),"yyyy-MM-dd"),i){case!0:t=e;break;case"iso":t=e.toISO();break;default:t=e.toFormat(i)}n(t)&&(l=c.value)}else o()}return l=void 0!==l?l:"",i&&(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%",r.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,r){var i,s=r.format,a=r.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",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),u.setAttribute(e,u.getAttribute(e)+r.elementAttributes["+"+e])):u.setAttribute(e,r.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?(i=l.isDateTime(c)?c:"iso"===s?l.fromISO(String(c)):l.fromFormat(String(c),s),c=i.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%",r.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,r){var i,s=r.format,a=r.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",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),u.setAttribute(e,u.getAttribute(e)+r.elementAttributes["+"+e])):u.setAttribute(e,r.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?(i=l.isDateTime(c)?c:"iso"===s?l.fromISO(String(c)):l.fromFormat(String(c),s),c=i.toFormat("yyyy-MM-dd")+"T"+i.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%",r.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,r){return new D(this,e,t,n,o,r).input},star:function(e,t,n,o,r){var i=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"==i.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"==i.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 f(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 m(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",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),d.setAttribute(e,d.getAttribute(e)+r.elementAttributes["+"+e])):d.setAttribute(e,r.elementAttributes[e]);for(var g=1;g<=l;g++)f(g);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:m(a+1);break;case 37:m(a-1);break;case 13:n(a);break;case 27:o()}})),d},progress:function(e,t,n,o,r){var i,s,a=e.getElement(),l=void 0===r.max?a.getElementsByTagName("div")[0]&&a.getElementsByTagName("div")[0].getAttribute("max")||100:r.max,c=void 0===r.min?a.getElementsByTagName("div")[0]&&a.getElementsByTagName("div")[0].getAttribute("min")||0:r.min,u=(l-c)/100,d=e.getValue()||0,h=document.createElement("div"),p=document.createElement("div");function f(){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%",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),p.setAttribute(e,p.getAttribute(e)+r.elementAttributes["+"+e])):p.setAttribute(e,r.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){i=e.screenX,s=p.offsetWidth})),h.addEventListener("mouseover",(function(){h.style.cursor="ew-resize"})),a.addEventListener("mousemove",(function(e){i&&(p.style.width=s+e.screenX-i+"px")})),a.addEventListener("mouseup",(function(e){i&&(e.stopPropagation(),e.stopImmediatePropagation(),i=!1,s=!1,f())})),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:f();break;case 27:o()}})),a.addEventListener("blur",(function(){o()})),p},tickCross:function(e,t,n,o,r){var i=e.getValue(),s=document.createElement("input"),a=r.tristate,l=void 0===r.indeterminateValue?null:r.indeterminateValue,c=!1,u=Object.keys(r).includes("trueValue"),d=Object.keys(r).includes("falseValue");if(s.setAttribute("type","checkbox"),s.style.marginTop="5px",s.style.boxSizing="border-box",r.elementAttributes&&"object"==typeof r.elementAttributes)for(let e in r.elementAttributes)"+"==e.charAt(0)?(e=e.slice(1),s.setAttribute(e,s.getAttribute(e)+r.elementAttributes["+"+e])):s.setAttribute(e,r.elementAttributes[e]);function h(e){var t=s.checked;return u&&t?t=r.trueValue:d&&!t&&(t=r.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=i,!a||void 0!==i&&i!==l&&""!==i||(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?i===r.trueValue:!0===i||"true"===i||"True"===i||1===i,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,r){var i,s,a=e._getSelf().column;return i=r.editorLookup?r.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),r.paramsLookup&&(s="function"==typeof r.paramsLookup?r.paramsLookup(i,e):r.paramsLookup[i]),this.table.modules.edit.lookupEditor(i,a).call(this,e,t,n,o,s||{})}};class L extends s{static moduleName="edit";static editors=N;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&&r.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&&r.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 r=this.table.rowManager.element.scrollLeft,i=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,s=e.getElement();this.table.modExists("frozenColumns")&&(r+=parseInt(this.table.modules.frozenColumns.leftMargin||0),i-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),"virtual"===this.table.options.renderHorizontal&&(r-=parseInt(this.table.columnManager.renderer.vDomPadLeft),i-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),s.offsetLeft<r?this.table.rowManager.element.scrollLeft-=r-s.offsetLeft:s.offsetLeft+s.offsetWidth>i&&(this.table.rowManager.element.scrollLeft+=s.offsetLeft+s.offsetWidth-i)}}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,r,i,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),r=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,r)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,r),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",r),i="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(r):e.column.modules.edit.params,o=e.column.modules.edit.editor.call(s,r,(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()}),i),!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 H{constructor(e,t,n,o){this.type=e,this.columns=t,this.component=n||!1,this.indent=o||0}}class z{constructor(e,t,n,o,r){this.value=e,this.component=t||!1,this.width=n,this.height=o,this.depth=r}}var F={},j={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=F;static rowLookups=j;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 r,i,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)))),r=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders(s)):[],s&&(s=s.map((e=>e.getComponent()))),i=this.bodyToExportRows(this.rowLookup(n),s),r.concat(i)}generateTable(e,t,n,o){var r=this.generateExportList(e,t,n,o);return this.generateTableElement(r)}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 r(e,o){var i=n-o;if(void 0===t[o]&&(t[o]=[]),e.height=e.subGroups?1:i-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){r(e,o+1)}))}return e.forEach((function(e){e.depth>n&&(n=e.depth)})),e.forEach((function(e){r(e,0)})),t.forEach((e=>{var t=[];e.forEach((e=>{if(e){let n=void 0===e.title?"":e.title;t.push(new z(n,e.column.getComponent(),e.width,e.height,e.depth))}else t.push(null)})),o.push(new H("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 r=e.getData(this.colVisProp),i=[],s=0;switch(e.type){case"group":s=e.level,i.push(new z(e.key,e.getComponent(),t.length,1));break;case"calc":case"row":t.forEach((e=>{i.push(new z(e._column.getFieldValue(r),e,1,1))})),this.table.options.dataTree&&!1!==this.config.dataTree&&(s=e.modules.dataTree.index)}n.push(new H(e.type,i,e.getComponent(),s))})),n}generateTableElement(e){var t=document.createElement("table"),n=document.createElement("thead"),o=document.createElement("tbody"),r=this.lookupTableStyles(),i=this.table.options["rowFormatter"+this.colVisPropAttach],s={};return s.rowFormatter=null!==i?i: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 i;switch(e.type){case"header":n.appendChild(this.generateHeaderElement(e,s,r));break;case"group":o.appendChild(this.generateGroupElement(e,s,r));break;case"calc":o.appendChild(this.generateCalcElement(e,s,r));break;case"row":i=this.generateRowElement(e,s,r),this.mapElementStyles(t%2&&r.evenRow?r.evenRow:r.oddRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),o.appendChild(i)}})),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"),r=document.createElement("td"),i=e.columns[0];return o.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?i.value=t.groupHeader[e.indent](i.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1!==t.groupHeader&&(i.value=e.component._group.generator(i.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),r.colSpan=i.width,r.innerHTML=i.value,o.classList.add("tabulator-print-table-group"),o.classList.add("tabulator-group-level-"+e.indent),i.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,r,["padding-top","padding-left","padding-right","padding-bottom"]),o.appendChild(r),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(((r,i)=>{if(r){var s,a,l=document.createElement("td"),c=r.component._column,u=this.table,d=u.columnManager.findColumnIndex(c),h=r.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==i)&&(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 r=this.generateExportList(n||this.table.options.htmlOutputConfig,t,e,o||"htmlOutput");return this.generateHTMLTable(r)}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 r=window.getComputedStyle(e);n.forEach((function(e){t.style[o[e]]||(t.style[o[e]]=r.getPropertyValue(e))}))}}}}var _={"=":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 r=e.toLowerCase().split(void 0===o.separator?" ":o.separator),i=String(null==t?"":t).toLowerCase(),s=[];return r.forEach((e=>{i.includes(e)&&s.push(!0)})),o.matchAll?s.length===r.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 V extends s{static moduleName="filter";static filters=_;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 r,i="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":V.filters[e.definition.headerFilterFunc]?(s=e.definition.headerFilterFunc,r=function(n){var o=e.definition.headerFilterFuncParams||{},r=e.getFieldValue(n);return o="function"==typeof o?o(t,r,n):o,V.filters[e.definition.headerFilterFunc](t,r,n,o)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":s=r=function(n){var o=e.definition.headerFilterFuncParams||{},r=e.getFieldValue(n);return o="function"==typeof o?o(t,r,n):o,e.definition.headerFilterFunc(t,r,n,o)}}r||("partial"===i?(r=function(n){var o=e.getFieldValue(n);return null!=o&&String(o).toLowerCase().indexOf(String(t).toLowerCase())>-1},s="like"):(r=function(n){return e.getFieldValue(n)==t},s="=")),n.headerFilters[o]={value:t,func:r,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,r,i,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]?(r=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":r=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?r=e.modules.edit.editor:e.definition.formatter&&d.table.modules.edit.editors[e.definition.formatter]?(r=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})):r=d.table.modules.edit.editors.input}if(r){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,!(i=r.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(!(i instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",i);d.langBind("headerFilters|columns|"+e.definition.field,(function(t){i.setAttribute("placeholder",void 0!==t&&t?t:e.definition.headerFilterPlaceholder||d.langText("headerFilters|default"))})),i.addEventListener("click",(function(e){e.stopPropagation(),i.focus()})),i.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(i.value)}),d.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=i,e.modules.filter.attrType=i.hasAttribute("type")?i.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=i.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)&&(i.addEventListener("keyup",l),i.addEventListener("search",l),"number"==e.modules.filter.attrType&&i.addEventListener("change",(function(e){h(i.value)})),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&i.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||i.addEventListener("mousedown",(function(e){e.stopPropagation()}))),o.appendChild(i),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 r=!1;Array.isArray(e)||(e=[{field:e,type:t,value:n,params:o}]),e.forEach((e=>{(e=this.findFilter(e))&&(this.filterList.push(e),r=!0)})),r&&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||{})}:V.filters[e.type]?n=(t=this.table.columnManager.getColumnByField(e.field))?function(n){return V.filters[e.type](e.value,t.getFieldValue(n),n,e.params||{})}:function(t){return V.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 r=[],i=[];return Array.isArray(t)||(t=[{field:t,type:n,value:o}]),t.forEach((e=>{(e=this.findFilter(e))&&i.push(e)})),this.table.rowManager.rows.forEach((t=>{var n=!0;i.forEach((e=>{this.filterRecurse(e,t.getData())||(n=!1)})),n&&r.push("data"===e?t.getData("data"):t.getComponent())})),r}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 r in this.filterList.forEach((e=>{this.filterRecurse(e,o)||(n=!1)})),this.headerFilters)this.headerFilters[r].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 W={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,r,i,s,a,l=parseFloat(e.getValue()),c="",u=t.decimal||".",d=t.thousand||",",h=t.negativeSign||"-",p=t.symbol||"",f=!!t.symbolAfter,m=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!==m?l.toFixed(m):l,r=(o=String(o).split("."))[0],i=o.length>1?u+o[1]:"",!1!==t.thousand)for(s=/(\d+)(\d{3})/;s.test(r);)r=r.replace(s,"$1"+d+"$2");return a=r+i,!0===c?(a="("+a+")",f?a+p:p+a):f?c+a+p:c+p+a},link:function(e,t,n){var o,i=e.getValue(),s=t.urlPrefix||"",a=t.download,l=i,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(),i=r.retrieveNestedData(this.table.options.nestedFieldSeparator,t.urlField,o)),t.url)switch(typeof t.url){case"string":i=t.url;break;case"function":i=t.url(e)}return c.setAttribute("href",s+i),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" "},image:function(e,t,n){var o=document.createElement("img"),r=e.getValue();switch(t.urlPrefix&&(r=t.urlPrefix+e.getValue()),t.urlSuffix&&(r+=t.urlSuffix),o.setAttribute("src",r),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(),r=e.getElement(),i=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)?(r.setAttribute("aria-checked",!0),l||""):!i||"null"!==o&&""!==o&&null!=o?(r.setAttribute("aria-checked",!1),c||""):(r.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,n){var o,r=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),i=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!==r)return(o=r.isDateTime(l)?l:"iso"===i?r.fromISO(String(l)):r.fromFormat(String(l),i)).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,r=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),i=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:r.now(),d=e.getValue();if(void 0!==r)return(o=r.isDateTime(d)?d:"iso"===i?r.fromISO(String(d)):r.fromFormat(String(d),i)).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(),r=e.getElement(),i=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,i));for(var l=1;l<=i;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 r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",r.setAttribute("aria-label",o),s},traffic:function(e,t,n){var o,r,i=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(i)&&void 0!==e.getValue()){switch(s.classList.add("tabulator-traffic-light"),r=parseFloat(i)<=a?parseFloat(i):a,r=parseFloat(r)>=l?parseFloat(r):l,o=(a-l)/100,r=Math.round((r-l)/o),typeof c){case"string":u=c;break;case"function":u=c(i);break;case"object":if(Array.isArray(c)){var d=100/c.length,h=Math.floor(r/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,r,i,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(r=parseFloat(l)<=u?parseFloat(l):u,r=parseFloat(r)>=d?parseFloat(r):d,o=(u-d)/100,r=Math.round((r-d)/o),typeof t.color){case"string":i=t.color;break;case"function":i=t.color(l);break;case"object":if(Array.isArray(t.color)){let e=100/t.color.length,n=Math.floor(r/e);n=Math.min(n,t.color.length-1),n=Math.max(n,0),i=t.color[n];break}default:i="#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(r/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",r);var p=document.createElement("div");p.style.display="inline-block",p.style.width=r+"%",p.style.backgroundColor=i,p.style.height="100%",p.setAttribute("data-max",u),p.setAttribute("data-min",d);var f=document.createElement("div");if(f.style.position="relative",f.style.width="100%",f.style.height="100%",s){var m=document.createElement("div");m.style.position="absolute",m.style.top=0,m.style.left=0,m.style.textAlign=h,m.style.width="100%",m.style.color=a,m.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(f),f.appendChild(p),s&&f.appendChild(m)})),""},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,r,i=e.getValue(),s=t.size||15,a=s+"px",l=!t.hasOwnProperty("onValue")||t.onValue,c=!!t.hasOwnProperty("offValue")&&t.offValue,u=t.onTruthy?i:i===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)})),(r=document.createElement("div")).classList.add("tabulator-toggle-switch"),r.style.height=a,r.style.width=a,r.style.borderRadius=a,o.appendChild(r),o},rownum:function(e,t,n){var o=document.createElement("span"),r=e.getRow(),i=e.getTable();return r.watchPosition((e=>{t.relativeToPage&&(e+=i.modules.page.getPageSize()*(i.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,r;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&&(r="function"==typeof t.paramsLookup?t.paramsLookup(o,e):t.paramsLookup[o]),this.table.modules.format.lookupFormatter(o).call(this,e,r||{},n)},array:function(e,t,n){var o,i=t.delimiter||",",s=e.getValue(),a=this.table;return t.valueMap&&(o="string"==typeof t.valueMap?function(e){return e.map((e=>r.retrieveNestedData(a.options.nestedFieldSeparator,t.valueMap,e)))}:t.valueMap),Array.isArray(s)?(o&&(s=o(s)),s.join(i)):s},json:function(e,t,n){var o=t.indent||"\t",r=void 0===t.multiline||t.multiline,i=t.replacer||null,s=e.getValue();return r&&(e.getElement().style.whiteSpace="pre-wrap"),JSON.stringify(s,i,o)}};class G extends s{static moduleName="format";static formatters=W;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,r,i,s;return e.definition.titleFormatter?(o=this.lookupFormatter(e.definition.titleFormatter),i=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},r="function"==typeof(r=e.definition.titleFormatterParams||{})?r():r,o.call(this,s,r,i)):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 r(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,r)}return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=/]/g,(function(e){return t[e]}))}return e}emptyToSpace(e){return null==e||""===e?" ":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,r,i,s){this.groupManager=e,this.parent=t,this.key=o,this.level=n,this.field=r,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=i,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 r=this.rows.indexOf(t);r>-1?n?this.rows.splice(r+1,0,e):this.rows.splice(r,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,r.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()}},X={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()}},Y={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=Y;static undoers=q;static redoers=X;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 S&&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,r=!1;for(let i=0;i<e.length;i++){let s=e[i],a=e[i+1];t[n]||(t[n]=[]),t[n][o]||(t[n][o]=""),'"'==s&&r&&'"'==a?(t[n][o]+=s,i++):'"'!=s?","!=s||r?"\r"!=s||"\n"!=a||r?"\r"!=s&&"\n"!=s||r?t[n][o]+=s:(o=0,n++):(o=0,n++,i++):o++:r=!r}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,r){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 r=document.createElement("input");r.type="file",r.accept=e,r.addEventListener("change",(e=>{var i=r.files[0],s=new FileReader,a=this.validateFile(i);if(!0===a){switch(this.dispatch("import-importing",r.files),this.dispatchExternal("importImporting",r.files),t||this.table.options.importReader){case"buffer":s.readAsArrayBuffer(i);break;case"binary":s.readAsBinaryString(i);break;case"url":s.readAsDataURL(i);break;default:s.readAsText(i)}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"),r.click()}))}importData(e,t){var n;return this.table.dataLoader.alertLoader(),new Promise(((o,r)=>{setTimeout((()=>{(n=e.call(this.table,t))instanceof Promise||n?o(n):r()}),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 r=o[t];r&&(n[r.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()}},re={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 ie extends s{static moduleName="moveRow";static senders=oe;static receivers=re;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-r.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-r.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,r,i,s,a,l=!1;t.addEventListener("touchstart",(t=>{this.checkTimeout=setTimeout((()=>{this.touchMove=!0,n=e.nextRow(),r=n?n.getHeight()/2:0,o=e.prevRow(),i=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>r&&(u=n)!==e&&(l=t.touches[0].pageY,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement().nextSibling),this.moveRow(u,!0)):o&&-c-a>i&&(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=r,r=n?n.getHeight()/2:0,o=u.prevRow(),a=i,i=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,r=this.touchMove?e.touches[0].pageX:e.pageX,i=this.touchMove?e.touches[0].pageY:e.pageY;n=t.getElement(),this.connection?(o=n.getBoundingClientRect(),this.startX=o.left-r+window.pageXOffset,this.startY=o.top-i+window.pageYOffset):this.startY=i-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=ie.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=ie.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 r,i="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));e.definition[i]&&(r=this.lookupMutator(e.definition[i]))&&(t=!0,n[i]={mutator:r,params:e.definition[i+"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,r="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&this.table.columnManager.traverse((i=>{var s,a,l;i.modules.mutate&&(s=i.modules.mutate[r]||i.modules.mutate.mutator||!1)&&(o=i.getFieldValue(void 0!==n?n:e),("data"==t&&!n||void 0!==o)&&(l=i.getComponent(),a="function"==typeof s.params?s.params(o,e,t,l):s.params,i.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,r){var i=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+" ",i.appendChild(s),i.appendChild(a),i.appendChild(l),i.appendChild(c),i.appendChild(u)):(a.innerHTML=" 0 ",i.appendChild(s),i.appendChild(a),i.appendChild(u)),i},pages:function(e,t,n,o,r){var i=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=" "+r+" ",this.table.modules.localize.langBind("pagination|counter|pages",(e=>{u.innerHTML=e})),i.appendChild(s),i.appendChild(a),i.appendChild(l),i.appendChild(c),i.appendChild(u),i}};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,r=o.getDisplayRows();return t?r.length?n=r[0]:o.activeRows.length&&(n=o.activeRows[o.activeRows.length-1],t=!1):r.length&&(n=r[r.length-1],t=!(r.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,r,i=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&&(r||(r=n),i++))}return this._setPageCounter(s.length,i,r?s.indexOf(r)+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,r=document.cookie,i=e+"-"+t,s=r.indexOf(i+"=");return s>-1&&((n=(r=r.slice(s)).indexOf(";"))>-1&&(r=r.slice(0,n)),o=r.replace(i+"=","")),!!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,r)=>{var i,s=this._findColumn(e,t);s&&(n?i=Object.keys(t):!0===this.config.columns||null==this.config.columns?(i=Object.keys(s)).push("width"):i=this.config.columns,i.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,r={},i=e.getDefinition();e.isGroup?(r.title=i.title,r.columns=this.parseColumns(e.getColumns())):(r.field=e.getField(),!0===this.config.columns||null==this.config.columns?((o=Object.keys(i)).push("width"),o.push("visible")):o=this.config.columns,o.forEach((t=>{switch(t){case"width":r.width=e.getWidth();break;case"visible":r.visible=e.visible;break;default:"function"!=typeof i[t]&&-1===n.indexOf(t)&&(r[t]=i[t])}}))),t.push(r)})),t}}var pe={format:{formatters:{responsiveCollapse:function(e,t,n){var o=document.createElement("div"),r=e.getRow()._row.modules.responsiveLayout;function i(e){var t=r.element;r.open=e,t&&(r.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(),i(!r.open),e.getTable().rowManager.adjustTableSize()})),i(r.open),o}}}},fe={format:{formatters:{rowSelection:function(e,t,n){var o=document.createElement("input"),r=!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 i=e.getRow();i instanceof R?(o.addEventListener("change",(e=>{"click"===this.table.options.selectableRowsRangeMode&&r?r=!1:i.toggleSelect()})),"click"===this.table.options.selectableRowsRangeMode&&o.addEventListener("click",(e=>{r=!0,this.table.modules.selectRow.handleComplexRowClick(i._row,e)})),o.checked=i.isSelected&&i.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(i,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 me{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 ge 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,r=this._getTableRows().length;"column"===e.type?this.rangeManager.columnSelection&&("column"===this.rangeManager.selecting?this.setEnd(r-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(r-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,r,i,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),r=this.rangeManager.getCell(e,n),i=this.rangeManager.getCell(t,o),s=r.getElement(),a=i.getElement(),l=r.row.getElement(),c=i.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(),r={};n.forEach((e=>{r[e.field]=o[e.field]})),e.push(r)})),e}getCells(e,t){var n=[],o=this.getRows(),r=this.getColumns();return e?n=o.map((e=>{var n=[];return e.getCells().forEach((e=>{r.includes(e.column)&&n.push(t?e.getComponent():e)})),n})):o.forEach((e=>{e.getCells().forEach((e=>{r.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 me(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,r,i,s=[],a=this.table.modules.selectRange.activeRange,l=!1;return i=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),r=l?e.length:s.indexOf(t.end.row)-o+1,o>-1&&(this.table.blockRedraw(),(s=s.slice(o,o+r)).forEach(((t,n)=>{t.updateData(e[n%i])})),this.table.restoreRedraw()))),s}},pasteParsers:{range:function(e){var t,n,o,r,i,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&&(i=(r=this.table.columnManager.getVisibleColumnsByIndex()).indexOf(n.column))>-1)))&&(o=c?s[0].length:r.indexOf(t.end.column)-i+1,r=r.slice(i,i+o),s.forEach((e=>{var t={},n=e.length;r.forEach((function(o,r){t[o.field]=e[r%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,r,i,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"===i||"bottom"===c&&"asc"===i)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}var ye={number:function(e,t,n,o,r,i,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"===i||"bottom"===a&&"asc"===i)&&(u*=-1),u},string:function(e,t,n,o,r,i,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"===i||"bottom"===l&&"asc"===i)&&(c*=-1),c},date:function(e,t,n,o,r,i,s){return s.format||(s.format="dd/MM/yyyy"),ve.call(this,e,t,n,o,r,i,s)},time:function(e,t,n,o,r,i,s){return s.format||(s.format="HH:mm"),ve.call(this,e,t,n,o,r,i,s)},datetime:ve,boolean:function(e,t,n,o,r,i,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,i,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=>r.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,r,i,s){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,n,o,r,i,s){var a,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,f=/\d/,m=s.alignEmptyValues,g=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(!f.test(a)||!f.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}g=1}else g=t||0===t?-1:0;return("top"===m&&"desc"===i||"bottom"===m&&"asc"===i)&&(g*=-1),g}};class we extends s{static moduleName="sort";static sorters=ye;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 r=this.getSort();return r.forEach((e=>{delete e.column})),o.sort=r,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":we.sorters[e.definition.sorter]?o=we.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=[],r=!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)?(r=(o=this.getSort()).findIndex((t=>t.field===e.getField())),r>-1?(o[r].dir=n,r=o.splice(r,1)[0],"none"!=n&&o.push(r)):"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 we.sorters[o]}sort(e,t){var n=this,o=this.table.options.sortOrderReverse?n.sortList.slice().reverse():n.sortList,r=[],i=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",n.getSort()),t||n.clearColumnHeaders(),"remote"!==this.table.options.sortMode?(o.forEach((function(e,o){var i;e.column&&((i=e.column.modules.sort)&&(i.sorter||(i.sorter=n.findSorter(e.column)),e.params="function"==typeof i.params?i.params(e.column.getComponent(),e.dir):i.params,r.push(e)),t||n.setColumnHeader(e.column,e.dir))})),r.length&&n._sortItems(e,r)):t||o.forEach((function(e,t){n.setColumnHeader(e.column,e.dir)})),this.subscribedExternal("dataSorted")&&(e.forEach((e=>{i.push(e.getComponent())})),this.dispatchExternal("dataSorted",n.getSort(),i)),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 r,i=n;i>=0;i--){let n=t[i];if(0!==(r=this._sortRow(e,o,n.column,n.dir,n.params)))break}return r}))}_sortRow(e,t,n,o,r){var i,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:"",i=a.getComponent(),s=l.getComponent(),n.modules.sort.sorter.call(this,e,t,i,s,n.getComponent(),o,r)}}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 Se 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,r=[];return this.rowDefs.forEach((e=>{var t=[];this.columnFields.forEach((n=>{t.push(e[n])})),r.push(t)})),e||this.options("spreadsheetOutputFull")||(t=r.map((e=>e.findLastIndex((e=>void 0!==e))+1)),n=Math.max(...t),o=t.findLastIndex((e=>e>0))+1,r=(r=r.slice(0,o)).map((e=>e.slice(0,n)))),r}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 Ae={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,r=e.getData(),i=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(e){var n=e.getData();n!==r&&t==i.getFieldValue(n)&&(o=!1)})),o},required:function(e,t,n){return""!==t&&null!=t}};class Ee extends s{static moduleName="validate";static validators=Ae;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:Ee.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,r=[],i=this.invalidCells.indexOf(t);return e&&e.forEach((e=>{e.func.call(o,t.getComponent(),n,e.params)||r.push({type:e.type,parameters:e.params})})),t.modules.validate||(t.modules.validate={}),r.length?(t.modules.validate.invalid=r,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==i&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),i>-1&&this.invalidCells.splice(i,1)),!r.length||r}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:g,ClipboardModule:w,ColumnCalcsModule:P,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,r=[],i=[];return!1!==o.children&&(o.open||t)&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),r=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(r,n),r.forEach((e=>{i.push(e),this.getChildren(e,!1,!0).forEach((e=>{i.push(e)}))}))),i}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 r=!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!==(r=this.findChildIndex(o,e))&&e.data[this.field].splice(n?r:r+1,0,t),!1===r&&(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,r=[];return o&&o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),o.children.forEach((e=>{e instanceof M&&(r.push(t?e.getComponent():e),n&&this.getTreeChildren(e,t,n).forEach((e=>{r.push(e)})))}))),r}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:V,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,r)=>{if(o.modules.frozen.marginValue=n,o.modules.frozen.margin=o.modules.frozen.marginValue+"px",o.visible&&(n+=o.getWidth()),r==this.leftColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup){var i=this.getColGroupParentElement(o);t.includes(i)||(this.layoutElement(i,o),t.push(i)),i.classList.toggle("tabulator-frozen-left",o.modules.frozen.edge&&"left"===o.modules.frozen.position),i.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,r)=>(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,r=e instanceof U?e:e.modules.group;o===r?this.table.rowManager.moveRowInArray(o.rows,e,t,n):(r&&r.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,r=t+"_"+e;n=n||[],o=new U(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],n[r]),this.groups[r]=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],r=[];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 i=0;i<o.length;i++){var s=o[i].getElementsByTagName("td"),a={};this.hasIndex||(a[t.index]=i);for(var l=0;l<s.length;l++){var c=s[l];void 0!==this.fieldIndex[l]&&(a[this.fieldIndex[l]]=c.innerHTML)}r.push(a)}t.data=r,this.dispatchExternal("htmlImported")}_extractOptions(e,t,n){var o=e.attributes,r=n?Object.keys(n):Object.keys(t),i={};for(var s in r.forEach((e=>{i[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!==i[a]&&(t[i[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,r=e[n],i=!1,s=this._findCol(r.textContent);s?i=!0:s={title:r.textContent.trim()},s.field||(s.field=r.textContent.trim().toLowerCase().replaceAll(" ","_")),(o=r.getAttribute("width"))&&!s.width&&(s.width=o),this._extractOptions(r,s,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[n]=s.field,s.field==this.table.options.index&&(this.hasIndex=!0),i||this.table.options.columns.push(s)}}_generateBlankHeaders(e,t){for(var n=0;n<e.length;n++){var o=e[n],r={title:"",field:"col"+n};this.fieldIndex[n]=r.field;var i=o.getAttribute("width");i&&(r.width=i),this.table.options.columns.push(r)}}},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 r=this.touchWatchers[e];switch("column"===e&&(e="header"),t){case"start":r.tap=!0,clearTimeout(r.tapHold),r.tapHold=setTimeout((()=>{clearTimeout(r.tapHold),r.tapHold=null,r.tap=null,clearTimeout(r.tapDbl),r.tapDbl=null,this.dispatchEvent(e+"TapHold",n,o)}),1e3);break;case"end":r.tap&&(r.tap=null,this.dispatchEvent(e+"Tap",n,o)),r.tapDbl?(clearTimeout(r.tapDbl),r.tapDbl=null,this.dispatchEvent(e+"DblTap",n,o)):r.tapDbl=setTimeout((()=>{clearTimeout(r.tapDbl),r.tapDbl=null}),300),clearTimeout(r.tapHold),r.tapHold=null}}dispatchEvent(e,t,n){var o,r=n.getComponent();this.columnSubscribers[e]&&(n instanceof S?o=n.column.definition[e]:n instanceof k&&(o=n.definition[e]),o&&o(t,r)),this.dispatchExternal(e,t,r)}},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="⋮",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,r){var i,s=!(e instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),s||e.preventDefault(),n&&n.length){if(o)i=r.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=i=this.popup(a)}n.forEach((e=>{var n=document.createElement("div"),o=e.label,r=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 r&&(r=r.call(this.table,t.getComponent())),r?(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,i)})):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()})),i.show(o||e),i===this.rootPopup&&(this.rootPopup.hideOnBlur((()=>{this.rootPopup=null,this.currentComponent&&(this.dispatch("menu-closed",n,i),this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)})),this.currentComponent=t,this.dispatch("menu-opened",n,i),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)-r.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,r,i,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(),r=n?n.getWidth()/2:0,i=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-i>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>r&&(u=n)!==e&&(l=a.touches[0].pageX,u.getElement().parentNode.insertBefore(this.placeholderElement,u.getElement()),this.moveColumn(u,!1)),u&&(t=u.nextColumn(),i=o,o=t?t.getWidth()/2:0,n=u.prevColumn(),s=r,r=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(),i=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)-r.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-i.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,i=(this.touchMove?e.touches[0].pageX:e.pageX)-r.elOffset(n).left+o;this.hoverElement.style.left=i-this.startX+"px",i-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-i<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:ie,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="⋮",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 r;n._group?n=n._group:n._row&&(n=n._row),e="function"==typeof e?e.call(this.table,t,n.getComponent(),(function(e){r=e})):e,this.loadPopup(t,n,e,r,o)}loadPopup(e,t,n,o,r){var i,s,a=!(e instanceof MouseEvent);n instanceof HTMLElement?i=n:(i=document.createElement("div")).innerHTML=n,i.classList.add("tabulator-popup"),i.addEventListener("click",(e=>{e.stopPropagation()})),a||e.preventDefault(),s=this.popup(i),"function"==typeof o&&s.renderCallback(o),e?s.show(e):s.show(t.getElement(),r||"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,r,i=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(r="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=r:l.appendChild(r),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(i,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,r=Array.from(arguments);return n.blocked||t!==n.currentVersion||(n.block("data-push"),r.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,r=Array.from(arguments);return n.blocked||t!==n.currentVersion||(n.block("data-unshift"),r.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,r;return n.blocked||t!==n.currentVersion||(n.block("data-shift"),n.data.length&&(o=n.table.rowManager.getRowFromDataObject(n.data[0]))&&o.deleteActual(),r=n.origFuncs.shift.call(e),n.unblock("data-shift")),r}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var o,r;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(),r=n.origFuncs.pop.call(e),n.unblock("data-pop")),r}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var o,r,i=Array.from(arguments),s=i[0]<0?e.length+i[0]:i[0],a=i[1],l=!!i[2]&&i.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===i[1]?i[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(),r=n.origFuncs.splice.apply(e,arguments),n.unblock("data-splice")}return r}})}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 r=o.push.apply(n,arguments);this.rebuildTree(e),t.unblock("tree-push")}return r}}),o.unshift=n.unshift,Object.defineProperty(n,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var r=o.unshift.apply(n,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return r}}),o.shift=n.shift,Object.defineProperty(n,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var r=o.shift.call(n);this.rebuildTree(e),t.unblock("tree-shift")}return r}}),o.pop=n.pop,Object.defineProperty(n,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var r=o.pop.call(n);this.rebuildTree(e),t.unblock("tree-pop")}return r}}),o.splice=n.splice,Object.defineProperty(n,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var r=o.splice.apply(n,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return r}}))}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,r=Object.getOwnPropertyDescriptor(t,n),i=t[n],s=this.currentVersion;Object.defineProperty(t,n,{set:t=>{if(i=t,!o.blocked&&s===o.currentVersion){o.block("key");var a={};a[n]=t,e.updateData(a),o.unblock("key")}r.set&&r.set(t)},get:()=>(r.get&&r.get(),i)})}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 r=this,i=n.definition.resizable,s={},a=n.getLastColumn();if("header"===e&&(s={variableHeight:"textarea"==n.definition.formatter||n.definition.variableHeight}),(!0===i||i==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){r.startColumn=n,r.initialNextColumn=r.nextColumn=a.nextColumn(),r._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()&&(r.dispatch("column-resized",a),r.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,r=void 0===e.clientX?e.touches[0].clientX:e.clientX,i=r-this.startX,s=r-this.latestX;if(this.latestX=r,this.table.rtl&&(i=-i,s=-s),n=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(this.startWidth+i),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,r=n.getBoundingClientRect().x-this.table.element.getBoundingClientRect().x,i=this.table.element.getBoundingClientRect().x,s=t.element.getBoundingClientRect().left-i,a=o-this.startX,l=Math.max(r+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,r=this;function i(e){r.table.options.resizableColumnGuide?o.style.left=r.calcGuidePosition(e,t,n)+"px":r.resize(e,t)}function s(e){r.table.options.resizableColumnGuide&&(r.resize(e,t),o.remove()),r.startColumn.modules.edit&&(r.startColumn.modules.edit.blocked=!1),r.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",s),document.body.removeEventListener("mousemove",i),n.removeEventListener("touchmove",i),n.removeEventListener("touchend",s),r.table.element.classList.remove("tabulator-block-select"),r.startWidth!==t.getWidth()&&(r.table.columnManager.verticalAlignHeaders(),r.dispatch("column-resized",t),r.dispatchExternal("columnResized",t.getComponent()))}this.dispatchExternal("columnResizing",t.getComponent()),r.table.options.resizableColumnGuide&&((o=document.createElement("span")).classList.add("tabulator-col-resize-guide"),r.table.element.appendChild(o),setTimeout((()=>{o.style.left=r.calcGuidePosition(e,t,n)+"px"}))),r.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),r.startColumn.modules.edit&&(r.startColumn.modules.edit.blocked=!0),r.startX=void 0===e.clientX?e.touches[0].clientX:e.clientX,r.latestX=r.startX,r.startWidth=t.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",s),n.addEventListener("touchmove",i,{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 r=document.createElement("div");r.className="tabulator-row-resize-handle prev",o.addEventListener("click",(function(e){e.stopPropagation()}));var i=function(n){t.startRow=e,t._mouseDown(n,e,o)};o.addEventListener("mousedown",i),o.addEventListener("touchstart",i,{passive:!0}),r.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,r))};r.addEventListener("mousedown",s),r.addEventListener("touchstart",s,{passive:!0}),n.appendChild(o),n.appendChild(r)}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,r=n.getBoundingClientRect().y-this.table.element.getBoundingClientRect().y,i=this.table.element.getBoundingClientRect().y,s=t.element.getBoundingClientRect().top-i,a=o-this.startY;return Math.max(r+a,s)}_mouseDown(e,t,n){var o,r=this;function i(e){r.table.options.resizableRowGuide?o.style.top=r.calcGuidePosition(e,t,n)+"px":r.resize(e,t)}function s(e){r.table.options.resizableRowGuide&&(r.resize(e,t),o.remove()),document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",i),n.removeEventListener("touchmove",i),n.removeEventListener("touchend",s),r.table.element.classList.remove("tabulator-block-select"),r.dispatchExternal("rowResized",t.getComponent())}r.dispatchExternal("rowResizing",t.getComponent()),r.table.options.resizableRowGuide&&((o=document.createElement("span")).classList.add("tabulator-row-resize-guide"),r.table.element.appendChild(o),setTimeout((()=>{o.style.top=r.calcGuidePosition(e,t,n)+"px"}))),r.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),r.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,r.startHeight=t.getHeight(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",s),n.addEventListener("touchmove",i,{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((r=>{var i=r.getFieldValue(n);if(r.definition.title&&r.field)if(r.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){function s(e){e()}t={value:!1,data:{},getValue:function(){return i},getData:function(){return n},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return r.getComponent()},getTable:()=>this.table},o.push({field:r.field,title:r.definition.title,value:r.modules.format.formatter.call(this.table.modules.format,t,r.modules.format.params,s)})}else o.push({field:r.field,title:r.definition.title,value:i})})),o}formatCollapsedData(e){var t=document.createElement("table");return e.forEach((e=>{var n,o=document.createElement("tr"),r=document.createElement("td"),i=document.createElement("td"),s=document.createElement("strong");r.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),i.appendChild(n)):i.innerHTML=e.value,o.appendChild(r),o.appendChild(i),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,r,i,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)))),i={top:(o=this.activeRange).top,bottom:o.bottom,left:o.left,right:o.right},s=(r=t?o.end:o.start).row,a=r.col,e)switch(n){case"left":a=this.findJumpCellLeft(o.start.row,r.col);break;case"right":a=this.findJumpCellRight(o.start.row,r.col);break;case"up":s=this.findJumpCellUp(r.row,o.start.col);break;case"down":s=this.findJumpCellDown(r.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"),i.top!==o.top||i.bottom!==o.bottom||i.left!==o.left||i.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,r){return n&&(t=t.reverse()),this.findJumpItem(o,r,t,(function(t){return t.getData()[e.getField()]}))}findJumpCol(e,t,n,o,r){return n&&(t=t.reverse()),this.findJumpItem(o,r,t,(function(t){return e.getData()[t.getField()]}))}findJumpItem(e,t,n,o){var r;for(let i of n){let n=o(i);if(e){if(r=i,n)break}else if(t){if(r=i,n)break}else{if(!n)break;r=i}}return r}findJumpCellLeft(e,t){var n=this.getRowByRangePos(e),o=this.getTableColumns(),r=this.isEmpty(n.getData()[o[t].getField()]),i=!!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,r,i);return a?a.getPosition()-1:t}findJumpCellRight(e,t){var n=this.getRowByRangePos(e),o=this.getTableColumns(),r=this.isEmpty(n.getData()[o[t].getField()]),i=!!o[t+1]&&this.isEmpty(n.getData()[o[t+1].getField()]),s=this.findJumpCol(n,o.slice(t+1,o.length),!1,r,i);return s?s.getPosition()-1:t}findJumpCellUp(e,t){var n=this.getColumnByRangePos(t),o=this.getTableRows(),r=this.isEmpty(o[e].getData()[n.getField()]),i=!!o[e-1]&&this.isEmpty(o[e-1].getData()[n.getField()]),s=this.findJumpRow(n,o.slice(0,e),!0,r,i);return s?s.position-1:e}findJumpCellDown(e,t){var n=this.getColumnByRangePos(t),o=this.getTableRows(),r=this.isEmpty(o[e].getData()[n.getField()]),i=!!o[e+1]&&this.isEmpty(o[e+1].getData()[n.getField()]),s=this.findJumpRow(n,o.slice(e+1,o.length),!1,r,i);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,r=this.getCell(-1,-1);return o=this.rowHeader?this.getCell(0,1):this.getCell(0,0),void n.setBounds(o,r)}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,r,i,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},i=(r={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<r.bottom&&r.top<o.bottom&&o.bottom<r.bottom,r.left<o.left&&o.left<r.right&&r.left<o.right&&o.right<r.right||(o.left<r.left?s.scrollLeft=o.left-this.getRowHeaderWidth():o.right>r.right&&(s.scrollLeft=Math.min(o.right-s.clientWidth,o.left-this.getRowHeaderWidth()))),i||(o.top<r.top?s.scrollTop=o.top:o.bottom>r.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 ge(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=fe;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(),r=function(){setTimeout((function(){t.selecting=!1}),50),document.body.removeEventListener("mouseup",r)};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",r),document.body.addEventListener("keyup",r),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),r=n<=o?n:o,i=n>=o?n:o,s=this.table.rowManager.getDisplayRows().slice(0).splice(r,i-r+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,r=[];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))&&r.push(o)})),this._rowSelectionChanged(t,[],r)):n&&this._deselectRow(n,t,!0)}_deselectRow(e,t){var n,o,r=this,i=r.table.rowManager.findRow(e);if(i){if((n=r.selectedRows.findIndex((function(e){return e==i})))>-1)return(o=i.getElement())&&o.classList.remove("tabulator-selected"),i.modules.select||(i.modules.select={}),i.modules.select.selected=!1,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!1),r.selectedRows.splice(n,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!1),this.dispatchExternal("rowDeselected",i.getComponent()),r._rowSelectionChanged(t,void 0,i),i}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:we,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 Se(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 Se?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,r,i;"function"==typeof n&&(n=n(e,t.getComponent(),(function(e){r=e}))),n instanceof HTMLElement?o=n:(o=document.createElement("div"),!0===n&&(t instanceof S?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 r&&this.popupInstance.renderCallback(r),i=this.popupInstance.containerEventCoords(e),this.popupInstance.show(i.x+15,i.y+15).hideOnBlur((()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null})),this.dispatchExternal("TooltipOpened",t.getComponent()))}},ValidateModule:Ee}),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 Ie 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),i=e.getElement(),s=0;return new Promise(((a,l)=>{if(o>-1){if(void 0===n&&(n=this.table.options.scrollToRowIfVisible),!n&&r.elVisible(i)&&(s=r.elOffset(i).top-r.elOffset(this.elementVertical).top)>0&&s<this.elementVertical.clientHeight-i.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+(i.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-i.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-i.offsetTop)+i.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+i.offsetHeight;break;case"top":this.elementVertical.scrollTop=i.offsetTop}a()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")}))}}class Pe extends Ie{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 Te extends Ie{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",E),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:Te,basic:Pe};(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]],r=this.table.options.autoColumnsDefinitions;if(e&&e.length){if(o.forEach((e=>{Object.keys(e).forEach(((o,r)=>{let i,s=e[o];n[o]?!0!==n[o]&&void 0!==s&&(n[o].sorter=this.calculateSorterFromValue(s),n[o]=!0):(i={field:o,title:o,sorter:this.calculateSorterFromValue(s)},t.splice(r,0,i),n[o]=void 0!==s||i)}))})),r)switch(typeof r){case"function":this.table.options.columns=r.call(this.table,t);break;case"object":Array.isArray(r)?t.forEach((e=>{var t=r.find((t=>t.field===e.field));t&&Object.assign(e,t)})):t.forEach((e=>{r[e.field]&&Object.assign(e,r[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),r=o.getElement(),i=n?this.findColumnIndex(n):n;if(!t||!this.rowHeader||n&&n!==this.rowHeader||(t=!1,n=this.rowHeader,i=0),n&&i>-1){var s=n.getTopColumn(),a=this.columns.indexOf(s),l=s.getElement();t?(this.columns.splice(a,0,o),l.parentNode.insertBefore(r,l)):(this.columns.splice(a+1,0,o),l.parentNode.insertBefore(r,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 A?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,r){var i,s=e.indexOf(t);s>-1&&(e.splice(s,1),(i=e.indexOf(n))>-1?o&&(i+=1):i=s,e.splice(i,0,t),r&&(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(i,0,t)}})))}scrollToColumn(e,t,n){var o=0,r=e.getLeftOffset(),i=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":i=-this.element.clientWidth/2;break;case"right":i=s.clientWidth-this.headersElement.clientWidth}if(!n&&r>0&&r+s.offsetWidth<this.element.clientWidth)return!1;o=r+i,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,r,i;n.visible&&(o=n.definition.width||0,r=parseInt(n.minWidth),i="string"==typeof o?o.indexOf("%")>-1?e/100*parseInt(o):parseInt(o):o,t+=i>r?i:r)})),t}addColumn(e,t,n){return new Promise(((o,r)=>{var i=this._addColumn(e,t,n);this._reIndexColumns(),this.dispatch("column-add",e,t,n),"fitColumns"!=this.layoutMode()&&i.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),o(i)}))}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){r.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 $e extends Ie{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=r.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=r.elOffset(t).top-r.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class De extends Ie{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,r=this.table.rowManager.scrollLeft,i=this.rows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(i[s]){var a=t-i[s].getElement().offsetTop;if(!(!1===o||Math.abs(a)<o))break;o=a,n=s}i.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(r)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var n=e-this.vDomScrollPosTop,o=e-this.vDomScrollPosBottom,r=2*this.vDomWindowBuffer,i=this.rows();if(this.scrollTop=e,-n>r||o>r){var s=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*i.length)),this.scrollColumns(s)}else t?(n<0&&this._addTopRow(i,-n),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(i,-o):this.vDomScrollPosBottom=this.scrollTop)):(o>=0&&this._addBottomRow(i,o),n>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(i,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,r=0,i=0,s=this.rows();if(e)r=this.vDomTop,i=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;i=a}else if(t-s[a].getElement().offsetTop>=0)r=a;else{if(o=!0,!(n-s[a].getElement().offsetTop>=0))break;i=a}return s.slice(r,i+1)}_virtualRenderFill(e,t,n){var o,i,s=this.tableElement,a=this.elementVertical,l=0,c=0,u=0,d=0,h=0,p=0,f=this.rows(),m=f.length,g=0,b=[],v=0,y=0,w=this.table.rowManager.fixedHeight,C=this.elementVertical.clientHeight,x=this.table.options.rowHeight,S=!0;if(n=n||0,e=e||0){for(;s.firstChild;)s.removeChild(s.firstChild);(d=(m-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(m&&r.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,w||this.table.options.maxHeight?(x&&(y=C/x+this.vDomWindowBuffer/x),y=Math.max(this.vDomWindowMinTotalRows,Math.ceil(y))):y=m;(y==m||c<=C+this.vDomWindowBuffer||v<this.vDomWindowMinTotalRows)&&this.vDomBottom<m-1;){for(b=[],i=document.createDocumentFragment(),p=0;p<y&&this.vDomBottom<m-1;)o=f[g=this.vDomBottom+1],this.styleRow(o,g),o.initialize(!1,!0),o.heightInitialized||this.table.options.rowHeight||o.clearCellHeight(),i.appendChild(o.getElement()),b.push(o),this.vDomBottom++,p++;if(!b.length)break;s.appendChild(i),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++})),S=this.table.rowManager.adjustTableSize(),C=this.elementVertical.clientHeight,S&&(w||this.table.options.maxHeight)&&(x=c/v,y=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==m-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*(m-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=[],r=0,i=this.vDomTop-1,s=0,a=!0;a;)if(this.vDomTop){let l,c,u=e[i];u&&s<this.vDomMaxRenderChain?(l=u.getHeight()||this.vDomRowHeight,c=u.initialized,t>=l?(this.styleRow(u,i),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,r+=l,this.vDomTop--,i--,s++):a=!1):a=!1}else a=!1;for(let e of o)e.clearCellHeight();this._quickNormalizeRowHeight(o),r&&(this.vDomTopPad-=r,this.vDomTopPad<0&&(this.vDomTopPad=i*this.vDomRowHeight),i<1&&(this.vDomTopPad=0),n.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=r)}_removeTopRow(e,t){for(var n=[],o=0,r=0,i=!0;i;){let s,a=e[this.vDomTop];a&&r<this.vDomMaxRenderChain?(s=a.getHeight()||this.vDomRowHeight,t>=s?(this.vDomTop++,t-=s,o+=s,n.push(a),r++):i=!1):i=!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=[],r=0,i=this.vDomBottom+1,s=0,a=!0;a;){let l,c,u=e[i];u&&s<this.vDomMaxRenderChain?(l=u.getHeight()||this.vDomRowHeight,c=u.initialized,t>=l?(this.styleRow(u,i),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,r+=l,this.vDomBottom++,i++,s++):a=!1):a=!1}for(let e of o)e.clearCellHeight();this._quickNormalizeRowHeight(o),r&&(this.vDomBottomPad-=r,(this.vDomBottomPad<0||i==e.length-1)&&(this.vDomBottomPad=0),n.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=r)}_removeBottomRow(e,t){for(var n=[],o=0,r=0,i=!0;i;){let s,a=e[this.vDomBottom];a&&r<this.vDomMaxRenderChain?(s=a.getHeight()||this.vDomRowHeight,t>=s?(this.vDomBottom--,t-=s,o+=s,n.push(a),r++):i=!1):i=!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 Ne 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,r)=>{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 r=[];return new Promise(((i,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 i=this.addRow(e,t,n,!0);r.push(i),this.dispatch("row-added",i,e,t,n)})),this.refreshActiveData(!!o&&"displayPipeline",!1,!0),this.regenerateRowPositions(),this.displayRowsCount&&this._clearPlaceholder(),i(r)}))}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 r,i,s=e instanceof M?e:new M(e||{},this),a=this.findAddRowPos(t),l=-1;return n||(i=this.chain("row-adding-position",[s,a],null,{index:n,top:a}),n=i.index,a=i.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?(r=this.activeRows.indexOf(n),this.displayRowIterator((function(e){var t=e.indexOf(n);t>-1&&e.splice(a?t:t+1,0,s)})),r>-1&&this.activeRows.splice(a?r:r+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 r,i,s;if(t!==n&&((r=e.indexOf(t))>-1&&(e.splice(r,1),(i=e.indexOf(n))>-1?o?e.splice(i+1,0,t):e.splice(i,0,t):e.splice(r,0,t)),e===this.getDisplayRows())){s=i>r?i:r+1;for(let t=r<i?r:i;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,i="",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)i="dataPipeline",t&&(s==this.dataPipeline.length-1?i="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);i="displayPipeline",t&&(s==this.displayPipeline.length-1?i="end":s++)}else i=e||"all",s=0;if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===i&&s<this.redrawBlockRestoreConfig.index||a.indexOf(i)<a.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:e,skipStage:t,renderInPosition:n,stage:i,index:s}));r.elVisible(this.element)?n?this.reRenderInPosition(this.refreshPipelines.bind(this,e,i,s,n)):(this.refreshPipelines(e,i,s,n),e||this.table.columnManager.renderer.renderColumns(),this.renderTable(),o.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(e,i,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:De,basic:$e};(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 He 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,r=o.indexOf(e),i=!1;n?-1===r&&(o.push(e),i=!0):this.subscribed(e+"-"+t)||r>-1&&(o.splice(r,1),i=!0),"mouseenter"!==t&&"mouseleave"!==t||this.pseudoTracking||this.bindPseudoEvents(),i&&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 r=e.filter((e=>n.includes(e)));for(let e of r)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],r={},i={},s={};for(let e of n){let n,i=t[e],a=this.previousTargets[e];if(a&&a.target===i)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()===i)),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(i));break;case"cell":o.components.includes("cell")&&(r.row instanceof M?n=r.row.findCell(i):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&&(r[e]=n,s[e]={target:i,component:n})}return this.previousTargets=s,Object.keys(t).forEach((e=>{let t=r[e];i[e]=t})),i}triggerEvents(e,t,n){var o=this.listeners[e];for(let r in n)n[r]&&o.components.includes(r)&&this.dispatch(r+"-"+e,t,n[r])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class ze{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 Fe extends o{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,n,o,r,i){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,r])?(this.loading=!0,r||this.alertLoader(),t=this.chain("data-params",[e,n,r],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams),this.chain("data-load",[e,t,n,r],!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===i?!o:i))):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),r||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===i?!o:i),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 je{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 r=n.apply(this.table,t);o||(e=r)})),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 r=n;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach(((e,n)=>{r=e.callback.apply(this,t.concat([r]))})),r):"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 _e 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 Ve 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 We(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:We,fitDataTable:We,fitDataStretch:function(e,t){var n=0,o=this.table.rowManager.element.clientWidth,r=0,i=!1;e.forEach(((e,t)=>{e.widthFixed||e.reinitializeWidth(),(this.table.options.responsiveLayout?e.modules.responsive.visible:e.visible)&&(i=e),e.visible&&(n+=e.getWidth())})),i?(r=o-n+i.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(i.setWidth(0),this.table.modules.responsiveLayout.update()),r>0?i.setWidth(r):i.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e,t){var n,o,r=this.table.rowManager.element.getBoundingClientRect().width,i=0,s=0,a=0,l=[],c=[],u=0,d=0;function h(e){return"string"==typeof e?e.indexOf("%")>-1?r/100*parseInt(e):parseInt(e):e}function p(e,t,n,o){var r=[],i=0,s=0,l=0,c=a,u=0,d=0,f=[];function m(e){return n*(e.column.definition.widthGrow||1)}function g(e){return h(e.width)-n*(e.column.definition.widthShrink||0)}return e.forEach((function(e,i){var s=o?g(e):m(e);e.column.minWidth>=s?r.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))):(f.push(e),d+=o?e.column.definition.widthShrink||1:e.column.definition.widthGrow||1)})),r.length?(r.forEach((function(e){i+=o?e.width-e.column.minWidth:e.column.minWidth,e.width=e.column.minWidth})),s=t-i,l=d?Math.floor(s/d):s,u=p(f,s,l,o)):(u=d?t-Math.floor(t/d)*d:t,f.forEach((function(e){e.width=o?g(e):m(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&&(r-=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),i+=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=r-i,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=r.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=r.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 Xe=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 r=this.getConnections(e);r.forEach((e=>{e.tableComms(this.table.element,t,n,o)})),!r.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 Ye{static registry={tables:[],register(e){Ye.registry.tables.push(e)},deregister(e){var t=Ye.registry.tables.indexOf(e);t>-1&&Ye.registry.tables.splice(t,1)},lookupTable(e,t){var n,o,r=[];if("string"==typeof e){if((n=document.querySelectorAll(e)).length)for(var i=0;i<n.length;i++)(o=Ye.registry.matchElement(n[i]))&&r.push(o)}else"undefined"!=typeof HTMLElement&&e instanceof HTMLElement||e instanceof Ye?(o=Ye.registry.matchElement(e))&&r.push(o):Array.isArray(e)?e.forEach((function(e){r=r.concat(Ye.registry.lookupTable(e))})):t||console.warn("Table Connection Error - Invalid Selector",e);return r},matchElement:e=>Ye.registry.tables.find((function(t){return e instanceof Ye?t===e:t.element===e}))};static findTable(e){var t=Ye.registry.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t}}class Qe extends Ye{static moduleBindings={};static moduleExtensions={};static modulesRegistered=!1;static defaultModules=!1;constructor(){super()}static initializeModuleBinder(e){Qe.modulesRegistered||(Qe.modulesRegistered=!0,Qe._registerModules(Xe,!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 r=Qe.moduleBindings[o],i=new r(this);this.modules[o]=i,r.prototype.moduleCore?this.modulesCore.push(i):r.moduleInitOrder?r.moduleInitOrder<0?e.push(i):t.push(i):n.push(i)}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 ze(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new _e(this),this.optionsList=new Me(this,"table constructor"),this.dependencyRegistry=new Ve(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 Ne(this),this.footerManager=new Le(this),this.dataLoader=new Fe(this),this.alertManager=new Je(this),this._bindModules(),this.options=this.optionsList.generate(Ze.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new je(this,this.options,this.options.debugEventsExternal),this.eventBus=new Be(this.options.debugEventsInternal),this.interactionMonitor=new He(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 r in o)"object"==typeof o[r]&&e.setAttribute(o[r].name,o[r].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 r=this.rowManager.findRow(e[this.options.index]);r?(t++,r.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,r)=>{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"),r("Update Error - No data provided"))}))}updateOrAddData(e){var t=[],n=0;return this.initGuard(),new Promise(((o,r)=>{this.dataLoader.blockActiveLoad(),"string"==typeof e&&(e=JSON.parse(e)),e&&e.length>0?e.forEach((e=>{var r=this.rowManager.findRow(e[this.options.index]);n++,r?r.updateData(e).then((()=>{n--,t.push(r.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"),r("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),r=this.columnManager.findColumn(t);this.initGuard(),o?r?this.columnManager.moveColumn(o,r,n):console.warn("Move Error - No matching column found:",r):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,n){return new Promise(((o,r)=>{var i=this.columnManager.findColumn(e);return i?this.columnManager.scrollToColumn(i,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:()=>i});var o=n(2616);function r(e){return e>=0&&e<=255}const i=function(e,t){const{r:n,g:i,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((i-c*(1-e))/e),d=Math.round((s-u*(1-e))/e);if(r(t)&&r(a)&&r(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:i,b:s,a:1}).toRgbString()}},85078:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(24902),r=n(92296),i=n(33044),s=n(82227);function a(e,t){const{className:n,elementType:a,ownerState:l,externalForwardedProps:c,internalForwardedProps:u,shouldForwardComponentProp:d=!1,...h}=t,{component:p,slots:f={[e]:void 0},slotProps:m={[e]:void 0},...g}=c,b=f[e]||a,v=(0,i.A)(m[e],l),{props:{component:y,...w},internalRef:C}=(0,s.A)({className:n,...h,externalForwardedProps:"root"===e?g:void 0,externalSlotProps:v}),x=(0,o.A)(C,v?.ref,t.ref),S="root"===e?y||p:y;return[b,(0,r.A)(b,{..."root"===e&&!p&&!f[e]&&u,..."root"!==e&&!f[e]&&u,...w,...S&&!d&&{as:S},...S&&d&&{component:S},ref:x},l)]}},85160:(e,t,n)=>{"use strict";var o=n(96540),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=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,i=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,r(i,e))return t;var n=o(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,s=n)}var i,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=i(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),r=n(34164),i=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 r,i;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:(r=e.keys,i=Object.keys(t),r.filter((e=>i.includes(e))))).forEach((r=>{if(e.keys.includes(r)){const i=t[r];void 0!==i&&n(((t,n)=>{o===r?Object.assign(t,n):t[e.up(r)]=n}),i)}})):"number"!=typeof t&&"string"!=typeof t||n(((e,t)=>{Object.assign(e,t)}),t)};function f(e){return`--Grid-${e}Spacing`}function m(e){return`--Grid-parent-${e}Spacing`}const g="--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(${m("column")}) / var(${b})))`}),e(n,o)})),n},y=({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(${m("column")}) * ${t} / var(${b}))`}),e(n,o)})),n},w=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[g]:12};return p(e.breakpoints,t.columns,((e,t)=>{const o=t??12;e(n,{[g]:o,"> *":{[b]:o}})})),n},C=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.rowSpacing,((t,o)=>{const r="string"==typeof o?o:e.spacing?.(o);t(n,{[f("row")]:r,"> *":{[m("row")]:r}})})),n},x=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.columnSpacing,((t,o)=>{const r="string"==typeof o?o:e.spacing?.(o);t(n,{[f("column")]:r,"> *":{[m("column")]:r}})})),n},S=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.direction,((e,t)=>{e(n,{flexDirection:t})})),n},A=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${f("row")}) var(${f("column")})`}}),E=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 I=(0,h.A)(),P=(0,l.A)("div",{name:"MuiGrid",slot:"Root"});function T(e){return(0,c.A)({props:e,name:"MuiGrid",defaultTheme:I})}var O=n(26739),$=n(20439),D=n(53356);const N=function(e={}){const{createStyledComponent:t=P,useThemeProps:n=T,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,r)=>{null!==e&&n(e)&&t.keys[r]&&(o[t.keys[r]]=e)})):"object"==typeof e?Object.keys(e).forEach((t=>{const r=e[t];null!=r&&n(r)&&(o[t]=r)})):o[t.keys[0]]=e),o}const p=t(w,x,C,v,S,A,y),f=o.forwardRef((function(e,t){const u=l(),f=n(e),m=(0,d.A)(f);!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])}))}(m,u.breakpoints);const{className:g,children:b,columns:v=12,container:y=!1,component:w="div",direction:C="row",wrap:x="wrap",size:S={},offset:A={},spacing:I=0,rowSpacing:P=I,columnSpacing:T=I,unstable_level:O=0,...$}=m,D=h(S,u.breakpoints,(e=>!1!==e)),N=h(A,u.breakpoints),L=e.columns??(O?void 0:v),H=e.spacing??(O?void 0:I),z=e.rowSpacing??e.spacing??(O?void 0:P),F=e.columnSpacing??e.spacing??(O?void 0:T),j={...m,level:O,columns:L,container:y,direction:C,wrap:x,spacing:H,rowSpacing:z,columnSpacing:F,size:D,offset:N},B=((e,t)=>{const{container:n,direction:o,spacing:r,wrap:i,size:l}=e,u={root:["root",n&&"container","wrap"!==i&&`wrap-xs-${String(i)}`,...R(o),...E(l),...n?k(r,t.breakpoints.keys[0]):[]]};return(0,a.A)(u,(e=>(0,s.Ay)(c,e)),{})})(j,u);return(0,M.jsx)(p,{ref:t,as:w,ownerState:j,className:(0,r.A)(B.root,g),...$,children:o.Children.map(b,(e=>o.isValidElement(e)&&(0,i.A)(e,["Grid"])&&y&&e.props.container?o.cloneElement(e,{unstable_level:e.props?.unstable_level??O+1}):e))})}));return f.muiName="Grid",f}({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,$.b)({props:e,name:"MuiGrid"}),useTheme:D.A}),L=N},85486:(e,t,n)=>{"use strict";n.d(t,{B:()=>r,x:()=>i});var o=n(1908);function r(e){return(0,o.Ay)("MuiDataGrid",e)}const i=(0,n(96148).A)("MuiDataGrid",["aiAssistantPanel","aiAssistantPanelHeader","aiAssistantPanelTitleContainer","aiAssistantPanelTitle","aiAssistantPanelBody","aiAssistantPanelEmptyText","aiAssistantPanelFooter","aiAssistantPanelConversation","aiAssistantPanelConversationList","aiAssistantPanelConversationTitle","aiAssistantPanelSuggestions","aiAssistantPanelSuggestionsList","aiAssistantPanelSuggestionsItem","aiAssistantPanelSuggestionsLabel","actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","aggregationRowOverlayWrapper","autoHeight","autosizing","mainContent","withSidePanel","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","collapsible","collapsibleTrigger","collapsibleIcon","collapsiblePanel","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeader--filter","columnHeaderFilterInput","columnHeaderFilterOperatorLabel","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementSearchInput","columnsManagementFooter","columnsManagementScrollArea","columnsManagementEmptyText","container--top","container--bottom","detailPanel","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hiddenContent","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowReorderIcon","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortButton","sortIcon","shadowScrollArea","sidebar","sidebarHeader","toolbarContainer","toolbar","toolbarLabel","toolbarDivider","toolbarFilterList","toolbarQuickFilter","toolbarQuickFilterTrigger","toolbarQuickFilterControl","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pivotPanelAvailableFields","pivotPanelField","pivotPanelField--sorted","pivotPanelFieldActionContainer","pivotPanelFieldCheckbox","pivotPanelFieldDragIcon","pivotPanelFieldList","pivotPanelFieldName","pivotPanelHeader","pivotPanelPlaceholder","pivotPanelScrollArea","pivotPanelSearchContainer","pivotPanelSection","pivotPanelSectionTitle","pivotPanelSections","pivotPanelSwitch","pivotPanelSwitchLabel","prompt","promptContent","promptText","promptFeedback","promptChangeList","promptChangesToggle","promptChangesToggleIcon","promptIcon","promptIconContainer","promptError","promptAction"])},85501:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(63662);function r(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),r=n(34164),i=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,f=n,m=(e=>{const{classes:t}=e;return(0,i.A)({root:["root"]},c.t,t)})(f),{titleId:g=a}=o.useContext(u.A);return(0,d.jsx)(h,{component:"h2",className:(0,r.A)(m.root,s),ownerState:f,ref:t,variant:"h6",id:a??g,...p})}))},87695:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(96369),r=n(73893),i=n(27800),s=n(76562);function a(e){return(0,o.A)(e)||(0,r.A)(e)||(0,i.A)(e)||(0,s.A)()}},87960:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});const o=Object.is;function r(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,r=0;for(const r in e){if(n+=1,!o(e[r],t[r]))return!1;if(!(r in t))return!1}for(const e in t)r+=1;return n===r}},88612:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(10644);function r(e){return(0,o.A)(e).defaultView||window}},88629:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(9792),r=n(74848);const i=(0,o.A)((0,r.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},89026:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,N:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiFilledInput",e)}const s={...n(26410).A,...(0,o.A)("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])}},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 r=n.call(e,t||"default");if("object"!=o(r))return r;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:()=>i});var o=n(64467);function r(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(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:()=>m,Ay:()=>me});var o=n(64467),r=n(89379),i=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"],f=d.createContext({});function m(e){var t=e.children,n=(0,h.A)(e,p);return d.createElement(f.Provider,{value:n},t)}var g=n(23029),b=n(92901),v=n(85501),y=n(49640);const w=function(e){(0,v.A)(n,e);var t=(0,y.A)(n);function n(){return(0,g.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),S=n(26956),A="none",E="appear",k="enter",R="leave",M="none",I="prepare",P="start",T="active",O="end",$="prepared",D=n(20998);function N(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,H,z,F=(L=(0,D.A)(),H="undefined"!=typeof window?window:{},z={animationend:N("Animation","AnimationEnd"),transitionend:N("Transition","TransitionEnd")},L&&("AnimationEvent"in H||delete z.animationend.animation,"TransitionEvent"in H||delete z.transitionend.transition),z),j={};if((0,D.A)()){var B=document.createElement("div");j=B.style}var _={};function V(e){if(_[e])return _[e];var t=F[e];if(t)for(var n=Object.keys(t),o=n.length,r=0;r<o;r+=1){var i=n[r];if(Object.prototype.hasOwnProperty.call(t,i)&&i in j)return _[e]=t[i],_[e]}return""}var W=V("animationend"),G=V("transitionend"),K=!(!W||!G),U=W||"animationend",q=G||"transitionend";function X(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 Y=(0,D.A)()?d.useLayoutEffect:d.useEffect;var Q=n(25371),J=[I,P,T,O],Z=[I,$],ee=!1;function te(e){return e===T||e===O}function ne(e,t,n,s){var a,l,c,u,h=s.motionEnter,p=void 0===h||h,f=s.motionAppear,m=void 0===f||f,g=s.motionLeave,b=void 0===g||g,v=s.motionDeadline,y=s.motionLeaveImmediately,w=s.onAppearPrepare,D=s.onEnterPrepare,N=s.onLeavePrepare,L=s.onAppearStart,H=s.onEnterStart,z=s.onLeaveStart,F=s.onAppearActive,j=s.onEnterActive,B=s.onLeaveActive,_=s.onAppearEnd,V=s.onEnterEnd,W=s.onLeaveEnd,G=s.onVisibleChanged,K=(0,x.A)(),X=(0,i.A)(K,2),ne=X[0],oe=X[1],re=(a=A,l=d.useReducer((function(e){return e+1}),0),c=(0,i.A)(l,2)[1],u=d.useRef(a),[(0,S.A)((function(){return u.current})),(0,S.A)((function(e){u.current="function"==typeof e?e(u.current):e,c()}))]),ie=(0,i.A)(re,2),se=ie[0],ae=ie[1],le=(0,x.A)(null),ce=(0,i.A)(le,2),ue=ce[0],de=ce[1],he=se(),pe=(0,d.useRef)(!1),fe=(0,d.useRef)(null);function me(){return n()}var ge=(0,d.useRef)(!1);function be(){ae(A),de(null,!0)}var ve=(0,C._q)((function(e){var t=se();if(t!==A){var n=me();if(!e||e.deadline||e.target===n){var o,r=ge.current;t===E&&r?o=null==_?void 0:_(n,e):t===k&&r?o=null==V?void 0:V(n,e):t===R&&r&&(o=null==W?void 0:W(n,e)),r&&!1!==o&&be()}}})),ye=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),we=(0,i.A)(ye,1)[0],Ce=function(e){switch(e){case E:return(0,o.A)((0,o.A)((0,o.A)({},I,w),P,L),T,F);case k:return(0,o.A)((0,o.A)((0,o.A)({},I,D),P,H),T,j);case R:return(0,o.A)((0,o.A)((0,o.A)({},I,N),P,z),T,B);default:return{}}},xe=d.useMemo((function(){return Ce(he)}),[he]),Se=function(e,t,n){var o=(0,x.A)(M),r=(0,i.A)(o,2),s=r[0],a=r[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 r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var i=(0,Q.A)((function(){r<=1?o({isCanceled:function(){return i!==e.current}}):n(o,r-1)}));e.current=i},t]}(),c=(0,i.A)(l,2),u=c[0],h=c[1],p=t?Z:J;return Y((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(I,!0)},s]}(he,!e,(function(e){if(e===I){var t=xe[I];return t?t(me()):ee}var n;return ke in xe&&de((null===(n=xe[ke])||void 0===n?void 0:n.call(xe,me(),null))||null),ke===T&&he!==A&&(we(me()),v>0&&(clearTimeout(fe.current),fe.current=setTimeout((function(){ve({deadline:!0})}),v))),ke===$&&be(),!0})),Ae=(0,i.A)(Se,2),Ee=Ae[0],ke=Ae[1],Re=te(ke);ge.current=Re;var Me=(0,d.useRef)(null);Y((function(){if(!pe.current||Me.current!==t){oe(t);var n,o=pe.current;pe.current=!0,!o&&t&&m&&(n=E),o&&t&&p&&(n=k),(o&&!t&&b||!o&&y&&!t&&b)&&(n=R);var r=Ce(n);n&&(e||r[I])?(ae(n),Ee()):ae(A),Me.current=t}}),[t]),(0,d.useEffect)((function(){(he===E&&!m||he===k&&!p||he===R&&!b)&&ae(A)}),[m,p,b]),(0,d.useEffect)((function(){return function(){pe.current=!1,clearTimeout(fe.current)}}),[]);var Ie=d.useRef(!1);(0,d.useEffect)((function(){ne&&(Ie.current=!0),void 0!==ne&&he===A&&((Ie.current||ne)&&(null==G||G(ne)),Ie.current=!0)}),[ne,he]);var Pe=ue;return xe[I]&&ke===P&&(Pe=(0,r.A)({transition:"none"},Pe)),[he,ke,Pe,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,m=e.forceRender,g=e.children,b=e.motionName,v=e.leavedClassName,y=e.eventProps,C=function(e,n){return!(!e.motionName||!t||!1===n)}(e,d.useContext(f).motion),x=(0,d.useRef)(),S=(0,d.useRef)(),E=ne(C,a,(function(){try{return x.current instanceof HTMLElement?x.current:(0,c.Ay)(S.current)}catch(e){return null}}),e),k=(0,i.A)(E,4),R=k[0],M=k[1],T=k[2],O=k[3],$=d.useRef(O);O&&($.current=!0);var D,N=d.useCallback((function(e){x.current=e,(0,u.Xf)(n,e)}),[n]),L=(0,r.A)((0,r.A)({},y),{},{visible:a});if(g)if(R===A)D=O?g((0,r.A)({},L),N):!p&&$.current&&v?g((0,r.A)((0,r.A)({},L),{},{className:v}),N):m||!p&&!v?g((0,r.A)((0,r.A)({},L),{},{style:{display:"none"}}),N):null;else{var H;M===I?H="prepare":te(M)?H="active":M===P&&(H="start");var z=X(b,"".concat(R,"-").concat(H));D=g((0,r.A)((0,r.A)({},L),{},{className:l()(X(b,R),(0,o.A)((0,o.A)({},z,z&&H),b,"string"==typeof b)),style:T}),N)}else D=null;return d.isValidElement(D)&&(0,u.f3)(D)&&((0,u.A9)(D)||(D=d.cloneElement(D,{ref:N}))),d.createElement(w,{ref:S},D)}));return n.displayName="CSSMotion",n}(K);var re=n(58168),ie=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,r.A)((0,r.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"],fe=["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)(i,t);var n=(0,y.A)(i);function i(){var e;(0,g.A)(this,i);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,ie.A)(e),"state",{keyEntities:[]}),(0,o.A)((0,ie.A)(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:(0,r.A)((0,r.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)(i,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,o=this.props,i=o.component,s=o.children,a=o.onVisibleChanged,l=(o.onAllRemoved,(0,h.A)(o,he)),c=i||d.Fragment,u={};return fe.forEach((function(e){u[e]=l[e],delete l[e]})),delete l.keys,d.createElement(c,l,n.map((function(n,o){var i=n.status,l=(0,h.A)(n,pe),c=i===se||i===ae;return d.createElement(e,(0,re.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,r.A)((0,r.A)({},e),{},{index:o}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,o=t.keyEntities,i=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,i=t.length,s=de(e),a=de(t);s.forEach((function(e){for(var t=!1,s=o;s<i;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,r.A)((0,r.A)({},e),{},{status:se})}))),o=s),n.push((0,r.A)((0,r.A)({},l),{},{status:ae})),o+=1,t=!0;break}}t||n.push((0,r.A)((0,r.A)({},e),{},{status:le}))})),o<i&&(n=n.concat(a.slice(o).map((function(e){return(0,r.A)((0,r.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,i);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}))}}}]),i}(d.Component);(0,o.A)(t,"defaultProps",{component:"div"})}(K);const me=oe},91092:(e,t,n)=>{"use strict";var o;n.d(t,{A:()=>a});var r=n(96540);let i=0;const s={...o||(o=n.t(r,2))}.useId;function a(e){if(void 0!==s){const t=s();return e??t}return function(e){const[t,n]=r.useState(e),o=e||t;return r.useEffect((()=>{null==t&&(i+=1,n(`mui-${i}`))}),[t]),o}(e)}},91790:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,y:()=>i});var o=n(96148),r=n(1908);function i(e){return(0,r.Ay)("MuiTypography",e)}const s=(0,o.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"])},92187:(e,t,n)=>{"use strict";var o=n(24994).default;t.A=void 0;var r=o(n(67018)),i=o(n(41702)),s=o(n(83009)),a=o(n(82348));const l="${label}不是一个有效的${type}",c={locale:"zh-cn",Pagination:r.default,DatePicker:s.default,TimePicker:a.default,Calendar:i.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},92296:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}},92661:(e,t,n)=>{"use strict";n.d(t,{gz:()=>u,Mz:()=>c,S:()=>d});var o=n(25508),r=n(74435);class i{constructor(e){this.value=e}deref(){return this.value}}const s=(()=>"undefined"==typeof WeakRef?i:WeakRef)(),a=(0,o.Ad)({memoize:o.i5,memoizeOptions:{maxSize:1,equalityCheck:Object.is},argsMemoize:function(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:o}=t;let r,i=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e+=1){let n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){"current"in n&&"instanceId"in n.current&&(n=n.current.state);let e=t.o;null===e&&(e=new WeakMap,t.o=e);const o=e.get(n);void 0===o?(t={s:0,v:void 0,o:null,p:null},e.set(n,t)):t=o}else{let e=t.p;null===e&&(e=new Map,t.p=e);const o=e.get(n);void 0===o?(t={s:0,v:void 0,o:null,p:null},e.set(n,t)):t=o}}const l=t;let c;if(1===t.s)c=t.v;else if(c=e.apply(null,arguments),i+=1,o){const e=(u=r)instanceof s?u.deref():u;null!=e&&o(e,c)&&(c=e,0!==i&&(i-=1)),r="object"==typeof c&&null!==c||"function"==typeof c?new s(c):c}var u;return l.s=1,l.v=c,c}return a.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}}),l=new WeakMap,c=(e,t,n,o,r,i,...s)=>{if(s.length>0)throw new Error("Unsupported number of selectors");let a;if(e&&t&&n&&o&&r&&i)a=(s,a)=>{const l=e(s,a),c=t(s,a),u=n(s,a),d=o(s,a),h=r(s,a);return i(l,c,u,d,h,a)};else if(e&&t&&n&&o&&r)a=(i,s)=>{const a=e(i,s),l=t(i,s),c=n(i,s),u=o(i,s);return r(a,l,c,u,s)};else if(e&&t&&n&&o)a=(r,i)=>{const s=e(r,i),a=t(r,i),l=n(r,i);return o(s,a,l,i)};else if(e&&t&&n)a=(o,r)=>{const i=e(o,r),s=t(o,r);return n(i,s,r)};else{if(!e||!t)throw new Error("Missing arguments");a=(n,o)=>{const r=e(n,o);return t(r,o)}}return a},u=e=>(t,n)=>e(t.current.state,n),d=(...e)=>(t,n)=>{const o=t.current.instanceId,i=l.get(o),s=i??new Map,c=s.get(e);if(s&&c){if(!(0,r.U9)(c.selectorArgs,n)){const o=void 0!==n?[...e.slice(0,e.length-1),()=>n,e[e.length-1]]:e,r=a(...o);return r.selectorArgs=n,s.set(e,r),r(t,n)}return c(t,n)}const u=void 0!==n?[...e.slice(0,e.length-1),()=>n,e[e.length-1]]:e,d=a(...u);return d.selectorArgs=n,i||l.set(o,s),s.set(e,d),d(t,n)}},92901:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(20816);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,o.A)(r.key),r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},93583:(e,t,n)=>{"use strict";function o({props:e,states:t,muiFormControl:n}){return t.reduce(((t,o)=>(t[o]=e[o],n&&void 0===e[o]&&(t[o]=n[o]),t)),{})}n.d(t,{A:()=>o})},93781:(e,t,n)=>{"use strict";n.d(t,{LX:()=>f,MA:()=>p,_W:()=>m,Lc:()=>b,Ms:()=>v});var o=n(7196),r=n(39612),i=n(49900);const s={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),o=s[t],r=a[n]||"";return Array.isArray(r)?r.map((e=>o+e)):[o+r]})(t)),e[t])}(),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function p(e,t,n,o){const i=(0,r.Yn)(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?i.startsWith("var(")&&0===e?0:i.startsWith("var(")&&1===e?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=i[t];return e>=0?n:"number"==typeof n?-n:"string"==typeof n&&n.startsWith("var(")?`calc(-1 * ${n})`:`-${n}`}:"function"==typeof i?i:()=>{}}function f(e){return p(e,"spacing",8)}function m(e,t){return"string"==typeof t||null==t?t:e(t)}function g(e,t){const n=f(e.theme);return Object.keys(e).map((r=>function(e,t,n,r){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce(((e,o)=>(e[o]=m(t,n),e)),{})}(c(n),r),s=e[n];return(0,o.NI)(e,s,i)}(e,t,r,n))).reduce(i.A,{})}function b(e){return g(e,u)}function v(e){return g(e,d)}function y(e){return g(e,h)}b.propTypes={},b.filterProps=u,v.propTypes={},v.filterProps=d,y.propTypes={},y.filterProps=h},94034:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=n(96540),r=n(40961),i=n(3576),s=n(24902),a=n(11108),l=n(17726);const c=o.forwardRef((function(e,t){const{children:n,container:c,disablePortal:u=!1}=e,[d,h]=o.useState(null),p=(0,s.A)(o.isValidElement(n)?(0,l.A)(n):null,t);if((0,i.A)((()=>{u||h(function(e){return"function"==typeof e?e():e}(c)||document.body)}),[c,u]),(0,i.A)((()=>{if(d&&!u)return(0,a.A)(t,d),()=>{(0,a.A)(t,null)}}),[t,d,u]),u){if(o.isValidElement(n)){const e={ref:p};return o.cloneElement(n,e)}return n}return d?r.createPortal(n,d):d}))},94925:(e,t,n)=>{"use strict";function o(e){return(e+8)/e}function r(e){const t=Array.from({length:10}).map(((t,n)=>{const o=n-1,r=e*Math.pow(Math.E,o/5),i=n>1?Math.floor(r):Math.ceil(r);return 2*Math.floor(i/2)}));return t[1]=e,t.map((e=>({size:e,lineHeight:o(e)})))}n.d(t,{A:()=>r,k:()=>o})},95548:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var o=n(97102),r=n(49900),i=n(39612),s=n(7196),a=n(63132),l=n(98762);const c=function(){function e(e,t,n,r){const a={[e]:t,theme:n},l=r[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:h}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const p=(0,i.Yn)(n,u)||{};return h?h(a):(0,s.NI)(a,t,(t=>{let n=(0,i.BO)(p,d,t);return t===n&&"string"==typeof t&&(n=(0,i.BO)(p,d,`${e}${"default"===t?"":(0,o.A)(t)}`,t)),!1===c?n:{[c]:n}}))}return function t(n){const{sx:o,theme:i={}}=n||{};if(!o)return null;const c=i.unstable_sxConfig??l.A;function u(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const l=(0,s.EU)(i.breakpoints),u=Object.keys(l);let d=l;return Object.keys(o).forEach((n=>{const a="function"==typeof(l=o[n])?l(i):l;var l;if(null!=a)if("object"==typeof a)if(c[n])d=(0,r.A)(d,e(n,a,i,c));else{const e=(0,s.NI)({theme:i},a,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,a)?d=(0,r.A)(d,e):d[n]=t({sx:a,theme:i})}else d=(0,r.A)(d,e(n,a,i,c))})),(0,a._S)(i,(0,s.vf)(u,d))}return Array.isArray(o)?o.map(u):u(o)}}();c.filterProps=["sx"];const u=c},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"}},96148:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(1908);function r(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=(0,o.Ay)(e,t,n)})),r}},96258:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var o,r=n(96540),i=n(34164),s=n(21362),a=n(39407),l=n(35124),c=n(1713),u=n(76761),d=n(26739),h=n(39241),p=n(20439),f=n(56416),m=n(74848);const g=(0,d.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,a.A)(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((0,h.A)((({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${f.A.positionStart}&:not(.${f.A.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]})))),b=r.forwardRef((function(e,t){const n=(0,p.b)({props:e,name:"MuiInputAdornment"}),{children:d,className:h,component:b="div",disablePointerEvents:v=!1,disableTypography:y=!1,position:w,variant:C,...x}=n,S=(0,u.A)()||{};let A=C;C&&S.variant,S&&!A&&(A=S.variant);const E={...n,hiddenLabel:S.hiddenLabel,size:S.size,disablePointerEvents:v,position:w,variant:A},k=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:o,position:r,size:i,variant:l}=e,c={root:["root",n&&"disablePointerEvents",r&&`position${(0,a.A)(r)}`,l,o&&"hiddenLabel",i&&`size${(0,a.A)(i)}`]};return(0,s.A)(c,f.P,t)})(E);return(0,m.jsx)(c.A.Provider,{value:null,children:(0,m.jsx)(g,{as:b,ownerState:E,className:(0,i.A)(k.root,h),ref:t,...x,children:"string"!=typeof d||y?(0,m.jsxs)(r.Fragment,{children:["start"===w?o||(o=(0,m.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""})):null,d]}):(0,m.jsx)(l.A,{color:"textSecondary",children:d})})})}))},96369:(e,t,n)=>{"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,{A:()=>o})},97102:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(4076);function r(e){if("string"!=typeof e)throw new Error((0,o.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},97164:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(96540);function r(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:s}=o.useRef(void 0!==t),[a,l]=o.useState(n);return[s?t:a,o.useCallback((e=>{s||l(e)}),[])]}},98119:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,X:()=>i});var o=n(96540);const r=o.createContext(!1),i=({children:e,disabled:t})=>{const n=o.useContext(r);return o.createElement(r.Provider,{value:null!=t?t:n},e)},s=r},98300:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var o=n(96540),r=n(34164),i=n(21362),s=n(26739),a=n(20439),l=n(99692),c=n(39407);const u=n(14292).A;var d=n(1713),h=n(96148),p=n(1908);function f(e){return(0,p.Ay)("MuiFormControl",e)}(0,h.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var m=n(74848);const g=(0,s.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${(0,c.A)(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),b=o.forwardRef((function(e,t){const n=(0,a.b)({props:e,name:"MuiFormControl"}),{children:s,className:h,color:p="primary",component:b="div",disabled:v=!1,error:y=!1,focused:w,fullWidth:C=!1,hiddenLabel:x=!1,margin:S="none",required:A=!1,size:E="medium",variant:k="outlined",...R}=n,M={...n,color:p,component:b,disabled:v,error:y,fullWidth:C,hiddenLabel:x,margin:S,required:A,size:E,variant:k},I=(e=>{const{classes:t,margin:n,fullWidth:o}=e,r={root:["root","none"!==n&&`margin${(0,c.A)(n)}`,o&&"fullWidth"]};return(0,i.A)(r,f,t)})(M),[P,T]=o.useState((()=>{let e=!1;return s&&o.Children.forEach(s,(t=>{if(!u(t,["Input","Select"]))return;const n=u(t,["Select"])?t.props.input:t;n&&(0,l.gr)(n.props)&&(e=!0)})),e})),[O,$]=o.useState((()=>{let e=!1;return s&&o.Children.forEach(s,(t=>{u(t,["Input","Select"])&&((0,l.lq)(t.props,!0)||(0,l.lq)(t.props.inputProps,!0))&&(e=!0)})),e})),[D,N]=o.useState(!1);v&&D&&N(!1);const L=void 0===w||v?D:w;let H;o.useRef(!1);const z=o.useCallback((()=>{$(!0)}),[]),F=o.useCallback((()=>{$(!1)}),[]),j=o.useMemo((()=>({adornedStart:P,setAdornedStart:T,color:p,disabled:v,error:y,filled:O,focused:L,fullWidth:C,hiddenLabel:x,size:E,onBlur:()=>{N(!1)},onFocus:()=>{N(!0)},onEmpty:F,onFilled:z,registerEffect:H,required:A,variant:k})),[P,p,v,y,O,L,C,x,H,F,z,A,E,k]);return(0,m.jsx)(d.A.Provider,{value:j,children:(0,m.jsx)(g,{as:b,ownerState:M,className:(0,r.A)(I.root,h),ref:t,...R,children:s})})}))},98587:(e,t,n)=>{"use strict";function o(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}n.d(t,{A:()=>o})},98663:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(34164);function r(e,t){if(!e)return t;function n(e,t){const n={};return Object.keys(t).forEach((o=>{(function(e,t){const n=e.charCodeAt(2);return"o"===e[0]&&"n"===e[1]&&n>=65&&n<=90&&"function"==typeof t})(o,t[o])&&"function"==typeof e[o]&&(n[o]=(...n)=>{e[o](...n),t[o](...n)})})),n}if("function"==typeof e||"function"==typeof t)return r=>{const i="function"==typeof t?t(r):t,s="function"==typeof e?e({...r,...i}):e,a=(0,o.A)(r?.className,i?.className,s?.className),l=n(s,i);return{...i,...s,...l,...!!a&&{className:a},...i?.style&&s?.style&&{style:{...i.style,...s.style}},...i?.sx&&s?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(s.sx)?s.sx:[s.sx]]}}};const r=t,i=n(e,r),s=(0,o.A)(r?.className,e?.className);return{...t,...e,...i,...!!s&&{className:s},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}},98762:(e,t,n)=>{"use strict";n.d(t,{A:()=>D});var o=n(93781),r=n(39612),i=n(49900);const s=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,o)=>t[o]?(0,i.A)(n,t[o](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n};var a=n(7196);function l(e){return"number"!=typeof e?e:`${e}px solid`}function c(e,t){return(0,r.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),b=c("borderRightColor"),v=c("borderBottomColor"),y=c("borderLeftColor"),w=c("outline",l),C=c("outlineColor"),x=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,o.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,o._W)(t,e)});return(0,a.NI)(e,e.borderRadius,n)}return null};x.propTypes={},x.filterProps=["borderRadius"],s(u,d,h,p,f,m,g,b,v,y,x,w,C);const S=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,o.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,o._W)(t,e)});return(0,a.NI)(e,e.gap,n)}return null};S.propTypes={},S.filterProps=["gap"];const A=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,o.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,o._W)(t,e)});return(0,a.NI)(e,e.columnGap,n)}return null};A.propTypes={},A.filterProps=["columnGap"];const E=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,o.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,o._W)(t,e)});return(0,a.NI)(e,e.rowGap,n)}return null};function k(e,t){return"grey"===t?t:e}function R(e){return e<=1&&0!==e?100*e+"%":e}E.propTypes={},E.filterProps=["rowGap"],s(S,A,E,(0,r.Ay)({prop:"gridColumn"}),(0,r.Ay)({prop:"gridRow"}),(0,r.Ay)({prop:"gridAutoFlow"}),(0,r.Ay)({prop:"gridAutoColumns"}),(0,r.Ay)({prop:"gridAutoRows"}),(0,r.Ay)({prop:"gridTemplateColumns"}),(0,r.Ay)({prop:"gridTemplateRows"}),(0,r.Ay)({prop:"gridTemplateAreas"}),(0,r.Ay)({prop:"gridArea"})),s((0,r.Ay)({prop:"color",themeKey:"palette",transform:k}),(0,r.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:k}),(0,r.Ay)({prop:"backgroundColor",themeKey:"palette",transform:k}));const M=(0,r.Ay)({prop:"width",transform:R}),I=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||a.zu[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:R(t)}};return(0,a.NI)(e,e.maxWidth,t)}return null};I.filterProps=["maxWidth"];const P=(0,r.Ay)({prop:"minWidth",transform:R}),T=(0,r.Ay)({prop:"height",transform:R}),O=(0,r.Ay)({prop:"maxHeight",transform:R}),$=(0,r.Ay)({prop:"minHeight",transform:R}),D=((0,r.Ay)({prop:"size",cssProperty:"width",transform:R}),(0,r.Ay)({prop:"size",cssProperty:"height",transform:R}),s(M,I,P,T,O,$,(0,r.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:x},color:{themeKey:"palette",transform:k},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:k},backgroundColor:{themeKey:"palette",transform:k},p:{style:o.Ms},pt:{style:o.Ms},pr:{style:o.Ms},pb:{style:o.Ms},pl:{style:o.Ms},px:{style:o.Ms},py:{style:o.Ms},padding:{style:o.Ms},paddingTop:{style:o.Ms},paddingRight:{style:o.Ms},paddingBottom:{style:o.Ms},paddingLeft:{style:o.Ms},paddingX:{style:o.Ms},paddingY:{style:o.Ms},paddingInline:{style:o.Ms},paddingInlineStart:{style:o.Ms},paddingInlineEnd:{style:o.Ms},paddingBlock:{style:o.Ms},paddingBlockStart:{style:o.Ms},paddingBlockEnd:{style:o.Ms},m:{style:o.Lc},mt:{style:o.Lc},mr:{style:o.Lc},mb:{style:o.Lc},ml:{style:o.Lc},mx:{style:o.Lc},my:{style:o.Lc},margin:{style:o.Lc},marginTop:{style:o.Lc},marginRight:{style:o.Lc},marginBottom:{style:o.Lc},marginLeft:{style:o.Lc},marginX:{style:o.Lc},marginY:{style:o.Lc},marginInline:{style:o.Lc},marginInlineStart:{style:o.Lc},marginInlineEnd:{style:o.Lc},marginBlock:{style:o.Lc},marginBlockStart:{style:o.Lc},marginBlockEnd:{style:o.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:S},rowGap:{style:E},columnGap:{style:A},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:R},maxWidth:{style:I},minWidth:{transform:R},height:{transform:R},maxHeight:{transform:R},minHeight:{transform:R},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},98855:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(23);const r=e=>(0,o.A)(e)&&"classes"!==e},99374:(e,t,n)=>{var o=n(54128),r=n(23805),i=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(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(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}},99692:(e,t,n)=>{"use strict";function o(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function r(e,t=!1){return e&&(o(e.value)&&""!==e.value||t&&o(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,{gr:()=>i,lq:()=>r})},99798:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var o=n(96540),r=n(37353),i=n(17726),s=n(53356),a=n(24337),l=n(30301),c=n(74848);const u={entering:{opacity:1},entered:{opacity:1}},d=o.forwardRef((function(e,t){const n=(0,s.A)(),d={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:h,appear:p=!0,children:f,easing:m,in:g,onEnter:b,onEntered:v,onEntering:y,onExit:w,onExited:C,onExiting:x,style:S,timeout:A=d,TransitionComponent:E=r.Ay,...k}=e,R=o.useRef(null),M=(0,l.A)(R,(0,i.A)(f),t),I=e=>t=>{if(e){const n=R.current;void 0===t?e(n):e(n,t)}},P=I(y),T=I(((e,t)=>{(0,a.q)(e);const o=(0,a.c)({style:S,timeout:A,easing:m},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",o),e.style.transition=n.transitions.create("opacity",o),b&&b(e,t)})),O=I(v),$=I(x),D=I((e=>{const t=(0,a.c)({style:S,timeout:A,easing:m},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),w&&w(e)})),N=I(C);return(0,c.jsx)(E,{appear:p,in:g,nodeRef:R,onEnter:T,onEntered:O,onEntering:P,onExit:D,onExited:N,onExiting:$,addEndListener:e=>{h&&h(R.current,e)},timeout:A,...k,children:(e,{ownerState:t,...n})=>o.cloneElement(f,{style:{opacity:0,visibility:"exited"!==e||g?void 0:"hidden",...u[e],...S,...f.props.style},ref:M,...n})})}))}}]);
|