From 291daa8baa0b8f055534bbbe1ad6c690ccc5110e Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sun, 7 Apr 2024 21:51:34 +0700 Subject: [PATCH] Updates --- ...otstrap-99OZCrVa.js => bootstrap-C-35D-R3.js} | 4 ++-- bundle.js | 4 ++-- index.html | 16 ++++++++-------- manifest.webmanifest | 2 +- registerSW.js | 2 +- service-worker.js | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) rename assets/{bootstrap-99OZCrVa.js => bootstrap-C-35D-R3.js} (96%) diff --git a/assets/bootstrap-99OZCrVa.js b/assets/bootstrap-C-35D-R3.js similarity index 96% rename from assets/bootstrap-99OZCrVa.js rename to assets/bootstrap-C-35D-R3.js index e84e22a5..c723388b 100644 --- a/assets/bootstrap-99OZCrVa.js +++ b/assets/bootstrap-C-35D-R3.js @@ -261,7 +261,7 @@ function XD(){return XD=Object.assign?Object.assign.bind():function(e){for(var t * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ZF(){return ZF=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Promise((()=>{}));const JF=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(lJ){}function e$(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ZF({},t,{errors:t$(t.errors)})),t}function t$(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&"RouteErrorResponse"===o.__type)n[r]=new Pj(o.status,o.statusText,o.data,!0===o.internal);else if(o&&"Error"===o.__type){if(o.__subType){let e=window[o.__subType];if("function"==typeof e)try{let t=new e(o.message);t.stack="",n[r]=t}catch(lJ){}}if(null==n[r]){let e=new Error(o.message);e.stack="",n[r]=e}}else n[r]=o;return n}const n$=U.createContext({isTransitioning:!1}),r$=U.createContext(new Map),o$=V.startTransition,a$=gd.flushSync;function i$(e){a$?a$(e):e()}class s${constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function l$(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=U.useState(n.state),[i,s]=U.useState(),[l,u]=U.useState({isTransitioning:!1}),[c,d]=U.useState(),[p,f]=U.useState(),[m,g]=U.useState(),h=U.useRef(new Map),{v7_startTransition:b}=r||{},v=U.useCallback((e=>{b?function(e){o$?o$(e):e()}(e):e()}),[b]),y=U.useCallback(((e,t)=>{let{deletedFetchers:r,unstable_flushSync:o,unstable_viewTransitionOpts:i}=t;r.forEach((e=>h.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&h.current.set(t,e.data)}));let l=null==n.window||"function"!=typeof n.window.document.startViewTransition;if(i&&!l){if(o){i$((()=>{p&&(c&&c.resolve(),p.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})}));let t=n.window.document.startViewTransition((()=>{i$((()=>a(e)))}));return t.finished.finally((()=>{i$((()=>{d(void 0),f(void 0),s(void 0),u({isTransitioning:!1})}))})),void i$((()=>f(t)))}p?(c&&c.resolve(),p.skipTransition(),g({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(s(e),u({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))}else o?i$((()=>a(e))):v((()=>a(e)))}),[n.window,p,c,h,v]);U.useLayoutEffect((()=>n.subscribe(y)),[n,y]),U.useEffect((()=>{l.isTransitioning&&!l.flushSync&&d(new s$)}),[l]),U.useEffect((()=>{if(c&&i&&n.window){let e=i,t=c.promise,r=n.window.document.startViewTransition((async()=>{v((()=>a(e))),await t}));r.finished.finally((()=>{d(void 0),f(void 0),s(void 0),u({isTransitioning:!1})})),f(r)}}),[v,i,c,n.window]),U.useEffect((()=>{c&&i&&o.location.key===i.location.key&&c.resolve()}),[c,p,o.location,i]),U.useEffect((()=>{!l.isTransitioning&&m&&(s(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))}),[l.isTransitioning,m]),U.useEffect((()=>{}),[]);let w=U.useMemo((()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})})),[n]),S=n.basename||"/",x=U.useMemo((()=>({router:n,navigator:w,static:!1,basename:S})),[n,w,S]);return U.createElement(U.Fragment,null,U.createElement(CF.Provider,{value:x},U.createElement(kF.Provider,{value:o},U.createElement(r$.Provider,{value:h.current},U.createElement(n$.Provider,{value:l},U.createElement(YF,{basename:S,location:o.location,navigationType:o.historyAction,navigator:w,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?U.createElement(u$,{routes:n.routes,future:n.future,state:o}):t))))),null)}function u$(e){let{routes:t,future:n,state:r}=e;return FF(t,void 0,r,n)}const c$="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,d$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,p$=U.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:a,replace:i,state:s,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=e,p=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,JF),{basename:f}=U.useContext(RF),m=!1;if("string"==typeof u&&d$.test(u)&&(n=u,c$))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=Cj(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:m=!0}catch(lJ){}let g=AF(u,{relative:o}),h=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:s}=void 0===t?{}:t,l=LF(),u=NF(),c=jF(e,{relative:i});return U.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:rj(u)===rj(c);l(e,{replace:n,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:s})}}),[u,l,c,r,o,n,e,a,i,s])}(u,{replace:i,state:s,target:l,preventScrollReset:c,relative:o,unstable_viewTransition:d});return U.createElement("a",ZF({},p,{href:n||g,onClick:m||a?r:function(e){r&&r(e),e.defaultPrevented||h(e)},ref:t,target:l}))}));var f$,m$,g$,h$;function b$(e){let t=U.useRef(QF(e)),n=U.useRef(!1),r=NF(),o=U.useMemo((()=>function(e,t){let n=QF(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=LF(),i=U.useCallback(((e,t)=>{const r=QF("function"==typeof e?e(o):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,i]}(m$=f$||(f$={})).UseScrollRestoration="useScrollRestoration",m$.UseSubmit="useSubmit",m$.UseSubmitFetcher="useSubmitFetcher",m$.UseFetcher="useFetcher",m$.useViewTransitionState="useViewTransitionState",(h$=g$||(g$={})).UseFetcher="useFetcher",h$.UseFetchers="useFetchers",h$.UseScrollRestoration="useScrollRestoration";const v$=e=>H.forwardRef(((t,n)=>{let{href:r,...o}=t;const a=AF(r);return"string"!=typeof r||"#"===r?te.jsx("a",{href:"#",ref:n,...o}):r.startsWith("http://")||r.startsWith("https://")?te.jsx("a",{href:r,ref:n,...o}):(e.openLinksInNewWindow&&(o={...o,target:"_blank"}),e.baseUrl?te.jsx("a",{href:e.baseUrl+a,ref:n,...o}):te.jsx(p$,{ref:n,to:r,...o}))})),y$=({children:e})=>{const t=mh("(prefers-color-scheme: dark)")?"dark":"light",n=U.useContext(KD),r=fv({palette:{mode:t,primary:{main:"#00617B"},secondary:{main:"#873C00"}},components:{MuiLink:{defaultProps:{component:v$(n)}},MuiButtonBase:{defaultProps:{LinkComponent:v$(n)}}}});return te.jsx(Kv,{theme:r,children:e})},w$=kD({name:"application",initialState:{baseUrl:e.backendUrl,preferredPageSize:20,toolbarOpen:!0,favoriteUrls:[],autoLatest:!1},reducers:{changeBaseUrl(e,t){e.baseUrl=t.payload},setToolbarOpen(e,t){e.toolbarOpen=t.payload},setPreferredPageSize(e,t){e.preferredPageSize=t.payload},addFavoriteUrl(e,t){const n=new Set(e.favoriteUrls);e.favoriteUrls=Array.from(n.add(t.payload).values())},removeFavoriteUrl(e,t){const n=new Set(e.favoriteUrls);n.delete(t.payload),e.favoriteUrls=Array.from(n.values())},changeAutoLatest:(e,t)=>{e.autoLatest=t.payload}}}),{changeBaseUrl:S$,changeAutoLatest:x$,setToolbarOpen:E$,setPreferredPageSize:C$,addFavoriteUrl:k$,removeFavoriteUrl:R$}=w$.actions,T$=kD({name:"notifications",initialState:{notifications:[]},reducers:{removeNotification(e,t){e.notifications[t.payload].shown=!1},addNotification:(e,t)=>{e.notifications=[...e.notifications,{...t.payload,shown:!0}]}}}),{addNotification:I$,removeNotification:_$}=T$.actions;var A$="persist:",O$="persist/FLUSH",N$="persist/REHYDRATE",P$="persist/PAUSE",L$="persist/PERSIST",M$="persist/PURGE",D$="persist/REGISTER";function j$(e){return(j$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B$(e,t,n,r){r.debug;var o=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function X$(e,t){var n=void 0!==e.version?e.version:-1;e.debug;var r=void 0===e.stateReconciler?B$:e.stateReconciler,o=e.getStoredState||H$,a=void 0!==e.timeout?e.timeout:5e3,i=null,s=!1,l=!0,u=function(e){return e._persist.rehydrated&&i&&!l&&i.update(e),e};return function(c,d){var p=c||{},f=p._persist,m=Y$(p,["_persist"]);if(d.type===L$){var g=!1,h=function(t,n){g||(d.rehydrate(e.key,t,n),g=!0)};if(a&&setTimeout((function(){!g&&h(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))}),a),l=!1,i||(i=z$(e)),f)return q$({},t(m,d),{_persist:f});if("function"!=typeof d.rehydrate||"function"!=typeof d.register)throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return d.register(e.key),o(e).then((function(t){var r=e.migrate||function(e,t){return Promise.resolve(e)};r(t,n).then((function(e){h(e)}),(function(e){h(void 0,e)}))}),(function(e){h(void 0,e)})),q$({},t(m,d),{_persist:{version:n,rehydrated:!1}})}if(d.type===M$)return s=!0,d.result(function(e){var t=e.storage,n="".concat(void 0!==e.keyPrefix?e.keyPrefix:A$).concat(e.key);return t.removeItem(n,G$)}(e)),q$({},t(m,d),{_persist:f});if(d.type===O$)return d.result(i&&i.flush()),q$({},t(m,d),{_persist:f});if(d.type===P$)l=!0;else if(d.type===N$){if(s)return q$({},m,{_persist:q$({},f,{rehydrated:!0})});if(d.key===e.key){var b=t(m,d),v=d.payload,y=q$({},!1!==r&&void 0!==v?r(v,c,b,e):b,{_persist:q$({},f,{rehydrated:!0})});return u(y)}}if(!f)return t(c,d);var w=t(m,d);return w===m?c:u(q$({},w,{_persist:f}))}}function Z$(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Q$=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),J$=()=>Math.random().toString(36).substring(7).split("").join("."),eB={INIT:`@@redux/INIT${J$()}`,REPLACE:`@@redux/REPLACE${J$()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${J$()}`};function tB(e,t,n){if("function"!=typeof e)throw new Error(Z$(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Z$(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Z$(1));return n(tB)(e,t)}let r=e,o=t,a=new Map,i=a,s=0,l=!1;function u(){i===a&&(i=new Map,a.forEach(((e,t)=>{i.set(t,e)})))}function c(){if(l)throw new Error(Z$(3));return o}function d(e){if("function"!=typeof e)throw new Error(Z$(4));if(l)throw new Error(Z$(5));let t=!0;u();const n=s++;return i.set(n,e),function(){if(t){if(l)throw new Error(Z$(6));t=!1,u(),i.delete(n),a=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(Z$(7));if(void 0===e.type)throw new Error(Z$(8));if("string"!=typeof e.type)throw new Error(Z$(17));if(l)throw new Error(Z$(9));try{l=!0,o=r(o,e)}finally{l=!1}return(a=i).forEach((e=>{e()})),e}p({type:eB.INIT});return{dispatch:p,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Z$(10));r=e,p({type:eB.REPLACE})},[Q$]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Z$(11));function n(){const e=t;e.next&&e.next(c())}n();return{unsubscribe:e(n)}},[Q$](){return this}}}}}function nB(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:iB,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D$:return oB({},e,{registry:[].concat(nB(e.registry),[t.key])});case N$:var n=e.registry.indexOf(t.key),r=nB(e.registry);return r.splice(n,1),oB({},e,{registry:r,bootstrapped:0===r.length});default:return e}};function lB(e,t,n){var r=n||!1,o=tB(sB,iB,t&&t.enhancer?t.enhancer:void 0),a=function(e){o.dispatch({type:D$,key:e})},i=function(t,n,a){var i={type:N$,payload:n,err:a,key:t};e.dispatch(i),o.dispatch(i),r&&s.getState().bootstrapped&&(r(),r=!1)},s=oB({},o,{purge:function(){var t=[];return e.dispatch({type:M$,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:O$,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:P$})},persist:function(){e.dispatch({type:L$,register:a,rehydrate:i})}});return t&&t.manualPersist||s.persist(),s}var uB={},cB={};function dB(e){return(dB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pB(){}cB.__esModule=!0,cB.default=function(e){var t="".concat(e,"Storage");return function(e){if("object"!==("undefined"==typeof self?"undefined":dB(self))||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch(lJ){return!1}return!0}(t)?self[t]:fB};var fB={getItem:pB,setItem:pB,removeItem:pB};uB.__esModule=!0,uB.default=function(e){var t=(0,gB.default)(e);return{getItem:function(e){return new Promise((function(n,r){n(t.getItem(e))}))},setItem:function(e,n){return new Promise((function(r,o){r(t.setItem(e,n))}))},removeItem:function(e){return new Promise((function(n,r){n(t.removeItem(e))}))}}};var mB,gB=(mB=cB)&&mB.__esModule?mB:{default:mB};var hB,bB=function(e){return e&&e.__esModule?e:{default:e}}(uB);hB=(0,bB.default)("local");const vB={key:w$.name,version:1,storage:hB},yB={key:T$.name,version:1,storage:hB},wB={[w$.name]:X$(vB,w$.reducer),[T$.name]:X$(yB,T$.reducer)},SB=[],xB=ey(ee.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),EB=ey(ee.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2"}),"ChatBubble"),CB=ey(ee.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),kB=ey(ee.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),RB=ey(ee.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"}),"Clear"),TB=ey(ee.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),IB=ey(ee.jsx("path",{d:"M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5M19 3l-6 6 2 2 7-7V3z"}),"ContentCut"),_B=ey(ee.jsx("path",{d:"M9.5 14v-1H11v.5h2v-1h-2.5c-.55 0-1-.45-1-1V10c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1H13v-.5h-2v1h2.5c.55 0 1 .45 1 1V14c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1m7.5 1h3c.55 0 1-.45 1-1v-1.5c0-.55-.45-1-1-1h-2.5v-1h2v.5H21v-1c0-.55-.45-1-1-1h-3c-.55 0-1 .45-1 1v1.5c0 .55.45 1 1 1h2.5v1h-2V13H16v1c0 .55.45 1 1 1m-9-5c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-1H6.5v.5h-2v-3h2v.5H8z"}),"Css"),AB=ey(ee.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7m17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4z"}),"DataObject"),OB=ey([ee.jsx("path",{d:"M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z"},"0"),ee.jsx("path",{d:"M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z"},"1")],"DynamicFeed"),NB=ey(ee.jsx("path",{d:"M12 3c-.46 0-.93.04-1.4.14-2.76.53-4.96 2.76-5.48 5.52-.48 2.61.48 5.01 2.22 6.56.43.38.66.91.66 1.47V19c0 1.1.9 2 2 2h.28c.35.6.98 1 1.72 1s1.38-.4 1.72-1H14c1.1 0 2-.9 2-2v-2.31c0-.55.22-1.09.64-1.46C18.09 13.95 19 12.08 19 10c0-3.87-3.13-7-7-7m2 16h-4v-1h4zm0-2h-4v-1h4zm-1.5-5.59V14h-1v-2.59L9.67 9.59l.71-.71L12 10.5l1.62-1.62.71.71z"}),"EmojiObjects"),PB=ey(ee.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),LB=ey(ee.jsx("path",{d:"M15 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V7zM6 20V4h8v4h4v12zm10-10v5c0 2.21-1.79 4-4 4s-4-1.79-4-4V8.5c0-1.47 1.26-2.64 2.76-2.49 1.3.13 2.24 1.32 2.24 2.63V15h-2V8.5c0-.28-.22-.5-.5-.5s-.5.22-.5.5V15c0 1.1.9 2 2 2s2-.9 2-2v-5z"}),"FilePresent"),MB=ey(ee.jsx("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"Folder"),DB=ey(ee.jsx("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp"),jB=ey(ee.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),FB=ey(ee.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),$B=ey(ee.jsx("path",{d:"M3.5 9H5v6H3.5v-2.5h-2V15H0V9h1.5v2h2zm14 0H13c-.55 0-1 .45-1 1v5h1.5v-4.5h1V14H16v-3.51h1V15h1.5v-5c0-.55-.45-1-1-1M11 9H6v1.5h1.75V15h1.5v-4.5H11zm13 6v-1.5h-2.5V9H20v6z"}),"Html"),BB=ey(ee.jsx("path",{d:"M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5zm2.5-.5h1.5V15H10v-4.5h1.5V9H7zm5.5 0H14V15h1.5v-4.5H17V9h-4.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5m0 2.5h-2v-1h2z"}),"Http"),zB=ey(ee.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),UB=ey(ee.jsx("path",{d:"M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z"}),"Input"),HB=ey(ee.jsx("path",{d:"M12 14v-1h1.5v.5h2v-1H13c-.55 0-1-.45-1-1V10c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1h-1.5v-.5h-2v1H16c.55 0 1 .45 1 1V14c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1M9 9v4.5H7.5v-1H6v1c0 .83.67 1.5 1.5 1.5H9c.83 0 1.5-.67 1.5-1.5V9z"}),"Javascript"),VB=ey(ee.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),GB=ey(ee.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew"),WB=ey(ee.jsx("path",{d:"M13 9h1.5v6H13v-2.5h-2V15H9.5V9H11v2h2zm-5 1.5v1c0 .8-.7 1.5-1.5 1.5h-2v2H3V9h3.5c.8 0 1.5.7 1.5 1.5m-1.5 0h-2v1h2zm15 0v1c0 .8-.7 1.5-1.5 1.5h-2v2h-1.5V9H20c.8 0 1.5.7 1.5 1.5m-1.5 0h-2v1h2z"}),"Php"),qB=ey(ee.jsx("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10 5.5h1v-3h-1z"}),"PictureAsPdf"),KB=ey(ee.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),YB=ey(ee.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),XB=ey(ee.jsx("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2z"}),"Repeat"),ZB=ey(ee.jsx("path",{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18c-1.16.41-2 1.51-2 2.82 0 1.66 1.34 3 3 3s3-1.34 3-3c0-1.3-.84-2.4-2-2.82"}),"Route"),QB=ey(ee.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),JB=ey(ee.jsx("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),ez=ey(ee.jsx("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"}),"StarOutline"),tz=ey(ee.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-8m0 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-4z"}),"Sync"),nz=ey(ee.jsx("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m0 14H4V8h16zm-2-1h-6v-2h6zM7.5 17l-1.41-1.41L8.67 13l-2.59-2.59L7.5 9l4 4z"}),"Terminal"),rz=ey(ee.jsx("path",{d:"m20.41 8.41-4.83-4.83c-.37-.37-.88-.58-1.41-.58H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.42M7 7h7v2H7zm10 10H7v-2h10zm0-4H7v-2h10z"}),"TextSnippet"),oz=ey(ee.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"Undo");var az={},iz={};const sz=o(ny);var lz;function uz(){return lz||(lz=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=sz}(iz)),iz}var cz=Rb;Object.defineProperty(az,"__esModule",{value:!0});var dz=az.default=void 0,pz=cz(uz()),fz=ee;dz=az.default=(0,pz.default)((0,fz.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var mz,gz,hz=function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=200&&e.status<=299},jz=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function Fz(e){if(!hD(e))return e;for(var t=kz({},e),n=0,r=Object.entries(t);n=c)}var c=OD(n+"/executeQuery",l,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[VD]=!0,e},condition:function(e,t){var r,a,i,s=(0,t.getState)(),l=null==(a=null==(r=s[n])?void 0:r.queries)?void 0:a[e.queryCacheKey],c=null==l?void 0:l.fulfilledTimeStamp,d=e.originalArgs,p=null==l?void 0:l.originalArgs,f=o[e.endpointName];return!(!Jz(e)&&("pending"===(null==l?void 0:l.status)||!u(e,s)&&(!Kz(f)||!(null==(i=null==f?void 0:f.forceRefetch)?void 0:i.call(f,{currentArg:d,previousArg:p,endpointState:l,state:s})))&&c))},dispatchConditionRejection:!0}),d=OD(n+"/executeMutation",l,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[VD]=!0,e}});function p(e){return function(t){var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:c,mutationThunk:d,prefetch:function(e,t,n){return function(r,o){var a=function(e){return"force"in e}(n)&&n.force,s=function(e){return"ifOlderThan"in e}(n)&&n.ifOlderThan,l=function(n){return void 0===n&&(n=!0),i.endpoints[e].initiate(t,{forceRefetch:n})},u=i.endpoints[e].select(t)(o());if(a)r(l());else if(s){var c=null==u?void 0:u.fulfilledTimeStamp;if(!c)return void r(l());(Number(new Date)-Number(new Date(c)))/1e3>=s&&r(l())}else r(l(!1))}},updateQueryData:function(e,t,n,r){return void 0===r&&(r=!0),function(o,a){var s,l,u,c=i.endpoints[e].select(t)(a()),d={patches:[],inversePatches:[],undo:function(){return o(i.util.patchQueryData(e,t,d.inversePatches,r))}};if(c.status===mz.uninitialized)return d;if("data"in c)if(zL(c.data)){var p=DM(c.data,n),f=p[0],m=p[1],g=p[2];(s=d.patches).push.apply(s,m),(l=d.inversePatches).push.apply(l,g),u=f}else u=n(c.data),d.patches.push({op:"replace",path:[],value:u}),d.inversePatches.push({op:"replace",path:[],value:c.data});return o(i.util.patchQueryData(e,t,d.patches,r)),d}},upsertQueryData:function(e,t,n){return function(r){var o;return r(i.endpoints[e].initiate(t,((o={subscribe:!1,forceRefetch:!0})[Qz]=function(){return{data:n}},o)))}},patchQueryData:function(e,t,n,r){return function(l,u){var c=o[e],d=a({queryArgs:t,endpointDefinition:c,endpointName:e});if(l(i.internalActions.queryResultPatched({queryCacheKey:d,patches:n})),r){var p=i.endpoints[e].select(t)(u()),f=Yz(c.providesTags,p.data,void 0,t,{},s);l(i.internalActions.updateProvidedBy({queryCacheKey:d,providedTags:f}))}}},buildMatchThunkActions:function(e,t){return{matchPending:MD(FD(e),p(t)),matchFulfilled:MD(zD(e),p(t)),matchRejected:MD($D(e),p(t))}}}}({baseQuery:r,reducerPath:o,context:n,api:e,serializeQueryArgs:a,assertTagType:c}),p=d.queryThunk,f=d.mutationThunk,m=d.patchQueryData,g=d.updateQueryData,h=d.upsertQueryData,b=d.prefetch,v=d.buildMatchThunkActions,y=iU({context:n,queryThunk:p,mutationThunk:f,reducerPath:o,assertTagType:c,config:{refetchOnFocus:l,refetchOnReconnect:u,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:o}}),w=y.reducer,S=y.actions;RU(e.util,{patchQueryData:m,updateQueryData:g,upsertQueryData:h,prefetch:b,resetApiState:S.resetApiState}),RU(e.internalActions,S);var x=kU({reducerPath:o,context:n,queryThunk:p,mutationThunk:f,api:e,assertTagType:c}),E=x.middleware,C=x.actions;RU(e.util,C),RU(e,{reducer:w,middleware:E});var k=dU({serializeQueryArgs:a,reducerPath:o}),R=k.buildQuerySelector,T=k.buildMutationSelector,I=k.selectInvalidatedBy;RU(e.util,{selectInvalidatedBy:I});var _=function(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,o=e.api,a=e.context,i=new Map,s=new Map,l=o.internalActions,u=l.unsubscribeQueryResult,c=l.removeMutationResult,d=l.updateSubscriptionOptions;return{buildInitiateQuery:function(e,r){var a=function(s,l){var c=void 0===l?{}:l,p=c.subscribe,f=void 0===p||p,m=c.forceRefetch,g=c.subscriptionOptions,h=c[Qz];return function(l,c){var p,b,v=t({queryArgs:s,endpointDefinition:r,endpointName:e}),y=n(((p={type:"query",subscribe:f,forceRefetch:m,subscriptionOptions:g,endpointName:e,originalArgs:s,queryCacheKey:v})[Qz]=h,p)),w=o.endpoints[e].select(s),S=l(y),x=w(c()),E=S.requestId,C=S.abort,k=x.requestId!==E,R=null==(b=i.get(l))?void 0:b[v],T=function(){return w(c())},I=Object.assign(h?S.then(T):k&&!R?Promise.resolve(x):Promise.all([R,S]).then(T),{arg:s,requestId:E,subscriptionOptions:g,queryCacheKey:v,abort:C,unwrap:function(){return Iz(this,null,(function(){var e;return hz(this,(function(t){switch(t.label){case 0:return[4,I];case 1:if((e=t.sent()).isError)throw e.error;return[2,e.data]}}))}))},refetch:function(){return l(a(s,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){f&&l(u({queryCacheKey:v,requestId:E}))},updateSubscriptionOptions:function(t){I.subscriptionOptions=t,l(d({endpointName:e,requestId:E,queryCacheKey:v,options:t}))}});if(!R&&!k&&!h){var _=i.get(l)||{};_[v]=I,i.set(l,_),I.then((function(){delete _[v],Object.keys(_).length||i.delete(l)}))}return I}};return a},buildInitiateMutation:function(e){return function(t,n){var o=void 0===n?{}:n,a=o.track,i=void 0===a||a,l=o.fixedCacheKey;return function(n,o){var a=r({type:"mutation",endpointName:e,originalArgs:t,track:i,fixedCacheKey:l}),u=n(a),d=u.requestId,p=u.abort,f=u.unwrap,m=u.unwrap().then((function(e){return{data:e}})).catch((function(e){return{error:e}})),g=function(){n(c({requestId:d,fixedCacheKey:l}))},h=Object.assign(m,{arg:u.arg,requestId:d,abort:p,unwrap:f,unsubscribe:g,reset:g}),b=s.get(n)||{};return s.set(n,b),b[d]=h,h.then((function(){delete b[d],Object.keys(b).length||s.delete(n)})),l&&(b[l]=h,h.then((function(){b[l]===h&&(delete b[l],Object.keys(b).length||s.delete(n))}))),h}}},getRunningQueryThunk:function(e,n){return function(r){var o,s=a.endpointDefinitions[e],l=t({queryArgs:n,endpointDefinition:s,endpointName:e});return null==(o=i.get(r))?void 0:o[l]}},getRunningMutationThunk:function(e,t){return function(e){var n;return null==(n=s.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return function(e){return Object.values(i.get(e)||{}).filter(Zz)}},getRunningMutationsThunk:function(){return function(e){return Object.values(s.get(e)||{}).filter(Zz)}},getRunningOperationPromises:function(){var e=function(e){return Array.from(e.values()).flatMap((function(e){return e?Object.values(e):[]}))};return bz(bz([],e(i)),e(s)).filter(Zz)},removalWarning:p};function p(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}}({queryThunk:p,mutationThunk:f,api:e,serializeQueryArgs:a,context:n}),A=_.buildInitiateQuery,O=_.buildInitiateMutation,N=_.getRunningMutationThunk,P=_.getRunningMutationsThunk,L=_.getRunningQueriesThunk,M=_.getRunningQueryThunk,D=_.getRunningOperationPromises,j=_.removalWarning;return RU(e.util,{getRunningOperationPromises:D,getRunningOperationPromise:j,getRunningMutationThunk:N,getRunningMutationsThunk:P,getRunningQueryThunk:M,getRunningQueriesThunk:L}),{name:TU,injectEndpoint:function(t,n){var r,o=e;null!=(r=o.endpoints)[t]||(r[t]={}),Kz(n)?RU(o.endpoints[t],{name:t,select:R(t,n),initiate:A(t,n)},v(p,t)):function(e){return e.type===$z.mutation}(n)&&RU(o.endpoints[t],{name:t,select:T(),initiate:O(t)},v(f,t))}}}},function(e){var t=void 0===e?{}:e,n=t.batch,r=void 0===n?hd.batch:n,o=t.useDispatch,a=void 0===o?hd.useDispatch:o,i=t.useSelector,s=void 0===i?hd.useSelector:i,l=t.useStore,u=void 0===l?hd.useStore:l,c=t.unstable__sideEffectsInRender,d=void 0!==c&&c;return{name:KU,init:function(e,t,n){var o=t.serializeQueryArgs,i=e,l=function(e){var t=e.api,n=e.moduleOptions,r=n.batch,o=n.useDispatch,a=n.useSelector,i=n.useStore,s=n.unstable__sideEffectsInRender,l=e.serializeQueryArgs,u=e.context,c=s?function(e){return e()}:U.useEffect;return{buildQueryHooks:function(e){var n=function(n,r){var a=void 0===r?{}:r,i=a.refetchOnReconnect,s=a.refetchOnFocus,l=a.refetchOnMountOrArgChange,d=a.skip,p=void 0!==d&&d,f=a.pollingInterval,m=void 0===f?0:f,g=t.endpoints[e].initiate,h=o(),b=jU(p?sU:n,UU,u.endpointDefinitions[e],e),v=$U({refetchOnReconnect:i,refetchOnFocus:s,pollingInterval:m}),y=U.useRef(!1),w=U.useRef(),S=w.current||{},x=S.queryCacheKey,E=S.requestId,C=!1;if(x&&E){var k=h(t.internalActions.internal_probeSubscription({queryCacheKey:x,requestId:E}));C=!!k}var R=!C&&y.current;return c((function(){y.current=C})),c((function(){R&&(w.current=void 0)}),[R]),c((function(){var e,t=w.current;if(b===sU)return null==t||t.unsubscribe(),void(w.current=void 0);var n=null==(e=w.current)?void 0:e.subscriptionOptions;if(t&&t.arg===b)v!==n&&t.updateSubscriptionOptions(v);else{null==t||t.unsubscribe();var r=h(g(b,{subscriptionOptions:v,forceRefetch:l}));w.current=r}}),[h,g,l,b,v,R]),U.useEffect((function(){return function(){var e;null==(e=w.current)||e.unsubscribe(),w.current=void 0}}),[]),U.useMemo((function(){return{refetch:function(){var e;if(!w.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=w.current)?void 0:e.refetch()}}}),[])},s=function(n){var a=void 0===n?{}:n,i=a.refetchOnReconnect,s=a.refetchOnFocus,l=a.pollingInterval,u=void 0===l?0:l,d=t.endpoints[e].initiate,p=o(),f=U.useState(FU),m=f[0],g=f[1],h=U.useRef(),b=$U({refetchOnReconnect:i,refetchOnFocus:s,pollingInterval:u});c((function(){var e,t,n=null==(e=h.current)?void 0:e.subscriptionOptions;b!==n&&(null==(t=h.current)||t.updateSubscriptionOptions(b))}),[b]);var v=U.useRef(b);c((function(){v.current=b}),[b]);var y=U.useCallback((function(e,t){var n;return void 0===t&&(t=!1),r((function(){var r;null==(r=h.current)||r.unsubscribe(),h.current=n=p(d(e,{subscriptionOptions:v.current,forceRefetch:!t})),g(e)})),n}),[p,d]);return U.useEffect((function(){return function(){var e;null==(e=null==h?void 0:h.current)||e.unsubscribe()}}),[]),U.useEffect((function(){m===FU||h.current||y(m,!0)}),[m,y]),U.useMemo((function(){return[y,m]}),[y,m])},p=function(n,r){var o=void 0===r?{}:r,s=o.skip,c=void 0!==s&&s,p=o.selectFromResult,f=t.endpoints[e].select,m=jU(c?sU:n,l,u.endpointDefinitions[e],e),g=U.useRef(),h=U.useMemo((function(){return JM([f(m),function(e,t){return t},function(e){return m}],d)}),[f,m]),b=U.useMemo((function(){return p?JM([h],p):h}),[h,p]),v=a((function(e){return b(e,g.current)}),hd.shallowEqual),y=i(),w=h(y.getState(),g.current);return HU((function(){g.current=w}),[w]),v};return{useQueryState:p,useQuerySubscription:n,useLazyQuerySubscription:s,useLazyQuery:function(e){var t=s(e),n=t[0],r=t[1],o=p(r,DU(MU({},e),{skip:r===FU})),a=U.useMemo((function(){return{lastArg:r}}),[r]);return U.useMemo((function(){return[n,o,a]}),[n,o,a])},useQuery:function(e,t){var r=n(e,t),o=p(e,MU({selectFromResult:e===sU||(null==t?void 0:t.skip)?void 0:GU},t)),a=o.data,i=o.status,s=o.isLoading,l=o.isSuccess,u=o.isError,c=o.error;return U.useDebugValue({data:a,status:i,isLoading:s,isSuccess:l,isError:u,error:c}),U.useMemo((function(){return MU(MU({},o),r)}),[o,r])}}},buildMutationHook:function(e){return function(n){var i=void 0===n?{}:n,s=i.selectFromResult,l=void 0===s?VU:s,u=i.fixedCacheKey,c=t.endpoints[e],d=c.select,p=c.initiate,f=o(),m=U.useState(),g=m[0],h=m[1];U.useEffect((function(){return function(){(null==g?void 0:g.arg.fixedCacheKey)||null==g||g.reset()}}),[g]);var b=U.useCallback((function(e){var t=f(p(e,{fixedCacheKey:u}));return h(t),t}),[f,p,u]),v=(g||{}).requestId,y=U.useMemo((function(){return JM([d({fixedCacheKey:u,requestId:null==g?void 0:g.requestId})],l)}),[d,g,l,u]),w=a(y,hd.shallowEqual),S=null==u?null==g?void 0:g.arg.originalArgs:void 0,x=U.useCallback((function(){r((function(){g&&h(void 0),u&&f(t.internalActions.removeMutationResult({requestId:v,fixedCacheKey:u}))}))}),[f,u,g,v]),E=w.endpointName,C=w.data,k=w.status,R=w.isLoading,T=w.isSuccess,I=w.isError,_=w.error;U.useDebugValue({endpointName:E,data:C,status:k,isLoading:R,isSuccess:T,isError:I,error:_});var A=U.useMemo((function(){return DU(MU({},w),{originalArgs:S,reset:x})}),[w,S,x]);return U.useMemo((function(){return[b,A]}),[b,A])}},usePrefetch:function(e,n){var r=o(),a=$U(n);return U.useCallback((function(n,o){return r(t.util.prefetch(e,n,MU(MU({},a),o)))}),[e,r,a])}};function d(e,t,n){if((null==t?void 0:t.endpointName)&&e.isUninitialized){var r=t.endpointName,o=u.endpointDefinitions[r];l({queryArgs:t.originalArgs,endpointDefinition:o,endpointName:r})===l({queryArgs:n,endpointDefinition:o,endpointName:r})&&(t=void 0)}var a=e.isSuccess?e.data:null==t?void 0:t.data;void 0===a&&(a=e.data);var i=void 0!==a,s=e.isLoading,c=!i&&s,d=e.isSuccess||s&&i;return DU(MU({},e),{data:a,currentData:e.data,isFetching:s,isLoading:c,isSuccess:d})}}({api:e,moduleOptions:{batch:r,useDispatch:a,useSelector:s,useStore:u,unstable__sideEffectsInRender:d},serializeQueryArgs:o,context:n}),c=l.buildQueryHooks,p=l.buildMutationHook,f=l.usePrefetch;return qU(i,{usePrefetch:f}),qU(n,{batch:r}),{injectEndpoint:function(t,n){if(function(e){return e.type===BU.query}(n)){var r=c(t),o=r.useQuery,a=r.useLazyQuery,s=r.useLazyQuerySubscription,l=r.useQueryState,u=r.useQuerySubscription;qU(i.endpoints[t],{useQuery:o,useLazyQuery:a,useLazyQuerySubscription:s,useQueryState:l,useQuerySubscription:u}),e["use"+WU(t)+"Query"]=o,e["useLazy"+WU(t)+"Query"]=a}else if(function(e){return e.type===BU.mutation}(n)){var d=p(t);qU(i.endpoints[t],{useMutation:d}),e["use"+WU(t)+"Mutation"]=d}}}}}}());const XU=e=>async(t,n,r)=>{const o=function(e){var t=this;void 0===e&&(e={});var n=e,r=n.baseUrl,o=n.prepareHeaders,a=void 0===o?function(e){return e}:o,i=n.fetchFn,s=void 0===i?Mz:i,l=n.paramsSerializer,u=n.isJsonContentType,c=void 0===u?jz:u,d=n.jsonContentType,p=void 0===d?"application/json":d,f=n.jsonReplacer,m=n.timeout,g=n.responseHandler,h=n.validateStatus,b=Tz(n,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","jsonReplacer","timeout","responseHandler","validateStatus"]);return"undefined"==typeof fetch&&s===Mz&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(e,n){return Iz(t,null,(function(){var t,o,i,u,d,y,w,S,x,E,C,k,R,T,I,_,A,O,N,P,L,M,D,j,F,$,B,z,U,H,V,G,W,q,K,Y;return hz(this,(function(X){switch(X.label){case 0:return t=n.signal,o=n.getState,i=n.extra,u=n.endpoint,d=n.forced,y=n.type,x=(S="string"==typeof e?{url:e}:e).url,E=S.headers,C=void 0===E?new Headers(b.headers):E,k=S.params,R=void 0===k?void 0:k,T=S.responseHandler,I=void 0===T?null!=g?g:"json":T,_=S.validateStatus,A=void 0===_?null!=h?h:Dz:_,O=S.timeout,N=void 0===O?m:O,P=Tz(S,["url","headers","params","responseHandler","validateStatus","timeout"]),L=kz(Rz(kz({},b),{signal:t}),P),C=new Headers(Fz(C)),M=L,[4,a(C,{getState:o,extra:i,endpoint:u,forced:d,type:y})];case 1:M.headers=X.sent()||C,D=function(e){return"object"==typeof e&&(hD(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!L.headers.has("content-type")&&D(L.body)&&L.headers.set("content-type",p),D(L.body)&&c(L.headers)&&(L.body=JSON.stringify(L.body,f)),R&&(j=~x.indexOf("?")?"&":"?",F=l?l(R):new URLSearchParams(Fz(R)),x+=j+F),x=Oz(r,x),$=new Request(x,L),B=new Request(x,L),w={request:B},U=!1,H=N&&setTimeout((function(){U=!0,n.abort()}),N),X.label=2;case 2:return X.trys.push([2,4,5,6]),[4,s($)];case 3:return z=X.sent(),[3,6];case 4:return V=X.sent(),[2,{error:{status:U?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(V)},meta:w}];case 5:return H&&clearTimeout(H),[7];case 6:G=z.clone(),w.response=G,q="",X.label=7;case 7:return X.trys.push([7,9,,10]),[4,Promise.all([v(z,I).then((function(e){return W=e}),(function(e){return K=e})),G.text().then((function(e){return q=e}),(function(){}))])];case 8:if(X.sent(),K)throw K;return[3,10];case 9:return Y=X.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:z.status,data:q,error:String(Y)},meta:w}];case 10:return[2,A(z,W)?{data:W,meta:w}:{error:{status:z.status,data:W},meta:w}]}}))}))};function v(e,t){return Iz(this,null,(function(){var n;return hz(this,(function(r){switch(r.label){case 0:return"function"==typeof t?[2,t(e)]:("content-type"===t&&(t=c(e.headers)?"json":"text"),"json"!==t?[3,2]:[4,e.text()]);case 1:return[2,(n=r.sent()).length?JSON.parse(n):null];case 2:return[2,e.text()]}}))}))}}({baseUrl:(n.getState().application?.baseUrl||"").replace(/\/$/,"")+e,referrerPolicy:"no-referrer",headers:{Accept:"application/json","Content-Type":"application/json"}});return o(t,n,r)},ZU=YU({reducerPath:"api.debug",tagTypes:["debug/list"],baseQuery:XU("/debug/api/"),endpoints:e=>({getDebug:e.query({query:()=>"",transformResponse:e=>e.data||[],providesTags:["debug/list"]}),getObject:e.query({query:e=>`object/${e.debugEntryId}/${e.objectId}`,transformResponse:e=>e.data}),getCollectorInfo:e.query({query:e=>`view/${e.id}?collector=${e.collector}`,transformResponse:e=>e.data||[],transformErrorResponse:e=>e.data})})}),{useGetDebugQuery:QU,useLazyGetDebugQuery:JU,useGetObjectQuery:eH,useLazyGetObjectQuery:tH,useLazyGetCollectorInfoQuery:nH}=ZU,rH=YU({reducerPath:"api.gii",baseQuery:XU("/gii/api"),endpoints:e=>({getGenerators:e.query({query:()=>"/generator",transformResponse:e=>e.generators||[]}),postPreview:e.mutation({query:({generator:e,parameters:t})=>({url:`/generator/${e}/preview`,method:"POST",body:{parameters:t}})}),postGenerate:e.mutation({query:({generator:e,parameters:t,answers:n})=>({url:`/generator/${e}/generate`,method:"POST",body:{parameters:t,answers:n}})}),postDiff:e.mutation({query:({generator:e,parameters:t,fileId:n})=>({url:`/generator/${e}/diff?file=${n}`,method:"POST",body:{parameters:t}})})})}),{useGetGeneratorsQuery:oH,useLazyGetGeneratorsQuery:aH,usePostPreviewMutation:iH,usePostGenerateMutation:sH,usePostDiffMutation:lH}=rH,uH=YU({reducerPath:"api.inspector",keepUnusedDataFor:0,tagTypes:["inspector/composer"],baseQuery:XU("/inspect/api/"),endpoints:e=>({getParameters:e.query({query:()=>"params",transformResponse:e=>e.data||[]}),getConfiguration:e.query({query:(e="di")=>`config?group=${e}`,transformResponse:e=>e.data}),getClasses:e.query({query:()=>"classes",transformResponse:e=>e.data||[]}),getObject:e.query({query:e=>`object?classname=${e}`,transformResponse:e=>e.data}),getCommands:e.query({query:e=>"command",transformResponse:e=>e.data||[]}),runCommand:e.mutation({query:e=>({url:`command?command=${e}`,method:"POST"}),transformResponse:e=>e.data}),getFiles:e.query({query:e=>`files?path=${e}`,transformResponse:e=>e.data||[]}),getClass:e.query({query:({className:e,methodName:t=""})=>`files?class=${e}&method=${t}`,transformResponse:e=>e.data||[]}),getTranslations:e.query({query:()=>"translations",transformResponse:e=>e.data||[]}),putTranslations:e.mutation({query:e=>({method:"PUT",url:"translations",body:e}),transformResponse:e=>e.data||[]}),getTable:e.query({query:e=>e?`table/${e}`:"table",transformResponse:e=>e.data||[]}),doRequest:e.mutation({query:e=>({method:"PUT",url:`request?debugEntryId=${e.id}`}),transformResponse:e=>e.data||[]}),postCurlBuild:e.mutation({query:e=>({method:"POST",url:`curl/build?debugEntryId=${e}`}),transformResponse:e=>e.data}),getRoutes:e.query({query:()=>"routes",transformResponse:e=>e.data||[]}),getCheckRoute:e.query({query:e=>`route/check?route=${e}`,transformResponse:e=>e.data}),getEvents:e.query({query:()=>"events",transformResponse:e=>e.data}),getPhpInfo:e.query({query:()=>"phpinfo",transformResponse:e=>e.data||[]}),getComposer:e.query({query:()=>"composer",transformResponse:e=>e.data,providesTags:["inspector/composer"]}),getComposerInspect:e.query({query:e=>`composer/inspect?package=${e}`,transformResponse:e=>e.data,providesTags:["inspector/composer"]}),getCache:e.query({query:e=>`cache?key=${e}`,transformResponse:e=>e.data}),deleteCache:e.mutation({query:e=>({url:`cache?key=${e}`,method:"DELETE"}),transformResponse:e=>e.data}),clearCache:e.mutation({query:()=>({url:"cache/clear",method:"POST"}),transformResponse:e=>e.data}),postComposerRequirePackage:e.mutation({query:({packageName:e,version:t,isDev:n})=>({url:"composer/require",method:"POST",body:{package:e,version:t,isDev:n}}),transformResponse:e=>e.data,invalidatesTags:["inspector/composer"]})})}),{useGetParametersQuery:cH,useLazyGetParametersQuery:dH,useGetConfigurationQuery:pH,useGetObjectQuery:fH,useGetClassesQuery:mH,useLazyGetObjectQuery:gH,useLazyGetFilesQuery:hH,useLazyGetClassQuery:bH,useLazyGetCommandsQuery:vH,useRunCommandMutation:yH,useGetTranslationsQuery:wH,usePutTranslationsMutation:SH,useDoRequestMutation:xH,useGetRoutesQuery:EH,useLazyGetCheckRouteQuery:CH,useGetTableQuery:kH,useGetPhpInfoQuery:RH,useGetComposerQuery:TH,useGetCacheQuery:IH,useDeleteCacheMutation:_H,useLazyGetCacheQuery:AH,useClearCacheMutation:OH,useLazyGetComposerInspectQuery:NH,useGetComposerInspectQuery:PH,usePostComposerRequirePackageMutation:LH,usePostCurlBuildMutation:MH,useGetEventsQuery:DH}=uH,jH=kD({name:"store.debug",initialState:{entry:null,currentPageRequestIds:[]},reducers:{changeEntryAction:(e,t)=>{e.entry=t.payload},addCurrentPageRequestId:(e,t)=>{e.currentPageRequestIds=[...e.currentPageRequestIds,t.payload].slice(0,100)}}}),{changeEntryAction:FH,addCurrentPageRequestId:$H}=jH.actions,BH=()=>hd.useSelector((e=>e[jH.name]?.entry)),zH={key:jH.name,version:1,whitelist:["entry"],storage:hB},UH={[jH.name]:X$(zH,jH.reducer),[ZU.reducerPath]:ZU.reducer},HH=[ZU.middleware],VH=kD({name:"store.frames2",initialState:{frames:{}},reducers:{addFrame:(e,t)=>{e.frames={...e.frames,[t.payload]:t.payload}},updateFrame:(e,t)=>{e.frames=t.payload},deleteFrame:(e,t)=>{const n=Object.entries(e.frames).filter((([e,n])=>e!=t.payload));e.frames=Object.fromEntries(n)}}}),{addFrame:GH,updateFrame:WH,deleteFrame:qH}=VH.actions,KH=()=>hd.useSelector((e=>e[VH.name].frames)),YH={key:VH.name,version:1,storage:hB},XH={[VH.name]:X$(YH,VH.reducer)},ZH=[],QH={[rH.reducerPath]:rH.reducer},JH=[rH.middleware],eV=YU({reducerPath:"api.inspector.git",keepUnusedDataFor:0,tagTypes:["git/summary","git/log"],baseQuery:XU("/inspect/api/git/"),endpoints:e=>({getSummary:e.query({query:()=>"summary",providesTags:["git/summary"],transformResponse:e=>e.data}),getLog:e.query({query:()=>"log",providesTags:["git/log"],transformResponse:e=>e.data}),checkout:e.mutation({query:({branch:e})=>({url:"checkout",method:"POST",body:{branch:e}}),invalidatesTags:[{type:"git/summary"}]}),command:e.mutation({query:({command:e})=>({url:`command?command=${e}`,method:"POST"}),invalidatesTags:[{type:"git/summary"}]})})}),{useGetSummaryQuery:tV,useGetLogQuery:nV,useCommandMutation:rV,useCheckoutMutation:oV}=eV,aV={[uH.reducerPath]:uH.reducer,[eV.reducerPath]:eV.reducer},iV=[uH.middleware,eV.middleware],sV=kD({name:"store.openApi",initialState:{entries:{}},reducers:{addApiEntry:(e,t)=>{e.entries={...e.entries,[t.payload]:t.payload}},updateApiEntry:(e,t)=>{e.entries=t.payload},deleteApiEntry:(e,t)=>{const n=Object.entries(e.entries).filter((([e,n])=>e!=t.payload));e.entries=Object.fromEntries(n)}}}),{addApiEntry:lV,updateApiEntry:uV,deleteApiEntry:cV}=sV.actions,dV=()=>hd.useSelector((e=>e[sV.name].entries)),pV={key:sV.name,version:1,storage:hB},fV={[sV.name]:X$(pV,sV.reducer)},mV=[],gV=e=>t=>n=>(BD(n)&&(console.log("action.payload.error",n,e,t),"FETCH_ERROR"===n.payload.status&&e.dispatch(I$({title:n.payload.error,text:`An error occurred during the request to ${n.meta.baseQueryMeta.request.url}`,color:"error"}))),t(n)),hV=xD({reducer:WM({...wB,...aV,...UH,...QH,...fV,...XH}),middleware:e=>e({serializableCheck:{ignoredActions:[O$,N$,P$,L$,M$,D$]}}).concat([...SB,...iV,...HH,...JH,...mV,...ZH,gV]),devTools:!1});qz(hV.dispatch);const bV=lB(hV),vV=hd.useSelector,yV=e.backendUrl;function wV(){const e=hd.useDispatch(),[t]=JU(),[n]=dH(),[r]=aH(),o=vV((e=>e.application.baseUrl)),[a,i]=U.useState(String(o)),[s,l]=U.useState({debug:!1,inspector:!1,gii:!1}),u=vV((e=>e.application.favoriteUrls));async function c(){t().then((e=>l((t=>({...t,debug:e.isSuccess}))))).catch((()=>l((e=>({...e,debug:!1}))))),n().then((e=>l((t=>({...t,inspector:e.isSuccess}))))).catch((()=>l((e=>({...e,inspector:!1}))))),r().then((e=>l((t=>({...t,gii:e.isSuccess}))))).catch((()=>l((e=>({...e,gii:!1})))))}const d=async t=>{i(t),e(S$(t)),await c()};return U.useEffect((()=>{c()}),[]),te.jsxs(fI,{container:!0,spacing:2,children:[te.jsxs(fI,{item:!0,md:6,xs:12,children:[te.jsx("h2",{children:"Yii Dev Panel"}),te.jsxs(uS,{children:["Default backend url is: ",te.jsx("b",{children:yV})]}),te.jsx("h3",{children:"API Statuses"}),Object.entries(s).map(((e,t)=>te.jsxs(H.Fragment,{children:[te.jsx(uS,{}),e[1]?te.jsxs(nS,{severity:"success",children:[te.jsx("span",{style:{textTransform:"capitalize"},children:e[0]}),": connected"]}):te.jsxs(nS,{severity:"error",children:[te.jsx("span",{style:{textTransform:"capitalize"},children:e[0]}),": disconnected"]})]},t))),te.jsxs(Ly,{component:"form",onSubmit:async e=>{e.preventDefault(),await d(a)},sx:{p:[.5,1],my:2,display:"flex",alignItems:"center"},children:[te.jsx(iC,{sx:{ml:1,flex:1},placeholder:a,value:a,onChange:e=>i(e.target.value)}),te.jsx(Uw,{type:"button",sx:{p:2},onClick:()=>e(k$(a)),children:te.jsx(ez,{})}),te.jsx(Uw,{type:"submit",sx:{p:2},children:te.jsx(dz,{})})]})]}),te.jsx(fI,{item:!0,md:6,xs:12,children:u.length>0&&te.jsxs(te.Fragment,{children:[te.jsx("h3",{children:"Favorites"}),te.jsx(f_,{children:u.map(((t,n)=>te.jsxs(A_,{children:[te.jsx(V_,{children:t}),te.jsxs(k_,{children:[te.jsx(Uw,{href:t,children:te.jsx(GB,{})}),te.jsx(Uw,{type:"submit",sx:{p:2},onClick:()=>e(R$(t)),children:te.jsx(JB,{})}),te.jsx(Uw,{type:"submit",sx:{p:2},onClick:()=>d(t),children:te.jsx(dz,{})})]})]},n)))})]})})]})}const SV=({indicatorSize:e=40})=>te.jsx(gR,{size:e,sx:{position:"absolute",top:"50%",left:"50%",marginTop:-e/2+"px",marginLeft:-e/2+"px"}}),xV=({module:e,props:t,scope:n,url:r})=>{const o=(({url:e})=>{const[t,n]=H.useState(!1),[r,o]=H.useState(!1);return H.useEffect((()=>{if(!e)return;const t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,n(!1),o(!1),t.onload=()=>{console.debug(`Dynamic Script Loaded: ${e}`),n(!0)},t.onerror=()=>{console.error(`Dynamic Script Error: ${e}`),n(!1),o(!0)},document.head.appendChild(t),()=>{console.debug(`Dynamic Script Unloaded: ${e}`),document.head.removeChild(t)}}),[e]),{ready:t,failed:r}})({url:e&&r});if(!e)return te.jsx(nS,{severity:"error",children:"Module name cannot be empty"});if(!o.ready)return te.jsx(SV,{});if(o.failed)return te.jsxs(nS,{severity:"error",children:["Failed to load dynamic script: ",r]});const a=H.lazy(((e,t)=>async()=>{await __webpack_init_sharing__("default");const n=window[e];return await n.init(__webpack_share_scopes__.default),(await window[e].get(t))()})(n,e));return te.jsx(U.Suspense,{fallback:te.jsx(SV,{}),children:te.jsx(a,{...t})})},EV={cache:{get:[{key:"123",count:2}],set:[{key:"123",value:{1:2,2:"object@stdClass#6692"},ttl:null,count:2}]}},CV=[{severity:"error",text:"Error text"},{severity:"success",text:"Success text"}];function kV(){return te.jsxs(H.Suspense,{fallback:te.jsx(SV,{}),children:[te.jsx(xV,{url:"http://localhost:3002/external.js",module:"./LogPanel",scope:"remote",props:{data:CV}}),te.jsx(xV,{url:"http://localhost:3002/external.js",module:"./CachePanel",scope:"remote",props:{data:EV}})]})}const RV={routes:[{index:!0,element:te.jsx(wV,{})},{path:"shared",element:te.jsx(kV,{})}],reducers:wB,middlewares:SB,standaloneModule:!1},TV=U.createContext(void 0);function IV(){const e=U.useContext(TV);if(void 0===e)throw new Error(["MUI: 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}const _V=U.createContext(void 0),AV=()=>{const e=U.useContext(_V);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e};function OV(e){return Cg("MuiDataGrid",e)}const NV=kg("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","autoHeight","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLinkOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","root","root--densityStandard","root--densityComfortable","root--densityCompact","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),PV=e=>{const{classes:t}=e;return eb({root:["main"]},OV,t)},LV=Wv("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})((()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"})));function MV(e){const t=AV(),n=PV(t);return ee.jsx(LV,{className:n.root,ownerState:t,children:e.children})}function DV(e,t){var n=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},r=function(e){if(!(e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var r=this;n(this),this.__resizeRAF__&&t.cancelAnimationFrame(this.__resizeRAF__),this.__resizeRAF__=t.requestAnimationFrame((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(r)&&(r.__resizeLast__.width=r.offsetWidth,r.__resizeLast__.height=r.offsetHeight,r.__resizeListeners__.forEach((function(t){t.call(r,e)})))}))}},o=!1,a="",i="animationstart",s="Webkit Moz O ms".split(" "),l="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),u=document.createElement("fakeelement");if(void 0!==u.style.animationName&&(o=!0),!1===o)for(var c=0;c div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .Mui-resizeTriggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',o="ShadowRoot"===n.constructor.name?n:t.head||t.getElementsByTagName("head")[0],a=t.createElement("style");a.id="muiDetectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(t.createTextNode(r)),o.appendChild(a)}}(s,o.getRootNode()),o.__resizeLast__={},o.__resizeListeners__=[],(o.__resizeTriggers__=s.createElement("div")).className="Mui-resizeTriggers",o.__resizeTriggers__.innerHTML='
',o.appendChild(o.__resizeTriggers__),n(o),o.addEventListener("scroll",r,!0),i&&(o.__resizeTriggers__.__animationListener__=function(e){e.animationName==d&&n(o)},o.__resizeTriggers__.addEventListener(i,o.__resizeTriggers__.__animationListener__))}o.__resizeListeners__.push(a)},removeResizeListener:function(e,t){if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",r,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(i,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(lJ){}}}}}const jV=["children","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","style"],FV=U.forwardRef((function(e,t){const{children:n,defaultHeight:r=null,defaultWidth:o=null,disableHeight:a=!1,disableWidth:i=!1,nonce:s,onResize:l,style:u}=e,c=_d(e,jV),[d,p]=U.useState({height:r,width:o}),f=U.useRef(null),m=U.useRef(null),g=Ph((()=>{if(m.current){const e=m.current.offsetHeight||0,t=m.current.offsetWidth||0,n=Th(m.current).getComputedStyle(m.current),r=parseInt(n.paddingLeft,10)||0,o=parseInt(n.paddingRight,10)||0,s=e-(parseInt(n.paddingTop,10)||0)-(parseInt(n.paddingBottom,10)||0),u=t-r-o;(!a&&d.height!==s||!i&&d.width!==u)&&(p({height:s,width:u}),l&&l({height:s,width:u}))}}));ch((()=>{var e;if(m.current=f.current.parentElement,!m)return;const t=Th(null!=(e=m.current)?e:void 0),n=DV(s,t);return n.addResizeListener(m.current,g),g(),()=>{n.removeResizeListener(m.current,g)}}),[s,g]);const h={overflow:"visible"},b={};a||(h.height=0,b.height=d.height),i||(h.width=0,b.width=d.width);const v=Lh(f,t);return ee.jsx("div",Id({ref:v,style:Id({},h,u)},c,{children:null===d.height&&null===d.width?null:n(b)}))})),$V=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(r):console.warn(r))}},BV=(e,t)=>e;$V(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);const zV=(e,t)=>function(e){return e.acceptsApiRef}(t)?t(e):t(e.current.state),UV={cache:null};$V(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.","To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g `mySelector(state, apiRef.current.instanceId)`."]);const HV=(...e)=>{null===UV.cache&&(UV.cache={});const t=(...t)=>{const[n,r]=t,o=!!n.current,a=o?n.current.instanceId:null!=r?r:"default",i=o?n.current.state:n;null===UV.cache&&(UV.cache={});const{cache:s}=UV;if(s[a]&&s[a].get(e))return s[a].get(e)(i,a);const l=JM(...e);return s[a]||(s[a]=new Map),s[a].set(e,l),l(i,a)};return t.acceptsApiRef=!0,t},VV=e=>e.rows,GV=HV(VV,(e=>e.totalRowCount)),WV=HV(VV,(e=>e.loading)),qV=HV(VV,(e=>e.totalTopLevelRowCount)),KV=HV(VV,(e=>e.idRowsLookup)),YV=HV(VV,(e=>e.idToIdLookup)),XV=HV(VV,(e=>e.tree)),ZV=HV(VV,(e=>e.groupingName)),QV=HV(VV,(e=>e.treeDepth)),JV=HV(VV,(e=>e.ids)),eG=HV(VV,(e=>null==e?void 0:e.additionalRowGroups)),tG=HV(eG,(e=>null==e?void 0:e.pinnedRows)),nG=HV(tG,(e=>{var t,n;return((null==e||null==(t=e.top)?void 0:t.length)||0)+((null==e||null==(n=e.bottom)?void 0:n.length)||0)})),rG=e=>e.sorting,oG=HV(rG,(e=>e.sortedRows)),aG=HV(oG,KV,((e,t)=>e.map((e=>({id:e,model:t[e]}))))),iG=HV(rG,(e=>e.sortModel)),sG=HV(iG,(e=>e.reduce(((t,n,r)=>(t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?r+1:void 0},t)),{}))),lG=e=>e.columns,uG=HV(lG,(e=>e.all)),cG=HV(lG,(e=>e.lookup)),dG=HV(uG,cG,((e,t)=>e.map((e=>t[e])))),pG=HV(lG,(e=>e.columnVisibilityModel)),fG=HV(dG,pG,((e,t)=>e.filter((e=>!1!==t[e.field]))));HV(fG,(e=>e.map((e=>e.field))));const mG=HV(fG,(e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return 0===n?0:t[n-1]+e[n-1].computedWidth})),hG=HV(dG,(e=>e.filter((e=>e.filterable)))),bG=HV(dG,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{})));BV(HV(hG,(e=>e.map((e=>e.field))))),BV(HV(fG,(e=>e.length)));const vG=BV(HV(mG,gG,((e,t)=>({totalWidth:t,positions:e})))),yG=e=>e.filter,wG=HV(yG,(e=>e.filterModel));HV(wG,(e=>e.quickFilterValues));const SG=HV(yG,(e=>e.visibleRowsLookup)),xG=HV(yG,(e=>e.filteredRowsLookup));HV(yG,(e=>e.filteredDescendantCountLookup));const EG=HV(SG,aG,((e,t)=>t.filter((t=>!1!==e[t.id])))),CG=HV(EG,(e=>e.map((e=>e.id)))),kG=HV(xG,aG,((e,t)=>t.filter((t=>!1!==e[t.id])))),RG=HV(kG,(e=>e.map((e=>e.id)))),TG=HV(EG,XV,QV,((e,t,n)=>n<2?e:e.filter((e=>{var n;return 0===(null==(n=t[e.id])?void 0:n.depth)})))),IG=HV(EG,(e=>e.length)),_G=HV(TG,(e=>e.length)),AG=HV(wG,cG,((e,t)=>{var n;return null==(n=e.items)?void 0:n.filter((e=>{var n,r;if(!e.columnField)return!1;const o=t[e.columnField];if(null==o||!o.filterOperators||0===(null==o||null==(n=o.filterOperators)?void 0:n.length))return!1;const a=o.filterOperators.find((t=>t.value===e.operatorValue));return!!a&&(!a.InputComponent||null!=e.value&&""!==(null==(r=e.value)?void 0:r.toString()))}))})),OG=HV(AG,(e=>e.reduce(((e,t)=>(e[t.columnField]?e[t.columnField].push(t):e[t.columnField]=[t],e)),{}))),NG=e=>e.density,PG=HV(NG,(e=>e.value)),LG=HV(NG,(e=>e.rowHeight)),MG=HV(NG,(e=>e.headerHeight)),DG=HV(NG,(e=>e.headerGroupingMaxDepth)),jG=HV(NG,(e=>e.factor)),FG=HV(NG,(e=>e.headerHeight*(1+e.headerGroupingMaxDepth)));function $G(e){var t,n;const r=IV(),o=AV(),a=zV(r,FG),[i,s]=U.useState((()=>{var e,t;return null!=(e=null==(t=r.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null})),l=U.useCallback((()=>{var e,t;s(null!=(e=null==(t=r.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null)}),[r]);ch((()=>r.current.subscribeEvent("viewportInnerSizeChange",l)),[r,l]);let u=null!=(t=null==i?void 0:i.height)?t:0;return o.autoHeight&&0===u&&(u="auto"),i?ee.jsx("div",Id({style:{height:u,width:null!=(n=null==i?void 0:i.width)?n:0,position:"absolute",top:a,bottom:"auto"===u?0:void 0}},e)):null}function BG(){const e=IV(),t=AV(),n=zV(e,GV),r=zV(e,IG),o=zV(e,WV),a=!o&&n>0&&0===r;let i=null;var s,l,u;o||0!==n||(i=ee.jsx(t.components.NoRowsOverlay,Id({},null==(s=t.componentsProps)?void 0:s.noRowsOverlay)));a&&(i=ee.jsx(t.components.NoResultsOverlay,Id({},null==(l=t.componentsProps)?void 0:l.noResultsOverlay)));o&&(i=ee.jsx(t.components.LoadingOverlay,Id({},null==(u=t.componentsProps)?void 0:u.loadingOverlay)));return null===i?null:ee.jsx($G,{children:i})}function zG(e){const{children:t,VirtualScrollerComponent:n,ColumnHeadersComponent:r}=e,o=IV(),a=AV(),i=zV(o,FG),[s,l]=U.useState(a.disableVirtualization),u=U.useCallback((()=>{l(!0)}),[]),c=U.useCallback((()=>{l(!1)}),[]);U.useEffect((()=>{l(a.disableVirtualization)}),[a.disableVirtualization]),o.current.unstable_disableVirtualization=u,o.current.unstable_enableVirtualization=c;const d=U.useRef(null),p=U.useRef(null),f=U.useRef(null),m=U.useRef(null);o.current.columnHeadersContainerElementRef=p,o.current.columnHeadersElementRef=d,o.current.windowRef=f,o.current.renderingZoneRef=m;const g=U.useCallback((e=>{o.current.publishEvent("resize",e)}),[o]);return ee.jsxs(MV,{children:[ee.jsx(BG,{}),ee.jsx(r,{ref:p,innerRef:d}),ee.jsx(FV,{nonce:a.nonce,disableHeight:a.autoHeight,onResize:g,children:e=>{const t={width:e.width,height:e.height?e.height-i:"auto",marginTop:i};return ee.jsx(n,{ref:f,style:t,disableVirtualization:s})}}),t]})}function UG(e,t){const n=U.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}let HG=class extends U.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.props.api.current&&(this.logError(e),this.props.api.current.showError({error:e,errorInfo:t}))}logError(e,t){this.props.logger.error(`An unexpected error occurred. Error: ${e&&e.message}. `,e,t)}render(){var e;return this.props.hasError||null!=(e=this.state)&&e.hasError?this.props.render(this.state):this.props.children}};function VG(e){const{children:t}=e,n=IV(),r=UG(n,"GridErrorHandler"),o=AV(),a=n.current.state.error;return ee.jsx(HG,{hasError:null!=a,api:n,logger:r,render:e=>{var t;return ee.jsx(MV,{children:ee.jsx(o.components.ErrorOverlay,Id({},e,a,null==(t=o.componentsProps)?void 0:t.errorOverlay))})},children:t})}function GG(){var e;const t=IV(),n=AV(),r=U.useRef(null);return t.current.footerRef=r,n.hideFooter?null:ee.jsx("div",{ref:r,children:ee.jsx(n.components.Footer,Id({},null==(e=n.componentsProps)?void 0:e.footer))})}function WG(){var e;const t=IV(),n=AV(),r=U.useRef(null);return t.current.headerRef=r,ee.jsx("div",{ref:r,children:ee.jsx(n.components.Header,Id({},null==(e=n.componentsProps)?void 0:e.header))})}function qG(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;te.focus,lW=HV(sW,(e=>e.cell)),uW=HV(sW,(e=>e.columnHeader)),cW=e=>e.tabIndex,dW=HV(cW,(e=>e.cell)),pW=HV(cW,(e=>e.columnHeader)),fW=["align","children","colIndex","colDef","cellMode","field","formattedValue","hasFocus","height","isEditable","rowId","tabIndex","value","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","onClick","onDoubleClick","onMouseDown","onMouseUp","onKeyDown","onDragEnter","onDragOver"];let mW;const gW=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","getValue"],hW=e=>{const{value:t}=e,n=_d(e,gW),r=IV(),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["booleanCell"]},OV,t)})({classes:o.classes}),i=U.useMemo((()=>t?o.components.BooleanCellTrueIcon:o.components.BooleanCellFalseIcon),[o.components.BooleanCellFalseIcon,o.components.BooleanCellTrueIcon,t]);return ee.jsx(i,Id({fontSize:"small",className:a.root,titleAccess:r.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},n))},bW=U.memo(hW),vW=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","getValue","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function yW(e){var t;const{id:n,value:r,field:o,className:a,hasFocus:i,onValueChange:s}=e,l=_d(e,vW),u=IV(),c=U.useRef(null),d=Oh(),[p,f]=U.useState(r),m=AV(),g=(e=>{const{classes:t}=e;return eb({root:["editBooleanCell"]},OV,t)})({classes:m.classes}),h=U.useCallback((async e=>{const t=e.target.checked;s&&await s(e,t),f(t),await u.current.setEditCellValue({id:n,field:o,value:t},e)}),[u,o,n,s]);return U.useEffect((()=>{f(r)}),[r]),ch((()=>{i&&c.current.focus()}),[i]),ee.jsx("label",Id({htmlFor:d,className:KG(g.root,a)},l,{children:ee.jsx(m.components.BaseCheckbox,Id({id:d,inputRef:c,checked:Boolean(p),onChange:h,size:"small"},null==(t=m.componentsProps)?void 0:t.baseCheckbox))}))}const wW=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","getValue","inputProps","isValidating","isProcessingProps","onValueChange"],SW=Wv(iC)({fontSize:"inherit"});function xW(e){const{id:t,value:n,field:r,colDef:o,hasFocus:a,inputProps:i,onValueChange:s}=e,l=_d(e,wW),u="dateTime"===o.type,c=IV(),d=U.useRef(),p=U.useMemo((()=>{let e,t;if(e=null==n?null:n instanceof Date?n:new Date((null!=n?n:"").toString()),null==e||Number.isNaN(e.getTime()))t="";else{t=new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,u?16:10)}return{parsed:e,formatted:t}}),[n,u]),[f,m]=U.useState(p),g=(e=>{const{classes:t}=e;return eb({root:["editInputCell"]},OV,t)})({classes:AV().classes}),h=U.useCallback((async e=>{const n=e.target.value;let o;if(""===n)o=null;else{const[e,t]=n.split("T"),[r,a,i]=e.split("-");if(o=new Date,o.setFullYear(Number(r),Number(a)-1,Number(i)),o.setHours(0,0,0,0),t){const[e,n]=t.split(":");o.setHours(Number(e),Number(n),0,0)}}s&&await s(e,o),m({parsed:o,formatted:n}),c.current.setEditCellValue({id:t,field:r,value:o},e)}),[c,r,t,s]);return U.useEffect((()=>{m((e=>{var t,n;return p.parsed!==e.parsed&&(null==(t=p.parsed)?void 0:t.getTime())!==(null==(n=e.parsed)?void 0:n.getTime())?p:e}))}),[p]),ch((()=>{a&&d.current.focus()}),[a]),ee.jsx(SW,Id({inputRef:d,fullWidth:!0,className:g.root,type:u?"datetime-local":"date",inputProps:Id({max:u?"9999-12-31T23:59":"9999-12-31"},i),value:f.formatted,onChange:h},l))}const EW=e=>ee.jsx(xW,Id({},e)),CW=ey(ee.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),kW=ey(ee.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),RW=ey(ee.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),TW=ey(ee.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),IW=ey(ee.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),_W=ey(ee.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"),AW=ey(ee.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");ey(ee.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),ey(ee.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");const OW=ey(ee.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),NW=ey(ee.jsx("path",{d:"M11 19V5h2v14z"}),"Separator"),PW=ey(ee.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),LW=ey(ee.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),MW=ey(ee.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),DW=ey(ee.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"),jW=ey(ee.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"),FW=ey(ee.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),$W=ey(ee.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),BW=ey(ee.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"),zW=ey(ee.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"),UW=ey(ee.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),HW=ey(ee.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),VW=ey(ee.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");function GW(e){return"object"==typeof e&&null!==e?e.value:e}function WW(e,t){if(void 0===t)return;const n=t.find((t=>{const n=GW(t);return String(n)===String(e)}));return GW(n)}const qW=["item","applyValue","type","apiRef","focusElementRef"],KW=({valueOptions:e,valueFormatter:t,field:n},r,o)=>("function"==typeof e?["",...e({field:n})]:["",...e||[]]).map((e=>{const a="object"==typeof e,i=a?e.value:e,s=a?e.value:e,l=t&&""!==e?t({value:e,field:n,api:r}):e,u=a?e.label:l;return ee.jsx(o,{value:s,children:u},i)})),YW=500;function XW(e){var t,n,r,o,a;const{item:i,applyValue:s,type:l,apiRef:u,focusElementRef:c}=e,d=_d(e,qW),p=U.useRef(),[f,m]=U.useState(null!=(t=i.value)?t:""),[g,h]=U.useState(!1),b=Oh(),v=AV(),y=null==(r=((null==(n=v.componentsProps)?void 0:n.baseSelect)||{}).native)||r,w="singleSelect"===l?{select:!0,SelectProps:Id({native:y},null==(o=v.componentsProps)?void 0:o.baseSelect),children:KW(u.current.getColumn(i.columnField),u.current,y?"option":xA)}:{},S=U.useCallback((e=>{let t=e.target.value;if("singleSelect"===l){const e=u.current.getColumn(i.columnField),n="function"==typeof e.valueOptions?e.valueOptions({field:e.field}):e.valueOptions;t=WW(t,n)}clearTimeout(p.current),m(String(t)),h(!0),p.current=setTimeout((()=>{s(Id({},i,{value:t})),h(!1)}),YW)}),[u,s,i,l]);U.useEffect((()=>()=>{clearTimeout(p.current)}),[]),U.useEffect((()=>{var e;const t=null!=(e=i.value)?e:"";m(String(t))}),[i.value]);const x=g?{endAdornment:ee.jsx(BW,{})}:d.InputProps;return ee.jsx(v.components.BaseTextField,Id({id:b,label:u.current.getLocaleText("filterPanelInputLabel"),placeholder:u.current.getLocaleText("filterPanelInputPlaceholder"),value:f,onChange:S,variant:"standard",type:l||"text",InputProps:x,InputLabelProps:{shrink:!0},inputRef:c},w,d,null==(a=v.componentsProps)?void 0:a.baseTextField))}const ZW=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","getValue","isValidating","debounceMs","isProcessingProps","onValueChange"],QW=Wv(iC,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})((({theme:e})=>Id({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}))),JW=U.forwardRef(((e,t)=>{var n,r;const o=AV(),{id:a,value:i,field:s,colDef:l,hasFocus:u,debounceMs:c=(null!=(n=o.experimentalFeatures)&&n.newEditingApi?200:YW),isProcessingProps:d,onValueChange:p}=e,f=_d(e,ZW),m=IV(),g=U.useRef(),[h,b]=U.useState(i),v=(e=>{const{classes:t}=e;return eb({root:["editInputCell"]},OV,t)})(o),y=U.useCallback((async e=>{var t;const n=e.target.value;p&&await p(e,n);const r=m.current.getColumn(s);let i=n;r.valueParser&&null!=(t=o.experimentalFeatures)&&t.newEditingApi&&(i=r.valueParser(n,m.current.getCellParams(a,s))),b(i),m.current.setEditCellValue({id:a,field:s,value:i,debounceMs:c,unstable_skipValueParser:!0},e)}),[m,c,s,a,p,null==(r=o.experimentalFeatures)?void 0:r.newEditingApi]),w=m.current.unstable_getEditCellMeta?m.current.unstable_getEditCellMeta(a,s):{};return U.useEffect((()=>{"debouncedSetEditCellValue"!==w.changeReason&&b(i)}),[w.changeReason,i]),ch((()=>{u&&g.current.focus()}),[u]),ee.jsx(QW,Id({ref:t,inputRef:g,className:v.root,ownerState:o,fullWidth:!0,type:"number"===l.type?l.type:"text",value:null!=h?h:"",onChange:y,endAdornment:d?ee.jsx(BW,{}):void 0},f))})),eq=e=>"Escape"===e,tq=e=>"Enter"===e,nq=e=>"Tab"===e,rq=e=>" "===e,oq=e=>"Delete"===e||"Backspace"===e;function aq(e){return 1===e.key.length&&!1===e.ctrlKey&&!1===e.metaKey}const iq=["Enter","Escape","Tab"],sq=["Enter","Tab"],lq=e=>sq.indexOf(e)>-1,uq=e=>(e=>"Home"===e||"End"===e)(e)||(e=>0===e.indexOf("Arrow"))(e)||(e=>0===e.indexOf("Page"))(e)||rq(e),cq=e=>!!e.key,dq=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","getValue","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"];function pq(e){var t,n,r;const o=AV(),{id:a,value:i,api:s,field:l,row:u,colDef:c,hasFocus:d,error:p,onValueChange:f,initialOpen:m=o.editMode===YG.Cell}=e,g=_d(e,dq),h=IV(),b=U.useRef(),v=U.useRef(),[y,w]=U.useState(m),S=null!=(n=((null==(t=o.componentsProps)?void 0:t.baseSelect)||{}).native)&&n;let x;x="function"==typeof c.valueOptions?c.valueOptions({id:a,row:u,field:l}):c.valueOptions,c.valueFormatter&&(x=x.map((e=>{if("object"==typeof e)return e;const t={field:l,api:s,value:e};return{value:e,label:String(c.valueFormatter(t))}})));return ch((()=>{d&&v.current.focus()}),[d]),ee.jsx(o.components.BaseSelect,Id({ref:b,inputRef:v,value:i,onChange:async e=>{var t;w(!1);const n=WW(e.target.value,x);f&&await f(e,n);const r=await h.current.setEditCellValue({id:a,field:l,value:n},e);if(null!=(t=o.experimentalFeatures)&&t.newEditingApi)return;if(o.editMode===YG.Row||!1===r)return;if(await Promise.resolve(h.current.commitCellChange({id:a,field:l},e))&&(h.current.setCellMode(a,l,"view"),e.key)){const t=h.current.getCellParams(a,l);h.current.publishEvent("cellNavigationKeyDown",t,e)}},open:y,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||w(!0)},MenuProps:{onClose:(e,t)=>{var n;o.editMode!==YG.Row?("backdropClick"===t||eq(e.key))&&(null!=(n=o.experimentalFeatures)&&n.newEditingApi?h.current.stopCellEditMode({id:a,field:l,ignoreModifications:!0}):h.current.setCellMode(a,l,"view")):w(!1)}},error:p,native:S,fullWidth:!0},g,null==(r=o.componentsProps)?void 0:r.baseSelect,{children:x.map((e=>((e,t)=>{const n="object"==typeof e,r=n?e.value:e,o=n?e.value:e,a=n?e.label:e;return ee.jsx(t,{value:o,children:a},r)})(e,S?"option":xA)))}))}const fq=["open","target","onClickAway","children","position","className","onExited"],mq=Wv(AE,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})((({theme:e})=>({zIndex:e.zIndex.modal,[`& .${NV.menuList}`]:{outline:0}}))),gq={"bottom-start":"top left","bottom-end":"top right"},hq=e=>{var t;const{open:n,target:r,onClickAway:o,children:a,position:i,className:s,onExited:l}=e,u=_d(e,fq),c=IV(),d=U.useRef(r),p=U.useRef(n),f=AV(),m=(e=>{const{classes:t}=e;return eb({root:["menu"]},OV,t)})(f);U.useEffect((()=>{p.current&&d.current&&d.current.focus();const e=n?"menuOpen":"menuClose";c.current.publishEvent(e,{target:r}),p.current=n,d.current=r}),[c,n,r]);return ee.jsx(mq,Id({as:f.components.BasePopper,className:KG(s,m.root),ownerState:f,open:n,anchorEl:r,transition:!0,placement:i},u,null==(t=f.componentsProps)?void 0:t.basePopper,{children:({TransitionProps:e,placement:t})=>{return ee.jsx(CS,{onClickAway:o,mouseEvent:"onMouseDown",children:ee.jsx(yI,Id({},e,{style:{transformOrigin:gq[t]},onExited:(n=null==e?void 0:e.onExited,e=>{n&&n(),l&&l(e)}),children:ee.jsx(Ly,{children:a})}))});var n}}))},bq=["colDef","id","api","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","getValue","tabIndex","position","focusElementRef"],vq=e=>{const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:a="bottom-end",focusElementRef:i}=e,s=_d(e,bq),[l,u]=U.useState(-1),[c,d]=U.useState(!1),p=IV(),f=U.useRef(null),m=U.useRef(null),g=U.useRef(!1),h=U.useRef({}),b=Oh(),v=Oh(),y=AV();if(U.useLayoutEffect((()=>{r||Object.entries(h.current).forEach((([e,t])=>{null==t||t.stop({},(()=>{delete h.current[e]}))}))}),[r]),U.useEffect((()=>{if(l<0||!f.current)return;if(l>=f.current.children.length)return;f.current.children[l].focus({preventScroll:!0})}),[l]),U.useEffect((()=>{r||(u(-1),g.current=!1)}),[r]),U.useImperativeHandle(i,(()=>({focus(){g.current||u(0)}})),[]),!(e=>"function"==typeof e.getActions)(t))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const w=t.getActions(p.current.getRowParams(n)),S=w.filter((e=>!e.props.showInMenu)),x=w.filter((e=>e.props.showInMenu)),E=S.length+(x.length?1:0);U.useEffect((()=>{l>=E&&u(E-1)}),[l,E]);const C=()=>{d(!1)},k=e=>t=>{h.current[e]=t},R=(e,t)=>n=>{u(e),g.current=!0,t&&t(n)};return ee.jsxs("div",Id({role:"menu",ref:f,tabIndex:-1,className:NV.actionsCell,onKeyDown:e=>{if(E<=1)return;let t=l;"ArrowRight"===e.key?t+=1:"ArrowLeft"===e.key&&(t-=1),t<0||t>=E||t!==l&&(e.preventDefault(),e.stopPropagation(),u(t))}},s,{children:[S.map(((e,t)=>U.cloneElement(e,{key:t,touchRippleRef:k(t),onClick:R(t,e.props.onClick),tabIndex:l===t?o:-1}))),x.length>0&&v&&ee.jsx(Uw,{ref:m,id:v,"aria-label":p.current.getLocaleText("actionsCellMore"),"aria-controls":b,"aria-expanded":c?"true":void 0,"aria-haspopup":"true",role:"menuitem",size:"small",onClick:()=>{d(!0),u(E-1),g.current=!0},touchRippleRef:k(v),tabIndex:l===S.length?o:-1,children:ee.jsx(y.components.MoreActionsIcon,{fontSize:"small"})}),x.length>0&&ee.jsx(hq,{onClickAway:C,onClick:C,open:c,target:m.current,position:a,children:ee.jsx(X_,{id:b,className:NV.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Enter","Escape"].includes(e.key)&&C()},"aria-labelledby":v,variant:"menu",autoFocusItem:!0,children:x.map(((e,t)=>U.cloneElement(e,{key:t})))})})]}))},yq=["field","align","width","contentWidth"];const wq=Wv("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${NV.autoHeight}`]:t.autoHeight},{[`&.${NV.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${NV["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${NV["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${NV["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${NV.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`& .${NV.editBooleanCell}`]:t.editBooleanCell},{[`& .${NV["cell--editing"]}`]:t["cell--editing"]},{[`& .${NV["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${NV["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${NV["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${NV["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${NV.cell}`]:t.cell},{[`& .${NV.cellContent}`]:t.cellContent},{[`& .${NV.cellCheckbox}`]:t.cellCheckbox},{[`& .${NV.cellSkeleton}`]:t.cellSkeleton},{[`& .${NV.checkboxInput}`]:t.checkboxInput},{[`& .${NV["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${NV["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${NV["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${NV["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${NV["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${NV["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${NV["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${NV["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${NV.columnHeader}`]:t.columnHeader},{[`& .${NV.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${NV.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${NV.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${NV["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${NV["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${NV.columnSeparator}`]:t.columnSeparator},{[`& .${NV.filterIcon}`]:t.filterIcon},{[`& .${NV.iconSeparator}`]:t.iconSeparator},{[`& .${NV.menuIcon}`]:t.menuIcon},{[`& .${NV.menuIconButton}`]:t.menuIconButton},{[`& .${NV.menuOpen}`]:t.menuOpen},{[`& .${NV.menuList}`]:t.menuList},{[`& .${NV["row--editable"]}`]:t["row--editable"]},{[`& .${NV["row--editing"]}`]:t["row--editing"]},{[`& .${NV["row--dragging"]}`]:t["row--dragging"]},{[`& .${NV.row}`]:t.row},{[`& .${NV.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${NV.rowReorderCell}`]:t.rowReorderCell},{[`& .${NV["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${NV.sortIcon}`]:t.sortIcon},{[`& .${NV.withBorder}`]:t.withBorder},{[`& .${NV.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${NV.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${NV.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${NV["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})((({theme:e})=>{const t="light"===e.palette.mode?xh(wh(e.palette.divider,1),.88):Sh(wh(e.palette.divider,1),.68);return Id({flex:1,boxSizing:"border-box",position:"relative",border:`1px solid ${t}`,borderRadius:e.shape.borderRadius,color:e.palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",flexDirection:"column",[`&.${NV.autoHeight}`]:{height:"auto",[`& .${NV["row--lastVisible"]} .${NV.cell}`]:{borderBottomColor:"transparent"}},[`& .${NV["virtualScrollerContent--overflowed"]} .${NV["row--lastVisible"]} .${NV.cell}`]:{borderBottomColor:"transparent"},[`& .${NV.columnHeader}, & .${NV.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${NV.columnHeader}:focus-within, & .${NV.cell}:focus-within`]:{outline:`solid ${wh(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${NV.columnHeader}:focus, & .${NV.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${NV.columnHeaderCheckbox}, & .${NV.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${NV.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${NV["columnHeader--sorted"]} .${NV.iconButtonContainer}, & .${NV["columnHeader--filtered"]} .${NV.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${NV.columnHeader}:not(.${NV["columnHeader--sorted"]}) .${NV.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${NV.columnHeader}:not(.${NV["columnHeader--sorted"]}):hover .${NV.sortIcon}`]:{opacity:.5},[`& .${NV.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${NV.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${NV["columnHeader--filledGroup"]} .${NV.columnHeaderTitleContainer}`]:{borderBottom:`solid ${t} 1px`,boxSizing:"border-box"},[`& .${NV["columnHeader--filledGroup"]}.${NV["columnHeader--showColumnBorder"]} .${NV.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${NV["columnHeader--filledGroup"]}.${NV["columnHeader--showColumnBorder"]}`]:{borderBottom:`solid ${t} 1px`,boxSizing:"border-box"},[`& .${NV.sortIcon}, & .${NV.filterIcon}`]:{fontSize:"inherit"},[`& .${NV["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${NV["columnHeader--alignCenter"]} .${NV.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${NV["columnHeader--alignRight"]} .${NV.columnHeaderDraggableContainer}, & .${NV["columnHeader--alignRight"]} .${NV.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${NV["columnHeader--alignCenter"]} .${NV.menuIcon}, & .${NV["columnHeader--alignRight"]} .${NV.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${NV["columnHeader--alignRight"]} .${NV.menuIcon}, & .${NV["columnHeader--alignRight"]} .${NV.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${NV["columnHeader--moving"]}`]:{backgroundColor:e.palette.action.hover},[`& .${NV.columnSeparator}`]:{position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},[`& .${NV["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${NV["columnSeparator--sideRight"]}`]:{right:-12},[`& .${NV["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:e.palette.text.primary,"@media (hover: none)":{color:t}},[`&.${NV["columnSeparator--resizing"]}`]:{color:e.palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${NV.iconSeparator}`]:{color:"inherit"},[`& .${NV.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`& .${NV.columnHeader}:hover`]:{[`& .${NV.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${NV.menuIcon}`]:{width:"auto",visibility:"visible"}},[`.${NV.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${NV.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:wh(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:wh(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:wh(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${NV.cell}`]:{display:"flex",alignItems:"center",borderBottom:`1px solid ${t}`},[`& .${NV.row}:not(.${NV["row--dynamicHeight"]}) > .${NV.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${NV.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${NV.cell}.${NV["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:e.palette.background.paper,"&:focus-within":{outline:`solid ${e.palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${NV["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${NV["row--editing"]} .${NV.cell}`]:{boxShadow:e.shadows[0],backgroundColor:e.palette.background.paper},[`& .${NV.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${NV.booleanCell}[data-value="true"]`]:{color:e.palette.text.secondary},[`& .${NV.booleanCell}[data-value="false"]`]:{color:e.palette.text.disabled},[`& .${NV.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${NV.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:e.palette.action.disabledOpacity},[`& .${NV["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${NV.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`& .${NV.withBorder}`]:{borderRight:`1px solid ${t}`},[`& .${NV["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${NV["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${NV["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${NV.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${NV.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${NV["columnHeader--dragging"]}, & .${NV["row--dragging"]}`]:{background:e.palette.background.paper,padding:"0 12px",borderRadius:e.shape.borderRadius,opacity:e.palette.action.disabledOpacity},[`& .${NV["row--dragging"]}`]:{background:e.palette.background.paper,padding:"0 12px",borderRadius:e.shape.borderRadius,opacity:e.palette.action.disabledOpacity,[`& .${NV.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${NV.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${NV.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${NV.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${NV.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})})),Sq=["children","className"],xq=U.forwardRef((function(e,t){const n=AV(),{children:r,className:o}=e,a=_d(e,Sq),i=IV(),s=zV(i,fG),l=zV(i,GV),u=zV(i,PG),c=zV(i,DG),d=U.useRef(null),p=Lh(d,t),f=zV(i,nG),m=Id({},n,{density:u}),g=(e=>{const{autoHeight:t,density:n,classes:r}=e;return eb({root:["root",t&&"autoHeight",`root--density${cm(n)}`]},OV,r)})(m);i.current.rootElementRef=d;const[h,b]=U.useState(!1);return ch((()=>{b(!0)}),[]),ch((()=>{h&&i.current.unstable_updateGridDimensionsRef()}),[i,h]),h?ee.jsx(wq,Id({ref:p,className:KG(o,g.root),ownerState:m,role:"grid","aria-colcount":s.length,"aria-rowcount":c+1+f+l,"aria-multiselectable":!n.disableMultipleSelection,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"]},a,{children:r})):null})),Eq=["className"],Cq=Wv("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})((({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:`1px solid ${"light"===e.palette.mode?xh(wh(e.palette.divider,1),.88):Sh(wh(e.palette.divider,1),.68)}`}))),kq=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,Eq),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["footerContainer"]},OV,t)})(o);return ee.jsx(Cq,Id({ref:t,className:KG(a.root,n),ownerState:o},r))})),Rq=["className"],Tq=Wv("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})((({theme:e})=>({position:"absolute",top:0,zIndex:4,width:"100%",height:"100%",pointerEvents:"none",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:wh(e.palette.background.default,e.palette.action.disabledOpacity)}))),Iq=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,Rq),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["overlay"]},OV,t)})(o);return ee.jsx(Tq,Id({ref:t,className:KG(a.root,n),ownerState:o},r))})),_q=["className"],Aq=Wv("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})((()=>({display:"flex",visibility:"hidden",width:0}))),Oq=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,_q),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["iconButtonContainer"]},OV,t)})(o);return ee.jsx(Aq,Id({ref:t,className:KG(a.root,n),ownerState:o},r))}));function Nq(e){const{direction:t,index:n,sortingOrder:r}=e,o=IV(),a=AV(),i=(e=>{const{classes:t}=e;return eb({icon:["sortIcon"]},OV,t)})(Id({},e,{classes:a.classes})),s=function(e,t,n,r){let o;const a={};return"asc"===t?o=e.ColumnSortedAscendingIcon:"desc"===t?o=e.ColumnSortedDescendingIcon:(o=e.ColumnUnsortedIcon,a.sortingOrder=r),o?ee.jsx(o,Id({fontSize:"small",className:n},a)):null}(a.components,t,i.icon,r);if(!s)return null;const l=ee.jsx(Uw,{tabIndex:-1,"aria-label":o.current.getLocaleText("columnHeaderSortIconLabel"),title:o.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",children:s});return ee.jsxs(Oq,{children:[null!=n&&ee.jsx(rk,{badgeContent:n,color:"default",children:l}),null==n&&l]})}const Pq=U.memo(Nq),Lq=U.memo((e=>{const{column:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:a}=e,i=IV(),s=AV(),l=(e=>{const{classes:t,open:n}=e;return eb({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},OV,t)})(Id({},e,{classes:s.classes})),u=U.useCallback((e=>{e.preventDefault(),e.stopPropagation(),i.current.toggleColumnMenu(t.field)}),[i,t.field]);return ee.jsx("div",{className:l.root,children:ee.jsx(Uw,{ref:a,tabIndex:-1,className:l.button,"aria-label":i.current.getLocaleText("columnMenuLabel"),title:i.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-expanded":n?"true":void 0,"aria-haspopup":"true","aria-controls":r,id:o,children:ee.jsx(s.components.ColumnMenuIcon,{fontSize:"small"})})})}));function Mq({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:a,target:i,onExited:s}){const l=IV(),u=l.current.getColumn(o),c=U.useCallback((e=>{e.stopPropagation(),l.current.hideColumnMenu()}),[l]);return i?ee.jsx(hq,{placement:"bottom-"+("right"===u.align?"start":"end"),open:a,target:i,onClickAway:c,onExited:s,children:ee.jsx(n,Id({currentColumn:u,hideMenu:c,open:a,id:e,labelledby:t},r))}):null}function Dq(e){return e.replace(/["\\]/g,"\\$&")}function jq(e){return`.${NV.row}[data-id="${Dq(String(e))}"]`}const Fq=["className"],$q=Wv("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})((({theme:e})=>({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:e.typography.fontWeightMedium}))),Bq=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,Fq),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["columnHeaderTitle"]},OV,t)})(o);return ee.jsx($q,Id({ref:t,className:KG(a.root,n),ownerState:o},r))}));function zq(e){var t;const{label:n,description:r,columnWidth:o}=e,a=AV(),i=U.useRef(null),[s,l]=U.useState("");return U.useEffect((()=>{if(!r&&i&&i.current){const t=(e=i.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;l(t?n:"")}var e}),[i,o,r,n]),ee.jsx(a.components.BaseTooltip,Id({title:r||s},null==(t=a.componentsProps)?void 0:t.baseTooltip,{children:ee.jsx(Bq,{ref:i,children:n})}))}const Uq=["resizable","resizing","height","side"];var Hq,Vq;(Vq=Hq||(Hq={})).Left="left",Vq.Right="right";function Gq(e){const{height:t,side:n=Hq.Right}=e,r=_d(e,Uq),o=AV(),a=(e=>{const{resizable:t,resizing:n,classes:r,side:o}=e;return eb({root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${cm(o)}`],icon:["iconSeparator"]},OV,r)})(Id({},e,{side:n,classes:o.classes})),i=U.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return ee.jsx("div",Id({className:a.root,style:{minHeight:t,opacity:o.showColumnRightBorder?0:1}},r,{onClick:i,children:ee.jsx(o.components.ColumnResizeIcon,{className:a.icon})}))}const Wq=U.memo(Gq),qq=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","disableHeaderSeparator"],Kq=U.forwardRef((function(e,t){const{classes:n,columnMenuOpen:r,colIndex:o,height:a,isResizing:i,sortDirection:s,hasFocus:l,tabIndex:u,separatorSide:c,isDraggable:d,headerComponent:p,description:f,width:m,columnMenuIconButton:g=null,columnMenu:h=null,columnTitleIconButtons:b=null,headerClassName:v,label:y,resizable:w,draggableContainerProps:S,columnHeaderSeparatorProps:x,disableHeaderSeparator:E}=e,C=_d(e,qq),k=IV(),R=AV(),T=U.useRef(null),[I,_]=U.useState(r),A=Lh(T,t);let O="none";return null!=s&&(O="asc"===s?"ascending":"descending"),U.useEffect((()=>{I||_(r)}),[I,r]),U.useLayoutEffect((()=>{const e=k.current.state.columnMenu;if(l&&!e.open){const e=T.current.querySelector('[tabindex="0"]')||T.current;null==e||e.focus(),k.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[k,l]),ee.jsxs("div",Id({ref:A,className:KG(n.root,v),style:{height:a,width:m,minWidth:m,maxWidth:m},role:"columnheader",tabIndex:u,"aria-colindex":o+1,"aria-sort":O,"aria-label":null==p?y:void 0},C,{children:[ee.jsxs("div",Id({className:n.draggableContainer,draggable:d},S,{children:[ee.jsxs("div",{className:n.titleContainer,children:[ee.jsx("div",{className:n.titleContainerContent,children:void 0!==p?p:ee.jsx(zq,{label:y,description:f,columnWidth:m})}),b]}),g]})),!E&&ee.jsx(Wq,Id({resizable:!R.disableColumnResize&&!!w,resizing:i,height:a,side:c},x)),h]}))}));function Yq(e){var t,n,r,o,a;const{column:i,columnMenuOpen:s,colIndex:l,headerHeight:u,isResizing:c,isLastColumn:d,sortDirection:p,sortIndex:f,filterItemsCounter:m,hasFocus:g,tabIndex:h,extendRowFullWidth:b,disableReorder:v,separatorSide:y}=e,w=IV(),S=AV(),x=U.useRef(null),E=Oh(),C=Oh(),k=U.useRef(null),[R,T]=U.useState(s),{hasScrollX:I,hasScrollY:_}=null!=(t=w.current.getRootDimensions())?t:{hasScrollX:!1,hasScrollY:!1},A=U.useMemo((()=>!S.disableColumnReorder&&!v&&!i.disableReorder),[S.disableColumnReorder,v,i.disableReorder]);let O;i.renderHeader&&(O=i.renderHeader(w.current.getColumnHeaderParams(i.field)));const N=d?!(d&&I&&!_)&&!b:S.showColumnRightBorder,P=(e=>{const{column:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:a,filterItemsCounter:i}=e,s=null!=o,l=null!=i&&i>0,u="number"===t.type;return eb({root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",s&&"columnHeader--sorted",l&&"columnHeader--filtered",u&&"columnHeader--numeric",a&&"withBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},OV,n)})(Id({},e,{classes:S.classes,showRightBorder:N})),L=U.useCallback((e=>t=>{t.currentTarget.contains(t.target)&&w.current.publishEvent(e,w.current.getColumnHeaderParams(i.field),t)}),[w,i.field]),M=U.useMemo((()=>({onClick:L("columnHeaderClick"),onDoubleClick:L("columnHeaderDoubleClick"),onMouseOver:L("columnHeaderOver"),onMouseOut:L("columnHeaderOut"),onMouseEnter:L("columnHeaderEnter"),onMouseLeave:L("columnHeaderLeave"),onKeyDown:L("columnHeaderKeyDown"),onFocus:L("columnHeaderFocus"),onBlur:L("columnHeaderBlur")})),[L]),D=U.useMemo((()=>A?{onDragStart:L("columnHeaderDragStart"),onDragEnter:L("columnHeaderDragEnter"),onDragOver:L("columnHeaderDragOver"),onDragEnd:L("columnHeaderDragEnd")}:{}),[A,L]),j=U.useMemo((()=>({onMouseDown:L("columnSeparatorMouseDown")})),[L]);U.useEffect((()=>{R||T(s)}),[R,s]);const F=U.useCallback((()=>{T(!1)}),[]),$=!S.disableColumnMenu&&!i.disableColumnMenu&&ee.jsx(Lq,{column:i,columnMenuId:E,columnMenuButtonId:C,open:R,iconButtonRef:k}),B=ee.jsx(Mq,{columnMenuId:E,columnMenuButtonId:C,field:i.field,open:s,target:k.current,ContentComponent:S.components.ColumnMenu,contentComponentProps:null==(n=S.componentsProps)?void 0:n.columnMenu,onExited:F}),z=null!=(r=i.sortingOrder)?r:S.sortingOrder,H=ee.jsxs(U.Fragment,{children:[!S.disableColumnFilter&&ee.jsx(S.components.ColumnHeaderFilterIconButton,Id({field:i.field,counter:m},null==(o=S.componentsProps)?void 0:o.columnHeaderFilterIconButton)),i.sortable&&!i.hideSortIcons&&ee.jsx(Pq,{direction:p,index:f,sortingOrder:z})]});U.useLayoutEffect((()=>{const e=w.current.state.columnMenu;if(g&&!e.open){const e=x.current.querySelector('[tabindex="0"]')||x.current;null==e||e.focus(),w.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[w,g]);const V="function"==typeof i.headerClassName?i.headerClassName({field:i.field,colDef:i}):i.headerClassName,G=null!=(a=i.headerName)?a:i.field;return ee.jsx(Kq,Id({ref:x,classes:P,columnMenuOpen:s,colIndex:l,height:u,isResizing:c,sortDirection:p,hasFocus:g,tabIndex:h,separatorSide:y,isDraggable:A,headerComponent:O,description:i.description,elementId:i.field,width:i.computedWidth,columnMenuIconButton:$,columnTitleIconButtons:H,headerClassName:V,label:G,resizable:!S.disableColumnResize&&!!i.resizable,"data-field":i.field,columnMenu:B,draggableContainerProps:D,columnHeaderSeparatorProps:j},M))}const Xq=e=>e.preferencePanel;var Zq;!function(e){e.filters="filters",e.columns="columns"}(Zq||(Zq={}));const Qq=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","getValue","api"],Jq=U.forwardRef((function(e,t){var n;const{field:r,id:o,value:a,rowNode:i,hasFocus:s,tabIndex:l}=e,u=_d(e,Qq),c=IV(),d=AV(),p=(e=>{const{classes:t}=e;return eb({root:["checkboxInput"]},OV,t)})({classes:d.classes}),f=U.useRef(null),m=U.useRef(),g=Lh(f,t),h=c.current.getCellElement(o,r);U.useLayoutEffect((()=>{0===l&&h&&(h.tabIndex=-1)}),[h,l]),U.useEffect((()=>{if(s){var e;const t=null==(e=f.current)?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else m.current&&m.current.stop({})}),[s]);const b=U.useCallback((t=>{rq(t.key)&&t.stopPropagation(),uq(t.key)&&!t.shiftKey&&c.current.publishEvent("cellNavigationKeyDown",e,t)}),[c,e]);if("footer"===i.position)return null;const v=c.current.isRowSelectable(o),y=c.current.getLocaleText(a?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return i.isPinned?null:ee.jsx(d.components.BaseCheckbox,Id({ref:g,tabIndex:l,checked:a,onChange:e=>{const t={value:e.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:p.root,inputProps:{"aria-label":y},onKeyDown:b,disabled:!v,touchRippleRef:m},null==(n=d.componentsProps)?void 0:n.baseCheckbox,u))})),eK=Jq,tK=e=>e.selection,nK=HV(tK,(e=>e.length)),rK=HV(tK,KV,((e,t)=>new Map(e.map((e=>[e,t[e]]))))),oK=HV(tK,(e=>e.reduce(((e,t)=>(e[t]=t,e)),{}))),aK=e=>e.pagination,iK=HV(aK,(e=>e.page)),sK=HV(aK,(e=>e.pageSize));HV(aK,(e=>e.pageCount));const lK=HV(aK,XV,QV,EG,TG,((e,t,n,r,o)=>{const a=o.length,i=Math.min(e.pageSize*e.page,a-1),s=Math.min(i+e.pageSize-1,a-1);if(-1===i||-1===s)return null;if(n<2)return{firstRowIndex:i,lastRowIndex:s};const l=o[i],u=s-i+1,c=r.findIndex((e=>e.id===l.id));let d=c,p=0;for(;d0)&&(d+=1),0===e&&(p+=1)}return{firstRowIndex:c,lastRowIndex:d-1}})),uK=HV(EG,lK,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),cK=HV(CG,lK,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),dK=["field","colDef"],pK=U.forwardRef((function(e,t){var n;const r=_d(e,dK),[,o]=U.useState(!1),a=IV(),i=AV(),s=(e=>{const{classes:t}=e;return eb({root:["checkboxInput"]},OV,t)})({classes:i.classes}),l=zV(a,pW),u=zV(a,tK),c=zV(a,CG),d=zV(a,cK),p=U.useMemo((()=>"function"!=typeof i.isRowSelectable?u:u.filter((e=>!!a.current.getRow(e)&&i.isRowSelectable(a.current.getRowParams(e))))),[a,i.isRowSelectable,u]),f=U.useMemo((()=>(i.pagination&&i.checkboxSelectionVisibleOnly?d:c).reduce(((e,t)=>(e[t]=!0,e)),{})),[i.pagination,i.checkboxSelectionVisibleOnly,d,c]),m=U.useMemo((()=>p.filter((e=>f[e])).length),[p,f]),g=m>0&&m0,b=null!==l&&l.field===e.field?0:-1;U.useLayoutEffect((()=>{const t=a.current.getColumnHeaderElement(e.field);0===b&&t&&(t.tabIndex=-1)}),[b,a,e.field]);const v=U.useCallback((t=>{" "===t.key&&a.current.publishEvent("headerSelectionCheckboxChange",{value:!h}),uq(t.key)&&!t.shiftKey&&a.current.publishEvent("columnHeaderNavigationKeyDown",e,t)}),[a,e,h]),y=U.useCallback((()=>{o((e=>!e))}),[]);U.useEffect((()=>a.current.subscribeEvent("selectionChange",y)),[a,y]);const w=a.current.getLocaleText(h?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return ee.jsx(i.components.BaseCheckbox,Id({ref:t,indeterminate:g,checked:h,onChange:e=>{const t={value:e.target.checked};a.current.publishEvent("headerSelectionCheckboxChange",t)},className:s.root,inputProps:{"aria-label":w},tabIndex:b,onKeyDown:v},null==(n=i.componentsProps)?void 0:n.baseCheckbox,r))})),fK=e=>{const{onClick:t}=e,n=IV(),r=AV(),o=U.useCallback((e=>{t(e),n.current.showPreferences(Zq.columns)}),[n,t]);return r.disableColumnSelector?null:ee.jsx(xA,{onClick:o,children:n.current.getLocaleText("columnMenuShowColumns")})},mK=e=>{const{column:t,onClick:n}=e,r=IV(),o=AV(),a=U.useCallback((e=>{n(e),r.current.showFilterPanel(null==t?void 0:t.field)}),[r,null==t?void 0:t.field,n]);return o.disableColumnFilter||null==t||!t.filterable?null:ee.jsx(xA,{onClick:a,children:r.current.getLocaleText("columnMenuFilter")})},gK=["hideMenu","currentColumn","open","id","labelledby","className","children"],hK=U.forwardRef((function(e,t){const{hideMenu:n,open:r,id:o,labelledby:a,className:i,children:s}=e,l=_d(e,gK),u=U.useCallback((e=>{var t;nq(e.key)&&e.preventDefault(),t=e.key,(nq(t)||eq(t))&&n(e)}),[n]);return ee.jsx(X_,Id({id:o,ref:t,className:KG(NV.menuList,i),"aria-labelledby":a,onKeyDown:u,autoFocus:r},l,{children:s}))})),bK=$V(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),vK=(e,t)=>t&&e.length>1?(bK(),[e[0]]):e,yK=(e,t)=>n=>Id({},n,{sorting:Id({},n.sorting,{sortModel:vK(e,t)})}),wK=(e,t)=>{const n=e.indexOf(t);return t&&-1!==n&&n+1!==e.length?e[n+1]:e[0]},SK=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,xK=new Intl.Collator,EK=(e,t)=>{const n=SK(e,t);return null!==n?n:Number(e)-Number(t)},CK=(e,t)=>{const n=SK(e,t);return null!==n?n:e>t?1:eMath.max(t,Math.min(n,e));function IK(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{let t=e+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}(e);return()=>t+(n-t)*r()}function AK(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}const OK=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function NK(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:a,color:i,error:s,helperText:l,size:u,variant:c}=e,d=_d(e,OK),p={color:i,error:s,helperText:l,size:u,variant:c},[f,m]=U.useState(t.value||[]),g=Oh(),h=AV();U.useEffect((()=>{var e;const n=null!=(e=t.value)?e:[];m(n.map(String))}),[t.value]);const b=U.useCallback(((e,r)=>{m(r.map(String)),n(Id({},t,{value:[...r]}))}),[n,t]);return ee.jsx(PC,Id({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:n}=t;return null==n||""===n?[]:[n]},id:g,value:f,onChange:b,renderTags:(e,t)=>e.map(((e,n)=>ee.jsx(VE,Id({variant:"outlined",size:"small",label:e},t({index:n}))))),renderInput:e=>{var t;return ee.jsx(h.components.BaseTextField,Id({},e,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:Id({},e.InputLabelProps,{shrink:!0}),inputRef:a,type:r||"text"},p,null==(t=h.componentsProps)?void 0:t.baseTextField))}},d))}const PK={width:100,minWidth:50,maxWidth:1/0,hide:!1,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const n=SK(e,t);return null!==n?n:"string"==typeof e?xK.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>[{value:"contains",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(RK(n),"i");return({value:e})=>null!=e&&r.test(e.toString())},InputComponent:XW},{value:"equals",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return({value:e})=>null!=e&&0===r.compare(n,e.toString())},InputComponent:XW},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${RK(n)}.*$`,"i");return({value:e})=>null!=e&&r.test(e.toString())},InputComponent:XW},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${RK(n)}$`,"i");return({value:e})=>null!=e&&r.test(e.toString())},InputComponent:XW},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>""!==e&&null!=e,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())),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return({value:e})=>null!=e&&n.some((t=>0===r.compare(t,e.toString()||"")))},InputComponent:NK}])(),renderEditCell:e=>ee.jsx(JW,Id({},e)),getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp(RK(e),"i");return({value:e})=>null!=e&&t.test(e.toString())}},LK="actions",MK=Id({},PK,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>ee.jsx(vq,Id({},e)),getApplyQuickFilterFn:void 0}),DK=["item","applyValue","apiRef","focusElementRef"];function jK(e){var t,n,r,o;const{item:a,applyValue:i,apiRef:s,focusElementRef:l}=e,u=_d(e,DK),[c,d]=U.useState(a.value||""),p=AV(),f=null==(n=((null==(t=p.componentsProps)?void 0:t.baseSelect)||{}).native)||n,m=f?"option":xA,g=U.useCallback((e=>{const t=e.target.value;d(t),i(Id({},a,{value:t}))}),[i,a]);return U.useEffect((()=>{d(a.value||"")}),[a.value]),ee.jsxs(p.components.BaseTextField,Id({label:s.current.getLocaleText("filterPanelInputLabel"),value:c,onChange:g,select:!0,variant:"standard",SelectProps:Id({native:f,displayEmpty:!0},null==(r=p.componentsProps)?void 0:r.baseSelect),InputLabelProps:{shrink:!0},inputRef:l},u,null==(o=p.componentsProps)?void 0:o.baseTextField,{children:[ee.jsx(m,{value:"",children:s.current.getLocaleText("filterValueAny")}),ee.jsx(m,{value:"true",children:s.current.getLocaleText("filterValueTrue")}),ee.jsx(m,{value:"false",children:s.current.getLocaleText("filterValueFalse")})]}))}const FK=Id({},PK,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>e.rowNode.isAutoGenerated?"":ee.jsx(bW,Id({},e)),renderEditCell:e=>ee.jsx(yW,Id({},e)),sortComparator:EK,valueFormatter:function({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")},filterOperators:[{value:"is",getApplyFilterFn:e=>{if(!e.value)return null;const t="true"===e.value;return({value:e})=>Boolean(e)===t},InputComponent:jK}],getApplyQuickFilterFn:void 0,aggregable:!1}),$K="__check__",BK=Id({},FK,{field:$K,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,valueGetter:e=>void 0!==oK(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>ee.jsx(pK,Id({},e)),renderCell:e=>ee.jsx(eK,Id({},e))}),zK=["item","applyValue","type","apiRef","focusElementRef","InputProps"];function UK(e){var t,n;const{item:r,applyValue:o,type:a,apiRef:i,focusElementRef:s,InputProps:l}=e,u=_d(e,zK),c=U.useRef(),[d,p]=U.useState(null!=(t=r.value)?t:""),[f,m]=U.useState(!1),g=Oh(),h=AV(),b=U.useCallback((e=>{const t=e.target.value;clearTimeout(c.current),p(String(t)),m(!0),c.current=setTimeout((()=>{o(Id({},r,{value:t})),m(!1)}),500)}),[o,r]);return U.useEffect((()=>()=>{clearTimeout(c.current)}),[]),U.useEffect((()=>{var e;const t=null!=(e=r.value)?e:"";p(String(t))}),[r.value]),ee.jsx(h.components.BaseTextField,Id({id:g,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),value:d,onChange:b,variant:"standard",type:a||"text",InputLabelProps:{shrink:!0},inputRef:s,InputProps:Id({},f?{endAdornment:ee.jsx(BW,{})}:{},l,{inputProps:Id({max:"datetime-local"===a?"9999-12-31T23:59":"9999-12-31"},null==l?void 0:l.inputProps)})},u,null==(n=h.componentsProps)?void 0:n.baseTextField))}const HK=/(\d+)-(\d+)-(\d+)/,VK=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function GK(e,t,n,r){if(!e.value)return null;const[o,a,i,s,l]=e.value.match(n?VK:HK).slice(1).map(Number),u=new Date(o,a-1,i,s||0,l||0).getTime();return({value:e})=>{if(!e)return!1;const o=e instanceof Date?e:new Date(e.toString());if(r)return t(o.getTime(),u);const a=(e instanceof Date?new Date(o):o).setHours(n?o.getHours():0,n?o.getMinutes():0,0,0);return t(a,u)}}const WK=e=>[{value:"is",getApplyFilterFn:t=>GK(t,((e,t)=>e===t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>GK(t,((e,t)=>e!==t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>GK(t,((e,t)=>e>t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>GK(t,((e,t)=>e>=t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>GK(t,((e,t)=>eGK(t,((e,t)=>e<=t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>null!=e,requiresFilterValue:!1}];const qK=Id({},PK,{type:"date",sortComparator:CK,valueFormatter:function({value:e}){return e instanceof Date?e.toLocaleDateString():null!=e?e:""},filterOperators:WK(),renderEditCell:EW,getApplyQuickFilterFn:void 0}),KK=Id({},PK,{type:"dateTime",sortComparator:CK,valueFormatter:function({value:e}){return e instanceof Date?e.toLocaleString():null!=e?e:""},filterOperators:WK(!0),renderEditCell:EW,getApplyQuickFilterFn:void 0}),YK=e=>null==e?null:Number(e),XK=Id({},PK,{type:"number",align:"right",headerAlign:"right",sortComparator:EK,valueParser:e=>""===e?null:Number(e),valueFormatter:({value:e})=>function(e){return"number"==typeof e}(e)?e.toLocaleString():e||"",filterOperators:[{label:"=",value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>YK(t)===e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{label:"!=",value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>YK(t)!==e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{label:">",value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&YK(t)>e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{label:">=",value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&YK(t)>=e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{label:"<",value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&YK(t)null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&YK(t)<=e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?({value:t})=>null!=t&&e.value.includes(Number(t)):null,InputComponent:NK,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:({value:t})=>YK(t)===YK(e)}),ZK=["item","applyValue","type","apiRef","focusElementRef"],QK=({valueOptions:e,valueFormatter:t,field:n},r,o)=>("function"==typeof e?["",...e({field:n})]:["",...e||[]]).map((e=>{const a="object"==typeof e,i=a?e.value:e,s=a?e.value:e,l=t&&""!==e?t({value:e,field:n,api:r}):e,u=a?e.label:l;return ee.jsx(o,{value:s,children:u},i)}));function JK(e){var t,n,r,o,a;const{item:i,applyValue:s,type:l,apiRef:u,focusElementRef:c}=e,d=_d(e,ZK),[p,f]=U.useState(null!=(t=i.value)?t:""),m=Oh(),g=AV(),h=null==(r=((null==(n=g.componentsProps)?void 0:n.baseSelect)||{}).native)||r,b=i.columnField?u.current.getColumn(i.columnField):null,v=U.useMemo((()=>{if(null!==b)return"function"==typeof b.valueOptions?b.valueOptions({field:b.field}):b.valueOptions}),[b]),y=U.useCallback((e=>{let t=e.target.value;t=WW(t,v),f(String(t)),s(Id({},i,{value:t}))}),[s,i,v]);return U.useEffect((()=>{var e;let t;if(void 0!==v){if(t=WW(i.value,v),t!==i.value)return void s(Id({},i,{value:t}))}else t=i.value;t=null!=(e=t)?e:"",f(String(t))}),[i,v,s]),ee.jsx(g.components.BaseTextField,Id({id:m,label:u.current.getLocaleText("filterPanelInputLabel"),placeholder:u.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:y,variant:"standard",type:l||"text",InputLabelProps:{shrink:!0},inputRef:c,select:!0,SelectProps:Id({native:h},null==(o=g.componentsProps)?void 0:o.baseSelect)},d,null==(a=g.componentsProps)?void 0:a.baseTextField,{children:QK(u.current.getColumn(i.columnField),u.current,h?"option":xA)}))}const eY=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],tY=(e,t)=>GW(e)===GW(t),nY=vE();function rY(e){const{item:t,applyValue:n,apiRef:r,focusElementRef:o,color:a,error:i,helperText:s,size:l,variant:u="standard"}=e,c=_d(e,eY),d={color:a,error:i,helperText:s,size:l,variant:u},p=Oh(),f=AV(),m=t.columnField?r.current.getColumn(t.columnField):null,g=U.useMemo((()=>null!=m&&m.valueOptions?"function"==typeof m.valueOptions?m.valueOptions({field:m.field}):m.valueOptions:[]),[m]),h=U.useMemo((()=>null==g?void 0:g.map(GW)),[g]),{valueFormatter:b,field:v}=r.current.getColumn(t.columnField),y=e=>"object"==typeof e?e.label:b&&""!==e?b({value:e,field:v,api:r.current}):e,w=U.useMemo((()=>{if(!Array.isArray(t.value))return[];if(void 0!==g){return t.value.map((e=>{const t=GW(e);return(null==h?void 0:h.findIndex((e=>e===t)))||0})).filter((e=>e>=0)).map((e=>g[e]))}return t.value}),[t.value,g,h]);U.useEffect((()=>{Array.isArray(t.value)&&w.length===t.value.length||n(Id({},t,{value:w.map(GW)}))}),[t,w,n]);const S=U.useCallback(((e,r)=>{n(Id({},t,{value:[...r.map(GW)]}))}),[n,t]);return ee.jsx(PC,Id({multiple:!0,options:g,isOptionEqualToValue:tY,filterOptions:nY,id:p,value:w,onChange:S,renderTags:(e,t)=>e.map(((e,n)=>ee.jsx(VE,Id({variant:"outlined",size:"small",label:y(e)},t({index:n}))))),renderInput:e=>{var t;return ee.jsx(f.components.BaseTextField,Id({},e,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:Id({},e.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,null==(t=f.componentsProps)?void 0:t.baseTextField))}},c))}const oY=e=>null==e||"object"!=typeof e?e:e.value,aY=Id({},PK,{type:"singleSelect",renderEditCell:e=>ee.jsx(pq,Id({},e)),filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:({value:t})=>oY(t)===oY(e.value),InputComponent:JK},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:({value:t})=>oY(t)!==oY(e.value),InputComponent:JK},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(oY);return({value:e})=>t.includes(oY(e))},InputComponent:rY}],getApplyQuickFilterFn:(e,t,n)=>{if(!e)return null;const{valueOptions:r,valueFormatter:o,field:a}=t,i=[oY(e).toString()],s="function"==typeof r?r({field:a}):r||[];return s&&s.forEach((t=>{let r,s;"object"==typeof t?(r=t.value,s=t.label):(r=t,s=o?o({value:t,field:a,api:n.current}):t),s.slice(0,e.length).toLowerCase()===e.toLowerCase()&&(i.includes(r)||i.push(r.toString()))})),({value:e})=>null!=e&&i.includes(oY(e).toString())}}),iY="__default__",sY=["maxWidth","minWidth","width","flex"],lY=(e={})=>{const t=Id({},{string:PK,number:XK,date:qK,dateTime:KK,boolean:FK,singleSelect:aY,[LK]:MK,[iY]:PK});return Object.entries(e).forEach((([e,n])=>{t[e]?t[e]=Id({},t[e],n):t[e]=Id({},t[n.extendType||iY],n)})),t};const uY=(e,t)=>{const n={};let r=0,o=0;const a=[];e.all.forEach((t=>{const i=Id({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])i.computedWidth=0;else{let e;i.flex&&i.flex>0?(r+=i.flex,e=0,a.push(i)):e=TK(i.width,i.minWidth,i.maxWidth),o+=e,i.computedWidth=e}n[t]=i}));const i=Math.max(t-o,0);if(r>0&&t>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const 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 o(){if(r.frozenFields.length===n.length)return;const a={min:{},max:{}};let i=e,s=t,l=0;r.frozenFields.forEach((e=>{i-=r.all[e].computedWidth,s-=r.all[e].flex}));for(let e=0;et.maxWidth&&(l+=t.maxWidth-o,o=t.maxWidth,a.max[t.field]=!0),r.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}l<0?Object.keys(a.max).forEach((e=>{r.freeze(e)})):l>0?Object.keys(a.min).forEach((e=>{r.freeze(e)})):n.forEach((({field:e})=>{r.freeze(e)})),o()}(),r.all}({initialFreeSpace:i,totalFlexUnits:r,flexColumns:a});Object.keys(e).forEach((t=>{n[t].computedWidth=e[t].computedWidth}))}return Id({},e,{lookup:n})},cY=({apiRef:e,columnsToUpsert:t,initialState:n,columnTypes:r,currentColumnVisibilityModel:o=pG(e),shouldRegenColumnVisibilityModelFromColumns:a,keepOnlyColumnsToUpsert:i=!1})=>{var s,l,u,c;const d=!e.current.state.columns;let p;if(d)p={all:[],lookup:{}};else{const t=lG(e.current.state);p={all:i?[]:[...t.all],lookup:Id({},t.lookup)}}let f={};i&&!d&&(f=Object.keys(p.lookup).reduce(((e,t)=>Id({},e,{[t]:!1})),{}));const m={};t.forEach((e=>{const{field:t}=e;m[t]=!0,f[t]=!0;let n=p.lookup[t];null==n?(n=Id({},((e,t)=>t&&e[t]?e[t]:e[iY])(r,e.type),{field:t,hasBeenResized:!1}),p.all.push(t)):i&&p.all.push(t);let o=n.hasBeenResized;sY.forEach((t=>{void 0!==e[t]&&(o=!0,-1===e[t]&&(e[t]=1/0))})),p.lookup[t]=Id({},n,{hide:null!=e.hide&&e.hide},e,{hasBeenResized:o})})),i&&!d&&Object.keys(p.lookup).forEach((e=>{f[e]||delete p.lookup[e]}));const g=Id({},p.lookup),h=e.current.unstable_applyPipeProcessors("hydrateColumns",p);let b={};if(a){let t=!1;const n=Id({},o);d?h.all.forEach((e=>{n[e]=!p.lookup[e].hide})):i&&Object.keys(n).forEach((e=>{h.lookup[e]||(delete n[e],t=!0)})),h.all.forEach((r=>{if(!m[r]&&g[r]===h.lookup[r])return;let a=o[r];if(void 0===a)if(d)a=!0;else{a=!!lG(e.current.state).lookup[r]}const i=!h.lookup[r].hide;i!==a&&(t=!0,n[r]=i)})),b=t||d?n:o}else b=o;const v=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(0===o.length&&0===n.length)return e;const a={},i=[];for(let u=0;u!a[e]))],l=Id({},e.lookup);for(let u=0;u{t[e]=-1===n?1/0:n})),l[e]=t}return{all:s,lookup:l}})(h,n),y=Id({},v,{columnVisibilityModel:b});return uY(y,null!=(s=null==(l=(u=e.current).getRootDimensions)||null==(c=l.call(u))?void 0:c.viewportInnerSize.width)?s:0)},dY=e=>t=>Id({},t,{columns:e});function pY({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let a=e;for(let i=n;i{const{column:t,onClick:n}=e,r=IV(),o=AV(),a=U.useRef(),i=1===fG(r).filter((e=>!0!==e.disableColumnMenu)).length,s=U.useCallback((e=>{i||(n(e),a.current=setTimeout((()=>{r.current.setColumnVisibility(null==t?void 0:t.field,!1)}),100))}),[r,null==t?void 0:t.field,n,i]);return U.useEffect((()=>()=>clearTimeout(a.current)),[]),o.disableColumnSelector||!1===t.hideable?null:ee.jsx(xA,{onClick:s,disabled:i,children:r.current.getLocaleText("columnMenuHideColumn")})};function gY(e){var t;const{column:n,onClick:r}=e,o=IV(),a=zV(o,iG),i=AV(),s=null!=(t=n.sortingOrder)?t:i.sortingOrder,l=U.useMemo((()=>{if(!n)return null;const e=a.find((e=>e.field===n.field));return null==e?void 0:e.sort}),[n,a]),u=U.useCallback((e=>{r(e);const t=e.currentTarget.getAttribute("data-value")||null;o.current.sortColumn(n,t)}),[o,n,r]);return n&&n.sortable?ee.jsxs(U.Fragment,{children:[s.includes(null)?ee.jsx(xA,{onClick:u,disabled:null==l,children:o.current.getLocaleText("columnMenuUnsort")}):null,s.includes("asc")?ee.jsx(xA,{onClick:u,"data-value":"asc",disabled:"asc"===l,children:o.current.getLocaleText("columnMenuSortAsc")}):null,s.includes("desc")?ee.jsx(xA,{onClick:u,"data-value":"desc",disabled:"desc"===l,children:o.current.getLocaleText("columnMenuSortDesc")}):null]}):null}const hY=U.forwardRef((function(e,t){const{hideMenu:n,currentColumn:r}=e,o=IV(),a=[ee.jsx(gY,{onClick:n,column:r}),ee.jsx(mK,{onClick:n,column:r}),ee.jsx(mY,{onClick:n,column:r}),ee.jsx(fK,{onClick:n,column:r})],i=o.current.unstable_applyPipeProcessors("columnMenu",a,r);return ee.jsx(hK,Id({ref:t},e,{children:i.map(((e,t)=>U.cloneElement(e,{key:t,onClick:n,column:r})))}))})),bY=["className"],vY=e=>{const{classes:t}=e;return eb({root:["panelContent"]},OV,t)},yY=Wv("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function wY(e){const{className:t}=e,n=_d(e,bY),r=AV(),o=vY(r);return ee.jsx(yY,Id({className:KG(t,o.root),ownerState:r},n))}const SY=["className"],xY=e=>{const{classes:t}=e;return eb({root:["panelFooter"]},OV,t)},EY=Wv("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})((({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"})));function CY(e){const{className:t}=e,n=_d(e,SY),r=AV(),o=xY(r);return ee.jsx(EY,Id({className:KG(t,o.root),ownerState:r},n))}const kY=["className"],RY=e=>{const{classes:t}=e;return eb({root:["panelHeader"]},OV,t)},TY=Wv("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})((({theme:e})=>({padding:e.spacing(1)})));function IY(e){const{className:t}=e,n=_d(e,kY),r=AV(),o=RY(r);return ee.jsx(TY,Id({className:KG(t,o.root),ownerState:r},n))}const _Y=["className","slotProps"],AY=Wv("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),OY=()=>!0,NY=U.forwardRef((function(e,t){const{className:n,slotProps:r={}}=e,o=_d(e,_Y),a=AV(),i=(e=>{const{classes:t}=e;return eb({root:["panelWrapper"]},OV,t)})(a);return ee.jsx(IS,Id({open:!0,disableEnforceFocus:!0,isEnabled:OY},r.TrapFocus,{children:ee.jsx(AY,Id({ref:t,tabIndex:-1,className:KG(n,i.root),ownerState:a},o))}))})),PY=["sort","searchPredicate","autoFocusSearchField"],LY=Wv("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),MY=Wv("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})((({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${eP.root}`]:{marginRight:e.spacing(.5)}}))),DY=(Wv(Uw)({justifyContent:"flex-end"}),new Intl.Collator),jY=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;const FY=["children","className","classes"],$Y=kg("MuiDataGrid",["panel","paper"]),BY=Wv(AE,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})((({theme:e})=>({zIndex:e.zIndex.modal}))),zY=Wv(Ly,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>({backgroundColor:e.palette.background.paper,minWidth:300,maxHeight:450,display:"flex"}))),UY=U.forwardRef(((e,t)=>{var n;const{children:r,className:o}=e,a=_d(e,FY),i=IV(),s=AV(),l=$Y,[u,c]=U.useState(!1),d=U.useCallback((()=>{i.current.hidePreferences()}),[i]),p=U.useCallback((e=>{eq(e.key)&&i.current.hidePreferences()}),[i]),f=U.useMemo((()=>[{name:"flip",enabled:!1},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}]),[]),m=null==(n=i.current.columnHeadersContainerElementRef)?void 0:n.current;return m?ee.jsx(BY,Id({ref:t,placement:"bottom-start",className:KG(o,l.panel),ownerState:s,anchorEl:m,modifiers:f},a,{children:ee.jsx(CS,{mouseEvent:"onMouseUp",onClickAway:d,children:ee.jsx(zY,{className:l.paper,ownerState:s,elevation:8,onKeyDown:p,children:u&&r})})})):null})),HY=U.forwardRef((function(e,t){var n,r,o;const a=IV(),i=zV(a,dG),s=AV(),l=zV(a,Xq),u=a.current.unstable_applyPipeProcessors("preferencePanel",null,null!=(n=l.openedPanelValue)?n:Zq.filters);return ee.jsx(s.components.Panel,Id({ref:t,as:s.components.BasePopper,open:i.length>0&&l.open},null==(r=s.componentsProps)?void 0:r.panel,e,null==(o=s.componentsProps)?void 0:o.basePopper,{children:u}))})),VY=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","linkOperators","columnsSort","deleteIconProps","linkOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],GY=["InputComponentProps"],WY=Wv("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})((({theme:e})=>({display:"flex",padding:e.spacing(1)}))),qY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})((({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)}))),KY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormLinkOperatorInput",overridesResolver:(e,t)=>t.filterFormLinkOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),YY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),XY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),ZY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),QY=e=>{switch(e){case eW.And:return"filterPanelOperatorAnd";case eW.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `linkOperator` property in the `GridFilterPanel`.")}},JY=e=>e.headerName||e.field,eX=new Intl.Collator,tX=U.forwardRef((function(e,t){var n,r,o,a,i,s,l;const{item:u,hasMultipleFilters:c,deleteFilter:d,applyFilterChanges:p,multiFilterOperator:f,showMultiFilterOperators:m,disableMultiFilterOperator:g,applyMultiFilterOperatorChanges:h,focusElementRef:b,linkOperators:v=[eW.And,eW.Or],columnsSort:y,deleteIconProps:w={},linkOperatorInputProps:S={},operatorInputProps:x={},columnInputProps:E={},valueInputProps:C={}}=e,k=_d(e,VY),R=IV(),T=zV(R,hG),I=Oh(),_=Oh(),A=Oh(),O=Oh(),N=AV(),P=(e=>{const{classes:t}=e;return eb({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],linkOperatorInput:["filterFormLinkOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},OV,t)})(N),L=U.useRef(null),M=U.useRef(null),D=c&&v.length>0,j=(null==(n=N.componentsProps)?void 0:n.baseFormControl)||{},F=null==(o=((null==(r=N.componentsProps)?void 0:r.baseSelect)||{}).native)||o,$=F?"option":xA,{InputComponentProps:B}=C,z=_d(C,GY),H=U.useMemo((()=>{switch(y){case"asc":return T.sort(((e,t)=>eX.compare(JY(e),JY(t))));case"desc":return T.sort(((e,t)=>-eX.compare(JY(e),JY(t))));default:return T}}),[T,y]),V=u.columnField?R.current.getColumn(u.columnField):null,G=U.useMemo((()=>{var e;return u.operatorValue&&V?null==(e=V.filterOperators)?void 0:e.find((e=>e.value===u.operatorValue)):null}),[u,V]),W=U.useCallback((e=>{const t=e.target.value,n=R.current.getColumn(t);if(n.field===V.field)return;const r=n.filterOperators.find((e=>e.value===u.operatorValue))||n.filterOperators[0],o=!r.InputComponent||r.InputComponent!==(null==G?void 0:G.InputComponent);p(Id({},u,{columnField:t,operatorValue:r.value,value:o?void 0:u.value}))}),[R,p,u,V,G]),q=U.useCallback((e=>{const t=e.target.value,n=null==V?void 0:V.filterOperators.find((e=>e.value===t)),r=!(null!=n&&n.InputComponent)||(null==n?void 0:n.InputComponent)!==(null==G?void 0:G.InputComponent);p(Id({},u,{operatorValue:t,value:r?void 0:u.value}))}),[p,u,V,G]),K=U.useCallback((e=>{const t=e.target.value===eW.And.toString()?eW.And:eW.Or;h(t)}),[h]);return U.useImperativeHandle(b,(()=>({focus:()=>{var e;null!=G&&G.InputComponent?null==L||null==(e=L.current)||e.focus():M.current.focus()}})),[G]),ee.jsxs(WY,Id({ref:t,className:P.root,ownerState:N},k,{children:[ee.jsx(qY,Id({variant:"standard",as:N.components.BaseFormControl},j,w,{className:KG(P.deleteIcon,j.className,w.className),ownerState:N,children:ee.jsx(Uw,{"aria-label":R.current.getLocaleText("filterPanelDeleteIconLabel"),title:R.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{N.disableMultipleColumnsFiltering?void 0===u.value?d(u):p(Id({},u,{value:void 0})):d(u)},size:"small",children:ee.jsx(N.components.FilterPanelDeleteIcon,{fontSize:"small"})})})),ee.jsx(KY,Id({variant:"standard",as:N.components.BaseFormControl},j,S,{sx:Id({display:D?"flex":"none",visibility:m?"visible":"hidden"},j.sx||{},S.sx||{}),className:KG(P.linkOperatorInput,j.className,S.className),ownerState:N,children:ee.jsx(N.components.BaseSelect,Id({inputProps:{"aria-label":R.current.getLocaleText("filterPanelLinkOperator")},value:f,onChange:K,disabled:!!g||1===v.length,native:F},null==(a=N.componentsProps)?void 0:a.baseSelect,{children:v.map((e=>ee.jsx($,{value:e.toString(),children:R.current.getLocaleText(QY(e))},e.toString())))}))})),ee.jsxs(YY,Id({variant:"standard",as:N.components.BaseFormControl},j,E,{className:KG(P.columnInput,j.className,E.className),ownerState:N,children:[ee.jsx(MI,{htmlFor:I,id:_,children:R.current.getLocaleText("filterPanelColumns")}),ee.jsx(N.components.BaseSelect,Id({labelId:_,id:I,label:R.current.getLocaleText("filterPanelColumns"),value:u.columnField||"",onChange:W,native:F},null==(i=N.componentsProps)?void 0:i.baseSelect,{children:H.map((e=>ee.jsx($,{value:e.field,children:JY(e)},e.field)))}))]})),ee.jsxs(XY,Id({variant:"standard",as:N.components.BaseFormControl},j,x,{className:KG(P.operatorInput,j.className,x.className),ownerState:N,children:[ee.jsx(MI,{htmlFor:A,id:O,children:R.current.getLocaleText("filterPanelOperators")}),ee.jsx(N.components.BaseSelect,Id({labelId:O,label:R.current.getLocaleText("filterPanelOperators"),id:A,value:u.operatorValue,onChange:q,native:F,inputRef:M},null==(s=N.componentsProps)?void 0:s.baseSelect,{children:null==V||null==(l=V.filterOperators)?void 0:l.map((e=>ee.jsx($,{value:e.value,children:e.label||R.current.getLocaleText(`filterOperator${cm(e.value)}`)},e.value)))}))]})),ee.jsx(ZY,Id({variant:"standard",as:N.components.BaseFormControl},j,z,{className:KG(P.valueInput,j.className,z.className),ownerState:N,children:null!=G&&G.InputComponent?ee.jsx(G.InputComponent,Id({apiRef:R,item:u,applyValue:p,focusElementRef:L},G.InputComponentProps,B)):null}))]}))})),nX=["linkOperators","columnsSort","filterFormProps","children"],rX=U.forwardRef((function(e,t){var n;const r=IV(),o=AV(),a=zV(r,wG),i=zV(r,hG),s=U.useRef(null),{linkOperators:l=[eW.And,eW.Or],columnsSort:u,filterFormProps:c}=e,d=_d(e,nX),p=U.useCallback((e=>{r.current.upsertFilterItem(e)}),[r]),f=U.useCallback((e=>{r.current.setFilterLinkOperator(e)}),[r]),m=U.useCallback((()=>{const e=i.find((e=>{var t;return null==(t=e.filterOperators)?void 0:t.length}));return e?{columnField:e.field,operatorValue:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}:null}),[i]),g=U.useMemo((()=>{if(a.items.length)return a.items;const e=m();return e?[e]:[]}),[a.items,m]),h=g.length>1,b=U.useCallback((e=>{const t=1===g.length;r.current.deleteFilterItem(e),t&&r.current.hideFilterPanel()}),[r,g.length]);return U.useEffect((()=>{l.length>0&&a.linkOperator&&!l.includes(a.linkOperator)&&f(l[0])}),[l,f,a.linkOperator]),U.useEffect((()=>{g.length>0&&s.current.focus()}),[g.length]),ee.jsxs(NY,Id({ref:t},d,{children:[ee.jsx(wY,{children:g.map(((e,t)=>ee.jsx(tX,Id({item:e,applyFilterChanges:p,deleteFilter:b,hasMultipleFilters:h,showMultiFilterOperators:t>0,multiFilterOperator:a.linkOperator,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:f,focusElementRef:t===g.length-1?s:null,linkOperators:l,columnsSort:u},c),null==e.id?t:e.id)))}),!o.disableMultipleColumnsFiltering&&ee.jsx(CY,{children:ee.jsx(o.components.BaseButton,Id({onClick:()=>{const e=m();e&&r.current.upsertFilterItems([...g,e])},startIcon:ee.jsx(FW,{})},null==(n=o.componentsProps)?void 0:n.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")}))})]}))})),oX=["hideMenu","options"],aX=["hideMenu","options"],iX=e=>{const t=IV(),{hideMenu:n,options:r}=e,o=_d(e,oX);return ee.jsx(xA,Id({onClick:()=>{t.current.exportDataAsCsv(r),null==n||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))},sX=e=>{const t=IV(),{hideMenu:n,options:r}=e,o=_d(e,aX);return ee.jsx(xA,Id({onClick:()=>{t.current.exportDataAsPrint(r),null==n||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))},lX=()=>({items:[],linkOperator:eW.And,quickFilterValues:[],quickFilterLogicOperator:eW.And}),uX=["className","rowCount","visibleRowCount"],cX=Wv("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})((({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)}))),dX=U.forwardRef((function(e,t){const{className:n,rowCount:r,visibleRowCount:o}=e,a=_d(e,uX),i=IV(),s=AV(),l=(e=>{const{classes:t}=e;return eb({root:["rowCount"]},OV,t)})(s);if(0===r)return null;const u=ot.selectedRowCount})((({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}))),mX=U.forwardRef((function(e,t){const{className:n,selectedRowCount:r}=e,o=_d(e,pX),a=IV(),i=AV(),s=(e=>{const{classes:t}=e;return eb({root:["selectedRowCount"]},OV,t)})(i),l=a.current.getLocaleText("footerRowSelected")(r);return ee.jsx(fX,Id({ref:t,className:KG(s.root,n),ownerState:i},o,{children:l}))})),gX=U.forwardRef((function(e,t){var n;const r=IV(),o=AV(),a=zV(r,qV),i=zV(r,nK),s=zV(r,_G),l=!o.hideFooterSelectedRowCount&&i>0?ee.jsx(mX,{selectedRowCount:i}):ee.jsx("div",{}),u=o.hideFooterRowCount||o.pagination?null:ee.jsx(dX,{rowCount:a,visibleRowCount:s}),c=o.pagination&&!o.hideFooterPagination&&o.components.Pagination&&ee.jsx(o.components.Pagination,Id({},null==(n=o.componentsProps)?void 0:n.pagination));return ee.jsxs(kq,Id({ref:t},e,{children:[l,u,c]}))})),hX=U.forwardRef((function(e,t){var n,r;const o=AV();return ee.jsxs("div",Id({ref:t},e,{children:[ee.jsx(o.components.PreferencesPanel,Id({},null==(n=o.componentsProps)?void 0:n.preferencesPanel)),o.components.Toolbar&&ee.jsx(o.components.Toolbar,Id({},null==(r=o.componentsProps)?void 0:r.toolbar))]}))})),bX=U.forwardRef((function(e,t){return ee.jsx(Iq,Id({ref:t},e,{children:ee.jsx(gR,{})}))})),vX=U.forwardRef((function(e,t){const n=IV().current.getLocaleText("noRowsLabel");return ee.jsx(Iq,Id({ref:t},e,{children:n}))})),yX=Wv(VP)((({theme:e})=>({[`& .${NP.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${NP.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}}))),wX=U.forwardRef((function(e,t){var n;const r=IV(),o=AV(),a=zV(r,aK),i=U.useMemo((()=>Math.floor(a.rowCount/(a.pageSize||1))),[a.rowCount,a.pageSize]),s=U.useCallback((e=>{const t=Number(e.target.value);r.current.setPageSize(t)}),[r]),l=U.useCallback(((e,t)=>{r.current.setPage(t)}),[r]);return ee.jsx(yX,Id({ref:t,component:"div",count:a.rowCount,page:a.page<=i?a.page:i,rowsPerPageOptions:null!=(n=o.rowsPerPageOptions)&&n.includes(a.pageSize)?o.rowsPerPageOptions:[],rowsPerPage:a.pageSize,onPageChange:l,onRowsPerPageChange:s},r.current.getLocaleText("MuiTablePagination"),e))})),SX=(e,t)=>{let n,r;return t.pagination&&"client"===t.paginationMode?(r=lK(e),n=uK(e)):(n=EG(e),r=0===n.length?null:{firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},xX=(e,t)=>{const n=SX(e,t);return U.useMemo((()=>({rows:n.rows,range:n.range})),[n.rows,n.range])},EX="__detail_panel_toggle__",CX=["selected","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","cellFocus","cellTabIndex","editRowsState","isLastVisible","onClick","onDoubleClick","onMouseEnter","onMouseLeave"],kX=["changeReason"],RX=({width:e})=>{if(!e)return null;const t={width:e};return ee.jsx("div",{className:"MuiDataGrid-cell",style:t})},TX=U.forwardRef((function(e,t){var n;const{selected:r,rowId:o,row:a,index:i,style:s,position:l,rowHeight:u,className:c,visibleColumns:d,renderedColumns:p,containerWidth:f,firstColumnToRender:m,cellFocus:g,cellTabIndex:h,editRowsState:b,isLastVisible:v=!1,onClick:y,onDoubleClick:w,onMouseEnter:S,onMouseLeave:x}=e,E=_d(e,CX),C=IV(),k=U.useRef(null),R=AV(),T=xX(C,R),I=zV(C,gG),_=zV(C,iG),A=zV(C,QV),O=zV(C,DG),N=Lh(k,t),P=i+O+2,{hasScrollX:L,hasScrollY:M}=null!=(n=C.current.getRootDimensions())?n:{hasScrollX:!1,hasScrollY:!1},D=(e=>{const{editable:t,editing:n,selected:r,isLastVisible:o,rowHeight:a,classes:i}=e;return eb({root:["row",r&&"selected",t&&"row--editable",n&&"row--editing",o&&"row--lastVisible","auto"===a&&"row--dynamicHeight"]},OV,i)})({selected:r,isLastVisible:v,classes:R.classes,editing:C.current.getRowMode(o)===ZG.Edit,editable:R.editMode===YG.Row,rowHeight:u});U.useLayoutEffect((()=>{"auto"===u&&k.current&&"undefined"==typeof ResizeObserver&&C.current.unstable_storeRowHeightMeasurement(o,k.current.clientHeight,l)}),[C,u,o,l]),U.useLayoutEffect((()=>{if(T.range){const e=C.current.getRowIndexRelativeToVisibleRows(o);null!=e&&C.current.unstable_setLastMeasuredRowIndex(e)}const e=k.current;if(!e||"auto"!==u||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver((e=>{const[t]=e,n=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;C.current.unstable_storeRowHeightMeasurement(o,n,l)}));return t.observe(e),()=>t.disconnect()}),[C,T.range,i,u,o,l]);const j=U.useCallback(((e,t)=>n=>{(1!==n.target.nodeType||n.currentTarget.contains(n.target))&&C.current.getRow(o)&&(C.current.publishEvent(e,C.current.getRowParams(o),n),t&&t(n))}),[C,o]),F=U.useCallback((e=>{const t=function(e,t){return e.closest(`.${t}`)}(e.target,NV.cell),n=null==t?void 0:t.getAttribute("data-field");if(n){if(n===BK.field)return;if(n===EX)return;if("__reorder__"===n)return;if(C.current.getCellMode(o,n)===XG.Edit)return;if(C.current.getColumn(n).type===LK)return}j("rowClick",y)(e)}),[C,y,j,o]),$=U.useCallback(((e,t)=>{var n;const r=C.current.getCellParams(o,e.field),i=[],s=R.disableColumnReorder&&e.disableReorder||!R.rowReordering&&!!_.length&&A>1&&Object.keys(b).length>0;e.cellClassName&&i.push(KG("function"==typeof e.cellClassName?e.cellClassName(r):e.cellClassName));const l=b[o]?b[o][e.field]:null;let c=null;var d;null==l&&e.renderCell&&(c=e.renderCell(Id({},r,{api:C.current})),i.push(KG(NV["cell--withRenderer"],null==(d=R.classes)?void 0:d["cell--withRenderer"])));if(null!=l&&e.renderEditCell){var p;let t=a;C.current.unstable_getRowWithUpdatedValues&&(t=C.current.unstable_getRowWithUpdatedValues(o,e.field));const n=Id({},r,{row:t},_d(l,kX),{api:C.current});c=e.renderEditCell(n),i.push(KG(NV["cell--editing"],null==(p=R.classes)?void 0:p["cell--editing"]))}R.getCellClassName&&i.push(R.getCellClassName(r));const f=null!==g&&g.id===o&&g.field===e.field,m=null!==h&&h.id===o&&h.field===e.field&&"view"===r.cellMode?0:-1;return ee.jsx(R.components.Cell,Id({value:r.value,field:e.field,width:t.width,rowId:o,height:u,showRightBorder:t.showRightBorder,formattedValue:r.formattedValue,align:e.align||"left",cellMode:r.cellMode,colIndex:t.indexRelativeToAllColumns,isEditable:r.isEditable,hasFocus:f,tabIndex:m,className:KG(i),colSpan:t.colSpan,disableDragEvents:s},null==(n=R.componentsProps)?void 0:n.cell,{children:c}),e.field)}),[C,h,b,g,R,a,u,o,A,_.length]),B=C.current.unstable_getRowInternalSizes(o);let z=u;if("auto"===z&&B){let e=0;const t=Object.entries(B).reduce(((t,[n,r])=>/^base[A-Z]/.test(n)?(e+=1,r>t?r:t):t),0);t>0&&e>1&&(z=t)}const H=Id({},s,{maxHeight:"auto"===u?"none":u,minHeight:z});if(null!=B&&B.spacingTop){H["border"===R.rowSpacingType?"borderTopWidth":"marginTop"]=B.spacingTop}if(null!=B&&B.spacingBottom){const e="border"===R.rowSpacingType?"borderBottomWidth":"marginBottom";let t=H[e];"number"!=typeof t&&(t=parseInt(t||"0",10)),t+=B.spacingBottom,H[e]=t}const V=C.current.unstable_applyPipeProcessors("rowClassName",[],o);if("function"==typeof R.getRowClassName){var G;const e=i-((null==(G=T.range)?void 0:G.firstRowIndex)||0),t=Id({},C.current.getRowParams(o),{isFirstVisible:0===e,isLastVisible:e===T.rows.length-1,indexRelativeToCurrentPage:e});V.push(R.getRowClassName(t))}const W=_K(1e4,20,80),q=[];for(let U=0;U0&&ee.jsx(RX,{width:K})]}))}));let IX=class{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,n){this.timeouts||(this.timeouts=new Map);const r=setTimeout((()=>{"function"==typeof t&&t(),this.timeouts.delete(n.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(n.cleanupToken,r)}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)}},_X=class{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(){}};var AX;!function(e){e.DataGrid="DataGrid",e.DataGridPro="DataGridPro"}(AX||(AX={}));let OX=class{};const NX=function(e){let t=0;return function(n,r,o,a){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new _X:new IX);const[i]=U.useState(new OX),s=U.useRef(null),l=U.useRef();l.current=o;const u=U.useRef(null);if(!s.current&&l.current){const o=(e,t,n)=>{var r;t.defaultMuiPrevented||(null==(r=l.current)||r.call(l,e,t,n))};s.current=n.current.subscribeEvent(r,o,a),t+=1,u.current={cleanupToken:t},e.registry.register(i,(()=>{var e;null==(e=s.current)||e.call(s),s.current=null,u.current=null}),u.current)}else!l.current&&s.current&&(s.current(),s.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));U.useEffect((()=>{if(!s.current&&l.current){const e=(e,t,n)=>{var r;t.defaultMuiPrevented||(null==(r=l.current)||r.call(l,e,t,n))};s.current=n.current.subscribeEvent(r,e,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var e;null==(e=s.current)||e.call(s),s.current=null}}),[n,r,a])}}({registry:null}),PX={isFirst:!0};function LX(e,t,n){NX(e,t,n,PX)}const MX=Wv("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${NV["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${NV["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${NV["scrollArea--left"]}`]:{left:0},[`&.${NV["scrollArea--right"]}`]:{right:0}})));function DX(e){const{scrollDirection:t}=e,n=U.useRef(null),r=IV(),o=U.useRef(),[a,i]=U.useState(!1),s=zV(r,MG),l=U.useRef({left:0,top:0}),u=Id({},AV(),{scrollDirection:t}),c=(e=>{const{scrollDirection:t,classes:n}=e;return eb({root:["scrollArea",`scrollArea--${t}`]},OV,n)})(u),d=U.useCallback((e=>{l.current=e}),[]),p=U.useCallback((e=>{let a;if("left"===t)a=e.clientX-n.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI: Wrong drag direction");a=Math.max(1,e.clientX-n.current.getBoundingClientRect().left)}a=1.5*(a-1)+1,clearTimeout(o.current),o.current=setTimeout((()=>{r.current.scroll({left:l.current.left+a,top:l.current.top})}))}),[t,r]);U.useEffect((()=>()=>{clearTimeout(o.current)}),[]);const f=U.useCallback((()=>{i((e=>!e))}),[]);return NX(r,"rowsScroll",d),NX(r,"columnHeaderDragStart",f),NX(r,"columnHeaderDragEnd",f),a?ee.jsx(MX,{ref:n,className:KG(c.root),ownerState:u,onDragOver:p,style:{height:s}}):null}const jX=U.memo(DX),FX=({apiRef:e,props:t,children:n})=>ee.jsx(_V.Provider,{value:t,children:ee.jsx(TV.Provider,{value:e,children:n})}),$X=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"),BX=()=>{},zX={debug:BX,info:BX,warn:BX,error:BX},UX=["debug","info","warn","error"];function HX(e,t,n=console){const r=UX.indexOf(t);if(-1===r)throw new Error(`MUI: Log level ${t} not recognized.`);return UX.reduce(((t,o,a)=>(t[o]=a>=r?(...t)=>{const[r,...a]=t;n[o](`MUI: ${e} - ${r}`,...a)}:BX,t)),{})}function VX(e,t,n){const r=U.useRef(t),[o]=U.useState(Object.keys(t)),a=U.useCallback((()=>{e.current&&o.forEach((t=>{e.current.hasOwnProperty(t)||(e.current[t]=(...e)=>r.current[t](...e))}))}),[o,e]);U.useEffect((()=>{r.current=t}),[t]),U.useEffect((()=>{a()}),[a]),a()}let GX=class{constructor(){this.maxListeners=10,this.warnOnce=!1,this.events={}}on(e,t,n={}){let r=this.events[e];r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),n.isFirst?r.highPriority.set(t,!0):r.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 r=Array.from(n.highPriority.keys()),o=Array.from(n.regular.keys());for(let a=r.length-1;a>=0;a-=1){const e=r[a];n.highPriority.has(e)&&e.apply(this,t)}for(let a=0;an.current),[n]);const r=U.useCallback(((...e)=>{const[r,o,a={}]=e;if(a.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(a)&&a.isPropagationStopped())return;const i=t.signature===AX.DataGridPro?{api:n.current}:{};n.current.unstable_eventManager.emit(r,o,a,i)}),[n,t.signature]),o=U.useCallback(((e,t,r)=>{n.current.unstable_eventManager.on(e,t,r);const o=n.current;return()=>{o.unstable_eventManager.removeListener(e,t)}}),[n]),a=U.useCallback((e=>{n.current.publishEvent("componentError",e)}),[n]);return VX(n,{subscribeEvent:o,publishEvent:r,showError:a}),U.useEffect((()=>{const e=n.current;return()=>{var t;void 0!==(t=e.instanceId)?UV.cache&&UV.cache[t]&&delete UV.cache[t]:UV.cache=null,e.publishEvent("unmount")}}),[n]),n}const KX=e=>{const t=U.useRef(!0);t.current&&(t.current=!1,e())},YX=(e,t,n)=>{const r=U.useRef(),o=U.useRef(`mui-${Math.round(1e9*Math.random())}`),a=U.useCallback((()=>{r.current=e.current.unstable_registerPipeProcessor(t,o.current,n)}),[e,n,t]);KX((()=>{a()}));const i=U.useRef(!0);U.useEffect((()=>(i.current?i.current=!1:a(),()=>{r.current&&(r.current(),r.current=null)})),[a])},XX=(e,t,n)=>{const r=U.useRef(),o=U.useRef(`mui-${Math.round(1e9*Math.random())}`),a=U.useCallback((()=>{r.current=e.current.unstable_registerPipeApplier(t,o.current,n)}),[e,n,t]);KX((()=>{a()}));const i=U.useRef(!0);U.useEffect((()=>(i.current?i.current=!1:a(),()=>{r.current&&(r.current(),r.current=null)})),[a])},ZX=(e,t,n,r)=>{const o=U.useCallback((()=>{e.current.unstable_registerStrategyProcessor(t,n,r)}),[e,r,n,t]);KX((()=>{o()}));const a=U.useRef(!0);U.useEffect((()=>{a.current?a.current=!1:o()}),[o])},QX="none",JX={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree"},eZ=["stateId"],tZ=(e,t)=>{const n=qX(e,t);return((e,t)=>{e.current.getLogger=U.useCallback((e=>$X?HX(e,"debug",t.logger):t.logLevel?HX(e,t.logLevel.toString(),t.logger):zX),[t.logLevel,t.logger])})(n,t),function(e,t){const n=U.useCallback((t=>{e.current.setState((e=>Id({},e,{error:t})))}),[e]);U.useEffect((()=>{t.error?n({error:t.error}):n(null)}),[n,t.error]),NX(e,"componentError",n)}(n,t),((e,t)=>{const n=U.useRef({}),[,r]=U.useState(),o=U.useCallback((e=>{const{stateId:t}=e,r=_d(e,eZ);n.current[t]=Id({},r,{stateId:t})}),[]),a=U.useCallback(((r,o)=>{let a;if(a=kK(r)?r(e.current.state):r,e.current.state===a)return!1;let i=!1;const s=[];if(Object.keys(n.current).forEach((t=>{const r=n.current[t],o=r.stateSelector(e.current.state,e.current.instanceId),l=r.stateSelector(a,e.current.instanceId);l!==o&&(s.push({stateId:r.stateId,hasPropChanged:l!==r.propModel}),void 0!==r.propModel&&l!==r.propModel&&(i=!0))})),s.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${s[0].stateId}, therefore, you're not allowed to update ${s.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(i||(e.current.state=a,e.current.publishEvent&&e.current.publishEvent("stateChange",a)),1===s.length){const{stateId:r,hasPropChanged:l}=s[0],u=n.current[r],c=u.stateSelector(a,e.current.instanceId);if(u.propOnChange&&l){const n=t.signature===AX.DataGridPro?{api:e.current,reason:o}:{reason:o};u.propOnChange(c,n)}i||e.current.publishEvent(u.changeEvent,c,{reason:o})}return!i}),[e,t.signature]),i=U.useCallback(((t,n,r)=>e.current.setState((e=>Id({},e,{[t]:n(e[t])})),r)),[e]),s=U.useCallback((()=>r((()=>e.current.state))),[e]);VX(e,{setState:a,forceUpdate:s,unstable_updateControlState:i,unstable_registerControlState:o})})(n,t),(e=>{const t=U.useRef({}),n=U.useCallback((e=>{e&&Object.values(e.appliers).forEach((e=>{e()}))}),[]),r=U.useCallback(((e,r,o)=>{t.current[e]||(t.current[e]={processors:new Map,appliers:{}});const a=t.current[e];return a.processors.get(r)!==o&&(a.processors.set(r,o),n(a)),()=>{t.current[e].processors.set(r,null)}}),[n]),o=U.useCallback(((e,n,r)=>(t.current[e]||(t.current[e]={processors:new Map,appliers:{}}),t.current[e].appliers[n]=r,()=>{const r=_d(t.current[e].appliers,[n].map(fb));t.current[e].appliers=r})),[]);VX(e,{unstable_registerPipeProcessor:r,unstable_registerPipeApplier:o,unstable_requestPipeProcessorsApplication:U.useCallback((e=>{const r=t.current[e];n(r)}),[n]),unstable_applyPipeProcessors:U.useCallback(((...e)=>{const[n,r,o]=e;return t.current[n]?Array.from(t.current[n].processors.values()).reduce(((e,t)=>t?t(e,o):e),r):r}),[])})})(n),(e=>{const t=U.useRef(new Map),n=U.useRef({}),r=U.useCallback(((t,r,o)=>{const a=()=>{const e=_d(n.current[r],[t].map(fb));n.current[r]=e};n.current[r]||(n.current[r]={});const i=n.current[r],s=i[t];return i[t]=o,s&&s!==o?(t===e.current.unstable_getActiveStrategy(JX[r])&&e.current.publishEvent("activeStrategyProcessorChange",r),a):a}),[e]),o=U.useCallback(((t,r)=>{const o=e.current.unstable_getActiveStrategy(JX[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const a=n.current[t];if(!a||!a[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,a[o])(r)}),[e]),a=U.useCallback((e=>{var n;const r=Array.from(t.current.entries()).find((([,t])=>t.group===e&&t.isAvailable()));return null!=(n=null==r?void 0:r[0])?n:QX}),[]),i=U.useCallback(((n,r,o)=>{t.current.set(r,{group:n,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")}),[e]);VX(e,{unstable_registerStrategyProcessor:r,unstable_applyStrategyProcessor:o,unstable_getActiveStrategy:a,unstable_setStrategyAvailability:i})})(n),((e,t)=>{const n=U.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.getLocaleText=n})(n,t),n},nZ=(e,t,n)=>{const r=U.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function rZ(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 r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const oZ=e=>{const t=U.useCallback(((t=!1)=>{if(0===e.current.getSelectedRows().size)return;const n=e.current.getDataAsCsv({includeHeaders:t,delimiter:"\t"});navigator.clipboard?navigator.clipboard.writeText(n).catch((()=>{rZ(n)})):rZ(n)}),[e]),n=U.useCallback((t=>{const n=t.ctrlKey||t.metaKey||t.altKey;var r,o;"C"===String.fromCharCode(t.keyCode)&&n&&(r=t.target,""!==(null==(o=window.getSelection())?void 0:o.toString())||r&&(r.selectionEnd||0)-(r.selectionStart||0)>0||e.current.unstable_copySelectedRowsToClipboard(t.altKey))}),[e]);((e,t,n,r,o)=>{const a=UG(e,"useNativeEventListener"),[i,s]=U.useState(!1),l=U.useRef(r),u=U.useCallback((e=>l.current&&l.current(e)),[]);U.useEffect((()=>{l.current=r}),[r]),U.useEffect((()=>{let r;if(r=kK(t)?t():t&&t.current?t.current:null,r&&n&&!i){a.debug(`Binding native ${n} event`),r.addEventListener(n,u,o);const t=r;s(!0);const i=()=>{a.debug(`Clearing native ${n} event`),t.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",i)}}),[t,u,n,i,a,o,e])})(e,e.current.rootElementRef,"keydown",n);VX(e,{unstable_copySelectedRowsToClipboard:t})},aZ=e=>e.columnMenu,iZ=e=>Id({},e,{columnMenu:{open:!1}}),sZ=(e,t,n)=>{var r,o,a,i,s,l,u;const c=!!t.columnVisibilityModel||!(null==(r=t.initialState)||null==(o=r.columns)||!o.columnVisibilityModel);n.current.unstable_caches.columns={isUsingColumnVisibilityModel:c};const d=lY(t.columnTypes);return Id({},e,{columns:cY({apiRef:n,columnTypes:d,columnsToUpsert:t.columns,initialState:null==(a=t.initialState)?void 0:a.columns,shouldRegenColumnVisibilityModelFromColumns:!c,currentColumnVisibilityModel:null!=(i=null!=(s=t.columnVisibilityModel)?s:null==(l=t.initialState)||null==(u=l.columns)?void 0:u.columnVisibilityModel)?i:{},keepOnlyColumnsToUpsert:!0})})};const lZ=HV((e=>e.columnGrouping),(e=>e.lookup)),uZ=["groupId","children"];const cZ=(e,t,n)=>{if(iW(e)){if(void 0!==n[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurrs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:r,children:o}=e;o.forEach((e=>{cZ(e,[...t,r],n)}))},dZ=e=>{if(!e)return{};const t={};return e.forEach((e=>{cZ(e,[],t)})),t},pZ=e=>{let t={};return e.forEach((e=>{if(iW(e))return;const{groupId:n,children:r}=e,o=_d(e,uZ);if(!n)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");r||console.warn(`MUI: group groupId=${n} has no children.`);const a=Id({},o,{groupId:n}),i=pZ(r);if(void 0!==i[n]||void 0!==t[n])throw new Error(`MUI: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=Id({},t,i,{[n]:a})})),Id({},t)},fZ=(e,t)=>{var n;return Id({},e,{columnGrouping:{lookup:pZ(null!=(n=t.columnGroupingModel)?n:[]),groupCollapsedModel:{}}})},mZ=(e,t,n,r)=>{switch(e){case aW.Compact:return{value:e,headerHeight:Math.floor(.7*t),rowHeight:Math.floor(.7*n),headerGroupingMaxDepth:r,factor:.7};case aW.Comfortable:return{value:e,headerHeight:Math.floor(1.3*t),rowHeight:Math.floor(1.3*n),headerGroupingMaxDepth:r,factor:1.3};default:return{value:e,headerHeight:t,rowHeight:n,headerGroupingMaxDepth:r,factor:1}}},gZ=(e,t)=>{let n;if(null==t.columnGroupingModel||0===Object.keys(t.columnGroupingModel).length)n=0;else{const r=dZ(t.columnGroupingModel),o=e.columns,a=o.all.filter((e=>!1!==o.columnVisibilityModel[e]));n=0===a.length?0:Math.max(...a.map((e=>{var t,n;return null!=(t=null==(n=r[e])?void 0:n.length)?t:0})))}return Id({},e,{density:mZ(t.density,t.headerHeight,t.rowHeight,n)})};const hZ=(e,t)=>{if("string"==typeof e){const n=e.replace(/"/g,'""');return[t,"\n","\r"].some((e=>n.includes(e)))?`"${n}"`:n}return e};$V(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);function bZ(e){const{columns:t,rowIds:n,getCellParams:r,delimiterCharacter:o,includeHeaders:a}=e,i=n.reduce(((e,n)=>`${e}${((e,t,n,r)=>t.map((t=>{const o=n(e,t.field);return hZ(o.formattedValue,r)})))(n,t,r,o).join(o)}\r\n`),"").trim();if(!a)return i;const s=`${t.filter((e=>e.field!==BK.field)).map((e=>hZ(e.headerName||e.field,o))).join(o)}\r\n`;return`${s}${i}`.trim()}const vZ=({apiRef:e,options:t})=>{const n=dG(e);if(t.fields)return t.fields.map((e=>n.find((t=>t.field===e)))).filter((e=>!!e));return(t.allColumns?n:fG(e)).filter((e=>!e.disableExport))},yZ=({apiRef:e})=>{var t,n;const r=RG(e),o=XV(e),a=e.current.getSelectedRows(),i=r.filter((e=>{var t;return"body"===(null!=(t=o[e].position)?t:"body")})),s=tG(e),l=(null==s||null==(t=s.top)?void 0:t.map((e=>e.id)))||[],u=(null==s||null==(n=s.bottom)?void 0:n.map((e=>e.id)))||[];return i.unshift(...l),i.push(...u),a.size>0?i.filter((e=>a.has(e))):i},wZ=e=>{const t=UG(e,"useGridCsvExport"),n=U.useCallback(((n={})=>{var r,o;t.debug("Get data as CSV");return bZ({columns:vZ({apiRef:e,options:n}),rowIds:(null!=(r=n.getRowsToExport)?r:yZ)({apiRef:e}),getCellParams:e.current.getCellParams,delimiterCharacter:n.delimiter||",",includeHeaders:null==(o=n.includeHeaders)||o})}),[t,e]),r=U.useCallback((e=>{t.debug("Export data as CSV");const r=n(e);!function(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),n=document.createElement("a");return n.href=t,n.download=r,n.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",r],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[t,n]);VX(e,{getDataAsCsv:n,exportDataAsCsv:r});const o=U.useCallback(((e,t)=>{var n;return null!=(n=t.csvOptions)&&n.disableToolbarButton?e:[...e,{component:ee.jsx(iX,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);YX(e,"exportMenu",o)},SZ=e=>e.rowsMeta;const xZ=(e,t)=>{const n=UG(e,"useGridPrintExport"),r=U.useRef(null),o=U.useRef(null),a=U.useRef({});U.useEffect((()=>{r.current=Rh(e.current.rootElementRef.current)}),[e]);const i=U.useCallback(((t,n)=>new Promise((r=>{if(!t&&!n)return void r();const o=vZ({apiRef:e,options:{fields:t,allColumns:n}}).map((e=>e.field)),a=dG(e),i={};a.forEach((e=>{i[e.field]=o.includes(e.field)})),e.current.setColumnVisibilityModel(i),r()}))),[e]),s=U.useCallback((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}),[]),l=U.useCallback(((t,n)=>{var o,a;const i=Id({copyStyles:!0,hideToolbar:!1,hideFooter:!1},n),s=t.contentDocument;if(!s)return;const l=FG(e),u=SZ(e.current.state),c=e.current.rootElementRef.current,d=c.cloneNode(!0),p=d.querySelector(`.${NV.virtualScroller}`);p.style.height="auto",p.style.width="auto",p.parentElement.style.width="auto",p.parentElement.style.height="auto";d.querySelector(`.${NV.main}`).style.overflow="visible";const f=function(){const e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return e?parseInt(e[2],10):null}();f&&f>=108&&(d.style.contain="size");d.querySelector(`.${NV.columnHeaders}`).querySelector(`.${NV.columnHeadersInner}`).style.width="100%";let m=(null==(o=c.querySelector(`.${NV.toolbarContainer}`))?void 0:o.clientHeight)||0,g=(null==(a=c.querySelector(`.${NV.footerContainer}`))?void 0:a.clientHeight)||0;var h,b;i.hideToolbar&&(null==(h=d.querySelector(`.${NV.toolbarContainer}`))||h.remove(),m=0);i.hideFooter&&(null==(b=d.querySelector(`.${NV.footerContainer}`))||b.remove(),g=0);d.style.height=`${u.currentPageTotalHeight+l+m+g}px`;const v=document.createElement("div");v.appendChild(d),s.body.innerHTML=v.innerHTML;const y="function"==typeof i.pageStyle?i.pageStyle():i.pageStyle;if("string"==typeof y){const e=s.createElement("style");e.appendChild(s.createTextNode(y)),s.head.appendChild(e)}if(i.bodyClassName&&s.body.classList.add(...i.bodyClassName.split(" ")),i.copyStyles){const e=r.current.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t{var n,i;r.current.body.removeChild(t),e.current.restoreState(o.current||{}),null!=(n=o.current)&&null!=(i=n.columns)&&i.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.unstable_enableVirtualization(),o.current=null,a.current={}}),[e]),c=U.useCallback((async c=>{if(n.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");if(o.current=e.current.exportState(),a.current=pG(e),t.pagination){const t=IG(e);e.current.setPageSize(t)}await i(null==c?void 0:c.fields,null==c?void 0:c.allColumns),e.current.unstable_disableVirtualization(),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const d=s(null==c?void 0:c.fileName);d.onload=()=>{l(d,c);d.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&u(d)}))},r.current.body.appendChild(d)}),[t,n,e,s,l,u,i]);VX(e,{exportDataAsPrint:c});const d=U.useCallback(((e,t)=>{var n;return null!=(n=t.printOptions)&&n.disableToolbarButton?e:[...e,{component:ee.jsx(sX,{options:t.printOptions}),componentName:"printExport"}]}),[]);YX(e,"exportMenu",d)},EZ=["rowsBeforePartialUpdates"];const CZ=(e,t,n)=>{const r=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: 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"))}(r,e,n),r},kZ=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:r,idRowsLookup:{},idToIdLookup:{},ids:[]};for(let a=0;a{const o=_d(e.current.unstable_caches.rows,EZ),a=null!=n?n:0,i=e.current.unstable_applyStrategyProcessor("rowTreeCreation",Id({},o,{previousTree:t})),s=e.current.unstable_applyPipeProcessors("hydrateRows",i),l=1===s.treeDepth?s.ids.length:Object.values(s.tree).filter((e=>null==e.parent&&!e.isPinned)).length;return Id({},s,{groupingResponseBeforeRowHydration:i,loading:r,totalRowCount:Math.max(a,s.ids.length),totalTopLevelRowCount:Math.max(a,l)})},TZ=(e,t,n)=>{var r;const o=null==(r=e[t])?void 0:r.children;if(null==o)return[];const a=[];for(let i=0;it+=e.current.unstable_getRowHeight(n.id)),0))||0,bottom:(null==r||null==(n=r.bottom)?void 0:n.reduce(((t,n)=>t+=e.current.unstable_getRowHeight(n.id)),0))||0}}const _Z=(e,t)=>{const n=Id({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operatorValue){const e=cG(t)[n.columnField];n.operatorValue=e&&e.filterOperators[0].value}return n},AZ=$V(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),OZ=$V("MUI: The 'id' field is required on `filterModel.items` when you use multiple filters.","error"),NZ=$V(["MUI: One of your filtering item have no `operatorValue` provided.","This property will become required on `@mui/x-data-grid@6.X`."]),PZ=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?(AZ(),o=[e.items[0]]):o=e.items;const a=r&&o.some((e=>null==e.id)),i=o.some((e=>null==e.operatorValue));return a&&OZ(),i&&NZ(),i||a?Id({},e,{items:o.map((e=>_Z(e,n)))}):e.items!==o?Id({},e,{items:o}):e},LZ=(e,t,n)=>r=>Id({},r,{filterModel:PZ(e,t,n)}),MZ=(e,t)=>{if(!e.columnField||!e.operatorValue)return null;const n=t.current.getColumn(e.columnField);if(!n)return null;let r;if(n.valueParser){var o;const t=n.valueParser;r=Array.isArray(e.value)?null==(o=e.value)?void 0:o.map((e=>t(e))):t(e.value)}else r=e.value;const a=Id({},e,{value:r}),i=n.filterOperators;if(null==i||!i.length)throw new Error(`MUI: No filter operators found for column '${n.field}'.`);const s=i.find((e=>e.value===a.operatorValue));if(!s)throw new Error(`MUI: No filter operator found for column '${n.field}' and operator value '${a.operatorValue}'.`);const l=s.getApplyFilterFn(a,n);if("function"!=typeof l)return null;return{fn:e=>{const n=t.current.getCellParams(e,a.columnField);return l(n)},item:a}},DZ=(e,t)=>{const n=((e,t)=>{const{items:n}=e,r=n.map((e=>MZ(e,t))).filter((e=>!!e));return 0===r.length?null:(e,t)=>{const n={};return(t?r.filter((e=>t(e.item.columnField))):r).forEach((t=>{n[t.item.id]=t.fn(e)})),n}})(e,t),r=((e,t)=>{const{quickFilterValues:n=[]}=e;if(0===n.length)return null;const r=uG(t),o={};r.forEach((e=>{const r=t.current.getColumn(e),a=null==r?void 0:r.getApplyQuickFilterFn;a&&(o[e]=n.map((e=>a(e,r,t))))}));const a=n.filter(((e,t)=>Object.keys(o).some((e=>null!=o[e][t]))));return 0===a.length?null:(e,n)=>{const r={},i=[];Object.keys(o).forEach((o=>{n&&!n(o)||(r[o]=t.current.getCellParams(e,o),i.push(o))}));const s={};return a.forEach(((e,t)=>{const n=i.some((e=>{var n,a;return null!=o[e][t]&&(null==(n=(a=o[e])[t])?void 0:n.call(a,r[e]))}));s[e]=n})),s}})(e,t);return(e,t)=>({passingFilterItems:n&&n(e,t),passingQuickFilterValues:r&&r(e,t)})},jZ=(e,t,n,r)=>{var o,a;const i=n.items.filter((e=>null!==MZ(e,r))),s=e.filter((e=>null!=e)),l=t.filter((e=>null!=e)),u=null!=(o=n.quickFilterLogicOperator)?o:lX().quickFilterLogicOperator,c=null!=(a=n.linkOperator)?a:lX().linkOperator;if(s.length>0){const e=e=>s.some((t=>t[e.id]));if(c===eW.And){if(!i.every(e))return!1}else{if(!i.some(e))return!1}}if(l.length>0&&null!=n.quickFilterValues){const e=e=>l.some((t=>t[e]));if(u===eW.And){if(!n.quickFilterValues.every(e))return!1}else{if(!n.quickFilterValues.some(e))return!1}}return!0},FZ=(e,t,n)=>{var r,o,a,i;const s=null!=(r=null!=(o=t.filterModel)?o:null==(a=t.initialState)||null==(i=a.filter)?void 0:i.filterModel)?r:lX();return Id({},e,{filter:{filterModel:PZ(s,t.disableMultipleColumnsFiltering,n),visibleRowsLookup:{},filteredDescendantCountLookup:{}}})},$Z=e=>Id({},e,{focus:{cell:null,columnHeader:null},tabIndex:{cell:null,columnHeader:null}});const BZ=(e,t)=>{const n=UG(e,"useGridKeyboardNavigation"),r=xX(e,t).rows,o=U.useMemo((()=>function(e,t){const n=tG(e)||{};return[...n.top||[],...t,...n.bottom||[]]}(e,r)),[e,r]),a=U.useCallback(((t,r,o="left")=>{const a=EG(e),i=e.current.unstable_getCellColSpanInfo(r,t);i&&i.spannedByColSpan&&("left"===o?t=i.leftVisibleCellIndex:"right"===o&&(t=i.rightVisibleCellIndex));const s=a.findIndex((e=>e.id===r));n.debug(`Navigating to cell row ${s}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:s});const l=e.current.getVisibleColumns()[t].field;e.current.setCellFocus(r,l)}),[e,n]),i=U.useCallback(((t,r)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,r)}),[e,n]),s=U.useCallback((e=>o[e].id),[o]),l=U.useCallback(((t,n)=>{const r=e.current.getRootDimensions();if(0===o.length||!r)return;const l=e.current.unstable_getViewportPageSize(),u=t.field?e.current.getColumnIndex(t.field):0,c=o.findIndex((e=>e.id===t.id)),d=o.length-1,p=fG(e).length-1;let f=!0;switch(n.key){case"ArrowDown":case"Enter":c0?a(u,s(c-1)):i(u,n);break;case"ArrowRight":u0&&a(u-1,s(c));break;case"Tab":n.shiftKey&&u>0?a(u-1,s(c),"left"):!n.shiftKey&&u=0?a(u,s(e)):i(u,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?a(0,s(0)):a(0,s(c));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?a(p,s(d)):a(p,s(c));break;default:f=!1}f&&n.preventDefault()}),[e,o,a,i,s]),u=U.useCallback(((t,n)=>{const r=n.currentTarget.querySelector(`.${NV.columnHeaderTitleContainerContent}`);if(!!r&&r.contains(n.target)&&t.field!==BK.field)return;if(!e.current.getRootDimensions())return;const l=e.current.unstable_getViewportPageSize(),u=t.field?e.current.getColumnIndex(t.field):0,c=o.length-1,d=fG(e).length-1;let p=!0;switch(n.key){case"ArrowDown":a(u,s(0));break;case"ArrowRight":u0&&i(u-1,n);break;case"PageDown":null!==c&&a(u,s(Math.min(0+l,c)));break;case"Home":i(0,n);break;case"End":i(d,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:p=!1}p&&n.preventDefault()}),[e,o,a,i,s]),c=U.useCallback(((t,n)=>{if(!n.currentTarget.contains(n.target))return;const r=e.current.getCellParams(t.id,t.field);r.cellMode!==XG.Edit&&uq(n.key)&&e.current.publishEvent("cellNavigationKeyDown",r,n)}),[e]);NX(e,"cellNavigationKeyDown",l),NX(e,"columnHeaderKeyDown",u),NX(e,"cellKeyDown",c)},zZ=e=>e?0:100,UZ=e=>t=>Id({},t,{pagination:Id({},t.pagination,{pageSize:e})}),HZ=(e,t)=>t>0&&e>0?Math.ceil(e/t):0,VZ=e=>e.pageCount?Id({},e,{page:Math.max(Math.min(e.page,e.pageCount-1),0)}):e,GZ=e=>t=>Id({},t,{pagination:VZ(Id({},t.pagination,{page:e}))});$V(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error");const WZ=(e,t)=>{var n,r,o,a,i,s,l,u;let c;return c=null!=t.pageSize?t.pageSize:null!=(null==(n=t.initialState)||null==(r=n.pagination)?void 0:r.pageSize)?t.initialState.pagination.pageSize:zZ(t.autoPageSize),Id({},e,{pagination:{pageSize:c,page:null!=(o=null!=(a=t.page)?a:null==(i=t.initialState)||null==(s=i.pagination)?void 0:s.page)?o:0,pageCount:HZ(null!=(l=t.rowCount)?l:0,c),rowCount:null!=(u=t.rowCount)?u:0}})},qZ=(e,t)=>{((e,t)=>{var n,r;const o=UG(e,"useGridPageSize"),a=zV(e,LG);e.current.unstable_registerControlState({stateId:"pageSize",propModel:t.pageSize,propOnChange:t.onPageSizeChange,stateSelector:sK,changeEvent:"pageSizeChange"});const i=U.useCallback((t=>{t!==sK(e)&&(o.debug(`Setting page size to ${t}`),e.current.setState(UZ(t)),e.current.forceUpdate())}),[e,o]);VX(e,{setPageSize:i});const s=U.useCallback(((n,r)=>{var o,a;const i=sK(e);return r.exportOnlyDirtyModels&&null==t.pageSize&&null==(null==(o=t.initialState)||null==(a=o.pagination)?void 0:a.pageSize)&&i===zZ(t.autoPageSize)?n:Id({},n,{pagination:Id({},n.pagination,{pageSize:i})})}),[e,t.pageSize,null==(n=t.initialState)||null==(r=n.pagination)?void 0:r.pageSize,t.autoPageSize]),l=U.useCallback(((t,n)=>{var r;const o=null==(r=n.stateToRestore.pagination)?void 0:r.pageSize;return null!=o&&e.current.setState(UZ(o)),t}),[e]);YX(e,"exportState",s),YX(e,"restoreState",l);const u=U.useCallback((()=>{const n=e.current.getRootDimensions();if(!t.autoPageSize||!n)return;const r=IZ(e),o=Math.floor((n.viewportInnerSize.height-r.top-r.bottom)/a);e.current.setPageSize(o)}),[e,t.autoPageSize,a]);NX(e,"viewportInnerSizeChange",u),U.useEffect((()=>{null==t.pageSize||t.autoPageSize||e.current.setPageSize(t.pageSize)}),[e,t.autoPageSize,t.pageSize]),U.useEffect((()=>{u()}),[u])})(e,t),((e,t)=>{var n,r;const o=UG(e,"useGridPage"),a=zV(e,_G);e.current.unstable_registerControlState({stateId:"page",propModel:t.page,propOnChange:t.onPageChange,stateSelector:iK,changeEvent:"pageChange"});const i=U.useCallback((t=>{o.debug(`Setting page to ${t}`),e.current.setState(GZ(t)),e.current.forceUpdate()}),[e,o]);VX(e,{setPage:i});const s=U.useCallback(((n,r)=>{var o,a;const i=iK(e);return r.exportOnlyDirtyModels&&null==t.page&&null==(null==(o=t.initialState)||null==(a=o.pagination)?void 0:a.page)&&0===i?n:Id({},n,{pagination:Id({},n.pagination,{page:i})})}),[e,t.page,null==(n=t.initialState)||null==(r=n.pagination)?void 0:r.page]),l=U.useCallback(((t,n)=>{var r,o;const a=null!=(r=null==(o=n.stateToRestore.pagination)?void 0:o.page)?r:iK(e);return e.current.setState(GZ(a)),t}),[e]);YX(e,"exportState",s),YX(e,"restoreState",l),NX(e,"pageSizeChange",(t=>{e.current.setState((e=>{const n=HZ(e.pagination.rowCount,t);return Id({},e,{pagination:VZ(Id({},e.pagination,{pageCount:n,page:e.pagination.page}))})})),e.current.forceUpdate()})),NX(e,"pageChange",(()=>e.current.scrollToIndexes({rowIndex:iK(e)*sK(e)}))),U.useEffect((()=>{}),[t.rowCount,t.paginationMode]),U.useEffect((()=>{e.current.setState((e=>{const n=void 0!==t.rowCount?t.rowCount:a,r=HZ(n,e.pagination.pageSize),o=null==t.page?e.pagination.page:t.page;return Id({},e,{pagination:VZ(Id({},e.pagination,{page:o,rowCount:n,pageCount:r}))})})),e.current.forceUpdate()}),[a,t.rowCount,t.page,t.paginationMode,e])})(e,t)},KZ=(e,t)=>{var n,r;return Id({},e,{preferencePanel:null!=(n=null==(r=t.initialState)?void 0:r.preferencePanel)?n:{open:!1}})},YZ=e=>e.editRows;function XZ(e){return"function"==typeof e.then}const ZZ=(e,t)=>{var n;const r=UG(e,"useGridEditRows"),o=e=>(...n)=>{t.editMode===YG.Cell&&e(...n)},a=U.useCallback(((t,n,o)=>{e.current.getCellMode(t,n)!==o&&(r.debug(`Switching cell id: ${t} field: ${n} to mode: ${o}`),e.current.setState((r=>{const a=Id({},r.editRows);return a[t]=Id({},a[t]),o===XG.Edit?a[t][n]={value:e.current.getCellValue(t,n)}:(delete a[t][n],Object.keys(a[t]).length||delete a[t]),Id({},r,{editRows:a})})),e.current.forceUpdate(),e.current.publishEvent("cellModeChange",e.current.getCellParams(t,n)))}),[e,r]),i=U.useCallback(((t,n)=>{const r=YZ(e.current.state);return r[t]&&r[t][n]?XG.Edit:XG.View}),[e]),s=U.useCallback(((n,r={})=>{var o;const{id:a,field:i}=n;e.current.unstable_runPendingEditCellValueMutation(a,i);const s=e.current.getEditRowsModel();if(!s[a]||!s[a][i])throw new Error(`MUI: Cell at id: ${a} and field: ${i} is not in edit mode.`);const l=s[a][i],u=e.current.getColumn(i),c=e.current.getRow(a);if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating){const e=s[a][i];if(e.isValidating||e.error)return!1}const d=Id({},n,{value:l.value});let p=!!l.error;if(!p&&"function"==typeof u.preProcessEditCellProps){const t=u.preProcessEditCellProps({id:a,row:c,props:l});if(XZ(t))return t.then((t=>(e.current.unstable_setEditCellProps({id:a,field:i,props:t}),!t.error&&(e.current.publishEvent("cellEditCommit",d,r),!0))));e.current.unstable_setEditCellProps({id:a,field:i,props:t}),p=!!t.error}return!p&&(e.current.publishEvent("cellEditCommit",d,r),!0)}),[e,null==(n=t.experimentalFeatures)?void 0:n.preventCommitWhileValidating]),l=U.useCallback((t=>{const n=e.current.getColumn(t.field),r=e.current.getRow(t.id);return new Promise((o=>{let a={value:t.value};const i=e.current.getEditRowsModel()[t.id][t.field];if("function"!=typeof n.preProcessEditCellProps)return e.current.unstable_setEditCellProps(Id({},t,{props:a})),void o(!0);a=e.current.unstable_setEditCellProps(Id({},t,{props:Id({},i,{isValidating:!0})})),Promise.resolve(n.preProcessEditCellProps({id:t.id,row:r,props:Id({},a,{value:e.current.unstable_parseValue(t.id,t.field,t.value)})})).then((n=>{e.current.unstable_setEditCellProps(Id({},t,{props:Id({},n,{isValidating:!1})})),o(!n.error)}))}))}),[e]);VX(e,{setCellMode:a,getCellMode:i,commitCellChange:s,unstable_setCellEditingEditCellValue:l});const u=U.useCallback((async(t,n)=>{if(229===n.which)return;const{id:r,field:o,cellMode:a,isEditable:i}=t;if(!i)return;const s=a===XG.Edit,l=n.ctrlKey||n.metaKey||n.altKey;if(s||!(e=>tq(e.key)||oq(e.key)||aq(e))(n)||l||" "===n.key&&n.shiftKey||e.current.publishEvent("cellEditStart",t,n),!s&&oq(n.key)&&(e.current.setEditCellValue({id:r,field:o,value:""}),e.current.commitCellChange({id:r,field:o},n),e.current.publishEvent("cellEditStop",t,n)),s&&lq(n.key)){const t={id:r,field:o};if(!(await e.current.commitCellChange(t,n)))return}var u;s&&(u=n.key,iq.indexOf(u)>-1)&&e.current.publishEvent("cellEditStop",t,n)}),[e]),c=U.useCallback(((t,n)=>{t.isEditable&&e.current.publishEvent("cellEditStart",t,n)}),[e]),d=async(t,n)=>{t.cellMode!==XG.View&&(await e.current.commitCellChange(t,n),e.current.publishEvent("cellEditStop",t,n))},p=Ph(((e,t)=>{d(e,t)})),f=Ph((()=>{const t=lW(e);if(!t)return;const n=e.current.getCellParams(t.id,t.field);d(n,{})})),m=U.useCallback(((t,n)=>{t.isEditable&&(e.current.setCellMode(t.id,t.field,XG.Edit),cq(n)&&aq(n)&&e.current.unstable_setEditCellProps({id:t.id,field:t.field,props:{value:""}}))}),[e]),g=U.useCallback(((t,n)=>{e.current.setCellMode(t.id,t.field,XG.View),cq(n)&&(lq(n.key)?e.current.publishEvent("cellNavigationKeyDown",t,n):("Escape"===n.key||oq(n.key))&&e.current.setCellFocus(t.id,t.field))}),[e]),h=U.useCallback((t=>{const{id:n,field:o}=t,a=e.current.getEditRowsModel(),{value:i}=a[n][o];r.debug(`Setting cell id: ${n} field: ${o} to value: ${null==i?void 0:i.toString()}`);const s=e.current.getRow(n);if(s){const n=e.current.getColumn(t.field);let r=Id({},s,{[o]:i});n.valueSetter&&(r=n.valueSetter({row:s,value:i})),e.current.updateRows([r])}}),[e,r]),b=U.useCallback((t=>{const n=e.current.getRow(t.id),r=e.current.getColumn(t.field),o=r.preProcessEditCellProps?r.preProcessEditCellProps({id:t.id,row:n,props:t.props}):t.props;XZ(o)?o.then((n=>{e.current.unstable_setEditCellProps(Id({},t,{props:n}))})):e.current.unstable_setEditCellProps(Id({},t,{props:o}))}),[e]);NX(e,"cellKeyDown",o(u)),NX(e,"cellDoubleClick",o(c)),NX(e,"cellFocusOut",o(p)),NX(e,"columnHeaderDragStart",o(f)),NX(e,"cellEditStart",o(m)),NX(e,"cellEditStop",o(g)),NX(e,"cellEditCommit",o(h)),NX(e,"editCellPropsChange",o(b)),LX(e,"cellEditCommit",t.onCellEditCommit),LX(e,"cellEditStart",t.onCellEditStart),LX(e,"cellEditStop",t.onCellEditStop)},QZ=e=>Id({},e,{editRows:{}});function JZ(e,t){var n;const r=UG(e,"useGridEditRows");ZZ(e,t),((e,t)=>{var n,r;const o=U.useRef(null),a=U.useRef(null),i=zV(e,dG),s=e=>(...n)=>{t.editMode===YG.Row&&e(...n)},l=U.useCallback(((t,n)=>{n!==e.current.getRowMode(t)&&(e.current.setState((r=>{const o=Id({},r.editRows);return n===ZG.Edit?(o[t]={},i.forEach((n=>{const r=e.current.getCellParams(t,n.field);r.isEditable&&(o[t][n.field]={value:r.value})}))):delete o[t],Id({},r,{editRows:o})})),e.current.forceUpdate())}),[e,i]),u=U.useCallback((n=>t.editMode===YG.Cell?ZG.View:YZ(e.current.state)[n]?ZG.Edit:ZG.View),[e,t.editMode]),c=U.useCallback(((n,r={})=>{var o;if(t.editMode===YG.Cell)throw new Error("MUI: You can't commit changes when the edit mode is 'cell'.");e.current.unstable_runPendingEditCellValueMutation(n);const a=e.current.getEditRowsModel()[n];if(!a)throw new Error(`MUI: Row at id: ${n} is not being edited.`);if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating&&!Object.keys(a).reduce(((e,t)=>e&&!a[t].isValidating&&!a[t].error),!0))return!1;if(Object.values(a).some((e=>!!e.error)))return!1;const i=Object.keys(a).filter((t=>"function"==typeof e.current.getColumn(t).preProcessEditCellProps));if(i.length>0){const t=e.current.getRow(n),o=i.map((async r=>{const o=e.current.getColumn(r),i=await Promise.resolve(o.preProcessEditCellProps({id:n,row:t,props:a[r]}));return e.current.unstable_setEditCellProps({id:n,field:r,props:i}),i.error}));return Promise.all(o).then((t=>!t.some((e=>!!e))&&(e.current.publishEvent("rowEditCommit",n,r),!0)))}return e.current.publishEvent("rowEditCommit",n,r),!0}),[e,t.editMode,null==(n=t.experimentalFeatures)?void 0:n.preventCommitWhileValidating]),d=U.useCallback((t=>{const n=e.current.getEditRowsModel()[t.id],r=e.current.getRow(t.id);let o=!0;return new Promise((a=>{Object.keys(n).forEach((async a=>{const i=e.current.getColumn(a);let s=a===t.field?{value:t.value}:n[a];s=e.current.unstable_setEditCellProps({id:t.id,field:a,props:Id({},s,{isValidating:!0})}),i.preProcessEditCellProps&&(s=await Promise.resolve(i.preProcessEditCellProps({id:t.id,row:r,props:Id({},s,{value:a===t.field?e.current.unstable_parseValue(t.id,a,t.value):s.value})}))),s.error&&(o=!1),e.current.unstable_setEditCellProps({id:t.id,field:a,props:Id({},s,{isValidating:!1})})})),a(o)}))}),[e]);VX(e,{setRowMode:l,getRowMode:u,commitRowChange:c,unstable_setRowEditingEditCellValue:d});const p=U.useCallback((async(n,r)=>{if(229===r.which)return;const{cellMode:o,isEditable:a}=n;if(!a)return;const i=o===XG.Edit,s=e.current.getRowParams(n.id);if(i)if("Enter"===r.key){var l;if(!(await e.current.commitRowChange(n.id))&&null!=(l=t.experimentalFeatures)&&l.preventCommitWhileValidating)return;e.current.publishEvent("rowEditStop",s,r)}else"Escape"===r.key&&e.current.publishEvent("rowEditStop",s,r);else"Enter"===r.key&&e.current.publishEvent("rowEditStart",s,r)}),[e,null==(r=t.experimentalFeatures)?void 0:r.preventCommitWhileValidating]),f=U.useCallback(((t,n)=>{if(!t.isEditable)return;const r=e.current.getRowParams(t.id);e.current.publishEvent("rowEditStart",r,n)}),[e]),m=U.useCallback((t=>{const n=e.current.getRow(t.id),r=e.current.getEditRowsModel()[t.id];Object.keys(r).forEach((async o=>{const a=e.current.getColumn(o);if(a.preProcessEditCellProps){const i=o===t.field?t.props:r[o],s=await Promise.resolve(a.preProcessEditCellProps({id:t.id,row:n,props:i}));e.current.unstable_setEditCellProps({id:t.id,field:o,props:s})}else o===t.field&&e.current.unstable_setEditCellProps(t)}))}),[e]),g=U.useCallback((t=>{e.current.setRowMode(t.id,ZG.Edit)}),[e]),h=U.useCallback(((t,n)=>{e.current.setRowMode(t.id,ZG.View),"Enter"===n.key&&e.current.publishEvent("cellNavigationKeyDown",t,n)}),[e]),b=U.useCallback((t=>{const n=e.current.getEditRowsModel()[t];if(!n)throw new Error(`MUI: Row at id: ${t} is not being edited.`);const r=e.current.getRow(t);if(r){let t=Id({},r);Object.keys(n).forEach((r=>{const o=e.current.getColumn(r),a=n[r].value;o.valueSetter?t=o.valueSetter({row:t,value:a}):t[r]=a})),e.current.updateRows([t])}}),[e]),v=U.useCallback((e=>{a.current=e}),[]),y=async(t,n)=>{t.cellMode!==XG.View&&(a.current=null,o.current=setTimeout((async()=>{var r;if((null==(r=a.current)?void 0:r.id)!==t.id){await e.current.commitRowChange(t.id,n);const r=e.current.getRowParams(t.id);e.current.publishEvent("rowEditStop",r,n)}})))},w=Ph(((e,t)=>{y(e,t)})),S=Ph((()=>{const t=lW(e);if(!t)return;const n=e.current.getCellParams(t.id,t.field);y(n,{})}));NX(e,"cellKeyDown",s(p)),NX(e,"cellDoubleClick",s(f)),NX(e,"editCellPropsChange",s(m)),NX(e,"rowEditStart",s(g)),NX(e,"rowEditStop",s(h)),NX(e,"rowEditCommit",s(b)),NX(e,"cellFocusIn",s(v)),NX(e,"cellFocusOut",s(w)),NX(e,"columnHeaderDragStart",s(S)),LX(e,"rowEditCommit",t.onRowEditCommit),LX(e,"rowEditStart",t.onRowEditStart),LX(e,"rowEditStop",t.onRowEditStop)})(e,t);const o=U.useRef({});e.current.unstable_registerControlState({stateId:"editRows",propModel:t.editRowsModel,propOnChange:t.onEditRowsModelChange,stateSelector:YZ,changeEvent:"editRowsModelChange"});const a=U.useCallback((e=>!e.rowNode.isAutoGenerated&&!e.rowNode.isPinned&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!t.isCellEditable||t.isCellEditable(e))),[t.isCellEditable]),i=U.useCallback(((e,t)=>{if(o.current[e])if(t){if(o.current[e][t]){const[,n]=o.current[e][t];n()}}else Object.keys(o.current[e]).forEach((t=>{const[,n]=o.current[e][t];n()}))}),[]),s=U.useCallback(((n,r={})=>{((e,t,n,r)=>{if(!n)return void r();if(o.current[e]||(o.current[e]={}),o.current[e][t]){const[n]=o.current[e][t];clearTimeout(n)}const a=setTimeout((()=>{r(),delete o.current[e][t]}),n);o.current[e][t]=[a,()=>{r();const[n]=o.current[e][t];clearTimeout(n),delete o.current[e][t]}]})(n.id,n.field,n.debounceMs,(()=>{var o;if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating)return"row"===t.editMode?e.current.unstable_setRowEditingEditCellValue(n):e.current.unstable_setCellEditingEditCellValue(n);const a={id:n.id,field:n.field,props:{value:n.value}};return e.current.publishEvent("editCellPropsChange",a,r)}))}),[e,t.editMode,null==(n=t.experimentalFeatures)?void 0:n.preventCommitWhileValidating]),l=U.useCallback(((t,n,r)=>{const o=e.current.getColumn(n);return o.valueParser?o.valueParser(r,e.current.getCellParams(t,n)):r}),[e]),u=U.useCallback((t=>{const{id:n,field:o,props:a}=t;r.debug(`Setting cell props on id: ${n} field: ${o}`),e.current.setState((e=>{const t=Id({},e.editRows);return t[n]=Id({},e.editRows[n]),t[n][o]=Id({},a,{value:l(n,o,a.value)}),Id({},e,{editRows:t})})),e.current.forceUpdate();return YZ(e.current.state)[n][o]}),[e,r,l]),c=U.useCallback((t=>{YZ(e.current.state)!==t&&(r.debug("Setting editRows model"),e.current.setState((e=>Id({},e,{editRows:t}))),e.current.forceUpdate())}),[e,r]),d=U.useCallback((()=>YZ(e.current.state)),[e]),p=U.useCallback(((e,t)=>{const n=t.detail>1;e.isEditable&&e.cellMode===XG.View&&n&&t.preventDefault()}),[]);NX(e,"cellMouseDown",p),LX(e,"editCellPropsChange",t.onEditCellPropsChange);VX(e,{isCellEditable:a,setEditRowsModel:c,getEditRowsModel:d,setEditCellValue:s,unstable_setEditCellProps:u,unstable_parseValue:l,unstable_runPendingEditCellValueMutation:i}),U.useEffect((()=>{void 0!==t.editRowsModel&&e.current.setEditRowsModel(t.editRowsModel)}),[e,t.editRowsModel])}const eQ=["id","field"],tQ=["id","field"],nQ=$V(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#persistence."],"error"),rQ=["id"],oQ=["id"],aQ=$V(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#persistence."],"error"),iQ=e=>Id({},e,{editRows:{}}),sQ=(e,t)=>{((e,t)=>{const[n,r]=U.useState({}),o=U.useRef(n),a=U.useRef({}),{processRowUpdate:i,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:u,signature:c}=t,d=e=>(...n)=>{t.editMode===YG.Cell&&e(...n)},p=U.useCallback(((t,n)=>{const r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error(`MUI: The cell with id=${t} and field=${n} is not editable.`)}),[e]),f=U.useCallback(((t,n,r)=>{if(e.current.getCellMode(t,n)!==r)throw new Error(`MUI: The cell with id=${t} and field=${n} is not in ${r} mode.`)}),[e]),m=U.useCallback(((t,n)=>{if(!t.isEditable)return;if(t.cellMode===XG.Edit)return;const r=Id({},t,{reason:tW.cellDoubleClick});e.current.publishEvent("cellEditStart",r,n)}),[e]),g=U.useCallback(((t,n)=>{if(t.cellMode===XG.View)return;if(e.current.getCellMode(t.id,t.field)===XG.View)return;const r=Id({},t,{reason:nW.cellFocusOut});e.current.publishEvent("cellEditStop",r,n)}),[e]),h=U.useCallback(((t,n)=>{if(t.cellMode===XG.Edit){if(229===n.which)return;let r;if("Escape"===n.key?r=nW.escapeKeyDown:"Enter"===n.key?r=nW.enterKeyDown:"Tab"===n.key&&(r=n.shiftKey?nW.shiftTabKeyDown:nW.tabKeyDown,n.preventDefault()),r){const o=Id({},t,{reason:r});e.current.publishEvent("cellEditStop",o,n)}}else if(t.isEditable){let r;if(" "===n.key&&n.shiftKey)return;if(aq(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?r=tW.printableKeyDown:"Enter"===n.key?r=tW.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(r=tW.deleteKeyDown),r){const o=Id({},t,{reason:r,key:n.key});e.current.publishEvent("cellEditStart",o,n)}}}),[e]),b=U.useCallback((t=>{const{id:n,field:r,reason:o,key:a}=t,i={id:n,field:r};o===tW.printableKeyDown?U.version.startsWith("18")?i.initialValue=a:i.deleteValue=!0:o===tW.deleteKeyDown&&(i.deleteValue=!0),e.current.startCellEditMode(i)}),[e]),v=U.useCallback((n=>{const{id:r,field:o,reason:a}=n;let i;e.current.unstable_runPendingEditCellValueMutation(r,o),a===nW.enterKeyDown?i="below":a===nW.tabKeyDown?i="right":a===nW.shiftTabKeyDown&&(i="left");let s="escapeKeyDown"===a;YZ(e.current.state)[r][o].isProcessingProps&&!t.disableIgnoreModificationsIfProcessingProps&&(s=!0),e.current.stopCellEditMode({id:r,field:o,ignoreModifications:s,cellToFocusAfter:i})}),[e,t.disableIgnoreModificationsIfProcessingProps]);NX(e,"cellDoubleClick",d(m)),NX(e,"cellFocusOut",d(g)),NX(e,"cellKeyDown",d(h)),NX(e,"cellEditStart",d(b)),NX(e,"cellEditStop",d(v)),LX(e,"cellEditStart",t.onCellEditStart),LX(e,"cellEditStop",t.onCellEditStop);const y=U.useCallback(((t,n)=>{const r=YZ(e.current.state);return r[t]&&r[t][n]?XG.Edit:XG.View}),[e]),w=Ph((n=>{const a=n!==t.cellModesModel;if(u&&a){const t=c===AX.DataGridPro?{api:e.current}:{};u(n,t)}t.cellModesModel&&a||(r(n),o.current=n,e.current.publishEvent("cellModesModelChange",n))})),S=U.useCallback(((e,t,n)=>{const r=Id({},o.current);if(null!==n)r[e]=Id({},r[e],{[t]:Id({},n)});else{const n=_d(r[e],[t].map(fb));r[e]=n,0===Object.keys(r[e]).length&&delete r[e]}w(r)}),[w]),x=U.useCallback(((t,n,r)=>{e.current.setState((e=>{const o=Id({},e.editRows);return null!==r?o[t]=Id({},o[t],{[n]:Id({},r)}):(delete o[t][n],0===Object.keys(o[t]).length&&delete o[t]),Id({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),E=U.useCallback((e=>{const{id:t,field:n}=e,r=_d(e,eQ);p(t,n),f(t,n,XG.View),S(t,n,Id({mode:XG.Edit},r))}),[p,f,S]),C=Ph((t=>{const{id:n,field:r,deleteValue:o,initialValue:a}=t;let i=e.current.getCellValue(n,r);(o||a)&&(i=o?"":a),x(n,r,{value:i,error:!1,isProcessingProps:!1}),e.current.setCellFocus(n,r)})),k=U.useCallback((e=>{const{id:t,field:n}=e,r=_d(e,tQ);f(t,n,XG.Edit),S(t,n,Id({mode:XG.View},r))}),[f,S]),R=Ph((async t=>{const{id:n,field:r,ignoreModifications:o,cellToFocusAfter:l="none"}=t;f(n,r,XG.Edit),e.current.unstable_runPendingEditCellValueMutation(n,r);const u=()=>{x(n,r,null),S(n,r,null),"none"!==l&&e.current.unstable_moveFocusToRelativeCell(n,r,l)};if(o)return void u();const c=YZ(e.current.state),{error:d,isProcessingProps:p}=c[n][r];if(d||p)return a.current[n][r].mode=XG.Edit,void S(n,r,{mode:XG.Edit});const m=e.current.unstable_getRowWithUpdatedValuesFromCellEditing(n,r);if(i){const t=e=>{a.current[n][r].mode=XG.Edit,S(n,r,{mode:XG.Edit}),s?s(e):nQ()};try{const r=e.current.getRow(n);Promise.resolve(i(m,r)).then((t=>{e.current.updateRows([t]),u()})).catch(t)}catch(g){t(g)}}else e.current.updateRows([m]),u()})),T=U.useCallback((async t=>{var n,r;const{id:o,field:a,value:i,debounceMs:s,unstable_skipValueParser:l}=t;p(o,a),f(o,a,XG.Edit);const u=e.current.getColumn(a),c=e.current.getRow(o);let d=i;u.valueParser&&!l&&(d=u.valueParser(i,e.current.getCellParams(o,a)));let m=YZ(e.current.state),g=Id({},m[o][a],{value:d,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(u.preProcessEditCellProps){const e=i!==m[o][a].value;g=Id({},g,{isProcessingProps:!0}),x(o,a,g),g=await Promise.resolve(u.preProcessEditCellProps({id:o,row:c,props:g,hasChanged:e}))}return e.current.getCellMode(o,a)!==XG.View&&(m=YZ(e.current.state),g=Id({},g,{isProcessingProps:!1}),g.value=u.preProcessEditCellProps?m[o][a].value:d,x(o,a,g),m=YZ(e.current.state),!(null!=(n=m[o])&&null!=(r=n[a])&&r.error))}),[e,p,f,x]),I=U.useCallback(((t,n)=>{const r=e.current.getColumn(n),o=YZ(e.current.state),{value:a}=o[t][n],i=e.current.getRow(t);return r.valueSetter?r.valueSetter({value:a,row:i}):Id({},i,{[n]:a})}),[e]);VX(e,{getCellMode:y,startCellEditMode:E,stopCellEditMode:k,unstable_setCellEditingEditCellValue:T,unstable_getRowWithUpdatedValuesFromCellEditing:I}),U.useEffect((()=>{l&&w(l)}),[l,w]),U.useEffect((()=>{const t=YV(e),r=a.current;a.current=AK(n),Object.entries(n).forEach((([e,n])=>{Object.entries(n).forEach((([n,o])=>{var a,i,s;const l=(null==(a=r[e])||null==(i=a[n])?void 0:i.mode)||XG.View,u=null!=(s=t[e])?s:e;o.mode===XG.Edit&&l===XG.View?C(Id({id:u,field:n},o)):o.mode===XG.View&&l===XG.Edit&&R(Id({id:u,field:n},o))}))}))}),[e,n,C,R])})(e,t),((e,t)=>{const[n,r]=U.useState({}),o=U.useRef(n),a=U.useRef({}),i=U.useRef(null),s=U.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:u,rowModesModel:c,onRowModesModelChange:d,signature:p}=t,f=e=>(...n)=>{t.editMode===YG.Row&&e(...n)},m=U.useCallback(((t,n)=>{const r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error(`MUI: The cell with id=${t} and field=${n} is not editable.`)}),[e]),g=U.useCallback(((t,n)=>{if(e.current.getRowMode(t)!==n)throw new Error(`MUI: The row with id=${t} is not in ${n} mode.`)}),[e]),h=U.useCallback(((t,n)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===ZG.Edit)return;const r=Id({},e.current.getRowParams(t.id),{field:t.field,reason:rW.cellDoubleClick});e.current.publishEvent("rowEditStart",r,n)}),[e]),b=U.useCallback((e=>{s.current=e}),[]),v=U.useCallback(((t,n)=>{t.isEditable&&e.current.getRowMode(t.id)!==ZG.View&&(s.current=null,i.current=setTimeout((()=>{var r;if(i.current=null,(null==(r=s.current)?void 0:r.id)!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===ZG.View)return;const r=Id({},e.current.getRowParams(t.id),{field:t.field,reason:oW.rowFocusOut});e.current.publishEvent("rowEditStop",r,n)}})))}),[e]);U.useEffect((()=>()=>{clearTimeout(i.current)}),[]);const y=U.useCallback(((t,n)=>{if(t.cellMode===ZG.Edit){if(229===n.which)return;let r;if("Escape"===n.key)r=oW.escapeKeyDown;else if("Enter"===n.key)r=oW.enterKeyDown;else if("Tab"===n.key){const o=uG(e).filter((n=>e.current.isCellEditable(e.current.getCellParams(t.id,n))));n.shiftKey?t.field===o[0]&&(r=oW.shiftTabKeyDown):t.field===o[o.length-1]&&(r=oW.tabKeyDown),r&&n.preventDefault()}if(r){const o=Id({},e.current.getRowParams(t.id),{reason:r,field:t.field});e.current.publishEvent("rowEditStop",o,n)}}else if(t.isEditable){let r;if(" "===n.key&&n.shiftKey)return;if(aq(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?r=rW.printableKeyDown:"Enter"===n.key?r=rW.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(r=rW.deleteKeyDown),r){const o=Id({},e.current.getRowParams(t.id),{field:t.field,key:n.key,reason:r});e.current.publishEvent("rowEditStart",o,n)}}}),[e]),w=U.useCallback((t=>{const{id:n,field:r,reason:o,key:a}=t,i={id:n,fieldToFocus:r};o===rW.printableKeyDown?U.version.startsWith("18")?i.initialValue=a:i.deleteValue=!!r:o===rW.deleteKeyDown&&(i.deleteValue=!!r),e.current.startRowEditMode(i)}),[e]),S=U.useCallback((n=>{const{id:r,reason:o,field:a}=n;let i;e.current.unstable_runPendingEditCellValueMutation(r),o===oW.enterKeyDown?i="below":o===oW.tabKeyDown?i="right":o===oW.shiftTabKeyDown&&(i="left");let s="escapeKeyDown"===o;const l=YZ(e.current.state);s||t.disableIgnoreModificationsIfProcessingProps||(s=Object.values(l[r]).some((e=>e.isProcessingProps))),e.current.stopRowEditMode({id:r,ignoreModifications:s,field:a,cellToFocusAfter:i})}),[e,t.disableIgnoreModificationsIfProcessingProps]);NX(e,"cellDoubleClick",f(h)),NX(e,"cellFocusIn",f(b)),NX(e,"cellFocusOut",f(v)),NX(e,"cellKeyDown",f(y)),NX(e,"rowEditStart",f(w)),NX(e,"rowEditStop",f(S)),LX(e,"rowEditStart",t.onRowEditStart),LX(e,"rowEditStop",t.onRowEditStop);const x=U.useCallback((n=>{if(t.editMode===YG.Cell)return ZG.View;const r=YZ(e.current.state);return r[n]&&Object.keys(r[n]).length>0?ZG.Edit:ZG.View}),[e,t.editMode]),E=Ph((n=>{const a=n!==t.rowModesModel;if(d&&a){const t=p===AX.DataGridPro?{api:e.current}:{};d(n,t)}t.rowModesModel&&a||(r(n),o.current=n,e.current.publishEvent("rowModesModelChange",n))})),C=U.useCallback(((e,t)=>{const n=Id({},o.current);null!==t?n[e]=Id({},t):delete n[e],E(n)}),[E]),k=U.useCallback(((t,n)=>{e.current.setState((e=>{const r=Id({},e.editRows);return null!==n?r[t]=n:delete r[t],Id({},e,{editRows:r})})),e.current.forceUpdate()}),[e]),R=U.useCallback(((t,n,r)=>{e.current.setState((e=>{const o=Id({},e.editRows);return null!==r?o[t]=Id({},o[t],{[n]:Id({},r)}):(delete o[t][n],0===Object.keys(o[t]).length&&delete o[t]),Id({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),T=U.useCallback((e=>{const{id:t}=e,n=_d(e,rQ);g(t,ZG.View),C(t,Id({mode:ZG.Edit},n))}),[g,C]),I=Ph((t=>{const{id:n,fieldToFocus:r,deleteValue:o,initialValue:a}=t,i=uG(e).reduce(((t,i)=>{if(!e.current.getCellParams(n,i).isEditable)return t;let s=e.current.getCellValue(n,i);return r===i&&(o||a)&&(s=o?"":a),t[i]={value:s,error:!1,isProcessingProps:!1},t}),{});k(n,i),r&&e.current.setCellFocus(n,r)})),_=U.useCallback((e=>{const{id:t}=e,n=_d(e,oQ);g(t,ZG.Edit),C(t,Id({mode:ZG.View},n))}),[g,C]),A=Ph((t=>{const{id:n,ignoreModifications:r,field:o,cellToFocusAfter:i="none"}=t;e.current.unstable_runPendingEditCellValueMutation(n);const s=()=>{"none"!==i&&o&&e.current.unstable_moveFocusToRelativeCell(n,o,i),k(n,null),C(n,null)};if(r)return void s();const c=YZ(e.current.state),d=e.current.getRow(n);if(Object.values(c[n]).some((e=>e.isProcessingProps)))return void(a.current[n].mode=ZG.Edit);if(Object.values(c[n]).some((e=>e.error)))return a.current[n].mode=ZG.Edit,void C(n,{mode:ZG.Edit});const p=e.current.unstable_getRowWithUpdatedValuesFromRowEditing(n);if(l){const t=e=>{a.current[n].mode=ZG.Edit,C(n,{mode:ZG.Edit}),u?u(e):aQ()};try{Promise.resolve(l(p,d)).then((t=>{e.current.updateRows([t]),s()})).catch(t)}catch(f){t(f)}}else e.current.updateRows([p]),s()})),O=U.useCallback((t=>{const{id:n,field:r,value:o,debounceMs:a,unstable_skipValueParser:i}=t;m(n,r);const s=e.current.getColumn(r),l=e.current.getRow(n);let u=o;s.valueParser&&!i&&(u=s.valueParser(o,e.current.getCellParams(n,r)));let c=YZ(e.current.state),d=Id({},c[n][r],{value:u,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return s.preProcessEditCellProps||R(n,r,d),new Promise((t=>{const o=[];if(s.preProcessEditCellProps){const a=d.value!==c[n][r].value;d=Id({},d,{isProcessingProps:!0}),R(n,r,d);const i=_d(c[n],[r].map(fb)),p=Promise.resolve(s.preProcessEditCellProps({id:n,row:l,props:d,hasChanged:a,otherFieldsProps:i})).then((o=>{e.current.getRowMode(n)!==ZG.View?(c=YZ(e.current.state),(o=Id({},o,{isProcessingProps:!1})).value=s.preProcessEditCellProps?c[n][r].value:u,R(n,r,o)):t(!1)}));o.push(p)}Object.entries(c[n]).forEach((([a,i])=>{if(a===r)return;const s=e.current.getColumn(a);if(!s.preProcessEditCellProps)return;i=Id({},i,{isProcessingProps:!0}),R(n,a,i),c=YZ(e.current.state);const u=_d(c[n],[a].map(fb)),d=Promise.resolve(s.preProcessEditCellProps({id:n,row:l,props:i,hasChanged:!1,otherFieldsProps:u})).then((r=>{e.current.getRowMode(n)!==ZG.View?(r=Id({},r,{isProcessingProps:!1}),R(n,a,r)):t(!1)}));o.push(d)})),Promise.all(o).then((()=>{e.current.getRowMode(n)===ZG.Edit?(c=YZ(e.current.state),t(!c[n][r].error)):t(!1)}))}))}),[e,m,R]),N=U.useCallback((t=>{const n=YZ(e.current.state);let r=Id({},e.current.getRow(t));return Object.entries(n[t]).forEach((([t,n])=>{const o=e.current.getColumn(t);o.valueSetter?r=o.valueSetter({value:n.value,row:r}):r[t]=n.value})),r}),[e]);VX(e,{getRowMode:x,startRowEditMode:T,stopRowEditMode:_,unstable_setRowEditingEditCellValue:O,unstable_getRowWithUpdatedValuesFromRowEditing:N}),U.useEffect((()=>{c&&E(c)}),[c,E]),U.useEffect((()=>{const t=YV(e),r=a.current;a.current=AK(n),Object.entries(n).forEach((([e,n])=>{var o,a;const i=(null==(o=r[e])?void 0:o.mode)||ZG.View,s=null!=(a=t[e])?a:e;n.mode===ZG.Edit&&i===ZG.View?I(Id({id:s},n)):n.mode===ZG.View&&i===ZG.Edit&&A(Id({id:s},n))}))}),[e,n,I,A])})(e,t);const n=U.useRef({}),{isCellEditable:r}=t,o=U.useCallback((e=>!e.rowNode.isAutoGenerated&&(!!e.colDef.editable&&(!!e.colDef.renderEditCell&&(r?r(e):!e.rowNode.isPinned)))),[r]);U.useEffect((()=>{const e=n.current;return()=>{Object.entries(e).forEach((([t,n])=>{Object.keys(n).forEach((n=>{const[r]=e[t][n];clearTimeout(r),delete e[t][n]}))}))}}),[]);const a=U.useCallback(((e,t)=>{if(n.current[e])if(t){if(n.current[e][t]){const[,r]=n.current[e][t];r()}}else Object.keys(n.current[e]).forEach((t=>{const[,r]=n.current[e][t];r()}))}),[]),i=U.useCallback((r=>{const{id:o,field:a,debounceMs:i}=r;return new Promise((s=>{((e,t,r,o)=>{if(!r)return void o();if(n.current[e]||(n.current[e]={}),n.current[e][t]){const[r]=n.current[e][t];clearTimeout(r)}const a=setTimeout((()=>{o(),delete n.current[e][t]}),r);n.current[e][t]=[a,()=>{const[r]=n.current[e][t];clearTimeout(r),o(),delete n.current[e][t]}]})(o,a,i,(async()=>{const n=t.editMode===YG.Row?e.current.unstable_setRowEditingEditCellValue:e.current.unstable_setCellEditingEditCellValue;if(e.current.getCellMode(o,a)===XG.Edit){const e=await n(r);s(e)}}))}))}),[e,t.editMode]),s=U.useCallback(((n,r)=>t.editMode===YG.Cell?e.current.unstable_getRowWithUpdatedValuesFromCellEditing(n,r):e.current.unstable_getRowWithUpdatedValuesFromRowEditing(n)),[e,t.editMode]),l=U.useCallback(((t,n)=>({changeReason:YZ(e.current.state)[t][n].changeReason})),[e]);VX(e,{isCellEditable:o,setEditCellValue:i,unstable_runPendingEditCellValueMutation:a,unstable_getRowWithUpdatedValues:s,unstable_getEditCellMeta:l})},lQ=(e,t,n)=>(n.current.unstable_caches.rows=kZ({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),Id({},e,{rows:RZ({apiRef:n,previousTree:null,rowCountProp:t.rowCount,loadingProp:t.loading})})),uQ=({ids:e,idRowsLookup:t,idToIdLookup:n,previousTree:r})=>{const o={};for(let a=0;a({field:t,colDef:e.current.getColumn(t)})),[e]),n=U.useCallback(((...t)=>e.current.getCellValue(...t)),[e]),r=U.useCallback((t=>{const r=e.current.getRow(t);if(!r)throw new Error(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:r,getValue:n}}),[e,n]),o=U.useCallback(((t,r)=>{const o=e.current.getRow(t),a=e.current.getRowNode(t);if(!o||!a)throw new Error(`No row with id #${t} found`);const i=lW(e),s=dW(e);return{id:t,field:r,row:o,rowNode:a,value:o[r],colDef:e.current.getColumn(r),cellMode:e.current.getCellMode(t,r),getValue:n,api:e.current,hasFocus:null!==i&&i.field===r&&i.id===t,tabIndex:s&&s.field===r&&s.id===t?0:-1}}),[e,n]),a=U.useCallback(((t,r)=>{const o=e.current.getColumn(r),a=e.current.getCellValue(t,r),i=e.current.getRow(t),s=e.current.getRowNode(t);if(!i||!s)throw new Error(`No row with id #${t} found`);const l=lW(e),u=dW(e),c={id:t,field:r,row:i,rowNode:s,colDef:o,cellMode:e.current.getCellMode(t,r),getValue:n,hasFocus:null!==l&&l.field===r&&l.id===t,tabIndex:u&&u.field===r&&u.id===t?0:-1,value:a,formattedValue:a};return o&&o.valueFormatter&&(c.formattedValue=o.valueFormatter({id:t,field:c.field,value:c.value,api:e.current})),c.isEditable=o&&e.current.isCellEditable(c),c}),[e,n]),i=U.useCallback(((t,n)=>{const r=e.current.getColumn(n);if(!r||!r.valueGetter){const r=e.current.getRow(t);if(!r)throw new Error(`No row with id #${t} found`);return r[n]}return r.valueGetter(o(t,n))}),[e,o]),s=U.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${Dq(t)}"]`)}(e.current.rootElementRef.current,t):null),[e]),l=U.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(jq(t))}(e.current.rootElementRef.current,t):null),[e]),u=U.useCallback(((t,n)=>e.current.rootElementRef.current?function(e,{id:t,field:n}){const r=`${jq(t)} .${NV.cell}[data-field="${Dq(n)}"]`;return e.querySelector(r)}(e.current.rootElementRef.current,{id:t,field:n}):null),[e]);VX(e,{getCellValue:i,getCellParams:a,getCellElement:u,getRowParams:r,getRowElement:l,getColumnHeaderParams:t,getColumnHeaderElement:s})}$V(["MUI: You are calling getValue. This method is deprecated and will be removed in the next major version.","Instead, you can access the data from `params.row`."]);const dQ=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],pQ=(e,t)=>{var n;return Id({},e,{selection:null!=(n=dQ(t.selectionModel))?n:[]})},fQ={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",errorOverlayDefaultLabel:"An error occurred.",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",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelDeleteIconLabel:"Delete",filterPanelLinkOperator:"Logic operator",filterPanelOperators:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",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",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",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",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"},mQ=["sortingOrder"],gQ=U.memo((function(e){const{sortingOrder:t}=e,n=_d(e,mQ),r=AV(),[o]=t,a="asc"===o?r.components.ColumnSortedAscendingIcon:r.components.ColumnSortedDescendingIcon;return a?ee.jsx(a,Id({},n)):null})),hQ=["error","hasError","errorInfo"],bQ=U.forwardRef((function(e,t){const{error:n}=e,r=_d(e,hQ),o=IV(),a=o.current.getLocaleText("errorOverlayDefaultLabel"),i=zV(o,LG);return ee.jsx(Iq,Id({ref:t,sx:{width:"100%",minHeight:2*i}},r,{children:(null==n?void 0:n.message)||a}))})),vQ=U.forwardRef((function(e,t){const n=IV().current.getLocaleText("noResultsOverlayLabel");return ee.jsx(Iq,Id({ref:t},e,{children:n}))})),yQ=Id({},{BooleanCellTrueIcon:HW,BooleanCellFalseIcon:jW,ColumnMenuIcon:DW,OpenFilterButtonIcon:IW,FilterPanelDeleteIcon:jW,ColumnFilteredIcon:_W,ColumnSelectorIcon:OW,ColumnUnsortedIcon:gQ,ColumnSortedAscendingIcon:CW,ColumnSortedDescendingIcon:kW,ColumnResizeIcon:NW,DensityCompactIcon:PW,DensityStandardIcon:LW,DensityComfortableIcon:MW,ExportIcon:UW,MoreActionsIcon:VW,TreeDataCollapseIcon:TW,TreeDataExpandIcon:RW,GroupingCriteriaCollapseIcon:TW,GroupingCriteriaExpandIcon:RW,DetailPanelExpandIcon:FW,DetailPanelCollapseIcon:$W,RowReorderIcon:zW,QuickFilterIcon:AW,QuickFilterClearIcon:jW},{BaseCheckbox:eR,BaseTextField:vL,BaseFormControl:MT,BaseSelect:sO,BaseSwitch:lP,BaseButton:Ak,BaseTooltip:oN,BasePopper:AE,Cell:function(e){const{align:t,children:n,colIndex:r,cellMode:o,field:a,formattedValue:i,hasFocus:s,height:l,isEditable:u,rowId:c,tabIndex:d,value:p,width:f,className:m,showRightBorder:g,colSpan:h,disableDragEvents:b,onClick:v,onDoubleClick:y,onMouseDown:w,onMouseUp:S,onKeyDown:x,onDragEnter:E,onDragOver:C}=e,k=_d(e,fW),R=null==i?p:i,T=U.useRef(null),I=U.useRef(null),_=IV(),A=(e=>{const{align:t,showRightBorder:n,isEditable:r,classes:o}=e;return eb({root:["cell",`cell--text${cm(t)}`,r&&"cell--editable",n&&"withBorder"],content:["cellContent"]},OV,o)})({align:t,showRightBorder:g,isEditable:u,classes:AV().classes}),O=U.useCallback((e=>t=>{const n=_.current.getCellParams(c,a||"");_.current.publishEvent(e,n,t),S&&S(t)}),[_,a,S,c]),N=U.useCallback((e=>t=>{const n=_.current.getCellParams(c,a||"");_.current.publishEvent(e,n,t),w&&w(t)}),[_,a,w,c]),P=U.useCallback(((e,t)=>n=>{if(!n.currentTarget.contains(n.target))return;if(!_.current.getRow(c))return;const r=_.current.getCellParams(c,a||"");_.current.publishEvent(e,r,n),t&&t(n)}),[_,a,c]),L={minWidth:f,maxWidth:f,minHeight:l,maxHeight:"auto"===l?"none":l};U.useEffect((()=>{if(!s||o===XG.Edit)return;const e=Rh(_.current.rootElementRef.current);if(T.current&&!T.current.contains(e.activeElement)){const e=T.current.querySelector('[tabindex="0"]'),t=I.current||e||T.current;if(void 0===mW&&document.createElement("div").focus({get preventScroll(){return mW=!0,!1}}),mW)t.focus({preventScroll:!0});else{const e=_.current.getScrollPosition();t.focus(),_.current.scroll(e)}}}),[s,o,_]);let M=k.onFocus;const D="actions"===_.current.getColumn(a).type,j=b?null:{onDragEnter:P("cellDragEnter",E),onDragOver:P("cellDragOver",C)};return ee.jsx("div",Id({ref:T,className:KG(m,A.root),role:"cell","data-field":a,"data-colindex":r,"aria-colindex":r+1,"aria-colspan":h,style:L,tabIndex:"view"!==o&&u||D?-1:d,onClick:P("cellClick",v),onDoubleClick:P("cellDoubleClick",y),onMouseDown:N("cellMouseDown"),onMouseUp:O("cellMouseUp"),onKeyDown:P("cellKeyDown",x)},j,k,{onFocus:M,children:(()=>{if(null==n){const e=null==R?void 0:R.toString();return ee.jsx("div",{title:e,className:A.content,children:e})}return U.isValidElement(n)&&D?U.cloneElement(n,{focusElementRef:I}):n})()}))},SkeletonCell:function(e){const{align:t,width:n,contentWidth:r}=e,o=_d(e,yq),a=(e=>{const{align:t,classes:n}=e;return eb({root:["cell","cellSkeleton",`cell--text${cm(t)}`]},OV,n)})({classes:AV().classes,align:t});return ee.jsx("div",Id({className:a.root,style:{width:n}},o,{children:ee.jsx(yO,{width:`${r}%`})}))},ColumnHeaderFilterIconButton:function(e){var t;const{counter:n,field:r,onClick:o}=e,a=IV(),i=AV(),s=(e=>{const{classes:t}=e;return eb({icon:["filterIcon"]},OV,t)})(Id({},e,{classes:i.classes})),l=U.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:n}=Xq(a.current.state);t&&n===Zq.filters?a.current.hideFilterPanel():a.current.showFilterPanel(),o&&o(a.current.getColumnHeaderParams(r),e)}),[a,r,o]);if(!n)return null;const u=ee.jsx(Uw,{onClick:l,color:"default","aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,children:ee.jsx(i.components.ColumnFilteredIcon,{className:s.icon,fontSize:"small"})});return ee.jsx(i.components.BaseTooltip,Id({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(n),enterDelay:1e3},null==(t=i.componentsProps)?void 0:t.baseTooltip,{children:ee.jsxs(Oq,{children:[n>1&&ee.jsx(rk,{badgeContent:n,color:"default",children:u}),1===n&&u]})}))},ColumnMenu:hY,ErrorOverlay:bQ,Footer:gX,Header:hX,Toolbar:null,PreferencesPanel:HY,LoadingOverlay:bX,NoResultsOverlay:vQ,NoRowsOverlay:vX,Pagination:wX,FilterPanel:rX,ColumnsPanel:function(e){var t,n,r;const o=IV(),a=U.useRef(null),i=zV(o,dG),s=zV(o,pG),l=AV(),[u,c]=U.useState(""),d=(e=>{const{classes:t}=e;return eb({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},OV,t)})(l),{sort:p,searchPredicate:f=jY,autoFocusSearchField:m=!0}=e,g=_d(e,PY),h=U.useMemo((()=>{switch(p){case"asc":return[...i].sort(((e,t)=>DY.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...i].sort(((e,t)=>-DY.compare(e.headerName||e.field,t.headerName||t.field)));default:return i}}),[i,p]),b=e=>{const{name:t}=e.target;o.current.setColumnVisibility(t,!1===s[t])},v=U.useCallback((e=>{if(o.current.unstable_caches.columns.isUsingColumnVisibilityModel){const t=Id({},pG(o));return i.forEach((n=>{n.hideable&&(e?delete t[n.field]:t[n.field]=!1)})),o.current.setColumnVisibilityModel(t)}return o.current.updateColumns(i.map((t=>!1!==t.hideable?{field:t.field,hide:!e}:t)))}),[o,i]),y=U.useCallback((e=>{c(e.target.value)}),[]),w=U.useMemo((()=>{if(!u)return h;const e=u.toLowerCase();return h.filter((t=>f(t,e)))}),[h,u,f]),S=U.useRef(null);U.useEffect((()=>{m?a.current.focus():S.current&&"function"==typeof S.current.focus&&S.current.focus()}),[m]);let x=!1;const E=e=>!1===x&&!1!==e.hideable&&(x=!0,!0);return ee.jsxs(NY,Id({},g,{children:[ee.jsx(IY,{children:ee.jsx(l.components.BaseTextField,Id({label:o.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:o.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:a,value:u,onChange:y,variant:"standard",fullWidth:!0},null==(t=l.componentsProps)?void 0:t.baseTextField))}),ee.jsx(wY,{children:ee.jsx(LY,{className:d.root,ownerState:l,children:w.map((e=>{var t;return ee.jsxs(MY,{className:d.columnsPanelRow,ownerState:l,children:[ee.jsx(HT,{control:ee.jsx(l.components.BaseSwitch,Id({disabled:!1===e.hideable,checked:!1!==s[e.field],onClick:b,name:e.field,size:"small",inputRef:E(e)?S:void 0},null==(t=l.componentsProps)?void 0:t.baseSwitch)),label:e.headerName||e.field}),!l.disableColumnReorder&&false]},e.field)}))})}),ee.jsxs(CY,{children:[ee.jsx(l.components.BaseButton,Id({onClick:()=>v(!1)},null==(n=l.componentsProps)?void 0:n.baseButton,{children:o.current.getLocaleText("columnsPanelHideAllButton")})),ee.jsx(l.components.BaseButton,Id({onClick:()=>v(!0)},null==(r=l.componentsProps)?void 0:r.baseButton,{children:o.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))},Panel:UY,Row:TX}),wQ=(e,t)=>{const n=(e=>{const{classes:t}=e;return U.useMemo((()=>eb({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},OV,t)),[t])})({classes:t.classes}),r=U.useCallback((r=>{const o=Id({},BK,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,i=null!=r.lookup[$K];return a&&!i?(r.lookup[$K]=o,r.all=[$K,...r.all]):!a&&i?(delete r.lookup[$K],r.all=r.all.filter((e=>e!==$K))):a&&i&&(r.lookup[$K]=Id({},o,r.lookup[$K])),r}),[e,n,t.checkboxSelection]);YX(e,"hydrateColumns",r)},SQ=(e,t)=>{var n,r,o,a;const i=null!=(n=null!=(r=t.sortModel)?r:null==(o=t.initialState)||null==(a=o.sorting)?void 0:a.sortModel)?n:[];return Id({},e,{sorting:{sortModel:vK(i,t.disableMultipleColumnsSorting),sortedRows:[]}})};function xQ(e){const{clientHeight:t,scrollTop:n,offsetHeight:r,offsetTop:o}=e,a=o+r;return r>t?o:a-t>n?a-t:oId({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}}),CQ=e=>{var t,n;const r=tZ(void 0,e);((e,t)=>{var n;const r=U.useCallback((e=>{var n;if(null==(n=t.experimentalFeatures)||!n.columnGrouping)return e;const r=dZ(t.columnGroupingModel);return e.all.forEach((t=>{var n,o;const a=null!=(n=r[t])?n:[],i=e.lookup[t];(function(e){return void 0!==e.groupPath})(i)&&IK(a,null==i?void 0:i.groupPath)||(e.lookup[t]=Id({},e.lookup[t],{groupPath:null!=(o=r[t])?o:[]}))})),e}),[t.columnGroupingModel,null==(n=t.experimentalFeatures)?void 0:n.columnGrouping]);YX(e,"hydrateColumns",r)})(r,e),wQ(r,e),(e=>{ZX(e,QX,"rowTreeCreation",uQ)})(r),nZ(pQ,r,e),nZ(sZ,r,e),nZ(fZ,r,e),nZ(lQ,r,e),nZ(null!=(t=e.experimentalFeatures)&&t.newEditingApi?iQ:QZ,r,e),nZ($Z,r,e),nZ(SQ,r,e),nZ(KZ,r,e),nZ(FZ,r,e),nZ(gZ,r,e),nZ(WZ,r,e),nZ(EQ,r,e),nZ(iZ,r,e),BZ(r,e),((e,t)=>{const n=UG(e,"useGridSelection"),r=U.useMemo((()=>dQ(t.selectionModel,tK(e.current.state))),[e,t.selectionModel]),o=U.useRef(null);e.current.unstable_registerControlState({stateId:"selection",propModel:r,propOnChange:t.onSelectionModelChange,stateSelector:tK,changeEvent:"selectionChange"});const{checkboxSelection:a,disableMultipleSelection:i,disableSelectionOnClick:s,pagination:l,paginationMode:u,isRowSelectable:c}=t,d=!i||a,p=xX(e,t),f=U.useCallback((t=>{var n;let r=t;const a=null!=(n=o.current)?n:t,i=e.current.isRowSelected(t);if(i){const t=CG(e),n=t.findIndex((e=>e===a)),o=t.findIndex((e=>e===r));if(n===o)return;r=n>o?t[o+1]:t[o-1]}o.current=t,e.current.selectRowRange({startId:a,endId:r},!i)}),[e]),m=U.useCallback((t=>{tK(e.current.state)!==t&&(n.debug("Setting selection model"),e.current.setState((e=>Id({},e,{selection:t}))),e.current.forceUpdate())}),[e,n]),g=U.useCallback((t=>tK(e.current.state).includes(t)),[e]),h=U.useCallback((t=>{if(c&&!c(e.current.getRowParams(t)))return!1;const n=e.current.getRowNode(t);return!("footer"===(null==n?void 0:n.position)||null!=n&&n.isPinned)}),[e,c]),b=U.useCallback((()=>rK(e)),[e]),v=U.useCallback(((t,r=!0,a=!1)=>{if(e.current.isRowSelectable(t))if(o.current=t,a)n.debug(`Setting selection for row ${t}`),e.current.setSelectionModel(r?[t]:[]);else{n.debug(`Toggling selection for row ${t}`);const o=tK(e.current.state).filter((e=>e!==t));r&&o.push(t),(o.length<2||d)&&e.current.setSelectionModel(o)}}),[e,n,d]),y=U.useCallback(((t,r=!0,o=!1)=>{n.debug("Setting selection for several rows");const a=t.filter((t=>e.current.isRowSelectable(t)));let i;if(o)i=r?a:[];else{const t=Id({},oK(e));a.forEach((e=>{r?t[e]=e:delete t[e]})),i=Object.values(t)}(i.length<2||d)&&e.current.setSelectionModel(i)}),[e,n,d]),w=U.useCallback((({startId:t,endId:r},o=!0,a)=>{if(!e.current.getRow(t)||!e.current.getRow(r))return;n.debug(`Expanding selection from row ${t} to row ${r}`);const i=CG(e),s=i.indexOf(t),l=i.indexOf(r),[u,c]=s>l?[l,s]:[s,l],d=i.slice(u,c+1);e.current.selectRows(d,o,a)}),[e,n]);VX(e,{selectRow:v,selectRows:y,selectRowRange:w,setSelectionModel:m,getSelectedRows:b,isRowSelected:g,isRowSelectable:h});const S=U.useCallback((()=>{if(t.keepNonExistentRowsSelected)return;const n=tK(e.current.state),r=KV(e),o=Id({},oK(e));let a=!1;n.forEach((e=>{r[e]||(delete o[e],a=!0)})),a&&e.current.setSelectionModel(Object.values(o))}),[e,t.keepNonExistentRowsSelected]),x=U.useCallback(((t,n)=>{const r=n.metaKey||n.ctrlKey,o=!a&&!r&&!cq(n),i=!d||o,s=e.current.isRowSelected(t);i?e.current.selectRow(t,!!o||!s,!0):e.current.selectRow(t,!s,!1)}),[e,d,a]),E=U.useCallback(((t,n)=>{var r;if(s)return;const o=null==(r=n.target.closest(`.${NV.cell}`))?void 0:r.getAttribute("data-field");o!==BK.field&&o!==EX&&(o&&e.current.getColumn(o).type===LK||e.current.getRowNode(t.id).isPinned||(n.shiftKey&&(d||a)?f(t.id):x(t.id,n)))}),[s,d,a,e,f,x]),C=U.useCallback(((e,t)=>{var n;d&&t.shiftKey&&(null==(n=window.getSelection())||n.removeAllRanges())}),[d]),k=U.useCallback(((t,n)=>{n.nativeEvent.shiftKey?f(t.id):e.current.selectRow(t.id,t.value)}),[e,f]),R=U.useCallback((n=>{const r=t.checkboxSelectionVisibleOnly&&t.pagination?cK(e):CG(e);e.current.selectRows(r,n.value)}),[e,t.checkboxSelectionVisibleOnly,t.pagination]),T=U.useCallback(((t,n)=>{if(e.current.getCellMode(t.id,t.field)!==XG.Edit&&n.currentTarget.contains(n.target)){if(uq(n.key)&&n.shiftKey){const r=lW(e);if(r&&r.id!==t.id){n.preventDefault();const o=e.current.isRowSelected(r.id);if(!d)return void e.current.selectRow(r.id,!o,!0);const a=e.current.getRowIndexRelativeToVisibleRows(r.id),i=e.current.getRowIndexRelativeToVisibleRows(t.id);let s,l;a>i?o?(s=i,l=a-1):(s=i,l=a):o?(s=a+1,l=i):(s=a,l=i);const u=p.rows.slice(s,l+1).map((e=>e.id));return void e.current.selectRows(u,!o)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void x(t.id,n);"a"===n.key.toLowerCase()&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),y(e.current.getAllRowIds(),!0))}}),[e,x,y,p.rows,d]);NX(e,"sortedRowsSet",S),NX(e,"rowClick",E),NX(e,"rowSelectionCheckboxChange",k),NX(e,"headerSelectionCheckboxChange",R),NX(e,"cellMouseDown",C),NX(e,"cellKeyDown",T),U.useEffect((()=>{void 0!==r&&e.current.setSelectionModel(r)}),[e,r]);const I=null!=r;U.useEffect((()=>{if(I)return;const t=tK(e.current.state);if(h){const n=t.filter((e=>h(e)));n.length{const t=tK(e.current.state);if(!d&&t.length>1){const{rows:n}=SX(e,{pagination:l,paginationMode:u}),r=n.reduce(((e,{id:t})=>(e[t]=!0,e)),{}),o=t.find((e=>{let t=!0;return h&&(t=h(e)),t&&r[e]}));e.current.setSelectionModel(void 0!==o?[o]:[])}}),[e,d,a,i,h,l,u])})(r,e),function(e,t){var n,r;const o=UG(e,"useGridColumns"),a=U.useMemo((()=>lY(t.columnTypes)),[t.columnTypes]),i=U.useRef(t.columns),s=U.useRef(a);e.current.unstable_registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:pG,changeEvent:"columnVisibilityModelChange"});const l=U.useCallback((t=>{o.debug("Updating columns state."),e.current.setState(dY(t)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",t.all)}),[o,e]),u=U.useCallback((t=>cG(e)[t]),[e]),c=U.useCallback((()=>dG(e)),[e]),d=U.useCallback((()=>fG(e)),[e]),p=U.useCallback((()=>vG(e)),[e]),f=U.useCallback(((t,n=!0)=>(n?fG(e):dG(e)).findIndex((e=>e.field===t))),[e]),m=U.useCallback((t=>{const n=f(t);return mG(e)[n]}),[e,f]),g=U.useCallback((t=>{pG(e)!==t&&(e.current.setState((n=>Id({},n,{columns:cY({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!1,currentColumnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),e.current.forceUpdate())}),[e,a]),h=U.useCallback((t=>{const n=cY({apiRef:e,columnTypes:a,columnsToUpsert:t,initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!0,keepOnlyColumnsToUpsert:!1});l(n)}),[e,l,a]),b=U.useCallback((t=>e.current.updateColumns([t])),[e]),v=U.useCallback(((t,n)=>{if(e.current.unstable_caches.columns.isUsingColumnVisibilityModel){var r;const o=pG(e);if(n!==(null==(r=o[t])||r)){const r=Id({},o,{[t]:n});e.current.setColumnVisibilityModel(r)}}else{const r=Id({},e.current.getColumn(t),{hide:!n});e.current.updateColumns([r]);const o={field:t,colDef:r,isVisible:n};e.current.publishEvent("columnVisibilityChange",o)}}),[e]),y=U.useCallback(((t,n)=>{const r=uG(e),a=r.findIndex((e=>e===t));if(a===n)return;o.debug(`Moving column ${t} to index ${n}`);const i=[...r],s=i.splice(a,1)[0];i.splice(n,0,s),l(Id({},lG(e.current.state),{all:i}));const u={field:t,element:e.current.getColumnHeaderElement(t),colDef:e.current.getColumn(t),targetIndex:n,oldIndex:a};e.current.publishEvent("columnOrderChange",u)}),[e,o,l]),w=U.useCallback(((t,n)=>{o.debug(`Updating column ${t} width to ${n}`);const r=Id({},e.current.getColumn(t),{width:n});e.current.updateColumns([r]),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:r,width:n})}),[e,o]);VX(e,{getColumn:u,getAllColumns:c,getColumnIndex:f,getColumnPosition:m,getVisibleColumns:d,getColumnsMeta:p,updateColumn:b,updateColumns:h,setColumnVisibilityModel:g,setColumnVisibility:v,setColumnIndex:y,setColumnWidth:w});const S=U.useCallback(((n,r)=>{const o={};if(e.current.unstable_caches.columns.isUsingColumnVisibilityModel){var a,i,s;const n=pG(e);(!r.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(null!=(a=null==(i=t.initialState)||null==(s=i.columns)?void 0:s.columnVisibilityModel)?a:{}).length>0||Object.keys(n).length>0)&&(o.columnVisibilityModel=n)}o.orderedFields=uG(e);const l=dG(e),u={};return l.forEach((e=>{if(e.hasBeenResized){const t={};sY.forEach((n=>{let r=e[n];r===1/0&&(r=-1),t[n]=r})),u[e.field]=t}})),Object.keys(u).length>0&&(o.dimensions=u),Id({},n,{columns:o})}),[e,t.columnVisibilityModel,null==(n=t.initialState)?void 0:n.columns]),x=U.useCallback(((t,n)=>{var r;const o=e.current.unstable_caches.columns.isUsingColumnVisibilityModel?null==(r=n.stateToRestore.columns)?void 0:r.columnVisibilityModel:void 0,i=n.stateToRestore.columns;if(null==o&&null==i)return t;const s=cY({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:i,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,currentColumnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(dY(s)),null!=i&&e.current.publishEvent("columnsChange",s.all),t}),[e,a]),E=U.useCallback(((e,n)=>{if(n===Zq.columns){var r;const e=t.components.ColumnsPanel;return ee.jsx(e,Id({},null==(r=t.componentsProps)?void 0:r.columnsPanel))}return e}),[t.components.ColumnsPanel,null==(r=t.componentsProps)?void 0:r.columnsPanel]);YX(e,"exportState",S),YX(e,"restoreState",x),YX(e,"preferencePanel",E);const C=U.useRef(null);NX(e,"viewportInnerSizeChange",(t=>{C.current!==t.width&&(C.current=t.width,l(uY(lG(e.current.state),t.width)))})),LX(e,"columnVisibilityChange",t.onColumnVisibilityChange);const k=U.useCallback((()=>{o.info("Columns pipe processing have changed, regenerating the columns");const t=cY({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,keepOnlyColumnsToUpsert:!1});l(t)}),[e,o,l,a]);XX(e,"hydrateColumns",k);const R=U.useRef(!0);U.useEffect((()=>{if(R.current)return void(R.current=!1);if(o.info(`GridColumns have changed, new length ${t.columns.length}`),i.current===t.columns&&s.current===a)return;const n=cY({apiRef:e,columnTypes:a,initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});i.current=t.columns,s.current=a,l(n)}),[o,e,l,t.columns,a]),U.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,o,t.columnVisibilityModel])}(r,e),((e,t)=>{const n=UG(e,"useGridRows"),r=xX(e,t),o=U.useRef(Date.now()),a=U.useRef(null),i=U.useCallback((t=>{var n;return null!=(n=KV(e)[t])?n:null}),[e]),s=U.useMemo((()=>r.rows.reduce(((e,{id:t},n)=>(e[t]=n,e)),{})),[r.rows]),l=U.useCallback(((n,r)=>{const i=()=>{a.current=null,o.current=Date.now(),e.current.setState((n=>Id({},n,{rows:RZ({apiRef:e,previousTree:XV(e),rowCountProp:t.rowCount,loadingProp:t.loading})}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(a.current&&(clearTimeout(a.current),a.current=null),e.current.unstable_caches.rows=n,!r)return void i();const s=t.throttleRowsMs-(Date.now()-o.current);s>0?a.current=setTimeout(i,s):i()}),[t.throttleRowsMs,t.rowCount,t.loading,e]),u=U.useCallback((r=>{n.debug(`Updating all rows, new length ${r.length}`);const o=kZ({rows:r,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),a=e.current.unstable_caches.rows;o.rowsBeforePartialUpdates=a.rowsBeforePartialUpdates,l(o,!0)}),[n,t.getRowId,t.loading,t.rowCount,l,e]),c=U.useCallback((n=>{if(t.signature===AX.DataGrid&&n.length>1)throw new Error(["MUI: You can't 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"));const r=new Map;n.forEach((e=>{const n=CZ(e,t.getRowId,"A row was provided without id when calling updateRows():");r.has(n)?r.set(n,Id({},r.get(n),e)):r.set(n,e)}));const o=[],a=e.current.unstable_caches.rows,i={rowsBeforePartialUpdates:a.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:a.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:a.rowCountPropBeforePartialUpdates,idRowsLookup:Id({},a.idRowsLookup),idToIdLookup:Id({},a.idToIdLookup),ids:[...a.ids]};r.forEach(((t,n)=>"delete"===t._action?(delete i.idRowsLookup[n],delete i.idToIdLookup[n],void o.push(n)):e.current.getRow(n)?void(i.idRowsLookup[n]=Id({},e.current.getRow(n),t)):(i.idRowsLookup[n]=t,i.idToIdLookup[n]=n,void i.ids.push(n)))),o.length>0&&(i.ids=i.ids.filter((e=>!o.includes(e)))),l(i,!0)}),[t.signature,t.getRowId,l,e]),d=U.useCallback((()=>{const t=JV(e),n=KV(e);return new Map(t.map((e=>[e,n[e]])))}),[e]),p=U.useCallback((()=>GV(e)),[e]),f=U.useCallback((()=>JV(e)),[e]),m=U.useCallback((e=>s[e]),[s]),g=U.useCallback(((t,n)=>{const r=e.current.getRowNode(t);if(!r)throw new Error(`MUI: No row with id #${t} found`);const o=Id({},r,{childrenExpanded:n});e.current.setState((e=>Id({},e,{rows:Id({},e.rows,{tree:Id({},e.rows.tree,{[t]:o})})}))),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",o)}),[e]),h=U.useCallback((t=>{var n;return null!=(n=XV(e)[t])?n:null}),[e]),b=U.useCallback((({skipAutoGeneratedRows:t=!0,groupId:n,applySorting:r,applyFiltering:o})=>{const a=XV(e);let i;if(r){const r=a[n];if(!r)return[];const o=oG(e);i=[];const s=o.findIndex((e=>e===n))+1;for(let e=s;er.depth;e+=1){const n=o[e],r=a[n];t&&r.isAutoGenerated||i.push(n)}}else i=TZ(a,n,t);if(o){const t=xG(e);i=i.filter((e=>!1!==t[e]))}return i}),[e]),v={getRow:i,getRowModels:d,getRowsCount:p,getAllRowIds:f,setRows:u,setRowIndex:U.useCallback(((t,r)=>{const o=JV(e),a=o.findIndex((e=>e===t));if(-1===a||a===r)return;n.debug(`Moving row ${t} to index ${r}`);const i=[...o];i.splice(r,0,i.splice(a,1)[0]),e.current.setState((e=>Id({},e,{rows:Id({},e.rows,{ids:i})}))),e.current.unstable_caches.rows.ids=i,e.current.publishEvent("rowsSet")}),[e,n]),updateRows:c,setRowChildrenExpansion:g,getRowNode:h,getRowIndexRelativeToVisibleRows:m,getRowGroupChildren:b,unstable_replaceRows:U.useCallback(((n,r)=>{if(t.signature===AX.DataGrid&&r.length>1)throw new Error(["MUI: You can't 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;const o=[...JV(e)],a=KV(e),i=YV(e),s=XV(e),l=Id({},a),u=Id({},i),c=Id({},s),d=r.map((e=>({id:CZ(e,t.getRowId,"A row was provided without id when calling replaceRows()."),model:e})));d.forEach(((e,t)=>{const[r]=o.splice(n+t,1,e.id);delete l[r],delete u[r],delete c[r]})),d.forEach((e=>{const t={id:e.id,parent:null,depth:0,groupingKey:null,groupingField:null};l[e.id]=e.model,u[e.id]=e.id,c[e.id]=t})),e.current.unstable_caches.rows.idRowsLookup=l,e.current.unstable_caches.rows.idToIdLookup=u,e.current.unstable_caches.rows.ids=o,e.current.setState((e=>{const t={idRowsLookup:l,idToIdLookup:u,tree:c,ids:o};return Id({},e,{rows:Id({},e.rows,t,{groupingResponseBeforeRowHydration:Id({},e.rows.groupingResponseBeforeRowHydration,t)})})})),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId])},y=U.useCallback((()=>{let r;n.info("Row grouping pre-processing have changed, regenerating the row tree"),r=e.current.unstable_caches.rows.rowsBeforePartialUpdates===t.rows?e.current.unstable_caches.rows:kZ({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),l(r,!1)}),[n,e,t.rows,t.getRowId,t.loading,t.rowCount,l]),w=U.useCallback((e=>{"rowTreeCreation"===e&&y()}),[y]),S=U.useCallback((()=>{e.current.unstable_getActiveStrategy("rowTree")!==ZV(e)&&y()}),[e,y]);NX(e,"activeStrategyProcessorChange",w),NX(e,"strategyAvailabilityChange",S);const x=U.useCallback((()=>{e.current.setState((t=>Id({},t,{rows:Id({},t.rows,e.current.unstable_applyPipeProcessors("hydrateRows",t.rows.groupingResponseBeforeRowHydration))}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()}),[e]);XX(e,"hydrateRows",x),VX(e,v),U.useEffect((()=>()=>{null!==a.current&&clearTimeout(a.current)}),[]);const E=U.useRef(!0);U.useEffect((()=>{if(E.current)return void(E.current=!1);const r=e.current.unstable_caches.rows.rowsBeforePartialUpdates===t.rows,o=e.current.unstable_caches.rows.loadingPropBeforePartialUpdates===t.loading,a=e.current.unstable_caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(r)return o||(e.current.setState((e=>Id({},e,{rows:Id({},e.rows,{loading:t.loading})}))),e.current.unstable_caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),void(a||(e.current.setState((e=>Id({},e,{rows:Id({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.unstable_caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()));n.debug(`Updating all rows, new length ${t.rows.length}`),l(kZ({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),!1)}),[t.rows,t.rowCount,t.getRowId,t.loading,n,l,e])})(r,e),cQ(r),(e=>{const t=U.useRef({}),n=U.useCallback(((e,n,r)=>{const o=t.current;o[e]||(o[e]={}),o[e][n]=r}),[]),r=U.useCallback(((e,n)=>{var r;return null==(r=t.current[e])?void 0:r[n]}),[]),o=U.useCallback((t=>{const{columnIndex:r,rowId:o,minFirstColumnIndex:a,maxLastColumnIndex:i,columns:s}=t,l=s.length,u=s[r],c="function"==typeof u.colSpan?u.colSpan(e.current.getCellParams(o,u.field)):u.colSpan;if(!c||1===c)return n(o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:u.computedWidth}}),{colSpan:1};let d=u.computedWidth;for(let e=1;e=a&&t{for(let a=t;a1&&(a+=i.colSpan-1)}}),[o]);VX(e,{unstable_getCellColSpanInfo:r,unstable_calculateColSpan:a});const i=U.useCallback((()=>{t.current={}}),[]);NX(e,"columnOrderChange",i)})(r),((e,t)=>{var n;const r=U.useCallback((t=>{var n,r;return null!=(n=null==(r=cG(e)[t])?void 0:r.groupPath)?n:[]}),[e]),o=U.useCallback((()=>lZ(e)),[e]);VX(e,{unstable_getColumnGroupPath:r,unstable_getAllGroupDetails:o});const a=U.useRef(!0);U.useEffect((()=>{var n,r;if(a.current)return void(a.current=!1);if(null==(n=t.experimentalFeatures)||!n.columnGrouping)return;const o=pZ(null!=(r=t.columnGroupingModel)?r:[]);e.current.setState((e=>Id({},e,{columnGrouping:Id({},e.columnGrouping,{lookup:o})})))}),[e,t.columnGroupingModel,null==(n=t.experimentalFeatures)?void 0:n.columnGrouping])})(r,e);return(null!=(n=e.experimentalFeatures)&&n.newEditingApi?sQ:JZ)(r,e),((e,t)=>{const n=UG(e,"useGridFocus"),r=U.useRef(null),o=U.useCallback(((t,n)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),n)}),[e]),a=U.useCallback(((t,r)=>{const a=lW(e);(null==a?void 0:a.id)===t&&(null==a?void 0:a.field)===r||(e.current.setState((e=>(n.debug(`Focusing on cell with id=${t} and field=${r}`),Id({},e,{tabIndex:{cell:{id:t,field:r},columnHeader:null},focus:{cell:{id:t,field:r},columnHeader:null}})))),e.current.forceUpdate(),e.current.getRow(t)&&(a&&o(a,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,r))))}),[e,n,o]),i=U.useCallback(((t,r={})=>{const a=lW(e);o(a,r),e.current.setState((e=>(n.debug(`Focusing on column header with colIndex=${t}`),Id({},e,{tabIndex:{columnHeader:{field:t},cell:null},focus:{columnHeader:{field:t},cell:null}})))),e.current.forceUpdate()}),[e,n,o]),s=U.useCallback(((n,r,o)=>{let a=e.current.getColumnIndex(r),i=e.current.getRowIndexRelativeToVisibleRows(n);const s=fG(e);"right"===o?a+=1:"left"===o?a-=1:i+=1;const l=SX(e,{pagination:t.pagination,paginationMode:t.paginationMode});a>=s.length?(i+=1,i=0&&(a=s.length-1)),i=TK(i,0,l.rows.length-1);const u=l.rows[i],c=e.current.unstable_getCellColSpanInfo(u.id,a);c&&c.spannedByColSpan&&("left"===o||"below"===o?a=c.leftVisibleCellIndex:"right"===o&&(a=c.rightVisibleCellIndex)),a=TK(a,0,s.length-1);const d=s[a];e.current.setCellFocus(u.id,d.field)}),[e,t.pagination,t.paginationMode]),l=U.useCallback((({id:t,field:n})=>{e.current.setCellFocus(t,n)}),[e]),u=U.useCallback(((t,n)=>{"Enter"===n.key||"Tab"===n.key||uq(n.key)||e.current.setCellFocus(t.id,t.field)}),[e]),c=U.useCallback((({field:t},n)=>{n.target===n.currentTarget&&e.current.setColumnHeaderFocus(t,n)}),[e]),d=U.useCallback((()=>{n.debug("Clearing focus"),e.current.setState((e=>Id({},e,{focus:{cell:null,columnHeader:null}})))}),[n,e]),p=U.useCallback((e=>{r.current=e}),[]),f=U.useCallback((t=>{const n=r.current;r.current=null;const a=lW(e);if(!a)return void(n&&e.current.setCellFocus(n.id,n.field));if((null==n?void 0:n.id)===a.id&&(null==n?void 0:n.field)===a.field)return;const i=e.current.getCellElement(a.id,a.field);null!=i&&i.contains(t.target)||(n?e.current.setCellFocus(n.id,n.field):(e.current.setState((e=>Id({},e,{focus:{cell:null,columnHeader:null}}))),e.current.forceUpdate(),o(a,t)))}),[e,o]),m=U.useCallback((t=>{if("view"===t.cellMode)return;const n=lW(e);(null==n?void 0:n.id)===t.id&&(null==n?void 0:n.field)===t.field||e.current.setCellFocus(t.id,t.field)}),[e]),g=U.useCallback((()=>{const t=lW(e);t&&!e.current.getRow(t.id)&&e.current.setState((e=>Id({},e,{focus:{cell:null,columnHeader:null}})))}),[e]);VX(e,{setCellFocus:a,setColumnHeaderFocus:i,unstable_moveFocusToRelativeCell:s}),U.useEffect((()=>{const t=Rh(e.current.rootElementRef.current);return t.addEventListener("click",f),()=>{t.removeEventListener("click",f)}}),[e,f]),NX(e,"columnHeaderBlur",d),NX(e,"cellDoubleClick",l),NX(e,"cellMouseDown",p),NX(e,"cellKeyDown",u),NX(e,"cellModeChange",m),NX(e,"columnHeaderFocus",c),NX(e,"rowsSet",g)})(r,e),((e,t)=>{var n;const r=UG(e,"useGridPreferencesPanel"),o=U.useRef(),a=U.useRef(),i=U.useCallback((()=>{r.debug("Hiding Preferences Panel");const t=Xq(e.current.state);t.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:t.openedPanelValue}),e.current.setState((e=>Id({},e,{preferencePanel:{open:!1}}))),e.current.forceUpdate()}),[e,r]),s=U.useCallback((()=>{a.current=setTimeout((()=>clearTimeout(o.current)),0)}),[]),l=U.useCallback((()=>{o.current=setTimeout(i,100)}),[i]),u=U.useCallback((t=>{r.debug("Opening Preferences Panel"),s(),e.current.setState((e=>Id({},e,{preferencePanel:Id({},e.preferencePanel,{open:!0,openedPanelValue:t})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t}),e.current.forceUpdate()}),[r,s,e]);VX(e,{showPreferences:u,hidePreferences:l});const c=U.useCallback(((n,r)=>{var o;const a=Xq(e.current.state);return!r.exportOnlyDirtyModels||null!=(null==(o=t.initialState)?void 0:o.preferencePanel)||a.open?Id({},n,{preferencePanel:a}):n}),[e,null==(n=t.initialState)?void 0:n.preferencePanel]),d=U.useCallback(((t,n)=>{const r=n.stateToRestore.preferencePanel;return null!=r&&e.current.setState((e=>Id({},e,{preferencePanel:r}))),t}),[e]);YX(e,"exportState",c),YX(e,"restoreState",d),U.useEffect((()=>()=>{clearTimeout(o.current),clearTimeout(a.current)}),[])})(r,e),((e,t)=>{var n,r,o;const a=UG(e,"useGridFilter");e.current.unstable_registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:wG,changeEvent:"filterModelChange"});const i=U.useCallback((()=>{e.current.setState((n=>{const r=wG(n,e.current.instanceId),o=t.filterMode===QG?DZ(r,e):null,a=e.current.unstable_applyStrategyProcessor("filtering",{isRowMatchingFilters:o,filterModel:null!=r?r:lX()});return Id({},n,{filter:Id({},n.filter,a)})})),e.current.publishEvent("filteredRowsSet")}),[t.filterMode,e]),s=U.useCallback((()=>{i(),e.current.forceUpdate()}),[e,i]),l=U.useCallback((t=>{const n=wG(e),r=[...n.items],o=r.findIndex((e=>e.id===t.id));-1===o?r.push(t):r[o]=t,e.current.setFilterModel(Id({},n,{items:r}),"upsertFilterItem")}),[e]),u=U.useCallback((t=>{const n=wG(e),r=[...n.items];t.forEach((e=>{const n=t.findIndex((t=>t.id===e.id));-1===n?r.push(e):r[n]=e})),e.current.setFilterModel(Id({},n,{items:t}),"upsertFilterItems")}),[e]),c=U.useCallback((t=>{const n=wG(e),r=n.items.filter((e=>e.id!==t.id));r.length!==n.items.length&&e.current.setFilterModel(Id({},n,{items:r}),"deleteFilterItem")}),[e]),d=U.useCallback((n=>{if(a.debug("Displaying filter panel"),n){const r=wG(e),o=r.items.filter((t=>{var n;if(void 0!==t.value)return!0;const r=null==(n=e.current.getColumn(t.columnField).filterOperators)?void 0:n.find((e=>e.value===t.operatorValue));return!(void 0===(null==r?void 0:r.requiresFilterValue)||(null==r?void 0:r.requiresFilterValue))}));let a;a=o.find((e=>e.columnField===n))?o:t.disableMultipleColumnsFiltering?[_Z({columnField:n},e)]:[...o,_Z({columnField:n},e)],e.current.setFilterModel(Id({},r,{items:a}))}e.current.showPreferences(Zq.filters)}),[e,a,t.disableMultipleColumnsFiltering]),p=U.useCallback((()=>{a.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,a]),f=U.useCallback((t=>{const n=wG(e);n.linkOperator!==t&&e.current.setFilterModel(Id({},n,{linkOperator:t}),"changeLogicOperator")}),[e]),m=U.useCallback((t=>{const n=wG(e);IK(n.quickFilterValues,t)||e.current.setFilterModel(Id({},n,{quickFilterValues:[...t]}))}),[e]),g=U.useCallback(((n,r)=>{wG(e)!==n&&(a.debug("Setting filter model"),e.current.unstable_updateControlState("filter",LZ(n,t.disableMultipleColumnsFiltering,e),r),e.current.unstable_applyFilters())}),[e,a,t.disableMultipleColumnsFiltering]),h=U.useCallback((()=>{const t=EG(e);return new Map(t.map((e=>[e.id,e.model])))}),[e]);VX(e,{setFilterLinkOperator:f,unstable_applyFilters:s,deleteFilterItem:c,upsertFilterItem:l,upsertFilterItems:u,setFilterModel:g,showFilterPanel:d,hideFilterPanel:p,getVisibleRowModels:h,setQuickFilterValues:m});const b=U.useCallback(((n,r)=>{var o,a;const i=wG(e);return r.exportOnlyDirtyModels&&null==t.filterModel&&null==(null==(o=t.initialState)||null==(a=o.filter)?void 0:a.filterModel)&&IK(i,lX())?n:Id({},n,{filter:{filterModel:i}})}),[e,t.filterModel,null==(n=t.initialState)||null==(r=n.filter)?void 0:r.filterModel]),v=U.useCallback(((n,r)=>{var o;const a=null==(o=r.stateToRestore.filter)?void 0:o.filterModel;return null==a?n:(e.current.unstable_updateControlState("filter",LZ(a,t.disableMultipleColumnsFiltering,e),"restoreState"),Id({},n,{callbacks:[...n.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),y=U.useCallback(((e,n)=>{if(n===Zq.filters){var r;const e=t.components.FilterPanel;return ee.jsx(e,Id({},null==(r=t.componentsProps)?void 0:r.filterPanel))}return e}),[t.components.FilterPanel,null==(o=t.componentsProps)?void 0:o.filterPanel]),w=U.useCallback((n=>{if(t.filterMode===QG&&n.isRowMatchingFilters){const t=JV(e),r={};for(let o=0;o{a.debug("onColUpdated - GridColumns changed, applying filters");const t=wG(e),n=bG(e),r=t.items.filter((e=>e.columnField&&n[e.columnField]));r.length{"filtering"===t&&e.current.unstable_applyFilters()}),[e]);NX(e,"rowsSet",i),NX(e,"rowExpansionChange",e.current.unstable_applyFilters),NX(e,"columnsChange",S),NX(e,"activeStrategyProcessorChange",x),KX((()=>{e.current.unstable_applyFilters()})),U.useEffect((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,a,t.filterModel])})(r,e),((e,t)=>{var n,r;const o=UG(e,"useGridSorting");e.current.unstable_registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:iG,changeEvent:"sortModelChange"});const a=U.useCallback(((t,n)=>{const r=iG(e),o=r.findIndex((e=>e.field===t));let a=[...r];return o>-1?n?a.splice(o,1,n):a.splice(o,1):a=[...r,n],a}),[e]),i=U.useCallback(((n,r)=>{var o;const a=iG(e).find((e=>e.field===n.field));if(a){var i;const e=void 0===r?wK(null!=(i=n.sortingOrder)?i:t.sortingOrder,a.sort):r;return null==e?void 0:Id({},a,{sort:e})}return{field:n.field,sort:void 0===r?wK(null!=(o=n.sortingOrder)?o:t.sortingOrder):r}}),[e,t.sortingOrder]),s=U.useCallback((()=>{e.current.setState((n=>{if(t.sortingMode===JG)return o.debug("Skipping sorting rows as sortingMode = server"),Id({},n,{sorting:Id({},n.sorting,{sortedRows:JV(n,e.current.instanceId)})});const r=((e,t)=>{const n=e.map((e=>((e,t)=>{const n=t.current.getColumn(e.field);return n?{getSortCellParams:e=>({id:e,field:n.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,n.field),api:t.current}),comparator:"desc"===e.sort?(...e)=>-1*n.sortComparator(...e):n.sortComparator}: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 r=e,o=t,n.reduce(((e,t,n)=>{if(0!==e)return e;const a=r.params[n],i=o.params[n];return t.comparator(a.value,i.value,a,i)}),0);var r,o})).map((e=>e.node.id))})(iG(n,e.current.instanceId),e),a=e.current.unstable_applyStrategyProcessor("sorting",{sortRowList:r});return Id({},n,{sorting:Id({},n.sorting,{sortedRows:a})})})),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()}),[e,o,t.sortingMode]),l=U.useCallback((n=>{iG(e)!==n&&(o.debug("Setting sort model"),e.current.setState(yK(n,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())}),[e,o,t.disableMultipleColumnsSorting]),u=U.useCallback(((n,r,o)=>{if(!n.sortable)return;const s=i(n,r);let l;l=!o||t.disableMultipleColumnsSorting?s?[s]:[]:a(n.field,s),e.current.setSortModel(l)}),[e,a,i,t.disableMultipleColumnsSorting]),c=U.useCallback((()=>iG(e)),[e]),d=U.useCallback((()=>aG(e).map((e=>e.model))),[e]),p=U.useCallback((()=>oG(e)),[e]),f=U.useCallback((t=>e.current.getSortedRowIds().indexOf(t)),[e]),m=U.useCallback((t=>e.current.getSortedRowIds()[t]),[e]);VX(e,{getSortModel:c,getSortedRows:d,getSortedRowIds:p,getRowIndex:f,getRowIdFromRowIndex:m,setSortModel:l,sortColumn:u,applySorting:s});const g=U.useCallback(((n,r)=>{var o,a;const i=iG(e);return!r.exportOnlyDirtyModels||null!=t.sortModel||null!=(null==(o=t.initialState)||null==(a=o.sorting)?void 0:a.sortModel)||i.length>0?Id({},n,{sorting:{sortModel:i}}):n}),[e,t.sortModel,null==(n=t.initialState)||null==(r=n.sorting)?void 0:r.sortModel]),h=U.useCallback(((n,r)=>{var o;const a=null==(o=r.stateToRestore.sorting)?void 0:o.sortModel;return null==a?n:(e.current.setState(yK(a,t.disableMultipleColumnsSorting)),Id({},n,{callbacks:[...n.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),b=U.useCallback((t=>{const n=XV(e);if(!t.sortRowList){const t=[],r=[];return JV(e).forEach((e=>{n[e].isPinned||("footer"===n[e].position?r.push(e):t.push(e))})),[...t,...r]}const r=[],o=[];return Object.values(n).forEach((e=>{e.isPinned||("footer"===e.position?o.push(e.id):r.push(e))})),[...t.sortRowList(r),...o]}),[e]);YX(e,"exportState",g),YX(e,"restoreState",h),ZX(e,QX,"sorting",b);const v=U.useCallback((({colDef:e},t)=>{const n=t.shiftKey||t.metaKey||t.ctrlKey;u(e,void 0,n)}),[u]),y=U.useCallback((({colDef:e},t)=>{!tq(t.key)||t.ctrlKey||t.metaKey||u(e,void 0,t.shiftKey)}),[u]),w=U.useCallback((()=>{const t=iG(e),n=cG(e);if(t.length>0){const r=t.filter((e=>n[e.field]));r.length{"sorting"===t&&e.current.applySorting()}),[e]);NX(e,"columnHeaderClick",v),NX(e,"columnHeaderKeyDown",y),NX(e,"rowsSet",e.current.applySorting),NX(e,"columnsChange",w),NX(e,"activeStrategyProcessorChange",S),KX((()=>{e.current.applySorting()})),U.useEffect((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(r,e),((e,t)=>{const n=zV(e,fG),r=n.length>0?Math.max(...n.map((e=>{var t,n;return null!=(t=null==(n=e.groupPath)?void 0:n.length)?t:0}))):0,o=UG(e,"useDensity"),a=U.useCallback(((n,a=t.headerHeight,i=t.rowHeight,s=r)=>{o.debug(`Set grid density to ${n}`),e.current.setState((e=>{const t=NG(e),r=mZ(n,a,i,s);return IK(t,r)?e:Id({},e,{density:r})})),e.current.forceUpdate()}),[o,e,t.headerHeight,t.rowHeight,r]);U.useEffect((()=>{e.current.setDensity(t.density,t.headerHeight,t.rowHeight,r)}),[e,t.density,t.rowHeight,t.headerHeight,r]),VX(e,{setDensity:a})})(r,e),qZ(r,e),((e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,a=U.useRef({}),i=U.useRef(-1),s=U.useRef(!1),l=zV(e,LG),u=zV(e,yG),c=zV(e,aK),d=zV(e,rG),p=xX(e,t),f=zV(e,tG),m=U.useCallback((()=>{var t,u;s.current=!1;const c=jG(e.current.state,e.current.instanceId),d=t=>{a.current[t.id]||(a.current[t.id]={sizes:{baseCenter:l},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:i,needsFirstMeasurement:u,sizes:d}=a.current[t.id];let f=l;const m=d.baseCenter;if(i)f=m;else if(n){const e=n(Id({},t,{densityFactor:c}));if("auto"===e){if(u){const e=o?o(Id({},t,{densityFactor:c})):l;f=null!=e?e:l}else f=m;s.current=!0,a.current[t.id].autoHeight=!0}else f=null!=e?e:l,a.current[t.id].needsFirstMeasurement=!1,a.current[t.id].autoHeight=!1}else a.current[t.id].needsFirstMeasurement=!1;const g=Id({},Object.entries(d).reduce(((e,[t,n])=>(/^base[A-Z]/.test(t)&&(e[t]=n),e)),{}),{baseCenter:f});if(r){var h,b;const n=e.current.getRowIndexRelativeToVisibleRows(t.id),o=r(Id({},t,{isFirstVisible:0===n,isLastVisible:n===p.rows.length-1,indexRelativeToCurrentPage:n}));g.spacingTop=null!=(h=o.top)?h:0,g.spacingBottom=null!=(b=o.bottom)?b:0}const v=e.current.unstable_applyPipeProcessors("rowHeight",g,t);return a.current[t.id].sizes=v,v},m=[],g=p.rows.reduce(((e,t)=>{m.push(e);let n=0,r=0;const o=d(t);return Object.entries(o).forEach((([e,t])=>{/^base[A-Z]/.test(e)?n=t>n?t:n:r+=t})),e+n+r}),0);null==f||null==(t=f.top)||t.forEach((e=>{d(e)})),null==f||null==(u=f.bottom)||u.forEach((e=>{d(e)})),e.current.setState((e=>Id({},e,{rowsMeta:{currentPageTotalHeight:g,positions:m}}))),s.current||(i.current=1/0),e.current.forceUpdate()}),[e,p.rows,l,n,r,o,f]),g=U.useCallback((e=>{const t=a.current[e];return t?t.sizes.baseCenter:l}),[l]),h=U.useCallback(((e,t)=>{a.current[e].sizes.baseCenter=t,a.current[e].isResized=!0,a.current[e].needsFirstMeasurement=!1,m()}),[m]),b=U.useMemo((()=>Ch(m)),[m]),v=U.useCallback(((e,t,n)=>{if(!a.current[e]||!a.current[e].autoHeight)return;const r=a.current[e].sizes[`base${cm(n)}`]!==t;a.current[e].needsFirstMeasurement=!1,a.current[e].sizes[`base${cm(n)}`]=t,r&&b()}),[b]),y=U.useCallback((e=>{var t;return(null==(t=a.current[e])?void 0:t.autoHeight)||!1}),[]),w=U.useCallback((()=>i.current),[]),S=U.useCallback((e=>{s.current&&e>i.current&&(i.current=e)}),[]),x=U.useCallback((()=>{a.current={},m()}),[m]);U.useEffect((()=>{m()}),[l,u,c,d,m]),XX(e,"rowHeight",m),VX(e,{unstable_getLastMeasuredRowIndex:w,unstable_setLastMeasuredRowIndex:S,unstable_rowHasAutoHeight:y,unstable_getRowHeight:g,unstable_getRowInternalSizes:e=>{var t;return null==(t=a.current[e])?void 0:t.sizes},unstable_setRowHeight:h,unstable_storeRowHeightMeasurement:v,resetRowHeights:x})})(r,e),((e,t)=>{const n=UG(e,"useGridScroll"),r=e.current.columnHeadersElementRef,o=e.current.windowRef,a=zV(e,EG),i=U.useCallback((r=>{const i=GV(e),s=fG(e);if(null!=r.rowIndex&&0===i||0===s.length)return!1;n.debug(`Scrolling to cell at row ${r.rowIndex}, col: ${r.colIndex} `);let l={};if(null!=r.colIndex){const t=mG(e);let n;if(void 0!==r.rowIndex){var u;const t=null==(u=a[r.rowIndex])?void 0:u.id,o=e.current.unstable_getCellColSpanInfo(t,r.colIndex);o&&!o.spannedByColSpan&&(n=o.cellProps.width)}void 0===n&&(n=s[r.colIndex].computedWidth),l.left=xQ({clientHeight:o.current.clientWidth,scrollTop:o.current.scrollLeft,offsetHeight:n,offsetTop:t[r.colIndex]})}if(null!=r.rowIndex){var c,d;const n=SZ(e.current.state),a=iK(e),i=sK(e),s=t.pagination?r.rowIndex-a*i:r.rowIndex,u=n.positions[s+1]?n.positions[s+1]-n.positions[s]:n.currentPageTotalHeight-n.positions[s],p=(null==(c=o.current.querySelector(`.${NV["pinnedRows--top"]}`))?void 0:c.clientHeight)||0,f=(null==(d=o.current.querySelector(`.${NV["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;l.top=xQ({clientHeight:o.current.clientHeight-p-f,scrollTop:o.current.scrollTop,offsetHeight:u,offsetTop:n.positions[s]})}return l=e.current.unstable_applyPipeProcessors("scrollToIndexes",l,r),(void 0!==typeof l.left||void 0!==typeof l.top)&&(e.current.scroll(l),!0)}),[n,e,o,t.pagination,a]),s=U.useCallback((e=>{o.current&&null!=e.left&&r.current&&(r.current.scrollLeft=e.left,o.current.scrollLeft=e.left,n.debug(`Scrolling left: ${e.left}`)),o.current&&null!=e.top&&(o.current.scrollTop=e.top,n.debug(`Scrolling top: ${e.top}`)),n.debug("Scrolling, updating container, and viewport")}),[o,r,n]),l=U.useCallback((()=>null!=o&&o.current?{top:o.current.scrollTop,left:o.current.scrollLeft}:{top:0,left:0}),[o]);VX(e,{scroll:s,scrollToIndexes:i,getScrollPosition:l})})(r,e),(e=>{const t=UG(e,"useGridColumnMenu"),n=U.useCallback((n=>{e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===n?e:(t.debug("Opening Column Menu"),Id({},e,{columnMenu:{open:!0,field:n}}))))&&(e.current.hidePreferences(),e.current.forceUpdate())}),[e,t]),r=U.useCallback((()=>{e.current.setState((e=>e.columnMenu.open||void 0!==e.columnMenu.field?(t.debug("Hiding Column Menu"),Id({},e,{columnMenu:Id({},e.columnMenu,{open:!1,field:void 0})})):e))&&e.current.forceUpdate()}),[e,t]),o=U.useCallback((o=>{t.debug("Toggle Column Menu");const a=aZ(e.current.state);a.open&&a.field===o?r():n(o)}),[e,t,n,r]);VX(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o});const a=U.useCallback(((t,n)=>{if(!n.target.classList.contains(NV.menuIconButton))return;if(!n.relatedTarget)return;const r=n.relatedTarget.classList.contains(NV.menuList),o="menuitem"===n.relatedTarget.getAttribute("role");(r||o)&&e.current.setColumnHeaderFocus(t.field)}),[e]);NX(e,"columnResizeStart",r),NX(e,"columnHeaderFocus",a),NX(e,"virtualScrollerWheel",e.current.hideColumnMenu),NX(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(r),wZ(r),xZ(r,e),oZ(r),function(e,t){const n=UG(e,"useResizeContainer"),r=U.useRef(!1),o=U.useRef(null),a=U.useRef(null),i=zV(e,SZ),s=zV(e,FG),l=U.useCallback((()=>{var n;const r=null==(n=e.current.rootElementRef)?void 0:n.current,l=gG(e),u=IZ(e);if(!o.current)return;let c,d,p,f;if(null!=t.scrollbarSize)c=t.scrollbarSize;else if(l&&r){const e=Rh(r).createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.overflow="scroll",e.className="scrollDiv",r.appendChild(e),c=e.offsetWidth-e.clientWidth,r.removeChild(e)}else c=0;if(t.autoHeight)f=!1,p=Math.round(l)>o.current.width,d={width:o.current.width,height:i.currentPageTotalHeight+(p?c:0)};else{d={width:o.current.width,height:o.current.height-s};const e=(({content:e,container:t,scrollBarSize:n})=>{const r=e.width>t.width,o=e.height>t.height;let a=!1,i=!1;return(r||o)&&(a=r,i=e.height+(a?n:0)>t.height,i&&(a=e.width+n>t.width)),{hasScrollX:a,hasScrollY:i}})({content:{width:Math.round(l),height:i.currentPageTotalHeight},container:{width:d.width,height:d.height-u.top-u.bottom},scrollBarSize:c});f=e.hasScrollY,p=e.hasScrollX}const m={viewportOuterSize:d,viewportInnerSize:{width:d.width-(f?c:0),height:d.height-(p?c:0)},hasScrollX:p,hasScrollY:f,scrollBarSize:c},g=a.current;a.current=m,m.viewportInnerSize.width===(null==g?void 0:g.viewportInnerSize.width)&&m.viewportInnerSize.height===(null==g?void 0:g.viewportInnerSize.height)||e.current.publishEvent("viewportInnerSizeChange",m.viewportInnerSize)}),[e,t.scrollbarSize,t.autoHeight,s,i.currentPageTotalHeight]),u=U.useCallback((()=>{l(),e.current.publishEvent("debouncedResize",o.current)}),[e,l]),c=U.useCallback((()=>a.current),[]),d=U.useCallback((()=>{const n=e.current.getRootDimensions();if(!n)return 0;const r=SX(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const t=e.current.unstable_getRenderContext(),n=t.lastRowIndex-t.firstRowIndex;return Math.min(n-1,r.rows.length)}const o=Math.floor(n.viewportInnerSize.height/LG(e));return Math.min(o,r.rows.length)}),[e,t.pagination,t.paginationMode,t.getRowHeight]);VX(e,{resize:u,getRootDimensions:c,unstable_getViewportPageSize:d,unstable_updateGridDimensionsRef:l});const p=U.useMemo((()=>Ch(u,60)),[u]),f=U.useRef(!0),m=U.useCallback((e=>{o.current=e;const a=/jsdom/.test(window.navigator.userAgent);if(0!==e.height||r.current||t.autoHeight||a||(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")),r.current=!0),0!==e.width||r.current||a||(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")),r.current=!0),f.current)return u(),void(f.current=!1);p()}),[t.autoHeight,p,n,u]);ch((()=>l()),[l]),LX(e,"sortedRowsSet",l),LX(e,"pageChange",l),LX(e,"pageSizeChange",l),LX(e,"columnsChange",l),NX(e,"resize",m),LX(e,"debouncedResize",t.onResize)}(r,e),function(e,t){LX(e,"columnHeaderClick",t.onColumnHeaderClick),LX(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),LX(e,"columnHeaderOver",t.onColumnHeaderOver),LX(e,"columnHeaderOut",t.onColumnHeaderOut),LX(e,"columnHeaderEnter",t.onColumnHeaderEnter),LX(e,"columnHeaderLeave",t.onColumnHeaderLeave),LX(e,"columnOrderChange",t.onColumnOrderChange),LX(e,"cellClick",t.onCellClick),LX(e,"cellDoubleClick",t.onCellDoubleClick),LX(e,"cellKeyDown",t.onCellKeyDown),LX(e,"cellFocusOut",t.onCellFocusOut),LX(e,"preferencePanelClose",t.onPreferencePanelClose),LX(e,"preferencePanelOpen",t.onPreferencePanelOpen),LX(e,"menuOpen",t.onMenuOpen),LX(e,"menuClose",t.onMenuClose),LX(e,"rowDoubleClick",t.onRowDoubleClick),LX(e,"rowClick",t.onRowClick),LX(e,"componentError",t.onError),LX(e,"stateChange",t.onStateChange)}(r,e),(e=>{const t=U.useCallback(((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t)),[e]),n=U.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()})),e.current.forceUpdate()}),[e]);VX(e,{exportState:t,restoreState:n})})(r),r},kQ={apiRef:void 0,disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,disableMultipleSelection:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,disableColumnResize:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid"},RQ={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,density:aW.Standard,disableExtendRowFullWidth:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableMultipleColumnsFiltering:!1,disableMultipleSelection:!1,disableMultipleColumnsSorting:!1,disableSelectionOnClick:!1,disableVirtualization:!1,disableIgnoreModificationsIfProcessingProps:!1,editMode:YG.Cell,filterMode:QG,headerHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:QG,rowHeight:52,rowsPerPageOptions:[25,50,100],rowSpacingType:"margin",showCellRightBorder:!1,showColumnRightBorder:!1,sortingOrder:["asc","desc",null],sortingMode:QG,throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1},TQ=["className"],IQ=Wv("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",position:"relative","@media print":{overflow:"hidden"}}),_Q=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,TQ),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["virtualScroller"]},OV,t)})(o);return ee.jsx(IQ,Id({ref:t,className:KG(a.root,n),ownerState:o},r))})),AQ=["className","style"],OQ=Wv("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),NQ=U.forwardRef((function(e,t){const{className:n,style:r}=e,o=_d(e,AQ),a=AV(),i=Id({},a,{overflowedContent:!a.autoHeight&&"auto"===(null==r?void 0:r.minHeight)}),s=(e=>{const{classes:t,overflowedContent:n}=e;return eb({root:["virtualScrollerContent",n&&"virtualScrollerContent--overflowed"]},OV,t)})(i);return ee.jsx(OQ,Id({ref:t,className:KG(s.root,n),ownerState:i,style:r},o))})),PQ=["className"],LQ=Wv("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),MQ=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,PQ),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["virtualScrollerRenderZone"]},OV,t)})(o);return ee.jsx(LQ,Id({ref:t,className:KG(a.root,n),ownerState:o},r))})),DQ=["style"];function jQ(e,t,n=0,r=t.length){if(t.length<=0)return-1;if(n>=r)return n;const o=n+Math.floor((r-n)/2);return e<=t[o]?jQ(e,t,n,o):jQ(e,t,o+1,r)}const FQ=({firstIndex:e,lastIndex:t,buffer:n,minFirstIndex:r,maxLastIndex:o})=>[TK(e-n,r,o),TK(t+n,r,o)],$Q=e=>{var t,n;const r=IV(),o=AV(),a=zV(r,fG),{ref:i,disableVirtualization:s,onRenderZonePositioning:l,renderZoneMinColumnIndex:u=0,renderZoneMaxColumnIndex:c=a.length,getRowProps:d}=e,p=zV(r,mG),f=zV(r,gG),m=zV(r,LG),g=zV(r,lW),h=zV(r,dW),b=zV(r,SZ),v=zV(r,YZ),y=zV(r,oK),w=xX(r,o),S=U.useRef(null),x=U.useRef(null),E=Lh(i,x),[C,k]=U.useState(null),R=U.useRef(C),T=U.useRef({top:0,left:0}),[I,_]=U.useState({width:null,height:null}),A=U.useRef(f),O=U.useCallback((e=>{var t,n;const o=r.current.unstable_getLastMeasuredRowIndex();let a=o===1/0;null!=(t=w.range)&&t.lastRowIndex&&!a&&(a=o>=w.range.lastRowIndex);const i=TK(o-((null==(n=w.range)?void 0:n.firstRowIndex)||0),0,b.positions.length);return a||b.positions[i]>=e?jQ(e,b.positions):function(e,t,n){let r=1;for(;n{if(s)return{firstRowIndex:0,lastRowIndex:w.rows.length,firstColumnIndex:0,lastColumnIndex:a.length};const{top:e,left:t}=T.current,n=Math.min(O(e),b.positions.length-1),i=o.autoHeight?n+w.rows.length:O(e+I.height);let l=!1,u=0,c=p.length;const[d,f]=FQ({firstIndex:n,lastIndex:i,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});for(let o=d;o{s?S.current.style.transform="translate3d(0px, 0px, 0px)":(x.current.scrollLeft=0,x.current.scrollTop=0)}),[s]),ch((()=>{_({width:x.current.clientWidth,height:x.current.clientHeight})}),[b.currentPageTotalHeight]);const P=U.useCallback((e=>{_({width:e.width,height:e.height})}),[]);NX(r,"resize",P);const L=U.useCallback((e=>{const[t,n]=FQ({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer}),[a]=FQ({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:u,maxLastIndex:c,buffer:o.columnBuffer}),i=pY({firstColumnToRender:a,apiRef:r,firstRowToRender:t,lastRowToRender:n,visibleRows:w.rows}),s=SZ(r.current.state).positions[t],d=mG(r)[i];S.current.style.transform=`translate3d(${d}px, ${s}px, 0px)`,"function"==typeof l&&l({top:s,left:d})}),[r,w.rows,l,u,c,o.columnBuffer,o.rowBuffer]),M=U.useCallback((e=>{if(R.current&&(t=e,n=R.current,t===n||t.firstRowIndex===n.firstRowIndex&&t.lastRowIndex===n.lastRowIndex&&t.firstColumnIndex===n.firstColumnIndex&&t.lastColumnIndex===n.lastColumnIndex))return void L(e);var t,n;k(e),L(e);const[a,i]=FQ({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});r.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:a,lastRowToRender:i}),R.current=e}),[r,k,R,w.rows.length,o.rowBuffer,L]);ch((()=>{if(null==I.width)return;const e=N();M(e);const{top:t,left:n}=T.current,o={top:t,left:n,renderContext:e};r.current.publishEvent("rowsScroll",o)}),[r,N,I.width,M]);const D=e=>{const{scrollTop:t,scrollLeft:n}=e.currentTarget;if(T.current.top=t,T.current.left=n,n<0||t<0||!R.current)return;const a=s?R.current:N(),i=Math.abs(a.firstRowIndex-R.current.firstRowIndex),l=Math.abs(a.lastRowIndex-R.current.lastRowIndex),u=Math.abs(a.firstColumnIndex-R.current.firstColumnIndex),c=Math.abs(a.lastColumnIndex-R.current.lastColumnIndex),d=i>=o.rowThreshold||l>=o.rowThreshold||u>=o.columnThreshold||c>=o.columnThreshold||A.current!==f;r.current.publishEvent("rowsScroll",{top:t,left:n,renderContext:d?a:R.current},e),d&&(fd.flushSync((()=>{M(a)})),A.current=f)},j=e=>{r.current.publishEvent("virtualScrollerWheel",{},e)},F=e=>{r.current.publishEvent("virtualScrollerTouchMove",{},e)},$=I.width&&f>I.width,B=U.useMemo((()=>{const e=Math.max(b.currentPageTotalHeight,1);let t=!1;null!=x&&x.current&&e<=(null==x?void 0:x.current.clientHeight)&&(t=!0);const n={width:$?f:"auto",height:e,minHeight:t?"100%":"auto"};return o.autoHeight&&0===w.rows.length&&(n.height=2*m),n}),[x,f,b.currentPageTotalHeight,w.rows.length,$,o.autoHeight,m]);U.useEffect((()=>{r.current.publishEvent("virtualScrollerContentSizeChange")}),[r,B]),o.autoHeight&&0===w.rows.length&&(B.height=2*m);const z={};$||(z.overflowX="hidden"),o.autoHeight&&(z.overflowY="hidden");const H=U.useCallback((()=>R.current),[]);return r.current.unstable_getRenderContext=H,{renderContext:C,updateRenderZonePosition:L,getRows:(e={renderContext:C})=>{const{renderContext:t,minFirstColumn:n=u,maxLastColumn:i=c,availableSpace:l=I.width,rowIndexOffset:p=0,position:f="center"}=e;if(!t||null==l)return null;const m=s?0:o.rowBuffer,b=s?0:o.columnBuffer,[S,x]=FQ({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:m}),E=[];if(e.rows)e.rows.forEach((e=>{E.push(e),r.current.unstable_calculateColSpan({rowId:e.id,minFirstColumn:n,maxLastColumn:i,columns:a})}));else{if(!w.range)return null;for(let e=S;e{let{style:t={}}=e,n=_d(e,DQ);return Id({ref:E,onScroll:D,onWheel:j,onTouchMove:F,style:Id({},t,z)},n)},getContentProps:({style:e={}}={})=>({style:Id({},e,B)}),getRenderZoneProps:()=>({ref:S})}},BQ=["className","disableVirtualization"],zQ=U.forwardRef((function(e,t){const{className:n,disableVirtualization:r}=e,o=_d(e,BQ),{getRootProps:a,getContentProps:i,getRenderZoneProps:s,getRows:l}=$Q({ref:t,disableVirtualization:r});return ee.jsx(_Q,Id({className:n},a(o),{children:ee.jsx(NQ,Id({},i(),{children:ee.jsx(MQ,Id({},s(),{children:l()}))}))}))}));function UQ(e){var t,n;const{groupId:r,width:o,depth:a,maxDepth:i,fields:s,height:l,colIndex:u,isLastColumn:c,extendRowFullWidth:d}=e,p=AV(),f=IV(),m=zV(f,lZ),{hasScrollX:g,hasScrollY:h}=null!=(t=f.current.getRootDimensions())?t:{hasScrollX:!1,hasScrollY:!1},b=r?m[r]:{},{headerName:v=(null!=r?r:""),description:y="",headerAlign:w}=b;let S;const x=r&&(null==(n=m[r])?void 0:n.renderHeaderGroup),E={groupId:r,headerName:v,description:y,depth:a,maxDepth:i,fields:s,colIndex:u,isLastColumn:c};r&&x&&(S=x(E));const C=c?!(c&&g&&!h)&&!d:p.showColumnRightBorder,k=p.showColumnRightBorder,R=Id({},e,{classes:p.classes,showRightBorder:C,showColumnBorder:k,headerAlign:w,depth:a,isDragging:!1}),T=null!=v?v:r,I=Oh(),_=null===r?`empty-group-cell-${I}`:r,A=(e=>{const{classes:t,headerAlign:n,isDragging:r,showRightBorder:o,showColumnBorder:a,groupId:i}=e;return eb({root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",r&&"columnHeader--moving",o&&"withBorder",a&&"columnHeader--showColumnBorder",null===i?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},OV,t)})(R),O="function"==typeof b.headerClassName?b.headerClassName(E):b.headerClassName;return ee.jsx(Kq,{classes:A,columnMenuOpen:!1,colIndex:u,height:l,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:-1,isDraggable:!1,headerComponent:S,headerClassName:O,description:y,elementId:_,width:o,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:T,"aria-colspan":s.length,"data-fields":`|-${s.join("-|-")}-|`,disableHeaderSeparator:!0})}const HQ=Wv("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})((()=>({display:"flex"})));const VQ=["className"],GQ=Wv("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})((({theme:e})=>({position:"absolute",top:0,left:0,right:0,overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:`1px solid ${"light"===e.palette.mode?xh(wh(e.palette.divider,1),.88):Sh(wh(e.palette.divider,1),.68)}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius}))),WQ=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,VQ),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["columnHeaders"]},OV,t)})(o);return ee.jsx(GQ,Id({ref:t,className:KG(n,a.root),ownerState:o},r))})),qQ=["isDragging","className"],KQ=Wv("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${NV.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})((()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${NV.columnHeaderDropZone} .${NV.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${NV["columnHeadersInner--scrollable"]} .${NV.columnHeader}:last-child`]:{borderRight:"none"}}))),YQ=U.forwardRef((function(e,t){var n,r;const{isDragging:o,className:a}=e,i=_d(e,qQ),s=IV(),l=Id({},AV(),{isDragging:o,hasScrollX:null!=(n=null==(r=s.current.getRootDimensions())?void 0:r.hasScrollX)&&n}),u=(e=>{const{isDragging:t,hasScrollX:n,classes:r}=e;return eb({root:["columnHeadersInner",t&&"columnHeaderDropZone",n&&"columnHeadersInner--scrollable"]},OV,r)})(l);return ee.jsx(KQ,Id({ref:t,className:KG(a,u.root),ownerState:l},i))})),XQ=["innerRef","className"],ZQ=U.forwardRef((function(e,t){const{innerRef:n}=e,r=_d(e,XQ),{isDragging:o,getRootProps:a,getInnerProps:i,getColumnHeaders:s,getColumnGroupHeaders:l}=(e=>{const{innerRef:t,minColumnIndex:n=0}=e,[r,o]=U.useState(""),[a,i]=U.useState(""),s=IV(),l=zV(s,fG),u=zV(s,mG),c=zV(s,pW),d=zV(s,dW),p=zV(s,uW),f=zV(s,MG),m=zV(s,DG),g=zV(s,FG),h=zV(s,OG),b=zV(s,sG),v=zV(s,aZ),y=AV(),w=U.useRef(null),S=Lh(t,w),[x,E]=U.useState(null),C=U.useRef(x),k=U.useRef(0),R=xX(s,y);U.useEffect((()=>{s.current.columnHeadersContainerElementRef.current.scrollLeft=0}),[s]);const T=U.useRef(ZM(fY,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every((n=>e[n]===t[n]))})),I=U.useCallback((e=>{const[t,r]=FQ({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:R.rows.length,buffer:y.rowBuffer}),o=T.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:n,columnBuffer:y.columnBuffer,firstRowToRender:t,lastRowToRender:r,apiRef:s,visibleRows:R.rows}),a=o>0?k.current-u[o]:k.current;w.current.style.transform=`translate3d(${-a}px, 0px, 0px)`}),[u,n,y.columnBuffer,s,R.rows,y.rowBuffer]);U.useLayoutEffect((()=>{x&&I(x)}),[x,I]);const _=U.useCallback((({left:e,renderContext:t=null},n)=>{var r,o;if(!w.current)return;if(k.current===e&&(null==(r=C.current)?void 0:r.firstColumnIndex)===(null==t?void 0:t.firstColumnIndex)&&(null==(o=C.current)?void 0:o.lastColumnIndex)===(null==t?void 0:t.lastColumnIndex))return;k.current=e;let a=!1;t===C.current&&C.current?a=!0:(function(e){return!!e.target}(n)?(fd.flushSync((()=>{E(t)})),a=!0):E(t),C.current=t),t&&a&&I(t)}),[I]),A=U.useCallback((e=>i(e.field)),[]),O=U.useCallback((()=>i("")),[]),N=U.useCallback((e=>o(e.field)),[]),P=U.useCallback((()=>o("")),[]);NX(s,"columnResizeStart",A),NX(s,"columnResizeStop",O),NX(s,"columnHeaderDragStart",N),NX(s,"columnHeaderDragEnd",P),NX(s,"rowsScroll",_);const L=e=>{const{renderContext:t=x,minFirstColumn:r=n,maxLastColumn:o=l.length}=e||{};if(!t)return null;const[a,i]=FQ({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:R.rows.length,buffer:y.rowBuffer}),u=T.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:r,columnBuffer:y.columnBuffer,apiRef:s,firstRowToRender:a,lastRowToRender:i,visibleRows:R.rows}),c=Math.min(t.lastColumnIndex+y.columnBuffer,o);return{renderedColumns:l.slice(u,c),firstColumnToRender:u,lastColumnToRender:c,minFirstColumn:r,maxLastColumn:o}},M=(e=[],t)=>e.slice(0,t+1),D={minHeight:g,maxHeight:g,lineHeight:`${f}px`};return{renderContext:x,getColumnHeaders:(e,t={})=>{const n=L(e);if(null==n)return null;const{renderedColumns:o,firstColumnToRender:i}=n,s=[];for(let u=0;u{if(0===m)return null;const t=L(e);if(null==t||0===t.renderedColumns.length)return null;const{renderedColumns:r,firstColumnToRender:o,lastColumnToRender:a,maxLastColumn:i}=t,s=[],u=[];for(let f=0;f=n&&null!=(g=l[s])&&g.groupPath&&IK(M(null==(h=l[s])?void 0:h.groupPath,f),y);){var g,h,b;const n=l[s];var v,w;t+=null!=(b=n.computedWidth)?b:0,0===e.length?e.push({width:null!=(v=n.computedWidth)?v:0,fields:[n.field],groupId:m,groupParents:y,colIndex:s}):(e[0].width+=null!=(w=n.computedWidth)?w:0,e[0].fields.push(n.field),e[0].colIndex=s),s-=1}const k=r.reduce(((e,t,n)=>{var r;const a=e[e.length-1];var i,s,l;return t.groupPath&&t.groupPath.length>f?a&&a.groupId===t.groupPath[f]?[...e.slice(0,e.length-1),Id({},a,{width:a.width+(null!=(s=t.computedWidth)?s:0),fields:[...a.fields,t.field]})]:[...e,{groupId:t.groupPath[f],groupParents:M(t.groupPath,f),width:null!=(i=t.computedWidth)?i:0,fields:[t.field],colIndex:o+n}]:a&&null===a.groupId&&IK(M(t.groupPath,f),a.groupParents)?[...e.slice(0,e.length-1),Id({},a,{width:a.width+(null!=(l=t.computedWidth)?l:0),fields:[...a.fields,t.field]})]:[...e,{groupId:null,groupParents:M(t.groupPath,f),width:null!=(r=t.computedWidth)?r:0,fields:[t.field],colIndex:o+n}]}),e);s=a;const R=k[k.length-1].groupId;for(;null!==R&&s{s.push(ee.jsx(HQ,{style:{height:`${f}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:y,children:e.elements.map((({groupId:e,width:n,fields:r,colIndex:o},a)=>ee.jsx(UQ,{groupId:e,width:n,fields:r,colIndex:o,depth:t,isLastColumn:o===l.length-r.length,extendRowFullWidth:!y.disableExtendRowFullWidth,maxDepth:u.length,height:f},a)))},t))})),s},isDragging:!!r,getRootProps:(e={})=>Id({style:D},e),getInnerProps:()=>({ref:S,role:"rowgroup"})}})({innerRef:n});return ee.jsxs(WQ,Id({ref:t},a(r),{children:[ee.jsx(jX,{scrollDirection:"left"}),ee.jsxs(YQ,Id({isDragging:o},i(),{children:[l(),s()]})),ee.jsx(jX,{scrollDirection:"right"})]}))})),QQ=U.forwardRef((function(e,t){const n=(e=>{if(e.pageSize>100)throw new Error("'props.pageSize' cannot exceed 100 in DataGrid.");const t=hv({props:e,name:"MuiDataGrid"}),n=U.useMemo((()=>Id({},fQ,t.localeText)),[t.localeText]),r=U.useMemo((()=>{const e=t.components;if(!e)return Id({},yQ);const n={};return Object.entries(yQ).forEach((([t,r])=>{n[t]=void 0===e[t]?r:e[t]})),n}),[t.components]);return U.useMemo((()=>Id({},RQ,t,{localeText:n,components:r},kQ)),[t,n,r])})(e),r=CQ(n);return ee.jsx(FX,{apiRef:r,props:n,children:ee.jsx(xq,{className:n.className,style:n.style,sx:n.sx,ref:t,children:ee.jsxs(VG,{children:[ee.jsx(WG,{}),ee.jsx(zG,{ColumnHeadersComponent:ZQ,VirtualScrollerComponent:zQ}),ee.jsx(GG,{})]})})})})),JQ=U.memo(QQ);function eJ(e){const{rows:t,sortModel:n,columns:r,rowHeight:o="auto",getRowId:a=(e=>e.id),rowsPerPage:i=[20,50,100]}=e,s=hd.useDispatch(),l=hd.useSelector((e=>e.application.preferredPageSize)),[u,c]=b$({page:"0"}),[d,p]=U.useState(l||Math.min(...i)),f=U.useCallback((()=>o),[o]);return te.jsx(JQ,{onCellClick:()=>null,onCellDoubleClick:()=>null,onCellFocusOut:()=>null,onRowClick:()=>null,onColumnHeaderClick:()=>null,disableDensitySelector:!0,disableColumnSelector:!0,disableVirtualization:!0,disableSelectionOnClick:!0,sortModel:n,rows:t,getRowId:a,columns:r,rowsPerPageOptions:i,pageSize:d,page:Number(u.get("page")),onPageChange:e=>{c({page:String(e)})},onPageSizeChange:e=>{p(e),s(C$(e))},rowBuffer:0,rowThreshold:0,hideFooterSelectedRowCount:!0,autoHeight:!0,sx:{"& .MuiDataGrid-cell":{alignItems:"flex-start",flexDirection:"column"}},getRowHeight:f})}QQ.propTypes={"aria-label":Hf.string,"aria-labelledby":Hf.string,autoHeight:Hf.bool,autoPageSize:Hf.bool,cellModesModel:Hf.object,checkboxSelection:Hf.bool,classes:Hf.object,columnBuffer:Hf.number,columnGroupingModel:Hf.arrayOf(Hf.object),columns:(Hf.array.isRequired,()=>null),columnThreshold:Hf.number,columnTypes:Hf.object,columnVisibilityModel:Hf.object,components:Hf.object,componentsProps:Hf.object,density:Hf.oneOf(["comfortable","compact","standard"]),disableColumnFilter:Hf.bool,disableColumnMenu:Hf.bool,disableColumnSelector:Hf.bool,disableDensitySelector:Hf.bool,disableExtendRowFullWidth:Hf.bool,disableIgnoreModificationsIfProcessingProps:Hf.bool,disableSelectionOnClick:Hf.bool,disableVirtualization:Hf.bool,editMode:Hf.oneOf(["cell","row"]),editRowsModel:Hf.object,error:Hf.any,experimentalFeatures:Hf.shape({columnGrouping:Hf.bool,newEditingApi:Hf.bool,preventCommitWhileValidating:Hf.bool,warnIfFocusStateIsNotSynced:Hf.bool}),filterMode:Hf.oneOf(["client","server"]),filterModel:Hf.shape({items:Hf.arrayOf(Hf.shape({columnField:Hf.string.isRequired,id:Hf.oneOfType([Hf.number,Hf.string]),operatorValue:Hf.string,value:Hf.any})).isRequired,linkOperator:Hf.oneOf(["and","or"]),quickFilterLogicOperator:Hf.oneOf(["and","or"]),quickFilterValues:Hf.array}),getCellClassName:Hf.func,getDetailPanelContent:Hf.func,getEstimatedRowHeight:Hf.func,getRowClassName:Hf.func,getRowHeight:Hf.func,getRowId:Hf.func,getRowSpacing:Hf.func,headerHeight:Hf.number,hideFooter:Hf.bool,hideFooterPagination:Hf.bool,hideFooterSelectedRowCount:Hf.bool,initialState:Hf.object,isCellEditable:Hf.func,isRowSelectable:Hf.func,keepNonExistentRowsSelected:Hf.bool,loading:Hf.bool,localeText:Hf.object,logger:Hf.shape({debug:Hf.func.isRequired,error:Hf.func.isRequired,info:Hf.func.isRequired,warn:Hf.func.isRequired}),logLevel:Hf.oneOf(["debug","error","info","warn",!1]),nonce:Hf.string,onCellClick:Hf.func,onCellDoubleClick:Hf.func,onCellEditCommit:Hf.func,onCellEditStart:Hf.func,onCellEditStop:Hf.func,onCellFocusOut:Hf.func,onCellKeyDown:Hf.func,onCellModesModelChange:Hf.func,onColumnHeaderClick:Hf.func,onColumnHeaderDoubleClick:Hf.func,onColumnHeaderEnter:Hf.func,onColumnHeaderLeave:Hf.func,onColumnHeaderOut:Hf.func,onColumnHeaderOver:Hf.func,onColumnOrderChange:Hf.func,onColumnVisibilityChange:Hf.func,onColumnVisibilityModelChange:Hf.func,onEditCellPropsChange:Hf.func,onEditRowsModelChange:Hf.func,onError:Hf.func,onFilterModelChange:Hf.func,onMenuClose:Hf.func,onMenuOpen:Hf.func,onPageChange:Hf.func,onPageSizeChange:Hf.func,onPreferencePanelClose:Hf.func,onPreferencePanelOpen:Hf.func,onProcessRowUpdateError:Hf.func,onResize:Hf.func,onRowClick:Hf.func,onRowDoubleClick:Hf.func,onRowEditCommit:Hf.func,onRowEditStart:Hf.func,onRowEditStop:Hf.func,onRowModesModelChange:Hf.func,onSelectionModelChange:Hf.func,onSortModelChange:Hf.func,onStateChange:Hf.func,page:Hf.number,pageSize:(Hf.number,()=>null),pagination:e=>!1===e.pagination?new Error(["MUI: `` is not a valid prop.","Infinite scrolling is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join("\n")):null,paginationMode:Hf.oneOf(["client","server"]),processRowUpdate:Hf.func,rowBuffer:Hf.number,rowCount:Hf.number,rowHeight:Hf.number,rowModesModel:Hf.object,rows:Hf.arrayOf(Hf.object).isRequired,rowSpacingType:Hf.oneOf(["border","margin"]),rowsPerPageOptions:Hf.arrayOf(Hf.number),rowThreshold:Hf.number,scrollbarSize:Hf.number,selectionModel:(Hf.oneOfType([Hf.number,Hf.string,Hf.array]),()=>null),showCellRightBorder:Hf.bool,showColumnRightBorder:Hf.bool,sortingMode:Hf.oneOf(["client","server"]),sortingOrder:Hf.arrayOf(Hf.oneOf(["asc","desc"])),sortModel:Hf.arrayOf(Hf.shape({field:Hf.string.isRequired,sort:Hf.oneOf(["asc","desc"])})),sx:Hf.oneOfType([Hf.arrayOf(Hf.oneOfType([Hf.func,Hf.object,Hf.bool])),Hf.func,Hf.object])};var tJ={VITE_ENV:"github",VITE_BACKEND_URL:"http://127.0.0.1:8080",VITE_BUILD_ID:"378cdb0",BASE_URL:"/yii-dev-panel/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const nJ=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{"production"!==(tJ?"production":void 0)&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},i=t=e(r,o,a);return a},rJ=e=>e?nJ(e):nJ;var oJ={exports:{}},aJ={},iJ={exports:{}},sJ={},lJ=U;var uJ="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},cJ=lJ.useState,dJ=lJ.useEffect,pJ=lJ.useLayoutEffect,fJ=lJ.useDebugValue;function mJ(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!uJ(e,n)}catch(WL){return!0}}var gJ="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=cJ({inst:{value:n,getSnapshot:t}}),o=r[0].inst,a=r[1];return pJ((function(){o.value=n,o.getSnapshot=t,mJ(o)&&a({inst:o})}),[e,n,t]),dJ((function(){return mJ(o)&&a({inst:o}),e((function(){mJ(o)&&a({inst:o})}))}),[e]),fJ(n),n};sJ.useSyncExternalStore=void 0!==lJ.useSyncExternalStore?lJ.useSyncExternalStore:gJ,iJ.exports=sJ;var hJ=iJ.exports,bJ=U,vJ=hJ; + */function ZF(){return ZF=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Promise((()=>{}));const JF=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(lJ){}function e$(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ZF({},t,{errors:t$(t.errors)})),t}function t$(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&"RouteErrorResponse"===o.__type)n[r]=new Pj(o.status,o.statusText,o.data,!0===o.internal);else if(o&&"Error"===o.__type){if(o.__subType){let e=window[o.__subType];if("function"==typeof e)try{let t=new e(o.message);t.stack="",n[r]=t}catch(lJ){}}if(null==n[r]){let e=new Error(o.message);e.stack="",n[r]=e}}else n[r]=o;return n}const n$=U.createContext({isTransitioning:!1}),r$=U.createContext(new Map),o$=V.startTransition,a$=gd.flushSync;function i$(e){a$?a$(e):e()}class s${constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function l$(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=U.useState(n.state),[i,s]=U.useState(),[l,u]=U.useState({isTransitioning:!1}),[c,d]=U.useState(),[p,f]=U.useState(),[m,g]=U.useState(),h=U.useRef(new Map),{v7_startTransition:b}=r||{},v=U.useCallback((e=>{b?function(e){o$?o$(e):e()}(e):e()}),[b]),y=U.useCallback(((e,t)=>{let{deletedFetchers:r,unstable_flushSync:o,unstable_viewTransitionOpts:i}=t;r.forEach((e=>h.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&h.current.set(t,e.data)}));let l=null==n.window||"function"!=typeof n.window.document.startViewTransition;if(i&&!l){if(o){i$((()=>{p&&(c&&c.resolve(),p.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})}));let t=n.window.document.startViewTransition((()=>{i$((()=>a(e)))}));return t.finished.finally((()=>{i$((()=>{d(void 0),f(void 0),s(void 0),u({isTransitioning:!1})}))})),void i$((()=>f(t)))}p?(c&&c.resolve(),p.skipTransition(),g({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(s(e),u({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))}else o?i$((()=>a(e))):v((()=>a(e)))}),[n.window,p,c,h,v]);U.useLayoutEffect((()=>n.subscribe(y)),[n,y]),U.useEffect((()=>{l.isTransitioning&&!l.flushSync&&d(new s$)}),[l]),U.useEffect((()=>{if(c&&i&&n.window){let e=i,t=c.promise,r=n.window.document.startViewTransition((async()=>{v((()=>a(e))),await t}));r.finished.finally((()=>{d(void 0),f(void 0),s(void 0),u({isTransitioning:!1})})),f(r)}}),[v,i,c,n.window]),U.useEffect((()=>{c&&i&&o.location.key===i.location.key&&c.resolve()}),[c,p,o.location,i]),U.useEffect((()=>{!l.isTransitioning&&m&&(s(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))}),[l.isTransitioning,m]),U.useEffect((()=>{}),[]);let w=U.useMemo((()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})})),[n]),S=n.basename||"/",x=U.useMemo((()=>({router:n,navigator:w,static:!1,basename:S})),[n,w,S]);return U.createElement(U.Fragment,null,U.createElement(CF.Provider,{value:x},U.createElement(kF.Provider,{value:o},U.createElement(r$.Provider,{value:h.current},U.createElement(n$.Provider,{value:l},U.createElement(YF,{basename:S,location:o.location,navigationType:o.historyAction,navigator:w,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?U.createElement(u$,{routes:n.routes,future:n.future,state:o}):t))))),null)}function u$(e){let{routes:t,future:n,state:r}=e;return FF(t,void 0,r,n)}const c$="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,d$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,p$=U.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:a,replace:i,state:s,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=e,p=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,JF),{basename:f}=U.useContext(RF),m=!1;if("string"==typeof u&&d$.test(u)&&(n=u,c$))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=Cj(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:m=!0}catch(lJ){}let g=AF(u,{relative:o}),h=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:s}=void 0===t?{}:t,l=LF(),u=NF(),c=jF(e,{relative:i});return U.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:rj(u)===rj(c);l(e,{replace:n,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:s})}}),[u,l,c,r,o,n,e,a,i,s])}(u,{replace:i,state:s,target:l,preventScrollReset:c,relative:o,unstable_viewTransition:d});return U.createElement("a",ZF({},p,{href:n||g,onClick:m||a?r:function(e){r&&r(e),e.defaultPrevented||h(e)},ref:t,target:l}))}));var f$,m$,g$,h$;function b$(e){let t=U.useRef(QF(e)),n=U.useRef(!1),r=NF(),o=U.useMemo((()=>function(e,t){let n=QF(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=LF(),i=U.useCallback(((e,t)=>{const r=QF("function"==typeof e?e(o):e);n.current=!0,a("?"+r,t)}),[a,o]);return[o,i]}(m$=f$||(f$={})).UseScrollRestoration="useScrollRestoration",m$.UseSubmit="useSubmit",m$.UseSubmitFetcher="useSubmitFetcher",m$.UseFetcher="useFetcher",m$.useViewTransitionState="useViewTransitionState",(h$=g$||(g$={})).UseFetcher="useFetcher",h$.UseFetchers="useFetchers",h$.UseScrollRestoration="useScrollRestoration";const v$=e=>H.forwardRef(((t,n)=>{let{href:r,...o}=t;const a=AF(r);return"string"!=typeof r||"#"===r?te.jsx("a",{href:"#",ref:n,...o}):r.startsWith("http://")||r.startsWith("https://")?te.jsx("a",{href:r,ref:n,...o}):(e.openLinksInNewWindow&&(o={...o,target:"_blank"}),e.baseUrl?te.jsx("a",{href:e.baseUrl+a,ref:n,...o}):te.jsx(p$,{ref:n,to:r,...o}))})),y$=({children:e})=>{const t=mh("(prefers-color-scheme: dark)")?"dark":"light",n=U.useContext(KD),r=fv({palette:{mode:t,primary:{main:"#00617B"},secondary:{main:"#873C00"}},components:{MuiLink:{defaultProps:{component:v$(n)}},MuiButtonBase:{defaultProps:{LinkComponent:v$(n)}}}});return te.jsx(Kv,{theme:r,children:e})},w$=kD({name:"application",initialState:{baseUrl:e.backendUrl,preferredPageSize:20,toolbarOpen:!0,favoriteUrls:[],autoLatest:!1},reducers:{changeBaseUrl(e,t){e.baseUrl=t.payload},setToolbarOpen(e,t){e.toolbarOpen=t.payload},setPreferredPageSize(e,t){e.preferredPageSize=t.payload},addFavoriteUrl(e,t){const n=new Set(e.favoriteUrls);e.favoriteUrls=Array.from(n.add(t.payload).values())},removeFavoriteUrl(e,t){const n=new Set(e.favoriteUrls);n.delete(t.payload),e.favoriteUrls=Array.from(n.values())},changeAutoLatest:(e,t)=>{e.autoLatest=t.payload}}}),{changeBaseUrl:S$,changeAutoLatest:x$,setToolbarOpen:E$,setPreferredPageSize:C$,addFavoriteUrl:k$,removeFavoriteUrl:R$}=w$.actions,T$=kD({name:"notifications",initialState:{notifications:[]},reducers:{removeNotification(e,t){e.notifications[t.payload].shown=!1},addNotification:(e,t)=>{e.notifications=[...e.notifications,{...t.payload,shown:!0}]}}}),{addNotification:I$,removeNotification:_$}=T$.actions;var A$="persist:",O$="persist/FLUSH",N$="persist/REHYDRATE",P$="persist/PAUSE",L$="persist/PERSIST",M$="persist/PURGE",D$="persist/REGISTER";function j$(e){return(j$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B$(e,t,n,r){r.debug;var o=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function X$(e,t){var n=void 0!==e.version?e.version:-1;e.debug;var r=void 0===e.stateReconciler?B$:e.stateReconciler,o=e.getStoredState||H$,a=void 0!==e.timeout?e.timeout:5e3,i=null,s=!1,l=!0,u=function(e){return e._persist.rehydrated&&i&&!l&&i.update(e),e};return function(c,d){var p=c||{},f=p._persist,m=Y$(p,["_persist"]);if(d.type===L$){var g=!1,h=function(t,n){g||(d.rehydrate(e.key,t,n),g=!0)};if(a&&setTimeout((function(){!g&&h(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))}),a),l=!1,i||(i=z$(e)),f)return q$({},t(m,d),{_persist:f});if("function"!=typeof d.rehydrate||"function"!=typeof d.register)throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return d.register(e.key),o(e).then((function(t){var r=e.migrate||function(e,t){return Promise.resolve(e)};r(t,n).then((function(e){h(e)}),(function(e){h(void 0,e)}))}),(function(e){h(void 0,e)})),q$({},t(m,d),{_persist:{version:n,rehydrated:!1}})}if(d.type===M$)return s=!0,d.result(function(e){var t=e.storage,n="".concat(void 0!==e.keyPrefix?e.keyPrefix:A$).concat(e.key);return t.removeItem(n,G$)}(e)),q$({},t(m,d),{_persist:f});if(d.type===O$)return d.result(i&&i.flush()),q$({},t(m,d),{_persist:f});if(d.type===P$)l=!0;else if(d.type===N$){if(s)return q$({},m,{_persist:q$({},f,{rehydrated:!0})});if(d.key===e.key){var b=t(m,d),v=d.payload,y=q$({},!1!==r&&void 0!==v?r(v,c,b,e):b,{_persist:q$({},f,{rehydrated:!0})});return u(y)}}if(!f)return t(c,d);var w=t(m,d);return w===m?c:u(q$({},w,{_persist:f}))}}function Z$(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Q$=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),J$=()=>Math.random().toString(36).substring(7).split("").join("."),eB={INIT:`@@redux/INIT${J$()}`,REPLACE:`@@redux/REPLACE${J$()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${J$()}`};function tB(e,t,n){if("function"!=typeof e)throw new Error(Z$(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Z$(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Z$(1));return n(tB)(e,t)}let r=e,o=t,a=new Map,i=a,s=0,l=!1;function u(){i===a&&(i=new Map,a.forEach(((e,t)=>{i.set(t,e)})))}function c(){if(l)throw new Error(Z$(3));return o}function d(e){if("function"!=typeof e)throw new Error(Z$(4));if(l)throw new Error(Z$(5));let t=!0;u();const n=s++;return i.set(n,e),function(){if(t){if(l)throw new Error(Z$(6));t=!1,u(),i.delete(n),a=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(Z$(7));if(void 0===e.type)throw new Error(Z$(8));if("string"!=typeof e.type)throw new Error(Z$(17));if(l)throw new Error(Z$(9));try{l=!0,o=r(o,e)}finally{l=!1}return(a=i).forEach((e=>{e()})),e}p({type:eB.INIT});return{dispatch:p,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Z$(10));r=e,p({type:eB.REPLACE})},[Q$]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Z$(11));function n(){const e=t;e.next&&e.next(c())}n();return{unsubscribe:e(n)}},[Q$](){return this}}}}}function nB(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:iB,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case D$:return oB({},e,{registry:[].concat(nB(e.registry),[t.key])});case N$:var n=e.registry.indexOf(t.key),r=nB(e.registry);return r.splice(n,1),oB({},e,{registry:r,bootstrapped:0===r.length});default:return e}};function lB(e,t,n){var r=n||!1,o=tB(sB,iB,t&&t.enhancer?t.enhancer:void 0),a=function(e){o.dispatch({type:D$,key:e})},i=function(t,n,a){var i={type:N$,payload:n,err:a,key:t};e.dispatch(i),o.dispatch(i),r&&s.getState().bootstrapped&&(r(),r=!1)},s=oB({},o,{purge:function(){var t=[];return e.dispatch({type:M$,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:O$,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:P$})},persist:function(){e.dispatch({type:L$,register:a,rehydrate:i})}});return t&&t.manualPersist||s.persist(),s}var uB={},cB={};function dB(e){return(dB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pB(){}cB.__esModule=!0,cB.default=function(e){var t="".concat(e,"Storage");return function(e){if("object"!==("undefined"==typeof self?"undefined":dB(self))||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch(lJ){return!1}return!0}(t)?self[t]:fB};var fB={getItem:pB,setItem:pB,removeItem:pB};uB.__esModule=!0,uB.default=function(e){var t=(0,gB.default)(e);return{getItem:function(e){return new Promise((function(n,r){n(t.getItem(e))}))},setItem:function(e,n){return new Promise((function(r,o){r(t.setItem(e,n))}))},removeItem:function(e){return new Promise((function(n,r){n(t.removeItem(e))}))}}};var mB,gB=(mB=cB)&&mB.__esModule?mB:{default:mB};var hB,bB=function(e){return e&&e.__esModule?e:{default:e}}(uB);hB=(0,bB.default)("local");const vB={key:w$.name,version:1,storage:hB},yB={key:T$.name,version:1,storage:hB},wB={[w$.name]:X$(vB,w$.reducer),[T$.name]:X$(yB,T$.reducer)},SB=[],xB=ey(ee.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),EB=ey(ee.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2"}),"ChatBubble"),CB=ey(ee.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),kB=ey(ee.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),RB=ey(ee.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"}),"Clear"),TB=ey(ee.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),IB=ey(ee.jsx("path",{d:"M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5M19 3l-6 6 2 2 7-7V3z"}),"ContentCut"),_B=ey(ee.jsx("path",{d:"M9.5 14v-1H11v.5h2v-1h-2.5c-.55 0-1-.45-1-1V10c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1H13v-.5h-2v1h2.5c.55 0 1 .45 1 1V14c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1m7.5 1h3c.55 0 1-.45 1-1v-1.5c0-.55-.45-1-1-1h-2.5v-1h2v.5H21v-1c0-.55-.45-1-1-1h-3c-.55 0-1 .45-1 1v1.5c0 .55.45 1 1 1h2.5v1h-2V13H16v1c0 .55.45 1 1 1m-9-5c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-1H6.5v.5h-2v-3h2v.5H8z"}),"Css"),AB=ey(ee.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7m17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4z"}),"DataObject"),OB=ey([ee.jsx("path",{d:"M8 8H6v7c0 1.1.9 2 2 2h9v-2H8z"},"0"),ee.jsx("path",{d:"M20 3h-8c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 8h-8V7h8zM4 12H2v7c0 1.1.9 2 2 2h9v-2H4z"},"1")],"DynamicFeed"),NB=ey(ee.jsx("path",{d:"M12 3c-.46 0-.93.04-1.4.14-2.76.53-4.96 2.76-5.48 5.52-.48 2.61.48 5.01 2.22 6.56.43.38.66.91.66 1.47V19c0 1.1.9 2 2 2h.28c.35.6.98 1 1.72 1s1.38-.4 1.72-1H14c1.1 0 2-.9 2-2v-2.31c0-.55.22-1.09.64-1.46C18.09 13.95 19 12.08 19 10c0-3.87-3.13-7-7-7m2 16h-4v-1h4zm0-2h-4v-1h4zm-1.5-5.59V14h-1v-2.59L9.67 9.59l.71-.71L12 10.5l1.62-1.62.71.71z"}),"EmojiObjects"),PB=ey(ee.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),LB=ey(ee.jsx("path",{d:"M15 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V7zM6 20V4h8v4h4v12zm10-10v5c0 2.21-1.79 4-4 4s-4-1.79-4-4V8.5c0-1.47 1.26-2.64 2.76-2.49 1.3.13 2.24 1.32 2.24 2.63V15h-2V8.5c0-.28-.22-.5-.5-.5s-.5.22-.5.5V15c0 1.1.9 2 2 2s2-.9 2-2v-5z"}),"FilePresent"),MB=ey(ee.jsx("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"Folder"),DB=ey(ee.jsx("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp"),jB=ey(ee.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),FB=ey(ee.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),$B=ey(ee.jsx("path",{d:"M3.5 9H5v6H3.5v-2.5h-2V15H0V9h1.5v2h2zm14 0H13c-.55 0-1 .45-1 1v5h1.5v-4.5h1V14H16v-3.51h1V15h1.5v-5c0-.55-.45-1-1-1M11 9H6v1.5h1.75V15h1.5v-4.5H11zm13 6v-1.5h-2.5V9H20v6z"}),"Html"),BB=ey(ee.jsx("path",{d:"M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5zm2.5-.5h1.5V15H10v-4.5h1.5V9H7zm5.5 0H14V15h1.5v-4.5H17V9h-4.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5m0 2.5h-2v-1h2z"}),"Http"),zB=ey(ee.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),UB=ey(ee.jsx("path",{d:"M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z"}),"Input"),HB=ey(ee.jsx("path",{d:"M12 14v-1h1.5v.5h2v-1H13c-.55 0-1-.45-1-1V10c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1h-1.5v-.5h-2v1H16c.55 0 1 .45 1 1V14c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1M9 9v4.5H7.5v-1H6v1c0 .83.67 1.5 1.5 1.5H9c.83 0 1.5-.67 1.5-1.5V9z"}),"Javascript"),VB=ey(ee.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),GB=ey(ee.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew"),WB=ey(ee.jsx("path",{d:"M13 9h1.5v6H13v-2.5h-2V15H9.5V9H11v2h2zm-5 1.5v1c0 .8-.7 1.5-1.5 1.5h-2v2H3V9h3.5c.8 0 1.5.7 1.5 1.5m-1.5 0h-2v1h2zm15 0v1c0 .8-.7 1.5-1.5 1.5h-2v2h-1.5V9H20c.8 0 1.5.7 1.5 1.5m-1.5 0h-2v1h2z"}),"Php"),qB=ey(ee.jsx("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10 5.5h1v-3h-1z"}),"PictureAsPdf"),KB=ey(ee.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),YB=ey(ee.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),XB=ey(ee.jsx("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2z"}),"Repeat"),ZB=ey(ee.jsx("path",{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18c-1.16.41-2 1.51-2 2.82 0 1.66 1.34 3 3 3s3-1.34 3-3c0-1.3-.84-2.4-2-2.82"}),"Route"),QB=ey(ee.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),JB=ey(ee.jsx("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),ez=ey(ee.jsx("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"}),"StarOutline"),tz=ey(ee.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-8m0 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-4z"}),"Sync"),nz=ey(ee.jsx("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2m0 14H4V8h16zm-2-1h-6v-2h6zM7.5 17l-1.41-1.41L8.67 13l-2.59-2.59L7.5 9l4 4z"}),"Terminal"),rz=ey(ee.jsx("path",{d:"m20.41 8.41-4.83-4.83c-.37-.37-.88-.58-1.41-.58H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.42M7 7h7v2H7zm10 10H7v-2h10zm0-4H7v-2h10z"}),"TextSnippet"),oz=ey(ee.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"Undo");var az={},iz={};const sz=o(ny);var lz;function uz(){return lz||(lz=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=sz}(iz)),iz}var cz=Rb;Object.defineProperty(az,"__esModule",{value:!0});var dz=az.default=void 0,pz=cz(uz()),fz=ee;dz=az.default=(0,pz.default)((0,fz.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var mz,gz,hz=function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=200&&e.status<=299},jz=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function Fz(e){if(!hD(e))return e;for(var t=kz({},e),n=0,r=Object.entries(t);n=c)}var c=OD(n+"/executeQuery",l,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[VD]=!0,e},condition:function(e,t){var r,a,i,s=(0,t.getState)(),l=null==(a=null==(r=s[n])?void 0:r.queries)?void 0:a[e.queryCacheKey],c=null==l?void 0:l.fulfilledTimeStamp,d=e.originalArgs,p=null==l?void 0:l.originalArgs,f=o[e.endpointName];return!(!Jz(e)&&("pending"===(null==l?void 0:l.status)||!u(e,s)&&(!Kz(f)||!(null==(i=null==f?void 0:f.forceRefetch)?void 0:i.call(f,{currentArg:d,previousArg:p,endpointState:l,state:s})))&&c))},dispatchConditionRejection:!0}),d=OD(n+"/executeMutation",l,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[VD]=!0,e}});function p(e){return function(t){var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:c,mutationThunk:d,prefetch:function(e,t,n){return function(r,o){var a=function(e){return"force"in e}(n)&&n.force,s=function(e){return"ifOlderThan"in e}(n)&&n.ifOlderThan,l=function(n){return void 0===n&&(n=!0),i.endpoints[e].initiate(t,{forceRefetch:n})},u=i.endpoints[e].select(t)(o());if(a)r(l());else if(s){var c=null==u?void 0:u.fulfilledTimeStamp;if(!c)return void r(l());(Number(new Date)-Number(new Date(c)))/1e3>=s&&r(l())}else r(l(!1))}},updateQueryData:function(e,t,n,r){return void 0===r&&(r=!0),function(o,a){var s,l,u,c=i.endpoints[e].select(t)(a()),d={patches:[],inversePatches:[],undo:function(){return o(i.util.patchQueryData(e,t,d.inversePatches,r))}};if(c.status===mz.uninitialized)return d;if("data"in c)if(zL(c.data)){var p=DM(c.data,n),f=p[0],m=p[1],g=p[2];(s=d.patches).push.apply(s,m),(l=d.inversePatches).push.apply(l,g),u=f}else u=n(c.data),d.patches.push({op:"replace",path:[],value:u}),d.inversePatches.push({op:"replace",path:[],value:c.data});return o(i.util.patchQueryData(e,t,d.patches,r)),d}},upsertQueryData:function(e,t,n){return function(r){var o;return r(i.endpoints[e].initiate(t,((o={subscribe:!1,forceRefetch:!0})[Qz]=function(){return{data:n}},o)))}},patchQueryData:function(e,t,n,r){return function(l,u){var c=o[e],d=a({queryArgs:t,endpointDefinition:c,endpointName:e});if(l(i.internalActions.queryResultPatched({queryCacheKey:d,patches:n})),r){var p=i.endpoints[e].select(t)(u()),f=Yz(c.providesTags,p.data,void 0,t,{},s);l(i.internalActions.updateProvidedBy({queryCacheKey:d,providedTags:f}))}}},buildMatchThunkActions:function(e,t){return{matchPending:MD(FD(e),p(t)),matchFulfilled:MD(zD(e),p(t)),matchRejected:MD($D(e),p(t))}}}}({baseQuery:r,reducerPath:o,context:n,api:e,serializeQueryArgs:a,assertTagType:c}),p=d.queryThunk,f=d.mutationThunk,m=d.patchQueryData,g=d.updateQueryData,h=d.upsertQueryData,b=d.prefetch,v=d.buildMatchThunkActions,y=iU({context:n,queryThunk:p,mutationThunk:f,reducerPath:o,assertTagType:c,config:{refetchOnFocus:l,refetchOnReconnect:u,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:o}}),w=y.reducer,S=y.actions;RU(e.util,{patchQueryData:m,updateQueryData:g,upsertQueryData:h,prefetch:b,resetApiState:S.resetApiState}),RU(e.internalActions,S);var x=kU({reducerPath:o,context:n,queryThunk:p,mutationThunk:f,api:e,assertTagType:c}),E=x.middleware,C=x.actions;RU(e.util,C),RU(e,{reducer:w,middleware:E});var k=dU({serializeQueryArgs:a,reducerPath:o}),R=k.buildQuerySelector,T=k.buildMutationSelector,I=k.selectInvalidatedBy;RU(e.util,{selectInvalidatedBy:I});var _=function(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,o=e.api,a=e.context,i=new Map,s=new Map,l=o.internalActions,u=l.unsubscribeQueryResult,c=l.removeMutationResult,d=l.updateSubscriptionOptions;return{buildInitiateQuery:function(e,r){var a=function(s,l){var c=void 0===l?{}:l,p=c.subscribe,f=void 0===p||p,m=c.forceRefetch,g=c.subscriptionOptions,h=c[Qz];return function(l,c){var p,b,v=t({queryArgs:s,endpointDefinition:r,endpointName:e}),y=n(((p={type:"query",subscribe:f,forceRefetch:m,subscriptionOptions:g,endpointName:e,originalArgs:s,queryCacheKey:v})[Qz]=h,p)),w=o.endpoints[e].select(s),S=l(y),x=w(c()),E=S.requestId,C=S.abort,k=x.requestId!==E,R=null==(b=i.get(l))?void 0:b[v],T=function(){return w(c())},I=Object.assign(h?S.then(T):k&&!R?Promise.resolve(x):Promise.all([R,S]).then(T),{arg:s,requestId:E,subscriptionOptions:g,queryCacheKey:v,abort:C,unwrap:function(){return Iz(this,null,(function(){var e;return hz(this,(function(t){switch(t.label){case 0:return[4,I];case 1:if((e=t.sent()).isError)throw e.error;return[2,e.data]}}))}))},refetch:function(){return l(a(s,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){f&&l(u({queryCacheKey:v,requestId:E}))},updateSubscriptionOptions:function(t){I.subscriptionOptions=t,l(d({endpointName:e,requestId:E,queryCacheKey:v,options:t}))}});if(!R&&!k&&!h){var _=i.get(l)||{};_[v]=I,i.set(l,_),I.then((function(){delete _[v],Object.keys(_).length||i.delete(l)}))}return I}};return a},buildInitiateMutation:function(e){return function(t,n){var o=void 0===n?{}:n,a=o.track,i=void 0===a||a,l=o.fixedCacheKey;return function(n,o){var a=r({type:"mutation",endpointName:e,originalArgs:t,track:i,fixedCacheKey:l}),u=n(a),d=u.requestId,p=u.abort,f=u.unwrap,m=u.unwrap().then((function(e){return{data:e}})).catch((function(e){return{error:e}})),g=function(){n(c({requestId:d,fixedCacheKey:l}))},h=Object.assign(m,{arg:u.arg,requestId:d,abort:p,unwrap:f,unsubscribe:g,reset:g}),b=s.get(n)||{};return s.set(n,b),b[d]=h,h.then((function(){delete b[d],Object.keys(b).length||s.delete(n)})),l&&(b[l]=h,h.then((function(){b[l]===h&&(delete b[l],Object.keys(b).length||s.delete(n))}))),h}}},getRunningQueryThunk:function(e,n){return function(r){var o,s=a.endpointDefinitions[e],l=t({queryArgs:n,endpointDefinition:s,endpointName:e});return null==(o=i.get(r))?void 0:o[l]}},getRunningMutationThunk:function(e,t){return function(e){var n;return null==(n=s.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return function(e){return Object.values(i.get(e)||{}).filter(Zz)}},getRunningMutationsThunk:function(){return function(e){return Object.values(s.get(e)||{}).filter(Zz)}},getRunningOperationPromises:function(){var e=function(e){return Array.from(e.values()).flatMap((function(e){return e?Object.values(e):[]}))};return bz(bz([],e(i)),e(s)).filter(Zz)},removalWarning:p};function p(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}}({queryThunk:p,mutationThunk:f,api:e,serializeQueryArgs:a,context:n}),A=_.buildInitiateQuery,O=_.buildInitiateMutation,N=_.getRunningMutationThunk,P=_.getRunningMutationsThunk,L=_.getRunningQueriesThunk,M=_.getRunningQueryThunk,D=_.getRunningOperationPromises,j=_.removalWarning;return RU(e.util,{getRunningOperationPromises:D,getRunningOperationPromise:j,getRunningMutationThunk:N,getRunningMutationsThunk:P,getRunningQueryThunk:M,getRunningQueriesThunk:L}),{name:TU,injectEndpoint:function(t,n){var r,o=e;null!=(r=o.endpoints)[t]||(r[t]={}),Kz(n)?RU(o.endpoints[t],{name:t,select:R(t,n),initiate:A(t,n)},v(p,t)):function(e){return e.type===$z.mutation}(n)&&RU(o.endpoints[t],{name:t,select:T(),initiate:O(t)},v(f,t))}}}},function(e){var t=void 0===e?{}:e,n=t.batch,r=void 0===n?hd.batch:n,o=t.useDispatch,a=void 0===o?hd.useDispatch:o,i=t.useSelector,s=void 0===i?hd.useSelector:i,l=t.useStore,u=void 0===l?hd.useStore:l,c=t.unstable__sideEffectsInRender,d=void 0!==c&&c;return{name:KU,init:function(e,t,n){var o=t.serializeQueryArgs,i=e,l=function(e){var t=e.api,n=e.moduleOptions,r=n.batch,o=n.useDispatch,a=n.useSelector,i=n.useStore,s=n.unstable__sideEffectsInRender,l=e.serializeQueryArgs,u=e.context,c=s?function(e){return e()}:U.useEffect;return{buildQueryHooks:function(e){var n=function(n,r){var a=void 0===r?{}:r,i=a.refetchOnReconnect,s=a.refetchOnFocus,l=a.refetchOnMountOrArgChange,d=a.skip,p=void 0!==d&&d,f=a.pollingInterval,m=void 0===f?0:f,g=t.endpoints[e].initiate,h=o(),b=jU(p?sU:n,UU,u.endpointDefinitions[e],e),v=$U({refetchOnReconnect:i,refetchOnFocus:s,pollingInterval:m}),y=U.useRef(!1),w=U.useRef(),S=w.current||{},x=S.queryCacheKey,E=S.requestId,C=!1;if(x&&E){var k=h(t.internalActions.internal_probeSubscription({queryCacheKey:x,requestId:E}));C=!!k}var R=!C&&y.current;return c((function(){y.current=C})),c((function(){R&&(w.current=void 0)}),[R]),c((function(){var e,t=w.current;if(b===sU)return null==t||t.unsubscribe(),void(w.current=void 0);var n=null==(e=w.current)?void 0:e.subscriptionOptions;if(t&&t.arg===b)v!==n&&t.updateSubscriptionOptions(v);else{null==t||t.unsubscribe();var r=h(g(b,{subscriptionOptions:v,forceRefetch:l}));w.current=r}}),[h,g,l,b,v,R]),U.useEffect((function(){return function(){var e;null==(e=w.current)||e.unsubscribe(),w.current=void 0}}),[]),U.useMemo((function(){return{refetch:function(){var e;if(!w.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=w.current)?void 0:e.refetch()}}}),[])},s=function(n){var a=void 0===n?{}:n,i=a.refetchOnReconnect,s=a.refetchOnFocus,l=a.pollingInterval,u=void 0===l?0:l,d=t.endpoints[e].initiate,p=o(),f=U.useState(FU),m=f[0],g=f[1],h=U.useRef(),b=$U({refetchOnReconnect:i,refetchOnFocus:s,pollingInterval:u});c((function(){var e,t,n=null==(e=h.current)?void 0:e.subscriptionOptions;b!==n&&(null==(t=h.current)||t.updateSubscriptionOptions(b))}),[b]);var v=U.useRef(b);c((function(){v.current=b}),[b]);var y=U.useCallback((function(e,t){var n;return void 0===t&&(t=!1),r((function(){var r;null==(r=h.current)||r.unsubscribe(),h.current=n=p(d(e,{subscriptionOptions:v.current,forceRefetch:!t})),g(e)})),n}),[p,d]);return U.useEffect((function(){return function(){var e;null==(e=null==h?void 0:h.current)||e.unsubscribe()}}),[]),U.useEffect((function(){m===FU||h.current||y(m,!0)}),[m,y]),U.useMemo((function(){return[y,m]}),[y,m])},p=function(n,r){var o=void 0===r?{}:r,s=o.skip,c=void 0!==s&&s,p=o.selectFromResult,f=t.endpoints[e].select,m=jU(c?sU:n,l,u.endpointDefinitions[e],e),g=U.useRef(),h=U.useMemo((function(){return JM([f(m),function(e,t){return t},function(e){return m}],d)}),[f,m]),b=U.useMemo((function(){return p?JM([h],p):h}),[h,p]),v=a((function(e){return b(e,g.current)}),hd.shallowEqual),y=i(),w=h(y.getState(),g.current);return HU((function(){g.current=w}),[w]),v};return{useQueryState:p,useQuerySubscription:n,useLazyQuerySubscription:s,useLazyQuery:function(e){var t=s(e),n=t[0],r=t[1],o=p(r,DU(MU({},e),{skip:r===FU})),a=U.useMemo((function(){return{lastArg:r}}),[r]);return U.useMemo((function(){return[n,o,a]}),[n,o,a])},useQuery:function(e,t){var r=n(e,t),o=p(e,MU({selectFromResult:e===sU||(null==t?void 0:t.skip)?void 0:GU},t)),a=o.data,i=o.status,s=o.isLoading,l=o.isSuccess,u=o.isError,c=o.error;return U.useDebugValue({data:a,status:i,isLoading:s,isSuccess:l,isError:u,error:c}),U.useMemo((function(){return MU(MU({},o),r)}),[o,r])}}},buildMutationHook:function(e){return function(n){var i=void 0===n?{}:n,s=i.selectFromResult,l=void 0===s?VU:s,u=i.fixedCacheKey,c=t.endpoints[e],d=c.select,p=c.initiate,f=o(),m=U.useState(),g=m[0],h=m[1];U.useEffect((function(){return function(){(null==g?void 0:g.arg.fixedCacheKey)||null==g||g.reset()}}),[g]);var b=U.useCallback((function(e){var t=f(p(e,{fixedCacheKey:u}));return h(t),t}),[f,p,u]),v=(g||{}).requestId,y=U.useMemo((function(){return JM([d({fixedCacheKey:u,requestId:null==g?void 0:g.requestId})],l)}),[d,g,l,u]),w=a(y,hd.shallowEqual),S=null==u?null==g?void 0:g.arg.originalArgs:void 0,x=U.useCallback((function(){r((function(){g&&h(void 0),u&&f(t.internalActions.removeMutationResult({requestId:v,fixedCacheKey:u}))}))}),[f,u,g,v]),E=w.endpointName,C=w.data,k=w.status,R=w.isLoading,T=w.isSuccess,I=w.isError,_=w.error;U.useDebugValue({endpointName:E,data:C,status:k,isLoading:R,isSuccess:T,isError:I,error:_});var A=U.useMemo((function(){return DU(MU({},w),{originalArgs:S,reset:x})}),[w,S,x]);return U.useMemo((function(){return[b,A]}),[b,A])}},usePrefetch:function(e,n){var r=o(),a=$U(n);return U.useCallback((function(n,o){return r(t.util.prefetch(e,n,MU(MU({},a),o)))}),[e,r,a])}};function d(e,t,n){if((null==t?void 0:t.endpointName)&&e.isUninitialized){var r=t.endpointName,o=u.endpointDefinitions[r];l({queryArgs:t.originalArgs,endpointDefinition:o,endpointName:r})===l({queryArgs:n,endpointDefinition:o,endpointName:r})&&(t=void 0)}var a=e.isSuccess?e.data:null==t?void 0:t.data;void 0===a&&(a=e.data);var i=void 0!==a,s=e.isLoading,c=!i&&s,d=e.isSuccess||s&&i;return DU(MU({},e),{data:a,currentData:e.data,isFetching:s,isLoading:c,isSuccess:d})}}({api:e,moduleOptions:{batch:r,useDispatch:a,useSelector:s,useStore:u,unstable__sideEffectsInRender:d},serializeQueryArgs:o,context:n}),c=l.buildQueryHooks,p=l.buildMutationHook,f=l.usePrefetch;return qU(i,{usePrefetch:f}),qU(n,{batch:r}),{injectEndpoint:function(t,n){if(function(e){return e.type===BU.query}(n)){var r=c(t),o=r.useQuery,a=r.useLazyQuery,s=r.useLazyQuerySubscription,l=r.useQueryState,u=r.useQuerySubscription;qU(i.endpoints[t],{useQuery:o,useLazyQuery:a,useLazyQuerySubscription:s,useQueryState:l,useQuerySubscription:u}),e["use"+WU(t)+"Query"]=o,e["useLazy"+WU(t)+"Query"]=a}else if(function(e){return e.type===BU.mutation}(n)){var d=p(t);qU(i.endpoints[t],{useMutation:d}),e["use"+WU(t)+"Mutation"]=d}}}}}}());const XU=e=>async(t,n,r)=>{const o=function(e){var t=this;void 0===e&&(e={});var n=e,r=n.baseUrl,o=n.prepareHeaders,a=void 0===o?function(e){return e}:o,i=n.fetchFn,s=void 0===i?Mz:i,l=n.paramsSerializer,u=n.isJsonContentType,c=void 0===u?jz:u,d=n.jsonContentType,p=void 0===d?"application/json":d,f=n.jsonReplacer,m=n.timeout,g=n.responseHandler,h=n.validateStatus,b=Tz(n,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","jsonReplacer","timeout","responseHandler","validateStatus"]);return"undefined"==typeof fetch&&s===Mz&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(e,n){return Iz(t,null,(function(){var t,o,i,u,d,y,w,S,x,E,C,k,R,T,I,_,A,O,N,P,L,M,D,j,F,$,B,z,U,H,V,G,W,q,K,Y;return hz(this,(function(X){switch(X.label){case 0:return t=n.signal,o=n.getState,i=n.extra,u=n.endpoint,d=n.forced,y=n.type,x=(S="string"==typeof e?{url:e}:e).url,E=S.headers,C=void 0===E?new Headers(b.headers):E,k=S.params,R=void 0===k?void 0:k,T=S.responseHandler,I=void 0===T?null!=g?g:"json":T,_=S.validateStatus,A=void 0===_?null!=h?h:Dz:_,O=S.timeout,N=void 0===O?m:O,P=Tz(S,["url","headers","params","responseHandler","validateStatus","timeout"]),L=kz(Rz(kz({},b),{signal:t}),P),C=new Headers(Fz(C)),M=L,[4,a(C,{getState:o,extra:i,endpoint:u,forced:d,type:y})];case 1:M.headers=X.sent()||C,D=function(e){return"object"==typeof e&&(hD(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!L.headers.has("content-type")&&D(L.body)&&L.headers.set("content-type",p),D(L.body)&&c(L.headers)&&(L.body=JSON.stringify(L.body,f)),R&&(j=~x.indexOf("?")?"&":"?",F=l?l(R):new URLSearchParams(Fz(R)),x+=j+F),x=Oz(r,x),$=new Request(x,L),B=new Request(x,L),w={request:B},U=!1,H=N&&setTimeout((function(){U=!0,n.abort()}),N),X.label=2;case 2:return X.trys.push([2,4,5,6]),[4,s($)];case 3:return z=X.sent(),[3,6];case 4:return V=X.sent(),[2,{error:{status:U?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(V)},meta:w}];case 5:return H&&clearTimeout(H),[7];case 6:G=z.clone(),w.response=G,q="",X.label=7;case 7:return X.trys.push([7,9,,10]),[4,Promise.all([v(z,I).then((function(e){return W=e}),(function(e){return K=e})),G.text().then((function(e){return q=e}),(function(){}))])];case 8:if(X.sent(),K)throw K;return[3,10];case 9:return Y=X.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:z.status,data:q,error:String(Y)},meta:w}];case 10:return[2,A(z,W)?{data:W,meta:w}:{error:{status:z.status,data:W},meta:w}]}}))}))};function v(e,t){return Iz(this,null,(function(){var n;return hz(this,(function(r){switch(r.label){case 0:return"function"==typeof t?[2,t(e)]:("content-type"===t&&(t=c(e.headers)?"json":"text"),"json"!==t?[3,2]:[4,e.text()]);case 1:return[2,(n=r.sent()).length?JSON.parse(n):null];case 2:return[2,e.text()]}}))}))}}({baseUrl:(n.getState().application?.baseUrl||"").replace(/\/$/,"")+e,referrerPolicy:"no-referrer",headers:{Accept:"application/json","Content-Type":"application/json"}});return o(t,n,r)},ZU=YU({reducerPath:"api.debug",tagTypes:["debug/list"],baseQuery:XU("/debug/api/"),endpoints:e=>({getDebug:e.query({query:()=>"",transformResponse:e=>e.data||[],providesTags:["debug/list"]}),getObject:e.query({query:e=>`object/${e.debugEntryId}/${e.objectId}`,transformResponse:e=>e.data}),getCollectorInfo:e.query({query:e=>`view/${e.id}?collector=${e.collector}`,transformResponse:e=>e.data||[],transformErrorResponse:e=>e.data})})}),{useGetDebugQuery:QU,useLazyGetDebugQuery:JU,useGetObjectQuery:eH,useLazyGetObjectQuery:tH,useLazyGetCollectorInfoQuery:nH}=ZU,rH=YU({reducerPath:"api.gii",baseQuery:XU("/gii/api"),endpoints:e=>({getGenerators:e.query({query:()=>"/generator",transformResponse:e=>e.generators||[]}),postPreview:e.mutation({query:({generator:e,parameters:t})=>({url:`/generator/${e}/preview`,method:"POST",body:{parameters:t}})}),postGenerate:e.mutation({query:({generator:e,parameters:t,answers:n})=>({url:`/generator/${e}/generate`,method:"POST",body:{parameters:t,answers:n}})}),postDiff:e.mutation({query:({generator:e,parameters:t,fileId:n})=>({url:`/generator/${e}/diff?file=${n}`,method:"POST",body:{parameters:t}})})})}),{useGetGeneratorsQuery:oH,useLazyGetGeneratorsQuery:aH,usePostPreviewMutation:iH,usePostGenerateMutation:sH,usePostDiffMutation:lH}=rH,uH=YU({reducerPath:"api.inspector",keepUnusedDataFor:0,tagTypes:["inspector/composer"],baseQuery:XU("/inspect/api/"),endpoints:e=>({getParameters:e.query({query:()=>"params",transformResponse:e=>e.data||[]}),getConfiguration:e.query({query:(e="di")=>`config?group=${e}`,transformResponse:e=>e.data}),getClasses:e.query({query:()=>"classes",transformResponse:e=>e.data||[]}),getObject:e.query({query:e=>`object?classname=${e}`,transformResponse:e=>e.data}),getCommands:e.query({query:e=>"command",transformResponse:e=>e.data||[]}),runCommand:e.mutation({query:e=>({url:`command?command=${e}`,method:"POST"}),transformResponse:e=>e.data}),getFiles:e.query({query:e=>`files?path=${e}`,transformResponse:e=>e.data||[]}),getClass:e.query({query:({className:e,methodName:t=""})=>`files?class=${e}&method=${t}`,transformResponse:e=>e.data||[]}),getTranslations:e.query({query:()=>"translations",transformResponse:e=>e.data||[]}),putTranslations:e.mutation({query:e=>({method:"PUT",url:"translations",body:e}),transformResponse:e=>e.data||[]}),getTable:e.query({query:e=>e?`table/${e}`:"table",transformResponse:e=>e.data||[]}),doRequest:e.mutation({query:e=>({method:"PUT",url:`request?debugEntryId=${e.id}`}),transformResponse:e=>e.data||[]}),postCurlBuild:e.mutation({query:e=>({method:"POST",url:`curl/build?debugEntryId=${e}`}),transformResponse:e=>e.data}),getRoutes:e.query({query:()=>"routes",transformResponse:e=>e.data||[]}),getCheckRoute:e.query({query:e=>`route/check?route=${e}`,transformResponse:e=>e.data}),getEvents:e.query({query:()=>"events",transformResponse:e=>e.data}),getPhpInfo:e.query({query:()=>"phpinfo",transformResponse:e=>e.data||[]}),getComposer:e.query({query:()=>"composer",transformResponse:e=>e.data,providesTags:["inspector/composer"]}),getComposerInspect:e.query({query:e=>`composer/inspect?package=${e}`,transformResponse:e=>e.data,providesTags:["inspector/composer"]}),getCache:e.query({query:e=>`cache?key=${e}`,transformResponse:e=>e.data}),deleteCache:e.mutation({query:e=>({url:`cache?key=${e}`,method:"DELETE"}),transformResponse:e=>e.data}),clearCache:e.mutation({query:()=>({url:"cache/clear",method:"POST"}),transformResponse:e=>e.data}),postComposerRequirePackage:e.mutation({query:({packageName:e,version:t,isDev:n})=>({url:"composer/require",method:"POST",body:{package:e,version:t,isDev:n}}),transformResponse:e=>e.data,invalidatesTags:["inspector/composer"]})})}),{useGetParametersQuery:cH,useLazyGetParametersQuery:dH,useGetConfigurationQuery:pH,useGetObjectQuery:fH,useGetClassesQuery:mH,useLazyGetObjectQuery:gH,useLazyGetFilesQuery:hH,useLazyGetClassQuery:bH,useLazyGetCommandsQuery:vH,useRunCommandMutation:yH,useGetTranslationsQuery:wH,usePutTranslationsMutation:SH,useDoRequestMutation:xH,useGetRoutesQuery:EH,useLazyGetCheckRouteQuery:CH,useGetTableQuery:kH,useGetPhpInfoQuery:RH,useGetComposerQuery:TH,useGetCacheQuery:IH,useDeleteCacheMutation:_H,useLazyGetCacheQuery:AH,useClearCacheMutation:OH,useLazyGetComposerInspectQuery:NH,useGetComposerInspectQuery:PH,usePostComposerRequirePackageMutation:LH,usePostCurlBuildMutation:MH,useGetEventsQuery:DH}=uH,jH=kD({name:"store.debug",initialState:{entry:null,currentPageRequestIds:[]},reducers:{changeEntryAction:(e,t)=>{e.entry=t.payload},addCurrentPageRequestId:(e,t)=>{e.currentPageRequestIds=[...e.currentPageRequestIds,t.payload].slice(0,100)}}}),{changeEntryAction:FH,addCurrentPageRequestId:$H}=jH.actions,BH=()=>hd.useSelector((e=>e[jH.name]?.entry)),zH={key:jH.name,version:1,whitelist:["entry"],storage:hB},UH={[jH.name]:X$(zH,jH.reducer),[ZU.reducerPath]:ZU.reducer},HH=[ZU.middleware],VH=kD({name:"store.frames2",initialState:{frames:{}},reducers:{addFrame:(e,t)=>{e.frames={...e.frames,[t.payload]:t.payload}},updateFrame:(e,t)=>{e.frames=t.payload},deleteFrame:(e,t)=>{const n=Object.entries(e.frames).filter((([e,n])=>e!=t.payload));e.frames=Object.fromEntries(n)}}}),{addFrame:GH,updateFrame:WH,deleteFrame:qH}=VH.actions,KH=()=>hd.useSelector((e=>e[VH.name].frames)),YH={key:VH.name,version:1,storage:hB},XH={[VH.name]:X$(YH,VH.reducer)},ZH=[],QH={[rH.reducerPath]:rH.reducer},JH=[rH.middleware],eV=YU({reducerPath:"api.inspector.git",keepUnusedDataFor:0,tagTypes:["git/summary","git/log"],baseQuery:XU("/inspect/api/git/"),endpoints:e=>({getSummary:e.query({query:()=>"summary",providesTags:["git/summary"],transformResponse:e=>e.data}),getLog:e.query({query:()=>"log",providesTags:["git/log"],transformResponse:e=>e.data}),checkout:e.mutation({query:({branch:e})=>({url:"checkout",method:"POST",body:{branch:e}}),invalidatesTags:[{type:"git/summary"}]}),command:e.mutation({query:({command:e})=>({url:`command?command=${e}`,method:"POST"}),invalidatesTags:[{type:"git/summary"}]})})}),{useGetSummaryQuery:tV,useGetLogQuery:nV,useCommandMutation:rV,useCheckoutMutation:oV}=eV,aV={[uH.reducerPath]:uH.reducer,[eV.reducerPath]:eV.reducer},iV=[uH.middleware,eV.middleware],sV=kD({name:"store.openApi",initialState:{entries:{}},reducers:{addApiEntry:(e,t)=>{e.entries={...e.entries,[t.payload]:t.payload}},updateApiEntry:(e,t)=>{e.entries=t.payload},deleteApiEntry:(e,t)=>{const n=Object.entries(e.entries).filter((([e,n])=>e!=t.payload));e.entries=Object.fromEntries(n)}}}),{addApiEntry:lV,updateApiEntry:uV,deleteApiEntry:cV}=sV.actions,dV=()=>hd.useSelector((e=>e[sV.name].entries)),pV={key:sV.name,version:1,storage:hB},fV={[sV.name]:X$(pV,sV.reducer)},mV=[],gV=e=>t=>n=>(BD(n)&&(console.log("action.payload.error",n,e,t),"FETCH_ERROR"===n.payload.status&&e.dispatch(I$({title:n.payload.error,text:`An error occurred during the request to ${n.meta.baseQueryMeta.request.url}`,color:"error"}))),t(n)),hV=xD({reducer:WM({...wB,...aV,...UH,...QH,...fV,...XH}),middleware:e=>e({serializableCheck:{ignoredActions:[O$,N$,P$,L$,M$,D$]}}).concat([...SB,...iV,...HH,...JH,...mV,...ZH,gV]),devTools:!1});qz(hV.dispatch);const bV=lB(hV),vV=hd.useSelector,yV=e.backendUrl;function wV(){const e=hd.useDispatch(),[t]=JU(),[n]=dH(),[r]=aH(),o=vV((e=>e.application.baseUrl)),[a,i]=U.useState(String(o)),[s,l]=U.useState({debug:!1,inspector:!1,gii:!1}),u=vV((e=>e.application.favoriteUrls));async function c(){t().then((e=>l((t=>({...t,debug:e.isSuccess}))))).catch((()=>l((e=>({...e,debug:!1}))))),n().then((e=>l((t=>({...t,inspector:e.isSuccess}))))).catch((()=>l((e=>({...e,inspector:!1}))))),r().then((e=>l((t=>({...t,gii:e.isSuccess}))))).catch((()=>l((e=>({...e,gii:!1})))))}const d=async t=>{i(t),e(S$(t)),await c()};return U.useEffect((()=>{c()}),[]),te.jsxs(fI,{container:!0,spacing:2,children:[te.jsxs(fI,{item:!0,md:6,xs:12,children:[te.jsx("h2",{children:"Yii Dev Panel"}),te.jsxs(uS,{children:["Default backend url is: ",te.jsx("b",{children:yV})]}),te.jsx("h3",{children:"API Statuses"}),Object.entries(s).map(((e,t)=>te.jsxs(H.Fragment,{children:[te.jsx(uS,{}),e[1]?te.jsxs(nS,{severity:"success",children:[te.jsx("span",{style:{textTransform:"capitalize"},children:e[0]}),": connected"]}):te.jsxs(nS,{severity:"error",children:[te.jsx("span",{style:{textTransform:"capitalize"},children:e[0]}),": disconnected"]})]},t))),te.jsxs(Ly,{component:"form",onSubmit:async e=>{e.preventDefault(),await d(a)},sx:{p:[.5,1],my:2,display:"flex",alignItems:"center"},children:[te.jsx(iC,{sx:{ml:1,flex:1},placeholder:a,value:a,onChange:e=>i(e.target.value)}),te.jsx(Uw,{type:"button",sx:{p:2},onClick:()=>e(k$(a)),children:te.jsx(ez,{})}),te.jsx(Uw,{type:"submit",sx:{p:2},children:te.jsx(dz,{})})]})]}),te.jsx(fI,{item:!0,md:6,xs:12,children:u.length>0&&te.jsxs(te.Fragment,{children:[te.jsx("h3",{children:"Favorites"}),te.jsx(f_,{children:u.map(((t,n)=>te.jsxs(A_,{children:[te.jsx(V_,{children:t}),te.jsxs(k_,{children:[te.jsx(Uw,{href:t,children:te.jsx(GB,{})}),te.jsx(Uw,{type:"submit",sx:{p:2},onClick:()=>e(R$(t)),children:te.jsx(JB,{})}),te.jsx(Uw,{type:"submit",sx:{p:2},onClick:()=>d(t),children:te.jsx(dz,{})})]})]},n)))})]})})]})}const SV=({indicatorSize:e=40})=>te.jsx(gR,{size:e,sx:{position:"absolute",top:"50%",left:"50%",marginTop:-e/2+"px",marginLeft:-e/2+"px"}}),xV=({module:e,props:t,scope:n,url:r})=>{const o=(({url:e})=>{const[t,n]=H.useState(!1),[r,o]=H.useState(!1);return H.useEffect((()=>{if(!e)return;const t=document.createElement("script");return t.src=e,t.type="text/javascript",t.async=!0,n(!1),o(!1),t.onload=()=>{console.debug(`Dynamic Script Loaded: ${e}`),n(!0)},t.onerror=()=>{console.error(`Dynamic Script Error: ${e}`),n(!1),o(!0)},document.head.appendChild(t),()=>{console.debug(`Dynamic Script Unloaded: ${e}`),document.head.removeChild(t)}}),[e]),{ready:t,failed:r}})({url:e&&r});if(!e)return te.jsx(nS,{severity:"error",children:"Module name cannot be empty"});if(!o.ready)return te.jsx(SV,{});if(o.failed)return te.jsxs(nS,{severity:"error",children:["Failed to load dynamic script: ",r]});const a=H.lazy(((e,t)=>async()=>{await __webpack_init_sharing__("default");const n=window[e];return await n.init(__webpack_share_scopes__.default),(await window[e].get(t))()})(n,e));return te.jsx(U.Suspense,{fallback:te.jsx(SV,{}),children:te.jsx(a,{...t})})},EV={cache:{get:[{key:"123",count:2}],set:[{key:"123",value:{1:2,2:"object@stdClass#6692"},ttl:null,count:2}]}},CV=[{severity:"error",text:"Error text"},{severity:"success",text:"Success text"}];function kV(){return te.jsxs(H.Suspense,{fallback:te.jsx(SV,{}),children:[te.jsx(xV,{url:"http://localhost:3002/external.js",module:"./LogPanel",scope:"remote",props:{data:CV}}),te.jsx(xV,{url:"http://localhost:3002/external.js",module:"./CachePanel",scope:"remote",props:{data:EV}})]})}const RV={routes:[{index:!0,element:te.jsx(wV,{})},{path:"shared",element:te.jsx(kV,{})}],reducers:wB,middlewares:SB,standaloneModule:!1},TV=U.createContext(void 0);function IV(){const e=U.useContext(TV);if(void 0===e)throw new Error(["MUI: 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}const _V=U.createContext(void 0),AV=()=>{const e=U.useContext(_V);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e};function OV(e){return Cg("MuiDataGrid",e)}const NV=kg("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","autoHeight","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLinkOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","root","root--densityStandard","root--densityComfortable","root--densityCompact","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),PV=e=>{const{classes:t}=e;return eb({root:["main"]},OV,t)},LV=Wv("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})((()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"})));function MV(e){const t=AV(),n=PV(t);return ee.jsx(LV,{className:n.root,ownerState:t,children:e.children})}function DV(e,t){var n=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},r=function(e){if(!(e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var r=this;n(this),this.__resizeRAF__&&t.cancelAnimationFrame(this.__resizeRAF__),this.__resizeRAF__=t.requestAnimationFrame((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(r)&&(r.__resizeLast__.width=r.offsetWidth,r.__resizeLast__.height=r.offsetHeight,r.__resizeListeners__.forEach((function(t){t.call(r,e)})))}))}},o=!1,a="",i="animationstart",s="Webkit Moz O ms".split(" "),l="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),u=document.createElement("fakeelement");if(void 0!==u.style.animationName&&(o=!0),!1===o)for(var c=0;c div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .Mui-resizeTriggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',o="ShadowRoot"===n.constructor.name?n:t.head||t.getElementsByTagName("head")[0],a=t.createElement("style");a.id="muiDetectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(t.createTextNode(r)),o.appendChild(a)}}(s,o.getRootNode()),o.__resizeLast__={},o.__resizeListeners__=[],(o.__resizeTriggers__=s.createElement("div")).className="Mui-resizeTriggers",o.__resizeTriggers__.innerHTML='
',o.appendChild(o.__resizeTriggers__),n(o),o.addEventListener("scroll",r,!0),i&&(o.__resizeTriggers__.__animationListener__=function(e){e.animationName==d&&n(o)},o.__resizeTriggers__.addEventListener(i,o.__resizeTriggers__.__animationListener__))}o.__resizeListeners__.push(a)},removeResizeListener:function(e,t){if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",r,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(i,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(lJ){}}}}}const jV=["children","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","style"],FV=U.forwardRef((function(e,t){const{children:n,defaultHeight:r=null,defaultWidth:o=null,disableHeight:a=!1,disableWidth:i=!1,nonce:s,onResize:l,style:u}=e,c=_d(e,jV),[d,p]=U.useState({height:r,width:o}),f=U.useRef(null),m=U.useRef(null),g=Ph((()=>{if(m.current){const e=m.current.offsetHeight||0,t=m.current.offsetWidth||0,n=Th(m.current).getComputedStyle(m.current),r=parseInt(n.paddingLeft,10)||0,o=parseInt(n.paddingRight,10)||0,s=e-(parseInt(n.paddingTop,10)||0)-(parseInt(n.paddingBottom,10)||0),u=t-r-o;(!a&&d.height!==s||!i&&d.width!==u)&&(p({height:s,width:u}),l&&l({height:s,width:u}))}}));ch((()=>{var e;if(m.current=f.current.parentElement,!m)return;const t=Th(null!=(e=m.current)?e:void 0),n=DV(s,t);return n.addResizeListener(m.current,g),g(),()=>{n.removeResizeListener(m.current,g)}}),[s,g]);const h={overflow:"visible"},b={};a||(h.height=0,b.height=d.height),i||(h.width=0,b.width=d.width);const v=Lh(f,t);return ee.jsx("div",Id({ref:v,style:Id({},h,u)},c,{children:null===d.height&&null===d.width?null:n(b)}))})),$V=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(r):console.warn(r))}},BV=(e,t)=>e;$V(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);const zV=(e,t)=>function(e){return e.acceptsApiRef}(t)?t(e):t(e.current.state),UV={cache:null};$V(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.","To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g `mySelector(state, apiRef.current.instanceId)`."]);const HV=(...e)=>{null===UV.cache&&(UV.cache={});const t=(...t)=>{const[n,r]=t,o=!!n.current,a=o?n.current.instanceId:null!=r?r:"default",i=o?n.current.state:n;null===UV.cache&&(UV.cache={});const{cache:s}=UV;if(s[a]&&s[a].get(e))return s[a].get(e)(i,a);const l=JM(...e);return s[a]||(s[a]=new Map),s[a].set(e,l),l(i,a)};return t.acceptsApiRef=!0,t},VV=e=>e.rows,GV=HV(VV,(e=>e.totalRowCount)),WV=HV(VV,(e=>e.loading)),qV=HV(VV,(e=>e.totalTopLevelRowCount)),KV=HV(VV,(e=>e.idRowsLookup)),YV=HV(VV,(e=>e.idToIdLookup)),XV=HV(VV,(e=>e.tree)),ZV=HV(VV,(e=>e.groupingName)),QV=HV(VV,(e=>e.treeDepth)),JV=HV(VV,(e=>e.ids)),eG=HV(VV,(e=>null==e?void 0:e.additionalRowGroups)),tG=HV(eG,(e=>null==e?void 0:e.pinnedRows)),nG=HV(tG,(e=>{var t,n;return((null==e||null==(t=e.top)?void 0:t.length)||0)+((null==e||null==(n=e.bottom)?void 0:n.length)||0)})),rG=e=>e.sorting,oG=HV(rG,(e=>e.sortedRows)),aG=HV(oG,KV,((e,t)=>e.map((e=>({id:e,model:t[e]}))))),iG=HV(rG,(e=>e.sortModel)),sG=HV(iG,(e=>e.reduce(((t,n,r)=>(t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?r+1:void 0},t)),{}))),lG=e=>e.columns,uG=HV(lG,(e=>e.all)),cG=HV(lG,(e=>e.lookup)),dG=HV(uG,cG,((e,t)=>e.map((e=>t[e])))),pG=HV(lG,(e=>e.columnVisibilityModel)),fG=HV(dG,pG,((e,t)=>e.filter((e=>!1!==t[e.field]))));HV(fG,(e=>e.map((e=>e.field))));const mG=HV(fG,(e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return 0===n?0:t[n-1]+e[n-1].computedWidth})),hG=HV(dG,(e=>e.filter((e=>e.filterable)))),bG=HV(dG,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{})));BV(HV(hG,(e=>e.map((e=>e.field))))),BV(HV(fG,(e=>e.length)));const vG=BV(HV(mG,gG,((e,t)=>({totalWidth:t,positions:e})))),yG=e=>e.filter,wG=HV(yG,(e=>e.filterModel));HV(wG,(e=>e.quickFilterValues));const SG=HV(yG,(e=>e.visibleRowsLookup)),xG=HV(yG,(e=>e.filteredRowsLookup));HV(yG,(e=>e.filteredDescendantCountLookup));const EG=HV(SG,aG,((e,t)=>t.filter((t=>!1!==e[t.id])))),CG=HV(EG,(e=>e.map((e=>e.id)))),kG=HV(xG,aG,((e,t)=>t.filter((t=>!1!==e[t.id])))),RG=HV(kG,(e=>e.map((e=>e.id)))),TG=HV(EG,XV,QV,((e,t,n)=>n<2?e:e.filter((e=>{var n;return 0===(null==(n=t[e.id])?void 0:n.depth)})))),IG=HV(EG,(e=>e.length)),_G=HV(TG,(e=>e.length)),AG=HV(wG,cG,((e,t)=>{var n;return null==(n=e.items)?void 0:n.filter((e=>{var n,r;if(!e.columnField)return!1;const o=t[e.columnField];if(null==o||!o.filterOperators||0===(null==o||null==(n=o.filterOperators)?void 0:n.length))return!1;const a=o.filterOperators.find((t=>t.value===e.operatorValue));return!!a&&(!a.InputComponent||null!=e.value&&""!==(null==(r=e.value)?void 0:r.toString()))}))})),OG=HV(AG,(e=>e.reduce(((e,t)=>(e[t.columnField]?e[t.columnField].push(t):e[t.columnField]=[t],e)),{}))),NG=e=>e.density,PG=HV(NG,(e=>e.value)),LG=HV(NG,(e=>e.rowHeight)),MG=HV(NG,(e=>e.headerHeight)),DG=HV(NG,(e=>e.headerGroupingMaxDepth)),jG=HV(NG,(e=>e.factor)),FG=HV(NG,(e=>e.headerHeight*(1+e.headerGroupingMaxDepth)));function $G(e){var t,n;const r=IV(),o=AV(),a=zV(r,FG),[i,s]=U.useState((()=>{var e,t;return null!=(e=null==(t=r.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null})),l=U.useCallback((()=>{var e,t;s(null!=(e=null==(t=r.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null)}),[r]);ch((()=>r.current.subscribeEvent("viewportInnerSizeChange",l)),[r,l]);let u=null!=(t=null==i?void 0:i.height)?t:0;return o.autoHeight&&0===u&&(u="auto"),i?ee.jsx("div",Id({style:{height:u,width:null!=(n=null==i?void 0:i.width)?n:0,position:"absolute",top:a,bottom:"auto"===u?0:void 0}},e)):null}function BG(){const e=IV(),t=AV(),n=zV(e,GV),r=zV(e,IG),o=zV(e,WV),a=!o&&n>0&&0===r;let i=null;var s,l,u;o||0!==n||(i=ee.jsx(t.components.NoRowsOverlay,Id({},null==(s=t.componentsProps)?void 0:s.noRowsOverlay)));a&&(i=ee.jsx(t.components.NoResultsOverlay,Id({},null==(l=t.componentsProps)?void 0:l.noResultsOverlay)));o&&(i=ee.jsx(t.components.LoadingOverlay,Id({},null==(u=t.componentsProps)?void 0:u.loadingOverlay)));return null===i?null:ee.jsx($G,{children:i})}function zG(e){const{children:t,VirtualScrollerComponent:n,ColumnHeadersComponent:r}=e,o=IV(),a=AV(),i=zV(o,FG),[s,l]=U.useState(a.disableVirtualization),u=U.useCallback((()=>{l(!0)}),[]),c=U.useCallback((()=>{l(!1)}),[]);U.useEffect((()=>{l(a.disableVirtualization)}),[a.disableVirtualization]),o.current.unstable_disableVirtualization=u,o.current.unstable_enableVirtualization=c;const d=U.useRef(null),p=U.useRef(null),f=U.useRef(null),m=U.useRef(null);o.current.columnHeadersContainerElementRef=p,o.current.columnHeadersElementRef=d,o.current.windowRef=f,o.current.renderingZoneRef=m;const g=U.useCallback((e=>{o.current.publishEvent("resize",e)}),[o]);return ee.jsxs(MV,{children:[ee.jsx(BG,{}),ee.jsx(r,{ref:p,innerRef:d}),ee.jsx(FV,{nonce:a.nonce,disableHeight:a.autoHeight,onResize:g,children:e=>{const t={width:e.width,height:e.height?e.height-i:"auto",marginTop:i};return ee.jsx(n,{ref:f,style:t,disableVirtualization:s})}}),t]})}function UG(e,t){const n=U.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}let HG=class extends U.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.props.api.current&&(this.logError(e),this.props.api.current.showError({error:e,errorInfo:t}))}logError(e,t){this.props.logger.error(`An unexpected error occurred. Error: ${e&&e.message}. `,e,t)}render(){var e;return this.props.hasError||null!=(e=this.state)&&e.hasError?this.props.render(this.state):this.props.children}};function VG(e){const{children:t}=e,n=IV(),r=UG(n,"GridErrorHandler"),o=AV(),a=n.current.state.error;return ee.jsx(HG,{hasError:null!=a,api:n,logger:r,render:e=>{var t;return ee.jsx(MV,{children:ee.jsx(o.components.ErrorOverlay,Id({},e,a,null==(t=o.componentsProps)?void 0:t.errorOverlay))})},children:t})}function GG(){var e;const t=IV(),n=AV(),r=U.useRef(null);return t.current.footerRef=r,n.hideFooter?null:ee.jsx("div",{ref:r,children:ee.jsx(n.components.Footer,Id({},null==(e=n.componentsProps)?void 0:e.footer))})}function WG(){var e;const t=IV(),n=AV(),r=U.useRef(null);return t.current.headerRef=r,ee.jsx("div",{ref:r,children:ee.jsx(n.components.Header,Id({},null==(e=n.componentsProps)?void 0:e.header))})}function qG(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;te.focus,lW=HV(sW,(e=>e.cell)),uW=HV(sW,(e=>e.columnHeader)),cW=e=>e.tabIndex,dW=HV(cW,(e=>e.cell)),pW=HV(cW,(e=>e.columnHeader)),fW=["align","children","colIndex","colDef","cellMode","field","formattedValue","hasFocus","height","isEditable","rowId","tabIndex","value","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","onClick","onDoubleClick","onMouseDown","onMouseUp","onKeyDown","onDragEnter","onDragOver"];let mW;const gW=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","getValue"],hW=e=>{const{value:t}=e,n=_d(e,gW),r=IV(),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["booleanCell"]},OV,t)})({classes:o.classes}),i=U.useMemo((()=>t?o.components.BooleanCellTrueIcon:o.components.BooleanCellFalseIcon),[o.components.BooleanCellFalseIcon,o.components.BooleanCellTrueIcon,t]);return ee.jsx(i,Id({fontSize:"small",className:a.root,titleAccess:r.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},n))},bW=U.memo(hW),vW=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","getValue","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function yW(e){var t;const{id:n,value:r,field:o,className:a,hasFocus:i,onValueChange:s}=e,l=_d(e,vW),u=IV(),c=U.useRef(null),d=Oh(),[p,f]=U.useState(r),m=AV(),g=(e=>{const{classes:t}=e;return eb({root:["editBooleanCell"]},OV,t)})({classes:m.classes}),h=U.useCallback((async e=>{const t=e.target.checked;s&&await s(e,t),f(t),await u.current.setEditCellValue({id:n,field:o,value:t},e)}),[u,o,n,s]);return U.useEffect((()=>{f(r)}),[r]),ch((()=>{i&&c.current.focus()}),[i]),ee.jsx("label",Id({htmlFor:d,className:KG(g.root,a)},l,{children:ee.jsx(m.components.BaseCheckbox,Id({id:d,inputRef:c,checked:Boolean(p),onChange:h,size:"small"},null==(t=m.componentsProps)?void 0:t.baseCheckbox))}))}const wW=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","getValue","inputProps","isValidating","isProcessingProps","onValueChange"],SW=Wv(iC)({fontSize:"inherit"});function xW(e){const{id:t,value:n,field:r,colDef:o,hasFocus:a,inputProps:i,onValueChange:s}=e,l=_d(e,wW),u="dateTime"===o.type,c=IV(),d=U.useRef(),p=U.useMemo((()=>{let e,t;if(e=null==n?null:n instanceof Date?n:new Date((null!=n?n:"").toString()),null==e||Number.isNaN(e.getTime()))t="";else{t=new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,u?16:10)}return{parsed:e,formatted:t}}),[n,u]),[f,m]=U.useState(p),g=(e=>{const{classes:t}=e;return eb({root:["editInputCell"]},OV,t)})({classes:AV().classes}),h=U.useCallback((async e=>{const n=e.target.value;let o;if(""===n)o=null;else{const[e,t]=n.split("T"),[r,a,i]=e.split("-");if(o=new Date,o.setFullYear(Number(r),Number(a)-1,Number(i)),o.setHours(0,0,0,0),t){const[e,n]=t.split(":");o.setHours(Number(e),Number(n),0,0)}}s&&await s(e,o),m({parsed:o,formatted:n}),c.current.setEditCellValue({id:t,field:r,value:o},e)}),[c,r,t,s]);return U.useEffect((()=>{m((e=>{var t,n;return p.parsed!==e.parsed&&(null==(t=p.parsed)?void 0:t.getTime())!==(null==(n=e.parsed)?void 0:n.getTime())?p:e}))}),[p]),ch((()=>{a&&d.current.focus()}),[a]),ee.jsx(SW,Id({inputRef:d,fullWidth:!0,className:g.root,type:u?"datetime-local":"date",inputProps:Id({max:u?"9999-12-31T23:59":"9999-12-31"},i),value:f.formatted,onChange:h},l))}const EW=e=>ee.jsx(xW,Id({},e)),CW=ey(ee.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),kW=ey(ee.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),RW=ey(ee.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),TW=ey(ee.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),IW=ey(ee.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),_W=ey(ee.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"),AW=ey(ee.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");ey(ee.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),ey(ee.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");const OW=ey(ee.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),NW=ey(ee.jsx("path",{d:"M11 19V5h2v14z"}),"Separator"),PW=ey(ee.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),LW=ey(ee.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),MW=ey(ee.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),DW=ey(ee.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"),jW=ey(ee.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"),FW=ey(ee.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),$W=ey(ee.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),BW=ey(ee.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"),zW=ey(ee.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"),UW=ey(ee.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),HW=ey(ee.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),VW=ey(ee.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");function GW(e){return"object"==typeof e&&null!==e?e.value:e}function WW(e,t){if(void 0===t)return;const n=t.find((t=>{const n=GW(t);return String(n)===String(e)}));return GW(n)}const qW=["item","applyValue","type","apiRef","focusElementRef"],KW=({valueOptions:e,valueFormatter:t,field:n},r,o)=>("function"==typeof e?["",...e({field:n})]:["",...e||[]]).map((e=>{const a="object"==typeof e,i=a?e.value:e,s=a?e.value:e,l=t&&""!==e?t({value:e,field:n,api:r}):e,u=a?e.label:l;return ee.jsx(o,{value:s,children:u},i)})),YW=500;function XW(e){var t,n,r,o,a;const{item:i,applyValue:s,type:l,apiRef:u,focusElementRef:c}=e,d=_d(e,qW),p=U.useRef(),[f,m]=U.useState(null!=(t=i.value)?t:""),[g,h]=U.useState(!1),b=Oh(),v=AV(),y=null==(r=((null==(n=v.componentsProps)?void 0:n.baseSelect)||{}).native)||r,w="singleSelect"===l?{select:!0,SelectProps:Id({native:y},null==(o=v.componentsProps)?void 0:o.baseSelect),children:KW(u.current.getColumn(i.columnField),u.current,y?"option":xA)}:{},S=U.useCallback((e=>{let t=e.target.value;if("singleSelect"===l){const e=u.current.getColumn(i.columnField),n="function"==typeof e.valueOptions?e.valueOptions({field:e.field}):e.valueOptions;t=WW(t,n)}clearTimeout(p.current),m(String(t)),h(!0),p.current=setTimeout((()=>{s(Id({},i,{value:t})),h(!1)}),YW)}),[u,s,i,l]);U.useEffect((()=>()=>{clearTimeout(p.current)}),[]),U.useEffect((()=>{var e;const t=null!=(e=i.value)?e:"";m(String(t))}),[i.value]);const x=g?{endAdornment:ee.jsx(BW,{})}:d.InputProps;return ee.jsx(v.components.BaseTextField,Id({id:b,label:u.current.getLocaleText("filterPanelInputLabel"),placeholder:u.current.getLocaleText("filterPanelInputPlaceholder"),value:f,onChange:S,variant:"standard",type:l||"text",InputProps:x,InputLabelProps:{shrink:!0},inputRef:c},w,d,null==(a=v.componentsProps)?void 0:a.baseTextField))}const ZW=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","getValue","isValidating","debounceMs","isProcessingProps","onValueChange"],QW=Wv(iC,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})((({theme:e})=>Id({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}}))),JW=U.forwardRef(((e,t)=>{var n,r;const o=AV(),{id:a,value:i,field:s,colDef:l,hasFocus:u,debounceMs:c=(null!=(n=o.experimentalFeatures)&&n.newEditingApi?200:YW),isProcessingProps:d,onValueChange:p}=e,f=_d(e,ZW),m=IV(),g=U.useRef(),[h,b]=U.useState(i),v=(e=>{const{classes:t}=e;return eb({root:["editInputCell"]},OV,t)})(o),y=U.useCallback((async e=>{var t;const n=e.target.value;p&&await p(e,n);const r=m.current.getColumn(s);let i=n;r.valueParser&&null!=(t=o.experimentalFeatures)&&t.newEditingApi&&(i=r.valueParser(n,m.current.getCellParams(a,s))),b(i),m.current.setEditCellValue({id:a,field:s,value:i,debounceMs:c,unstable_skipValueParser:!0},e)}),[m,c,s,a,p,null==(r=o.experimentalFeatures)?void 0:r.newEditingApi]),w=m.current.unstable_getEditCellMeta?m.current.unstable_getEditCellMeta(a,s):{};return U.useEffect((()=>{"debouncedSetEditCellValue"!==w.changeReason&&b(i)}),[w.changeReason,i]),ch((()=>{u&&g.current.focus()}),[u]),ee.jsx(QW,Id({ref:t,inputRef:g,className:v.root,ownerState:o,fullWidth:!0,type:"number"===l.type?l.type:"text",value:null!=h?h:"",onChange:y,endAdornment:d?ee.jsx(BW,{}):void 0},f))})),eq=e=>"Escape"===e,tq=e=>"Enter"===e,nq=e=>"Tab"===e,rq=e=>" "===e,oq=e=>"Delete"===e||"Backspace"===e;function aq(e){return 1===e.key.length&&!1===e.ctrlKey&&!1===e.metaKey}const iq=["Enter","Escape","Tab"],sq=["Enter","Tab"],lq=e=>sq.indexOf(e)>-1,uq=e=>(e=>"Home"===e||"End"===e)(e)||(e=>0===e.indexOf("Arrow"))(e)||(e=>0===e.indexOf("Page"))(e)||rq(e),cq=e=>!!e.key,dq=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","getValue","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"];function pq(e){var t,n,r;const o=AV(),{id:a,value:i,api:s,field:l,row:u,colDef:c,hasFocus:d,error:p,onValueChange:f,initialOpen:m=o.editMode===YG.Cell}=e,g=_d(e,dq),h=IV(),b=U.useRef(),v=U.useRef(),[y,w]=U.useState(m),S=null!=(n=((null==(t=o.componentsProps)?void 0:t.baseSelect)||{}).native)&&n;let x;x="function"==typeof c.valueOptions?c.valueOptions({id:a,row:u,field:l}):c.valueOptions,c.valueFormatter&&(x=x.map((e=>{if("object"==typeof e)return e;const t={field:l,api:s,value:e};return{value:e,label:String(c.valueFormatter(t))}})));return ch((()=>{d&&v.current.focus()}),[d]),ee.jsx(o.components.BaseSelect,Id({ref:b,inputRef:v,value:i,onChange:async e=>{var t;w(!1);const n=WW(e.target.value,x);f&&await f(e,n);const r=await h.current.setEditCellValue({id:a,field:l,value:n},e);if(null!=(t=o.experimentalFeatures)&&t.newEditingApi)return;if(o.editMode===YG.Row||!1===r)return;if(await Promise.resolve(h.current.commitCellChange({id:a,field:l},e))&&(h.current.setCellMode(a,l,"view"),e.key)){const t=h.current.getCellParams(a,l);h.current.publishEvent("cellNavigationKeyDown",t,e)}},open:y,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||w(!0)},MenuProps:{onClose:(e,t)=>{var n;o.editMode!==YG.Row?("backdropClick"===t||eq(e.key))&&(null!=(n=o.experimentalFeatures)&&n.newEditingApi?h.current.stopCellEditMode({id:a,field:l,ignoreModifications:!0}):h.current.setCellMode(a,l,"view")):w(!1)}},error:p,native:S,fullWidth:!0},g,null==(r=o.componentsProps)?void 0:r.baseSelect,{children:x.map((e=>((e,t)=>{const n="object"==typeof e,r=n?e.value:e,o=n?e.value:e,a=n?e.label:e;return ee.jsx(t,{value:o,children:a},r)})(e,S?"option":xA)))}))}const fq=["open","target","onClickAway","children","position","className","onExited"],mq=Wv(AE,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})((({theme:e})=>({zIndex:e.zIndex.modal,[`& .${NV.menuList}`]:{outline:0}}))),gq={"bottom-start":"top left","bottom-end":"top right"},hq=e=>{var t;const{open:n,target:r,onClickAway:o,children:a,position:i,className:s,onExited:l}=e,u=_d(e,fq),c=IV(),d=U.useRef(r),p=U.useRef(n),f=AV(),m=(e=>{const{classes:t}=e;return eb({root:["menu"]},OV,t)})(f);U.useEffect((()=>{p.current&&d.current&&d.current.focus();const e=n?"menuOpen":"menuClose";c.current.publishEvent(e,{target:r}),p.current=n,d.current=r}),[c,n,r]);return ee.jsx(mq,Id({as:f.components.BasePopper,className:KG(s,m.root),ownerState:f,open:n,anchorEl:r,transition:!0,placement:i},u,null==(t=f.componentsProps)?void 0:t.basePopper,{children:({TransitionProps:e,placement:t})=>{return ee.jsx(CS,{onClickAway:o,mouseEvent:"onMouseDown",children:ee.jsx(yI,Id({},e,{style:{transformOrigin:gq[t]},onExited:(n=null==e?void 0:e.onExited,e=>{n&&n(),l&&l(e)}),children:ee.jsx(Ly,{children:a})}))});var n}}))},bq=["colDef","id","api","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","getValue","tabIndex","position","focusElementRef"],vq=e=>{const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:a="bottom-end",focusElementRef:i}=e,s=_d(e,bq),[l,u]=U.useState(-1),[c,d]=U.useState(!1),p=IV(),f=U.useRef(null),m=U.useRef(null),g=U.useRef(!1),h=U.useRef({}),b=Oh(),v=Oh(),y=AV();if(U.useLayoutEffect((()=>{r||Object.entries(h.current).forEach((([e,t])=>{null==t||t.stop({},(()=>{delete h.current[e]}))}))}),[r]),U.useEffect((()=>{if(l<0||!f.current)return;if(l>=f.current.children.length)return;f.current.children[l].focus({preventScroll:!0})}),[l]),U.useEffect((()=>{r||(u(-1),g.current=!1)}),[r]),U.useImperativeHandle(i,(()=>({focus(){g.current||u(0)}})),[]),!(e=>"function"==typeof e.getActions)(t))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const w=t.getActions(p.current.getRowParams(n)),S=w.filter((e=>!e.props.showInMenu)),x=w.filter((e=>e.props.showInMenu)),E=S.length+(x.length?1:0);U.useEffect((()=>{l>=E&&u(E-1)}),[l,E]);const C=()=>{d(!1)},k=e=>t=>{h.current[e]=t},R=(e,t)=>n=>{u(e),g.current=!0,t&&t(n)};return ee.jsxs("div",Id({role:"menu",ref:f,tabIndex:-1,className:NV.actionsCell,onKeyDown:e=>{if(E<=1)return;let t=l;"ArrowRight"===e.key?t+=1:"ArrowLeft"===e.key&&(t-=1),t<0||t>=E||t!==l&&(e.preventDefault(),e.stopPropagation(),u(t))}},s,{children:[S.map(((e,t)=>U.cloneElement(e,{key:t,touchRippleRef:k(t),onClick:R(t,e.props.onClick),tabIndex:l===t?o:-1}))),x.length>0&&v&&ee.jsx(Uw,{ref:m,id:v,"aria-label":p.current.getLocaleText("actionsCellMore"),"aria-controls":b,"aria-expanded":c?"true":void 0,"aria-haspopup":"true",role:"menuitem",size:"small",onClick:()=>{d(!0),u(E-1),g.current=!0},touchRippleRef:k(v),tabIndex:l===S.length?o:-1,children:ee.jsx(y.components.MoreActionsIcon,{fontSize:"small"})}),x.length>0&&ee.jsx(hq,{onClickAway:C,onClick:C,open:c,target:m.current,position:a,children:ee.jsx(X_,{id:b,className:NV.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Enter","Escape"].includes(e.key)&&C()},"aria-labelledby":v,variant:"menu",autoFocusItem:!0,children:x.map(((e,t)=>U.cloneElement(e,{key:t})))})})]}))},yq=["field","align","width","contentWidth"];const wq=Wv("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${NV.autoHeight}`]:t.autoHeight},{[`&.${NV.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${NV["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${NV["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${NV["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${NV.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`& .${NV.editBooleanCell}`]:t.editBooleanCell},{[`& .${NV["cell--editing"]}`]:t["cell--editing"]},{[`& .${NV["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${NV["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${NV["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${NV["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${NV.cell}`]:t.cell},{[`& .${NV.cellContent}`]:t.cellContent},{[`& .${NV.cellCheckbox}`]:t.cellCheckbox},{[`& .${NV.cellSkeleton}`]:t.cellSkeleton},{[`& .${NV.checkboxInput}`]:t.checkboxInput},{[`& .${NV["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${NV["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${NV["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${NV["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${NV["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${NV["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${NV["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${NV["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${NV.columnHeader}`]:t.columnHeader},{[`& .${NV.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${NV.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${NV.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${NV["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${NV["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${NV.columnSeparator}`]:t.columnSeparator},{[`& .${NV.filterIcon}`]:t.filterIcon},{[`& .${NV.iconSeparator}`]:t.iconSeparator},{[`& .${NV.menuIcon}`]:t.menuIcon},{[`& .${NV.menuIconButton}`]:t.menuIconButton},{[`& .${NV.menuOpen}`]:t.menuOpen},{[`& .${NV.menuList}`]:t.menuList},{[`& .${NV["row--editable"]}`]:t["row--editable"]},{[`& .${NV["row--editing"]}`]:t["row--editing"]},{[`& .${NV["row--dragging"]}`]:t["row--dragging"]},{[`& .${NV.row}`]:t.row},{[`& .${NV.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${NV.rowReorderCell}`]:t.rowReorderCell},{[`& .${NV["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${NV.sortIcon}`]:t.sortIcon},{[`& .${NV.withBorder}`]:t.withBorder},{[`& .${NV.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${NV.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${NV.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${NV["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})((({theme:e})=>{const t="light"===e.palette.mode?xh(wh(e.palette.divider,1),.88):Sh(wh(e.palette.divider,1),.68);return Id({flex:1,boxSizing:"border-box",position:"relative",border:`1px solid ${t}`,borderRadius:e.shape.borderRadius,color:e.palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",flexDirection:"column",[`&.${NV.autoHeight}`]:{height:"auto",[`& .${NV["row--lastVisible"]} .${NV.cell}`]:{borderBottomColor:"transparent"}},[`& .${NV["virtualScrollerContent--overflowed"]} .${NV["row--lastVisible"]} .${NV.cell}`]:{borderBottomColor:"transparent"},[`& .${NV.columnHeader}, & .${NV.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${NV.columnHeader}:focus-within, & .${NV.cell}:focus-within`]:{outline:`solid ${wh(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${NV.columnHeader}:focus, & .${NV.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${NV.columnHeaderCheckbox}, & .${NV.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${NV.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${NV["columnHeader--sorted"]} .${NV.iconButtonContainer}, & .${NV["columnHeader--filtered"]} .${NV.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${NV.columnHeader}:not(.${NV["columnHeader--sorted"]}) .${NV.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${NV.columnHeader}:not(.${NV["columnHeader--sorted"]}):hover .${NV.sortIcon}`]:{opacity:.5},[`& .${NV.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${NV.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${NV["columnHeader--filledGroup"]} .${NV.columnHeaderTitleContainer}`]:{borderBottom:`solid ${t} 1px`,boxSizing:"border-box"},[`& .${NV["columnHeader--filledGroup"]}.${NV["columnHeader--showColumnBorder"]} .${NV.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${NV["columnHeader--filledGroup"]}.${NV["columnHeader--showColumnBorder"]}`]:{borderBottom:`solid ${t} 1px`,boxSizing:"border-box"},[`& .${NV.sortIcon}, & .${NV.filterIcon}`]:{fontSize:"inherit"},[`& .${NV["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${NV["columnHeader--alignCenter"]} .${NV.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${NV["columnHeader--alignRight"]} .${NV.columnHeaderDraggableContainer}, & .${NV["columnHeader--alignRight"]} .${NV.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${NV["columnHeader--alignCenter"]} .${NV.menuIcon}, & .${NV["columnHeader--alignRight"]} .${NV.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${NV["columnHeader--alignRight"]} .${NV.menuIcon}, & .${NV["columnHeader--alignRight"]} .${NV.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${NV["columnHeader--moving"]}`]:{backgroundColor:e.palette.action.hover},[`& .${NV.columnSeparator}`]:{position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},[`& .${NV["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${NV["columnSeparator--sideRight"]}`]:{right:-12},[`& .${NV["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:e.palette.text.primary,"@media (hover: none)":{color:t}},[`&.${NV["columnSeparator--resizing"]}`]:{color:e.palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${NV.iconSeparator}`]:{color:"inherit"},[`& .${NV.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`& .${NV.columnHeader}:hover`]:{[`& .${NV.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${NV.menuIcon}`]:{width:"auto",visibility:"visible"}},[`.${NV.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${NV.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:wh(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:wh(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:wh(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${NV.cell}`]:{display:"flex",alignItems:"center",borderBottom:`1px solid ${t}`},[`& .${NV.row}:not(.${NV["row--dynamicHeight"]}) > .${NV.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${NV.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${NV.cell}.${NV["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:e.palette.background.paper,"&:focus-within":{outline:`solid ${e.palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${NV["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${NV["row--editing"]} .${NV.cell}`]:{boxShadow:e.shadows[0],backgroundColor:e.palette.background.paper},[`& .${NV.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${NV.booleanCell}[data-value="true"]`]:{color:e.palette.text.secondary},[`& .${NV.booleanCell}[data-value="false"]`]:{color:e.palette.text.disabled},[`& .${NV.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${NV.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:e.palette.action.disabledOpacity},[`& .${NV["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${NV.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`& .${NV.withBorder}`]:{borderRight:`1px solid ${t}`},[`& .${NV["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${NV["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${NV["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${NV.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${NV.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${NV["columnHeader--dragging"]}, & .${NV["row--dragging"]}`]:{background:e.palette.background.paper,padding:"0 12px",borderRadius:e.shape.borderRadius,opacity:e.palette.action.disabledOpacity},[`& .${NV["row--dragging"]}`]:{background:e.palette.background.paper,padding:"0 12px",borderRadius:e.shape.borderRadius,opacity:e.palette.action.disabledOpacity,[`& .${NV.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${NV.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${NV.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${NV.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${NV.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})})),Sq=["children","className"],xq=U.forwardRef((function(e,t){const n=AV(),{children:r,className:o}=e,a=_d(e,Sq),i=IV(),s=zV(i,fG),l=zV(i,GV),u=zV(i,PG),c=zV(i,DG),d=U.useRef(null),p=Lh(d,t),f=zV(i,nG),m=Id({},n,{density:u}),g=(e=>{const{autoHeight:t,density:n,classes:r}=e;return eb({root:["root",t&&"autoHeight",`root--density${cm(n)}`]},OV,r)})(m);i.current.rootElementRef=d;const[h,b]=U.useState(!1);return ch((()=>{b(!0)}),[]),ch((()=>{h&&i.current.unstable_updateGridDimensionsRef()}),[i,h]),h?ee.jsx(wq,Id({ref:p,className:KG(o,g.root),ownerState:m,role:"grid","aria-colcount":s.length,"aria-rowcount":c+1+f+l,"aria-multiselectable":!n.disableMultipleSelection,"aria-label":n["aria-label"],"aria-labelledby":n["aria-labelledby"]},a,{children:r})):null})),Eq=["className"],Cq=Wv("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})((({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:`1px solid ${"light"===e.palette.mode?xh(wh(e.palette.divider,1),.88):Sh(wh(e.palette.divider,1),.68)}`}))),kq=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,Eq),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["footerContainer"]},OV,t)})(o);return ee.jsx(Cq,Id({ref:t,className:KG(a.root,n),ownerState:o},r))})),Rq=["className"],Tq=Wv("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})((({theme:e})=>({position:"absolute",top:0,zIndex:4,width:"100%",height:"100%",pointerEvents:"none",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:wh(e.palette.background.default,e.palette.action.disabledOpacity)}))),Iq=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,Rq),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["overlay"]},OV,t)})(o);return ee.jsx(Tq,Id({ref:t,className:KG(a.root,n),ownerState:o},r))})),_q=["className"],Aq=Wv("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})((()=>({display:"flex",visibility:"hidden",width:0}))),Oq=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,_q),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["iconButtonContainer"]},OV,t)})(o);return ee.jsx(Aq,Id({ref:t,className:KG(a.root,n),ownerState:o},r))}));function Nq(e){const{direction:t,index:n,sortingOrder:r}=e,o=IV(),a=AV(),i=(e=>{const{classes:t}=e;return eb({icon:["sortIcon"]},OV,t)})(Id({},e,{classes:a.classes})),s=function(e,t,n,r){let o;const a={};return"asc"===t?o=e.ColumnSortedAscendingIcon:"desc"===t?o=e.ColumnSortedDescendingIcon:(o=e.ColumnUnsortedIcon,a.sortingOrder=r),o?ee.jsx(o,Id({fontSize:"small",className:n},a)):null}(a.components,t,i.icon,r);if(!s)return null;const l=ee.jsx(Uw,{tabIndex:-1,"aria-label":o.current.getLocaleText("columnHeaderSortIconLabel"),title:o.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",children:s});return ee.jsxs(Oq,{children:[null!=n&&ee.jsx(rk,{badgeContent:n,color:"default",children:l}),null==n&&l]})}const Pq=U.memo(Nq),Lq=U.memo((e=>{const{column:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:a}=e,i=IV(),s=AV(),l=(e=>{const{classes:t,open:n}=e;return eb({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},OV,t)})(Id({},e,{classes:s.classes})),u=U.useCallback((e=>{e.preventDefault(),e.stopPropagation(),i.current.toggleColumnMenu(t.field)}),[i,t.field]);return ee.jsx("div",{className:l.root,children:ee.jsx(Uw,{ref:a,tabIndex:-1,className:l.button,"aria-label":i.current.getLocaleText("columnMenuLabel"),title:i.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-expanded":n?"true":void 0,"aria-haspopup":"true","aria-controls":r,id:o,children:ee.jsx(s.components.ColumnMenuIcon,{fontSize:"small"})})})}));function Mq({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:a,target:i,onExited:s}){const l=IV(),u=l.current.getColumn(o),c=U.useCallback((e=>{e.stopPropagation(),l.current.hideColumnMenu()}),[l]);return i?ee.jsx(hq,{placement:"bottom-"+("right"===u.align?"start":"end"),open:a,target:i,onClickAway:c,onExited:s,children:ee.jsx(n,Id({currentColumn:u,hideMenu:c,open:a,id:e,labelledby:t},r))}):null}function Dq(e){return e.replace(/["\\]/g,"\\$&")}function jq(e){return`.${NV.row}[data-id="${Dq(String(e))}"]`}const Fq=["className"],$q=Wv("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})((({theme:e})=>({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:e.typography.fontWeightMedium}))),Bq=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,Fq),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["columnHeaderTitle"]},OV,t)})(o);return ee.jsx($q,Id({ref:t,className:KG(a.root,n),ownerState:o},r))}));function zq(e){var t;const{label:n,description:r,columnWidth:o}=e,a=AV(),i=U.useRef(null),[s,l]=U.useState("");return U.useEffect((()=>{if(!r&&i&&i.current){const t=(e=i.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;l(t?n:"")}var e}),[i,o,r,n]),ee.jsx(a.components.BaseTooltip,Id({title:r||s},null==(t=a.componentsProps)?void 0:t.baseTooltip,{children:ee.jsx(Bq,{ref:i,children:n})}))}const Uq=["resizable","resizing","height","side"];var Hq,Vq;(Vq=Hq||(Hq={})).Left="left",Vq.Right="right";function Gq(e){const{height:t,side:n=Hq.Right}=e,r=_d(e,Uq),o=AV(),a=(e=>{const{resizable:t,resizing:n,classes:r,side:o}=e;return eb({root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${cm(o)}`],icon:["iconSeparator"]},OV,r)})(Id({},e,{side:n,classes:o.classes})),i=U.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return ee.jsx("div",Id({className:a.root,style:{minHeight:t,opacity:o.showColumnRightBorder?0:1}},r,{onClick:i,children:ee.jsx(o.components.ColumnResizeIcon,{className:a.icon})}))}const Wq=U.memo(Gq),qq=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","disableHeaderSeparator"],Kq=U.forwardRef((function(e,t){const{classes:n,columnMenuOpen:r,colIndex:o,height:a,isResizing:i,sortDirection:s,hasFocus:l,tabIndex:u,separatorSide:c,isDraggable:d,headerComponent:p,description:f,width:m,columnMenuIconButton:g=null,columnMenu:h=null,columnTitleIconButtons:b=null,headerClassName:v,label:y,resizable:w,draggableContainerProps:S,columnHeaderSeparatorProps:x,disableHeaderSeparator:E}=e,C=_d(e,qq),k=IV(),R=AV(),T=U.useRef(null),[I,_]=U.useState(r),A=Lh(T,t);let O="none";return null!=s&&(O="asc"===s?"ascending":"descending"),U.useEffect((()=>{I||_(r)}),[I,r]),U.useLayoutEffect((()=>{const e=k.current.state.columnMenu;if(l&&!e.open){const e=T.current.querySelector('[tabindex="0"]')||T.current;null==e||e.focus(),k.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[k,l]),ee.jsxs("div",Id({ref:A,className:KG(n.root,v),style:{height:a,width:m,minWidth:m,maxWidth:m},role:"columnheader",tabIndex:u,"aria-colindex":o+1,"aria-sort":O,"aria-label":null==p?y:void 0},C,{children:[ee.jsxs("div",Id({className:n.draggableContainer,draggable:d},S,{children:[ee.jsxs("div",{className:n.titleContainer,children:[ee.jsx("div",{className:n.titleContainerContent,children:void 0!==p?p:ee.jsx(zq,{label:y,description:f,columnWidth:m})}),b]}),g]})),!E&&ee.jsx(Wq,Id({resizable:!R.disableColumnResize&&!!w,resizing:i,height:a,side:c},x)),h]}))}));function Yq(e){var t,n,r,o,a;const{column:i,columnMenuOpen:s,colIndex:l,headerHeight:u,isResizing:c,isLastColumn:d,sortDirection:p,sortIndex:f,filterItemsCounter:m,hasFocus:g,tabIndex:h,extendRowFullWidth:b,disableReorder:v,separatorSide:y}=e,w=IV(),S=AV(),x=U.useRef(null),E=Oh(),C=Oh(),k=U.useRef(null),[R,T]=U.useState(s),{hasScrollX:I,hasScrollY:_}=null!=(t=w.current.getRootDimensions())?t:{hasScrollX:!1,hasScrollY:!1},A=U.useMemo((()=>!S.disableColumnReorder&&!v&&!i.disableReorder),[S.disableColumnReorder,v,i.disableReorder]);let O;i.renderHeader&&(O=i.renderHeader(w.current.getColumnHeaderParams(i.field)));const N=d?!(d&&I&&!_)&&!b:S.showColumnRightBorder,P=(e=>{const{column:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:a,filterItemsCounter:i}=e,s=null!=o,l=null!=i&&i>0,u="number"===t.type;return eb({root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",s&&"columnHeader--sorted",l&&"columnHeader--filtered",u&&"columnHeader--numeric",a&&"withBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},OV,n)})(Id({},e,{classes:S.classes,showRightBorder:N})),L=U.useCallback((e=>t=>{t.currentTarget.contains(t.target)&&w.current.publishEvent(e,w.current.getColumnHeaderParams(i.field),t)}),[w,i.field]),M=U.useMemo((()=>({onClick:L("columnHeaderClick"),onDoubleClick:L("columnHeaderDoubleClick"),onMouseOver:L("columnHeaderOver"),onMouseOut:L("columnHeaderOut"),onMouseEnter:L("columnHeaderEnter"),onMouseLeave:L("columnHeaderLeave"),onKeyDown:L("columnHeaderKeyDown"),onFocus:L("columnHeaderFocus"),onBlur:L("columnHeaderBlur")})),[L]),D=U.useMemo((()=>A?{onDragStart:L("columnHeaderDragStart"),onDragEnter:L("columnHeaderDragEnter"),onDragOver:L("columnHeaderDragOver"),onDragEnd:L("columnHeaderDragEnd")}:{}),[A,L]),j=U.useMemo((()=>({onMouseDown:L("columnSeparatorMouseDown")})),[L]);U.useEffect((()=>{R||T(s)}),[R,s]);const F=U.useCallback((()=>{T(!1)}),[]),$=!S.disableColumnMenu&&!i.disableColumnMenu&&ee.jsx(Lq,{column:i,columnMenuId:E,columnMenuButtonId:C,open:R,iconButtonRef:k}),B=ee.jsx(Mq,{columnMenuId:E,columnMenuButtonId:C,field:i.field,open:s,target:k.current,ContentComponent:S.components.ColumnMenu,contentComponentProps:null==(n=S.componentsProps)?void 0:n.columnMenu,onExited:F}),z=null!=(r=i.sortingOrder)?r:S.sortingOrder,H=ee.jsxs(U.Fragment,{children:[!S.disableColumnFilter&&ee.jsx(S.components.ColumnHeaderFilterIconButton,Id({field:i.field,counter:m},null==(o=S.componentsProps)?void 0:o.columnHeaderFilterIconButton)),i.sortable&&!i.hideSortIcons&&ee.jsx(Pq,{direction:p,index:f,sortingOrder:z})]});U.useLayoutEffect((()=>{const e=w.current.state.columnMenu;if(g&&!e.open){const e=x.current.querySelector('[tabindex="0"]')||x.current;null==e||e.focus(),w.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[w,g]);const V="function"==typeof i.headerClassName?i.headerClassName({field:i.field,colDef:i}):i.headerClassName,G=null!=(a=i.headerName)?a:i.field;return ee.jsx(Kq,Id({ref:x,classes:P,columnMenuOpen:s,colIndex:l,height:u,isResizing:c,sortDirection:p,hasFocus:g,tabIndex:h,separatorSide:y,isDraggable:A,headerComponent:O,description:i.description,elementId:i.field,width:i.computedWidth,columnMenuIconButton:$,columnTitleIconButtons:H,headerClassName:V,label:G,resizable:!S.disableColumnResize&&!!i.resizable,"data-field":i.field,columnMenu:B,draggableContainerProps:D,columnHeaderSeparatorProps:j},M))}const Xq=e=>e.preferencePanel;var Zq;!function(e){e.filters="filters",e.columns="columns"}(Zq||(Zq={}));const Qq=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","getValue","api"],Jq=U.forwardRef((function(e,t){var n;const{field:r,id:o,value:a,rowNode:i,hasFocus:s,tabIndex:l}=e,u=_d(e,Qq),c=IV(),d=AV(),p=(e=>{const{classes:t}=e;return eb({root:["checkboxInput"]},OV,t)})({classes:d.classes}),f=U.useRef(null),m=U.useRef(),g=Lh(f,t),h=c.current.getCellElement(o,r);U.useLayoutEffect((()=>{0===l&&h&&(h.tabIndex=-1)}),[h,l]),U.useEffect((()=>{if(s){var e;const t=null==(e=f.current)?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else m.current&&m.current.stop({})}),[s]);const b=U.useCallback((t=>{rq(t.key)&&t.stopPropagation(),uq(t.key)&&!t.shiftKey&&c.current.publishEvent("cellNavigationKeyDown",e,t)}),[c,e]);if("footer"===i.position)return null;const v=c.current.isRowSelectable(o),y=c.current.getLocaleText(a?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return i.isPinned?null:ee.jsx(d.components.BaseCheckbox,Id({ref:g,tabIndex:l,checked:a,onChange:e=>{const t={value:e.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:p.root,inputProps:{"aria-label":y},onKeyDown:b,disabled:!v,touchRippleRef:m},null==(n=d.componentsProps)?void 0:n.baseCheckbox,u))})),eK=Jq,tK=e=>e.selection,nK=HV(tK,(e=>e.length)),rK=HV(tK,KV,((e,t)=>new Map(e.map((e=>[e,t[e]]))))),oK=HV(tK,(e=>e.reduce(((e,t)=>(e[t]=t,e)),{}))),aK=e=>e.pagination,iK=HV(aK,(e=>e.page)),sK=HV(aK,(e=>e.pageSize));HV(aK,(e=>e.pageCount));const lK=HV(aK,XV,QV,EG,TG,((e,t,n,r,o)=>{const a=o.length,i=Math.min(e.pageSize*e.page,a-1),s=Math.min(i+e.pageSize-1,a-1);if(-1===i||-1===s)return null;if(n<2)return{firstRowIndex:i,lastRowIndex:s};const l=o[i],u=s-i+1,c=r.findIndex((e=>e.id===l.id));let d=c,p=0;for(;d0)&&(d+=1),0===e&&(p+=1)}return{firstRowIndex:c,lastRowIndex:d-1}})),uK=HV(EG,lK,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),cK=HV(CG,lK,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),dK=["field","colDef"],pK=U.forwardRef((function(e,t){var n;const r=_d(e,dK),[,o]=U.useState(!1),a=IV(),i=AV(),s=(e=>{const{classes:t}=e;return eb({root:["checkboxInput"]},OV,t)})({classes:i.classes}),l=zV(a,pW),u=zV(a,tK),c=zV(a,CG),d=zV(a,cK),p=U.useMemo((()=>"function"!=typeof i.isRowSelectable?u:u.filter((e=>!!a.current.getRow(e)&&i.isRowSelectable(a.current.getRowParams(e))))),[a,i.isRowSelectable,u]),f=U.useMemo((()=>(i.pagination&&i.checkboxSelectionVisibleOnly?d:c).reduce(((e,t)=>(e[t]=!0,e)),{})),[i.pagination,i.checkboxSelectionVisibleOnly,d,c]),m=U.useMemo((()=>p.filter((e=>f[e])).length),[p,f]),g=m>0&&m0,b=null!==l&&l.field===e.field?0:-1;U.useLayoutEffect((()=>{const t=a.current.getColumnHeaderElement(e.field);0===b&&t&&(t.tabIndex=-1)}),[b,a,e.field]);const v=U.useCallback((t=>{" "===t.key&&a.current.publishEvent("headerSelectionCheckboxChange",{value:!h}),uq(t.key)&&!t.shiftKey&&a.current.publishEvent("columnHeaderNavigationKeyDown",e,t)}),[a,e,h]),y=U.useCallback((()=>{o((e=>!e))}),[]);U.useEffect((()=>a.current.subscribeEvent("selectionChange",y)),[a,y]);const w=a.current.getLocaleText(h?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return ee.jsx(i.components.BaseCheckbox,Id({ref:t,indeterminate:g,checked:h,onChange:e=>{const t={value:e.target.checked};a.current.publishEvent("headerSelectionCheckboxChange",t)},className:s.root,inputProps:{"aria-label":w},tabIndex:b,onKeyDown:v},null==(n=i.componentsProps)?void 0:n.baseCheckbox,r))})),fK=e=>{const{onClick:t}=e,n=IV(),r=AV(),o=U.useCallback((e=>{t(e),n.current.showPreferences(Zq.columns)}),[n,t]);return r.disableColumnSelector?null:ee.jsx(xA,{onClick:o,children:n.current.getLocaleText("columnMenuShowColumns")})},mK=e=>{const{column:t,onClick:n}=e,r=IV(),o=AV(),a=U.useCallback((e=>{n(e),r.current.showFilterPanel(null==t?void 0:t.field)}),[r,null==t?void 0:t.field,n]);return o.disableColumnFilter||null==t||!t.filterable?null:ee.jsx(xA,{onClick:a,children:r.current.getLocaleText("columnMenuFilter")})},gK=["hideMenu","currentColumn","open","id","labelledby","className","children"],hK=U.forwardRef((function(e,t){const{hideMenu:n,open:r,id:o,labelledby:a,className:i,children:s}=e,l=_d(e,gK),u=U.useCallback((e=>{var t;nq(e.key)&&e.preventDefault(),t=e.key,(nq(t)||eq(t))&&n(e)}),[n]);return ee.jsx(X_,Id({id:o,ref:t,className:KG(NV.menuList,i),"aria-labelledby":a,onKeyDown:u,autoFocus:r},l,{children:s}))})),bK=$V(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),vK=(e,t)=>t&&e.length>1?(bK(),[e[0]]):e,yK=(e,t)=>n=>Id({},n,{sorting:Id({},n.sorting,{sortModel:vK(e,t)})}),wK=(e,t)=>{const n=e.indexOf(t);return t&&-1!==n&&n+1!==e.length?e[n+1]:e[0]},SK=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,xK=new Intl.Collator,EK=(e,t)=>{const n=SK(e,t);return null!==n?n:Number(e)-Number(t)},CK=(e,t)=>{const n=SK(e,t);return null!==n?n:e>t?1:eMath.max(t,Math.min(n,e));function IK(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{let t=e+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}(e);return()=>t+(n-t)*r()}function AK(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}const OK=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function NK(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:a,color:i,error:s,helperText:l,size:u,variant:c}=e,d=_d(e,OK),p={color:i,error:s,helperText:l,size:u,variant:c},[f,m]=U.useState(t.value||[]),g=Oh(),h=AV();U.useEffect((()=>{var e;const n=null!=(e=t.value)?e:[];m(n.map(String))}),[t.value]);const b=U.useCallback(((e,r)=>{m(r.map(String)),n(Id({},t,{value:[...r]}))}),[n,t]);return ee.jsx(PC,Id({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:n}=t;return null==n||""===n?[]:[n]},id:g,value:f,onChange:b,renderTags:(e,t)=>e.map(((e,n)=>ee.jsx(VE,Id({variant:"outlined",size:"small",label:e},t({index:n}))))),renderInput:e=>{var t;return ee.jsx(h.components.BaseTextField,Id({},e,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:Id({},e.InputLabelProps,{shrink:!0}),inputRef:a,type:r||"text"},p,null==(t=h.componentsProps)?void 0:t.baseTextField))}},d))}const PK={width:100,minWidth:50,maxWidth:1/0,hide:!1,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const n=SK(e,t);return null!==n?n:"string"==typeof e?xK.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>[{value:"contains",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(RK(n),"i");return({value:e})=>null!=e&&r.test(e.toString())},InputComponent:XW},{value:"equals",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return({value:e})=>null!=e&&0===r.compare(n,e.toString())},InputComponent:XW},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${RK(n)}.*$`,"i");return({value:e})=>null!=e&&r.test(e.toString())},InputComponent:XW},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${RK(n)}$`,"i");return({value:e})=>null!=e&&r.test(e.toString())},InputComponent:XW},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>""!==e&&null!=e,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())),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return({value:e})=>null!=e&&n.some((t=>0===r.compare(t,e.toString()||"")))},InputComponent:NK}])(),renderEditCell:e=>ee.jsx(JW,Id({},e)),getApplyQuickFilterFn:e=>{if(!e)return null;const t=new RegExp(RK(e),"i");return({value:e})=>null!=e&&t.test(e.toString())}},LK="actions",MK=Id({},PK,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>ee.jsx(vq,Id({},e)),getApplyQuickFilterFn:void 0}),DK=["item","applyValue","apiRef","focusElementRef"];function jK(e){var t,n,r,o;const{item:a,applyValue:i,apiRef:s,focusElementRef:l}=e,u=_d(e,DK),[c,d]=U.useState(a.value||""),p=AV(),f=null==(n=((null==(t=p.componentsProps)?void 0:t.baseSelect)||{}).native)||n,m=f?"option":xA,g=U.useCallback((e=>{const t=e.target.value;d(t),i(Id({},a,{value:t}))}),[i,a]);return U.useEffect((()=>{d(a.value||"")}),[a.value]),ee.jsxs(p.components.BaseTextField,Id({label:s.current.getLocaleText("filterPanelInputLabel"),value:c,onChange:g,select:!0,variant:"standard",SelectProps:Id({native:f,displayEmpty:!0},null==(r=p.componentsProps)?void 0:r.baseSelect),InputLabelProps:{shrink:!0},inputRef:l},u,null==(o=p.componentsProps)?void 0:o.baseTextField,{children:[ee.jsx(m,{value:"",children:s.current.getLocaleText("filterValueAny")}),ee.jsx(m,{value:"true",children:s.current.getLocaleText("filterValueTrue")}),ee.jsx(m,{value:"false",children:s.current.getLocaleText("filterValueFalse")})]}))}const FK=Id({},PK,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>e.rowNode.isAutoGenerated?"":ee.jsx(bW,Id({},e)),renderEditCell:e=>ee.jsx(yW,Id({},e)),sortComparator:EK,valueFormatter:function({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")},filterOperators:[{value:"is",getApplyFilterFn:e=>{if(!e.value)return null;const t="true"===e.value;return({value:e})=>Boolean(e)===t},InputComponent:jK}],getApplyQuickFilterFn:void 0,aggregable:!1}),$K="__check__",BK=Id({},FK,{field:$K,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,valueGetter:e=>void 0!==oK(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>ee.jsx(pK,Id({},e)),renderCell:e=>ee.jsx(eK,Id({},e))}),zK=["item","applyValue","type","apiRef","focusElementRef","InputProps"];function UK(e){var t,n;const{item:r,applyValue:o,type:a,apiRef:i,focusElementRef:s,InputProps:l}=e,u=_d(e,zK),c=U.useRef(),[d,p]=U.useState(null!=(t=r.value)?t:""),[f,m]=U.useState(!1),g=Oh(),h=AV(),b=U.useCallback((e=>{const t=e.target.value;clearTimeout(c.current),p(String(t)),m(!0),c.current=setTimeout((()=>{o(Id({},r,{value:t})),m(!1)}),500)}),[o,r]);return U.useEffect((()=>()=>{clearTimeout(c.current)}),[]),U.useEffect((()=>{var e;const t=null!=(e=r.value)?e:"";p(String(t))}),[r.value]),ee.jsx(h.components.BaseTextField,Id({id:g,label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),value:d,onChange:b,variant:"standard",type:a||"text",InputLabelProps:{shrink:!0},inputRef:s,InputProps:Id({},f?{endAdornment:ee.jsx(BW,{})}:{},l,{inputProps:Id({max:"datetime-local"===a?"9999-12-31T23:59":"9999-12-31"},null==l?void 0:l.inputProps)})},u,null==(n=h.componentsProps)?void 0:n.baseTextField))}const HK=/(\d+)-(\d+)-(\d+)/,VK=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function GK(e,t,n,r){if(!e.value)return null;const[o,a,i,s,l]=e.value.match(n?VK:HK).slice(1).map(Number),u=new Date(o,a-1,i,s||0,l||0).getTime();return({value:e})=>{if(!e)return!1;const o=e instanceof Date?e:new Date(e.toString());if(r)return t(o.getTime(),u);const a=(e instanceof Date?new Date(o):o).setHours(n?o.getHours():0,n?o.getMinutes():0,0,0);return t(a,u)}}const WK=e=>[{value:"is",getApplyFilterFn:t=>GK(t,((e,t)=>e===t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>GK(t,((e,t)=>e!==t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>GK(t,((e,t)=>e>t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>GK(t,((e,t)=>e>=t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>GK(t,((e,t)=>eGK(t,((e,t)=>e<=t),e),InputComponent:UK,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>null!=e,requiresFilterValue:!1}];const qK=Id({},PK,{type:"date",sortComparator:CK,valueFormatter:function({value:e}){return e instanceof Date?e.toLocaleDateString():null!=e?e:""},filterOperators:WK(),renderEditCell:EW,getApplyQuickFilterFn:void 0}),KK=Id({},PK,{type:"dateTime",sortComparator:CK,valueFormatter:function({value:e}){return e instanceof Date?e.toLocaleString():null!=e?e:""},filterOperators:WK(!0),renderEditCell:EW,getApplyQuickFilterFn:void 0}),YK=e=>null==e?null:Number(e),XK=Id({},PK,{type:"number",align:"right",headerAlign:"right",sortComparator:EK,valueParser:e=>""===e?null:Number(e),valueFormatter:({value:e})=>function(e){return"number"==typeof e}(e)?e.toLocaleString():e||"",filterOperators:[{label:"=",value:"=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>YK(t)===e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{label:"!=",value:"!=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>YK(t)!==e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{label:">",value:">",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&YK(t)>e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{label:">=",value:">=",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&YK(t)>=e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{label:"<",value:"<",getApplyFilterFn:e=>null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&YK(t)null==e.value||Number.isNaN(e.value)?null:({value:t})=>null!=t&&YK(t)<=e.value,InputComponent:XW,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>({value:e})=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>({value:e})=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>Array.isArray(e.value)&&0!==e.value.length?({value:t})=>null!=t&&e.value.includes(Number(t)):null,InputComponent:NK,InputComponentProps:{type:"number"}}],getApplyQuickFilterFn:e=>null==e||Number.isNaN(e)||""===e?null:({value:t})=>YK(t)===YK(e)}),ZK=["item","applyValue","type","apiRef","focusElementRef"],QK=({valueOptions:e,valueFormatter:t,field:n},r,o)=>("function"==typeof e?["",...e({field:n})]:["",...e||[]]).map((e=>{const a="object"==typeof e,i=a?e.value:e,s=a?e.value:e,l=t&&""!==e?t({value:e,field:n,api:r}):e,u=a?e.label:l;return ee.jsx(o,{value:s,children:u},i)}));function JK(e){var t,n,r,o,a;const{item:i,applyValue:s,type:l,apiRef:u,focusElementRef:c}=e,d=_d(e,ZK),[p,f]=U.useState(null!=(t=i.value)?t:""),m=Oh(),g=AV(),h=null==(r=((null==(n=g.componentsProps)?void 0:n.baseSelect)||{}).native)||r,b=i.columnField?u.current.getColumn(i.columnField):null,v=U.useMemo((()=>{if(null!==b)return"function"==typeof b.valueOptions?b.valueOptions({field:b.field}):b.valueOptions}),[b]),y=U.useCallback((e=>{let t=e.target.value;t=WW(t,v),f(String(t)),s(Id({},i,{value:t}))}),[s,i,v]);return U.useEffect((()=>{var e;let t;if(void 0!==v){if(t=WW(i.value,v),t!==i.value)return void s(Id({},i,{value:t}))}else t=i.value;t=null!=(e=t)?e:"",f(String(t))}),[i,v,s]),ee.jsx(g.components.BaseTextField,Id({id:m,label:u.current.getLocaleText("filterPanelInputLabel"),placeholder:u.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:y,variant:"standard",type:l||"text",InputLabelProps:{shrink:!0},inputRef:c,select:!0,SelectProps:Id({native:h},null==(o=g.componentsProps)?void 0:o.baseSelect)},d,null==(a=g.componentsProps)?void 0:a.baseTextField,{children:QK(u.current.getColumn(i.columnField),u.current,h?"option":xA)}))}const eY=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],tY=(e,t)=>GW(e)===GW(t),nY=vE();function rY(e){const{item:t,applyValue:n,apiRef:r,focusElementRef:o,color:a,error:i,helperText:s,size:l,variant:u="standard"}=e,c=_d(e,eY),d={color:a,error:i,helperText:s,size:l,variant:u},p=Oh(),f=AV(),m=t.columnField?r.current.getColumn(t.columnField):null,g=U.useMemo((()=>null!=m&&m.valueOptions?"function"==typeof m.valueOptions?m.valueOptions({field:m.field}):m.valueOptions:[]),[m]),h=U.useMemo((()=>null==g?void 0:g.map(GW)),[g]),{valueFormatter:b,field:v}=r.current.getColumn(t.columnField),y=e=>"object"==typeof e?e.label:b&&""!==e?b({value:e,field:v,api:r.current}):e,w=U.useMemo((()=>{if(!Array.isArray(t.value))return[];if(void 0!==g){return t.value.map((e=>{const t=GW(e);return(null==h?void 0:h.findIndex((e=>e===t)))||0})).filter((e=>e>=0)).map((e=>g[e]))}return t.value}),[t.value,g,h]);U.useEffect((()=>{Array.isArray(t.value)&&w.length===t.value.length||n(Id({},t,{value:w.map(GW)}))}),[t,w,n]);const S=U.useCallback(((e,r)=>{n(Id({},t,{value:[...r.map(GW)]}))}),[n,t]);return ee.jsx(PC,Id({multiple:!0,options:g,isOptionEqualToValue:tY,filterOptions:nY,id:p,value:w,onChange:S,renderTags:(e,t)=>e.map(((e,n)=>ee.jsx(VE,Id({variant:"outlined",size:"small",label:y(e)},t({index:n}))))),renderInput:e=>{var t;return ee.jsx(f.components.BaseTextField,Id({},e,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:Id({},e.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,null==(t=f.componentsProps)?void 0:t.baseTextField))}},c))}const oY=e=>null==e||"object"!=typeof e?e:e.value,aY=Id({},PK,{type:"singleSelect",renderEditCell:e=>ee.jsx(pq,Id({},e)),filterOperators:[{value:"is",getApplyFilterFn:e=>null==e.value||""===e.value?null:({value:t})=>oY(t)===oY(e.value),InputComponent:JK},{value:"not",getApplyFilterFn:e=>null==e.value||""===e.value?null:({value:t})=>oY(t)!==oY(e.value),InputComponent:JK},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(oY);return({value:e})=>t.includes(oY(e))},InputComponent:rY}],getApplyQuickFilterFn:(e,t,n)=>{if(!e)return null;const{valueOptions:r,valueFormatter:o,field:a}=t,i=[oY(e).toString()],s="function"==typeof r?r({field:a}):r||[];return s&&s.forEach((t=>{let r,s;"object"==typeof t?(r=t.value,s=t.label):(r=t,s=o?o({value:t,field:a,api:n.current}):t),s.slice(0,e.length).toLowerCase()===e.toLowerCase()&&(i.includes(r)||i.push(r.toString()))})),({value:e})=>null!=e&&i.includes(oY(e).toString())}}),iY="__default__",sY=["maxWidth","minWidth","width","flex"],lY=(e={})=>{const t=Id({},{string:PK,number:XK,date:qK,dateTime:KK,boolean:FK,singleSelect:aY,[LK]:MK,[iY]:PK});return Object.entries(e).forEach((([e,n])=>{t[e]?t[e]=Id({},t[e],n):t[e]=Id({},t[n.extendType||iY],n)})),t};const uY=(e,t)=>{const n={};let r=0,o=0;const a=[];e.all.forEach((t=>{const i=Id({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])i.computedWidth=0;else{let e;i.flex&&i.flex>0?(r+=i.flex,e=0,a.push(i)):e=TK(i.width,i.minWidth,i.maxWidth),o+=e,i.computedWidth=e}n[t]=i}));const i=Math.max(t-o,0);if(r>0&&t>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const 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 o(){if(r.frozenFields.length===n.length)return;const a={min:{},max:{}};let i=e,s=t,l=0;r.frozenFields.forEach((e=>{i-=r.all[e].computedWidth,s-=r.all[e].flex}));for(let e=0;et.maxWidth&&(l+=t.maxWidth-o,o=t.maxWidth,a.max[t.field]=!0),r.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}l<0?Object.keys(a.max).forEach((e=>{r.freeze(e)})):l>0?Object.keys(a.min).forEach((e=>{r.freeze(e)})):n.forEach((({field:e})=>{r.freeze(e)})),o()}(),r.all}({initialFreeSpace:i,totalFlexUnits:r,flexColumns:a});Object.keys(e).forEach((t=>{n[t].computedWidth=e[t].computedWidth}))}return Id({},e,{lookup:n})},cY=({apiRef:e,columnsToUpsert:t,initialState:n,columnTypes:r,currentColumnVisibilityModel:o=pG(e),shouldRegenColumnVisibilityModelFromColumns:a,keepOnlyColumnsToUpsert:i=!1})=>{var s,l,u,c;const d=!e.current.state.columns;let p;if(d)p={all:[],lookup:{}};else{const t=lG(e.current.state);p={all:i?[]:[...t.all],lookup:Id({},t.lookup)}}let f={};i&&!d&&(f=Object.keys(p.lookup).reduce(((e,t)=>Id({},e,{[t]:!1})),{}));const m={};t.forEach((e=>{const{field:t}=e;m[t]=!0,f[t]=!0;let n=p.lookup[t];null==n?(n=Id({},((e,t)=>t&&e[t]?e[t]:e[iY])(r,e.type),{field:t,hasBeenResized:!1}),p.all.push(t)):i&&p.all.push(t);let o=n.hasBeenResized;sY.forEach((t=>{void 0!==e[t]&&(o=!0,-1===e[t]&&(e[t]=1/0))})),p.lookup[t]=Id({},n,{hide:null!=e.hide&&e.hide},e,{hasBeenResized:o})})),i&&!d&&Object.keys(p.lookup).forEach((e=>{f[e]||delete p.lookup[e]}));const g=Id({},p.lookup),h=e.current.unstable_applyPipeProcessors("hydrateColumns",p);let b={};if(a){let t=!1;const n=Id({},o);d?h.all.forEach((e=>{n[e]=!p.lookup[e].hide})):i&&Object.keys(n).forEach((e=>{h.lookup[e]||(delete n[e],t=!0)})),h.all.forEach((r=>{if(!m[r]&&g[r]===h.lookup[r])return;let a=o[r];if(void 0===a)if(d)a=!0;else{a=!!lG(e.current.state).lookup[r]}const i=!h.lookup[r].hide;i!==a&&(t=!0,n[r]=i)})),b=t||d?n:o}else b=o;const v=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(0===o.length&&0===n.length)return e;const a={},i=[];for(let u=0;u!a[e]))],l=Id({},e.lookup);for(let u=0;u{t[e]=-1===n?1/0:n})),l[e]=t}return{all:s,lookup:l}})(h,n),y=Id({},v,{columnVisibilityModel:b});return uY(y,null!=(s=null==(l=(u=e.current).getRootDimensions)||null==(c=l.call(u))?void 0:c.viewportInnerSize.width)?s:0)},dY=e=>t=>Id({},t,{columns:e});function pY({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let a=e;for(let i=n;i{const{column:t,onClick:n}=e,r=IV(),o=AV(),a=U.useRef(),i=1===fG(r).filter((e=>!0!==e.disableColumnMenu)).length,s=U.useCallback((e=>{i||(n(e),a.current=setTimeout((()=>{r.current.setColumnVisibility(null==t?void 0:t.field,!1)}),100))}),[r,null==t?void 0:t.field,n,i]);return U.useEffect((()=>()=>clearTimeout(a.current)),[]),o.disableColumnSelector||!1===t.hideable?null:ee.jsx(xA,{onClick:s,disabled:i,children:r.current.getLocaleText("columnMenuHideColumn")})};function gY(e){var t;const{column:n,onClick:r}=e,o=IV(),a=zV(o,iG),i=AV(),s=null!=(t=n.sortingOrder)?t:i.sortingOrder,l=U.useMemo((()=>{if(!n)return null;const e=a.find((e=>e.field===n.field));return null==e?void 0:e.sort}),[n,a]),u=U.useCallback((e=>{r(e);const t=e.currentTarget.getAttribute("data-value")||null;o.current.sortColumn(n,t)}),[o,n,r]);return n&&n.sortable?ee.jsxs(U.Fragment,{children:[s.includes(null)?ee.jsx(xA,{onClick:u,disabled:null==l,children:o.current.getLocaleText("columnMenuUnsort")}):null,s.includes("asc")?ee.jsx(xA,{onClick:u,"data-value":"asc",disabled:"asc"===l,children:o.current.getLocaleText("columnMenuSortAsc")}):null,s.includes("desc")?ee.jsx(xA,{onClick:u,"data-value":"desc",disabled:"desc"===l,children:o.current.getLocaleText("columnMenuSortDesc")}):null]}):null}const hY=U.forwardRef((function(e,t){const{hideMenu:n,currentColumn:r}=e,o=IV(),a=[ee.jsx(gY,{onClick:n,column:r}),ee.jsx(mK,{onClick:n,column:r}),ee.jsx(mY,{onClick:n,column:r}),ee.jsx(fK,{onClick:n,column:r})],i=o.current.unstable_applyPipeProcessors("columnMenu",a,r);return ee.jsx(hK,Id({ref:t},e,{children:i.map(((e,t)=>U.cloneElement(e,{key:t,onClick:n,column:r})))}))})),bY=["className"],vY=e=>{const{classes:t}=e;return eb({root:["panelContent"]},OV,t)},yY=Wv("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function wY(e){const{className:t}=e,n=_d(e,bY),r=AV(),o=vY(r);return ee.jsx(yY,Id({className:KG(t,o.root),ownerState:r},n))}const SY=["className"],xY=e=>{const{classes:t}=e;return eb({root:["panelFooter"]},OV,t)},EY=Wv("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})((({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"})));function CY(e){const{className:t}=e,n=_d(e,SY),r=AV(),o=xY(r);return ee.jsx(EY,Id({className:KG(t,o.root),ownerState:r},n))}const kY=["className"],RY=e=>{const{classes:t}=e;return eb({root:["panelHeader"]},OV,t)},TY=Wv("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})((({theme:e})=>({padding:e.spacing(1)})));function IY(e){const{className:t}=e,n=_d(e,kY),r=AV(),o=RY(r);return ee.jsx(TY,Id({className:KG(t,o.root),ownerState:r},n))}const _Y=["className","slotProps"],AY=Wv("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),OY=()=>!0,NY=U.forwardRef((function(e,t){const{className:n,slotProps:r={}}=e,o=_d(e,_Y),a=AV(),i=(e=>{const{classes:t}=e;return eb({root:["panelWrapper"]},OV,t)})(a);return ee.jsx(IS,Id({open:!0,disableEnforceFocus:!0,isEnabled:OY},r.TrapFocus,{children:ee.jsx(AY,Id({ref:t,tabIndex:-1,className:KG(n,i.root),ownerState:a},o))}))})),PY=["sort","searchPredicate","autoFocusSearchField"],LY=Wv("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),MY=Wv("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})((({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${eP.root}`]:{marginRight:e.spacing(.5)}}))),DY=(Wv(Uw)({justifyContent:"flex-end"}),new Intl.Collator),jY=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;const FY=["children","className","classes"],$Y=kg("MuiDataGrid",["panel","paper"]),BY=Wv(AE,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})((({theme:e})=>({zIndex:e.zIndex.modal}))),zY=Wv(Ly,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>({backgroundColor:e.palette.background.paper,minWidth:300,maxHeight:450,display:"flex"}))),UY=U.forwardRef(((e,t)=>{var n;const{children:r,className:o}=e,a=_d(e,FY),i=IV(),s=AV(),l=$Y,[u,c]=U.useState(!1),d=U.useCallback((()=>{i.current.hidePreferences()}),[i]),p=U.useCallback((e=>{eq(e.key)&&i.current.hidePreferences()}),[i]),f=U.useMemo((()=>[{name:"flip",enabled:!1},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}]),[]),m=null==(n=i.current.columnHeadersContainerElementRef)?void 0:n.current;return m?ee.jsx(BY,Id({ref:t,placement:"bottom-start",className:KG(o,l.panel),ownerState:s,anchorEl:m,modifiers:f},a,{children:ee.jsx(CS,{mouseEvent:"onMouseUp",onClickAway:d,children:ee.jsx(zY,{className:l.paper,ownerState:s,elevation:8,onKeyDown:p,children:u&&r})})})):null})),HY=U.forwardRef((function(e,t){var n,r,o;const a=IV(),i=zV(a,dG),s=AV(),l=zV(a,Xq),u=a.current.unstable_applyPipeProcessors("preferencePanel",null,null!=(n=l.openedPanelValue)?n:Zq.filters);return ee.jsx(s.components.Panel,Id({ref:t,as:s.components.BasePopper,open:i.length>0&&l.open},null==(r=s.componentsProps)?void 0:r.panel,e,null==(o=s.componentsProps)?void 0:o.basePopper,{children:u}))})),VY=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","linkOperators","columnsSort","deleteIconProps","linkOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],GY=["InputComponentProps"],WY=Wv("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})((({theme:e})=>({display:"flex",padding:e.spacing(1)}))),qY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})((({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)}))),KY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormLinkOperatorInput",overridesResolver:(e,t)=>t.filterFormLinkOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),YY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),XY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),ZY=Wv(MT,{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),QY=e=>{switch(e){case eW.And:return"filterPanelOperatorAnd";case eW.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `linkOperator` property in the `GridFilterPanel`.")}},JY=e=>e.headerName||e.field,eX=new Intl.Collator,tX=U.forwardRef((function(e,t){var n,r,o,a,i,s,l;const{item:u,hasMultipleFilters:c,deleteFilter:d,applyFilterChanges:p,multiFilterOperator:f,showMultiFilterOperators:m,disableMultiFilterOperator:g,applyMultiFilterOperatorChanges:h,focusElementRef:b,linkOperators:v=[eW.And,eW.Or],columnsSort:y,deleteIconProps:w={},linkOperatorInputProps:S={},operatorInputProps:x={},columnInputProps:E={},valueInputProps:C={}}=e,k=_d(e,VY),R=IV(),T=zV(R,hG),I=Oh(),_=Oh(),A=Oh(),O=Oh(),N=AV(),P=(e=>{const{classes:t}=e;return eb({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],linkOperatorInput:["filterFormLinkOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},OV,t)})(N),L=U.useRef(null),M=U.useRef(null),D=c&&v.length>0,j=(null==(n=N.componentsProps)?void 0:n.baseFormControl)||{},F=null==(o=((null==(r=N.componentsProps)?void 0:r.baseSelect)||{}).native)||o,$=F?"option":xA,{InputComponentProps:B}=C,z=_d(C,GY),H=U.useMemo((()=>{switch(y){case"asc":return T.sort(((e,t)=>eX.compare(JY(e),JY(t))));case"desc":return T.sort(((e,t)=>-eX.compare(JY(e),JY(t))));default:return T}}),[T,y]),V=u.columnField?R.current.getColumn(u.columnField):null,G=U.useMemo((()=>{var e;return u.operatorValue&&V?null==(e=V.filterOperators)?void 0:e.find((e=>e.value===u.operatorValue)):null}),[u,V]),W=U.useCallback((e=>{const t=e.target.value,n=R.current.getColumn(t);if(n.field===V.field)return;const r=n.filterOperators.find((e=>e.value===u.operatorValue))||n.filterOperators[0],o=!r.InputComponent||r.InputComponent!==(null==G?void 0:G.InputComponent);p(Id({},u,{columnField:t,operatorValue:r.value,value:o?void 0:u.value}))}),[R,p,u,V,G]),q=U.useCallback((e=>{const t=e.target.value,n=null==V?void 0:V.filterOperators.find((e=>e.value===t)),r=!(null!=n&&n.InputComponent)||(null==n?void 0:n.InputComponent)!==(null==G?void 0:G.InputComponent);p(Id({},u,{operatorValue:t,value:r?void 0:u.value}))}),[p,u,V,G]),K=U.useCallback((e=>{const t=e.target.value===eW.And.toString()?eW.And:eW.Or;h(t)}),[h]);return U.useImperativeHandle(b,(()=>({focus:()=>{var e;null!=G&&G.InputComponent?null==L||null==(e=L.current)||e.focus():M.current.focus()}})),[G]),ee.jsxs(WY,Id({ref:t,className:P.root,ownerState:N},k,{children:[ee.jsx(qY,Id({variant:"standard",as:N.components.BaseFormControl},j,w,{className:KG(P.deleteIcon,j.className,w.className),ownerState:N,children:ee.jsx(Uw,{"aria-label":R.current.getLocaleText("filterPanelDeleteIconLabel"),title:R.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{N.disableMultipleColumnsFiltering?void 0===u.value?d(u):p(Id({},u,{value:void 0})):d(u)},size:"small",children:ee.jsx(N.components.FilterPanelDeleteIcon,{fontSize:"small"})})})),ee.jsx(KY,Id({variant:"standard",as:N.components.BaseFormControl},j,S,{sx:Id({display:D?"flex":"none",visibility:m?"visible":"hidden"},j.sx||{},S.sx||{}),className:KG(P.linkOperatorInput,j.className,S.className),ownerState:N,children:ee.jsx(N.components.BaseSelect,Id({inputProps:{"aria-label":R.current.getLocaleText("filterPanelLinkOperator")},value:f,onChange:K,disabled:!!g||1===v.length,native:F},null==(a=N.componentsProps)?void 0:a.baseSelect,{children:v.map((e=>ee.jsx($,{value:e.toString(),children:R.current.getLocaleText(QY(e))},e.toString())))}))})),ee.jsxs(YY,Id({variant:"standard",as:N.components.BaseFormControl},j,E,{className:KG(P.columnInput,j.className,E.className),ownerState:N,children:[ee.jsx(MI,{htmlFor:I,id:_,children:R.current.getLocaleText("filterPanelColumns")}),ee.jsx(N.components.BaseSelect,Id({labelId:_,id:I,label:R.current.getLocaleText("filterPanelColumns"),value:u.columnField||"",onChange:W,native:F},null==(i=N.componentsProps)?void 0:i.baseSelect,{children:H.map((e=>ee.jsx($,{value:e.field,children:JY(e)},e.field)))}))]})),ee.jsxs(XY,Id({variant:"standard",as:N.components.BaseFormControl},j,x,{className:KG(P.operatorInput,j.className,x.className),ownerState:N,children:[ee.jsx(MI,{htmlFor:A,id:O,children:R.current.getLocaleText("filterPanelOperators")}),ee.jsx(N.components.BaseSelect,Id({labelId:O,label:R.current.getLocaleText("filterPanelOperators"),id:A,value:u.operatorValue,onChange:q,native:F,inputRef:M},null==(s=N.componentsProps)?void 0:s.baseSelect,{children:null==V||null==(l=V.filterOperators)?void 0:l.map((e=>ee.jsx($,{value:e.value,children:e.label||R.current.getLocaleText(`filterOperator${cm(e.value)}`)},e.value)))}))]})),ee.jsx(ZY,Id({variant:"standard",as:N.components.BaseFormControl},j,z,{className:KG(P.valueInput,j.className,z.className),ownerState:N,children:null!=G&&G.InputComponent?ee.jsx(G.InputComponent,Id({apiRef:R,item:u,applyValue:p,focusElementRef:L},G.InputComponentProps,B)):null}))]}))})),nX=["linkOperators","columnsSort","filterFormProps","children"],rX=U.forwardRef((function(e,t){var n;const r=IV(),o=AV(),a=zV(r,wG),i=zV(r,hG),s=U.useRef(null),{linkOperators:l=[eW.And,eW.Or],columnsSort:u,filterFormProps:c}=e,d=_d(e,nX),p=U.useCallback((e=>{r.current.upsertFilterItem(e)}),[r]),f=U.useCallback((e=>{r.current.setFilterLinkOperator(e)}),[r]),m=U.useCallback((()=>{const e=i.find((e=>{var t;return null==(t=e.filterOperators)?void 0:t.length}));return e?{columnField:e.field,operatorValue:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}:null}),[i]),g=U.useMemo((()=>{if(a.items.length)return a.items;const e=m();return e?[e]:[]}),[a.items,m]),h=g.length>1,b=U.useCallback((e=>{const t=1===g.length;r.current.deleteFilterItem(e),t&&r.current.hideFilterPanel()}),[r,g.length]);return U.useEffect((()=>{l.length>0&&a.linkOperator&&!l.includes(a.linkOperator)&&f(l[0])}),[l,f,a.linkOperator]),U.useEffect((()=>{g.length>0&&s.current.focus()}),[g.length]),ee.jsxs(NY,Id({ref:t},d,{children:[ee.jsx(wY,{children:g.map(((e,t)=>ee.jsx(tX,Id({item:e,applyFilterChanges:p,deleteFilter:b,hasMultipleFilters:h,showMultiFilterOperators:t>0,multiFilterOperator:a.linkOperator,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:f,focusElementRef:t===g.length-1?s:null,linkOperators:l,columnsSort:u},c),null==e.id?t:e.id)))}),!o.disableMultipleColumnsFiltering&&ee.jsx(CY,{children:ee.jsx(o.components.BaseButton,Id({onClick:()=>{const e=m();e&&r.current.upsertFilterItems([...g,e])},startIcon:ee.jsx(FW,{})},null==(n=o.componentsProps)?void 0:n.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")}))})]}))})),oX=["hideMenu","options"],aX=["hideMenu","options"],iX=e=>{const t=IV(),{hideMenu:n,options:r}=e,o=_d(e,oX);return ee.jsx(xA,Id({onClick:()=>{t.current.exportDataAsCsv(r),null==n||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))},sX=e=>{const t=IV(),{hideMenu:n,options:r}=e,o=_d(e,aX);return ee.jsx(xA,Id({onClick:()=>{t.current.exportDataAsPrint(r),null==n||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))},lX=()=>({items:[],linkOperator:eW.And,quickFilterValues:[],quickFilterLogicOperator:eW.And}),uX=["className","rowCount","visibleRowCount"],cX=Wv("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})((({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)}))),dX=U.forwardRef((function(e,t){const{className:n,rowCount:r,visibleRowCount:o}=e,a=_d(e,uX),i=IV(),s=AV(),l=(e=>{const{classes:t}=e;return eb({root:["rowCount"]},OV,t)})(s);if(0===r)return null;const u=ot.selectedRowCount})((({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}))),mX=U.forwardRef((function(e,t){const{className:n,selectedRowCount:r}=e,o=_d(e,pX),a=IV(),i=AV(),s=(e=>{const{classes:t}=e;return eb({root:["selectedRowCount"]},OV,t)})(i),l=a.current.getLocaleText("footerRowSelected")(r);return ee.jsx(fX,Id({ref:t,className:KG(s.root,n),ownerState:i},o,{children:l}))})),gX=U.forwardRef((function(e,t){var n;const r=IV(),o=AV(),a=zV(r,qV),i=zV(r,nK),s=zV(r,_G),l=!o.hideFooterSelectedRowCount&&i>0?ee.jsx(mX,{selectedRowCount:i}):ee.jsx("div",{}),u=o.hideFooterRowCount||o.pagination?null:ee.jsx(dX,{rowCount:a,visibleRowCount:s}),c=o.pagination&&!o.hideFooterPagination&&o.components.Pagination&&ee.jsx(o.components.Pagination,Id({},null==(n=o.componentsProps)?void 0:n.pagination));return ee.jsxs(kq,Id({ref:t},e,{children:[l,u,c]}))})),hX=U.forwardRef((function(e,t){var n,r;const o=AV();return ee.jsxs("div",Id({ref:t},e,{children:[ee.jsx(o.components.PreferencesPanel,Id({},null==(n=o.componentsProps)?void 0:n.preferencesPanel)),o.components.Toolbar&&ee.jsx(o.components.Toolbar,Id({},null==(r=o.componentsProps)?void 0:r.toolbar))]}))})),bX=U.forwardRef((function(e,t){return ee.jsx(Iq,Id({ref:t},e,{children:ee.jsx(gR,{})}))})),vX=U.forwardRef((function(e,t){const n=IV().current.getLocaleText("noRowsLabel");return ee.jsx(Iq,Id({ref:t},e,{children:n}))})),yX=Wv(VP)((({theme:e})=>({[`& .${NP.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${NP.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}}))),wX=U.forwardRef((function(e,t){var n;const r=IV(),o=AV(),a=zV(r,aK),i=U.useMemo((()=>Math.floor(a.rowCount/(a.pageSize||1))),[a.rowCount,a.pageSize]),s=U.useCallback((e=>{const t=Number(e.target.value);r.current.setPageSize(t)}),[r]),l=U.useCallback(((e,t)=>{r.current.setPage(t)}),[r]);return ee.jsx(yX,Id({ref:t,component:"div",count:a.rowCount,page:a.page<=i?a.page:i,rowsPerPageOptions:null!=(n=o.rowsPerPageOptions)&&n.includes(a.pageSize)?o.rowsPerPageOptions:[],rowsPerPage:a.pageSize,onPageChange:l,onRowsPerPageChange:s},r.current.getLocaleText("MuiTablePagination"),e))})),SX=(e,t)=>{let n,r;return t.pagination&&"client"===t.paginationMode?(r=lK(e),n=uK(e)):(n=EG(e),r=0===n.length?null:{firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},xX=(e,t)=>{const n=SX(e,t);return U.useMemo((()=>({rows:n.rows,range:n.range})),[n.rows,n.range])},EX="__detail_panel_toggle__",CX=["selected","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","cellFocus","cellTabIndex","editRowsState","isLastVisible","onClick","onDoubleClick","onMouseEnter","onMouseLeave"],kX=["changeReason"],RX=({width:e})=>{if(!e)return null;const t={width:e};return ee.jsx("div",{className:"MuiDataGrid-cell",style:t})},TX=U.forwardRef((function(e,t){var n;const{selected:r,rowId:o,row:a,index:i,style:s,position:l,rowHeight:u,className:c,visibleColumns:d,renderedColumns:p,containerWidth:f,firstColumnToRender:m,cellFocus:g,cellTabIndex:h,editRowsState:b,isLastVisible:v=!1,onClick:y,onDoubleClick:w,onMouseEnter:S,onMouseLeave:x}=e,E=_d(e,CX),C=IV(),k=U.useRef(null),R=AV(),T=xX(C,R),I=zV(C,gG),_=zV(C,iG),A=zV(C,QV),O=zV(C,DG),N=Lh(k,t),P=i+O+2,{hasScrollX:L,hasScrollY:M}=null!=(n=C.current.getRootDimensions())?n:{hasScrollX:!1,hasScrollY:!1},D=(e=>{const{editable:t,editing:n,selected:r,isLastVisible:o,rowHeight:a,classes:i}=e;return eb({root:["row",r&&"selected",t&&"row--editable",n&&"row--editing",o&&"row--lastVisible","auto"===a&&"row--dynamicHeight"]},OV,i)})({selected:r,isLastVisible:v,classes:R.classes,editing:C.current.getRowMode(o)===ZG.Edit,editable:R.editMode===YG.Row,rowHeight:u});U.useLayoutEffect((()=>{"auto"===u&&k.current&&"undefined"==typeof ResizeObserver&&C.current.unstable_storeRowHeightMeasurement(o,k.current.clientHeight,l)}),[C,u,o,l]),U.useLayoutEffect((()=>{if(T.range){const e=C.current.getRowIndexRelativeToVisibleRows(o);null!=e&&C.current.unstable_setLastMeasuredRowIndex(e)}const e=k.current;if(!e||"auto"!==u||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver((e=>{const[t]=e,n=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;C.current.unstable_storeRowHeightMeasurement(o,n,l)}));return t.observe(e),()=>t.disconnect()}),[C,T.range,i,u,o,l]);const j=U.useCallback(((e,t)=>n=>{(1!==n.target.nodeType||n.currentTarget.contains(n.target))&&C.current.getRow(o)&&(C.current.publishEvent(e,C.current.getRowParams(o),n),t&&t(n))}),[C,o]),F=U.useCallback((e=>{const t=function(e,t){return e.closest(`.${t}`)}(e.target,NV.cell),n=null==t?void 0:t.getAttribute("data-field");if(n){if(n===BK.field)return;if(n===EX)return;if("__reorder__"===n)return;if(C.current.getCellMode(o,n)===XG.Edit)return;if(C.current.getColumn(n).type===LK)return}j("rowClick",y)(e)}),[C,y,j,o]),$=U.useCallback(((e,t)=>{var n;const r=C.current.getCellParams(o,e.field),i=[],s=R.disableColumnReorder&&e.disableReorder||!R.rowReordering&&!!_.length&&A>1&&Object.keys(b).length>0;e.cellClassName&&i.push(KG("function"==typeof e.cellClassName?e.cellClassName(r):e.cellClassName));const l=b[o]?b[o][e.field]:null;let c=null;var d;null==l&&e.renderCell&&(c=e.renderCell(Id({},r,{api:C.current})),i.push(KG(NV["cell--withRenderer"],null==(d=R.classes)?void 0:d["cell--withRenderer"])));if(null!=l&&e.renderEditCell){var p;let t=a;C.current.unstable_getRowWithUpdatedValues&&(t=C.current.unstable_getRowWithUpdatedValues(o,e.field));const n=Id({},r,{row:t},_d(l,kX),{api:C.current});c=e.renderEditCell(n),i.push(KG(NV["cell--editing"],null==(p=R.classes)?void 0:p["cell--editing"]))}R.getCellClassName&&i.push(R.getCellClassName(r));const f=null!==g&&g.id===o&&g.field===e.field,m=null!==h&&h.id===o&&h.field===e.field&&"view"===r.cellMode?0:-1;return ee.jsx(R.components.Cell,Id({value:r.value,field:e.field,width:t.width,rowId:o,height:u,showRightBorder:t.showRightBorder,formattedValue:r.formattedValue,align:e.align||"left",cellMode:r.cellMode,colIndex:t.indexRelativeToAllColumns,isEditable:r.isEditable,hasFocus:f,tabIndex:m,className:KG(i),colSpan:t.colSpan,disableDragEvents:s},null==(n=R.componentsProps)?void 0:n.cell,{children:c}),e.field)}),[C,h,b,g,R,a,u,o,A,_.length]),B=C.current.unstable_getRowInternalSizes(o);let z=u;if("auto"===z&&B){let e=0;const t=Object.entries(B).reduce(((t,[n,r])=>/^base[A-Z]/.test(n)?(e+=1,r>t?r:t):t),0);t>0&&e>1&&(z=t)}const H=Id({},s,{maxHeight:"auto"===u?"none":u,minHeight:z});if(null!=B&&B.spacingTop){H["border"===R.rowSpacingType?"borderTopWidth":"marginTop"]=B.spacingTop}if(null!=B&&B.spacingBottom){const e="border"===R.rowSpacingType?"borderBottomWidth":"marginBottom";let t=H[e];"number"!=typeof t&&(t=parseInt(t||"0",10)),t+=B.spacingBottom,H[e]=t}const V=C.current.unstable_applyPipeProcessors("rowClassName",[],o);if("function"==typeof R.getRowClassName){var G;const e=i-((null==(G=T.range)?void 0:G.firstRowIndex)||0),t=Id({},C.current.getRowParams(o),{isFirstVisible:0===e,isLastVisible:e===T.rows.length-1,indexRelativeToCurrentPage:e});V.push(R.getRowClassName(t))}const W=_K(1e4,20,80),q=[];for(let U=0;U0&&ee.jsx(RX,{width:K})]}))}));let IX=class{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,n){this.timeouts||(this.timeouts=new Map);const r=setTimeout((()=>{"function"==typeof t&&t(),this.timeouts.delete(n.cleanupToken)}),this.cleanupTimeout);this.timeouts.set(n.cleanupToken,r)}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)}},_X=class{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(){}};var AX;!function(e){e.DataGrid="DataGrid",e.DataGridPro="DataGridPro"}(AX||(AX={}));let OX=class{};const NX=function(e){let t=0;return function(n,r,o,a){null===e.registry&&(e.registry="undefined"!=typeof FinalizationRegistry?new _X:new IX);const[i]=U.useState(new OX),s=U.useRef(null),l=U.useRef();l.current=o;const u=U.useRef(null);if(!s.current&&l.current){const o=(e,t,n)=>{var r;t.defaultMuiPrevented||(null==(r=l.current)||r.call(l,e,t,n))};s.current=n.current.subscribeEvent(r,o,a),t+=1,u.current={cleanupToken:t},e.registry.register(i,(()=>{var e;null==(e=s.current)||e.call(s),s.current=null,u.current=null}),u.current)}else!l.current&&s.current&&(s.current(),s.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));U.useEffect((()=>{if(!s.current&&l.current){const e=(e,t,n)=>{var r;t.defaultMuiPrevented||(null==(r=l.current)||r.call(l,e,t,n))};s.current=n.current.subscribeEvent(r,e,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var e;null==(e=s.current)||e.call(s),s.current=null}}),[n,r,a])}}({registry:null}),PX={isFirst:!0};function LX(e,t,n){NX(e,t,n,PX)}const MX=Wv("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${NV["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${NV["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${NV["scrollArea--left"]}`]:{left:0},[`&.${NV["scrollArea--right"]}`]:{right:0}})));function DX(e){const{scrollDirection:t}=e,n=U.useRef(null),r=IV(),o=U.useRef(),[a,i]=U.useState(!1),s=zV(r,MG),l=U.useRef({left:0,top:0}),u=Id({},AV(),{scrollDirection:t}),c=(e=>{const{scrollDirection:t,classes:n}=e;return eb({root:["scrollArea",`scrollArea--${t}`]},OV,n)})(u),d=U.useCallback((e=>{l.current=e}),[]),p=U.useCallback((e=>{let a;if("left"===t)a=e.clientX-n.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI: Wrong drag direction");a=Math.max(1,e.clientX-n.current.getBoundingClientRect().left)}a=1.5*(a-1)+1,clearTimeout(o.current),o.current=setTimeout((()=>{r.current.scroll({left:l.current.left+a,top:l.current.top})}))}),[t,r]);U.useEffect((()=>()=>{clearTimeout(o.current)}),[]);const f=U.useCallback((()=>{i((e=>!e))}),[]);return NX(r,"rowsScroll",d),NX(r,"columnHeaderDragStart",f),NX(r,"columnHeaderDragEnd",f),a?ee.jsx(MX,{ref:n,className:KG(c.root),ownerState:u,onDragOver:p,style:{height:s}}):null}const jX=U.memo(DX),FX=({apiRef:e,props:t,children:n})=>ee.jsx(_V.Provider,{value:t,children:ee.jsx(TV.Provider,{value:e,children:n})}),$X=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"),BX=()=>{},zX={debug:BX,info:BX,warn:BX,error:BX},UX=["debug","info","warn","error"];function HX(e,t,n=console){const r=UX.indexOf(t);if(-1===r)throw new Error(`MUI: Log level ${t} not recognized.`);return UX.reduce(((t,o,a)=>(t[o]=a>=r?(...t)=>{const[r,...a]=t;n[o](`MUI: ${e} - ${r}`,...a)}:BX,t)),{})}function VX(e,t,n){const r=U.useRef(t),[o]=U.useState(Object.keys(t)),a=U.useCallback((()=>{e.current&&o.forEach((t=>{e.current.hasOwnProperty(t)||(e.current[t]=(...e)=>r.current[t](...e))}))}),[o,e]);U.useEffect((()=>{r.current=t}),[t]),U.useEffect((()=>{a()}),[a]),a()}let GX=class{constructor(){this.maxListeners=10,this.warnOnce=!1,this.events={}}on(e,t,n={}){let r=this.events[e];r||(r={highPriority:new Map,regular:new Map},this.events[e]=r),n.isFirst?r.highPriority.set(t,!0):r.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 r=Array.from(n.highPriority.keys()),o=Array.from(n.regular.keys());for(let a=r.length-1;a>=0;a-=1){const e=r[a];n.highPriority.has(e)&&e.apply(this,t)}for(let a=0;an.current),[n]);const r=U.useCallback(((...e)=>{const[r,o,a={}]=e;if(a.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(a)&&a.isPropagationStopped())return;const i=t.signature===AX.DataGridPro?{api:n.current}:{};n.current.unstable_eventManager.emit(r,o,a,i)}),[n,t.signature]),o=U.useCallback(((e,t,r)=>{n.current.unstable_eventManager.on(e,t,r);const o=n.current;return()=>{o.unstable_eventManager.removeListener(e,t)}}),[n]),a=U.useCallback((e=>{n.current.publishEvent("componentError",e)}),[n]);return VX(n,{subscribeEvent:o,publishEvent:r,showError:a}),U.useEffect((()=>{const e=n.current;return()=>{var t;void 0!==(t=e.instanceId)?UV.cache&&UV.cache[t]&&delete UV.cache[t]:UV.cache=null,e.publishEvent("unmount")}}),[n]),n}const KX=e=>{const t=U.useRef(!0);t.current&&(t.current=!1,e())},YX=(e,t,n)=>{const r=U.useRef(),o=U.useRef(`mui-${Math.round(1e9*Math.random())}`),a=U.useCallback((()=>{r.current=e.current.unstable_registerPipeProcessor(t,o.current,n)}),[e,n,t]);KX((()=>{a()}));const i=U.useRef(!0);U.useEffect((()=>(i.current?i.current=!1:a(),()=>{r.current&&(r.current(),r.current=null)})),[a])},XX=(e,t,n)=>{const r=U.useRef(),o=U.useRef(`mui-${Math.round(1e9*Math.random())}`),a=U.useCallback((()=>{r.current=e.current.unstable_registerPipeApplier(t,o.current,n)}),[e,n,t]);KX((()=>{a()}));const i=U.useRef(!0);U.useEffect((()=>(i.current?i.current=!1:a(),()=>{r.current&&(r.current(),r.current=null)})),[a])},ZX=(e,t,n,r)=>{const o=U.useCallback((()=>{e.current.unstable_registerStrategyProcessor(t,n,r)}),[e,r,n,t]);KX((()=>{o()}));const a=U.useRef(!0);U.useEffect((()=>{a.current?a.current=!1:o()}),[o])},QX="none",JX={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree"},eZ=["stateId"],tZ=(e,t)=>{const n=qX(e,t);return((e,t)=>{e.current.getLogger=U.useCallback((e=>$X?HX(e,"debug",t.logger):t.logLevel?HX(e,t.logLevel.toString(),t.logger):zX),[t.logLevel,t.logger])})(n,t),function(e,t){const n=U.useCallback((t=>{e.current.setState((e=>Id({},e,{error:t})))}),[e]);U.useEffect((()=>{t.error?n({error:t.error}):n(null)}),[n,t.error]),NX(e,"componentError",n)}(n,t),((e,t)=>{const n=U.useRef({}),[,r]=U.useState(),o=U.useCallback((e=>{const{stateId:t}=e,r=_d(e,eZ);n.current[t]=Id({},r,{stateId:t})}),[]),a=U.useCallback(((r,o)=>{let a;if(a=kK(r)?r(e.current.state):r,e.current.state===a)return!1;let i=!1;const s=[];if(Object.keys(n.current).forEach((t=>{const r=n.current[t],o=r.stateSelector(e.current.state,e.current.instanceId),l=r.stateSelector(a,e.current.instanceId);l!==o&&(s.push({stateId:r.stateId,hasPropChanged:l!==r.propModel}),void 0!==r.propModel&&l!==r.propModel&&(i=!0))})),s.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${s[0].stateId}, therefore, you're not allowed to update ${s.map((e=>e.stateId)).join(", ")} in the same transaction.`);if(i||(e.current.state=a,e.current.publishEvent&&e.current.publishEvent("stateChange",a)),1===s.length){const{stateId:r,hasPropChanged:l}=s[0],u=n.current[r],c=u.stateSelector(a,e.current.instanceId);if(u.propOnChange&&l){const n=t.signature===AX.DataGridPro?{api:e.current,reason:o}:{reason:o};u.propOnChange(c,n)}i||e.current.publishEvent(u.changeEvent,c,{reason:o})}return!i}),[e,t.signature]),i=U.useCallback(((t,n,r)=>e.current.setState((e=>Id({},e,{[t]:n(e[t])})),r)),[e]),s=U.useCallback((()=>r((()=>e.current.state))),[e]);VX(e,{setState:a,forceUpdate:s,unstable_updateControlState:i,unstable_registerControlState:o})})(n,t),(e=>{const t=U.useRef({}),n=U.useCallback((e=>{e&&Object.values(e.appliers).forEach((e=>{e()}))}),[]),r=U.useCallback(((e,r,o)=>{t.current[e]||(t.current[e]={processors:new Map,appliers:{}});const a=t.current[e];return a.processors.get(r)!==o&&(a.processors.set(r,o),n(a)),()=>{t.current[e].processors.set(r,null)}}),[n]),o=U.useCallback(((e,n,r)=>(t.current[e]||(t.current[e]={processors:new Map,appliers:{}}),t.current[e].appliers[n]=r,()=>{const r=_d(t.current[e].appliers,[n].map(fb));t.current[e].appliers=r})),[]);VX(e,{unstable_registerPipeProcessor:r,unstable_registerPipeApplier:o,unstable_requestPipeProcessorsApplication:U.useCallback((e=>{const r=t.current[e];n(r)}),[n]),unstable_applyPipeProcessors:U.useCallback(((...e)=>{const[n,r,o]=e;return t.current[n]?Array.from(t.current[n].processors.values()).reduce(((e,t)=>t?t(e,o):e),r):r}),[])})})(n),(e=>{const t=U.useRef(new Map),n=U.useRef({}),r=U.useCallback(((t,r,o)=>{const a=()=>{const e=_d(n.current[r],[t].map(fb));n.current[r]=e};n.current[r]||(n.current[r]={});const i=n.current[r],s=i[t];return i[t]=o,s&&s!==o?(t===e.current.unstable_getActiveStrategy(JX[r])&&e.current.publishEvent("activeStrategyProcessorChange",r),a):a}),[e]),o=U.useCallback(((t,r)=>{const o=e.current.unstable_getActiveStrategy(JX[t]);if(null==o)throw new Error("Can't apply a strategy processor before defining an active strategy");const a=n.current[t];if(!a||!a[o])throw new Error(`No processor found for processor "${t}" on strategy "${o}"`);return(0,a[o])(r)}),[e]),a=U.useCallback((e=>{var n;const r=Array.from(t.current.entries()).find((([,t])=>t.group===e&&t.isAvailable()));return null!=(n=null==r?void 0:r[0])?n:QX}),[]),i=U.useCallback(((n,r,o)=>{t.current.set(r,{group:n,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")}),[e]);VX(e,{unstable_registerStrategyProcessor:r,unstable_applyStrategyProcessor:o,unstable_getActiveStrategy:a,unstable_setStrategyAvailability:i})})(n),((e,t)=>{const n=U.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.getLocaleText=n})(n,t),n},nZ=(e,t,n)=>{const r=U.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function rZ(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 r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const oZ=e=>{const t=U.useCallback(((t=!1)=>{if(0===e.current.getSelectedRows().size)return;const n=e.current.getDataAsCsv({includeHeaders:t,delimiter:"\t"});navigator.clipboard?navigator.clipboard.writeText(n).catch((()=>{rZ(n)})):rZ(n)}),[e]),n=U.useCallback((t=>{const n=t.ctrlKey||t.metaKey||t.altKey;var r,o;"C"===String.fromCharCode(t.keyCode)&&n&&(r=t.target,""!==(null==(o=window.getSelection())?void 0:o.toString())||r&&(r.selectionEnd||0)-(r.selectionStart||0)>0||e.current.unstable_copySelectedRowsToClipboard(t.altKey))}),[e]);((e,t,n,r,o)=>{const a=UG(e,"useNativeEventListener"),[i,s]=U.useState(!1),l=U.useRef(r),u=U.useCallback((e=>l.current&&l.current(e)),[]);U.useEffect((()=>{l.current=r}),[r]),U.useEffect((()=>{let r;if(r=kK(t)?t():t&&t.current?t.current:null,r&&n&&!i){a.debug(`Binding native ${n} event`),r.addEventListener(n,u,o);const t=r;s(!0);const i=()=>{a.debug(`Clearing native ${n} event`),t.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",i)}}),[t,u,n,i,a,o,e])})(e,e.current.rootElementRef,"keydown",n);VX(e,{unstable_copySelectedRowsToClipboard:t})},aZ=e=>e.columnMenu,iZ=e=>Id({},e,{columnMenu:{open:!1}}),sZ=(e,t,n)=>{var r,o,a,i,s,l,u;const c=!!t.columnVisibilityModel||!(null==(r=t.initialState)||null==(o=r.columns)||!o.columnVisibilityModel);n.current.unstable_caches.columns={isUsingColumnVisibilityModel:c};const d=lY(t.columnTypes);return Id({},e,{columns:cY({apiRef:n,columnTypes:d,columnsToUpsert:t.columns,initialState:null==(a=t.initialState)?void 0:a.columns,shouldRegenColumnVisibilityModelFromColumns:!c,currentColumnVisibilityModel:null!=(i=null!=(s=t.columnVisibilityModel)?s:null==(l=t.initialState)||null==(u=l.columns)?void 0:u.columnVisibilityModel)?i:{},keepOnlyColumnsToUpsert:!0})})};const lZ=HV((e=>e.columnGrouping),(e=>e.lookup)),uZ=["groupId","children"];const cZ=(e,t,n)=>{if(iW(e)){if(void 0!==n[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurrs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:r,children:o}=e;o.forEach((e=>{cZ(e,[...t,r],n)}))},dZ=e=>{if(!e)return{};const t={};return e.forEach((e=>{cZ(e,[],t)})),t},pZ=e=>{let t={};return e.forEach((e=>{if(iW(e))return;const{groupId:n,children:r}=e,o=_d(e,uZ);if(!n)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");r||console.warn(`MUI: group groupId=${n} has no children.`);const a=Id({},o,{groupId:n}),i=pZ(r);if(void 0!==i[n]||void 0!==t[n])throw new Error(`MUI: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=Id({},t,i,{[n]:a})})),Id({},t)},fZ=(e,t)=>{var n;return Id({},e,{columnGrouping:{lookup:pZ(null!=(n=t.columnGroupingModel)?n:[]),groupCollapsedModel:{}}})},mZ=(e,t,n,r)=>{switch(e){case aW.Compact:return{value:e,headerHeight:Math.floor(.7*t),rowHeight:Math.floor(.7*n),headerGroupingMaxDepth:r,factor:.7};case aW.Comfortable:return{value:e,headerHeight:Math.floor(1.3*t),rowHeight:Math.floor(1.3*n),headerGroupingMaxDepth:r,factor:1.3};default:return{value:e,headerHeight:t,rowHeight:n,headerGroupingMaxDepth:r,factor:1}}},gZ=(e,t)=>{let n;if(null==t.columnGroupingModel||0===Object.keys(t.columnGroupingModel).length)n=0;else{const r=dZ(t.columnGroupingModel),o=e.columns,a=o.all.filter((e=>!1!==o.columnVisibilityModel[e]));n=0===a.length?0:Math.max(...a.map((e=>{var t,n;return null!=(t=null==(n=r[e])?void 0:n.length)?t:0})))}return Id({},e,{density:mZ(t.density,t.headerHeight,t.rowHeight,n)})};const hZ=(e,t)=>{if("string"==typeof e){const n=e.replace(/"/g,'""');return[t,"\n","\r"].some((e=>n.includes(e)))?`"${n}"`:n}return e};$V(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);function bZ(e){const{columns:t,rowIds:n,getCellParams:r,delimiterCharacter:o,includeHeaders:a}=e,i=n.reduce(((e,n)=>`${e}${((e,t,n,r)=>t.map((t=>{const o=n(e,t.field);return hZ(o.formattedValue,r)})))(n,t,r,o).join(o)}\r\n`),"").trim();if(!a)return i;const s=`${t.filter((e=>e.field!==BK.field)).map((e=>hZ(e.headerName||e.field,o))).join(o)}\r\n`;return`${s}${i}`.trim()}const vZ=({apiRef:e,options:t})=>{const n=dG(e);if(t.fields)return t.fields.map((e=>n.find((t=>t.field===e)))).filter((e=>!!e));return(t.allColumns?n:fG(e)).filter((e=>!e.disableExport))},yZ=({apiRef:e})=>{var t,n;const r=RG(e),o=XV(e),a=e.current.getSelectedRows(),i=r.filter((e=>{var t;return"body"===(null!=(t=o[e].position)?t:"body")})),s=tG(e),l=(null==s||null==(t=s.top)?void 0:t.map((e=>e.id)))||[],u=(null==s||null==(n=s.bottom)?void 0:n.map((e=>e.id)))||[];return i.unshift(...l),i.push(...u),a.size>0?i.filter((e=>a.has(e))):i},wZ=e=>{const t=UG(e,"useGridCsvExport"),n=U.useCallback(((n={})=>{var r,o;t.debug("Get data as CSV");return bZ({columns:vZ({apiRef:e,options:n}),rowIds:(null!=(r=n.getRowsToExport)?r:yZ)({apiRef:e}),getCellParams:e.current.getCellParams,delimiterCharacter:n.delimiter||",",includeHeaders:null==(o=n.includeHeaders)||o})}),[t,e]),r=U.useCallback((e=>{t.debug("Export data as CSV");const r=n(e);!function(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),n=document.createElement("a");return n.href=t,n.download=r,n.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",r],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[t,n]);VX(e,{getDataAsCsv:n,exportDataAsCsv:r});const o=U.useCallback(((e,t)=>{var n;return null!=(n=t.csvOptions)&&n.disableToolbarButton?e:[...e,{component:ee.jsx(iX,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);YX(e,"exportMenu",o)},SZ=e=>e.rowsMeta;const xZ=(e,t)=>{const n=UG(e,"useGridPrintExport"),r=U.useRef(null),o=U.useRef(null),a=U.useRef({});U.useEffect((()=>{r.current=Rh(e.current.rootElementRef.current)}),[e]);const i=U.useCallback(((t,n)=>new Promise((r=>{if(!t&&!n)return void r();const o=vZ({apiRef:e,options:{fields:t,allColumns:n}}).map((e=>e.field)),a=dG(e),i={};a.forEach((e=>{i[e.field]=o.includes(e.field)})),e.current.setColumnVisibilityModel(i),r()}))),[e]),s=U.useCallback((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}),[]),l=U.useCallback(((t,n)=>{var o,a;const i=Id({copyStyles:!0,hideToolbar:!1,hideFooter:!1},n),s=t.contentDocument;if(!s)return;const l=FG(e),u=SZ(e.current.state),c=e.current.rootElementRef.current,d=c.cloneNode(!0),p=d.querySelector(`.${NV.virtualScroller}`);p.style.height="auto",p.style.width="auto",p.parentElement.style.width="auto",p.parentElement.style.height="auto";d.querySelector(`.${NV.main}`).style.overflow="visible";const f=function(){const e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return e?parseInt(e[2],10):null}();f&&f>=108&&(d.style.contain="size");d.querySelector(`.${NV.columnHeaders}`).querySelector(`.${NV.columnHeadersInner}`).style.width="100%";let m=(null==(o=c.querySelector(`.${NV.toolbarContainer}`))?void 0:o.clientHeight)||0,g=(null==(a=c.querySelector(`.${NV.footerContainer}`))?void 0:a.clientHeight)||0;var h,b;i.hideToolbar&&(null==(h=d.querySelector(`.${NV.toolbarContainer}`))||h.remove(),m=0);i.hideFooter&&(null==(b=d.querySelector(`.${NV.footerContainer}`))||b.remove(),g=0);d.style.height=`${u.currentPageTotalHeight+l+m+g}px`;const v=document.createElement("div");v.appendChild(d),s.body.innerHTML=v.innerHTML;const y="function"==typeof i.pageStyle?i.pageStyle():i.pageStyle;if("string"==typeof y){const e=s.createElement("style");e.appendChild(s.createTextNode(y)),s.head.appendChild(e)}if(i.bodyClassName&&s.body.classList.add(...i.bodyClassName.split(" ")),i.copyStyles){const e=r.current.querySelectorAll("style, link[rel='stylesheet']");for(let t=0;t{var n,i;r.current.body.removeChild(t),e.current.restoreState(o.current||{}),null!=(n=o.current)&&null!=(i=n.columns)&&i.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.unstable_enableVirtualization(),o.current=null,a.current={}}),[e]),c=U.useCallback((async c=>{if(n.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");if(o.current=e.current.exportState(),a.current=pG(e),t.pagination){const t=IG(e);e.current.setPageSize(t)}await i(null==c?void 0:c.fields,null==c?void 0:c.allColumns),e.current.unstable_disableVirtualization(),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const d=s(null==c?void 0:c.fileName);d.onload=()=>{l(d,c);d.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&u(d)}))},r.current.body.appendChild(d)}),[t,n,e,s,l,u,i]);VX(e,{exportDataAsPrint:c});const d=U.useCallback(((e,t)=>{var n;return null!=(n=t.printOptions)&&n.disableToolbarButton?e:[...e,{component:ee.jsx(sX,{options:t.printOptions}),componentName:"printExport"}]}),[]);YX(e,"exportMenu",d)},EZ=["rowsBeforePartialUpdates"];const CZ=(e,t,n)=>{const r=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: 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"))}(r,e,n),r},kZ=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:r,idRowsLookup:{},idToIdLookup:{},ids:[]};for(let a=0;a{const o=_d(e.current.unstable_caches.rows,EZ),a=null!=n?n:0,i=e.current.unstable_applyStrategyProcessor("rowTreeCreation",Id({},o,{previousTree:t})),s=e.current.unstable_applyPipeProcessors("hydrateRows",i),l=1===s.treeDepth?s.ids.length:Object.values(s.tree).filter((e=>null==e.parent&&!e.isPinned)).length;return Id({},s,{groupingResponseBeforeRowHydration:i,loading:r,totalRowCount:Math.max(a,s.ids.length),totalTopLevelRowCount:Math.max(a,l)})},TZ=(e,t,n)=>{var r;const o=null==(r=e[t])?void 0:r.children;if(null==o)return[];const a=[];for(let i=0;it+=e.current.unstable_getRowHeight(n.id)),0))||0,bottom:(null==r||null==(n=r.bottom)?void 0:n.reduce(((t,n)=>t+=e.current.unstable_getRowHeight(n.id)),0))||0}}const _Z=(e,t)=>{const n=Id({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operatorValue){const e=cG(t)[n.columnField];n.operatorValue=e&&e.filterOperators[0].value}return n},AZ=$V(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),OZ=$V("MUI: The 'id' field is required on `filterModel.items` when you use multiple filters.","error"),NZ=$V(["MUI: One of your filtering item have no `operatorValue` provided.","This property will become required on `@mui/x-data-grid@6.X`."]),PZ=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?(AZ(),o=[e.items[0]]):o=e.items;const a=r&&o.some((e=>null==e.id)),i=o.some((e=>null==e.operatorValue));return a&&OZ(),i&&NZ(),i||a?Id({},e,{items:o.map((e=>_Z(e,n)))}):e.items!==o?Id({},e,{items:o}):e},LZ=(e,t,n)=>r=>Id({},r,{filterModel:PZ(e,t,n)}),MZ=(e,t)=>{if(!e.columnField||!e.operatorValue)return null;const n=t.current.getColumn(e.columnField);if(!n)return null;let r;if(n.valueParser){var o;const t=n.valueParser;r=Array.isArray(e.value)?null==(o=e.value)?void 0:o.map((e=>t(e))):t(e.value)}else r=e.value;const a=Id({},e,{value:r}),i=n.filterOperators;if(null==i||!i.length)throw new Error(`MUI: No filter operators found for column '${n.field}'.`);const s=i.find((e=>e.value===a.operatorValue));if(!s)throw new Error(`MUI: No filter operator found for column '${n.field}' and operator value '${a.operatorValue}'.`);const l=s.getApplyFilterFn(a,n);if("function"!=typeof l)return null;return{fn:e=>{const n=t.current.getCellParams(e,a.columnField);return l(n)},item:a}},DZ=(e,t)=>{const n=((e,t)=>{const{items:n}=e,r=n.map((e=>MZ(e,t))).filter((e=>!!e));return 0===r.length?null:(e,t)=>{const n={};return(t?r.filter((e=>t(e.item.columnField))):r).forEach((t=>{n[t.item.id]=t.fn(e)})),n}})(e,t),r=((e,t)=>{const{quickFilterValues:n=[]}=e;if(0===n.length)return null;const r=uG(t),o={};r.forEach((e=>{const r=t.current.getColumn(e),a=null==r?void 0:r.getApplyQuickFilterFn;a&&(o[e]=n.map((e=>a(e,r,t))))}));const a=n.filter(((e,t)=>Object.keys(o).some((e=>null!=o[e][t]))));return 0===a.length?null:(e,n)=>{const r={},i=[];Object.keys(o).forEach((o=>{n&&!n(o)||(r[o]=t.current.getCellParams(e,o),i.push(o))}));const s={};return a.forEach(((e,t)=>{const n=i.some((e=>{var n,a;return null!=o[e][t]&&(null==(n=(a=o[e])[t])?void 0:n.call(a,r[e]))}));s[e]=n})),s}})(e,t);return(e,t)=>({passingFilterItems:n&&n(e,t),passingQuickFilterValues:r&&r(e,t)})},jZ=(e,t,n,r)=>{var o,a;const i=n.items.filter((e=>null!==MZ(e,r))),s=e.filter((e=>null!=e)),l=t.filter((e=>null!=e)),u=null!=(o=n.quickFilterLogicOperator)?o:lX().quickFilterLogicOperator,c=null!=(a=n.linkOperator)?a:lX().linkOperator;if(s.length>0){const e=e=>s.some((t=>t[e.id]));if(c===eW.And){if(!i.every(e))return!1}else{if(!i.some(e))return!1}}if(l.length>0&&null!=n.quickFilterValues){const e=e=>l.some((t=>t[e]));if(u===eW.And){if(!n.quickFilterValues.every(e))return!1}else{if(!n.quickFilterValues.some(e))return!1}}return!0},FZ=(e,t,n)=>{var r,o,a,i;const s=null!=(r=null!=(o=t.filterModel)?o:null==(a=t.initialState)||null==(i=a.filter)?void 0:i.filterModel)?r:lX();return Id({},e,{filter:{filterModel:PZ(s,t.disableMultipleColumnsFiltering,n),visibleRowsLookup:{},filteredDescendantCountLookup:{}}})},$Z=e=>Id({},e,{focus:{cell:null,columnHeader:null},tabIndex:{cell:null,columnHeader:null}});const BZ=(e,t)=>{const n=UG(e,"useGridKeyboardNavigation"),r=xX(e,t).rows,o=U.useMemo((()=>function(e,t){const n=tG(e)||{};return[...n.top||[],...t,...n.bottom||[]]}(e,r)),[e,r]),a=U.useCallback(((t,r,o="left")=>{const a=EG(e),i=e.current.unstable_getCellColSpanInfo(r,t);i&&i.spannedByColSpan&&("left"===o?t=i.leftVisibleCellIndex:"right"===o&&(t=i.rightVisibleCellIndex));const s=a.findIndex((e=>e.id===r));n.debug(`Navigating to cell row ${s}, col ${t}`),e.current.scrollToIndexes({colIndex:t,rowIndex:s});const l=e.current.getVisibleColumns()[t].field;e.current.setCellFocus(r,l)}),[e,n]),i=U.useCallback(((t,r)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFocus(o,r)}),[e,n]),s=U.useCallback((e=>o[e].id),[o]),l=U.useCallback(((t,n)=>{const r=e.current.getRootDimensions();if(0===o.length||!r)return;const l=e.current.unstable_getViewportPageSize(),u=t.field?e.current.getColumnIndex(t.field):0,c=o.findIndex((e=>e.id===t.id)),d=o.length-1,p=fG(e).length-1;let f=!0;switch(n.key){case"ArrowDown":case"Enter":c0?a(u,s(c-1)):i(u,n);break;case"ArrowRight":u0&&a(u-1,s(c));break;case"Tab":n.shiftKey&&u>0?a(u-1,s(c),"left"):!n.shiftKey&&u=0?a(u,s(e)):i(u,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?a(0,s(0)):a(0,s(c));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?a(p,s(d)):a(p,s(c));break;default:f=!1}f&&n.preventDefault()}),[e,o,a,i,s]),u=U.useCallback(((t,n)=>{const r=n.currentTarget.querySelector(`.${NV.columnHeaderTitleContainerContent}`);if(!!r&&r.contains(n.target)&&t.field!==BK.field)return;if(!e.current.getRootDimensions())return;const l=e.current.unstable_getViewportPageSize(),u=t.field?e.current.getColumnIndex(t.field):0,c=o.length-1,d=fG(e).length-1;let p=!0;switch(n.key){case"ArrowDown":a(u,s(0));break;case"ArrowRight":u0&&i(u-1,n);break;case"PageDown":null!==c&&a(u,s(Math.min(0+l,c)));break;case"Home":i(0,n);break;case"End":i(d,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:p=!1}p&&n.preventDefault()}),[e,o,a,i,s]),c=U.useCallback(((t,n)=>{if(!n.currentTarget.contains(n.target))return;const r=e.current.getCellParams(t.id,t.field);r.cellMode!==XG.Edit&&uq(n.key)&&e.current.publishEvent("cellNavigationKeyDown",r,n)}),[e]);NX(e,"cellNavigationKeyDown",l),NX(e,"columnHeaderKeyDown",u),NX(e,"cellKeyDown",c)},zZ=e=>e?0:100,UZ=e=>t=>Id({},t,{pagination:Id({},t.pagination,{pageSize:e})}),HZ=(e,t)=>t>0&&e>0?Math.ceil(e/t):0,VZ=e=>e.pageCount?Id({},e,{page:Math.max(Math.min(e.page,e.pageCount-1),0)}):e,GZ=e=>t=>Id({},t,{pagination:VZ(Id({},t.pagination,{page:e}))});$V(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error");const WZ=(e,t)=>{var n,r,o,a,i,s,l,u;let c;return c=null!=t.pageSize?t.pageSize:null!=(null==(n=t.initialState)||null==(r=n.pagination)?void 0:r.pageSize)?t.initialState.pagination.pageSize:zZ(t.autoPageSize),Id({},e,{pagination:{pageSize:c,page:null!=(o=null!=(a=t.page)?a:null==(i=t.initialState)||null==(s=i.pagination)?void 0:s.page)?o:0,pageCount:HZ(null!=(l=t.rowCount)?l:0,c),rowCount:null!=(u=t.rowCount)?u:0}})},qZ=(e,t)=>{((e,t)=>{var n,r;const o=UG(e,"useGridPageSize"),a=zV(e,LG);e.current.unstable_registerControlState({stateId:"pageSize",propModel:t.pageSize,propOnChange:t.onPageSizeChange,stateSelector:sK,changeEvent:"pageSizeChange"});const i=U.useCallback((t=>{t!==sK(e)&&(o.debug(`Setting page size to ${t}`),e.current.setState(UZ(t)),e.current.forceUpdate())}),[e,o]);VX(e,{setPageSize:i});const s=U.useCallback(((n,r)=>{var o,a;const i=sK(e);return r.exportOnlyDirtyModels&&null==t.pageSize&&null==(null==(o=t.initialState)||null==(a=o.pagination)?void 0:a.pageSize)&&i===zZ(t.autoPageSize)?n:Id({},n,{pagination:Id({},n.pagination,{pageSize:i})})}),[e,t.pageSize,null==(n=t.initialState)||null==(r=n.pagination)?void 0:r.pageSize,t.autoPageSize]),l=U.useCallback(((t,n)=>{var r;const o=null==(r=n.stateToRestore.pagination)?void 0:r.pageSize;return null!=o&&e.current.setState(UZ(o)),t}),[e]);YX(e,"exportState",s),YX(e,"restoreState",l);const u=U.useCallback((()=>{const n=e.current.getRootDimensions();if(!t.autoPageSize||!n)return;const r=IZ(e),o=Math.floor((n.viewportInnerSize.height-r.top-r.bottom)/a);e.current.setPageSize(o)}),[e,t.autoPageSize,a]);NX(e,"viewportInnerSizeChange",u),U.useEffect((()=>{null==t.pageSize||t.autoPageSize||e.current.setPageSize(t.pageSize)}),[e,t.autoPageSize,t.pageSize]),U.useEffect((()=>{u()}),[u])})(e,t),((e,t)=>{var n,r;const o=UG(e,"useGridPage"),a=zV(e,_G);e.current.unstable_registerControlState({stateId:"page",propModel:t.page,propOnChange:t.onPageChange,stateSelector:iK,changeEvent:"pageChange"});const i=U.useCallback((t=>{o.debug(`Setting page to ${t}`),e.current.setState(GZ(t)),e.current.forceUpdate()}),[e,o]);VX(e,{setPage:i});const s=U.useCallback(((n,r)=>{var o,a;const i=iK(e);return r.exportOnlyDirtyModels&&null==t.page&&null==(null==(o=t.initialState)||null==(a=o.pagination)?void 0:a.page)&&0===i?n:Id({},n,{pagination:Id({},n.pagination,{page:i})})}),[e,t.page,null==(n=t.initialState)||null==(r=n.pagination)?void 0:r.page]),l=U.useCallback(((t,n)=>{var r,o;const a=null!=(r=null==(o=n.stateToRestore.pagination)?void 0:o.page)?r:iK(e);return e.current.setState(GZ(a)),t}),[e]);YX(e,"exportState",s),YX(e,"restoreState",l),NX(e,"pageSizeChange",(t=>{e.current.setState((e=>{const n=HZ(e.pagination.rowCount,t);return Id({},e,{pagination:VZ(Id({},e.pagination,{pageCount:n,page:e.pagination.page}))})})),e.current.forceUpdate()})),NX(e,"pageChange",(()=>e.current.scrollToIndexes({rowIndex:iK(e)*sK(e)}))),U.useEffect((()=>{}),[t.rowCount,t.paginationMode]),U.useEffect((()=>{e.current.setState((e=>{const n=void 0!==t.rowCount?t.rowCount:a,r=HZ(n,e.pagination.pageSize),o=null==t.page?e.pagination.page:t.page;return Id({},e,{pagination:VZ(Id({},e.pagination,{page:o,rowCount:n,pageCount:r}))})})),e.current.forceUpdate()}),[a,t.rowCount,t.page,t.paginationMode,e])})(e,t)},KZ=(e,t)=>{var n,r;return Id({},e,{preferencePanel:null!=(n=null==(r=t.initialState)?void 0:r.preferencePanel)?n:{open:!1}})},YZ=e=>e.editRows;function XZ(e){return"function"==typeof e.then}const ZZ=(e,t)=>{var n;const r=UG(e,"useGridEditRows"),o=e=>(...n)=>{t.editMode===YG.Cell&&e(...n)},a=U.useCallback(((t,n,o)=>{e.current.getCellMode(t,n)!==o&&(r.debug(`Switching cell id: ${t} field: ${n} to mode: ${o}`),e.current.setState((r=>{const a=Id({},r.editRows);return a[t]=Id({},a[t]),o===XG.Edit?a[t][n]={value:e.current.getCellValue(t,n)}:(delete a[t][n],Object.keys(a[t]).length||delete a[t]),Id({},r,{editRows:a})})),e.current.forceUpdate(),e.current.publishEvent("cellModeChange",e.current.getCellParams(t,n)))}),[e,r]),i=U.useCallback(((t,n)=>{const r=YZ(e.current.state);return r[t]&&r[t][n]?XG.Edit:XG.View}),[e]),s=U.useCallback(((n,r={})=>{var o;const{id:a,field:i}=n;e.current.unstable_runPendingEditCellValueMutation(a,i);const s=e.current.getEditRowsModel();if(!s[a]||!s[a][i])throw new Error(`MUI: Cell at id: ${a} and field: ${i} is not in edit mode.`);const l=s[a][i],u=e.current.getColumn(i),c=e.current.getRow(a);if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating){const e=s[a][i];if(e.isValidating||e.error)return!1}const d=Id({},n,{value:l.value});let p=!!l.error;if(!p&&"function"==typeof u.preProcessEditCellProps){const t=u.preProcessEditCellProps({id:a,row:c,props:l});if(XZ(t))return t.then((t=>(e.current.unstable_setEditCellProps({id:a,field:i,props:t}),!t.error&&(e.current.publishEvent("cellEditCommit",d,r),!0))));e.current.unstable_setEditCellProps({id:a,field:i,props:t}),p=!!t.error}return!p&&(e.current.publishEvent("cellEditCommit",d,r),!0)}),[e,null==(n=t.experimentalFeatures)?void 0:n.preventCommitWhileValidating]),l=U.useCallback((t=>{const n=e.current.getColumn(t.field),r=e.current.getRow(t.id);return new Promise((o=>{let a={value:t.value};const i=e.current.getEditRowsModel()[t.id][t.field];if("function"!=typeof n.preProcessEditCellProps)return e.current.unstable_setEditCellProps(Id({},t,{props:a})),void o(!0);a=e.current.unstable_setEditCellProps(Id({},t,{props:Id({},i,{isValidating:!0})})),Promise.resolve(n.preProcessEditCellProps({id:t.id,row:r,props:Id({},a,{value:e.current.unstable_parseValue(t.id,t.field,t.value)})})).then((n=>{e.current.unstable_setEditCellProps(Id({},t,{props:Id({},n,{isValidating:!1})})),o(!n.error)}))}))}),[e]);VX(e,{setCellMode:a,getCellMode:i,commitCellChange:s,unstable_setCellEditingEditCellValue:l});const u=U.useCallback((async(t,n)=>{if(229===n.which)return;const{id:r,field:o,cellMode:a,isEditable:i}=t;if(!i)return;const s=a===XG.Edit,l=n.ctrlKey||n.metaKey||n.altKey;if(s||!(e=>tq(e.key)||oq(e.key)||aq(e))(n)||l||" "===n.key&&n.shiftKey||e.current.publishEvent("cellEditStart",t,n),!s&&oq(n.key)&&(e.current.setEditCellValue({id:r,field:o,value:""}),e.current.commitCellChange({id:r,field:o},n),e.current.publishEvent("cellEditStop",t,n)),s&&lq(n.key)){const t={id:r,field:o};if(!(await e.current.commitCellChange(t,n)))return}var u;s&&(u=n.key,iq.indexOf(u)>-1)&&e.current.publishEvent("cellEditStop",t,n)}),[e]),c=U.useCallback(((t,n)=>{t.isEditable&&e.current.publishEvent("cellEditStart",t,n)}),[e]),d=async(t,n)=>{t.cellMode!==XG.View&&(await e.current.commitCellChange(t,n),e.current.publishEvent("cellEditStop",t,n))},p=Ph(((e,t)=>{d(e,t)})),f=Ph((()=>{const t=lW(e);if(!t)return;const n=e.current.getCellParams(t.id,t.field);d(n,{})})),m=U.useCallback(((t,n)=>{t.isEditable&&(e.current.setCellMode(t.id,t.field,XG.Edit),cq(n)&&aq(n)&&e.current.unstable_setEditCellProps({id:t.id,field:t.field,props:{value:""}}))}),[e]),g=U.useCallback(((t,n)=>{e.current.setCellMode(t.id,t.field,XG.View),cq(n)&&(lq(n.key)?e.current.publishEvent("cellNavigationKeyDown",t,n):("Escape"===n.key||oq(n.key))&&e.current.setCellFocus(t.id,t.field))}),[e]),h=U.useCallback((t=>{const{id:n,field:o}=t,a=e.current.getEditRowsModel(),{value:i}=a[n][o];r.debug(`Setting cell id: ${n} field: ${o} to value: ${null==i?void 0:i.toString()}`);const s=e.current.getRow(n);if(s){const n=e.current.getColumn(t.field);let r=Id({},s,{[o]:i});n.valueSetter&&(r=n.valueSetter({row:s,value:i})),e.current.updateRows([r])}}),[e,r]),b=U.useCallback((t=>{const n=e.current.getRow(t.id),r=e.current.getColumn(t.field),o=r.preProcessEditCellProps?r.preProcessEditCellProps({id:t.id,row:n,props:t.props}):t.props;XZ(o)?o.then((n=>{e.current.unstable_setEditCellProps(Id({},t,{props:n}))})):e.current.unstable_setEditCellProps(Id({},t,{props:o}))}),[e]);NX(e,"cellKeyDown",o(u)),NX(e,"cellDoubleClick",o(c)),NX(e,"cellFocusOut",o(p)),NX(e,"columnHeaderDragStart",o(f)),NX(e,"cellEditStart",o(m)),NX(e,"cellEditStop",o(g)),NX(e,"cellEditCommit",o(h)),NX(e,"editCellPropsChange",o(b)),LX(e,"cellEditCommit",t.onCellEditCommit),LX(e,"cellEditStart",t.onCellEditStart),LX(e,"cellEditStop",t.onCellEditStop)},QZ=e=>Id({},e,{editRows:{}});function JZ(e,t){var n;const r=UG(e,"useGridEditRows");ZZ(e,t),((e,t)=>{var n,r;const o=U.useRef(null),a=U.useRef(null),i=zV(e,dG),s=e=>(...n)=>{t.editMode===YG.Row&&e(...n)},l=U.useCallback(((t,n)=>{n!==e.current.getRowMode(t)&&(e.current.setState((r=>{const o=Id({},r.editRows);return n===ZG.Edit?(o[t]={},i.forEach((n=>{const r=e.current.getCellParams(t,n.field);r.isEditable&&(o[t][n.field]={value:r.value})}))):delete o[t],Id({},r,{editRows:o})})),e.current.forceUpdate())}),[e,i]),u=U.useCallback((n=>t.editMode===YG.Cell?ZG.View:YZ(e.current.state)[n]?ZG.Edit:ZG.View),[e,t.editMode]),c=U.useCallback(((n,r={})=>{var o;if(t.editMode===YG.Cell)throw new Error("MUI: You can't commit changes when the edit mode is 'cell'.");e.current.unstable_runPendingEditCellValueMutation(n);const a=e.current.getEditRowsModel()[n];if(!a)throw new Error(`MUI: Row at id: ${n} is not being edited.`);if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating&&!Object.keys(a).reduce(((e,t)=>e&&!a[t].isValidating&&!a[t].error),!0))return!1;if(Object.values(a).some((e=>!!e.error)))return!1;const i=Object.keys(a).filter((t=>"function"==typeof e.current.getColumn(t).preProcessEditCellProps));if(i.length>0){const t=e.current.getRow(n),o=i.map((async r=>{const o=e.current.getColumn(r),i=await Promise.resolve(o.preProcessEditCellProps({id:n,row:t,props:a[r]}));return e.current.unstable_setEditCellProps({id:n,field:r,props:i}),i.error}));return Promise.all(o).then((t=>!t.some((e=>!!e))&&(e.current.publishEvent("rowEditCommit",n,r),!0)))}return e.current.publishEvent("rowEditCommit",n,r),!0}),[e,t.editMode,null==(n=t.experimentalFeatures)?void 0:n.preventCommitWhileValidating]),d=U.useCallback((t=>{const n=e.current.getEditRowsModel()[t.id],r=e.current.getRow(t.id);let o=!0;return new Promise((a=>{Object.keys(n).forEach((async a=>{const i=e.current.getColumn(a);let s=a===t.field?{value:t.value}:n[a];s=e.current.unstable_setEditCellProps({id:t.id,field:a,props:Id({},s,{isValidating:!0})}),i.preProcessEditCellProps&&(s=await Promise.resolve(i.preProcessEditCellProps({id:t.id,row:r,props:Id({},s,{value:a===t.field?e.current.unstable_parseValue(t.id,a,t.value):s.value})}))),s.error&&(o=!1),e.current.unstable_setEditCellProps({id:t.id,field:a,props:Id({},s,{isValidating:!1})})})),a(o)}))}),[e]);VX(e,{setRowMode:l,getRowMode:u,commitRowChange:c,unstable_setRowEditingEditCellValue:d});const p=U.useCallback((async(n,r)=>{if(229===r.which)return;const{cellMode:o,isEditable:a}=n;if(!a)return;const i=o===XG.Edit,s=e.current.getRowParams(n.id);if(i)if("Enter"===r.key){var l;if(!(await e.current.commitRowChange(n.id))&&null!=(l=t.experimentalFeatures)&&l.preventCommitWhileValidating)return;e.current.publishEvent("rowEditStop",s,r)}else"Escape"===r.key&&e.current.publishEvent("rowEditStop",s,r);else"Enter"===r.key&&e.current.publishEvent("rowEditStart",s,r)}),[e,null==(r=t.experimentalFeatures)?void 0:r.preventCommitWhileValidating]),f=U.useCallback(((t,n)=>{if(!t.isEditable)return;const r=e.current.getRowParams(t.id);e.current.publishEvent("rowEditStart",r,n)}),[e]),m=U.useCallback((t=>{const n=e.current.getRow(t.id),r=e.current.getEditRowsModel()[t.id];Object.keys(r).forEach((async o=>{const a=e.current.getColumn(o);if(a.preProcessEditCellProps){const i=o===t.field?t.props:r[o],s=await Promise.resolve(a.preProcessEditCellProps({id:t.id,row:n,props:i}));e.current.unstable_setEditCellProps({id:t.id,field:o,props:s})}else o===t.field&&e.current.unstable_setEditCellProps(t)}))}),[e]),g=U.useCallback((t=>{e.current.setRowMode(t.id,ZG.Edit)}),[e]),h=U.useCallback(((t,n)=>{e.current.setRowMode(t.id,ZG.View),"Enter"===n.key&&e.current.publishEvent("cellNavigationKeyDown",t,n)}),[e]),b=U.useCallback((t=>{const n=e.current.getEditRowsModel()[t];if(!n)throw new Error(`MUI: Row at id: ${t} is not being edited.`);const r=e.current.getRow(t);if(r){let t=Id({},r);Object.keys(n).forEach((r=>{const o=e.current.getColumn(r),a=n[r].value;o.valueSetter?t=o.valueSetter({row:t,value:a}):t[r]=a})),e.current.updateRows([t])}}),[e]),v=U.useCallback((e=>{a.current=e}),[]),y=async(t,n)=>{t.cellMode!==XG.View&&(a.current=null,o.current=setTimeout((async()=>{var r;if((null==(r=a.current)?void 0:r.id)!==t.id){await e.current.commitRowChange(t.id,n);const r=e.current.getRowParams(t.id);e.current.publishEvent("rowEditStop",r,n)}})))},w=Ph(((e,t)=>{y(e,t)})),S=Ph((()=>{const t=lW(e);if(!t)return;const n=e.current.getCellParams(t.id,t.field);y(n,{})}));NX(e,"cellKeyDown",s(p)),NX(e,"cellDoubleClick",s(f)),NX(e,"editCellPropsChange",s(m)),NX(e,"rowEditStart",s(g)),NX(e,"rowEditStop",s(h)),NX(e,"rowEditCommit",s(b)),NX(e,"cellFocusIn",s(v)),NX(e,"cellFocusOut",s(w)),NX(e,"columnHeaderDragStart",s(S)),LX(e,"rowEditCommit",t.onRowEditCommit),LX(e,"rowEditStart",t.onRowEditStart),LX(e,"rowEditStop",t.onRowEditStop)})(e,t);const o=U.useRef({});e.current.unstable_registerControlState({stateId:"editRows",propModel:t.editRowsModel,propOnChange:t.onEditRowsModelChange,stateSelector:YZ,changeEvent:"editRowsModelChange"});const a=U.useCallback((e=>!e.rowNode.isAutoGenerated&&!e.rowNode.isPinned&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!t.isCellEditable||t.isCellEditable(e))),[t.isCellEditable]),i=U.useCallback(((e,t)=>{if(o.current[e])if(t){if(o.current[e][t]){const[,n]=o.current[e][t];n()}}else Object.keys(o.current[e]).forEach((t=>{const[,n]=o.current[e][t];n()}))}),[]),s=U.useCallback(((n,r={})=>{((e,t,n,r)=>{if(!n)return void r();if(o.current[e]||(o.current[e]={}),o.current[e][t]){const[n]=o.current[e][t];clearTimeout(n)}const a=setTimeout((()=>{r(),delete o.current[e][t]}),n);o.current[e][t]=[a,()=>{r();const[n]=o.current[e][t];clearTimeout(n),delete o.current[e][t]}]})(n.id,n.field,n.debounceMs,(()=>{var o;if(null!=(o=t.experimentalFeatures)&&o.preventCommitWhileValidating)return"row"===t.editMode?e.current.unstable_setRowEditingEditCellValue(n):e.current.unstable_setCellEditingEditCellValue(n);const a={id:n.id,field:n.field,props:{value:n.value}};return e.current.publishEvent("editCellPropsChange",a,r)}))}),[e,t.editMode,null==(n=t.experimentalFeatures)?void 0:n.preventCommitWhileValidating]),l=U.useCallback(((t,n,r)=>{const o=e.current.getColumn(n);return o.valueParser?o.valueParser(r,e.current.getCellParams(t,n)):r}),[e]),u=U.useCallback((t=>{const{id:n,field:o,props:a}=t;r.debug(`Setting cell props on id: ${n} field: ${o}`),e.current.setState((e=>{const t=Id({},e.editRows);return t[n]=Id({},e.editRows[n]),t[n][o]=Id({},a,{value:l(n,o,a.value)}),Id({},e,{editRows:t})})),e.current.forceUpdate();return YZ(e.current.state)[n][o]}),[e,r,l]),c=U.useCallback((t=>{YZ(e.current.state)!==t&&(r.debug("Setting editRows model"),e.current.setState((e=>Id({},e,{editRows:t}))),e.current.forceUpdate())}),[e,r]),d=U.useCallback((()=>YZ(e.current.state)),[e]),p=U.useCallback(((e,t)=>{const n=t.detail>1;e.isEditable&&e.cellMode===XG.View&&n&&t.preventDefault()}),[]);NX(e,"cellMouseDown",p),LX(e,"editCellPropsChange",t.onEditCellPropsChange);VX(e,{isCellEditable:a,setEditRowsModel:c,getEditRowsModel:d,setEditCellValue:s,unstable_setEditCellProps:u,unstable_parseValue:l,unstable_runPendingEditCellValueMutation:i}),U.useEffect((()=>{void 0!==t.editRowsModel&&e.current.setEditRowsModel(t.editRowsModel)}),[e,t.editRowsModel])}const eQ=["id","field"],tQ=["id","field"],nQ=$V(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#persistence."],"error"),rQ=["id"],oQ=["id"],aQ=$V(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. ` ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#persistence."],"error"),iQ=e=>Id({},e,{editRows:{}}),sQ=(e,t)=>{((e,t)=>{const[n,r]=U.useState({}),o=U.useRef(n),a=U.useRef({}),{processRowUpdate:i,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:u,signature:c}=t,d=e=>(...n)=>{t.editMode===YG.Cell&&e(...n)},p=U.useCallback(((t,n)=>{const r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error(`MUI: The cell with id=${t} and field=${n} is not editable.`)}),[e]),f=U.useCallback(((t,n,r)=>{if(e.current.getCellMode(t,n)!==r)throw new Error(`MUI: The cell with id=${t} and field=${n} is not in ${r} mode.`)}),[e]),m=U.useCallback(((t,n)=>{if(!t.isEditable)return;if(t.cellMode===XG.Edit)return;const r=Id({},t,{reason:tW.cellDoubleClick});e.current.publishEvent("cellEditStart",r,n)}),[e]),g=U.useCallback(((t,n)=>{if(t.cellMode===XG.View)return;if(e.current.getCellMode(t.id,t.field)===XG.View)return;const r=Id({},t,{reason:nW.cellFocusOut});e.current.publishEvent("cellEditStop",r,n)}),[e]),h=U.useCallback(((t,n)=>{if(t.cellMode===XG.Edit){if(229===n.which)return;let r;if("Escape"===n.key?r=nW.escapeKeyDown:"Enter"===n.key?r=nW.enterKeyDown:"Tab"===n.key&&(r=n.shiftKey?nW.shiftTabKeyDown:nW.tabKeyDown,n.preventDefault()),r){const o=Id({},t,{reason:r});e.current.publishEvent("cellEditStop",o,n)}}else if(t.isEditable){let r;if(" "===n.key&&n.shiftKey)return;if(aq(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?r=tW.printableKeyDown:"Enter"===n.key?r=tW.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(r=tW.deleteKeyDown),r){const o=Id({},t,{reason:r,key:n.key});e.current.publishEvent("cellEditStart",o,n)}}}),[e]),b=U.useCallback((t=>{const{id:n,field:r,reason:o,key:a}=t,i={id:n,field:r};o===tW.printableKeyDown?U.version.startsWith("18")?i.initialValue=a:i.deleteValue=!0:o===tW.deleteKeyDown&&(i.deleteValue=!0),e.current.startCellEditMode(i)}),[e]),v=U.useCallback((n=>{const{id:r,field:o,reason:a}=n;let i;e.current.unstable_runPendingEditCellValueMutation(r,o),a===nW.enterKeyDown?i="below":a===nW.tabKeyDown?i="right":a===nW.shiftTabKeyDown&&(i="left");let s="escapeKeyDown"===a;YZ(e.current.state)[r][o].isProcessingProps&&!t.disableIgnoreModificationsIfProcessingProps&&(s=!0),e.current.stopCellEditMode({id:r,field:o,ignoreModifications:s,cellToFocusAfter:i})}),[e,t.disableIgnoreModificationsIfProcessingProps]);NX(e,"cellDoubleClick",d(m)),NX(e,"cellFocusOut",d(g)),NX(e,"cellKeyDown",d(h)),NX(e,"cellEditStart",d(b)),NX(e,"cellEditStop",d(v)),LX(e,"cellEditStart",t.onCellEditStart),LX(e,"cellEditStop",t.onCellEditStop);const y=U.useCallback(((t,n)=>{const r=YZ(e.current.state);return r[t]&&r[t][n]?XG.Edit:XG.View}),[e]),w=Ph((n=>{const a=n!==t.cellModesModel;if(u&&a){const t=c===AX.DataGridPro?{api:e.current}:{};u(n,t)}t.cellModesModel&&a||(r(n),o.current=n,e.current.publishEvent("cellModesModelChange",n))})),S=U.useCallback(((e,t,n)=>{const r=Id({},o.current);if(null!==n)r[e]=Id({},r[e],{[t]:Id({},n)});else{const n=_d(r[e],[t].map(fb));r[e]=n,0===Object.keys(r[e]).length&&delete r[e]}w(r)}),[w]),x=U.useCallback(((t,n,r)=>{e.current.setState((e=>{const o=Id({},e.editRows);return null!==r?o[t]=Id({},o[t],{[n]:Id({},r)}):(delete o[t][n],0===Object.keys(o[t]).length&&delete o[t]),Id({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),E=U.useCallback((e=>{const{id:t,field:n}=e,r=_d(e,eQ);p(t,n),f(t,n,XG.View),S(t,n,Id({mode:XG.Edit},r))}),[p,f,S]),C=Ph((t=>{const{id:n,field:r,deleteValue:o,initialValue:a}=t;let i=e.current.getCellValue(n,r);(o||a)&&(i=o?"":a),x(n,r,{value:i,error:!1,isProcessingProps:!1}),e.current.setCellFocus(n,r)})),k=U.useCallback((e=>{const{id:t,field:n}=e,r=_d(e,tQ);f(t,n,XG.Edit),S(t,n,Id({mode:XG.View},r))}),[f,S]),R=Ph((async t=>{const{id:n,field:r,ignoreModifications:o,cellToFocusAfter:l="none"}=t;f(n,r,XG.Edit),e.current.unstable_runPendingEditCellValueMutation(n,r);const u=()=>{x(n,r,null),S(n,r,null),"none"!==l&&e.current.unstable_moveFocusToRelativeCell(n,r,l)};if(o)return void u();const c=YZ(e.current.state),{error:d,isProcessingProps:p}=c[n][r];if(d||p)return a.current[n][r].mode=XG.Edit,void S(n,r,{mode:XG.Edit});const m=e.current.unstable_getRowWithUpdatedValuesFromCellEditing(n,r);if(i){const t=e=>{a.current[n][r].mode=XG.Edit,S(n,r,{mode:XG.Edit}),s?s(e):nQ()};try{const r=e.current.getRow(n);Promise.resolve(i(m,r)).then((t=>{e.current.updateRows([t]),u()})).catch(t)}catch(g){t(g)}}else e.current.updateRows([m]),u()})),T=U.useCallback((async t=>{var n,r;const{id:o,field:a,value:i,debounceMs:s,unstable_skipValueParser:l}=t;p(o,a),f(o,a,XG.Edit);const u=e.current.getColumn(a),c=e.current.getRow(o);let d=i;u.valueParser&&!l&&(d=u.valueParser(i,e.current.getCellParams(o,a)));let m=YZ(e.current.state),g=Id({},m[o][a],{value:d,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(u.preProcessEditCellProps){const e=i!==m[o][a].value;g=Id({},g,{isProcessingProps:!0}),x(o,a,g),g=await Promise.resolve(u.preProcessEditCellProps({id:o,row:c,props:g,hasChanged:e}))}return e.current.getCellMode(o,a)!==XG.View&&(m=YZ(e.current.state),g=Id({},g,{isProcessingProps:!1}),g.value=u.preProcessEditCellProps?m[o][a].value:d,x(o,a,g),m=YZ(e.current.state),!(null!=(n=m[o])&&null!=(r=n[a])&&r.error))}),[e,p,f,x]),I=U.useCallback(((t,n)=>{const r=e.current.getColumn(n),o=YZ(e.current.state),{value:a}=o[t][n],i=e.current.getRow(t);return r.valueSetter?r.valueSetter({value:a,row:i}):Id({},i,{[n]:a})}),[e]);VX(e,{getCellMode:y,startCellEditMode:E,stopCellEditMode:k,unstable_setCellEditingEditCellValue:T,unstable_getRowWithUpdatedValuesFromCellEditing:I}),U.useEffect((()=>{l&&w(l)}),[l,w]),U.useEffect((()=>{const t=YV(e),r=a.current;a.current=AK(n),Object.entries(n).forEach((([e,n])=>{Object.entries(n).forEach((([n,o])=>{var a,i,s;const l=(null==(a=r[e])||null==(i=a[n])?void 0:i.mode)||XG.View,u=null!=(s=t[e])?s:e;o.mode===XG.Edit&&l===XG.View?C(Id({id:u,field:n},o)):o.mode===XG.View&&l===XG.Edit&&R(Id({id:u,field:n},o))}))}))}),[e,n,C,R])})(e,t),((e,t)=>{const[n,r]=U.useState({}),o=U.useRef(n),a=U.useRef({}),i=U.useRef(null),s=U.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:u,rowModesModel:c,onRowModesModelChange:d,signature:p}=t,f=e=>(...n)=>{t.editMode===YG.Row&&e(...n)},m=U.useCallback(((t,n)=>{const r=e.current.getCellParams(t,n);if(!e.current.isCellEditable(r))throw new Error(`MUI: The cell with id=${t} and field=${n} is not editable.`)}),[e]),g=U.useCallback(((t,n)=>{if(e.current.getRowMode(t)!==n)throw new Error(`MUI: The row with id=${t} is not in ${n} mode.`)}),[e]),h=U.useCallback(((t,n)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===ZG.Edit)return;const r=Id({},e.current.getRowParams(t.id),{field:t.field,reason:rW.cellDoubleClick});e.current.publishEvent("rowEditStart",r,n)}),[e]),b=U.useCallback((e=>{s.current=e}),[]),v=U.useCallback(((t,n)=>{t.isEditable&&e.current.getRowMode(t.id)!==ZG.View&&(s.current=null,i.current=setTimeout((()=>{var r;if(i.current=null,(null==(r=s.current)?void 0:r.id)!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===ZG.View)return;const r=Id({},e.current.getRowParams(t.id),{field:t.field,reason:oW.rowFocusOut});e.current.publishEvent("rowEditStop",r,n)}})))}),[e]);U.useEffect((()=>()=>{clearTimeout(i.current)}),[]);const y=U.useCallback(((t,n)=>{if(t.cellMode===ZG.Edit){if(229===n.which)return;let r;if("Escape"===n.key)r=oW.escapeKeyDown;else if("Enter"===n.key)r=oW.enterKeyDown;else if("Tab"===n.key){const o=uG(e).filter((n=>e.current.isCellEditable(e.current.getCellParams(t.id,n))));n.shiftKey?t.field===o[0]&&(r=oW.shiftTabKeyDown):t.field===o[o.length-1]&&(r=oW.tabKeyDown),r&&n.preventDefault()}if(r){const o=Id({},e.current.getRowParams(t.id),{reason:r,field:t.field});e.current.publishEvent("rowEditStop",o,n)}}else if(t.isEditable){let r;if(" "===n.key&&n.shiftKey)return;if(aq(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?r=rW.printableKeyDown:"Enter"===n.key?r=rW.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(r=rW.deleteKeyDown),r){const o=Id({},e.current.getRowParams(t.id),{field:t.field,key:n.key,reason:r});e.current.publishEvent("rowEditStart",o,n)}}}),[e]),w=U.useCallback((t=>{const{id:n,field:r,reason:o,key:a}=t,i={id:n,fieldToFocus:r};o===rW.printableKeyDown?U.version.startsWith("18")?i.initialValue=a:i.deleteValue=!!r:o===rW.deleteKeyDown&&(i.deleteValue=!!r),e.current.startRowEditMode(i)}),[e]),S=U.useCallback((n=>{const{id:r,reason:o,field:a}=n;let i;e.current.unstable_runPendingEditCellValueMutation(r),o===oW.enterKeyDown?i="below":o===oW.tabKeyDown?i="right":o===oW.shiftTabKeyDown&&(i="left");let s="escapeKeyDown"===o;const l=YZ(e.current.state);s||t.disableIgnoreModificationsIfProcessingProps||(s=Object.values(l[r]).some((e=>e.isProcessingProps))),e.current.stopRowEditMode({id:r,ignoreModifications:s,field:a,cellToFocusAfter:i})}),[e,t.disableIgnoreModificationsIfProcessingProps]);NX(e,"cellDoubleClick",f(h)),NX(e,"cellFocusIn",f(b)),NX(e,"cellFocusOut",f(v)),NX(e,"cellKeyDown",f(y)),NX(e,"rowEditStart",f(w)),NX(e,"rowEditStop",f(S)),LX(e,"rowEditStart",t.onRowEditStart),LX(e,"rowEditStop",t.onRowEditStop);const x=U.useCallback((n=>{if(t.editMode===YG.Cell)return ZG.View;const r=YZ(e.current.state);return r[n]&&Object.keys(r[n]).length>0?ZG.Edit:ZG.View}),[e,t.editMode]),E=Ph((n=>{const a=n!==t.rowModesModel;if(d&&a){const t=p===AX.DataGridPro?{api:e.current}:{};d(n,t)}t.rowModesModel&&a||(r(n),o.current=n,e.current.publishEvent("rowModesModelChange",n))})),C=U.useCallback(((e,t)=>{const n=Id({},o.current);null!==t?n[e]=Id({},t):delete n[e],E(n)}),[E]),k=U.useCallback(((t,n)=>{e.current.setState((e=>{const r=Id({},e.editRows);return null!==n?r[t]=n:delete r[t],Id({},e,{editRows:r})})),e.current.forceUpdate()}),[e]),R=U.useCallback(((t,n,r)=>{e.current.setState((e=>{const o=Id({},e.editRows);return null!==r?o[t]=Id({},o[t],{[n]:Id({},r)}):(delete o[t][n],0===Object.keys(o[t]).length&&delete o[t]),Id({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),T=U.useCallback((e=>{const{id:t}=e,n=_d(e,rQ);g(t,ZG.View),C(t,Id({mode:ZG.Edit},n))}),[g,C]),I=Ph((t=>{const{id:n,fieldToFocus:r,deleteValue:o,initialValue:a}=t,i=uG(e).reduce(((t,i)=>{if(!e.current.getCellParams(n,i).isEditable)return t;let s=e.current.getCellValue(n,i);return r===i&&(o||a)&&(s=o?"":a),t[i]={value:s,error:!1,isProcessingProps:!1},t}),{});k(n,i),r&&e.current.setCellFocus(n,r)})),_=U.useCallback((e=>{const{id:t}=e,n=_d(e,oQ);g(t,ZG.Edit),C(t,Id({mode:ZG.View},n))}),[g,C]),A=Ph((t=>{const{id:n,ignoreModifications:r,field:o,cellToFocusAfter:i="none"}=t;e.current.unstable_runPendingEditCellValueMutation(n);const s=()=>{"none"!==i&&o&&e.current.unstable_moveFocusToRelativeCell(n,o,i),k(n,null),C(n,null)};if(r)return void s();const c=YZ(e.current.state),d=e.current.getRow(n);if(Object.values(c[n]).some((e=>e.isProcessingProps)))return void(a.current[n].mode=ZG.Edit);if(Object.values(c[n]).some((e=>e.error)))return a.current[n].mode=ZG.Edit,void C(n,{mode:ZG.Edit});const p=e.current.unstable_getRowWithUpdatedValuesFromRowEditing(n);if(l){const t=e=>{a.current[n].mode=ZG.Edit,C(n,{mode:ZG.Edit}),u?u(e):aQ()};try{Promise.resolve(l(p,d)).then((t=>{e.current.updateRows([t]),s()})).catch(t)}catch(f){t(f)}}else e.current.updateRows([p]),s()})),O=U.useCallback((t=>{const{id:n,field:r,value:o,debounceMs:a,unstable_skipValueParser:i}=t;m(n,r);const s=e.current.getColumn(r),l=e.current.getRow(n);let u=o;s.valueParser&&!i&&(u=s.valueParser(o,e.current.getCellParams(n,r)));let c=YZ(e.current.state),d=Id({},c[n][r],{value:u,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return s.preProcessEditCellProps||R(n,r,d),new Promise((t=>{const o=[];if(s.preProcessEditCellProps){const a=d.value!==c[n][r].value;d=Id({},d,{isProcessingProps:!0}),R(n,r,d);const i=_d(c[n],[r].map(fb)),p=Promise.resolve(s.preProcessEditCellProps({id:n,row:l,props:d,hasChanged:a,otherFieldsProps:i})).then((o=>{e.current.getRowMode(n)!==ZG.View?(c=YZ(e.current.state),(o=Id({},o,{isProcessingProps:!1})).value=s.preProcessEditCellProps?c[n][r].value:u,R(n,r,o)):t(!1)}));o.push(p)}Object.entries(c[n]).forEach((([a,i])=>{if(a===r)return;const s=e.current.getColumn(a);if(!s.preProcessEditCellProps)return;i=Id({},i,{isProcessingProps:!0}),R(n,a,i),c=YZ(e.current.state);const u=_d(c[n],[a].map(fb)),d=Promise.resolve(s.preProcessEditCellProps({id:n,row:l,props:i,hasChanged:!1,otherFieldsProps:u})).then((r=>{e.current.getRowMode(n)!==ZG.View?(r=Id({},r,{isProcessingProps:!1}),R(n,a,r)):t(!1)}));o.push(d)})),Promise.all(o).then((()=>{e.current.getRowMode(n)===ZG.Edit?(c=YZ(e.current.state),t(!c[n][r].error)):t(!1)}))}))}),[e,m,R]),N=U.useCallback((t=>{const n=YZ(e.current.state);let r=Id({},e.current.getRow(t));return Object.entries(n[t]).forEach((([t,n])=>{const o=e.current.getColumn(t);o.valueSetter?r=o.valueSetter({value:n.value,row:r}):r[t]=n.value})),r}),[e]);VX(e,{getRowMode:x,startRowEditMode:T,stopRowEditMode:_,unstable_setRowEditingEditCellValue:O,unstable_getRowWithUpdatedValuesFromRowEditing:N}),U.useEffect((()=>{c&&E(c)}),[c,E]),U.useEffect((()=>{const t=YV(e),r=a.current;a.current=AK(n),Object.entries(n).forEach((([e,n])=>{var o,a;const i=(null==(o=r[e])?void 0:o.mode)||ZG.View,s=null!=(a=t[e])?a:e;n.mode===ZG.Edit&&i===ZG.View?I(Id({id:s},n)):n.mode===ZG.View&&i===ZG.Edit&&A(Id({id:s},n))}))}),[e,n,I,A])})(e,t);const n=U.useRef({}),{isCellEditable:r}=t,o=U.useCallback((e=>!e.rowNode.isAutoGenerated&&(!!e.colDef.editable&&(!!e.colDef.renderEditCell&&(r?r(e):!e.rowNode.isPinned)))),[r]);U.useEffect((()=>{const e=n.current;return()=>{Object.entries(e).forEach((([t,n])=>{Object.keys(n).forEach((n=>{const[r]=e[t][n];clearTimeout(r),delete e[t][n]}))}))}}),[]);const a=U.useCallback(((e,t)=>{if(n.current[e])if(t){if(n.current[e][t]){const[,r]=n.current[e][t];r()}}else Object.keys(n.current[e]).forEach((t=>{const[,r]=n.current[e][t];r()}))}),[]),i=U.useCallback((r=>{const{id:o,field:a,debounceMs:i}=r;return new Promise((s=>{((e,t,r,o)=>{if(!r)return void o();if(n.current[e]||(n.current[e]={}),n.current[e][t]){const[r]=n.current[e][t];clearTimeout(r)}const a=setTimeout((()=>{o(),delete n.current[e][t]}),r);n.current[e][t]=[a,()=>{const[r]=n.current[e][t];clearTimeout(r),o(),delete n.current[e][t]}]})(o,a,i,(async()=>{const n=t.editMode===YG.Row?e.current.unstable_setRowEditingEditCellValue:e.current.unstable_setCellEditingEditCellValue;if(e.current.getCellMode(o,a)===XG.Edit){const e=await n(r);s(e)}}))}))}),[e,t.editMode]),s=U.useCallback(((n,r)=>t.editMode===YG.Cell?e.current.unstable_getRowWithUpdatedValuesFromCellEditing(n,r):e.current.unstable_getRowWithUpdatedValuesFromRowEditing(n)),[e,t.editMode]),l=U.useCallback(((t,n)=>({changeReason:YZ(e.current.state)[t][n].changeReason})),[e]);VX(e,{isCellEditable:o,setEditCellValue:i,unstable_runPendingEditCellValueMutation:a,unstable_getRowWithUpdatedValues:s,unstable_getEditCellMeta:l})},lQ=(e,t,n)=>(n.current.unstable_caches.rows=kZ({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),Id({},e,{rows:RZ({apiRef:n,previousTree:null,rowCountProp:t.rowCount,loadingProp:t.loading})})),uQ=({ids:e,idRowsLookup:t,idToIdLookup:n,previousTree:r})=>{const o={};for(let a=0;a({field:t,colDef:e.current.getColumn(t)})),[e]),n=U.useCallback(((...t)=>e.current.getCellValue(...t)),[e]),r=U.useCallback((t=>{const r=e.current.getRow(t);if(!r)throw new Error(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:r,getValue:n}}),[e,n]),o=U.useCallback(((t,r)=>{const o=e.current.getRow(t),a=e.current.getRowNode(t);if(!o||!a)throw new Error(`No row with id #${t} found`);const i=lW(e),s=dW(e);return{id:t,field:r,row:o,rowNode:a,value:o[r],colDef:e.current.getColumn(r),cellMode:e.current.getCellMode(t,r),getValue:n,api:e.current,hasFocus:null!==i&&i.field===r&&i.id===t,tabIndex:s&&s.field===r&&s.id===t?0:-1}}),[e,n]),a=U.useCallback(((t,r)=>{const o=e.current.getColumn(r),a=e.current.getCellValue(t,r),i=e.current.getRow(t),s=e.current.getRowNode(t);if(!i||!s)throw new Error(`No row with id #${t} found`);const l=lW(e),u=dW(e),c={id:t,field:r,row:i,rowNode:s,colDef:o,cellMode:e.current.getCellMode(t,r),getValue:n,hasFocus:null!==l&&l.field===r&&l.id===t,tabIndex:u&&u.field===r&&u.id===t?0:-1,value:a,formattedValue:a};return o&&o.valueFormatter&&(c.formattedValue=o.valueFormatter({id:t,field:c.field,value:c.value,api:e.current})),c.isEditable=o&&e.current.isCellEditable(c),c}),[e,n]),i=U.useCallback(((t,n)=>{const r=e.current.getColumn(n);if(!r||!r.valueGetter){const r=e.current.getRow(t);if(!r)throw new Error(`No row with id #${t} found`);return r[n]}return r.valueGetter(o(t,n))}),[e,o]),s=U.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${Dq(t)}"]`)}(e.current.rootElementRef.current,t):null),[e]),l=U.useCallback((t=>e.current.rootElementRef.current?function(e,t){return e.querySelector(jq(t))}(e.current.rootElementRef.current,t):null),[e]),u=U.useCallback(((t,n)=>e.current.rootElementRef.current?function(e,{id:t,field:n}){const r=`${jq(t)} .${NV.cell}[data-field="${Dq(n)}"]`;return e.querySelector(r)}(e.current.rootElementRef.current,{id:t,field:n}):null),[e]);VX(e,{getCellValue:i,getCellParams:a,getCellElement:u,getRowParams:r,getRowElement:l,getColumnHeaderParams:t,getColumnHeaderElement:s})}$V(["MUI: You are calling getValue. This method is deprecated and will be removed in the next major version.","Instead, you can access the data from `params.row`."]);const dQ=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],pQ=(e,t)=>{var n;return Id({},e,{selection:null!=(n=dQ(t.selectionModel))?n:[]})},fQ={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",errorOverlayDefaultLabel:"An error occurred.",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",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelDeleteIconLabel:"Delete",filterPanelLinkOperator:"Logic operator",filterPanelOperators:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",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",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",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",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"},mQ=["sortingOrder"],gQ=U.memo((function(e){const{sortingOrder:t}=e,n=_d(e,mQ),r=AV(),[o]=t,a="asc"===o?r.components.ColumnSortedAscendingIcon:r.components.ColumnSortedDescendingIcon;return a?ee.jsx(a,Id({},n)):null})),hQ=["error","hasError","errorInfo"],bQ=U.forwardRef((function(e,t){const{error:n}=e,r=_d(e,hQ),o=IV(),a=o.current.getLocaleText("errorOverlayDefaultLabel"),i=zV(o,LG);return ee.jsx(Iq,Id({ref:t,sx:{width:"100%",minHeight:2*i}},r,{children:(null==n?void 0:n.message)||a}))})),vQ=U.forwardRef((function(e,t){const n=IV().current.getLocaleText("noResultsOverlayLabel");return ee.jsx(Iq,Id({ref:t},e,{children:n}))})),yQ=Id({},{BooleanCellTrueIcon:HW,BooleanCellFalseIcon:jW,ColumnMenuIcon:DW,OpenFilterButtonIcon:IW,FilterPanelDeleteIcon:jW,ColumnFilteredIcon:_W,ColumnSelectorIcon:OW,ColumnUnsortedIcon:gQ,ColumnSortedAscendingIcon:CW,ColumnSortedDescendingIcon:kW,ColumnResizeIcon:NW,DensityCompactIcon:PW,DensityStandardIcon:LW,DensityComfortableIcon:MW,ExportIcon:UW,MoreActionsIcon:VW,TreeDataCollapseIcon:TW,TreeDataExpandIcon:RW,GroupingCriteriaCollapseIcon:TW,GroupingCriteriaExpandIcon:RW,DetailPanelExpandIcon:FW,DetailPanelCollapseIcon:$W,RowReorderIcon:zW,QuickFilterIcon:AW,QuickFilterClearIcon:jW},{BaseCheckbox:eR,BaseTextField:vL,BaseFormControl:MT,BaseSelect:sO,BaseSwitch:lP,BaseButton:Ak,BaseTooltip:oN,BasePopper:AE,Cell:function(e){const{align:t,children:n,colIndex:r,cellMode:o,field:a,formattedValue:i,hasFocus:s,height:l,isEditable:u,rowId:c,tabIndex:d,value:p,width:f,className:m,showRightBorder:g,colSpan:h,disableDragEvents:b,onClick:v,onDoubleClick:y,onMouseDown:w,onMouseUp:S,onKeyDown:x,onDragEnter:E,onDragOver:C}=e,k=_d(e,fW),R=null==i?p:i,T=U.useRef(null),I=U.useRef(null),_=IV(),A=(e=>{const{align:t,showRightBorder:n,isEditable:r,classes:o}=e;return eb({root:["cell",`cell--text${cm(t)}`,r&&"cell--editable",n&&"withBorder"],content:["cellContent"]},OV,o)})({align:t,showRightBorder:g,isEditable:u,classes:AV().classes}),O=U.useCallback((e=>t=>{const n=_.current.getCellParams(c,a||"");_.current.publishEvent(e,n,t),S&&S(t)}),[_,a,S,c]),N=U.useCallback((e=>t=>{const n=_.current.getCellParams(c,a||"");_.current.publishEvent(e,n,t),w&&w(t)}),[_,a,w,c]),P=U.useCallback(((e,t)=>n=>{if(!n.currentTarget.contains(n.target))return;if(!_.current.getRow(c))return;const r=_.current.getCellParams(c,a||"");_.current.publishEvent(e,r,n),t&&t(n)}),[_,a,c]),L={minWidth:f,maxWidth:f,minHeight:l,maxHeight:"auto"===l?"none":l};U.useEffect((()=>{if(!s||o===XG.Edit)return;const e=Rh(_.current.rootElementRef.current);if(T.current&&!T.current.contains(e.activeElement)){const e=T.current.querySelector('[tabindex="0"]'),t=I.current||e||T.current;if(void 0===mW&&document.createElement("div").focus({get preventScroll(){return mW=!0,!1}}),mW)t.focus({preventScroll:!0});else{const e=_.current.getScrollPosition();t.focus(),_.current.scroll(e)}}}),[s,o,_]);let M=k.onFocus;const D="actions"===_.current.getColumn(a).type,j=b?null:{onDragEnter:P("cellDragEnter",E),onDragOver:P("cellDragOver",C)};return ee.jsx("div",Id({ref:T,className:KG(m,A.root),role:"cell","data-field":a,"data-colindex":r,"aria-colindex":r+1,"aria-colspan":h,style:L,tabIndex:"view"!==o&&u||D?-1:d,onClick:P("cellClick",v),onDoubleClick:P("cellDoubleClick",y),onMouseDown:N("cellMouseDown"),onMouseUp:O("cellMouseUp"),onKeyDown:P("cellKeyDown",x)},j,k,{onFocus:M,children:(()=>{if(null==n){const e=null==R?void 0:R.toString();return ee.jsx("div",{title:e,className:A.content,children:e})}return U.isValidElement(n)&&D?U.cloneElement(n,{focusElementRef:I}):n})()}))},SkeletonCell:function(e){const{align:t,width:n,contentWidth:r}=e,o=_d(e,yq),a=(e=>{const{align:t,classes:n}=e;return eb({root:["cell","cellSkeleton",`cell--text${cm(t)}`]},OV,n)})({classes:AV().classes,align:t});return ee.jsx("div",Id({className:a.root,style:{width:n}},o,{children:ee.jsx(yO,{width:`${r}%`})}))},ColumnHeaderFilterIconButton:function(e){var t;const{counter:n,field:r,onClick:o}=e,a=IV(),i=AV(),s=(e=>{const{classes:t}=e;return eb({icon:["filterIcon"]},OV,t)})(Id({},e,{classes:i.classes})),l=U.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:n}=Xq(a.current.state);t&&n===Zq.filters?a.current.hideFilterPanel():a.current.showFilterPanel(),o&&o(a.current.getColumnHeaderParams(r),e)}),[a,r,o]);if(!n)return null;const u=ee.jsx(Uw,{onClick:l,color:"default","aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,children:ee.jsx(i.components.ColumnFilteredIcon,{className:s.icon,fontSize:"small"})});return ee.jsx(i.components.BaseTooltip,Id({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(n),enterDelay:1e3},null==(t=i.componentsProps)?void 0:t.baseTooltip,{children:ee.jsxs(Oq,{children:[n>1&&ee.jsx(rk,{badgeContent:n,color:"default",children:u}),1===n&&u]})}))},ColumnMenu:hY,ErrorOverlay:bQ,Footer:gX,Header:hX,Toolbar:null,PreferencesPanel:HY,LoadingOverlay:bX,NoResultsOverlay:vQ,NoRowsOverlay:vX,Pagination:wX,FilterPanel:rX,ColumnsPanel:function(e){var t,n,r;const o=IV(),a=U.useRef(null),i=zV(o,dG),s=zV(o,pG),l=AV(),[u,c]=U.useState(""),d=(e=>{const{classes:t}=e;return eb({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},OV,t)})(l),{sort:p,searchPredicate:f=jY,autoFocusSearchField:m=!0}=e,g=_d(e,PY),h=U.useMemo((()=>{switch(p){case"asc":return[...i].sort(((e,t)=>DY.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...i].sort(((e,t)=>-DY.compare(e.headerName||e.field,t.headerName||t.field)));default:return i}}),[i,p]),b=e=>{const{name:t}=e.target;o.current.setColumnVisibility(t,!1===s[t])},v=U.useCallback((e=>{if(o.current.unstable_caches.columns.isUsingColumnVisibilityModel){const t=Id({},pG(o));return i.forEach((n=>{n.hideable&&(e?delete t[n.field]:t[n.field]=!1)})),o.current.setColumnVisibilityModel(t)}return o.current.updateColumns(i.map((t=>!1!==t.hideable?{field:t.field,hide:!e}:t)))}),[o,i]),y=U.useCallback((e=>{c(e.target.value)}),[]),w=U.useMemo((()=>{if(!u)return h;const e=u.toLowerCase();return h.filter((t=>f(t,e)))}),[h,u,f]),S=U.useRef(null);U.useEffect((()=>{m?a.current.focus():S.current&&"function"==typeof S.current.focus&&S.current.focus()}),[m]);let x=!1;const E=e=>!1===x&&!1!==e.hideable&&(x=!0,!0);return ee.jsxs(NY,Id({},g,{children:[ee.jsx(IY,{children:ee.jsx(l.components.BaseTextField,Id({label:o.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:o.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:a,value:u,onChange:y,variant:"standard",fullWidth:!0},null==(t=l.componentsProps)?void 0:t.baseTextField))}),ee.jsx(wY,{children:ee.jsx(LY,{className:d.root,ownerState:l,children:w.map((e=>{var t;return ee.jsxs(MY,{className:d.columnsPanelRow,ownerState:l,children:[ee.jsx(HT,{control:ee.jsx(l.components.BaseSwitch,Id({disabled:!1===e.hideable,checked:!1!==s[e.field],onClick:b,name:e.field,size:"small",inputRef:E(e)?S:void 0},null==(t=l.componentsProps)?void 0:t.baseSwitch)),label:e.headerName||e.field}),!l.disableColumnReorder&&false]},e.field)}))})}),ee.jsxs(CY,{children:[ee.jsx(l.components.BaseButton,Id({onClick:()=>v(!1)},null==(n=l.componentsProps)?void 0:n.baseButton,{children:o.current.getLocaleText("columnsPanelHideAllButton")})),ee.jsx(l.components.BaseButton,Id({onClick:()=>v(!0)},null==(r=l.componentsProps)?void 0:r.baseButton,{children:o.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))},Panel:UY,Row:TX}),wQ=(e,t)=>{const n=(e=>{const{classes:t}=e;return U.useMemo((()=>eb({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},OV,t)),[t])})({classes:t.classes}),r=U.useCallback((r=>{const o=Id({},BK,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),a=t.checkboxSelection,i=null!=r.lookup[$K];return a&&!i?(r.lookup[$K]=o,r.all=[$K,...r.all]):!a&&i?(delete r.lookup[$K],r.all=r.all.filter((e=>e!==$K))):a&&i&&(r.lookup[$K]=Id({},o,r.lookup[$K])),r}),[e,n,t.checkboxSelection]);YX(e,"hydrateColumns",r)},SQ=(e,t)=>{var n,r,o,a;const i=null!=(n=null!=(r=t.sortModel)?r:null==(o=t.initialState)||null==(a=o.sorting)?void 0:a.sortModel)?n:[];return Id({},e,{sorting:{sortModel:vK(i,t.disableMultipleColumnsSorting),sortedRows:[]}})};function xQ(e){const{clientHeight:t,scrollTop:n,offsetHeight:r,offsetTop:o}=e,a=o+r;return r>t?o:a-t>n?a-t:oId({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}}),CQ=e=>{var t,n;const r=tZ(void 0,e);((e,t)=>{var n;const r=U.useCallback((e=>{var n;if(null==(n=t.experimentalFeatures)||!n.columnGrouping)return e;const r=dZ(t.columnGroupingModel);return e.all.forEach((t=>{var n,o;const a=null!=(n=r[t])?n:[],i=e.lookup[t];(function(e){return void 0!==e.groupPath})(i)&&IK(a,null==i?void 0:i.groupPath)||(e.lookup[t]=Id({},e.lookup[t],{groupPath:null!=(o=r[t])?o:[]}))})),e}),[t.columnGroupingModel,null==(n=t.experimentalFeatures)?void 0:n.columnGrouping]);YX(e,"hydrateColumns",r)})(r,e),wQ(r,e),(e=>{ZX(e,QX,"rowTreeCreation",uQ)})(r),nZ(pQ,r,e),nZ(sZ,r,e),nZ(fZ,r,e),nZ(lQ,r,e),nZ(null!=(t=e.experimentalFeatures)&&t.newEditingApi?iQ:QZ,r,e),nZ($Z,r,e),nZ(SQ,r,e),nZ(KZ,r,e),nZ(FZ,r,e),nZ(gZ,r,e),nZ(WZ,r,e),nZ(EQ,r,e),nZ(iZ,r,e),BZ(r,e),((e,t)=>{const n=UG(e,"useGridSelection"),r=U.useMemo((()=>dQ(t.selectionModel,tK(e.current.state))),[e,t.selectionModel]),o=U.useRef(null);e.current.unstable_registerControlState({stateId:"selection",propModel:r,propOnChange:t.onSelectionModelChange,stateSelector:tK,changeEvent:"selectionChange"});const{checkboxSelection:a,disableMultipleSelection:i,disableSelectionOnClick:s,pagination:l,paginationMode:u,isRowSelectable:c}=t,d=!i||a,p=xX(e,t),f=U.useCallback((t=>{var n;let r=t;const a=null!=(n=o.current)?n:t,i=e.current.isRowSelected(t);if(i){const t=CG(e),n=t.findIndex((e=>e===a)),o=t.findIndex((e=>e===r));if(n===o)return;r=n>o?t[o+1]:t[o-1]}o.current=t,e.current.selectRowRange({startId:a,endId:r},!i)}),[e]),m=U.useCallback((t=>{tK(e.current.state)!==t&&(n.debug("Setting selection model"),e.current.setState((e=>Id({},e,{selection:t}))),e.current.forceUpdate())}),[e,n]),g=U.useCallback((t=>tK(e.current.state).includes(t)),[e]),h=U.useCallback((t=>{if(c&&!c(e.current.getRowParams(t)))return!1;const n=e.current.getRowNode(t);return!("footer"===(null==n?void 0:n.position)||null!=n&&n.isPinned)}),[e,c]),b=U.useCallback((()=>rK(e)),[e]),v=U.useCallback(((t,r=!0,a=!1)=>{if(e.current.isRowSelectable(t))if(o.current=t,a)n.debug(`Setting selection for row ${t}`),e.current.setSelectionModel(r?[t]:[]);else{n.debug(`Toggling selection for row ${t}`);const o=tK(e.current.state).filter((e=>e!==t));r&&o.push(t),(o.length<2||d)&&e.current.setSelectionModel(o)}}),[e,n,d]),y=U.useCallback(((t,r=!0,o=!1)=>{n.debug("Setting selection for several rows");const a=t.filter((t=>e.current.isRowSelectable(t)));let i;if(o)i=r?a:[];else{const t=Id({},oK(e));a.forEach((e=>{r?t[e]=e:delete t[e]})),i=Object.values(t)}(i.length<2||d)&&e.current.setSelectionModel(i)}),[e,n,d]),w=U.useCallback((({startId:t,endId:r},o=!0,a)=>{if(!e.current.getRow(t)||!e.current.getRow(r))return;n.debug(`Expanding selection from row ${t} to row ${r}`);const i=CG(e),s=i.indexOf(t),l=i.indexOf(r),[u,c]=s>l?[l,s]:[s,l],d=i.slice(u,c+1);e.current.selectRows(d,o,a)}),[e,n]);VX(e,{selectRow:v,selectRows:y,selectRowRange:w,setSelectionModel:m,getSelectedRows:b,isRowSelected:g,isRowSelectable:h});const S=U.useCallback((()=>{if(t.keepNonExistentRowsSelected)return;const n=tK(e.current.state),r=KV(e),o=Id({},oK(e));let a=!1;n.forEach((e=>{r[e]||(delete o[e],a=!0)})),a&&e.current.setSelectionModel(Object.values(o))}),[e,t.keepNonExistentRowsSelected]),x=U.useCallback(((t,n)=>{const r=n.metaKey||n.ctrlKey,o=!a&&!r&&!cq(n),i=!d||o,s=e.current.isRowSelected(t);i?e.current.selectRow(t,!!o||!s,!0):e.current.selectRow(t,!s,!1)}),[e,d,a]),E=U.useCallback(((t,n)=>{var r;if(s)return;const o=null==(r=n.target.closest(`.${NV.cell}`))?void 0:r.getAttribute("data-field");o!==BK.field&&o!==EX&&(o&&e.current.getColumn(o).type===LK||e.current.getRowNode(t.id).isPinned||(n.shiftKey&&(d||a)?f(t.id):x(t.id,n)))}),[s,d,a,e,f,x]),C=U.useCallback(((e,t)=>{var n;d&&t.shiftKey&&(null==(n=window.getSelection())||n.removeAllRanges())}),[d]),k=U.useCallback(((t,n)=>{n.nativeEvent.shiftKey?f(t.id):e.current.selectRow(t.id,t.value)}),[e,f]),R=U.useCallback((n=>{const r=t.checkboxSelectionVisibleOnly&&t.pagination?cK(e):CG(e);e.current.selectRows(r,n.value)}),[e,t.checkboxSelectionVisibleOnly,t.pagination]),T=U.useCallback(((t,n)=>{if(e.current.getCellMode(t.id,t.field)!==XG.Edit&&n.currentTarget.contains(n.target)){if(uq(n.key)&&n.shiftKey){const r=lW(e);if(r&&r.id!==t.id){n.preventDefault();const o=e.current.isRowSelected(r.id);if(!d)return void e.current.selectRow(r.id,!o,!0);const a=e.current.getRowIndexRelativeToVisibleRows(r.id),i=e.current.getRowIndexRelativeToVisibleRows(t.id);let s,l;a>i?o?(s=i,l=a-1):(s=i,l=a):o?(s=a+1,l=i):(s=a,l=i);const u=p.rows.slice(s,l+1).map((e=>e.id));return void e.current.selectRows(u,!o)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void x(t.id,n);"a"===n.key.toLowerCase()&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),y(e.current.getAllRowIds(),!0))}}),[e,x,y,p.rows,d]);NX(e,"sortedRowsSet",S),NX(e,"rowClick",E),NX(e,"rowSelectionCheckboxChange",k),NX(e,"headerSelectionCheckboxChange",R),NX(e,"cellMouseDown",C),NX(e,"cellKeyDown",T),U.useEffect((()=>{void 0!==r&&e.current.setSelectionModel(r)}),[e,r]);const I=null!=r;U.useEffect((()=>{if(I)return;const t=tK(e.current.state);if(h){const n=t.filter((e=>h(e)));n.length{const t=tK(e.current.state);if(!d&&t.length>1){const{rows:n}=SX(e,{pagination:l,paginationMode:u}),r=n.reduce(((e,{id:t})=>(e[t]=!0,e)),{}),o=t.find((e=>{let t=!0;return h&&(t=h(e)),t&&r[e]}));e.current.setSelectionModel(void 0!==o?[o]:[])}}),[e,d,a,i,h,l,u])})(r,e),function(e,t){var n,r;const o=UG(e,"useGridColumns"),a=U.useMemo((()=>lY(t.columnTypes)),[t.columnTypes]),i=U.useRef(t.columns),s=U.useRef(a);e.current.unstable_registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:pG,changeEvent:"columnVisibilityModelChange"});const l=U.useCallback((t=>{o.debug("Updating columns state."),e.current.setState(dY(t)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",t.all)}),[o,e]),u=U.useCallback((t=>cG(e)[t]),[e]),c=U.useCallback((()=>dG(e)),[e]),d=U.useCallback((()=>fG(e)),[e]),p=U.useCallback((()=>vG(e)),[e]),f=U.useCallback(((t,n=!0)=>(n?fG(e):dG(e)).findIndex((e=>e.field===t))),[e]),m=U.useCallback((t=>{const n=f(t);return mG(e)[n]}),[e,f]),g=U.useCallback((t=>{pG(e)!==t&&(e.current.setState((n=>Id({},n,{columns:cY({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!1,currentColumnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),e.current.forceUpdate())}),[e,a]),h=U.useCallback((t=>{const n=cY({apiRef:e,columnTypes:a,columnsToUpsert:t,initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!0,keepOnlyColumnsToUpsert:!1});l(n)}),[e,l,a]),b=U.useCallback((t=>e.current.updateColumns([t])),[e]),v=U.useCallback(((t,n)=>{if(e.current.unstable_caches.columns.isUsingColumnVisibilityModel){var r;const o=pG(e);if(n!==(null==(r=o[t])||r)){const r=Id({},o,{[t]:n});e.current.setColumnVisibilityModel(r)}}else{const r=Id({},e.current.getColumn(t),{hide:!n});e.current.updateColumns([r]);const o={field:t,colDef:r,isVisible:n};e.current.publishEvent("columnVisibilityChange",o)}}),[e]),y=U.useCallback(((t,n)=>{const r=uG(e),a=r.findIndex((e=>e===t));if(a===n)return;o.debug(`Moving column ${t} to index ${n}`);const i=[...r],s=i.splice(a,1)[0];i.splice(n,0,s),l(Id({},lG(e.current.state),{all:i}));const u={field:t,element:e.current.getColumnHeaderElement(t),colDef:e.current.getColumn(t),targetIndex:n,oldIndex:a};e.current.publishEvent("columnOrderChange",u)}),[e,o,l]),w=U.useCallback(((t,n)=>{o.debug(`Updating column ${t} width to ${n}`);const r=Id({},e.current.getColumn(t),{width:n});e.current.updateColumns([r]),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:r,width:n})}),[e,o]);VX(e,{getColumn:u,getAllColumns:c,getColumnIndex:f,getColumnPosition:m,getVisibleColumns:d,getColumnsMeta:p,updateColumn:b,updateColumns:h,setColumnVisibilityModel:g,setColumnVisibility:v,setColumnIndex:y,setColumnWidth:w});const S=U.useCallback(((n,r)=>{const o={};if(e.current.unstable_caches.columns.isUsingColumnVisibilityModel){var a,i,s;const n=pG(e);(!r.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(null!=(a=null==(i=t.initialState)||null==(s=i.columns)?void 0:s.columnVisibilityModel)?a:{}).length>0||Object.keys(n).length>0)&&(o.columnVisibilityModel=n)}o.orderedFields=uG(e);const l=dG(e),u={};return l.forEach((e=>{if(e.hasBeenResized){const t={};sY.forEach((n=>{let r=e[n];r===1/0&&(r=-1),t[n]=r})),u[e.field]=t}})),Object.keys(u).length>0&&(o.dimensions=u),Id({},n,{columns:o})}),[e,t.columnVisibilityModel,null==(n=t.initialState)?void 0:n.columns]),x=U.useCallback(((t,n)=>{var r;const o=e.current.unstable_caches.columns.isUsingColumnVisibilityModel?null==(r=n.stateToRestore.columns)?void 0:r.columnVisibilityModel:void 0,i=n.stateToRestore.columns;if(null==o&&null==i)return t;const s=cY({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:i,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,currentColumnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(dY(s)),null!=i&&e.current.publishEvent("columnsChange",s.all),t}),[e,a]),E=U.useCallback(((e,n)=>{if(n===Zq.columns){var r;const e=t.components.ColumnsPanel;return ee.jsx(e,Id({},null==(r=t.componentsProps)?void 0:r.columnsPanel))}return e}),[t.components.ColumnsPanel,null==(r=t.componentsProps)?void 0:r.columnsPanel]);YX(e,"exportState",S),YX(e,"restoreState",x),YX(e,"preferencePanel",E);const C=U.useRef(null);NX(e,"viewportInnerSizeChange",(t=>{C.current!==t.width&&(C.current=t.width,l(uY(lG(e.current.state),t.width)))})),LX(e,"columnVisibilityChange",t.onColumnVisibilityChange);const k=U.useCallback((()=>{o.info("Columns pipe processing have changed, regenerating the columns");const t=cY({apiRef:e,columnTypes:a,columnsToUpsert:[],initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,keepOnlyColumnsToUpsert:!1});l(t)}),[e,o,l,a]);XX(e,"hydrateColumns",k);const R=U.useRef(!0);U.useEffect((()=>{if(R.current)return void(R.current=!1);if(o.info(`GridColumns have changed, new length ${t.columns.length}`),i.current===t.columns&&s.current===a)return;const n=cY({apiRef:e,columnTypes:a,initialState:void 0,shouldRegenColumnVisibilityModelFromColumns:!e.current.unstable_caches.columns.isUsingColumnVisibilityModel,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});i.current=t.columns,s.current=a,l(n)}),[o,e,l,t.columns,a]),U.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,o,t.columnVisibilityModel])}(r,e),((e,t)=>{const n=UG(e,"useGridRows"),r=xX(e,t),o=U.useRef(Date.now()),a=U.useRef(null),i=U.useCallback((t=>{var n;return null!=(n=KV(e)[t])?n:null}),[e]),s=U.useMemo((()=>r.rows.reduce(((e,{id:t},n)=>(e[t]=n,e)),{})),[r.rows]),l=U.useCallback(((n,r)=>{const i=()=>{a.current=null,o.current=Date.now(),e.current.setState((n=>Id({},n,{rows:RZ({apiRef:e,previousTree:XV(e),rowCountProp:t.rowCount,loadingProp:t.loading})}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(a.current&&(clearTimeout(a.current),a.current=null),e.current.unstable_caches.rows=n,!r)return void i();const s=t.throttleRowsMs-(Date.now()-o.current);s>0?a.current=setTimeout(i,s):i()}),[t.throttleRowsMs,t.rowCount,t.loading,e]),u=U.useCallback((r=>{n.debug(`Updating all rows, new length ${r.length}`);const o=kZ({rows:r,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),a=e.current.unstable_caches.rows;o.rowsBeforePartialUpdates=a.rowsBeforePartialUpdates,l(o,!0)}),[n,t.getRowId,t.loading,t.rowCount,l,e]),c=U.useCallback((n=>{if(t.signature===AX.DataGrid&&n.length>1)throw new Error(["MUI: You can't 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"));const r=new Map;n.forEach((e=>{const n=CZ(e,t.getRowId,"A row was provided without id when calling updateRows():");r.has(n)?r.set(n,Id({},r.get(n),e)):r.set(n,e)}));const o=[],a=e.current.unstable_caches.rows,i={rowsBeforePartialUpdates:a.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:a.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:a.rowCountPropBeforePartialUpdates,idRowsLookup:Id({},a.idRowsLookup),idToIdLookup:Id({},a.idToIdLookup),ids:[...a.ids]};r.forEach(((t,n)=>"delete"===t._action?(delete i.idRowsLookup[n],delete i.idToIdLookup[n],void o.push(n)):e.current.getRow(n)?void(i.idRowsLookup[n]=Id({},e.current.getRow(n),t)):(i.idRowsLookup[n]=t,i.idToIdLookup[n]=n,void i.ids.push(n)))),o.length>0&&(i.ids=i.ids.filter((e=>!o.includes(e)))),l(i,!0)}),[t.signature,t.getRowId,l,e]),d=U.useCallback((()=>{const t=JV(e),n=KV(e);return new Map(t.map((e=>[e,n[e]])))}),[e]),p=U.useCallback((()=>GV(e)),[e]),f=U.useCallback((()=>JV(e)),[e]),m=U.useCallback((e=>s[e]),[s]),g=U.useCallback(((t,n)=>{const r=e.current.getRowNode(t);if(!r)throw new Error(`MUI: No row with id #${t} found`);const o=Id({},r,{childrenExpanded:n});e.current.setState((e=>Id({},e,{rows:Id({},e.rows,{tree:Id({},e.rows.tree,{[t]:o})})}))),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",o)}),[e]),h=U.useCallback((t=>{var n;return null!=(n=XV(e)[t])?n:null}),[e]),b=U.useCallback((({skipAutoGeneratedRows:t=!0,groupId:n,applySorting:r,applyFiltering:o})=>{const a=XV(e);let i;if(r){const r=a[n];if(!r)return[];const o=oG(e);i=[];const s=o.findIndex((e=>e===n))+1;for(let e=s;er.depth;e+=1){const n=o[e],r=a[n];t&&r.isAutoGenerated||i.push(n)}}else i=TZ(a,n,t);if(o){const t=xG(e);i=i.filter((e=>!1!==t[e]))}return i}),[e]),v={getRow:i,getRowModels:d,getRowsCount:p,getAllRowIds:f,setRows:u,setRowIndex:U.useCallback(((t,r)=>{const o=JV(e),a=o.findIndex((e=>e===t));if(-1===a||a===r)return;n.debug(`Moving row ${t} to index ${r}`);const i=[...o];i.splice(r,0,i.splice(a,1)[0]),e.current.setState((e=>Id({},e,{rows:Id({},e.rows,{ids:i})}))),e.current.unstable_caches.rows.ids=i,e.current.publishEvent("rowsSet")}),[e,n]),updateRows:c,setRowChildrenExpansion:g,getRowNode:h,getRowIndexRelativeToVisibleRows:m,getRowGroupChildren:b,unstable_replaceRows:U.useCallback(((n,r)=>{if(t.signature===AX.DataGrid&&r.length>1)throw new Error(["MUI: You can't 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;const o=[...JV(e)],a=KV(e),i=YV(e),s=XV(e),l=Id({},a),u=Id({},i),c=Id({},s),d=r.map((e=>({id:CZ(e,t.getRowId,"A row was provided without id when calling replaceRows()."),model:e})));d.forEach(((e,t)=>{const[r]=o.splice(n+t,1,e.id);delete l[r],delete u[r],delete c[r]})),d.forEach((e=>{const t={id:e.id,parent:null,depth:0,groupingKey:null,groupingField:null};l[e.id]=e.model,u[e.id]=e.id,c[e.id]=t})),e.current.unstable_caches.rows.idRowsLookup=l,e.current.unstable_caches.rows.idToIdLookup=u,e.current.unstable_caches.rows.ids=o,e.current.setState((e=>{const t={idRowsLookup:l,idToIdLookup:u,tree:c,ids:o};return Id({},e,{rows:Id({},e.rows,t,{groupingResponseBeforeRowHydration:Id({},e.rows.groupingResponseBeforeRowHydration,t)})})})),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId])},y=U.useCallback((()=>{let r;n.info("Row grouping pre-processing have changed, regenerating the row tree"),r=e.current.unstable_caches.rows.rowsBeforePartialUpdates===t.rows?e.current.unstable_caches.rows:kZ({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),l(r,!1)}),[n,e,t.rows,t.getRowId,t.loading,t.rowCount,l]),w=U.useCallback((e=>{"rowTreeCreation"===e&&y()}),[y]),S=U.useCallback((()=>{e.current.unstable_getActiveStrategy("rowTree")!==ZV(e)&&y()}),[e,y]);NX(e,"activeStrategyProcessorChange",w),NX(e,"strategyAvailabilityChange",S);const x=U.useCallback((()=>{e.current.setState((t=>Id({},t,{rows:Id({},t.rows,e.current.unstable_applyPipeProcessors("hydrateRows",t.rows.groupingResponseBeforeRowHydration))}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()}),[e]);XX(e,"hydrateRows",x),VX(e,v),U.useEffect((()=>()=>{null!==a.current&&clearTimeout(a.current)}),[]);const E=U.useRef(!0);U.useEffect((()=>{if(E.current)return void(E.current=!1);const r=e.current.unstable_caches.rows.rowsBeforePartialUpdates===t.rows,o=e.current.unstable_caches.rows.loadingPropBeforePartialUpdates===t.loading,a=e.current.unstable_caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(r)return o||(e.current.setState((e=>Id({},e,{rows:Id({},e.rows,{loading:t.loading})}))),e.current.unstable_caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),void(a||(e.current.setState((e=>Id({},e,{rows:Id({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.unstable_caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()));n.debug(`Updating all rows, new length ${t.rows.length}`),l(kZ({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),!1)}),[t.rows,t.rowCount,t.getRowId,t.loading,n,l,e])})(r,e),cQ(r),(e=>{const t=U.useRef({}),n=U.useCallback(((e,n,r)=>{const o=t.current;o[e]||(o[e]={}),o[e][n]=r}),[]),r=U.useCallback(((e,n)=>{var r;return null==(r=t.current[e])?void 0:r[n]}),[]),o=U.useCallback((t=>{const{columnIndex:r,rowId:o,minFirstColumnIndex:a,maxLastColumnIndex:i,columns:s}=t,l=s.length,u=s[r],c="function"==typeof u.colSpan?u.colSpan(e.current.getCellParams(o,u.field)):u.colSpan;if(!c||1===c)return n(o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:u.computedWidth}}),{colSpan:1};let d=u.computedWidth;for(let e=1;e=a&&t{for(let a=t;a1&&(a+=i.colSpan-1)}}),[o]);VX(e,{unstable_getCellColSpanInfo:r,unstable_calculateColSpan:a});const i=U.useCallback((()=>{t.current={}}),[]);NX(e,"columnOrderChange",i)})(r),((e,t)=>{var n;const r=U.useCallback((t=>{var n,r;return null!=(n=null==(r=cG(e)[t])?void 0:r.groupPath)?n:[]}),[e]),o=U.useCallback((()=>lZ(e)),[e]);VX(e,{unstable_getColumnGroupPath:r,unstable_getAllGroupDetails:o});const a=U.useRef(!0);U.useEffect((()=>{var n,r;if(a.current)return void(a.current=!1);if(null==(n=t.experimentalFeatures)||!n.columnGrouping)return;const o=pZ(null!=(r=t.columnGroupingModel)?r:[]);e.current.setState((e=>Id({},e,{columnGrouping:Id({},e.columnGrouping,{lookup:o})})))}),[e,t.columnGroupingModel,null==(n=t.experimentalFeatures)?void 0:n.columnGrouping])})(r,e);return(null!=(n=e.experimentalFeatures)&&n.newEditingApi?sQ:JZ)(r,e),((e,t)=>{const n=UG(e,"useGridFocus"),r=U.useRef(null),o=U.useCallback(((t,n)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),n)}),[e]),a=U.useCallback(((t,r)=>{const a=lW(e);(null==a?void 0:a.id)===t&&(null==a?void 0:a.field)===r||(e.current.setState((e=>(n.debug(`Focusing on cell with id=${t} and field=${r}`),Id({},e,{tabIndex:{cell:{id:t,field:r},columnHeader:null},focus:{cell:{id:t,field:r},columnHeader:null}})))),e.current.forceUpdate(),e.current.getRow(t)&&(a&&o(a,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,r))))}),[e,n,o]),i=U.useCallback(((t,r={})=>{const a=lW(e);o(a,r),e.current.setState((e=>(n.debug(`Focusing on column header with colIndex=${t}`),Id({},e,{tabIndex:{columnHeader:{field:t},cell:null},focus:{columnHeader:{field:t},cell:null}})))),e.current.forceUpdate()}),[e,n,o]),s=U.useCallback(((n,r,o)=>{let a=e.current.getColumnIndex(r),i=e.current.getRowIndexRelativeToVisibleRows(n);const s=fG(e);"right"===o?a+=1:"left"===o?a-=1:i+=1;const l=SX(e,{pagination:t.pagination,paginationMode:t.paginationMode});a>=s.length?(i+=1,i=0&&(a=s.length-1)),i=TK(i,0,l.rows.length-1);const u=l.rows[i],c=e.current.unstable_getCellColSpanInfo(u.id,a);c&&c.spannedByColSpan&&("left"===o||"below"===o?a=c.leftVisibleCellIndex:"right"===o&&(a=c.rightVisibleCellIndex)),a=TK(a,0,s.length-1);const d=s[a];e.current.setCellFocus(u.id,d.field)}),[e,t.pagination,t.paginationMode]),l=U.useCallback((({id:t,field:n})=>{e.current.setCellFocus(t,n)}),[e]),u=U.useCallback(((t,n)=>{"Enter"===n.key||"Tab"===n.key||uq(n.key)||e.current.setCellFocus(t.id,t.field)}),[e]),c=U.useCallback((({field:t},n)=>{n.target===n.currentTarget&&e.current.setColumnHeaderFocus(t,n)}),[e]),d=U.useCallback((()=>{n.debug("Clearing focus"),e.current.setState((e=>Id({},e,{focus:{cell:null,columnHeader:null}})))}),[n,e]),p=U.useCallback((e=>{r.current=e}),[]),f=U.useCallback((t=>{const n=r.current;r.current=null;const a=lW(e);if(!a)return void(n&&e.current.setCellFocus(n.id,n.field));if((null==n?void 0:n.id)===a.id&&(null==n?void 0:n.field)===a.field)return;const i=e.current.getCellElement(a.id,a.field);null!=i&&i.contains(t.target)||(n?e.current.setCellFocus(n.id,n.field):(e.current.setState((e=>Id({},e,{focus:{cell:null,columnHeader:null}}))),e.current.forceUpdate(),o(a,t)))}),[e,o]),m=U.useCallback((t=>{if("view"===t.cellMode)return;const n=lW(e);(null==n?void 0:n.id)===t.id&&(null==n?void 0:n.field)===t.field||e.current.setCellFocus(t.id,t.field)}),[e]),g=U.useCallback((()=>{const t=lW(e);t&&!e.current.getRow(t.id)&&e.current.setState((e=>Id({},e,{focus:{cell:null,columnHeader:null}})))}),[e]);VX(e,{setCellFocus:a,setColumnHeaderFocus:i,unstable_moveFocusToRelativeCell:s}),U.useEffect((()=>{const t=Rh(e.current.rootElementRef.current);return t.addEventListener("click",f),()=>{t.removeEventListener("click",f)}}),[e,f]),NX(e,"columnHeaderBlur",d),NX(e,"cellDoubleClick",l),NX(e,"cellMouseDown",p),NX(e,"cellKeyDown",u),NX(e,"cellModeChange",m),NX(e,"columnHeaderFocus",c),NX(e,"rowsSet",g)})(r,e),((e,t)=>{var n;const r=UG(e,"useGridPreferencesPanel"),o=U.useRef(),a=U.useRef(),i=U.useCallback((()=>{r.debug("Hiding Preferences Panel");const t=Xq(e.current.state);t.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:t.openedPanelValue}),e.current.setState((e=>Id({},e,{preferencePanel:{open:!1}}))),e.current.forceUpdate()}),[e,r]),s=U.useCallback((()=>{a.current=setTimeout((()=>clearTimeout(o.current)),0)}),[]),l=U.useCallback((()=>{o.current=setTimeout(i,100)}),[i]),u=U.useCallback((t=>{r.debug("Opening Preferences Panel"),s(),e.current.setState((e=>Id({},e,{preferencePanel:Id({},e.preferencePanel,{open:!0,openedPanelValue:t})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t}),e.current.forceUpdate()}),[r,s,e]);VX(e,{showPreferences:u,hidePreferences:l});const c=U.useCallback(((n,r)=>{var o;const a=Xq(e.current.state);return!r.exportOnlyDirtyModels||null!=(null==(o=t.initialState)?void 0:o.preferencePanel)||a.open?Id({},n,{preferencePanel:a}):n}),[e,null==(n=t.initialState)?void 0:n.preferencePanel]),d=U.useCallback(((t,n)=>{const r=n.stateToRestore.preferencePanel;return null!=r&&e.current.setState((e=>Id({},e,{preferencePanel:r}))),t}),[e]);YX(e,"exportState",c),YX(e,"restoreState",d),U.useEffect((()=>()=>{clearTimeout(o.current),clearTimeout(a.current)}),[])})(r,e),((e,t)=>{var n,r,o;const a=UG(e,"useGridFilter");e.current.unstable_registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:wG,changeEvent:"filterModelChange"});const i=U.useCallback((()=>{e.current.setState((n=>{const r=wG(n,e.current.instanceId),o=t.filterMode===QG?DZ(r,e):null,a=e.current.unstable_applyStrategyProcessor("filtering",{isRowMatchingFilters:o,filterModel:null!=r?r:lX()});return Id({},n,{filter:Id({},n.filter,a)})})),e.current.publishEvent("filteredRowsSet")}),[t.filterMode,e]),s=U.useCallback((()=>{i(),e.current.forceUpdate()}),[e,i]),l=U.useCallback((t=>{const n=wG(e),r=[...n.items],o=r.findIndex((e=>e.id===t.id));-1===o?r.push(t):r[o]=t,e.current.setFilterModel(Id({},n,{items:r}),"upsertFilterItem")}),[e]),u=U.useCallback((t=>{const n=wG(e),r=[...n.items];t.forEach((e=>{const n=t.findIndex((t=>t.id===e.id));-1===n?r.push(e):r[n]=e})),e.current.setFilterModel(Id({},n,{items:t}),"upsertFilterItems")}),[e]),c=U.useCallback((t=>{const n=wG(e),r=n.items.filter((e=>e.id!==t.id));r.length!==n.items.length&&e.current.setFilterModel(Id({},n,{items:r}),"deleteFilterItem")}),[e]),d=U.useCallback((n=>{if(a.debug("Displaying filter panel"),n){const r=wG(e),o=r.items.filter((t=>{var n;if(void 0!==t.value)return!0;const r=null==(n=e.current.getColumn(t.columnField).filterOperators)?void 0:n.find((e=>e.value===t.operatorValue));return!(void 0===(null==r?void 0:r.requiresFilterValue)||(null==r?void 0:r.requiresFilterValue))}));let a;a=o.find((e=>e.columnField===n))?o:t.disableMultipleColumnsFiltering?[_Z({columnField:n},e)]:[...o,_Z({columnField:n},e)],e.current.setFilterModel(Id({},r,{items:a}))}e.current.showPreferences(Zq.filters)}),[e,a,t.disableMultipleColumnsFiltering]),p=U.useCallback((()=>{a.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,a]),f=U.useCallback((t=>{const n=wG(e);n.linkOperator!==t&&e.current.setFilterModel(Id({},n,{linkOperator:t}),"changeLogicOperator")}),[e]),m=U.useCallback((t=>{const n=wG(e);IK(n.quickFilterValues,t)||e.current.setFilterModel(Id({},n,{quickFilterValues:[...t]}))}),[e]),g=U.useCallback(((n,r)=>{wG(e)!==n&&(a.debug("Setting filter model"),e.current.unstable_updateControlState("filter",LZ(n,t.disableMultipleColumnsFiltering,e),r),e.current.unstable_applyFilters())}),[e,a,t.disableMultipleColumnsFiltering]),h=U.useCallback((()=>{const t=EG(e);return new Map(t.map((e=>[e.id,e.model])))}),[e]);VX(e,{setFilterLinkOperator:f,unstable_applyFilters:s,deleteFilterItem:c,upsertFilterItem:l,upsertFilterItems:u,setFilterModel:g,showFilterPanel:d,hideFilterPanel:p,getVisibleRowModels:h,setQuickFilterValues:m});const b=U.useCallback(((n,r)=>{var o,a;const i=wG(e);return r.exportOnlyDirtyModels&&null==t.filterModel&&null==(null==(o=t.initialState)||null==(a=o.filter)?void 0:a.filterModel)&&IK(i,lX())?n:Id({},n,{filter:{filterModel:i}})}),[e,t.filterModel,null==(n=t.initialState)||null==(r=n.filter)?void 0:r.filterModel]),v=U.useCallback(((n,r)=>{var o;const a=null==(o=r.stateToRestore.filter)?void 0:o.filterModel;return null==a?n:(e.current.unstable_updateControlState("filter",LZ(a,t.disableMultipleColumnsFiltering,e),"restoreState"),Id({},n,{callbacks:[...n.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),y=U.useCallback(((e,n)=>{if(n===Zq.filters){var r;const e=t.components.FilterPanel;return ee.jsx(e,Id({},null==(r=t.componentsProps)?void 0:r.filterPanel))}return e}),[t.components.FilterPanel,null==(o=t.componentsProps)?void 0:o.filterPanel]),w=U.useCallback((n=>{if(t.filterMode===QG&&n.isRowMatchingFilters){const t=JV(e),r={};for(let o=0;o{a.debug("onColUpdated - GridColumns changed, applying filters");const t=wG(e),n=bG(e),r=t.items.filter((e=>e.columnField&&n[e.columnField]));r.length{"filtering"===t&&e.current.unstable_applyFilters()}),[e]);NX(e,"rowsSet",i),NX(e,"rowExpansionChange",e.current.unstable_applyFilters),NX(e,"columnsChange",S),NX(e,"activeStrategyProcessorChange",x),KX((()=>{e.current.unstable_applyFilters()})),U.useEffect((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,a,t.filterModel])})(r,e),((e,t)=>{var n,r;const o=UG(e,"useGridSorting");e.current.unstable_registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:iG,changeEvent:"sortModelChange"});const a=U.useCallback(((t,n)=>{const r=iG(e),o=r.findIndex((e=>e.field===t));let a=[...r];return o>-1?n?a.splice(o,1,n):a.splice(o,1):a=[...r,n],a}),[e]),i=U.useCallback(((n,r)=>{var o;const a=iG(e).find((e=>e.field===n.field));if(a){var i;const e=void 0===r?wK(null!=(i=n.sortingOrder)?i:t.sortingOrder,a.sort):r;return null==e?void 0:Id({},a,{sort:e})}return{field:n.field,sort:void 0===r?wK(null!=(o=n.sortingOrder)?o:t.sortingOrder):r}}),[e,t.sortingOrder]),s=U.useCallback((()=>{e.current.setState((n=>{if(t.sortingMode===JG)return o.debug("Skipping sorting rows as sortingMode = server"),Id({},n,{sorting:Id({},n.sorting,{sortedRows:JV(n,e.current.instanceId)})});const r=((e,t)=>{const n=e.map((e=>((e,t)=>{const n=t.current.getColumn(e.field);return n?{getSortCellParams:e=>({id:e,field:n.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,n.field),api:t.current}),comparator:"desc"===e.sort?(...e)=>-1*n.sortComparator(...e):n.sortComparator}: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 r=e,o=t,n.reduce(((e,t,n)=>{if(0!==e)return e;const a=r.params[n],i=o.params[n];return t.comparator(a.value,i.value,a,i)}),0);var r,o})).map((e=>e.node.id))})(iG(n,e.current.instanceId),e),a=e.current.unstable_applyStrategyProcessor("sorting",{sortRowList:r});return Id({},n,{sorting:Id({},n.sorting,{sortedRows:a})})})),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()}),[e,o,t.sortingMode]),l=U.useCallback((n=>{iG(e)!==n&&(o.debug("Setting sort model"),e.current.setState(yK(n,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())}),[e,o,t.disableMultipleColumnsSorting]),u=U.useCallback(((n,r,o)=>{if(!n.sortable)return;const s=i(n,r);let l;l=!o||t.disableMultipleColumnsSorting?s?[s]:[]:a(n.field,s),e.current.setSortModel(l)}),[e,a,i,t.disableMultipleColumnsSorting]),c=U.useCallback((()=>iG(e)),[e]),d=U.useCallback((()=>aG(e).map((e=>e.model))),[e]),p=U.useCallback((()=>oG(e)),[e]),f=U.useCallback((t=>e.current.getSortedRowIds().indexOf(t)),[e]),m=U.useCallback((t=>e.current.getSortedRowIds()[t]),[e]);VX(e,{getSortModel:c,getSortedRows:d,getSortedRowIds:p,getRowIndex:f,getRowIdFromRowIndex:m,setSortModel:l,sortColumn:u,applySorting:s});const g=U.useCallback(((n,r)=>{var o,a;const i=iG(e);return!r.exportOnlyDirtyModels||null!=t.sortModel||null!=(null==(o=t.initialState)||null==(a=o.sorting)?void 0:a.sortModel)||i.length>0?Id({},n,{sorting:{sortModel:i}}):n}),[e,t.sortModel,null==(n=t.initialState)||null==(r=n.sorting)?void 0:r.sortModel]),h=U.useCallback(((n,r)=>{var o;const a=null==(o=r.stateToRestore.sorting)?void 0:o.sortModel;return null==a?n:(e.current.setState(yK(a,t.disableMultipleColumnsSorting)),Id({},n,{callbacks:[...n.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),b=U.useCallback((t=>{const n=XV(e);if(!t.sortRowList){const t=[],r=[];return JV(e).forEach((e=>{n[e].isPinned||("footer"===n[e].position?r.push(e):t.push(e))})),[...t,...r]}const r=[],o=[];return Object.values(n).forEach((e=>{e.isPinned||("footer"===e.position?o.push(e.id):r.push(e))})),[...t.sortRowList(r),...o]}),[e]);YX(e,"exportState",g),YX(e,"restoreState",h),ZX(e,QX,"sorting",b);const v=U.useCallback((({colDef:e},t)=>{const n=t.shiftKey||t.metaKey||t.ctrlKey;u(e,void 0,n)}),[u]),y=U.useCallback((({colDef:e},t)=>{!tq(t.key)||t.ctrlKey||t.metaKey||u(e,void 0,t.shiftKey)}),[u]),w=U.useCallback((()=>{const t=iG(e),n=cG(e);if(t.length>0){const r=t.filter((e=>n[e.field]));r.length{"sorting"===t&&e.current.applySorting()}),[e]);NX(e,"columnHeaderClick",v),NX(e,"columnHeaderKeyDown",y),NX(e,"rowsSet",e.current.applySorting),NX(e,"columnsChange",w),NX(e,"activeStrategyProcessorChange",S),KX((()=>{e.current.applySorting()})),U.useEffect((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(r,e),((e,t)=>{const n=zV(e,fG),r=n.length>0?Math.max(...n.map((e=>{var t,n;return null!=(t=null==(n=e.groupPath)?void 0:n.length)?t:0}))):0,o=UG(e,"useDensity"),a=U.useCallback(((n,a=t.headerHeight,i=t.rowHeight,s=r)=>{o.debug(`Set grid density to ${n}`),e.current.setState((e=>{const t=NG(e),r=mZ(n,a,i,s);return IK(t,r)?e:Id({},e,{density:r})})),e.current.forceUpdate()}),[o,e,t.headerHeight,t.rowHeight,r]);U.useEffect((()=>{e.current.setDensity(t.density,t.headerHeight,t.rowHeight,r)}),[e,t.density,t.rowHeight,t.headerHeight,r]),VX(e,{setDensity:a})})(r,e),qZ(r,e),((e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,a=U.useRef({}),i=U.useRef(-1),s=U.useRef(!1),l=zV(e,LG),u=zV(e,yG),c=zV(e,aK),d=zV(e,rG),p=xX(e,t),f=zV(e,tG),m=U.useCallback((()=>{var t,u;s.current=!1;const c=jG(e.current.state,e.current.instanceId),d=t=>{a.current[t.id]||(a.current[t.id]={sizes:{baseCenter:l},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:i,needsFirstMeasurement:u,sizes:d}=a.current[t.id];let f=l;const m=d.baseCenter;if(i)f=m;else if(n){const e=n(Id({},t,{densityFactor:c}));if("auto"===e){if(u){const e=o?o(Id({},t,{densityFactor:c})):l;f=null!=e?e:l}else f=m;s.current=!0,a.current[t.id].autoHeight=!0}else f=null!=e?e:l,a.current[t.id].needsFirstMeasurement=!1,a.current[t.id].autoHeight=!1}else a.current[t.id].needsFirstMeasurement=!1;const g=Id({},Object.entries(d).reduce(((e,[t,n])=>(/^base[A-Z]/.test(t)&&(e[t]=n),e)),{}),{baseCenter:f});if(r){var h,b;const n=e.current.getRowIndexRelativeToVisibleRows(t.id),o=r(Id({},t,{isFirstVisible:0===n,isLastVisible:n===p.rows.length-1,indexRelativeToCurrentPage:n}));g.spacingTop=null!=(h=o.top)?h:0,g.spacingBottom=null!=(b=o.bottom)?b:0}const v=e.current.unstable_applyPipeProcessors("rowHeight",g,t);return a.current[t.id].sizes=v,v},m=[],g=p.rows.reduce(((e,t)=>{m.push(e);let n=0,r=0;const o=d(t);return Object.entries(o).forEach((([e,t])=>{/^base[A-Z]/.test(e)?n=t>n?t:n:r+=t})),e+n+r}),0);null==f||null==(t=f.top)||t.forEach((e=>{d(e)})),null==f||null==(u=f.bottom)||u.forEach((e=>{d(e)})),e.current.setState((e=>Id({},e,{rowsMeta:{currentPageTotalHeight:g,positions:m}}))),s.current||(i.current=1/0),e.current.forceUpdate()}),[e,p.rows,l,n,r,o,f]),g=U.useCallback((e=>{const t=a.current[e];return t?t.sizes.baseCenter:l}),[l]),h=U.useCallback(((e,t)=>{a.current[e].sizes.baseCenter=t,a.current[e].isResized=!0,a.current[e].needsFirstMeasurement=!1,m()}),[m]),b=U.useMemo((()=>Ch(m)),[m]),v=U.useCallback(((e,t,n)=>{if(!a.current[e]||!a.current[e].autoHeight)return;const r=a.current[e].sizes[`base${cm(n)}`]!==t;a.current[e].needsFirstMeasurement=!1,a.current[e].sizes[`base${cm(n)}`]=t,r&&b()}),[b]),y=U.useCallback((e=>{var t;return(null==(t=a.current[e])?void 0:t.autoHeight)||!1}),[]),w=U.useCallback((()=>i.current),[]),S=U.useCallback((e=>{s.current&&e>i.current&&(i.current=e)}),[]),x=U.useCallback((()=>{a.current={},m()}),[m]);U.useEffect((()=>{m()}),[l,u,c,d,m]),XX(e,"rowHeight",m),VX(e,{unstable_getLastMeasuredRowIndex:w,unstable_setLastMeasuredRowIndex:S,unstable_rowHasAutoHeight:y,unstable_getRowHeight:g,unstable_getRowInternalSizes:e=>{var t;return null==(t=a.current[e])?void 0:t.sizes},unstable_setRowHeight:h,unstable_storeRowHeightMeasurement:v,resetRowHeights:x})})(r,e),((e,t)=>{const n=UG(e,"useGridScroll"),r=e.current.columnHeadersElementRef,o=e.current.windowRef,a=zV(e,EG),i=U.useCallback((r=>{const i=GV(e),s=fG(e);if(null!=r.rowIndex&&0===i||0===s.length)return!1;n.debug(`Scrolling to cell at row ${r.rowIndex}, col: ${r.colIndex} `);let l={};if(null!=r.colIndex){const t=mG(e);let n;if(void 0!==r.rowIndex){var u;const t=null==(u=a[r.rowIndex])?void 0:u.id,o=e.current.unstable_getCellColSpanInfo(t,r.colIndex);o&&!o.spannedByColSpan&&(n=o.cellProps.width)}void 0===n&&(n=s[r.colIndex].computedWidth),l.left=xQ({clientHeight:o.current.clientWidth,scrollTop:o.current.scrollLeft,offsetHeight:n,offsetTop:t[r.colIndex]})}if(null!=r.rowIndex){var c,d;const n=SZ(e.current.state),a=iK(e),i=sK(e),s=t.pagination?r.rowIndex-a*i:r.rowIndex,u=n.positions[s+1]?n.positions[s+1]-n.positions[s]:n.currentPageTotalHeight-n.positions[s],p=(null==(c=o.current.querySelector(`.${NV["pinnedRows--top"]}`))?void 0:c.clientHeight)||0,f=(null==(d=o.current.querySelector(`.${NV["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;l.top=xQ({clientHeight:o.current.clientHeight-p-f,scrollTop:o.current.scrollTop,offsetHeight:u,offsetTop:n.positions[s]})}return l=e.current.unstable_applyPipeProcessors("scrollToIndexes",l,r),(void 0!==typeof l.left||void 0!==typeof l.top)&&(e.current.scroll(l),!0)}),[n,e,o,t.pagination,a]),s=U.useCallback((e=>{o.current&&null!=e.left&&r.current&&(r.current.scrollLeft=e.left,o.current.scrollLeft=e.left,n.debug(`Scrolling left: ${e.left}`)),o.current&&null!=e.top&&(o.current.scrollTop=e.top,n.debug(`Scrolling top: ${e.top}`)),n.debug("Scrolling, updating container, and viewport")}),[o,r,n]),l=U.useCallback((()=>null!=o&&o.current?{top:o.current.scrollTop,left:o.current.scrollLeft}:{top:0,left:0}),[o]);VX(e,{scroll:s,scrollToIndexes:i,getScrollPosition:l})})(r,e),(e=>{const t=UG(e,"useGridColumnMenu"),n=U.useCallback((n=>{e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===n?e:(t.debug("Opening Column Menu"),Id({},e,{columnMenu:{open:!0,field:n}}))))&&(e.current.hidePreferences(),e.current.forceUpdate())}),[e,t]),r=U.useCallback((()=>{e.current.setState((e=>e.columnMenu.open||void 0!==e.columnMenu.field?(t.debug("Hiding Column Menu"),Id({},e,{columnMenu:Id({},e.columnMenu,{open:!1,field:void 0})})):e))&&e.current.forceUpdate()}),[e,t]),o=U.useCallback((o=>{t.debug("Toggle Column Menu");const a=aZ(e.current.state);a.open&&a.field===o?r():n(o)}),[e,t,n,r]);VX(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o});const a=U.useCallback(((t,n)=>{if(!n.target.classList.contains(NV.menuIconButton))return;if(!n.relatedTarget)return;const r=n.relatedTarget.classList.contains(NV.menuList),o="menuitem"===n.relatedTarget.getAttribute("role");(r||o)&&e.current.setColumnHeaderFocus(t.field)}),[e]);NX(e,"columnResizeStart",r),NX(e,"columnHeaderFocus",a),NX(e,"virtualScrollerWheel",e.current.hideColumnMenu),NX(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(r),wZ(r),xZ(r,e),oZ(r),function(e,t){const n=UG(e,"useResizeContainer"),r=U.useRef(!1),o=U.useRef(null),a=U.useRef(null),i=zV(e,SZ),s=zV(e,FG),l=U.useCallback((()=>{var n;const r=null==(n=e.current.rootElementRef)?void 0:n.current,l=gG(e),u=IZ(e);if(!o.current)return;let c,d,p,f;if(null!=t.scrollbarSize)c=t.scrollbarSize;else if(l&&r){const e=Rh(r).createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.overflow="scroll",e.className="scrollDiv",r.appendChild(e),c=e.offsetWidth-e.clientWidth,r.removeChild(e)}else c=0;if(t.autoHeight)f=!1,p=Math.round(l)>o.current.width,d={width:o.current.width,height:i.currentPageTotalHeight+(p?c:0)};else{d={width:o.current.width,height:o.current.height-s};const e=(({content:e,container:t,scrollBarSize:n})=>{const r=e.width>t.width,o=e.height>t.height;let a=!1,i=!1;return(r||o)&&(a=r,i=e.height+(a?n:0)>t.height,i&&(a=e.width+n>t.width)),{hasScrollX:a,hasScrollY:i}})({content:{width:Math.round(l),height:i.currentPageTotalHeight},container:{width:d.width,height:d.height-u.top-u.bottom},scrollBarSize:c});f=e.hasScrollY,p=e.hasScrollX}const m={viewportOuterSize:d,viewportInnerSize:{width:d.width-(f?c:0),height:d.height-(p?c:0)},hasScrollX:p,hasScrollY:f,scrollBarSize:c},g=a.current;a.current=m,m.viewportInnerSize.width===(null==g?void 0:g.viewportInnerSize.width)&&m.viewportInnerSize.height===(null==g?void 0:g.viewportInnerSize.height)||e.current.publishEvent("viewportInnerSizeChange",m.viewportInnerSize)}),[e,t.scrollbarSize,t.autoHeight,s,i.currentPageTotalHeight]),u=U.useCallback((()=>{l(),e.current.publishEvent("debouncedResize",o.current)}),[e,l]),c=U.useCallback((()=>a.current),[]),d=U.useCallback((()=>{const n=e.current.getRootDimensions();if(!n)return 0;const r=SX(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const t=e.current.unstable_getRenderContext(),n=t.lastRowIndex-t.firstRowIndex;return Math.min(n-1,r.rows.length)}const o=Math.floor(n.viewportInnerSize.height/LG(e));return Math.min(o,r.rows.length)}),[e,t.pagination,t.paginationMode,t.getRowHeight]);VX(e,{resize:u,getRootDimensions:c,unstable_getViewportPageSize:d,unstable_updateGridDimensionsRef:l});const p=U.useMemo((()=>Ch(u,60)),[u]),f=U.useRef(!0),m=U.useCallback((e=>{o.current=e;const a=/jsdom/.test(window.navigator.userAgent);if(0!==e.height||r.current||t.autoHeight||a||(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")),r.current=!0),0!==e.width||r.current||a||(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")),r.current=!0),f.current)return u(),void(f.current=!1);p()}),[t.autoHeight,p,n,u]);ch((()=>l()),[l]),LX(e,"sortedRowsSet",l),LX(e,"pageChange",l),LX(e,"pageSizeChange",l),LX(e,"columnsChange",l),NX(e,"resize",m),LX(e,"debouncedResize",t.onResize)}(r,e),function(e,t){LX(e,"columnHeaderClick",t.onColumnHeaderClick),LX(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),LX(e,"columnHeaderOver",t.onColumnHeaderOver),LX(e,"columnHeaderOut",t.onColumnHeaderOut),LX(e,"columnHeaderEnter",t.onColumnHeaderEnter),LX(e,"columnHeaderLeave",t.onColumnHeaderLeave),LX(e,"columnOrderChange",t.onColumnOrderChange),LX(e,"cellClick",t.onCellClick),LX(e,"cellDoubleClick",t.onCellDoubleClick),LX(e,"cellKeyDown",t.onCellKeyDown),LX(e,"cellFocusOut",t.onCellFocusOut),LX(e,"preferencePanelClose",t.onPreferencePanelClose),LX(e,"preferencePanelOpen",t.onPreferencePanelOpen),LX(e,"menuOpen",t.onMenuOpen),LX(e,"menuClose",t.onMenuClose),LX(e,"rowDoubleClick",t.onRowDoubleClick),LX(e,"rowClick",t.onRowClick),LX(e,"componentError",t.onError),LX(e,"stateChange",t.onStateChange)}(r,e),(e=>{const t=U.useCallback(((t={})=>e.current.unstable_applyPipeProcessors("exportState",{},t)),[e]),n=U.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()})),e.current.forceUpdate()}),[e]);VX(e,{exportState:t,restoreState:n})})(r),r},kQ={apiRef:void 0,disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,disableMultipleSelection:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,disableColumnResize:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid"},RQ={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,density:aW.Standard,disableExtendRowFullWidth:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableMultipleColumnsFiltering:!1,disableMultipleSelection:!1,disableMultipleColumnsSorting:!1,disableSelectionOnClick:!1,disableVirtualization:!1,disableIgnoreModificationsIfProcessingProps:!1,editMode:YG.Cell,filterMode:QG,headerHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:QG,rowHeight:52,rowsPerPageOptions:[25,50,100],rowSpacingType:"margin",showCellRightBorder:!1,showColumnRightBorder:!1,sortingOrder:["asc","desc",null],sortingMode:QG,throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1},TQ=["className"],IQ=Wv("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",position:"relative","@media print":{overflow:"hidden"}}),_Q=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,TQ),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["virtualScroller"]},OV,t)})(o);return ee.jsx(IQ,Id({ref:t,className:KG(a.root,n),ownerState:o},r))})),AQ=["className","style"],OQ=Wv("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),NQ=U.forwardRef((function(e,t){const{className:n,style:r}=e,o=_d(e,AQ),a=AV(),i=Id({},a,{overflowedContent:!a.autoHeight&&"auto"===(null==r?void 0:r.minHeight)}),s=(e=>{const{classes:t,overflowedContent:n}=e;return eb({root:["virtualScrollerContent",n&&"virtualScrollerContent--overflowed"]},OV,t)})(i);return ee.jsx(OQ,Id({ref:t,className:KG(s.root,n),ownerState:i,style:r},o))})),PQ=["className"],LQ=Wv("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),MQ=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,PQ),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["virtualScrollerRenderZone"]},OV,t)})(o);return ee.jsx(LQ,Id({ref:t,className:KG(a.root,n),ownerState:o},r))})),DQ=["style"];function jQ(e,t,n=0,r=t.length){if(t.length<=0)return-1;if(n>=r)return n;const o=n+Math.floor((r-n)/2);return e<=t[o]?jQ(e,t,n,o):jQ(e,t,o+1,r)}const FQ=({firstIndex:e,lastIndex:t,buffer:n,minFirstIndex:r,maxLastIndex:o})=>[TK(e-n,r,o),TK(t+n,r,o)],$Q=e=>{var t,n;const r=IV(),o=AV(),a=zV(r,fG),{ref:i,disableVirtualization:s,onRenderZonePositioning:l,renderZoneMinColumnIndex:u=0,renderZoneMaxColumnIndex:c=a.length,getRowProps:d}=e,p=zV(r,mG),f=zV(r,gG),m=zV(r,LG),g=zV(r,lW),h=zV(r,dW),b=zV(r,SZ),v=zV(r,YZ),y=zV(r,oK),w=xX(r,o),S=U.useRef(null),x=U.useRef(null),E=Lh(i,x),[C,k]=U.useState(null),R=U.useRef(C),T=U.useRef({top:0,left:0}),[I,_]=U.useState({width:null,height:null}),A=U.useRef(f),O=U.useCallback((e=>{var t,n;const o=r.current.unstable_getLastMeasuredRowIndex();let a=o===1/0;null!=(t=w.range)&&t.lastRowIndex&&!a&&(a=o>=w.range.lastRowIndex);const i=TK(o-((null==(n=w.range)?void 0:n.firstRowIndex)||0),0,b.positions.length);return a||b.positions[i]>=e?jQ(e,b.positions):function(e,t,n){let r=1;for(;n{if(s)return{firstRowIndex:0,lastRowIndex:w.rows.length,firstColumnIndex:0,lastColumnIndex:a.length};const{top:e,left:t}=T.current,n=Math.min(O(e),b.positions.length-1),i=o.autoHeight?n+w.rows.length:O(e+I.height);let l=!1,u=0,c=p.length;const[d,f]=FQ({firstIndex:n,lastIndex:i,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});for(let o=d;o{s?S.current.style.transform="translate3d(0px, 0px, 0px)":(x.current.scrollLeft=0,x.current.scrollTop=0)}),[s]),ch((()=>{_({width:x.current.clientWidth,height:x.current.clientHeight})}),[b.currentPageTotalHeight]);const P=U.useCallback((e=>{_({width:e.width,height:e.height})}),[]);NX(r,"resize",P);const L=U.useCallback((e=>{const[t,n]=FQ({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer}),[a]=FQ({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:u,maxLastIndex:c,buffer:o.columnBuffer}),i=pY({firstColumnToRender:a,apiRef:r,firstRowToRender:t,lastRowToRender:n,visibleRows:w.rows}),s=SZ(r.current.state).positions[t],d=mG(r)[i];S.current.style.transform=`translate3d(${d}px, ${s}px, 0px)`,"function"==typeof l&&l({top:s,left:d})}),[r,w.rows,l,u,c,o.columnBuffer,o.rowBuffer]),M=U.useCallback((e=>{if(R.current&&(t=e,n=R.current,t===n||t.firstRowIndex===n.firstRowIndex&&t.lastRowIndex===n.lastRowIndex&&t.firstColumnIndex===n.firstColumnIndex&&t.lastColumnIndex===n.lastColumnIndex))return void L(e);var t,n;k(e),L(e);const[a,i]=FQ({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});r.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:a,lastRowToRender:i}),R.current=e}),[r,k,R,w.rows.length,o.rowBuffer,L]);ch((()=>{if(null==I.width)return;const e=N();M(e);const{top:t,left:n}=T.current,o={top:t,left:n,renderContext:e};r.current.publishEvent("rowsScroll",o)}),[r,N,I.width,M]);const D=e=>{const{scrollTop:t,scrollLeft:n}=e.currentTarget;if(T.current.top=t,T.current.left=n,n<0||t<0||!R.current)return;const a=s?R.current:N(),i=Math.abs(a.firstRowIndex-R.current.firstRowIndex),l=Math.abs(a.lastRowIndex-R.current.lastRowIndex),u=Math.abs(a.firstColumnIndex-R.current.firstColumnIndex),c=Math.abs(a.lastColumnIndex-R.current.lastColumnIndex),d=i>=o.rowThreshold||l>=o.rowThreshold||u>=o.columnThreshold||c>=o.columnThreshold||A.current!==f;r.current.publishEvent("rowsScroll",{top:t,left:n,renderContext:d?a:R.current},e),d&&(fd.flushSync((()=>{M(a)})),A.current=f)},j=e=>{r.current.publishEvent("virtualScrollerWheel",{},e)},F=e=>{r.current.publishEvent("virtualScrollerTouchMove",{},e)},$=I.width&&f>I.width,B=U.useMemo((()=>{const e=Math.max(b.currentPageTotalHeight,1);let t=!1;null!=x&&x.current&&e<=(null==x?void 0:x.current.clientHeight)&&(t=!0);const n={width:$?f:"auto",height:e,minHeight:t?"100%":"auto"};return o.autoHeight&&0===w.rows.length&&(n.height=2*m),n}),[x,f,b.currentPageTotalHeight,w.rows.length,$,o.autoHeight,m]);U.useEffect((()=>{r.current.publishEvent("virtualScrollerContentSizeChange")}),[r,B]),o.autoHeight&&0===w.rows.length&&(B.height=2*m);const z={};$||(z.overflowX="hidden"),o.autoHeight&&(z.overflowY="hidden");const H=U.useCallback((()=>R.current),[]);return r.current.unstable_getRenderContext=H,{renderContext:C,updateRenderZonePosition:L,getRows:(e={renderContext:C})=>{const{renderContext:t,minFirstColumn:n=u,maxLastColumn:i=c,availableSpace:l=I.width,rowIndexOffset:p=0,position:f="center"}=e;if(!t||null==l)return null;const m=s?0:o.rowBuffer,b=s?0:o.columnBuffer,[S,x]=FQ({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:m}),E=[];if(e.rows)e.rows.forEach((e=>{E.push(e),r.current.unstable_calculateColSpan({rowId:e.id,minFirstColumn:n,maxLastColumn:i,columns:a})}));else{if(!w.range)return null;for(let e=S;e{let{style:t={}}=e,n=_d(e,DQ);return Id({ref:E,onScroll:D,onWheel:j,onTouchMove:F,style:Id({},t,z)},n)},getContentProps:({style:e={}}={})=>({style:Id({},e,B)}),getRenderZoneProps:()=>({ref:S})}},BQ=["className","disableVirtualization"],zQ=U.forwardRef((function(e,t){const{className:n,disableVirtualization:r}=e,o=_d(e,BQ),{getRootProps:a,getContentProps:i,getRenderZoneProps:s,getRows:l}=$Q({ref:t,disableVirtualization:r});return ee.jsx(_Q,Id({className:n},a(o),{children:ee.jsx(NQ,Id({},i(),{children:ee.jsx(MQ,Id({},s(),{children:l()}))}))}))}));function UQ(e){var t,n;const{groupId:r,width:o,depth:a,maxDepth:i,fields:s,height:l,colIndex:u,isLastColumn:c,extendRowFullWidth:d}=e,p=AV(),f=IV(),m=zV(f,lZ),{hasScrollX:g,hasScrollY:h}=null!=(t=f.current.getRootDimensions())?t:{hasScrollX:!1,hasScrollY:!1},b=r?m[r]:{},{headerName:v=(null!=r?r:""),description:y="",headerAlign:w}=b;let S;const x=r&&(null==(n=m[r])?void 0:n.renderHeaderGroup),E={groupId:r,headerName:v,description:y,depth:a,maxDepth:i,fields:s,colIndex:u,isLastColumn:c};r&&x&&(S=x(E));const C=c?!(c&&g&&!h)&&!d:p.showColumnRightBorder,k=p.showColumnRightBorder,R=Id({},e,{classes:p.classes,showRightBorder:C,showColumnBorder:k,headerAlign:w,depth:a,isDragging:!1}),T=null!=v?v:r,I=Oh(),_=null===r?`empty-group-cell-${I}`:r,A=(e=>{const{classes:t,headerAlign:n,isDragging:r,showRightBorder:o,showColumnBorder:a,groupId:i}=e;return eb({root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",r&&"columnHeader--moving",o&&"withBorder",a&&"columnHeader--showColumnBorder",null===i?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},OV,t)})(R),O="function"==typeof b.headerClassName?b.headerClassName(E):b.headerClassName;return ee.jsx(Kq,{classes:A,columnMenuOpen:!1,colIndex:u,height:l,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:-1,isDraggable:!1,headerComponent:S,headerClassName:O,description:y,elementId:_,width:o,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:T,"aria-colspan":s.length,"data-fields":`|-${s.join("-|-")}-|`,disableHeaderSeparator:!0})}const HQ=Wv("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})((()=>({display:"flex"})));const VQ=["className"],GQ=Wv("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})((({theme:e})=>({position:"absolute",top:0,left:0,right:0,overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:`1px solid ${"light"===e.palette.mode?xh(wh(e.palette.divider,1),.88):Sh(wh(e.palette.divider,1),.68)}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius}))),WQ=U.forwardRef((function(e,t){const{className:n}=e,r=_d(e,VQ),o=AV(),a=(e=>{const{classes:t}=e;return eb({root:["columnHeaders"]},OV,t)})(o);return ee.jsx(GQ,Id({ref:t,className:KG(n,a.root),ownerState:o},r))})),qQ=["isDragging","className"],KQ=Wv("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${NV.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})((()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${NV.columnHeaderDropZone} .${NV.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${NV["columnHeadersInner--scrollable"]} .${NV.columnHeader}:last-child`]:{borderRight:"none"}}))),YQ=U.forwardRef((function(e,t){var n,r;const{isDragging:o,className:a}=e,i=_d(e,qQ),s=IV(),l=Id({},AV(),{isDragging:o,hasScrollX:null!=(n=null==(r=s.current.getRootDimensions())?void 0:r.hasScrollX)&&n}),u=(e=>{const{isDragging:t,hasScrollX:n,classes:r}=e;return eb({root:["columnHeadersInner",t&&"columnHeaderDropZone",n&&"columnHeadersInner--scrollable"]},OV,r)})(l);return ee.jsx(KQ,Id({ref:t,className:KG(a,u.root),ownerState:l},i))})),XQ=["innerRef","className"],ZQ=U.forwardRef((function(e,t){const{innerRef:n}=e,r=_d(e,XQ),{isDragging:o,getRootProps:a,getInnerProps:i,getColumnHeaders:s,getColumnGroupHeaders:l}=(e=>{const{innerRef:t,minColumnIndex:n=0}=e,[r,o]=U.useState(""),[a,i]=U.useState(""),s=IV(),l=zV(s,fG),u=zV(s,mG),c=zV(s,pW),d=zV(s,dW),p=zV(s,uW),f=zV(s,MG),m=zV(s,DG),g=zV(s,FG),h=zV(s,OG),b=zV(s,sG),v=zV(s,aZ),y=AV(),w=U.useRef(null),S=Lh(t,w),[x,E]=U.useState(null),C=U.useRef(x),k=U.useRef(0),R=xX(s,y);U.useEffect((()=>{s.current.columnHeadersContainerElementRef.current.scrollLeft=0}),[s]);const T=U.useRef(ZM(fY,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every((n=>e[n]===t[n]))})),I=U.useCallback((e=>{const[t,r]=FQ({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:R.rows.length,buffer:y.rowBuffer}),o=T.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:n,columnBuffer:y.columnBuffer,firstRowToRender:t,lastRowToRender:r,apiRef:s,visibleRows:R.rows}),a=o>0?k.current-u[o]:k.current;w.current.style.transform=`translate3d(${-a}px, 0px, 0px)`}),[u,n,y.columnBuffer,s,R.rows,y.rowBuffer]);U.useLayoutEffect((()=>{x&&I(x)}),[x,I]);const _=U.useCallback((({left:e,renderContext:t=null},n)=>{var r,o;if(!w.current)return;if(k.current===e&&(null==(r=C.current)?void 0:r.firstColumnIndex)===(null==t?void 0:t.firstColumnIndex)&&(null==(o=C.current)?void 0:o.lastColumnIndex)===(null==t?void 0:t.lastColumnIndex))return;k.current=e;let a=!1;t===C.current&&C.current?a=!0:(function(e){return!!e.target}(n)?(fd.flushSync((()=>{E(t)})),a=!0):E(t),C.current=t),t&&a&&I(t)}),[I]),A=U.useCallback((e=>i(e.field)),[]),O=U.useCallback((()=>i("")),[]),N=U.useCallback((e=>o(e.field)),[]),P=U.useCallback((()=>o("")),[]);NX(s,"columnResizeStart",A),NX(s,"columnResizeStop",O),NX(s,"columnHeaderDragStart",N),NX(s,"columnHeaderDragEnd",P),NX(s,"rowsScroll",_);const L=e=>{const{renderContext:t=x,minFirstColumn:r=n,maxLastColumn:o=l.length}=e||{};if(!t)return null;const[a,i]=FQ({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:R.rows.length,buffer:y.rowBuffer}),u=T.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:r,columnBuffer:y.columnBuffer,apiRef:s,firstRowToRender:a,lastRowToRender:i,visibleRows:R.rows}),c=Math.min(t.lastColumnIndex+y.columnBuffer,o);return{renderedColumns:l.slice(u,c),firstColumnToRender:u,lastColumnToRender:c,minFirstColumn:r,maxLastColumn:o}},M=(e=[],t)=>e.slice(0,t+1),D={minHeight:g,maxHeight:g,lineHeight:`${f}px`};return{renderContext:x,getColumnHeaders:(e,t={})=>{const n=L(e);if(null==n)return null;const{renderedColumns:o,firstColumnToRender:i}=n,s=[];for(let u=0;u{if(0===m)return null;const t=L(e);if(null==t||0===t.renderedColumns.length)return null;const{renderedColumns:r,firstColumnToRender:o,lastColumnToRender:a,maxLastColumn:i}=t,s=[],u=[];for(let f=0;f=n&&null!=(g=l[s])&&g.groupPath&&IK(M(null==(h=l[s])?void 0:h.groupPath,f),y);){var g,h,b;const n=l[s];var v,w;t+=null!=(b=n.computedWidth)?b:0,0===e.length?e.push({width:null!=(v=n.computedWidth)?v:0,fields:[n.field],groupId:m,groupParents:y,colIndex:s}):(e[0].width+=null!=(w=n.computedWidth)?w:0,e[0].fields.push(n.field),e[0].colIndex=s),s-=1}const k=r.reduce(((e,t,n)=>{var r;const a=e[e.length-1];var i,s,l;return t.groupPath&&t.groupPath.length>f?a&&a.groupId===t.groupPath[f]?[...e.slice(0,e.length-1),Id({},a,{width:a.width+(null!=(s=t.computedWidth)?s:0),fields:[...a.fields,t.field]})]:[...e,{groupId:t.groupPath[f],groupParents:M(t.groupPath,f),width:null!=(i=t.computedWidth)?i:0,fields:[t.field],colIndex:o+n}]:a&&null===a.groupId&&IK(M(t.groupPath,f),a.groupParents)?[...e.slice(0,e.length-1),Id({},a,{width:a.width+(null!=(l=t.computedWidth)?l:0),fields:[...a.fields,t.field]})]:[...e,{groupId:null,groupParents:M(t.groupPath,f),width:null!=(r=t.computedWidth)?r:0,fields:[t.field],colIndex:o+n}]}),e);s=a;const R=k[k.length-1].groupId;for(;null!==R&&s{s.push(ee.jsx(HQ,{style:{height:`${f}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:y,children:e.elements.map((({groupId:e,width:n,fields:r,colIndex:o},a)=>ee.jsx(UQ,{groupId:e,width:n,fields:r,colIndex:o,depth:t,isLastColumn:o===l.length-r.length,extendRowFullWidth:!y.disableExtendRowFullWidth,maxDepth:u.length,height:f},a)))},t))})),s},isDragging:!!r,getRootProps:(e={})=>Id({style:D},e),getInnerProps:()=>({ref:S,role:"rowgroup"})}})({innerRef:n});return ee.jsxs(WQ,Id({ref:t},a(r),{children:[ee.jsx(jX,{scrollDirection:"left"}),ee.jsxs(YQ,Id({isDragging:o},i(),{children:[l(),s()]})),ee.jsx(jX,{scrollDirection:"right"})]}))})),QQ=U.forwardRef((function(e,t){const n=(e=>{if(e.pageSize>100)throw new Error("'props.pageSize' cannot exceed 100 in DataGrid.");const t=hv({props:e,name:"MuiDataGrid"}),n=U.useMemo((()=>Id({},fQ,t.localeText)),[t.localeText]),r=U.useMemo((()=>{const e=t.components;if(!e)return Id({},yQ);const n={};return Object.entries(yQ).forEach((([t,r])=>{n[t]=void 0===e[t]?r:e[t]})),n}),[t.components]);return U.useMemo((()=>Id({},RQ,t,{localeText:n,components:r},kQ)),[t,n,r])})(e),r=CQ(n);return ee.jsx(FX,{apiRef:r,props:n,children:ee.jsx(xq,{className:n.className,style:n.style,sx:n.sx,ref:t,children:ee.jsxs(VG,{children:[ee.jsx(WG,{}),ee.jsx(zG,{ColumnHeadersComponent:ZQ,VirtualScrollerComponent:zQ}),ee.jsx(GG,{})]})})})})),JQ=U.memo(QQ);function eJ(e){const{rows:t,sortModel:n,columns:r,rowHeight:o="auto",getRowId:a=(e=>e.id),rowsPerPage:i=[20,50,100]}=e,s=hd.useDispatch(),l=hd.useSelector((e=>e.application.preferredPageSize)),[u,c]=b$({page:"0"}),[d,p]=U.useState(l||Math.min(...i)),f=U.useCallback((()=>o),[o]);return te.jsx(JQ,{onCellClick:()=>null,onCellDoubleClick:()=>null,onCellFocusOut:()=>null,onRowClick:()=>null,onColumnHeaderClick:()=>null,disableDensitySelector:!0,disableColumnSelector:!0,disableVirtualization:!0,disableSelectionOnClick:!0,sortModel:n,rows:t,getRowId:a,columns:r,rowsPerPageOptions:i,pageSize:d,page:Number(u.get("page")),onPageChange:e=>{c({page:String(e)})},onPageSizeChange:e=>{p(e),s(C$(e))},rowBuffer:0,rowThreshold:0,hideFooterSelectedRowCount:!0,autoHeight:!0,sx:{"& .MuiDataGrid-cell":{alignItems:"flex-start",flexDirection:"column"}},getRowHeight:f})}QQ.propTypes={"aria-label":Hf.string,"aria-labelledby":Hf.string,autoHeight:Hf.bool,autoPageSize:Hf.bool,cellModesModel:Hf.object,checkboxSelection:Hf.bool,classes:Hf.object,columnBuffer:Hf.number,columnGroupingModel:Hf.arrayOf(Hf.object),columns:(Hf.array.isRequired,()=>null),columnThreshold:Hf.number,columnTypes:Hf.object,columnVisibilityModel:Hf.object,components:Hf.object,componentsProps:Hf.object,density:Hf.oneOf(["comfortable","compact","standard"]),disableColumnFilter:Hf.bool,disableColumnMenu:Hf.bool,disableColumnSelector:Hf.bool,disableDensitySelector:Hf.bool,disableExtendRowFullWidth:Hf.bool,disableIgnoreModificationsIfProcessingProps:Hf.bool,disableSelectionOnClick:Hf.bool,disableVirtualization:Hf.bool,editMode:Hf.oneOf(["cell","row"]),editRowsModel:Hf.object,error:Hf.any,experimentalFeatures:Hf.shape({columnGrouping:Hf.bool,newEditingApi:Hf.bool,preventCommitWhileValidating:Hf.bool,warnIfFocusStateIsNotSynced:Hf.bool}),filterMode:Hf.oneOf(["client","server"]),filterModel:Hf.shape({items:Hf.arrayOf(Hf.shape({columnField:Hf.string.isRequired,id:Hf.oneOfType([Hf.number,Hf.string]),operatorValue:Hf.string,value:Hf.any})).isRequired,linkOperator:Hf.oneOf(["and","or"]),quickFilterLogicOperator:Hf.oneOf(["and","or"]),quickFilterValues:Hf.array}),getCellClassName:Hf.func,getDetailPanelContent:Hf.func,getEstimatedRowHeight:Hf.func,getRowClassName:Hf.func,getRowHeight:Hf.func,getRowId:Hf.func,getRowSpacing:Hf.func,headerHeight:Hf.number,hideFooter:Hf.bool,hideFooterPagination:Hf.bool,hideFooterSelectedRowCount:Hf.bool,initialState:Hf.object,isCellEditable:Hf.func,isRowSelectable:Hf.func,keepNonExistentRowsSelected:Hf.bool,loading:Hf.bool,localeText:Hf.object,logger:Hf.shape({debug:Hf.func.isRequired,error:Hf.func.isRequired,info:Hf.func.isRequired,warn:Hf.func.isRequired}),logLevel:Hf.oneOf(["debug","error","info","warn",!1]),nonce:Hf.string,onCellClick:Hf.func,onCellDoubleClick:Hf.func,onCellEditCommit:Hf.func,onCellEditStart:Hf.func,onCellEditStop:Hf.func,onCellFocusOut:Hf.func,onCellKeyDown:Hf.func,onCellModesModelChange:Hf.func,onColumnHeaderClick:Hf.func,onColumnHeaderDoubleClick:Hf.func,onColumnHeaderEnter:Hf.func,onColumnHeaderLeave:Hf.func,onColumnHeaderOut:Hf.func,onColumnHeaderOver:Hf.func,onColumnOrderChange:Hf.func,onColumnVisibilityChange:Hf.func,onColumnVisibilityModelChange:Hf.func,onEditCellPropsChange:Hf.func,onEditRowsModelChange:Hf.func,onError:Hf.func,onFilterModelChange:Hf.func,onMenuClose:Hf.func,onMenuOpen:Hf.func,onPageChange:Hf.func,onPageSizeChange:Hf.func,onPreferencePanelClose:Hf.func,onPreferencePanelOpen:Hf.func,onProcessRowUpdateError:Hf.func,onResize:Hf.func,onRowClick:Hf.func,onRowDoubleClick:Hf.func,onRowEditCommit:Hf.func,onRowEditStart:Hf.func,onRowEditStop:Hf.func,onRowModesModelChange:Hf.func,onSelectionModelChange:Hf.func,onSortModelChange:Hf.func,onStateChange:Hf.func,page:Hf.number,pageSize:(Hf.number,()=>null),pagination:e=>!1===e.pagination?new Error(["MUI: `` is not a valid prop.","Infinite scrolling is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join("\n")):null,paginationMode:Hf.oneOf(["client","server"]),processRowUpdate:Hf.func,rowBuffer:Hf.number,rowCount:Hf.number,rowHeight:Hf.number,rowModesModel:Hf.object,rows:Hf.arrayOf(Hf.object).isRequired,rowSpacingType:Hf.oneOf(["border","margin"]),rowsPerPageOptions:Hf.arrayOf(Hf.number),rowThreshold:Hf.number,scrollbarSize:Hf.number,selectionModel:(Hf.oneOfType([Hf.number,Hf.string,Hf.array]),()=>null),showCellRightBorder:Hf.bool,showColumnRightBorder:Hf.bool,sortingMode:Hf.oneOf(["client","server"]),sortingOrder:Hf.arrayOf(Hf.oneOf(["asc","desc"])),sortModel:Hf.arrayOf(Hf.shape({field:Hf.string.isRequired,sort:Hf.oneOf(["asc","desc"])})),sx:Hf.oneOfType([Hf.arrayOf(Hf.oneOfType([Hf.func,Hf.object,Hf.bool])),Hf.func,Hf.object])};var tJ={VITE_ENV:"github",VITE_BACKEND_URL:"http://127.0.0.1:8080",VITE_BUILD_ID:"3206b8d",BASE_URL:"https://yiisoft.github.io/yii-dev-panel/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const nJ=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{"production"!==(tJ?"production":void 0)&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},i=t=e(r,o,a);return a},rJ=e=>e?nJ(e):nJ;var oJ={exports:{}},aJ={},iJ={exports:{}},sJ={},lJ=U;var uJ="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},cJ=lJ.useState,dJ=lJ.useEffect,pJ=lJ.useLayoutEffect,fJ=lJ.useDebugValue;function mJ(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!uJ(e,n)}catch(WL){return!0}}var gJ="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=cJ({inst:{value:n,getSnapshot:t}}),o=r[0].inst,a=r[1];return pJ((function(){o.value=n,o.getSnapshot=t,mJ(o)&&a({inst:o})}),[e,n,t]),dJ((function(){return mJ(o)&&a({inst:o}),e((function(){mJ(o)&&a({inst:o})}))}),[e]),fJ(n),n};sJ.useSyncExternalStore=void 0!==lJ.useSyncExternalStore?lJ.useSyncExternalStore:gJ,iJ.exports=sJ;var hJ=iJ.exports,bJ=U,vJ=hJ; /** * @license React * use-sync-external-store-shim/with-selector.production.min.js @@ -270,7 +270,7 @@ function XD(){return XD=Object.assign?Object.assign.bind():function(e){for(var t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var yJ="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},wJ=vJ.useSyncExternalStore,SJ=bJ.useRef,xJ=bJ.useEffect,EJ=bJ.useMemo,CJ=bJ.useDebugValue;aJ.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var a=SJ(null);if(null===a.current){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=EJ((function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==o&&i.hasValue){var t=i.value;if(o(t,e))return s=t}return s=e}if(t=s,yJ(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,s=n)}var a,s,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var s=wJ(e,a[0],a[1]);return xJ((function(){i.hasValue=!0,i.value=s}),[s]),CJ(s),s},oJ.exports=aJ;const kJ=r(oJ.exports);var RJ={VITE_ENV:"github",VITE_BACKEND_URL:"http://127.0.0.1:8080",VITE_BUILD_ID:"378cdb0",BASE_URL:"/yii-dev-panel/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:TJ}=H,{useSyncExternalStoreWithSelector:IJ}=kJ;let _J=!1;const AJ=e=>e;function OJ(e,t=AJ,n){"production"!==(RJ?"production":void 0)&&n&&!_J&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),_J=!0);const r=IJ(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return TJ(r),r}const NJ=e=>{"production"!==(RJ?"production":void 0)&&"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?rJ(e):e,n=(e,n)=>OJ(t,e,n);return Object.assign(n,t),n};var PJ=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;rnull;zJ.when=()=>!1;const UJ=e=>{return(t?NJ(t):NJ)(((t,n)=>{var r,o,a,i,s,l,u,c,d,p,f,m,g,h,b,v,y,w,S,x,E,C;return{rootName:null!==(r=e.rootName)&&void 0!==r?r:"root",indentWidth:null!==(o=e.indentWidth)&&void 0!==o?o:3,keyRenderer:null!==(a=e.keyRenderer)&&void 0!==a?a:zJ,enableAdd:null!==(i=e.enableAdd)&&void 0!==i&&i,enableDelete:null!==(s=e.enableDelete)&&void 0!==s&&s,enableClipboard:null===(l=e.enableClipboard)||void 0===l||l,editable:null!==(u=e.editable)&&void 0!==u&&u,onChange:null!==(c=e.onChange)&&void 0!==c?c:()=>{},onCopy:null!==(d=e.onCopy)&&void 0!==d?d:void 0,onSelect:null!==(p=e.onSelect)&&void 0!==p?p:void 0,onAdd:null!==(f=e.onAdd)&&void 0!==f?f:void 0,onDelete:null!==(m=e.onDelete)&&void 0!==m?m:void 0,defaultInspectDepth:null!==(g=e.defaultInspectDepth)&&void 0!==g?g:5,defaultInspectControl:null!==(h=e.defaultInspectControl)&&void 0!==h?h:void 0,maxDisplayLength:null!==(b=e.maxDisplayLength)&&void 0!==b?b:30,groupArraysAfterLength:null!==(v=e.groupArraysAfterLength)&&void 0!==v?v:100,collapseStringsAfterLength:!1===e.collapseStringsAfterLength?Number.MAX_VALUE:null!==(y=e.collapseStringsAfterLength)&&void 0!==y?y:50,objectSortKeys:null!==(w=e.objectSortKeys)&&void 0!==w&&w,quotesOnKeys:null===(S=e.quotesOnKeys)||void 0===S||S,displayDataTypes:null===(x=e.displayDataTypes)||void 0===x||x,displaySize:null===(E=e.displaySize)||void 0===E||E,highlightUpdates:null!==(C=e.highlightUpdates)&&void 0!==C&&C,inspectCache:{},hoverPath:null,colorspace:$J,value:e.value,prevValue:void 0,getInspectCache:(e,t)=>{const r=void 0!==t?e.join(".")+"[".concat(t,"]nt"):e.join(".");return n().inspectCache[r]},setInspectCache:(e,n,r)=>{const o=void 0!==r?e.join(".")+"[".concat(r,"]nt"):e.join(".");t((e=>({inspectCache:{...e.inspectCache,[o]:"function"==typeof n?n(e.inspectCache[o]):n}})))},setHover:(e,n)=>{t({hoverPath:e?{path:e,nestedIndex:n}:null})}}}));var t},HJ=U.createContext(void 0);HJ.Provider;const VJ=(e,t)=>OJ(U.useContext(HJ),e,t),GJ=()=>VJ((e=>e.colorspace.base07)),WJ=Object.prototype.constructor.toString();const qJ=(e,t,n)=>{if(null===e||null===n)return!1;if("object"!=typeof e)return!1;if("object"!=typeof n)return!1;if(Object.is(e,n)&&0!==t.length)return"";const r=[],o=[...t];let a=e;for(;a!==n||0!==o.length;){if("object"!=typeof a||null===a)return!1;if(Object.is(a,n))return r.reduce(((e,t,n)=>"number"==typeof t?e+"[".concat(t,"]"):e+"".concat(0===n?"":".").concat(t)),"");const e=o.shift();r.push(e),a=a[e]}return!1};function KJ(e){return null===e?0:Array.isArray(e)?e.length:e instanceof Map||e instanceof Set?e.size:e instanceof Date?1:"object"==typeof e?Object.keys(e).length:"string"==typeof e?e.length:1}function YJ(e,t){const n=[];let r=0;for(;r0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=U.useState(!1),r=U.useRef(null),o=U.useCallback((t=>{const o=r.current;o&&window.clearTimeout(o),r.current=window.setTimeout((()=>n(!1)),e),n(t)}),[e]),a=VJ((e=>e.onCopy)),i=U.useCallback((async(e,t)=>{if("function"==typeof a)try{await a(e,t,XJ),o(!0)}catch(n){console.error("error when copy ".concat(0===e.length?"src":"src[".concat(e.join(".")),"]"),n)}else try{const e=function(e,t){const n=[];return JSON.stringify(e,(function(e,t){if("bigint"==typeof t)return t.toString();if(t instanceof Map){if("toJSON"in t&&"function"==typeof t.toJSON)return t.toJSON();if(0===t.size)return{};if(n.includes(t))return"[Circular]";n.push(t);const e=Array.from(t.entries());return e.every((e=>{let[t]=e;return"string"==typeof t||"number"==typeof t}))?Object.fromEntries(e):{}}if(t instanceof Set)return"toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():n.includes(t)?"[Circular]":(n.push(t),Array.from(t.values()));if("object"==typeof t&&null!==t&&Object.keys(t).length){const r=n.length;if(r){for(let o=r-1;o>=0&&n[o][e]!==t;--o)n.pop();if(n.includes(t))return"[Circular]"}n.push(t)}return t}),t)}("function"==typeof t?t.toString():t," ");await XJ(e),o(!0)}catch(n){console.error("error when copy ".concat(0===e.length?"src":"src[".concat(e.join(".")),"]"),n)}}),[o,a]);return{copy:i,reset:U.useCallback((()=>{n(!1),r.current&&clearTimeout(r.current)}),[]),copied:t}}function QJ(e,t){const n=VJ((e=>e.value));return U.useMemo((()=>qJ(n,e,t)),[e,t,n])}const JJ=e=>ee.jsx(ik,{component:"div",...e,sx:{display:"inline-block",...e.sx}}),e0=e=>{let{dataType:t,enable:n=!0}=e;return n?ee.jsx(JJ,{className:"data-type-label",sx:{mx:.5,fontSize:"0.7rem",opacity:.8,userSelect:"none"},children:t}):null};function t0(e){let{is:t,serialize:n,deserialize:r,type:o,colorKey:a,displayTypeLabel:i=!0,Renderer:s}=e;const l=U.memo(s),u=e=>{const t=VJ((e=>e.displayDataTypes)),n=VJ((e=>e.colorspace[a])),r=VJ((e=>e.onSelect));return ee.jsxs(JJ,{onClick:()=>null==r?void 0:r(e.path,e.value),sx:{color:n},children:[i&&t&&ee.jsx(e0,{dataType:o}),ee.jsx(JJ,{className:"".concat(o,"-value"),children:ee.jsx(l,{path:e.path,inspect:e.inspect,setInspect:e.setInspect,value:e.value,prevValue:e.prevValue})})]})};if(u.displayName="easy-".concat(o,"-type"),!n||!r)return{is:t,Component:u};const c=e=>{let{value:t,setValue:n,abortEditing:r,commitEditing:o}=e;const i=VJ((e=>e.colorspace[a])),s=U.useCallback((e=>{"Enter"===e.key&&(e.preventDefault(),o(t)),"Escape"===e.key&&(e.preventDefault(),r())}),[r,o,t]),l=U.useCallback((e=>{n(e.target.value)}),[n]);return ee.jsx(iC,{autoFocus:!0,value:t,onChange:l,onKeyDown:s,size:"small",multiline:!0,sx:{color:i,padding:.5,borderStyle:"solid",borderColor:"black",borderWidth:1,fontSize:"0.8rem",fontFamily:"monospace",display:"inline-flex"}})};return c.displayName="easy-".concat(o,"-type-editor"),{is:t,serialize:n,deserialize:r,Component:u,Editor:c}}const n0=t0({is:e=>"boolean"==typeof e,type:"bool",colorKey:"base0E",serialize:e=>e.toString(),deserialize:e=>{if("true"===e)return!0;if("false"===e)return!1;throw new Error("Invalid boolean value")},Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:t?"true":"false"})}}),r0={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},o0=t0({is:e=>e instanceof Date,type:"date",colorKey:"base0D",Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:t.toLocaleTimeString("en-us",r0)})}}),a0=e=>{const t=e.toString();let n=!0;const r=t.indexOf(")"),o=t.indexOf("=>");return-1!==o&&o>r&&(n=!1),n?t.substring(t.indexOf("{",r)+1,t.lastIndexOf("}")):t.substring(t.indexOf("=>")+2)},i0=e=>{const t=e.toString();return-1!==t.indexOf("function")?t.substring(8,t.indexOf("{")).trim():t.substring(0,t.indexOf("=>")+2).trim()},s0={is:e=>"function"==typeof e,Component:e=>{const t=VJ((e=>e.colorspace.base05));return ee.jsx(jS,{children:ee.jsx(ik,{className:"data-function",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?2:0,color:t},children:e.inspect?a0(e.value):ee.jsx(ik,{component:"span",className:"data-function-body",onClick:()=>e.setInspect(!0),sx:{"&:hover":{cursor:"pointer"},padding:.5},children:"…"})})})},PreComponent:e=>ee.jsxs(jS,{children:[ee.jsx(e0,{dataType:"function"}),ee.jsxs(ik,{component:"span",className:"data-function-start",sx:{letterSpacing:.5},children:[i0(e.value)," ","{"]})]}),PostComponent:()=>ee.jsx(jS,{children:ee.jsx(ik,{component:"span",className:"data-function-end",children:"}"})})},l0=t0({is:e=>null===e,type:"null",colorKey:"base08",displayTypeLabel:!1,Renderer:()=>{const e=VJ((e=>e.colorspace.base02));return ee.jsx(ik,{sx:{fontSize:"0.8rem",backgroundColor:e,fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NULL"})}}),u0=e=>e%1==0,c0=t0({is:e=>"number"==typeof e&&isNaN(e),type:"NaN",colorKey:"base08",displayTypeLabel:!1,serialize:()=>"NaN",deserialize:e=>parseFloat(e),Renderer:()=>{const e=VJ((e=>e.colorspace.base02));return ee.jsx(ik,{sx:{backgroundColor:e,fontSize:"0.8rem",fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NaN"})}}),d0=t0({is:e=>"number"==typeof e&&!u0(e)&&!isNaN(e),type:"float",colorKey:"base0B",serialize:e=>e.toString(),deserialize:e=>parseFloat(e),Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:t})}}),p0=t0({is:e=>"number"==typeof e&&u0(e),type:"int",colorKey:"base0F",serialize:e=>e.toString(),deserialize:e=>parseFloat(e),Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:t})}}),f0=t0({is:e=>"bigint"==typeof e,type:"bigint",colorKey:"base0F",serialize:e=>e.toString(),deserialize:e=>BigInt(e.replace(/\D/g,"")),Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:"".concat(t,"n")})}}),m0=e=>{let{d:t,...n}=e;return ee.jsx(Jv,{...n,children:ee.jsx("path",{d:t})})},g0=e=>ee.jsx(m0,{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z",...e}),h0=e=>ee.jsx(m0,{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",...e}),b0=e=>ee.jsx(m0,{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",...e}),v0=e=>ee.jsx(m0,{d:"M 12 2 C 10.615 1.998 9.214625 2.2867656 7.890625 2.8847656 L 8.9003906 4.6328125 C 9.9043906 4.2098125 10.957 3.998 12 4 C 15.080783 4 17.738521 5.7633175 19.074219 8.3222656 L 17.125 9 L 21.25 11 L 22.875 7 L 20.998047 7.6523438 C 19.377701 4.3110398 15.95585 2 12 2 z M 6.5097656 4.4882812 L 2.2324219 5.0820312 L 3.734375 6.3808594 C 1.6515335 9.4550558 1.3615962 13.574578 3.3398438 17 C 4.0308437 18.201 4.9801562 19.268234 6.1601562 20.115234 L 7.1699219 18.367188 C 6.3019219 17.710187 5.5922656 16.904 5.0722656 16 C 3.5320014 13.332354 3.729203 10.148679 5.2773438 7.7128906 L 6.8398438 9.0625 L 6.5097656 4.4882812 z M 19.929688 13 C 19.794687 14.08 19.450734 15.098 18.927734 16 C 17.386985 18.668487 14.531361 20.090637 11.646484 19.966797 L 12.035156 17.9375 L 8.2402344 20.511719 L 10.892578 23.917969 L 11.265625 21.966797 C 14.968963 22.233766 18.681899 20.426323 20.660156 17 C 21.355156 15.801 21.805219 14.445 21.949219 13 L 19.929688 13 z",...e}),y0=e=>ee.jsx(m0,{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",...e}),w0=e=>ee.jsx(m0,{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",...e}),S0=e=>ee.jsx(m0,{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",...e}),x0=e=>ee.jsx(m0,{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z",...e}),E0=e=>ee.jsx(m0,{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z",...e});function C0(e){const t=KJ(e);let n="";return(e instanceof Map||e instanceof Set)&&(n=e[Symbol.toStringTag]),Object.prototype.hasOwnProperty.call(e,Symbol.toStringTag)&&(n=e[Symbol.toStringTag]),"".concat(t," Items").concat(n?" (".concat(n,")"):"")}const k0={is:e=>"object"==typeof e,Component:e=>{const t=GJ(),n=VJ((e=>e.colorspace.base02)),r=VJ((e=>e.groupArraysAfterLength)),o=QJ(e.path,e.value),[a,i]=U.useState(VJ((e=>e.maxDisplayLength))),s=VJ((e=>e.objectSortKeys)),l=U.useMemo((()=>{if(!e.inspect)return null;const n=e.value,o=function(e){return"function"==typeof(null==e?void 0:e[Symbol.iterator])}(n);if(o&&!Array.isArray(n)){const t=[];if(n instanceof Map)n.forEach(((n,r)=>{const o=r.toString(),a=[...e.path,o];t.push(ee.jsx(L0,{path:a,value:n,prevValue:e.prevValue instanceof Map?e.prevValue.get(r):void 0,editable:!1},o))}));else{const r=n[Symbol.iterator]();let o=r.next(),a=0;for(;!o.done;)t.push(ee.jsx(L0,{path:[...e.path,"iterator:".concat(a)],value:o.value,nestedIndex:a,editable:!1},a)),a++,o=r.next()}return t}if(Array.isArray(n)){if(n.length<=r){const o=n.slice(0,a).map(((t,n)=>{const o=e.nestedIndex?e.nestedIndex*r+n:n,a=[...e.path,o];return ee.jsx(L0,{path:a,value:t,prevValue:Array.isArray(e.prevValue)?e.prevValue[o]:void 0},o)}));if(n.length>a){const e=n.length-a;o.push(ee.jsxs(JJ,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:()=>i((e=>2*e)),children:["hidden ",e," items…"]},"last"))}return o}const o=YJ(n,r),s=Array.isArray(e.prevValue)?YJ(e.prevValue,r):void 0;return o.map(((t,n)=>ee.jsx(L0,{path:e.path,value:t,nestedIndex:n,prevValue:null==s?void 0:s[n]},n)))}let l=Object.entries(n);s&&(l=!0===s?l.sort(((e,t)=>{let[n]=e,[r]=t;return n.localeCompare(r)})):l.sort(((e,t)=>{let[n]=e,[r]=t;return s(n,r)})));const u=l.slice(0,a).map((t=>{let[n,r]=t;var o;const a=[...e.path,n];return ee.jsx(L0,{path:a,value:r,prevValue:null===(o=e.prevValue)||void 0===o?void 0:o[n]},n)}));if(l.length>a){const e=l.length-a;u.push(ee.jsxs(JJ,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:()=>i((e=>2*e)),children:["hidden ",e," items…"]},"last"))}return u}),[e.inspect,e.value,e.prevValue,e.path,e.nestedIndex,r,a,t,s]),u=e.inspect?.6:0,c=VJ((e=>e.indentWidth)),d=e.inspect?c-u:c;return U.useMemo((()=>0===KJ(e.value)),[e.value])?null:ee.jsx(ik,{className:"data-object",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?d-.6:0,marginLeft:u,color:t,borderLeft:e.inspect?"1px solid ".concat(n):"none"},children:e.inspect?l:!o&&ee.jsx(ik,{component:"span",className:"data-object-body",onClick:()=>e.setInspect(!0),sx:{"&:hover":{cursor:"pointer"},padding:.5,userSelect:"none"},children:"…"})})},PreComponent:e=>{const t=VJ((e=>e.colorspace.base04)),n=GJ(),r=U.useMemo((()=>Array.isArray(e.value)),[e.value]),o=U.useMemo((()=>0===KJ(e.value)),[e.value]),a=U.useMemo((()=>C0(e.value)),[e.value]),i=VJ((e=>e.displaySize)),s=U.useMemo((()=>"function"==typeof i?i(e.path,e.value):i),[i,e.path,e.value]),l=QJ(e.path,e.value);return ee.jsxs(ik,{component:"span",className:"data-object-start",sx:{letterSpacing:.5},children:[r?"[":"{",s&&e.inspect&&!o&&ee.jsx(ik,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:a}),l&&!e.inspect&&ee.jsxs(ee.Fragment,{children:[ee.jsx(v0,{sx:{fontSize:12,color:n,mx:.5}}),l]})]})},PostComponent:e=>{const t=VJ((e=>e.colorspace.base04)),n=GJ(),r=U.useMemo((()=>Array.isArray(e.value)),[e.value]),o=U.useMemo((()=>0===KJ(e.value)),[e.value]),a=U.useMemo((()=>C0(e.value)),[e.value]),i=VJ((e=>e.displaySize)),s=U.useMemo((()=>"function"==typeof i?i(e.path,e.value):i),[i,e.path,e.value]);return ee.jsxs(ik,{component:"span",className:"data-object-end",sx:{lineHeight:1.5,color:n,letterSpacing:.5,opacity:.8},children:[r?"]":"}",!s||!o&&e.inspect?null:ee.jsx(ik,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:a})]})}},R0=t0({is:e=>"string"==typeof e,type:"string",colorKey:"base09",serialize:e=>e,deserialize:e=>e,Renderer:e=>{const[t,n]=U.useState(!1),r=VJ((e=>e.collapseStringsAfterLength)),o=t?e.value:e.value.slice(0,r),a=e.value.length>r;return ee.jsxs(ik,{component:"span",sx:{overflowWrap:"anywhere",cursor:a?"pointer":"inherit"},onClick:()=>{var e;"Range"!==(null===(e=window.getSelection())||void 0===e?void 0:e.type)&&a&&n((e=>!e))},children:['"',o,a&&!t&&ee.jsx(ik,{component:"span",sx:{padding:.5},children:"…"}),'"']})}}),T0=t0({is:e=>void 0===e,type:"undefined",colorKey:"base05",displayTypeLabel:!1,Renderer:()=>{const e=VJ((e=>e.colorspace.base02));return ee.jsx(ik,{sx:{fontSize:"0.7rem",backgroundColor:e,borderRadius:"3px",padding:"0.5px 2px"},children:"undefined"})}});function I0(e){function t(e,t){var n,r;return Object.is(e.value,t.value)&&e.inspect&&t.inspect&&(null===(n=e.path)||void 0===n?void 0:n.join("."))===(null===(r=t.path)||void 0===r?void 0:r.join("."))}return e.Component=U.memo(e.Component,t),e.Editor&&(e.Editor=U.memo(e.Editor,(function(e,t){return Object.is(e.value,t.value)}))),e.PreComponent&&(e.PreComponent=U.memo(e.PreComponent,t)),e.PostComponent&&(e.PostComponent=U.memo(e.PostComponent,t)),e}const _0=[I0(n0),I0(o0),I0(l0),I0(T0),I0(R0),I0(s0),I0(c0),I0(p0),I0(d0),I0(f0)],A0=U.createContext(void 0);A0.Provider;const O0=(e,t)=>OJ(U.useContext(A0),e,t);function N0(e,t){const n=O0((e=>e.registry));return U.useMemo((()=>function(e,t,n){let r;for(const o of n)o.is(e,t)&&(r=o);if(void 0===r){if("object"==typeof e)return k0;throw new Error("No type matched for value: ".concat(e))}return r}(e,t,n)),[e,t,n])}const P0=e=>ee.jsx(ik,{component:"span",...e,sx:{cursor:"pointer",paddingLeft:"0.7rem",...e.sx}}),L0=e=>{const{value:t,prevValue:n,path:r,nestedIndex:o}=e,{Component:a,PreComponent:i,PostComponent:s,Editor:l,serialize:u,deserialize:c}=N0(t,r);var d;const p=null!==(d=e.editable)&&void 0!==d?d:void 0,f=VJ((e=>e.editable)),m=U.useMemo((()=>!1!==f&&(!1!==p&&("function"==typeof f?!!f(r,t):f))),[r,p,f,t]),[g,h]=U.useState(""),b=r.length,v=r[b-1],y=VJ((e=>e.hoverPath)),w=U.useMemo((()=>y&&r.every(((e,t)=>e===y.path[t]&&o===y.nestedIndex))),[y,r,o]),S=VJ((e=>e.setHover)),x=VJ((e=>e.value)),[E,C]=function(e,t,n){const r=e.length,o=QJ(e,t),a=VJ((e=>e.getInspectCache)),i=VJ((e=>e.setInspectCache)),s=VJ((e=>e.defaultInspectDepth)),l=VJ((e=>e.defaultInspectControl));U.useEffect((()=>{if(void 0!==a(e,n))return;if(void 0!==n)return void i(e,!1,n);const u=!o&&("function"==typeof l?l(e,t):r{const i=a(e,n);return void 0!==i?i:void 0===n&&!o&&("function"==typeof l?l(e,t):r{c((r=>{const o="boolean"==typeof t?t:t(r);return i(e,o,n),o}))}),[n,e,i])]}(r,t,o),[k,R]=U.useState(!1),T=VJ((e=>e.onChange)),I=GJ(),_=VJ((e=>e.colorspace.base0C)),A=VJ((e=>e.colorspace.base0A)),O=VJ((e=>e.quotesOnKeys)),N=VJ((e=>e.rootName)),P=x===t,L=Number.isInteger(Number(v)),M=VJ((e=>e.enableAdd)),D=VJ((e=>e.onAdd)),j=U.useMemo((()=>!(!D||void 0!==o)&&(!1!==M&&(!1!==p&&("function"==typeof M?!!M(r,t):!(!Array.isArray(t)&&!function(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===WJ}(t)))))),[D,o,r,M,p,t]),F=VJ((e=>e.enableDelete)),$=VJ((e=>e.onDelete)),B=U.useMemo((()=>!(!$||void 0!==o)&&(!P&&(!1!==F&&(!1!==p&&("function"==typeof F?!!F(r,t):F))))),[$,o,P,r,F,p,t]),z=VJ((e=>e.enableClipboard)),{copy:H,copied:V}=ZJ(),G=VJ((e=>e.highlightUpdates)),W=U.useMemo((()=>!(!G||void 0===n)&&(typeof t!=typeof n||("number"==typeof t?(!isNaN(t)||!isNaN(n))&&t!==n:Array.isArray(t)!==Array.isArray(n)||"object"!=typeof t&&"function"!=typeof t&&t!==n))),[G,n,t]),q=U.useRef();U.useEffect((()=>{q.current&&W&&"animate"in q.current&&q.current.animate([{backgroundColor:A},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})}),[A,W,n,t]);const K=U.useCallback((e=>{e.preventDefault(),u&&h(u(t)),R(!0)}),[u,t]),Y=U.useCallback((()=>{R(!1),h("")}),[R,h]),X=U.useCallback((e=>{if(R(!1),c)try{T(r,t,c(e))}catch(lJ){}}),[R,c,T,r,t]),Z=U.useMemo((()=>k?ee.jsxs(ee.Fragment,{children:[ee.jsx(P0,{children:ee.jsx(y0,{sx:{fontSize:".8rem"},onClick:Y})}),ee.jsx(P0,{children:ee.jsx(h0,{sx:{fontSize:".8rem"},onClick:()=>X(g)})})]}):ee.jsxs(ee.Fragment,{children:[z&&ee.jsx(P0,{onClick:e=>{e.preventDefault();try{H(r,t,XJ)}catch(lJ){console.error(lJ)}},children:V?ee.jsx(h0,{sx:{fontSize:".8rem"}}):ee.jsx(w0,{sx:{fontSize:".8rem"}})}),l&&m&&u&&c&&ee.jsx(P0,{onClick:K,children:ee.jsx(S0,{sx:{fontSize:".8rem"}})}),j&&ee.jsx(P0,{onClick:e=>{e.preventDefault(),null==D||D(r)},children:ee.jsx(g0,{sx:{fontSize:".8rem"}})}),B&&ee.jsx(P0,{onClick:e=>{e.preventDefault(),null==$||$(r,t)},children:ee.jsx(E0,{sx:{fontSize:".9rem"}})})]})),[l,u,c,V,H,m,k,z,j,B,g,r,t,D,$,K,Y,X]),Q=U.useMemo((()=>0===KJ(t)),[t]),J=!Q&&!(!i||!s),te=VJ((e=>e.keyRenderer)),ne=U.useMemo((()=>({path:r,inspect:E,setInspect:C,value:t,prevValue:n,nestedIndex:o})),[E,r,C,t,n,o]);return ee.jsxs(ik,{className:"data-key-pair","data-testid":"data-key-pair"+r.join("."),sx:{userSelect:"text"},onMouseEnter:U.useCallback((()=>S(r,o)),[S,r,o]),children:[ee.jsxs(JJ,{component:"span",className:"data-key",sx:{lineHeight:1.5,color:I,letterSpacing:.5,opacity:.8},onClick:U.useCallback((e=>{e.isDefaultPrevented()||Q||C((e=>!e))}),[Q,C]),children:[J?E?ee.jsx(x0,{sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):ee.jsx(b0,{sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):null,ee.jsx(ik,{ref:q,component:"span",children:P&&0===b?!1!==N?O?ee.jsxs(ee.Fragment,{children:['"',N,'"']}):ee.jsx(ee.Fragment,{children:N}):null:te.when(ne)?ee.jsx(te,{...ne}):void 0===o&&(L?ee.jsx(ik,{component:"span",style:{color:_},children:v}):O?ee.jsxs(ee.Fragment,{children:['"',v,'"']}):ee.jsx(ee.Fragment,{children:v}))}),P?!1!==N&&ee.jsx(JJ,{sx:{mr:.5},children:":"}):void 0===o&&ee.jsx(JJ,{sx:{mr:.5},children:":"}),i&&ee.jsx(i,{...ne}),w&&J&&E&&Z]}),k&&m?l&&ee.jsx(l,{value:g,setValue:h,abortEditing:Y,commitEditing:X}):a?ee.jsx(a,{...ne}):ee.jsx(ik,{component:"span",className:"data-value-fallback",children:"fallback: ".concat(t)}),s&&ee.jsx(s,{...ne}),w&&J&&!E&&Z,w&&!J&&Z,!w&&k&&Z]})},M0="(prefers-color-scheme: dark)";function D0(e,t){const{setState:n}=U.useContext(HJ);U.useEffect((()=>{void 0!==t&&n({[e]:t})}),[e,t,n])}const j0=e=>{const{setState:t}=U.useContext(HJ);U.useEffect((()=>{t((t=>({prevValue:t.value,value:e.value})))}),[e.value,t]),D0("rootName",e.rootName),D0("indentWidth",e.indentWidth),D0("keyRenderer",e.keyRenderer),D0("enableAdd",e.enableAdd),D0("enableDelete",e.enableDelete),D0("enableClipboard",e.enableClipboard),D0("editable",e.editable),D0("onChange",e.onChange),D0("onCopy",e.onCopy),D0("onSelect",e.onSelect),D0("onAdd",e.onAdd),D0("onDelete",e.onDelete),D0("maxDisplayLength",e.maxDisplayLength),D0("groupArraysAfterLength",e.groupArraysAfterLength),D0("displayDataTypes",e.displayDataTypes),D0("displaySize",e.displaySize),D0("highlightUpdates",e.highlightUpdates),U.useEffect((()=>{"light"===e.theme?t({colorspace:$J}):"dark"===e.theme?t({colorspace:BJ}):"object"==typeof e.theme&&t({colorspace:e.theme})}),[t,e.theme]);const n=U.useMemo((()=>"object"==typeof e.theme?"json-viewer-theme-custom":"dark"===e.theme?"json-viewer-theme-dark":"json-viewer-theme-light"),[e.theme]),r=U.useRef(!0),o=O0((e=>e.registerTypes));if(r.current){const t=e.valueTypes?[..._0,...e.valueTypes]:[..._0];o(t),r.current=!1}U.useEffect((()=>{const t=e.valueTypes?[..._0,...e.valueTypes]:[..._0];o(t)}),[e.valueTypes,o]);const a=VJ((e=>e.value)),i=VJ((e=>e.prevValue)),s=U.useMemo((()=>[]),[]),l=VJ((e=>e.setHover)),u=U.useCallback((()=>l(null)),[l]);return ee.jsx(Ly,{elevation:0,className:FJ(n,e.className),style:e.style,sx:{fontFamily:"monospace",userSelect:"none",contentVisibility:"auto",...e.sx},onMouseLeave:u,children:ee.jsx(L0,{value:a,prevValue:i,path:s})})},F0=function(e){const t=function(){const[e,t]=U.useState(!1);return U.useEffect((()=>{const e=e=>t(e.matches);t(window.matchMedia(M0).matches);const n=window.matchMedia(M0);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)}),[]),e}(),n=U.useMemo((()=>{var n;return"auto"===e.theme?t?"dark":"light":null!==(n=e.theme)&&void 0!==n?n:"light"}),[t,e.theme]),r=U.useMemo((()=>{const e="object"==typeof n?n.base00:"dark"===n?BJ.base00:$J.base00;return fv({components:{MuiPaper:{styleOverrides:{root:{backgroundColor:e,color:"object"==typeof n?n.base07:"dark"===n?BJ.base07:$J.base07}}}},palette:{mode:"dark"===n?"dark":"light",background:{default:e}}})}),[n]),o={...e,theme:n},a=U.useMemo((()=>UJ(e)),[]),i=U.useMemo((()=>rJ()((e=>({registry:_0,registerTypes:t=>{e((e=>({registry:"function"==typeof t?t(e.registry):t})))}})))),[]);return ee.jsx(Kv,{theme:r,children:ee.jsx(A0.Provider,{value:i,children:ee.jsx(HJ.Provider,{value:a,children:ee.jsx(j0,{...o})})})})};function $0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return H0[r]||(H0[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),H0[r]}(e.filter((function(e){return"token"!==e}))).reduce((function(e,t){return U0(U0({},e),n[t])}),t)}function G0(e){return e.join(" ")}function W0(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,a=e.useInlineStyles,i=e.key,s=t.properties,l=t.type,u=t.tagName,c=t.value;if("text"===l)return c;if(u){var d,p=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return W0({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,a);if(a){var f=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),m=s.className&&s.className.includes("token")?["token"]:[],g=s.className&&m.concat(s.className.filter((function(e){return!f.includes(e)})));d=U0(U0({},s),{},{className:G0(g)||void 0,style:V0(s.className,Object.assign({},s.style,o),n)})}else d=U0(U0({},s),{},{className:G0(s.className)});var h=p(t.children);return H.createElement(u,Af({key:i},d),h)}}const q0=function(e,t){return-1!==e.listLanguages().indexOf(t)};var K0=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Y0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X0(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return t||u.length>0?function(e,t){return t1({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l})}(e,a,u):function(e,t){if(r&&t&&o){var n=e1(s,t,i);e.unshift(J0(t,n))}return e}(e,a)}for(var g=function(){var e=c[f],t=e.children[0].value;if(t.match(Z0)){var n=t.split("\n");n.forEach((function(t,o){var i=r&&d.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===o){var l=m(c.slice(p+1,f).concat(t1({children:[s],className:e.properties.className})),i);d.push(l)}else if(o===n.length-1){var u=c[f+1]&&c[f+1].children&&c[f+1].children[0],g={type:"text",value:"".concat(t)};if(u){var h=t1({children:[g],className:e.properties.className});c.splice(f+1,0,h)}else{var b=m([g],i,e.properties.className);d.push(b)}}else{var v=m([s],i,e.properties.className);d.push(v)}})),p=f}f++};f4&&n.slice(0,4)===r2&&a2.test(t)&&("-"===t.charAt(4)?r=function(e){var t=e.slice(5).replace(i2,u2);return r2+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(i2.test(t))return e;t=t.replace(s2,l2),"-"!==t.charAt(0)&&(t="-"+t);return r2+t}(t),o=t2);return new o(r,t)},a2=/^data[-\w.:]+$/i,i2=/-[a-z]/g,s2=/[A-Z]/g;function l2(e){return"-"+e.toLowerCase()}function u2(e){return e.charAt(1).toUpperCase()}var c2=function(e,t){var n,r,o,a=e||"",i=t||"div",s={},l=0;for(;l=48&&t<=57};var N2=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57};var P2=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90};var L2,M2=P2,D2=O2,j2=function(e){return M2(e)||D2(e)};var F2=function(e){var t,n="&"+e+";";if((L2=L2||document.createElement("i")).innerHTML=n,t=L2.textContent,59===t.charCodeAt(t.length-1)&&"semi"!==e)return!1;return t!==n&&t};var $2={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},B2={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},z2=O2,U2=N2,H2=j2,V2=F2,G2=function(e,t){var n,r,o={};t||(t={});for(r in Y2)n=t[r],o[r]=null==n?Y2[r]:n;(o.position.indent||o.position.start)&&(o.indent=o.position.indent||[],o.position=o.position.start);return function(e,t){var n,r,o,a,i,s,l,u,c,d,p,f,m,g,h,b,v,y,w,S=t.additional,x=t.nonTerminated,E=t.text,C=t.reference,k=t.warning,R=t.textContext,T=t.referenceContext,I=t.warningContext,_=t.position,A=t.indent||[],O=e.length,N=0,P=-1,L=_.column||1,M=_.line||1,D="",j=[];"string"==typeof S&&(S=S.charCodeAt(0));b=F(),u=k?$:K2,N--,O++;for(;++N65535&&(d+=q2((s-=65536)>>>10|55296),s=56320|1023&s),s=d+q2(s))):g!==l4&&u(h4,y)),s?(B(),b=F(),N=w-1,L+=w-m+1,j.push(s),(v=F()).offset++,C&&C.call(T,s,{start:b,end:v},e.slice(m-1,w)),b=v):(a=e.slice(m-1,w),D+=a,L+=a.length,N=w-1)}else 10===i&&(M++,P++,L=0),i==i?(D+=q2(i),L++):B();return j.join("");function F(){return{line:M,column:L,offset:N+(_.offset||0)}}function $(e,t){var n=F();n.column+=t,n.offset+=t,k.call(I,w4[e],n,e)}function B(){D&&(j.push(D),E&&E.call(R,D,{start:b,end:F()}),D="")}}(e,o)},W2={}.hasOwnProperty,q2=String.fromCharCode,K2=Function.prototype,Y2={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},X2=9,Z2=10,Q2=12,J2=32,e4=38,t4=59,n4=60,r4=61,o4=35,a4=88,i4=120,s4=65533,l4="named",u4="hexadecimal",c4="decimal",d4={};d4[u4]=16,d4[c4]=10;var p4={};p4[l4]=H2,p4[c4]=z2,p4[u4]=U2;var f4=1,m4=2,g4=3,h4=4,b4=5,v4=6,y4=7,w4={};function S4(e){return e>=55296&&e<=57343||e>1114111}function x4(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}w4[f4]="Named character references must be terminated by a semicolon",w4[m4]="Numeric character references must be terminated by a semicolon",w4[g4]="Named character references cannot be empty",w4[h4]="Numeric character references cannot be empty",w4[b4]="Named character references must be known",w4[v4]="Numeric character references cannot be disallowed",w4[y4]="Numeric character references cannot be outside the permissible Unicode range";var E4={exports:{}};!function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);E+=x.value.length,x=x.next){var C=x.value;if(t.length>e.length)return;if(!(C instanceof a)){var k,R=1;if(v){if(!(k=i(S,E,e,b))||k.index>=e.length)break;var T=k.index,I=k.index+k[0].length,_=E;for(_+=x.value.length;T>=_;)_+=(x=x.next).value.length;if(E=_-=x.value.length,x.value instanceof a)continue;for(var A=x;A!==t.tail&&(_d.reach&&(d.reach=L);var M=x.prev;if(N&&(M=u(t,M,N),E+=N.length),c(t,M,R),x=u(t,M,new a(p,h?o.tokenize(O,h):O,y,O)),P&&u(t,x,P),R>1){var D={cause:p+","+m,reach:L};s(e,t,n,x.prev,E,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o"+a.content+""},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,i=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),i&&e.close()}),!1),o):o;var d=o.util.currentScript();function p(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{}); + */var yJ="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},wJ=vJ.useSyncExternalStore,SJ=bJ.useRef,xJ=bJ.useEffect,EJ=bJ.useMemo,CJ=bJ.useDebugValue;aJ.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var a=SJ(null);if(null===a.current){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=EJ((function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==o&&i.hasValue){var t=i.value;if(o(t,e))return s=t}return s=e}if(t=s,yJ(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,s=n)}var a,s,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var s=wJ(e,a[0],a[1]);return xJ((function(){i.hasValue=!0,i.value=s}),[s]),CJ(s),s},oJ.exports=aJ;const kJ=r(oJ.exports);var RJ={VITE_ENV:"github",VITE_BACKEND_URL:"http://127.0.0.1:8080",VITE_BUILD_ID:"3206b8d",BASE_URL:"https://yiisoft.github.io/yii-dev-panel/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:TJ}=H,{useSyncExternalStoreWithSelector:IJ}=kJ;let _J=!1;const AJ=e=>e;function OJ(e,t=AJ,n){"production"!==(RJ?"production":void 0)&&n&&!_J&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),_J=!0);const r=IJ(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return TJ(r),r}const NJ=e=>{"production"!==(RJ?"production":void 0)&&"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?rJ(e):e,n=(e,n)=>OJ(t,e,n);return Object.assign(n,t),n};var PJ=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;rnull;zJ.when=()=>!1;const UJ=e=>{return(t?NJ(t):NJ)(((t,n)=>{var r,o,a,i,s,l,u,c,d,p,f,m,g,h,b,v,y,w,S,x,E,C;return{rootName:null!==(r=e.rootName)&&void 0!==r?r:"root",indentWidth:null!==(o=e.indentWidth)&&void 0!==o?o:3,keyRenderer:null!==(a=e.keyRenderer)&&void 0!==a?a:zJ,enableAdd:null!==(i=e.enableAdd)&&void 0!==i&&i,enableDelete:null!==(s=e.enableDelete)&&void 0!==s&&s,enableClipboard:null===(l=e.enableClipboard)||void 0===l||l,editable:null!==(u=e.editable)&&void 0!==u&&u,onChange:null!==(c=e.onChange)&&void 0!==c?c:()=>{},onCopy:null!==(d=e.onCopy)&&void 0!==d?d:void 0,onSelect:null!==(p=e.onSelect)&&void 0!==p?p:void 0,onAdd:null!==(f=e.onAdd)&&void 0!==f?f:void 0,onDelete:null!==(m=e.onDelete)&&void 0!==m?m:void 0,defaultInspectDepth:null!==(g=e.defaultInspectDepth)&&void 0!==g?g:5,defaultInspectControl:null!==(h=e.defaultInspectControl)&&void 0!==h?h:void 0,maxDisplayLength:null!==(b=e.maxDisplayLength)&&void 0!==b?b:30,groupArraysAfterLength:null!==(v=e.groupArraysAfterLength)&&void 0!==v?v:100,collapseStringsAfterLength:!1===e.collapseStringsAfterLength?Number.MAX_VALUE:null!==(y=e.collapseStringsAfterLength)&&void 0!==y?y:50,objectSortKeys:null!==(w=e.objectSortKeys)&&void 0!==w&&w,quotesOnKeys:null===(S=e.quotesOnKeys)||void 0===S||S,displayDataTypes:null===(x=e.displayDataTypes)||void 0===x||x,displaySize:null===(E=e.displaySize)||void 0===E||E,highlightUpdates:null!==(C=e.highlightUpdates)&&void 0!==C&&C,inspectCache:{},hoverPath:null,colorspace:$J,value:e.value,prevValue:void 0,getInspectCache:(e,t)=>{const r=void 0!==t?e.join(".")+"[".concat(t,"]nt"):e.join(".");return n().inspectCache[r]},setInspectCache:(e,n,r)=>{const o=void 0!==r?e.join(".")+"[".concat(r,"]nt"):e.join(".");t((e=>({inspectCache:{...e.inspectCache,[o]:"function"==typeof n?n(e.inspectCache[o]):n}})))},setHover:(e,n)=>{t({hoverPath:e?{path:e,nestedIndex:n}:null})}}}));var t},HJ=U.createContext(void 0);HJ.Provider;const VJ=(e,t)=>OJ(U.useContext(HJ),e,t),GJ=()=>VJ((e=>e.colorspace.base07)),WJ=Object.prototype.constructor.toString();const qJ=(e,t,n)=>{if(null===e||null===n)return!1;if("object"!=typeof e)return!1;if("object"!=typeof n)return!1;if(Object.is(e,n)&&0!==t.length)return"";const r=[],o=[...t];let a=e;for(;a!==n||0!==o.length;){if("object"!=typeof a||null===a)return!1;if(Object.is(a,n))return r.reduce(((e,t,n)=>"number"==typeof t?e+"[".concat(t,"]"):e+"".concat(0===n?"":".").concat(t)),"");const e=o.shift();r.push(e),a=a[e]}return!1};function KJ(e){return null===e?0:Array.isArray(e)?e.length:e instanceof Map||e instanceof Set?e.size:e instanceof Date?1:"object"==typeof e?Object.keys(e).length:"string"==typeof e?e.length:1}function YJ(e,t){const n=[];let r=0;for(;r0&&void 0!==arguments[0]?arguments[0]:{};const[t,n]=U.useState(!1),r=U.useRef(null),o=U.useCallback((t=>{const o=r.current;o&&window.clearTimeout(o),r.current=window.setTimeout((()=>n(!1)),e),n(t)}),[e]),a=VJ((e=>e.onCopy)),i=U.useCallback((async(e,t)=>{if("function"==typeof a)try{await a(e,t,XJ),o(!0)}catch(n){console.error("error when copy ".concat(0===e.length?"src":"src[".concat(e.join(".")),"]"),n)}else try{const e=function(e,t){const n=[];return JSON.stringify(e,(function(e,t){if("bigint"==typeof t)return t.toString();if(t instanceof Map){if("toJSON"in t&&"function"==typeof t.toJSON)return t.toJSON();if(0===t.size)return{};if(n.includes(t))return"[Circular]";n.push(t);const e=Array.from(t.entries());return e.every((e=>{let[t]=e;return"string"==typeof t||"number"==typeof t}))?Object.fromEntries(e):{}}if(t instanceof Set)return"toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():n.includes(t)?"[Circular]":(n.push(t),Array.from(t.values()));if("object"==typeof t&&null!==t&&Object.keys(t).length){const r=n.length;if(r){for(let o=r-1;o>=0&&n[o][e]!==t;--o)n.pop();if(n.includes(t))return"[Circular]"}n.push(t)}return t}),t)}("function"==typeof t?t.toString():t," ");await XJ(e),o(!0)}catch(n){console.error("error when copy ".concat(0===e.length?"src":"src[".concat(e.join(".")),"]"),n)}}),[o,a]);return{copy:i,reset:U.useCallback((()=>{n(!1),r.current&&clearTimeout(r.current)}),[]),copied:t}}function QJ(e,t){const n=VJ((e=>e.value));return U.useMemo((()=>qJ(n,e,t)),[e,t,n])}const JJ=e=>ee.jsx(ik,{component:"div",...e,sx:{display:"inline-block",...e.sx}}),e0=e=>{let{dataType:t,enable:n=!0}=e;return n?ee.jsx(JJ,{className:"data-type-label",sx:{mx:.5,fontSize:"0.7rem",opacity:.8,userSelect:"none"},children:t}):null};function t0(e){let{is:t,serialize:n,deserialize:r,type:o,colorKey:a,displayTypeLabel:i=!0,Renderer:s}=e;const l=U.memo(s),u=e=>{const t=VJ((e=>e.displayDataTypes)),n=VJ((e=>e.colorspace[a])),r=VJ((e=>e.onSelect));return ee.jsxs(JJ,{onClick:()=>null==r?void 0:r(e.path,e.value),sx:{color:n},children:[i&&t&&ee.jsx(e0,{dataType:o}),ee.jsx(JJ,{className:"".concat(o,"-value"),children:ee.jsx(l,{path:e.path,inspect:e.inspect,setInspect:e.setInspect,value:e.value,prevValue:e.prevValue})})]})};if(u.displayName="easy-".concat(o,"-type"),!n||!r)return{is:t,Component:u};const c=e=>{let{value:t,setValue:n,abortEditing:r,commitEditing:o}=e;const i=VJ((e=>e.colorspace[a])),s=U.useCallback((e=>{"Enter"===e.key&&(e.preventDefault(),o(t)),"Escape"===e.key&&(e.preventDefault(),r())}),[r,o,t]),l=U.useCallback((e=>{n(e.target.value)}),[n]);return ee.jsx(iC,{autoFocus:!0,value:t,onChange:l,onKeyDown:s,size:"small",multiline:!0,sx:{color:i,padding:.5,borderStyle:"solid",borderColor:"black",borderWidth:1,fontSize:"0.8rem",fontFamily:"monospace",display:"inline-flex"}})};return c.displayName="easy-".concat(o,"-type-editor"),{is:t,serialize:n,deserialize:r,Component:u,Editor:c}}const n0=t0({is:e=>"boolean"==typeof e,type:"bool",colorKey:"base0E",serialize:e=>e.toString(),deserialize:e=>{if("true"===e)return!0;if("false"===e)return!1;throw new Error("Invalid boolean value")},Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:t?"true":"false"})}}),r0={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"},o0=t0({is:e=>e instanceof Date,type:"date",colorKey:"base0D",Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:t.toLocaleTimeString("en-us",r0)})}}),a0=e=>{const t=e.toString();let n=!0;const r=t.indexOf(")"),o=t.indexOf("=>");return-1!==o&&o>r&&(n=!1),n?t.substring(t.indexOf("{",r)+1,t.lastIndexOf("}")):t.substring(t.indexOf("=>")+2)},i0=e=>{const t=e.toString();return-1!==t.indexOf("function")?t.substring(8,t.indexOf("{")).trim():t.substring(0,t.indexOf("=>")+2).trim()},s0={is:e=>"function"==typeof e,Component:e=>{const t=VJ((e=>e.colorspace.base05));return ee.jsx(jS,{children:ee.jsx(ik,{className:"data-function",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?2:0,color:t},children:e.inspect?a0(e.value):ee.jsx(ik,{component:"span",className:"data-function-body",onClick:()=>e.setInspect(!0),sx:{"&:hover":{cursor:"pointer"},padding:.5},children:"…"})})})},PreComponent:e=>ee.jsxs(jS,{children:[ee.jsx(e0,{dataType:"function"}),ee.jsxs(ik,{component:"span",className:"data-function-start",sx:{letterSpacing:.5},children:[i0(e.value)," ","{"]})]}),PostComponent:()=>ee.jsx(jS,{children:ee.jsx(ik,{component:"span",className:"data-function-end",children:"}"})})},l0=t0({is:e=>null===e,type:"null",colorKey:"base08",displayTypeLabel:!1,Renderer:()=>{const e=VJ((e=>e.colorspace.base02));return ee.jsx(ik,{sx:{fontSize:"0.8rem",backgroundColor:e,fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NULL"})}}),u0=e=>e%1==0,c0=t0({is:e=>"number"==typeof e&&isNaN(e),type:"NaN",colorKey:"base08",displayTypeLabel:!1,serialize:()=>"NaN",deserialize:e=>parseFloat(e),Renderer:()=>{const e=VJ((e=>e.colorspace.base02));return ee.jsx(ik,{sx:{backgroundColor:e,fontSize:"0.8rem",fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NaN"})}}),d0=t0({is:e=>"number"==typeof e&&!u0(e)&&!isNaN(e),type:"float",colorKey:"base0B",serialize:e=>e.toString(),deserialize:e=>parseFloat(e),Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:t})}}),p0=t0({is:e=>"number"==typeof e&&u0(e),type:"int",colorKey:"base0F",serialize:e=>e.toString(),deserialize:e=>parseFloat(e),Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:t})}}),f0=t0({is:e=>"bigint"==typeof e,type:"bigint",colorKey:"base0F",serialize:e=>e.toString(),deserialize:e=>BigInt(e.replace(/\D/g,"")),Renderer:e=>{let{value:t}=e;return ee.jsx(ee.Fragment,{children:"".concat(t,"n")})}}),m0=e=>{let{d:t,...n}=e;return ee.jsx(Jv,{...n,children:ee.jsx("path",{d:t})})},g0=e=>ee.jsx(m0,{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z",...e}),h0=e=>ee.jsx(m0,{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",...e}),b0=e=>ee.jsx(m0,{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",...e}),v0=e=>ee.jsx(m0,{d:"M 12 2 C 10.615 1.998 9.214625 2.2867656 7.890625 2.8847656 L 8.9003906 4.6328125 C 9.9043906 4.2098125 10.957 3.998 12 4 C 15.080783 4 17.738521 5.7633175 19.074219 8.3222656 L 17.125 9 L 21.25 11 L 22.875 7 L 20.998047 7.6523438 C 19.377701 4.3110398 15.95585 2 12 2 z M 6.5097656 4.4882812 L 2.2324219 5.0820312 L 3.734375 6.3808594 C 1.6515335 9.4550558 1.3615962 13.574578 3.3398438 17 C 4.0308437 18.201 4.9801562 19.268234 6.1601562 20.115234 L 7.1699219 18.367188 C 6.3019219 17.710187 5.5922656 16.904 5.0722656 16 C 3.5320014 13.332354 3.729203 10.148679 5.2773438 7.7128906 L 6.8398438 9.0625 L 6.5097656 4.4882812 z M 19.929688 13 C 19.794687 14.08 19.450734 15.098 18.927734 16 C 17.386985 18.668487 14.531361 20.090637 11.646484 19.966797 L 12.035156 17.9375 L 8.2402344 20.511719 L 10.892578 23.917969 L 11.265625 21.966797 C 14.968963 22.233766 18.681899 20.426323 20.660156 17 C 21.355156 15.801 21.805219 14.445 21.949219 13 L 19.929688 13 z",...e}),y0=e=>ee.jsx(m0,{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",...e}),w0=e=>ee.jsx(m0,{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",...e}),S0=e=>ee.jsx(m0,{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",...e}),x0=e=>ee.jsx(m0,{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z",...e}),E0=e=>ee.jsx(m0,{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z",...e});function C0(e){const t=KJ(e);let n="";return(e instanceof Map||e instanceof Set)&&(n=e[Symbol.toStringTag]),Object.prototype.hasOwnProperty.call(e,Symbol.toStringTag)&&(n=e[Symbol.toStringTag]),"".concat(t," Items").concat(n?" (".concat(n,")"):"")}const k0={is:e=>"object"==typeof e,Component:e=>{const t=GJ(),n=VJ((e=>e.colorspace.base02)),r=VJ((e=>e.groupArraysAfterLength)),o=QJ(e.path,e.value),[a,i]=U.useState(VJ((e=>e.maxDisplayLength))),s=VJ((e=>e.objectSortKeys)),l=U.useMemo((()=>{if(!e.inspect)return null;const n=e.value,o=function(e){return"function"==typeof(null==e?void 0:e[Symbol.iterator])}(n);if(o&&!Array.isArray(n)){const t=[];if(n instanceof Map)n.forEach(((n,r)=>{const o=r.toString(),a=[...e.path,o];t.push(ee.jsx(L0,{path:a,value:n,prevValue:e.prevValue instanceof Map?e.prevValue.get(r):void 0,editable:!1},o))}));else{const r=n[Symbol.iterator]();let o=r.next(),a=0;for(;!o.done;)t.push(ee.jsx(L0,{path:[...e.path,"iterator:".concat(a)],value:o.value,nestedIndex:a,editable:!1},a)),a++,o=r.next()}return t}if(Array.isArray(n)){if(n.length<=r){const o=n.slice(0,a).map(((t,n)=>{const o=e.nestedIndex?e.nestedIndex*r+n:n,a=[...e.path,o];return ee.jsx(L0,{path:a,value:t,prevValue:Array.isArray(e.prevValue)?e.prevValue[o]:void 0},o)}));if(n.length>a){const e=n.length-a;o.push(ee.jsxs(JJ,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:()=>i((e=>2*e)),children:["hidden ",e," items…"]},"last"))}return o}const o=YJ(n,r),s=Array.isArray(e.prevValue)?YJ(e.prevValue,r):void 0;return o.map(((t,n)=>ee.jsx(L0,{path:e.path,value:t,nestedIndex:n,prevValue:null==s?void 0:s[n]},n)))}let l=Object.entries(n);s&&(l=!0===s?l.sort(((e,t)=>{let[n]=e,[r]=t;return n.localeCompare(r)})):l.sort(((e,t)=>{let[n]=e,[r]=t;return s(n,r)})));const u=l.slice(0,a).map((t=>{let[n,r]=t;var o;const a=[...e.path,n];return ee.jsx(L0,{path:a,value:r,prevValue:null===(o=e.prevValue)||void 0===o?void 0:o[n]},n)}));if(l.length>a){const e=l.length-a;u.push(ee.jsxs(JJ,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:()=>i((e=>2*e)),children:["hidden ",e," items…"]},"last"))}return u}),[e.inspect,e.value,e.prevValue,e.path,e.nestedIndex,r,a,t,s]),u=e.inspect?.6:0,c=VJ((e=>e.indentWidth)),d=e.inspect?c-u:c;return U.useMemo((()=>0===KJ(e.value)),[e.value])?null:ee.jsx(ik,{className:"data-object",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?d-.6:0,marginLeft:u,color:t,borderLeft:e.inspect?"1px solid ".concat(n):"none"},children:e.inspect?l:!o&&ee.jsx(ik,{component:"span",className:"data-object-body",onClick:()=>e.setInspect(!0),sx:{"&:hover":{cursor:"pointer"},padding:.5,userSelect:"none"},children:"…"})})},PreComponent:e=>{const t=VJ((e=>e.colorspace.base04)),n=GJ(),r=U.useMemo((()=>Array.isArray(e.value)),[e.value]),o=U.useMemo((()=>0===KJ(e.value)),[e.value]),a=U.useMemo((()=>C0(e.value)),[e.value]),i=VJ((e=>e.displaySize)),s=U.useMemo((()=>"function"==typeof i?i(e.path,e.value):i),[i,e.path,e.value]),l=QJ(e.path,e.value);return ee.jsxs(ik,{component:"span",className:"data-object-start",sx:{letterSpacing:.5},children:[r?"[":"{",s&&e.inspect&&!o&&ee.jsx(ik,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:a}),l&&!e.inspect&&ee.jsxs(ee.Fragment,{children:[ee.jsx(v0,{sx:{fontSize:12,color:n,mx:.5}}),l]})]})},PostComponent:e=>{const t=VJ((e=>e.colorspace.base04)),n=GJ(),r=U.useMemo((()=>Array.isArray(e.value)),[e.value]),o=U.useMemo((()=>0===KJ(e.value)),[e.value]),a=U.useMemo((()=>C0(e.value)),[e.value]),i=VJ((e=>e.displaySize)),s=U.useMemo((()=>"function"==typeof i?i(e.path,e.value):i),[i,e.path,e.value]);return ee.jsxs(ik,{component:"span",className:"data-object-end",sx:{lineHeight:1.5,color:n,letterSpacing:.5,opacity:.8},children:[r?"]":"}",!s||!o&&e.inspect?null:ee.jsx(ik,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:a})]})}},R0=t0({is:e=>"string"==typeof e,type:"string",colorKey:"base09",serialize:e=>e,deserialize:e=>e,Renderer:e=>{const[t,n]=U.useState(!1),r=VJ((e=>e.collapseStringsAfterLength)),o=t?e.value:e.value.slice(0,r),a=e.value.length>r;return ee.jsxs(ik,{component:"span",sx:{overflowWrap:"anywhere",cursor:a?"pointer":"inherit"},onClick:()=>{var e;"Range"!==(null===(e=window.getSelection())||void 0===e?void 0:e.type)&&a&&n((e=>!e))},children:['"',o,a&&!t&&ee.jsx(ik,{component:"span",sx:{padding:.5},children:"…"}),'"']})}}),T0=t0({is:e=>void 0===e,type:"undefined",colorKey:"base05",displayTypeLabel:!1,Renderer:()=>{const e=VJ((e=>e.colorspace.base02));return ee.jsx(ik,{sx:{fontSize:"0.7rem",backgroundColor:e,borderRadius:"3px",padding:"0.5px 2px"},children:"undefined"})}});function I0(e){function t(e,t){var n,r;return Object.is(e.value,t.value)&&e.inspect&&t.inspect&&(null===(n=e.path)||void 0===n?void 0:n.join("."))===(null===(r=t.path)||void 0===r?void 0:r.join("."))}return e.Component=U.memo(e.Component,t),e.Editor&&(e.Editor=U.memo(e.Editor,(function(e,t){return Object.is(e.value,t.value)}))),e.PreComponent&&(e.PreComponent=U.memo(e.PreComponent,t)),e.PostComponent&&(e.PostComponent=U.memo(e.PostComponent,t)),e}const _0=[I0(n0),I0(o0),I0(l0),I0(T0),I0(R0),I0(s0),I0(c0),I0(p0),I0(d0),I0(f0)],A0=U.createContext(void 0);A0.Provider;const O0=(e,t)=>OJ(U.useContext(A0),e,t);function N0(e,t){const n=O0((e=>e.registry));return U.useMemo((()=>function(e,t,n){let r;for(const o of n)o.is(e,t)&&(r=o);if(void 0===r){if("object"==typeof e)return k0;throw new Error("No type matched for value: ".concat(e))}return r}(e,t,n)),[e,t,n])}const P0=e=>ee.jsx(ik,{component:"span",...e,sx:{cursor:"pointer",paddingLeft:"0.7rem",...e.sx}}),L0=e=>{const{value:t,prevValue:n,path:r,nestedIndex:o}=e,{Component:a,PreComponent:i,PostComponent:s,Editor:l,serialize:u,deserialize:c}=N0(t,r);var d;const p=null!==(d=e.editable)&&void 0!==d?d:void 0,f=VJ((e=>e.editable)),m=U.useMemo((()=>!1!==f&&(!1!==p&&("function"==typeof f?!!f(r,t):f))),[r,p,f,t]),[g,h]=U.useState(""),b=r.length,v=r[b-1],y=VJ((e=>e.hoverPath)),w=U.useMemo((()=>y&&r.every(((e,t)=>e===y.path[t]&&o===y.nestedIndex))),[y,r,o]),S=VJ((e=>e.setHover)),x=VJ((e=>e.value)),[E,C]=function(e,t,n){const r=e.length,o=QJ(e,t),a=VJ((e=>e.getInspectCache)),i=VJ((e=>e.setInspectCache)),s=VJ((e=>e.defaultInspectDepth)),l=VJ((e=>e.defaultInspectControl));U.useEffect((()=>{if(void 0!==a(e,n))return;if(void 0!==n)return void i(e,!1,n);const u=!o&&("function"==typeof l?l(e,t):r{const i=a(e,n);return void 0!==i?i:void 0===n&&!o&&("function"==typeof l?l(e,t):r{c((r=>{const o="boolean"==typeof t?t:t(r);return i(e,o,n),o}))}),[n,e,i])]}(r,t,o),[k,R]=U.useState(!1),T=VJ((e=>e.onChange)),I=GJ(),_=VJ((e=>e.colorspace.base0C)),A=VJ((e=>e.colorspace.base0A)),O=VJ((e=>e.quotesOnKeys)),N=VJ((e=>e.rootName)),P=x===t,L=Number.isInteger(Number(v)),M=VJ((e=>e.enableAdd)),D=VJ((e=>e.onAdd)),j=U.useMemo((()=>!(!D||void 0!==o)&&(!1!==M&&(!1!==p&&("function"==typeof M?!!M(r,t):!(!Array.isArray(t)&&!function(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===WJ}(t)))))),[D,o,r,M,p,t]),F=VJ((e=>e.enableDelete)),$=VJ((e=>e.onDelete)),B=U.useMemo((()=>!(!$||void 0!==o)&&(!P&&(!1!==F&&(!1!==p&&("function"==typeof F?!!F(r,t):F))))),[$,o,P,r,F,p,t]),z=VJ((e=>e.enableClipboard)),{copy:H,copied:V}=ZJ(),G=VJ((e=>e.highlightUpdates)),W=U.useMemo((()=>!(!G||void 0===n)&&(typeof t!=typeof n||("number"==typeof t?(!isNaN(t)||!isNaN(n))&&t!==n:Array.isArray(t)!==Array.isArray(n)||"object"!=typeof t&&"function"!=typeof t&&t!==n))),[G,n,t]),q=U.useRef();U.useEffect((()=>{q.current&&W&&"animate"in q.current&&q.current.animate([{backgroundColor:A},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})}),[A,W,n,t]);const K=U.useCallback((e=>{e.preventDefault(),u&&h(u(t)),R(!0)}),[u,t]),Y=U.useCallback((()=>{R(!1),h("")}),[R,h]),X=U.useCallback((e=>{if(R(!1),c)try{T(r,t,c(e))}catch(lJ){}}),[R,c,T,r,t]),Z=U.useMemo((()=>k?ee.jsxs(ee.Fragment,{children:[ee.jsx(P0,{children:ee.jsx(y0,{sx:{fontSize:".8rem"},onClick:Y})}),ee.jsx(P0,{children:ee.jsx(h0,{sx:{fontSize:".8rem"},onClick:()=>X(g)})})]}):ee.jsxs(ee.Fragment,{children:[z&&ee.jsx(P0,{onClick:e=>{e.preventDefault();try{H(r,t,XJ)}catch(lJ){console.error(lJ)}},children:V?ee.jsx(h0,{sx:{fontSize:".8rem"}}):ee.jsx(w0,{sx:{fontSize:".8rem"}})}),l&&m&&u&&c&&ee.jsx(P0,{onClick:K,children:ee.jsx(S0,{sx:{fontSize:".8rem"}})}),j&&ee.jsx(P0,{onClick:e=>{e.preventDefault(),null==D||D(r)},children:ee.jsx(g0,{sx:{fontSize:".8rem"}})}),B&&ee.jsx(P0,{onClick:e=>{e.preventDefault(),null==$||$(r,t)},children:ee.jsx(E0,{sx:{fontSize:".9rem"}})})]})),[l,u,c,V,H,m,k,z,j,B,g,r,t,D,$,K,Y,X]),Q=U.useMemo((()=>0===KJ(t)),[t]),J=!Q&&!(!i||!s),te=VJ((e=>e.keyRenderer)),ne=U.useMemo((()=>({path:r,inspect:E,setInspect:C,value:t,prevValue:n,nestedIndex:o})),[E,r,C,t,n,o]);return ee.jsxs(ik,{className:"data-key-pair","data-testid":"data-key-pair"+r.join("."),sx:{userSelect:"text"},onMouseEnter:U.useCallback((()=>S(r,o)),[S,r,o]),children:[ee.jsxs(JJ,{component:"span",className:"data-key",sx:{lineHeight:1.5,color:I,letterSpacing:.5,opacity:.8},onClick:U.useCallback((e=>{e.isDefaultPrevented()||Q||C((e=>!e))}),[Q,C]),children:[J?E?ee.jsx(x0,{sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):ee.jsx(b0,{sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):null,ee.jsx(ik,{ref:q,component:"span",children:P&&0===b?!1!==N?O?ee.jsxs(ee.Fragment,{children:['"',N,'"']}):ee.jsx(ee.Fragment,{children:N}):null:te.when(ne)?ee.jsx(te,{...ne}):void 0===o&&(L?ee.jsx(ik,{component:"span",style:{color:_},children:v}):O?ee.jsxs(ee.Fragment,{children:['"',v,'"']}):ee.jsx(ee.Fragment,{children:v}))}),P?!1!==N&&ee.jsx(JJ,{sx:{mr:.5},children:":"}):void 0===o&&ee.jsx(JJ,{sx:{mr:.5},children:":"}),i&&ee.jsx(i,{...ne}),w&&J&&E&&Z]}),k&&m?l&&ee.jsx(l,{value:g,setValue:h,abortEditing:Y,commitEditing:X}):a?ee.jsx(a,{...ne}):ee.jsx(ik,{component:"span",className:"data-value-fallback",children:"fallback: ".concat(t)}),s&&ee.jsx(s,{...ne}),w&&J&&!E&&Z,w&&!J&&Z,!w&&k&&Z]})},M0="(prefers-color-scheme: dark)";function D0(e,t){const{setState:n}=U.useContext(HJ);U.useEffect((()=>{void 0!==t&&n({[e]:t})}),[e,t,n])}const j0=e=>{const{setState:t}=U.useContext(HJ);U.useEffect((()=>{t((t=>({prevValue:t.value,value:e.value})))}),[e.value,t]),D0("rootName",e.rootName),D0("indentWidth",e.indentWidth),D0("keyRenderer",e.keyRenderer),D0("enableAdd",e.enableAdd),D0("enableDelete",e.enableDelete),D0("enableClipboard",e.enableClipboard),D0("editable",e.editable),D0("onChange",e.onChange),D0("onCopy",e.onCopy),D0("onSelect",e.onSelect),D0("onAdd",e.onAdd),D0("onDelete",e.onDelete),D0("maxDisplayLength",e.maxDisplayLength),D0("groupArraysAfterLength",e.groupArraysAfterLength),D0("displayDataTypes",e.displayDataTypes),D0("displaySize",e.displaySize),D0("highlightUpdates",e.highlightUpdates),U.useEffect((()=>{"light"===e.theme?t({colorspace:$J}):"dark"===e.theme?t({colorspace:BJ}):"object"==typeof e.theme&&t({colorspace:e.theme})}),[t,e.theme]);const n=U.useMemo((()=>"object"==typeof e.theme?"json-viewer-theme-custom":"dark"===e.theme?"json-viewer-theme-dark":"json-viewer-theme-light"),[e.theme]),r=U.useRef(!0),o=O0((e=>e.registerTypes));if(r.current){const t=e.valueTypes?[..._0,...e.valueTypes]:[..._0];o(t),r.current=!1}U.useEffect((()=>{const t=e.valueTypes?[..._0,...e.valueTypes]:[..._0];o(t)}),[e.valueTypes,o]);const a=VJ((e=>e.value)),i=VJ((e=>e.prevValue)),s=U.useMemo((()=>[]),[]),l=VJ((e=>e.setHover)),u=U.useCallback((()=>l(null)),[l]);return ee.jsx(Ly,{elevation:0,className:FJ(n,e.className),style:e.style,sx:{fontFamily:"monospace",userSelect:"none",contentVisibility:"auto",...e.sx},onMouseLeave:u,children:ee.jsx(L0,{value:a,prevValue:i,path:s})})},F0=function(e){const t=function(){const[e,t]=U.useState(!1);return U.useEffect((()=>{const e=e=>t(e.matches);t(window.matchMedia(M0).matches);const n=window.matchMedia(M0);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)}),[]),e}(),n=U.useMemo((()=>{var n;return"auto"===e.theme?t?"dark":"light":null!==(n=e.theme)&&void 0!==n?n:"light"}),[t,e.theme]),r=U.useMemo((()=>{const e="object"==typeof n?n.base00:"dark"===n?BJ.base00:$J.base00;return fv({components:{MuiPaper:{styleOverrides:{root:{backgroundColor:e,color:"object"==typeof n?n.base07:"dark"===n?BJ.base07:$J.base07}}}},palette:{mode:"dark"===n?"dark":"light",background:{default:e}}})}),[n]),o={...e,theme:n},a=U.useMemo((()=>UJ(e)),[]),i=U.useMemo((()=>rJ()((e=>({registry:_0,registerTypes:t=>{e((e=>({registry:"function"==typeof t?t(e.registry):t})))}})))),[]);return ee.jsx(Kv,{theme:r,children:ee.jsx(A0.Provider,{value:i,children:ee.jsx(HJ.Provider,{value:a,children:ee.jsx(j0,{...o})})})})};function $0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return H0[r]||(H0[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),H0[r]}(e.filter((function(e){return"token"!==e}))).reduce((function(e,t){return U0(U0({},e),n[t])}),t)}function G0(e){return e.join(" ")}function W0(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,a=e.useInlineStyles,i=e.key,s=t.properties,l=t.type,u=t.tagName,c=t.value;if("text"===l)return c;if(u){var d,p=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return W0({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,a);if(a){var f=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),m=s.className&&s.className.includes("token")?["token"]:[],g=s.className&&m.concat(s.className.filter((function(e){return!f.includes(e)})));d=U0(U0({},s),{},{className:G0(g)||void 0,style:V0(s.className,Object.assign({},s.style,o),n)})}else d=U0(U0({},s),{},{className:G0(s.className)});var h=p(t.children);return H.createElement(u,Af({key:i},d),h)}}const q0=function(e,t){return-1!==e.listLanguages().indexOf(t)};var K0=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Y0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X0(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return t||u.length>0?function(e,t){return t1({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l})}(e,a,u):function(e,t){if(r&&t&&o){var n=e1(s,t,i);e.unshift(J0(t,n))}return e}(e,a)}for(var g=function(){var e=c[f],t=e.children[0].value;if(t.match(Z0)){var n=t.split("\n");n.forEach((function(t,o){var i=r&&d.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===o){var l=m(c.slice(p+1,f).concat(t1({children:[s],className:e.properties.className})),i);d.push(l)}else if(o===n.length-1){var u=c[f+1]&&c[f+1].children&&c[f+1].children[0],g={type:"text",value:"".concat(t)};if(u){var h=t1({children:[g],className:e.properties.className});c.splice(f+1,0,h)}else{var b=m([g],i,e.properties.className);d.push(b)}}else{var v=m([s],i,e.properties.className);d.push(v)}})),p=f}f++};f4&&n.slice(0,4)===r2&&a2.test(t)&&("-"===t.charAt(4)?r=function(e){var t=e.slice(5).replace(i2,u2);return r2+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(i2.test(t))return e;t=t.replace(s2,l2),"-"!==t.charAt(0)&&(t="-"+t);return r2+t}(t),o=t2);return new o(r,t)},a2=/^data[-\w.:]+$/i,i2=/-[a-z]/g,s2=/[A-Z]/g;function l2(e){return"-"+e.toLowerCase()}function u2(e){return e.charAt(1).toUpperCase()}var c2=function(e,t){var n,r,o,a=e||"",i=t||"div",s={},l=0;for(;l=48&&t<=57};var N2=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57};var P2=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90};var L2,M2=P2,D2=O2,j2=function(e){return M2(e)||D2(e)};var F2=function(e){var t,n="&"+e+";";if((L2=L2||document.createElement("i")).innerHTML=n,t=L2.textContent,59===t.charCodeAt(t.length-1)&&"semi"!==e)return!1;return t!==n&&t};var $2={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},B2={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},z2=O2,U2=N2,H2=j2,V2=F2,G2=function(e,t){var n,r,o={};t||(t={});for(r in Y2)n=t[r],o[r]=null==n?Y2[r]:n;(o.position.indent||o.position.start)&&(o.indent=o.position.indent||[],o.position=o.position.start);return function(e,t){var n,r,o,a,i,s,l,u,c,d,p,f,m,g,h,b,v,y,w,S=t.additional,x=t.nonTerminated,E=t.text,C=t.reference,k=t.warning,R=t.textContext,T=t.referenceContext,I=t.warningContext,_=t.position,A=t.indent||[],O=e.length,N=0,P=-1,L=_.column||1,M=_.line||1,D="",j=[];"string"==typeof S&&(S=S.charCodeAt(0));b=F(),u=k?$:K2,N--,O++;for(;++N65535&&(d+=q2((s-=65536)>>>10|55296),s=56320|1023&s),s=d+q2(s))):g!==l4&&u(h4,y)),s?(B(),b=F(),N=w-1,L+=w-m+1,j.push(s),(v=F()).offset++,C&&C.call(T,s,{start:b,end:v},e.slice(m-1,w)),b=v):(a=e.slice(m-1,w),D+=a,L+=a.length,N=w-1)}else 10===i&&(M++,P++,L=0),i==i?(D+=q2(i),L++):B();return j.join("");function F(){return{line:M,column:L,offset:N+(_.offset||0)}}function $(e,t){var n=F();n.column+=t,n.offset+=t,k.call(I,w4[e],n,e)}function B(){D&&(j.push(D),E&&E.call(R,D,{start:b,end:F()}),D="")}}(e,o)},W2={}.hasOwnProperty,q2=String.fromCharCode,K2=Function.prototype,Y2={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},X2=9,Z2=10,Q2=12,J2=32,e4=38,t4=59,n4=60,r4=61,o4=35,a4=88,i4=120,s4=65533,l4="named",u4="hexadecimal",c4="decimal",d4={};d4[u4]=16,d4[c4]=10;var p4={};p4[l4]=H2,p4[c4]=z2,p4[u4]=U2;var f4=1,m4=2,g4=3,h4=4,b4=5,v4=6,y4=7,w4={};function S4(e){return e>=55296&&e<=57343||e>1114111}function x4(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}w4[f4]="Named character references must be terminated by a semicolon",w4[m4]="Numeric character references must be terminated by a semicolon",w4[g4]="Named character references cannot be empty",w4[h4]="Numeric character references cannot be empty",w4[b4]="Named character references must be known",w4[v4]="Numeric character references cannot be disallowed",w4[y4]="Numeric character references cannot be outside the permissible Unicode range";var E4={exports:{}};!function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);E+=x.value.length,x=x.next){var C=x.value;if(t.length>e.length)return;if(!(C instanceof a)){var k,R=1;if(v){if(!(k=i(S,E,e,b))||k.index>=e.length)break;var T=k.index,I=k.index+k[0].length,_=E;for(_+=x.value.length;T>=_;)_+=(x=x.next).value.length;if(E=_-=x.value.length,x.value instanceof a)continue;for(var A=x;A!==t.tail&&(_d.reach&&(d.reach=L);var M=x.prev;if(N&&(M=u(t,M,N),E+=N.length),c(t,M,R),x=u(t,M,new a(p,h?o.tokenize(O,h):O,y,O)),P&&u(t,x,P),R>1){var D={cause:p+","+m,reach:L};s(e,t,n,x.prev,E,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o"+a.content+""},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,i=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),i&&e.close()}),!1),o):o;var d=o.util.currentScript();function p(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{}); /** * Prism: Lightweight, robust, elegant syntax highlighting * diff --git a/bundle.js b/bundle.js index f45d613d..a2d7483b 100644 --- a/bundle.js +++ b/bundle.js @@ -1,7 +1,7 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/bootstrap-99OZCrVa.js","bundle.css"] + __vite__mapDeps.viteFileDeps = ["assets/bootstrap-C-35D-R3.js","bundle.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const r of e)if("childList"===r.type)for(const e of r.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const e={},t=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){const t=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),s=i?.nonce||i?.getAttribute("nonce");o=Promise.all(r.map((r=>{if((r=function(e){return"/yii-dev-panel/"+e}(r))in e)return;e[r]=!0;const o=r.endsWith(".css"),i=o?'[rel="stylesheet"]':"";if(!!n)for(let e=t.length-1;e>=0;e--){const n=t[e];if(n.href===r&&(!o||"stylesheet"===n.rel))return}else if(document.querySelector(`link[href="${r}"]${i}`))return;const l=document.createElement("link");return l.rel=o?"stylesheet":"modulepreload",o||(l.as="script",l.crossOrigin=""),l.href=r,s&&l.setAttribute("nonce",s),document.head.appendChild(l),o?new Promise(((e,t)=>{l.addEventListener("load",e),l.addEventListener("error",(()=>t(new Error(`Unable to preload CSS for ${r}`))))})):void 0})))}return o.then((()=>t())).catch((e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}))},r={backendUrl:"http://127.0.0.1:8080",buildVersion:"#378cdb0",appEnv:"github"};var n;r.backendUrl="http://127.0.0.1:8080",r.appEnv="github",t((()=>import("./assets/bootstrap-99OZCrVa.js")),__vite__mapDeps([0,1])),n&&n instanceof Function&&t((()=>import("./assets/web-vitals-BDnzJRlM.js")),[]).then((({getCLS:e,getFID:t,getFCP:r,getLCP:o,getTTFB:i})=>{e(n),t(n),r(n),o(n),i(n)}));export{r as C}; +!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const r of e)if("childList"===r.type)for(const e of r.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const e={},t=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){const t=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),s=i?.nonce||i?.getAttribute("nonce");o=Promise.all(r.map((r=>{if((r=function(e){return"https://yiisoft.github.io/yii-dev-panel/"+e}(r))in e)return;e[r]=!0;const o=r.endsWith(".css"),i=o?'[rel="stylesheet"]':"";if(!!n)for(let e=t.length-1;e>=0;e--){const n=t[e];if(n.href===r&&(!o||"stylesheet"===n.rel))return}else if(document.querySelector(`link[href="${r}"]${i}`))return;const l=document.createElement("link");return l.rel=o?"stylesheet":"modulepreload",o||(l.as="script",l.crossOrigin=""),l.href=r,s&&l.setAttribute("nonce",s),document.head.appendChild(l),o?new Promise(((e,t)=>{l.addEventListener("load",e),l.addEventListener("error",(()=>t(new Error(`Unable to preload CSS for ${r}`))))})):void 0})))}return o.then((()=>t())).catch((e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}))},r={backendUrl:"http://127.0.0.1:8080",buildVersion:"#3206b8d",appEnv:"github"};var n;r.backendUrl="http://127.0.0.1:8080",r.appEnv="github",t((()=>import("./assets/bootstrap-C-35D-R3.js")),__vite__mapDeps([0,1])),n&&n instanceof Function&&t((()=>import("./assets/web-vitals-BDnzJRlM.js")),[]).then((({getCLS:e,getFID:t,getFCP:r,getLCP:o,getTTFB:i})=>{e(n),t(n),r(n),o(n),i(n)}));export{r as C}; diff --git a/index.html b/index.html index 40b4fc22..d2080bbb 100644 --- a/index.html +++ b/index.html @@ -13,12 +13,12 @@ href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" /> - - - + + + - - + + @@ -28,7 +28,7 @@ manifest.json provides metadata used when your web app is installed on a user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> - + Yii Dev Panel - - + +
diff --git a/manifest.webmanifest b/manifest.webmanifest index a8d276a1..b554d522 100644 --- a/manifest.webmanifest +++ b/manifest.webmanifest @@ -1 +1 @@ -{"name":"@yiisoft/yii-dev-panel","short_name":"@yiisoft/yii-dev-panel","start_url":"/yii-dev-panel/","display":"standalone","background_color":"#ffffff","lang":"en","scope":"/yii-dev-panel/"} +{"name":"@yiisoft/yii-dev-panel","short_name":"@yiisoft/yii-dev-panel","start_url":"https://yiisoft.github.io/yii-dev-panel/","display":"standalone","background_color":"#ffffff","lang":"en","scope":"https://yiisoft.github.io/yii-dev-panel/"} diff --git a/registerSW.js b/registerSW.js index 6f041c4e..bd83235e 100644 --- a/registerSW.js +++ b/registerSW.js @@ -1 +1 @@ -if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('/yii-dev-panel/service-worker.js', { scope: '/yii-dev-panel/' })})} \ No newline at end of file +if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('https://yiisoft.github.io/yii-dev-panel/service-worker.js', { scope: 'https://yiisoft.github.io/yii-dev-panel/' })})} \ No newline at end of file diff --git a/service-worker.js b/service-worker.js index d7e9816c..87a0a377 100644 --- a/service-worker.js +++ b/service-worker.js @@ -1 +1 @@ -try{self["workbox:core:7.0.0"]&&_()}catch(oe){}const e=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:cacheable-response:7.0.0"]&&_()}catch(oe){}class s{constructor(e={}){this._statuses=e.statuses,this._headers=e.headers}isResponseCacheable(e){let t=!0;return this._statuses&&(t=this._statuses.includes(e.status)),this._headers&&t&&(t=Object.keys(this._headers).some((t=>e.headers.get(t)===this._headers[t]))),t}}class n{constructor(e){this.cacheWillUpdate=async({response:e})=>this._cacheableResponse.isResponseCacheable(e)?e:null,this._cacheableResponse=new s(e)}}const a=new Set;const r={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},i=e=>[r.prefix,e,r.suffix].filter((e=>e&&e.length>0)).join("-"),c=e=>e||i(r.precache),o=e=>e||i(r.runtime);function h(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let l;function u(e){e.then((()=>{}))}class d{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function p(e,t){const s=t();return e.waitUntil(s),s}async function f(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,c=function(){if(void 0===l){const t=new Response("");if("body"in t)try{new Response(t.body),l=!0}catch(e){l=!1}l=!1}return l}()?a.body:await a.blob();return new Response(c,i)}const g=(e,t)=>t.some((t=>e instanceof t));let m,w;const y=new WeakMap,b=new WeakMap,v=new WeakMap,R=new WeakMap,C=new WeakMap;let x={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return b.get(e);if("objectStoreNames"===t)return e.objectStoreNames||v.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return q(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function E(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(w||(w=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(U(this),t),q(y.get(this))}:function(...t){return q(e.apply(U(this),t))}:function(t,...s){const n=e.call(U(this),t,...s);return v.set(n,t.sort?t.sort():[t]),q(n)}}function L(e){return"function"==typeof e?E(e):(e instanceof IDBTransaction&&function(e){if(b.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));b.set(e,t)}(e),g(e,m||(m=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,x):e)}function q(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(q(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&y.set(t,e)})).catch((()=>{})),C.set(t,e),t}(e);if(R.has(e))return R.get(e);const t=L(e);return t!==e&&(R.set(e,t),C.set(t,e)),t}const U=e=>C.get(e);const D=["get","getKey","getAll","getAllKeys","count"],k=["put","add","delete","clear"],T=new Map;function N(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(T.get(t))return T.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=k.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!D.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return T.set(t,r),r}x=(e=>({...e,get:(t,s,n)=>N(t,s)||e.get(t,s,n),has:(t,s)=>!!N(t,s)||e.has(t,s)}))(x);try{self["workbox:expiration:7.0.0"]&&_()}catch(oe){}const I="cache-entries",K=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class M{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(I,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),q(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=K(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(I,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(I,this._getId(e));return null==s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(I).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(I,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+K(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),c=q(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(q(i.result),e.oldVersion,e.newVersion,q(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class O{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new M(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,u(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);u(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(c){}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){a.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===o())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new O(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}try{self["workbox:precaching:7.0.0"]&&_()}catch(oe){}function W(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class S{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class A{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}try{self["workbox:strategies:7.0.0"]&&_()}catch(oe){}function B(e){return"string"==typeof e?new Request(e):e}class j{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new d,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=B(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(c){throw a&&await this.runCallbacks("fetchDidFail",{error:c,event:s,originalRequest:a.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=B(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const n=B(e);var r;await(r=0,new Promise((e=>setTimeout(e,r))));const i=await this.getCacheKey(n,"write");if(!s)throw new t("cache-put-with-no-response",{url:(c=i.url,new URL(String(c),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var c;const o=await this._ensureResponseSafeToCache(s);if(!o)return!1;const{cacheName:l,matchOptions:u}=this._strategy,d=await self.caches.open(l),p=this.hasCallback("cacheDidUpdate"),f=p?await async function(e,t,s,n){const a=h(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===h(c.url,s))return e.match(c,n)}(d,i.clone(),["__WB_REVISION__"],u):null;try{await d.put(i,p?o.clone():o)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of a)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:l,oldResponse:f,newResponse:o.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=B(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class F{constructor(e={}){this.cacheName=o(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"==typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new j(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(i){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(c){c instanceof Error&&(r=c)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class H extends F{constructor(e={}){e.cacheName=c(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(H.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{const t=a.integrity,r=e.integrity,i=!r||r===t;n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode&&(this._useDefaultCacheabilityPluginIfNeeded(),await s.cachePut(e,n.clone()))}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!(await s.cachePut(e,n.clone())))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==H.copyRedirectedCacheableResponsesPlugin&&(n===H.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(H.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}H.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},H.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await f(e):e};class V{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new H({cacheName:c(e),plugins:[...t,new A({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"==typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=W(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!=typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return p(e,(async()=>{const t=new S;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return p(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let $;const Q=()=>($||($=new V),$);try{self["workbox:routing:7.0.0"]&&_()}catch(oe){}const G=e=>e&&"object"==typeof e?e:{handle:e};class J{constructor(e,t,s="GET"){this.handler=G(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=G(e)}}class z extends J{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class X{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map((t=>{"string"==typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return;let o;try{o=i.handle({url:s,request:e,event:t,params:a})}catch(l){o=Promise.reject(l)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async n=>{if(h)try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,G(e))}setCatchHandler(e){this._catchHandler=G(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let Y;const Z=()=>(Y||(Y=new X,Y.addFetchListener(),Y.addCacheListener()),Y);function ee(e,s,n){let a;if("string"==typeof e){const t=new URL(e,location.href);a=new J((({url:e})=>e.href===t.href),s,n)}else if(e instanceof RegExp)a=new z(e,s,n);else if("function"==typeof e)a=new J(e,s,n);else{if(!(e instanceof J))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return Z().registerRoute(a),a}class te extends J{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const se={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class ne extends F{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(se)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r);else try{r=await n}catch(i){i instanceof Error&&(a=i)}if(!r)throw new t("no-response",{url:e.url,error:a});return r}}var ae;self.addEventListener("activate",(()=>self.clients.claim())),self.skipWaiting(),function(e){Q().precache(e)}([{"revision":null,"url":"assets/bootstrap-99OZCrVa.js"},{"revision":null,"url":"assets/web-vitals-BDnzJRlM.js"},{"revision":"a10007f8fcd066d57bf6bdb2037a3427","url":"bundle.css"},{"revision":"094b38df972f8dc857fcbbd9bff4535c","url":"bundle.js"},{"revision":"c5e72688daa6d174821138ac13b428f0","url":"index.html"},{"revision":"cfeec0a2e9cf48cc86e758ae5d4b5876","url":"registerSW.js"},{"revision":"e7fa5ca578bafb07c7baf3faf00d9d46","url":"manifest.webmanifest"}]),function(e){const t=Q();ee(new te(t,e))}(ae),ee((({url:e})=>"https://fonts.googleapis.com"===e.origin),new ne({cacheName:"google-fonts-stylesheets",plugins:[new n({statuses:[0,200]})]})),ee((({request:{destination:e}})=>"script"===e),new ne({cacheName:"javascript-files",plugins:[new n({statuses:[0,200]}),new P({purgeOnQuotaError:!0,maxEntries:1e3,maxAgeSeconds:2592e3})]})),ee((({url:e})=>"https://fonts.gstatic.com"===e.origin),new ne({cacheName:"google-fonts-webfonts",plugins:[new n({statuses:[0,200]})]}));const re=new RegExp("/[^/?]+\\.[^/]+$");var ie;ee((({request:e,url:t})=>"navigate"===e.mode&&(!t.pathname.startsWith("/_")&&!t.pathname.match(re))),(ie="/yii-dev-panel/index.html",Q().createHandlerBoundToURL(ie))),ee((({url:e})=>e.pathname.endsWith(".ico")||e.pathname.endsWith(".svg")||e.pathname.endsWith(".png")||e.pathname.endsWith(".jpeg")||e.pathname.endsWith(".jpg")||e.pathname.endsWith(".webp")),new ne({cacheName:"images",plugins:[new P({purgeOnQuotaError:!0,maxEntries:1e3})]}));const ce=/\/debug|gii|inspect\//i;self.addEventListener("fetch",(e=>{const t=e.request;"navigate"!==t.mode&&(t.url.match(re)||t.url.match(ce)||e.respondWith(fetch(e.request).then((s=>(function(e,t,s){const n=[{type:"FETCH",payload:{headers:Object.fromEntries(s.headers),url:t.url,method:t.method,status:t.status}}];n.map((t=>{self.clients.get(e).then((e=>{e.postMessage(t)}))}))}(e.clientId,t,s),s))).catch((e=>{throw console.log("sw fetch error",e),e}))))})); +try{self["workbox:core:7.0.0"]&&_()}catch(oe){}const e=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class t extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:cacheable-response:7.0.0"]&&_()}catch(oe){}class s{constructor(e={}){this._statuses=e.statuses,this._headers=e.headers}isResponseCacheable(e){let t=!0;return this._statuses&&(t=this._statuses.includes(e.status)),this._headers&&t&&(t=Object.keys(this._headers).some((t=>e.headers.get(t)===this._headers[t]))),t}}class n{constructor(e){this.cacheWillUpdate=async({response:e})=>this._cacheableResponse.isResponseCacheable(e)?e:null,this._cacheableResponse=new s(e)}}const a=new Set;const r={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},i=e=>[r.prefix,e,r.suffix].filter((e=>e&&e.length>0)).join("-"),c=e=>e||i(r.precache),o=e=>e||i(r.runtime);function h(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let l;function u(e){e.then((()=>{}))}class d{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function p(e,t){const s=t();return e.waitUntil(s),s}async function f(e,s){let n=null;if(e.url){n=new URL(e.url).origin}if(n!==self.location.origin)throw new t("cross-origin-copy-response",{origin:n});const a=e.clone(),r={headers:new Headers(a.headers),status:a.status,statusText:a.statusText},i=s?s(r):r,c=function(){if(void 0===l){const t=new Response("");if("body"in t)try{new Response(t.body),l=!0}catch(e){l=!1}l=!1}return l}()?a.body:await a.blob();return new Response(c,i)}const g=(e,t)=>t.some((t=>e instanceof t));let m,w;const y=new WeakMap,b=new WeakMap,v=new WeakMap,R=new WeakMap,C=new WeakMap;let x={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return b.get(e);if("objectStoreNames"===t)return e.objectStoreNames||v.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return q(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function E(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(w||(w=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(U(this),t),q(y.get(this))}:function(...t){return q(e.apply(U(this),t))}:function(t,...s){const n=e.call(U(this),t,...s);return v.set(n,t.sort?t.sort():[t]),q(n)}}function L(e){return"function"==typeof e?E(e):(e instanceof IDBTransaction&&function(e){if(b.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));b.set(e,t)}(e),g(e,m||(m=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,x):e)}function q(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(q(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&y.set(t,e)})).catch((()=>{})),C.set(t,e),t}(e);if(R.has(e))return R.get(e);const t=L(e);return t!==e&&(R.set(e,t),C.set(t,e)),t}const U=e=>C.get(e);const D=["get","getKey","getAll","getAllKeys","count"],k=["put","add","delete","clear"],T=new Map;function N(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(T.get(t))return T.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=k.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!D.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return T.set(t,r),r}x=(e=>({...e,get:(t,s,n)=>N(t,s)||e.get(t,s,n),has:(t,s)=>!!N(t,s)||e.has(t,s)}))(x);try{self["workbox:expiration:7.0.0"]&&_()}catch(oe){}const I="cache-entries",K=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class M{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(I,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),q(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=K(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(I,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(I,this._getId(e));return null==s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(I).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(I,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+K(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),c=q(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(q(i.result),e.oldVersion,e.newVersion,q(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class O{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new M(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,u(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);u(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(c){}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){a.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===o())throw new t("expire-custom-caches-only");let s=this._cacheExpirations.get(e);return s||(s=new O(e,this._config),this._cacheExpirations.set(e,s)),s}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}try{self["workbox:precaching:7.0.0"]&&_()}catch(oe){}function W(e){if(!e)throw new t("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:s,url:n}=e;if(!n)throw new t("add-to-cache-list-unexpected-type",{entry:e});if(!s){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const a=new URL(n,location.href),r=new URL(n,location.href);return a.searchParams.set("__WB_REVISION__",s),{cacheKey:a.href,url:r.href}}class S{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class A{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null==t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}try{self["workbox:strategies:7.0.0"]&&_()}catch(oe){}function B(e){return"string"==typeof e?new Request(e):e}class j{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new d,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:s}=this;let n=B(e);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const e=await s.preloadResponse;if(e)return e}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))n=await e({request:n.clone(),event:s})}catch(i){if(i instanceof Error)throw new t("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let e;e=await fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);for(const t of this.iterateCallbacks("fetchDidSucceed"))e=await t({event:s,request:r,response:e});return e}catch(c){throw a&&await this.runCallbacks("fetchDidFail",{error:c,event:s,originalRequest:a.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=B(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,s){const n=B(e);var r;await(r=0,new Promise((e=>setTimeout(e,r))));const i=await this.getCacheKey(n,"write");if(!s)throw new t("cache-put-with-no-response",{url:(c=i.url,new URL(String(c),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var c;const o=await this._ensureResponseSafeToCache(s);if(!o)return!1;const{cacheName:l,matchOptions:u}=this._strategy,d=await self.caches.open(l),p=this.hasCallback("cacheDidUpdate"),f=p?await async function(e,t,s,n){const a=h(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===h(c.url,s))return e.match(c,n)}(d,i.clone(),["__WB_REVISION__"],u):null;try{await d.put(i,p?o.clone():o)}catch(g){if(g instanceof Error)throw"QuotaExceededError"===g.name&&await async function(){for(const e of a)await e()}(),g}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:l,oldResponse:f,newResponse:o.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=B(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"==typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class F{constructor(e={}){this.cacheName=o(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"==typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new j(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,s,n){let a;await e.runCallbacks("handlerWillStart",{event:n,request:s});try{if(a=await this._handle(s,e),!a||"error"===a.type)throw new t("no-response",{url:s.url})}catch(r){if(r instanceof Error)for(const t of e.iterateCallbacks("handlerDidError"))if(a=await t({error:r,event:n,request:s}),a)break;if(!a)throw r}for(const t of e.iterateCallbacks("handlerWillRespond"))a=await t({event:n,request:s,response:a});return a}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(i){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(c){c instanceof Error&&(r=c)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class H extends F{constructor(e={}){e.cacheName=c(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push(H.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,s){let n;const a=s.params||{};if(!this._fallbackToNetwork)throw new t("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{const t=a.integrity,r=e.integrity,i=!r||r===t;n=await s.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||t:void 0})),t&&i&&"no-cors"!==e.mode&&(this._useDefaultCacheabilityPluginIfNeeded(),await s.cachePut(e,n.clone()))}return n}async _handleInstall(e,s){this._useDefaultCacheabilityPluginIfNeeded();const n=await s.fetch(e);if(!(await s.cachePut(e,n.clone())))throw new t("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==H.copyRedirectedCacheableResponsesPlugin&&(n===H.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push(H.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}H.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},H.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await f(e):e};class V{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new H({cacheName:c(e),plugins:[...t,new A({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const s=[];for(const n of e){"string"==typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:e,url:a}=W(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==e)throw new t("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:e});if("string"!=typeof n&&n.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==n.integrity)throw new t("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(e,n.integrity)}if(this._urlsToCacheKeys.set(a,e),this._urlsToCacheModes.set(a,r),s.length>0){const e=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return p(e,(async()=>{const t=new S;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return p(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const s=this.getCacheKeyForURL(e);if(!s)throw new t("non-precached-url",{url:e});return t=>(t.request=new Request(e),t.params=Object.assign({cacheKey:s},t.params),this.strategy.handle(t))}}let $;const Q=()=>($||($=new V),$);try{self["workbox:routing:7.0.0"]&&_()}catch(oe){}const G=e=>e&&"object"==typeof e?e:{handle:e};class J{constructor(e,t,s="GET"){this.handler=G(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=G(e)}}class z extends J{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class X{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map((t=>{"string"==typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return;let o;try{o=i.handle({url:s,request:e,event:t,params:a})}catch(l){o=Promise.reject(l)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async n=>{if(h)try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"==typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,G(e))}setCatchHandler(e){this._catchHandler=G(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new t("unregister-route-but-not-found-with-method",{method:e.method});const s=this._routes.get(e.method).indexOf(e);if(!(s>-1))throw new t("unregister-route-route-not-registered");this._routes.get(e.method).splice(s,1)}}let Y;const Z=()=>(Y||(Y=new X,Y.addFetchListener(),Y.addCacheListener()),Y);function ee(e,s,n){let a;if("string"==typeof e){const t=new URL(e,location.href);a=new J((({url:e})=>e.href===t.href),s,n)}else if(e instanceof RegExp)a=new z(e,s,n);else if("function"==typeof e)a=new J(e,s,n);else{if(!(e instanceof J))throw new t("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=e}return Z().registerRoute(a),a}class te extends J{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const se={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};class ne extends F{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(se)}async _handle(e,s){const n=s.fetchAndCachePut(e).catch((()=>{}));s.waitUntil(n);let a,r=await s.cacheMatch(e);if(r);else try{r=await n}catch(i){i instanceof Error&&(a=i)}if(!r)throw new t("no-response",{url:e.url,error:a});return r}}var ae;self.addEventListener("activate",(()=>self.clients.claim())),self.skipWaiting(),function(e){Q().precache(e)}([{"revision":null,"url":"assets/bootstrap-C-35D-R3.js"},{"revision":null,"url":"assets/web-vitals-BDnzJRlM.js"},{"revision":"a10007f8fcd066d57bf6bdb2037a3427","url":"bundle.css"},{"revision":"7eab733d763f3ead726419a3acecb459","url":"bundle.js"},{"revision":"66662e88d75fa97b4d3fa728e7328eb2","url":"index.html"},{"revision":"4cffef09f5722d1acd184ca1405c0ce0","url":"registerSW.js"},{"revision":"824be84401dd6220188834003edcfe29","url":"manifest.webmanifest"}]),function(e){const t=Q();ee(new te(t,e))}(ae),ee((({url:e})=>"https://fonts.googleapis.com"===e.origin),new ne({cacheName:"google-fonts-stylesheets",plugins:[new n({statuses:[0,200]})]})),ee((({request:{destination:e}})=>"script"===e),new ne({cacheName:"javascript-files",plugins:[new n({statuses:[0,200]}),new P({purgeOnQuotaError:!0,maxEntries:1e3,maxAgeSeconds:2592e3})]})),ee((({url:e})=>"https://fonts.gstatic.com"===e.origin),new ne({cacheName:"google-fonts-webfonts",plugins:[new n({statuses:[0,200]})]}));const re=new RegExp("/[^/?]+\\.[^/]+$");var ie;ee((({request:e,url:t})=>"navigate"===e.mode&&(!t.pathname.startsWith("/_")&&!t.pathname.match(re))),(ie="https://yiisoft.github.io/yii-dev-panel/index.html",Q().createHandlerBoundToURL(ie))),ee((({url:e})=>e.pathname.endsWith(".ico")||e.pathname.endsWith(".svg")||e.pathname.endsWith(".png")||e.pathname.endsWith(".jpeg")||e.pathname.endsWith(".jpg")||e.pathname.endsWith(".webp")),new ne({cacheName:"images",plugins:[new P({purgeOnQuotaError:!0,maxEntries:1e3})]}));const ce=/\/debug|gii|inspect\//i;self.addEventListener("fetch",(e=>{const t=e.request;"navigate"!==t.mode&&(t.url.match(re)||t.url.match(ce)||e.respondWith(fetch(e.request).then((s=>(function(e,t,s){const n=[{type:"FETCH",payload:{headers:Object.fromEntries(s.headers),url:t.url,method:t.method,status:t.status}}];n.map((t=>{self.clients.get(e).then((e=>{e.postMessage(t)}))}))}(e.clientId,t,s),s))).catch((e=>{throw console.log("sw fetch error",e),e}))))}));