@chillicream/nitro-embedded 20.0.0 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset-manifest.json +35 -35
- package/index.html +1 -1
- package/package.json +1 -1
- package/service-worker.js +1 -1
- package/static/css/{styles.3e5f6824.css → styles.15b5693c.css} +1 -1
- package/static/js/110.e9e92b52.js +2 -0
- package/static/js/177.dbf43818.chunk.js +2 -0
- package/static/js/{762.76d2e08a.chunk.js.LICENSE.txt → 177.dbf43818.chunk.js.LICENSE.txt} +2 -0
- package/static/js/195.4cc6e1d0.chunk.js +1 -0
- package/static/js/224.1a2dabe7.chunk.js +1 -0
- package/static/js/264.e9e92b52.js +1 -0
- package/static/js/522.2aaf5f49.chunk.js +1 -0
- package/static/js/81.3a5e0fef.chunk.js +1 -0
- package/static/js/86.e8257075.chunk.js +1 -0
- package/static/js/887.e9e92b52.js +2 -0
- package/static/js/{459.bb82ca7b.js.LICENSE.txt → 887.e9e92b52.js.LICENSE.txt} +1 -1
- package/static/js/907.e9e92b52.js +1 -0
- package/static/js/927.e9e92b52.js +1 -0
- package/static/js/936.e9e92b52.js +1 -0
- package/static/js/938.a3f01930.chunk.js +1 -0
- package/static/js/940.e9e92b52.js +1 -0
- package/static/js/996.99877939.chunk.js +1 -0
- package/static/js/editor.e9e92b52.js +1 -0
- package/static/js/graphql-engine.b8b03270.chunk.js +1 -0
- package/static/js/graphql-indexer.9faee0a8.chunk.js +1 -0
- package/static/js/graphql.worker.e9e92b52.js +2 -0
- package/static/js/json.e9e92b52.js +2 -0
- package/static/js/main.e9e92b52.js +2 -0
- package/static/js/polyfills.e9e92b52.js +1 -0
- package/static/js/session.2396e06c.chunk.js +1 -0
- package/static/js/yaml.worker.e9e92b52.js +1 -0
- package/static/js/110.bb82ca7b.js +0 -2
- package/static/js/195.6d82bb33.chunk.js +0 -1
- package/static/js/264.bb82ca7b.js +0 -1
- package/static/js/435.bb82ca7b.js +0 -1
- package/static/js/459.bb82ca7b.js +0 -102
- package/static/js/522.0da62492.chunk.js +0 -1
- package/static/js/692.94345d72.chunk.js +0 -1
- package/static/js/762.76d2e08a.chunk.js +0 -111
- package/static/js/785.6dfcf288.chunk.js +0 -1
- package/static/js/81.7ef63da7.chunk.js +0 -2
- package/static/js/86.a88d32a1.chunk.js +0 -1
- package/static/js/927.bb82ca7b.js +0 -1
- package/static/js/936.bb82ca7b.js +0 -1
- package/static/js/99.bb82ca7b.js +0 -1
- package/static/js/996.ed393652.chunk.js +0 -1
- package/static/js/editor.bb82ca7b.js +0 -1
- package/static/js/graphql-engine.781c9293.chunk.js +0 -1
- package/static/js/graphql-indexer.b0f0f3b9.chunk.js +0 -1
- package/static/js/graphql.worker.bb82ca7b.js +0 -2
- package/static/js/json.bb82ca7b.js +0 -2
- package/static/js/json.bb82ca7b.js.LICENSE.txt +0 -6
- package/static/js/main.bb82ca7b.js +0 -2
- package/static/js/polyfills.bb82ca7b.js +0 -1
- package/static/js/session.1b18a1e8.chunk.js +0 -1
- package/static/js/yaml.worker.bb82ca7b.js +0 -22
- /package/static/js/{110.bb82ca7b.js.LICENSE.txt → 110.e9e92b52.js.LICENSE.txt} +0 -0
- /package/static/js/{graphql.worker.bb82ca7b.js.LICENSE.txt → graphql.worker.e9e92b52.js.LICENSE.txt} +0 -0
- /package/static/js/{81.7ef63da7.chunk.js.LICENSE.txt → json.e9e92b52.js.LICENSE.txt} +0 -0
- /package/static/js/{main.bb82ca7b.js.LICENSE.txt → main.e9e92b52.js.LICENSE.txt} +0 -0
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 762.76d2e08a.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunknitro=self.webpackChunknitro||[]).push([[762],{8395:(e,t,n)=>{e.exports={graphlib:n(56497),layout:n(74809),debug:n(70692),util:{time:n(65795).time,notime:n(65795).notime},version:n(8563)}},37795:(e,t,n)=>{"use strict";let r=n(50476),o=n(65795).uniqueId;e.exports={run:function(e){("greedy"===e.graph().acyclicer?r(e,function(e){return t=>e.edge(t).weight}(e)):function(e){let t=[],n={},r={};function o(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach((e=>{Object.hasOwn(n,e.w)?t.push(e):o(e.w)})),delete n[a])}return e.nodes().forEach(o),t}(e)).forEach((t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,o("rev"))}))},undo:function(e){e.edges().forEach((t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},49298:(e,t,n)=>{let r=n(65795);function o(e,t,n,o,a,i){let s={width:0,height:0,rank:i,borderType:t},l=a[t][i-1],c=r.addDummyNode(e,"border",s,n);a[t][i]=c,e.setParent(c,o),l&&e.setEdge(l,c,{weight:1})}e.exports=function(e){e.children().forEach((function t(n){let r=e.children(n),a=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,r=a.maxRank+1;t<r;++t)o(e,"borderLeft","_bl",n,a,t),o(e,"borderRight","_br",n,a,t)}}))}},6655:e=>{"use strict";function t(e){e.nodes().forEach((t=>n(e.node(t)))),e.edges().forEach((t=>n(e.edge(t))))}function n(e){let t=e.width;e.width=e.height,e.height=t}function r(e){e.y=-e.y}function o(e){let t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){let n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||t(e)},undo:function(e){let n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){e.nodes().forEach((t=>r(e.node(t)))),e.edges().forEach((t=>{let n=e.edge(t);n.points.forEach(r),Object.hasOwn(n,"y")&&r(n)}))}(e);"lr"!==n&&"rl"!==n||(!function(e){e.nodes().forEach((t=>o(e.node(t)))),e.edges().forEach((t=>{let n=e.edge(t);n.points.forEach(o),Object.hasOwn(n,"x")&&o(n)}))}(e),t(e))}}},71442:e=>{function t(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function n(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,n=e._prev;if(n!==e)return t(n),n}enqueue(e){let n=this._sentinel;e._prev&&e._next&&t(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,n)),r=r._prev;return"["+e.join(", ")+"]"}}},70692:(e,t,n)=>{let r=n(65795),o=n(56497).Graph;e.exports={debugOrdering:function(e){let t=r.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach((t=>{n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),e.edges().forEach((e=>n.setEdge(e.v,e.w,{},e.name))),t.forEach(((e,t)=>{let r="layer"+t;n.setNode(r,{rank:"same"}),e.reduce(((e,t)=>(n.setEdge(e,t,{style:"invis"}),t)))})),n}}},50476:(e,t,n)=>{let r=n(56497).Graph,o=n(71442);e.exports=function(e,t){if(e.nodeCount()<=1)return[];let n=function(e,t){let n=new r,a=0,i=0;e.nodes().forEach((e=>{n.setNode(e,{v:e,in:0,out:0})})),e.edges().forEach((e=>{let r=n.edge(e.v,e.w)||0,o=t(e),s=r+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)}));let l=function(e){const t=[];for(let n=0;n<e;n++)t.push(n);return t}(i+a+3).map((()=>new o)),c=a+1;return n.nodes().forEach((e=>{s(l,c,n.node(e))})),{graph:n,buckets:l,zeroIdx:c}}(e,t||a);return function(e,t,n){let r,o=[],a=t[t.length-1],s=t[0];for(;e.nodeCount();){for(;r=s.dequeue();)i(e,t,n,r);for(;r=a.dequeue();)i(e,t,n,r);if(e.nodeCount())for(let a=t.length-2;a>0;--a)if(r=t[a].dequeue(),r){o=o.concat(i(e,t,n,r,!0));break}}return o}(n.graph,n.buckets,n.zeroIdx).flatMap((t=>e.outEdges(t.v,t.w)))};let a=()=>1;function i(e,t,n,r,o){let a=o?[]:void 0;return e.inEdges(r.v).forEach((r=>{let i=e.edge(r),l=e.node(r.v);o&&a.push({v:r.v,w:r.w}),l.out-=i,s(t,n,l)})),e.outEdges(r.v).forEach((r=>{let o=e.edge(r),a=r.w,i=e.node(a);i.in-=o,s(t,n,i)})),e.removeNode(r.v),a}function s(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},74809:(e,t,n)=>{"use strict";let r=n(37795),o=n(6840),a=n(56930),i=n(65795).normalizeRanks,s=n(59069),l=n(65795).removeEmptyRanks,c=n(86960),u=n(49298),d=n(6655),p=n(61096),f=n(71383),h=n(65795),m=n(56497).Graph;e.exports=function(e,t){let n=t&&t.debugTiming?h.time:h.notime;n("layout",(()=>{let M=n(" buildLayoutGraph",(()=>function(e){let t=new m({multigraph:!0,compound:!0}),n=k(e.graph());return t.setGraph(Object.assign({},v,S(n,g),h.pick(n,y))),e.nodes().forEach((n=>{const r=S(k(e.node(n)),b);Object.keys(w).forEach((e=>{void 0===r[e]&&(r[e]=w[e])})),t.setNode(n,r),t.setParent(n,e.parent(n))})),e.edges().forEach((n=>{let r=k(e.edge(n));t.setEdge(n,Object.assign({},C,S(r,x),h.pick(r,A)))})),t}(e)));n(" runLayout",(()=>function(e,t,n){t(" makeSpaceForEdgeLabels",(()=>function(e){let t=e.graph();t.ranksep/=2,e.edges().forEach((n=>{let r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e))),t(" removeSelfEdges",(()=>function(e){e.edges().forEach((t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e))),t(" acyclic",(()=>r.run(e))),t(" nestingGraph.run",(()=>c.run(e))),t(" rank",(()=>a(h.asNonCompoundGraph(e)))),t(" injectEdgeLabelProxies",(()=>function(e){e.edges().forEach((t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};h.addDummyNode(e,"edge-proxy",r,"_ep")}}))}(e))),t(" removeEmptyRanks",(()=>l(e))),t(" nestingGraph.cleanup",(()=>c.cleanup(e))),t(" normalizeRanks",(()=>i(e))),t(" assignRankMinMax",(()=>function(e){let t=0;e.nodes().forEach((n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))})),e.graph().maxRank=t}(e))),t(" removeEdgeLabelProxies",(()=>function(e){e.nodes().forEach((t=>{let n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e))),t(" normalize.run",(()=>o.run(e))),t(" parentDummyChains",(()=>s(e))),t(" addBorderSegments",(()=>u(e))),t(" order",(()=>p(e,n))),t(" insertSelfEdges",(()=>function(e){var t=h.buildLayerMatrix(e);t.forEach((t=>{var n=0;t.forEach(((t,r)=>{var o=e.node(t);o.order=r+n,(o.selfEdges||[]).forEach((t=>{h.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:r+ ++n,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e))),t(" adjustCoordinateSystem",(()=>d.adjust(e))),t(" position",(()=>f(e))),t(" positionSelfEdges",(()=>function(e){e.nodes().forEach((t=>{var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,a=r.y,i=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*i/3,y:a-s},{x:o+5*i/6,y:a-s},{x:o+i,y:a},{x:o+5*i/6,y:a+s},{x:o+2*i/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(e))),t(" removeBorderNodes",(()=>function(e){e.nodes().forEach((t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),i=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(i.x-a.x),n.height=Math.abs(o.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}})),e.nodes().forEach((t=>{"border"===e.node(t).dummy&&e.removeNode(t)}))}(e))),t(" normalize.undo",(()=>o.undo(e))),t(" fixupEdgeLabelCoords",(()=>function(e){e.edges().forEach((t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e))),t(" undoCoordinateSystem",(()=>d.undo(e))),t(" translateGraph",(()=>function(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,a=e.graph(),i=a.marginx||0,s=a.marginy||0;function l(e){let a=e.x,i=e.y,s=e.width,l=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,i-l/2),o=Math.max(o,i+l/2)}e.nodes().forEach((t=>l(e.node(t)))),e.edges().forEach((t=>{let n=e.edge(t);Object.hasOwn(n,"x")&&l(n)})),t-=i,r-=s,e.nodes().forEach((n=>{let o=e.node(n);o.x-=t,o.y-=r})),e.edges().forEach((n=>{let o=e.edge(n);o.points.forEach((e=>{e.x-=t,e.y-=r})),Object.hasOwn(o,"x")&&(o.x-=t),Object.hasOwn(o,"y")&&(o.y-=r)})),a.width=n-t+i,a.height=o-r+s}(e))),t(" assignNodeIntersects",(()=>function(e){e.edges().forEach((t=>{let n,r,o=e.edge(t),a=e.node(t.v),i=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=i,r=a),o.points.unshift(h.intersectRect(a,n)),o.points.push(h.intersectRect(i,r))}))}(e))),t(" reversePoints",(()=>function(e){e.edges().forEach((t=>{let n=e.edge(t);n.reversed&&n.points.reverse()}))}(e))),t(" acyclic.undo",(()=>r.undo(e)))}(M,n,t))),n(" updateInputGraph",(()=>function(e,t){e.nodes().forEach((n=>{let r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,r.rank=o.rank,t.children(n).length&&(r.width=o.width,r.height=o.height))})),e.edges().forEach((n=>{let r=e.edge(n),o=t.edge(n);r.points=o.points,Object.hasOwn(o,"x")&&(r.x=o.x,r.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,M)))}))};let g=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},y=["acyclicer","ranker","rankdir","align"],b=["width","height"],w={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],C={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},A=["labelpos"];function S(e,t){return h.mapValues(h.pick(e,t),Number)}function k(e){var t={};return e&&Object.entries(e).forEach((e=>{let[n,r]=e;"string"===typeof n&&(n=n.toLowerCase()),t[n]=r})),t}},86960:(e,t,n)=>{let r=n(65795);function o(e,t,n,a,i,s,l){let c=e.children(l);if(!c.length)return void(l!==t&&e.setEdge(t,l,{weight:0,minlen:n}));let u=r.addBorderNode(e,"_bt"),d=r.addBorderNode(e,"_bb"),p=e.node(l);e.setParent(u,l),p.borderTop=u,e.setParent(d,l),p.borderBottom=d,c.forEach((r=>{o(e,t,n,a,i,s,r);let c=e.node(r),p=c.borderTop?c.borderTop:r,f=c.borderBottom?c.borderBottom:r,h=c.borderTop?a:2*a,m=p!==f?1:i-s[l]+1;e.setEdge(u,p,{weight:h,minlen:m,nestingEdge:!0}),e.setEdge(f,d,{weight:h,minlen:m,nestingEdge:!0})})),e.parent(l)||e.setEdge(t,u,{weight:0,minlen:i+s[l]})}e.exports={run:function(e){let t=r.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(r,o){var a=e.children(r);a&&a.length&&a.forEach((e=>n(e,o+1))),t[r]=o}return e.children().forEach((e=>n(e,1))),t}(e),a=Object.values(n),i=r.applyWithChunking(Math.max,a)-1,s=2*i+1;e.graph().nestingRoot=t,e.edges().forEach((t=>e.edge(t).minlen*=s));let l=function(e){return e.edges().reduce(((t,n)=>t+e.edge(n).weight),0)}(e)+1;e.children().forEach((r=>o(e,t,s,l,i,n,r))),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach((t=>{e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},6840:(e,t,n)=>{"use strict";let r=n(65795);e.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach((t=>function(e,t){let n,o,a,i=t.v,s=e.node(i).rank,l=t.w,c=e.node(l).rank,u=t.name,d=e.edge(t),p=d.labelRank;if(c===s+1)return;for(e.removeEdge(t),a=0,++s;s<c;++a,++s)d.points=[],o={width:0,height:0,edgeLabel:d,edgeObj:t,rank:s},n=r.addDummyNode(e,"edge",o,"_d"),s===p&&(o.width=d.width,o.height=d.height,o.dummy="edge-label",o.labelpos=d.labelpos),e.setEdge(i,n,{weight:d.weight},u),0===a&&e.graph().dummyChains.push(n),i=n;e.setEdge(i,l,{weight:d.weight},u)}(e,t)))},undo:function(e){e.graph().dummyChains.forEach((t=>{let n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)}))}}},77203:e=>{e.exports=function(e,t,n){let r,o={};n.forEach((n=>{let a,i,s=e.parent(n);for(;s;){if(a=e.parent(s),a?(i=o[a],o[a]=s):(i=r,r=s),i&&i!==s)return void t.setEdge(i,s);s=a}}))}},5391:e=>{e.exports=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce(((t,n)=>{let r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}}))}},57041:(e,t,n)=>{let r=n(56497).Graph,o=n(65795);e.exports=function(e,t,n){let a=function(e){var t;for(;e.hasNode(t=o.uniqueId("_root")););return t}(e),i=new r({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((t=>e.node(t)));return e.nodes().forEach((r=>{let o=e.node(r),s=e.parent(r);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(r),i.setParent(r,s||a),e[n](r).forEach((t=>{let n=t.v===r?t.w:t.v,o=i.edge(n,r),a=void 0!==o?o.weight:0;i.setEdge(n,r,{weight:e.edge(t).weight+a})})),Object.hasOwn(o,"minRank")&&i.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))})),i}},97090:(e,t,n)=>{"use strict";let r=n(65795).zipObject;function o(e,t,n){let o=r(n,n.map(((e,t)=>t))),a=t.flatMap((t=>e.outEdges(t).map((t=>({pos:o[t.w],weight:e.edge(t).weight}))).sort(((e,t)=>e.pos-t.pos)))),i=1;for(;i<n.length;)i<<=1;let s=2*i-1;i-=1;let l=new Array(s).fill(0),c=0;return a.forEach((e=>{let t=e.pos+i;l[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=l[t+1]),t=t-1>>1,l[t]+=e.weight;c+=e.weight*n})),c}e.exports=function(e,t){let n=0;for(let r=1;r<t.length;++r)n+=o(e,t[r-1],t[r]);return n}},61096:(e,t,n)=>{"use strict";let r=n(35357),o=n(97090),a=n(43377),i=n(57041),s=n(77203),l=n(56497).Graph,c=n(65795);function u(e,t,n){return t.map((function(t){return i(e,t,n)}))}function d(e,t){let n=new l;e.forEach((function(e){let r=e.graph().root,o=a(e,r,n,t);o.vs.forEach(((t,n)=>e.node(t).order=n)),s(e,n,o.vs)}))}function p(e,t){Object.values(t).forEach((t=>t.forEach(((t,n)=>e.node(t).order=n))))}e.exports=function e(t,n){if(n&&"function"===typeof n.customOrder)return void n.customOrder(t,e);let a=c.maxRank(t),i=u(t,c.range(1,a+1),"inEdges"),s=u(t,c.range(a-1,-1,-1),"outEdges"),l=r(t);if(p(t,l),n&&n.disableOptimalOrderHeuristic)return;let f,h=Number.POSITIVE_INFINITY;for(let r=0,u=0;u<4;++r,++u){d(r%2?i:s,r%4>=2),l=c.buildLayerMatrix(t);let e=o(t,l);e<h&&(u=0,f=Object.assign({},l),h=e)}p(t,f)}},35357:(e,t,n)=>{"use strict";let r=n(65795);e.exports=function(e){let t={},n=e.nodes().filter((t=>!e.children(t).length)),o=n.map((t=>e.node(t).rank)),a=r.applyWithChunking(Math.max,o),i=r.range(a+1).map((()=>[]));return n.sort(((t,n)=>e.node(t).rank-e.node(n).rank)).forEach((function n(r){if(t[r])return;t[r]=!0;let o=e.node(r);i[o.rank].push(r),e.successors(r).forEach(n)})),i}},77666:(e,t,n)=>{"use strict";let r=n(65795);e.exports=function(e,t){let n={};return e.forEach(((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(r.barycenter=e.barycenter,r.weight=e.weight)})),t.edges().forEach((e=>{let t=n[e.v],r=n[e.w];void 0!==t&&void 0!==r&&(r.indegree++,t.out.push(n[e.w]))})),function(e){let t=[];function n(e){return t=>{t.merged||(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function o(t){return n=>{n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(o(r))}return t.filter((e=>!e.merged)).map((e=>r.pick(e,["vs","i","barycenter","weight"])))}(Object.values(n).filter((e=>!e.indegree)))}},43377:(e,t,n)=>{let r=n(5391),o=n(77666),a=n(51410);e.exports=function e(t,n,i,s){let l=t.children(n),c=t.node(n),u=c?c.borderLeft:void 0,d=c?c.borderRight:void 0,p={};u&&(l=l.filter((e=>e!==u&&e!==d)));let f=r(t,l);f.forEach((n=>{if(t.children(n.v).length){let a=e(t,n.v,i,s);p[n.v]=a,Object.hasOwn(a,"barycenter")&&(o=a,void 0!==(r=n).barycenter?(r.barycenter=(r.barycenter*r.weight+o.barycenter*o.weight)/(r.weight+o.weight),r.weight+=o.weight):(r.barycenter=o.barycenter,r.weight=o.weight))}var r,o}));let h=o(f,i);!function(e,t){e.forEach((e=>{e.vs=e.vs.flatMap((e=>t[e]?t[e].vs:e))}))}(h,p);let m=a(h,s);if(u&&(m.vs=[u,m.vs,d].flat(!0),t.predecessors(u).length)){let e=t.node(t.predecessors(u)[0]),n=t.node(t.predecessors(d)[0]);Object.hasOwn(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+e.order+n.order)/(m.weight+2),m.weight+=2}return m}},51410:(e,t,n)=>{let r=n(65795);function o(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}e.exports=function(e,t){let n=r.partition(e,(e=>Object.hasOwn(e,"barycenter"))),a=n.lhs,i=n.rhs.sort(((e,t)=>t.i-e.i)),s=[],l=0,c=0,u=0;a.sort((d=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:d?t.i-e.i:e.i-t.i)),u=o(s,i,u),a.forEach((e=>{u+=e.vs.length,s.push(e.vs),l+=e.barycenter*e.weight,c+=e.weight,u=o(s,i,u)}));var d;let p={vs:s.flat(!0)};c&&(p.barycenter=l/c,p.weight=c);return p}},59069:e=>{e.exports=function(e){let t=function(e){let t={},n=0;function r(o){let a=n;e.children(o).forEach(r),t[o]={low:a,lim:n++}}return e.children().forEach(r),t}(e);e.graph().dummyChains.forEach((n=>{let r=e.node(n),o=r.edgeObj,a=function(e,t,n,r){let o,a,i=[],s=[],l=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),i.push(o)}while(o&&(t[o].low>l||c>t[o].lim));a=o,o=r;for(;(o=e.parent(o))!==a;)s.push(o);return{path:i.concat(s.reverse()),lca:a}}(e,t,o.v,o.w),i=a.path,s=a.lca,l=0,c=i[l],u=!0;for(;n!==o.w;){if(r=e.node(n),u){for(;(c=i[l])!==s&&e.node(c).maxRank<r.rank;)l++;c===s&&(u=!1)}if(!u){for(;l<i.length-1&&e.node(c=i[l+1]).minRank<=r.rank;)l++;c=i[l]}e.setParent(n,c),n=e.successors(n)[0]}}))}},52760:(e,t,n)=>{"use strict";let r=n(56497).Graph,o=n(65795);function a(e,t){let n={};return t.length&&t.reduce((function(t,r){let o=0,a=0,i=t.length,l=r[r.length-1];return r.forEach(((t,c)=>{let u=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find((t=>e.node(t).dummy))}(e,t),d=u?e.node(u).order:i;(u||t===l)&&(r.slice(a,c+1).forEach((t=>{e.predecessors(t).forEach((r=>{let a=e.node(r),i=a.order;!(i<o||d<i)||a.dummy&&e.node(t).dummy||s(n,r,t)}))})),a=c+1,o=d)})),r})),n}function i(e,t){let n={};function r(t,r,a,i,l){let c;o.range(r,a).forEach((r=>{c=t[r],e.node(c).dummy&&e.predecessors(c).forEach((t=>{let r=e.node(t);r.dummy&&(r.order<i||r.order>l)&&s(n,t,c)}))}))}return t.length&&t.reduce((function(t,n){let o,a=-1,i=0;return n.forEach(((s,l)=>{if("border"===e.node(s).dummy){let t=e.predecessors(s);t.length&&(o=e.node(t[0]).order,r(n,i,l,a,o),i=l,a=o)}r(n,i,n.length,o,t.length)})),n})),n}function s(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function l(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function c(e,t,n,r){let o={},a={},i={};return t.forEach((e=>{e.forEach(((e,t)=>{o[e]=e,a[e]=e,i[e]=t}))})),t.forEach((e=>{let t=-1;e.forEach((e=>{let s=r(e);if(s.length){s=s.sort(((e,t)=>i[e]-i[t]));let r=(s.length-1)/2;for(let c=Math.floor(r),u=Math.ceil(r);c<=u;++c){let r=s[c];a[e]===e&&t<i[r]&&!l(n,e,r)&&(a[r]=e,a[e]=o[e]=o[r],t=i[r])}}}))})),{root:o,align:a}}function u(e,t,n,o,a){let i={},s=function(e,t,n,o){let a=new r,i=e.graph(),s=function(e,t,n){return(r,o,a)=>{let i,s=r.node(o),l=r.node(a),c=0;if(c+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":i=-s.width/2;break;case"r":i=s.width/2}if(i&&(c+=n?i:-i),i=0,c+=(s.dummy?t:e)/2,c+=(l.dummy?t:e)/2,c+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":i=l.width/2;break;case"r":i=-l.width/2}return i&&(c+=n?i:-i),i=0,c}}(i.nodesep,i.edgesep,o);return t.forEach((t=>{let r;t.forEach((t=>{let o=n[t];if(a.setNode(o),r){var i=n[r],l=a.edge(i,o);a.setEdge(i,o,Math.max(s(e,t,r),l||0))}r=t}))})),a}(e,t,n,a),l=a?"borderLeft":"borderRight";function c(e,t){let n=s.nodes(),r=n.pop(),o={};for(;r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c((function(e){i[e]=s.inEdges(e).reduce(((e,t)=>Math.max(e,i[t.v]+s.edge(t))),0)}),s.predecessors.bind(s)),c((function(t){let n=s.outEdges(t).reduce(((e,t)=>Math.min(e,i[t.w]-s.edge(t))),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==l&&(i[t]=Math.max(i[t],n))}),s.successors.bind(s)),Object.keys(o).forEach((e=>i[e]=i[n[e]])),i}function d(e,t){return Object.values(t).reduce(((t,n)=>{let r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;Object.entries(n).forEach((t=>{let[n,a]=t,i=function(e,t){return e.node(t).width}(e,n)/2;r=Math.max(a+i,r),o=Math.min(a-i,o)}));const a=r-o;return a<t[0]&&(t=[a,n]),t}),[Number.POSITIVE_INFINITY,null])[1]}function p(e,t){let n=Object.values(t),r=o.applyWithChunking(Math.min,n),a=o.applyWithChunking(Math.max,n);["u","d"].forEach((n=>{["l","r"].forEach((i=>{let s=n+i,l=e[s];if(l===t)return;let c=Object.values(l),u=r-o.applyWithChunking(Math.min,c);"l"!==i&&(u=a-o.applyWithChunking(Math.max,c)),u&&(e[s]=o.mapValues(l,(e=>e+u)))}))}))}function f(e,t){return o.mapValues(e.ul,((n,r)=>{if(t)return e[t.toLowerCase()][r];{let t=Object.values(e).map((e=>e[r])).sort(((e,t)=>e-t));return(t[1]+t[2])/2}}))}e.exports={positionX:function(e){let t,n=o.buildLayerMatrix(e),r=Object.assign(a(e,n),i(e,n)),s={};["u","d"].forEach((a=>{t="u"===a?n:Object.values(n).reverse(),["l","r"].forEach((n=>{"r"===n&&(t=t.map((e=>Object.values(e).reverse())));let i=("u"===a?e.predecessors:e.successors).bind(e),l=c(e,t,r,i),d=u(e,t,l.root,l.align,"r"===n);"r"===n&&(d=o.mapValues(d,(e=>-e))),s[a+n]=d}))}));let l=d(e,s);return p(s,l),f(s,e.graph().align)},findType1Conflicts:a,findType2Conflicts:i,addConflict:s,hasConflict:l,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:d,balance:f}},71383:(e,t,n)=>{"use strict";let r=n(65795),o=n(52760).positionX;e.exports=function(e){(function(e){let t=r.buildLayerMatrix(e),n=e.graph().ranksep,o=0;t.forEach((t=>{const r=t.reduce(((t,n)=>{const r=e.node(n).height;return t>r?t:r}),0);t.forEach((t=>e.node(t).y=o+r/2)),o+=r+n}))})(e=r.asNonCompoundGraph(e)),Object.entries(o(e)).forEach((t=>{let[n,r]=t;return e.node(n).x=r}))}},29690:(e,t,n)=>{"use strict";var r=n(56497).Graph,o=n(20108).slack;function a(e,t){return e.nodes().forEach((function n(r){t.nodeEdges(r).forEach((a=>{var i=a.v,s=r===i?a.w:i;e.hasNode(s)||o(t,a)||(e.setNode(s,{}),e.setEdge(r,s,{}),n(s))}))})),e.nodeCount()}function i(e,t){return t.edges().reduce(((n,r)=>{let a=Number.POSITIVE_INFINITY;return e.hasNode(r.v)!==e.hasNode(r.w)&&(a=o(t,r)),a<n[0]?[a,r]:n}),[Number.POSITIVE_INFINITY,null])[1]}function s(e,t,n){e.nodes().forEach((e=>t.node(e).rank+=n))}e.exports=function(e){var t,n,l=new r({directed:!1}),c=e.nodes()[0],u=e.nodeCount();l.setNode(c,{});for(;a(l,e)<u;)t=i(l,e),n=l.hasNode(t.v)?o(e,t):-o(e,t),s(l,e,n);return l}},56930:(e,t,n)=>{"use strict";var r=n(20108).longestPath,o=n(29690),a=n(55495);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:s(e);break;case"tight-tree":!function(e){r(e),o(e)}(e);break;case"longest-path":i(e)}};var i=r;function s(e){a(e)}},55495:(e,t,n)=>{"use strict";var r=n(29690),o=n(20108).slack,a=n(20108).longestPath,i=n(56497).alg.preorder,s=n(56497).alg.postorder,l=n(65795).simplify;function c(e){e=l(e),a(e);var t,n=r(e);for(p(n),u(n,e);t=h(n);)g(n,e,t,m(n,e,t))}function u(e,t){var n=s(e,e.nodes());(n=n.slice(0,n.length-1)).forEach((n=>function(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=d(e,t,n)}(e,t,n)))}function d(e,t,n){var r=e.node(n).parent,o=!0,a=t.edge(n,r),i=0;return a||(o=!1,a=t.edge(r,n)),i=a.weight,t.nodeEdges(n).forEach((a=>{var s,l,c=a.v===n,u=c?a.w:a.v;if(u!==r){var d=c===o,p=t.edge(a).weight;if(i+=d?p:-p,s=n,l=u,e.hasEdge(s,l)){var f=e.edge(n,u).cutvalue;i+=d?-f:f}}})),i}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),f(e,{},1,t)}function f(e,t,n,r,o){var a=n,i=e.node(r);return t[r]=!0,e.neighbors(r).forEach((o=>{Object.hasOwn(t,o)||(n=f(e,t,n,o,r))})),i.low=a,i.lim=n++,o?i.parent=o:delete i.parent,n}function h(e){return e.edges().find((t=>e.edge(t).cutvalue<0))}function m(e,t,n){var r=n.v,a=n.w;t.hasEdge(r,a)||(r=n.w,a=n.v);var i=e.node(r),s=e.node(a),l=i,c=!1;i.lim>s.lim&&(l=s,c=!0);var u=t.edges().filter((t=>c===v(e,e.node(t.v),l)&&c!==v(e,e.node(t.w),l)));return u.reduce(((e,n)=>o(t,n)<o(t,e)?n:e))}function g(e,t,n,r){var o=n.v,a=n.w;e.removeEdge(o,a),e.setEdge(r.v,r.w,{}),p(e),u(e,t),function(e,t){var n=e.nodes().find((e=>!t.node(e).parent)),r=i(e,n);(r=r.slice(1)).forEach((n=>{var r=e.node(n).parent,o=t.edge(n,r),a=!1;o||(o=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?o.minlen:-o.minlen)}))}(e,t)}function v(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=p,c.initCutValues=u,c.calcCutValue=d,c.leaveEdge=h,c.enterEdge=m,c.exchangeEdges=g},20108:(e,t,n)=>{"use strict";const{applyWithChunking:r}=n(65795);e.exports={longestPath:function(e){var t={};e.sources().forEach((function n(o){var a=e.node(o);if(Object.hasOwn(t,o))return a.rank;t[o]=!0;let i=e.outEdges(o).map((t=>null==t?Number.POSITIVE_INFINITY:n(t.w)-e.edge(t).minlen));var s=r(Math.min,i);return s===Number.POSITIVE_INFINITY&&(s=0),a.rank=s}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},65795:(e,t,n)=>{"use strict";let r=n(56497).Graph;function o(e,t,n,r){let o;do{o=c(r)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}e.exports={addBorderNode:function(e,t,n,r){let a={width:0,height:0};arguments.length>=4&&(a.rank=n,a.order=r);return o(e,"border",a,t)},addDummyNode:o,applyWithChunking:i,asNonCompoundGraph:function(e){let t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach((n=>{e.children(n).length||t.setNode(n,e.node(n))})),e.edges().forEach((n=>{t.setEdge(n,e.edge(n))})),t},buildLayerMatrix:function(e){let t=u(s(e)+1).map((()=>[]));return e.nodes().forEach((n=>{let r=e.node(n),o=r.rank;void 0!==o&&(t[o][r.order]=n)})),t},intersectRect:function(e,t){let n,r,o=e.x,a=e.y,i=t.x-o,s=t.y-a,l=e.width/2,c=e.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*l>Math.abs(i)*c?(s<0&&(c=-c),n=c*i/s,r=c):(i<0&&(l=-l),n=l,r=l*s/i);return{x:o+n,y:a+r}},mapValues:function(e,t){let n=t;"string"===typeof t&&(n=e=>e[t]);return Object.entries(e).reduce(((e,t)=>{let[r,o]=t;return e[r]=n(o,r),e}),{})},maxRank:s,normalizeRanks:function(e){let t=e.nodes().map((t=>{let n=e.node(t).rank;return void 0===n?Number.MAX_VALUE:n})),n=i(Math.min,t);e.nodes().forEach((t=>{let r=e.node(t);Object.hasOwn(r,"rank")&&(r.rank-=n)}))},notime:function(e,t){return t()},partition:function(e,t){let n={lhs:[],rhs:[]};return e.forEach((e=>{t(e)?n.lhs.push(e):n.rhs.push(e)})),n},pick:function(e,t){const n={};for(const r of t)void 0!==e[r]&&(n[r]=e[r]);return n},predecessorWeights:function(e){let t=e.nodes().map((t=>{let n={};return e.inEdges(t).forEach((t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return d(e.nodes(),t)},range:u,removeEmptyRanks:function(e){let t=e.nodes().map((t=>e.node(t).rank)),n=i(Math.min,t),r=[];e.nodes().forEach((t=>{let o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)}));let o=0,a=e.graph().nodeRankFactor;Array.from(r).forEach(((t,n)=>{void 0===t&&n%a!==0?--o:void 0!==t&&o&&t.forEach((t=>e.node(t).rank+=o))}))},simplify:function(e){let t=(new r).setGraph(e.graph());return e.nodes().forEach((n=>t.setNode(n,e.node(n)))),e.edges().forEach((n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),t},successorWeights:function(e){let t=e.nodes().map((t=>{let n={};return e.outEdges(t).forEach((t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return d(e.nodes(),t)},time:function(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}},uniqueId:c,zipObject:d};const a=65535;function i(e,t){if(t.length>a){const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;const n=[];for(let r=0;r<e.length;r+=t){const o=e.slice(r,r+t);n.push(o)}return n}(t);return e.apply(null,n.map((t=>e.apply(null,t))))}return e.apply(null,t)}function s(e){const t=e.nodes().map((t=>{let n=e.node(t).rank;return void 0===n?Number.MIN_VALUE:n}));return i(Math.max,t)}let l=0;function c(e){var t=++l;return toString(e)+t}function u(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);const o=[];for(let a=e;r(a);a+=n)o.push(a);return o}function d(e,t){return e.reduce(((e,n,r)=>(e[n]=t[r],e)),{})}},8563:e=>{e.exports="1.1.4"},56497:(e,t,n)=>{var r=n(38441);e.exports={Graph:r.Graph,json:n(84555),alg:n(56800),version:r.version}},94986:e=>{e.exports=function(e){var t,n={},r=[];function o(r){Object.hasOwn(n,r)||(n[r]=!0,t.push(r),e.successors(r).forEach(o),e.predecessors(r).forEach(o))}return e.nodes().forEach((function(e){t=[],o(e),t.length&&r.push(t)})),r}},22259:e=>{function t(e,t,n,o){for(var a=[[e,!1]];a.length>0;){var i=a.pop();i[1]?o.push(i[0]):Object.hasOwn(n,i[0])||(n[i[0]]=!0,a.push([i[0],!0]),r(t(i[0]),(e=>a.push([e,!1]))))}}function n(e,t,n,o){for(var a=[e];a.length>0;){var i=a.pop();Object.hasOwn(n,i)||(n[i]=!0,o.push(i),r(t(i),(e=>a.push(e))))}}function r(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}e.exports=function(e,r,o){Array.isArray(r)||(r=[r]);var a=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),i="post"===o?t:n,s=[],l={};return r.forEach((t=>{if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(t,a,l,s)})),s}},57106:(e,t,n)=>{var r=n(45432);e.exports=function(e,t,n){return e.nodes().reduce((function(o,a){return o[a]=r(e,a,t,n),o}),{})}},45432:(e,t,n)=>{var r=n(71914);e.exports=function(e,t,n,a){return function(e,t,n,o){var a,i,s={},l=new r,c=function(e){var t=e.v!==a?e.v:e.w,r=s[t],o=n(e),c=i.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=a,l.decrease(t,c))};e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},l.add(e,n)}));for(;l.size()>0&&(a=l.removeMin(),(i=s[a]).distance!==Number.POSITIVE_INFINITY);)o(a).forEach(c);return s}(e,String(t),n||o,a||function(t){return e.outEdges(t)})};var o=()=>1},97529:(e,t,n)=>{var r=n(34102);e.exports=function(e){return r(e).filter((function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},64735:e=>{e.exports=function(e,n,r){return function(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,a=t(n);r[e][o]={distance:a,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var a=r[n];o.forEach((function(n){var r=a[e],o=t[n],i=a[n],s=r.distance+o.distance;s<i.distance&&(i.distance=s,i.predecessor=o.predecessor)}))}))})),r}(e,n||t,r||function(t){return e.outEdges(t)})};var t=()=>1},56800:(e,t,n)=>{e.exports={components:n(94986),dijkstra:n(45432),dijkstraAll:n(57106),findCycles:n(97529),floydWarshall:n(64735),isAcyclic:n(23891),postorder:n(1346),preorder:n(47673),prim:n(56558),tarjan:n(34102),topsort:n(45183)}},23891:(e,t,n)=>{var r=n(45183);e.exports=function(e){try{r(e)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},1346:(e,t,n)=>{var r=n(22259);e.exports=function(e,t){return r(e,t,"post")}},47673:(e,t,n)=>{var r=n(22259);e.exports=function(e,t){return r(e,t,"pre")}},56558:(e,t,n)=>{var r=n(39509),o=n(71914);e.exports=function(e,t){var n,a=new r,i={},s=new o;function l(e){var r=e.v===n?e.w:e.v,o=s.priority(r);if(void 0!==o){var a=t(e);a<o&&(i[r]=n,s.decrease(r,a))}}if(0===e.nodeCount())return a;e.nodes().forEach((function(e){s.add(e,Number.POSITIVE_INFINITY),a.setNode(e)})),s.decrease(e.nodes()[0],0);var c=!1;for(;s.size()>0;){if(n=s.removeMin(),Object.hasOwn(i,n))a.setEdge(n,i[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(l)}return a}},34102:e=>{e.exports=function(e){var t=0,n=[],r={},o=[];function a(i){var s=r[i]={onStack:!0,lowlink:t,index:t++};if(n.push(i),e.successors(i).forEach((function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))})),s.lowlink===s.index){var l,c=[];do{l=n.pop(),r[l].onStack=!1,c.push(l)}while(i!==l);o.push(c)}}return e.nodes().forEach((function(e){Object.hasOwn(r,e)||a(e)})),o}},45183:e=>{function t(e){var t={},r={},o=[];if(e.sinks().forEach((function a(i){if(Object.hasOwn(r,i))throw new n;Object.hasOwn(t,i)||(r[i]=!0,t[i]=!0,e.predecessors(i).forEach(a),delete r[i],o.push(i))})),Object.keys(t).length!==e.nodeCount())throw new n;return o}class n extends Error{constructor(){super(...arguments)}}e.exports=t,t.CycleException=n},71914:e=>{e.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map((function(e){return e.key}))}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,o=r.length;return n[e]=o,r.push({key:e,priority:t}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))}_decrease(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t}_swap(e,t){var n=this._arr,r=this._keyIndices,o=n[e],a=n[t];n[e]=a,n[t]=o,r[a.key]=e,r[o.key]=t}}},39509:e=>{"use strict";var t="\0";function n(e,t){e[t]?e[t]++:e[t]=1}function r(e,t){--e[t]||delete e[t]}function o(e,t,n,r){var o=""+t,a=""+n;if(!e&&o>a){var i=o;o=a,a=i}return o+"\x01"+a+"\x01"+(void 0===r?"\0":r)}function a(e,t){return o(e,t.v,t.w,t.name)}e.exports=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!==typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter((t=>0===Object.keys(e._in[t]).length))}sinks(){var e=this;return this.nodes().filter((t=>0===Object.keys(e._out[t]).length))}setNodes(e,t){var n=arguments,r=this;return e.forEach((function(e){n.length>1?r.setNode(e,t):r.setNode(e)})),this}setNode(e,n){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=t,this._children[e]={},this._children[t][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach((function(e){t.setParent(e)})),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===n)n=t;else{for(var r=n+="";void 0!==r;r=this.parent(r))if(r===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var n=this._parent[e];if(n!==t)return n}}children(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;if(this._isCompound){var n=this._children[e];if(n)return Object.keys(n)}else{if(e===t)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){const r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach((function(n){let[r,o]=n;e(r)&&t.setNode(r,o)})),Object.values(this._edgeObjs).forEach((function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var r={};function o(e){var a=n.parent(e);return void 0===a||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:o(a)}return this._isCompound&&t.nodes().forEach((e=>t.setParent(e,o(e)))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!==typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce((function(e,o){return r.length>1?n.setEdge(e,o,t):n.setEdge(e,o),o})),this}setEdge(){var e,t,r,a,i=!1,s=arguments[0];"object"===typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,r=s.name,2===arguments.length&&(a=arguments[1],i=!0)):(e=s,t=arguments[1],r=arguments[3],arguments.length>2&&(a=arguments[2],i=!0)),e=""+e,t=""+t,void 0!==r&&(r=""+r);var l=o(this._isDirected,e,t,r);if(Object.hasOwn(this._edgeLabels,l))return i&&(this._edgeLabels[l]=a),this;if(void 0!==r&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=i?a:this._defaultEdgeLabelFn(e,t,r);var c=function(e,t,n,r){var o=""+t,a=""+n;if(!e&&o>a){var i=o;o=a,a=i}var s={v:o,w:a};r&&(s.name=r);return s}(this._isDirected,e,t,r);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[l]=c,n(this._preds[t],e),n(this._sucs[e],t),this._in[t][l]=c,this._out[e][l]=c,this._edgeCount++,this}edge(e,t,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):o(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){const e=this.edge(...arguments);return"object"!==typeof e?{label:e}:e}hasEdge(e,t,n){var r=1===arguments.length?a(this._isDirected,arguments[0]):o(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){var i=1===arguments.length?a(this._isDirected,arguments[0]):o(this._isDirected,e,t,n),s=this._edgeObjs[i];return s&&(e=s.v,t=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],r(this._preds[t],e),r(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter((e=>e.v===t)):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter((e=>e.w===t)):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}}},38441:(e,t,n)=>{e.exports={Graph:n(39509),version:n(64905)}},84555:(e,t,n)=>{var r=n(39509);function o(e){return e.nodes().map((function(t){var n=e.node(t),r=e.parent(t),o={v:t};return void 0!==n&&(o.value=n),void 0!==r&&(o.parent=r),o}))}function a(e){return e.edges().map((function(t){var n=e.edge(t),r={v:t.v,w:t.w};return void 0!==t.name&&(r.name=t.name),void 0!==n&&(r.value=n),r}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:a(e)};void 0!==e.graph()&&(t.value=structuredClone(e.graph()));return t},read:function(e){var t=new r(e.options).setGraph(e.value);return e.nodes.forEach((function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),e.edges.forEach((function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},64905:e=>{e.exports="2.2.4"},16491:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(58168),o=n(98587),a=n(9950),i=n(72004),s=n(36547),l=n(70505),c=n(80237),u=n(7148),d=n(44414);const p=["className","component"];var f=n(44501),h=n(24436),m=n(67550);const g=(0,n(1763).A)("MuiBox",["root"]),v=(0,h.A)(),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:f="MuiBox-root",generateClassName:h}=e,m=(0,s.Ay)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.A);return a.forwardRef((function(e,a){const s=(0,u.A)(n),l=(0,c.A)(e),{className:g,component:v="div"}=l,y=(0,o.A)(l,p);return(0,d.jsx)(m,(0,r.A)({as:v,ref:a,className:(0,i.A)(g,h?h(f):f),theme:t&&s[t]||s},y))}))}({themeId:m.A,defaultTheme:v,defaultClassName:g.root,generateClassName:f.A.generate}),b=y},48089:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(58168),o=n(98587),a=n(9950),i=n(72004),s=n(88465),l=n(59254),c=n(48283),u=n(2235),d=n(1763),p=n(423);function f(e){return(0,p.Ay)("MuiCard",e)}(0,d.A)("MuiCard",["root"]);var h=n(44414);const m=["className","raised"],g=(0,l.Ay)(u.A,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),v=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiCard"}),{className:a,raised:l=!1}=n,u=(0,o.A)(n,m),d=(0,r.A)({},n,{raised:l}),p=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},f,t)})(d);return(0,h.jsx)(g,(0,r.A)({className:(0,i.A)(p.root,a),elevation:l?8:void 0,ref:t,ownerState:d},u))}))},38039:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(58168),o=n(98587),a=n(9950),i=n(72004),s=n(88465),l=n(48283),c=n(59254),u=n(1763),d=n(423);function p(e){return(0,d.Ay)("MuiCardActionArea",e)}const f=(0,u.A)("MuiCardActionArea",["root","focusVisible","focusHighlight"]);var h=n(24184),m=n(44414);const g=["children","className","focusVisibleClassName"],v=(0,c.Ay)(h.A,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${f.focusHighlight}`]:{opacity:(t.vars||t).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${f.focusVisible} .${f.focusHighlight}`]:{opacity:(t.vars||t).palette.action.focusOpacity}}})),y=(0,c.Ay)("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})((e=>{let{theme:t}=e;return{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:t.transitions.create("opacity",{duration:t.transitions.duration.short})}})),b=a.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiCardActionArea"}),{children:a,className:c,focusVisibleClassName:u}=n,d=(0,o.A)(n,g),f=n,h=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],focusHighlight:["focusHighlight"]},p,t)})(f);return(0,m.jsxs)(v,(0,r.A)({className:(0,i.A)(h.root,c),focusVisibleClassName:(0,i.A)(u,h.focusVisible),ref:t,ownerState:f},d,{children:[a,(0,m.jsx)(y,{className:h.focusHighlight,ownerState:f})]}))}))},50704:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(58168),o=n(98587),a=n(9950),i=n(72004),s=n(88465),l=n(59254),c=n(48283),u=n(1763),d=n(423);function p(e){return(0,d.Ay)("MuiCardContent",e)}(0,u.A)("MuiCardContent",["root"]);var f=n(44414);const h=["className","component"],m=(0,l.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),g=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiCardContent"}),{className:a,component:l="div"}=n,u=(0,o.A)(n,h),d=(0,r.A)({},n,{component:l}),g=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},p,t)})(d);return(0,f.jsx)(m,(0,r.A)({as:l,className:(0,i.A)(g.root,a),ownerState:d,ref:t},u))}))},45180:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(82053),c=n(48283),u=n(59254),d=n(1763),p=n(423);function f(e){return(0,p.Ay)("MuiCardHeader",e)}const h=(0,d.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]);var m=n(44414);const g=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],v=(0,u.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,o.A)({[`& .${h.title}`]:t.title,[`& .${h.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),y=(0,u.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),b=(0,u.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),w=(0,u.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),x=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiCardHeader"}),{action:a,avatar:u,className:d,component:p="div",disableTypography:h=!1,subheader:x,subheaderTypographyProps:C,title:A,titleTypographyProps:S}=n,k=(0,r.A)(n,g),M=(0,o.A)({},n,{component:p,disableTypography:h}),E=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},f,t)})(M);let R=A;null==R||R.type===l.A||h||(R=(0,m.jsx)(l.A,(0,o.A)({variant:u?"body2":"h5",className:E.title,component:"span",display:"block"},S,{children:R})));let P=x;return null==P||P.type===l.A||h||(P=(0,m.jsx)(l.A,(0,o.A)({variant:u?"body2":"body1",className:E.subheader,color:"text.secondary",component:"span",display:"block"},C,{children:P}))),(0,m.jsxs)(v,(0,o.A)({className:(0,i.A)(E.root,d),as:p,ref:t,ownerState:M},k,{children:[u&&(0,m.jsx)(y,{className:E.avatar,ownerState:M,children:u}),(0,m.jsxs)(w,{className:E.content,ownerState:M,children:[R,P]}),a&&(0,m.jsx)(b,{className:E.action,ownerState:M,children:a})]}))}))},39694:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>$});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(13815),c=n(67279),u=n(21209),d=n(31506),p=n(14857),f=n(70576),h=n(70827),m=n(44414);const g=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function v(e,t,n){var r;const o=function(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),a=(0,h.A)(t);let i;if(t.fakeTransform)i=t.fakeTransform;else{const e=a.getComputedStyle(t);i=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(i&&"none"!==i&&"string"===typeof i){const e=i.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-r.left}px)`:`translateX(${a.innerWidth+s-r.left}px)`:"right"===e?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${a.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,"function"===typeof(r=n)?r():r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const y=a.forwardRef((function(e,t){const n=(0,p.A)(),i={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},s={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:l,appear:y=!0,children:b,container:w,direction:x="down",easing:C=i,in:A,onEnter:S,onEntered:k,onEntering:M,onExit:E,onExited:R,onExiting:P,style:I,timeout:D=s,TransitionComponent:N=c.Ay}=e,$=(0,r.A)(e,g),O=a.useRef(null),T=(0,d.A)(b.ref,O,t),_=e=>t=>{e&&(void 0===t?e(O.current):e(O.current,t))},j=_(((e,t)=>{v(x,e,w),(0,f.q)(e),S&&S(e,t)})),F=_(((e,t)=>{const r=(0,f.c)({timeout:D,style:I,easing:C},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,o.A)({},r)),e.style.transition=n.transitions.create("transform",(0,o.A)({},r)),e.style.webkitTransform="none",e.style.transform="none",M&&M(e,t)})),L=_(k),V=_(P),z=_((e=>{const t=(0,f.c)({timeout:D,style:I,easing:C},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),v(x,e,w),E&&E(e)})),H=_((e=>{e.style.webkitTransition="",e.style.transition="",R&&R(e)})),B=a.useCallback((()=>{O.current&&v(x,O.current,w)}),[x,w]);return a.useEffect((()=>{if(A||"down"===x||"right"===x)return;const e=(0,u.A)((()=>{O.current&&v(x,O.current,w)})),t=(0,h.A)(O.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[x,A,w]),a.useEffect((()=>{A||B()}),[A,B]),(0,m.jsx)(N,(0,o.A)({nodeRef:O,onEnter:j,onEntered:L,onEntering:F,onExit:z,onExited:H,onExiting:V,addEndListener:e=>{l&&l(O.current,e)},appear:y,in:A,timeout:D},$,{children:(e,t)=>a.cloneElement(b,(0,o.A)({ref:T,style:(0,o.A)({visibility:"exited"!==e||A?void 0:"hidden"},I,b.props.style)},t))}))}));var b=n(2235),w=n(61676),x=n(48283),C=n(59254),A=n(1763),S=n(423);function k(e){return(0,S.Ay)("MuiDrawer",e)}(0,A.A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const M=["BackdropProps"],E=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],R=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},P=(0,C.Ay)(l.A,{name:"MuiDrawer",slot:"Root",overridesResolver:R})((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}})),I=(0,C.Ay)("div",{shouldForwardProp:C.ep,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:R})({flex:"0 0 auto"}),D=(0,C.Ay)(b.A,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,w.A)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,w.A)(n.anchor)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===n.anchor&&{left:0},"top"===n.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===n.anchor&&{right:0},"bottom"===n.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===n.anchor&&"temporary"!==n.variant&&{borderRight:`1px solid ${(t.vars||t).palette.divider}`},"top"===n.anchor&&"temporary"!==n.variant&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`},"right"===n.anchor&&"temporary"!==n.variant&&{borderLeft:`1px solid ${(t.vars||t).palette.divider}`},"bottom"===n.anchor&&"temporary"!==n.variant&&{borderTop:`1px solid ${(t.vars||t).palette.divider}`})})),N={left:"right",right:"left",top:"down",bottom:"up"};const $=a.forwardRef((function(e,t){const n=(0,x.A)({props:e,name:"MuiDrawer"}),l=(0,p.A)(),c={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{anchor:u="left",BackdropProps:d,children:f,className:h,elevation:g=16,hideBackdrop:v=!1,ModalProps:{BackdropProps:b}={},onClose:C,open:A=!1,PaperProps:S={},SlideProps:R,TransitionComponent:$=y,transitionDuration:O=c,variant:T="temporary"}=n,_=(0,r.A)(n.ModalProps,M),j=(0,r.A)(n,E),F=a.useRef(!1);a.useEffect((()=>{F.current=!0}),[]);const L=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?N[t]:t}(l,u),V=u,z=(0,o.A)({},n,{anchor:V,elevation:g,open:A,variant:T},j),H=(e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,w.A)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,w.A)(n)}`]};return(0,s.A)(o,k,t)})(z),B=(0,m.jsx)(D,(0,o.A)({elevation:"temporary"===T?g:0,square:!0},S,{className:(0,i.A)(H.paper,S.className),ownerState:z,children:f}));if("permanent"===T)return(0,m.jsx)(I,(0,o.A)({className:(0,i.A)(H.root,H.docked,h),ownerState:z,ref:t},j,{children:B}));const G=(0,m.jsx)($,(0,o.A)({in:A,direction:N[L],timeout:O,appear:F.current},R,{children:B}));return"persistent"===T?(0,m.jsx)(I,(0,o.A)({className:(0,i.A)(H.root,H.docked,h),ownerState:z,ref:t},j,{children:G})):(0,m.jsx)(P,(0,o.A)({BackdropProps:(0,o.A)({},d,b,{transitionDuration:O}),className:(0,i.A)(H.root,H.modal,h),open:A,ownerState:z,onClose:C,hideBackdrop:v,ref:t},j,_,{children:G}))}))},60899:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>M});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(28286),l=n(80237),c=n(88465),u=n(59254),d=n(48283),p=n(14857);const f=a.createContext();var h=n(1763),m=n(423);function g(e){return(0,m.Ay)("MuiGrid",e)}const v=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],y=(0,h.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...v.map((e=>`grid-xs-${e}`)),...v.map((e=>`grid-sm-${e}`)),...v.map((e=>`grid-md-${e}`)),...v.map((e=>`grid-lg-${e}`)),...v.map((e=>`grid-xl-${e}`))]);var b=n(44414);const w=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function x(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function C(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach((e=>{""===r&&0!==n[e]&&(r=e)}));const o=Object.keys(t).sort(((e,n)=>t[e]-t[n]));return o.slice(0,o.indexOf(r))}const A=(0,u.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:a,spacing:i,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(i,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,a&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((e=>{let{ownerState:t}=e;return(0,o.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})}),(function(e){let{theme:t,ownerState:n}=e;const r=(0,s.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,s.NI)({theme:t},r,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${y.item}`]={maxWidth:"none"}),t}))}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:o}=n;let a={};if(r&&0!==o){const e=(0,s.kW)({values:o,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=C({breakpoints:t.breakpoints.values,values:e})),a=(0,s.NI)({theme:t},e,((e,r)=>{var o;const a=t.spacing(e);return"0px"!==a?{marginTop:`-${x(a)}`,[`& > .${y.item}`]:{paddingTop:x(a)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${y.item}`]:{paddingTop:0}}}))}return a}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:o}=n;let a={};if(r&&0!==o){const e=(0,s.kW)({values:o,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=C({breakpoints:t.breakpoints.values,values:e})),a=(0,s.NI)({theme:t},e,((e,r)=>{var o;const a=t.spacing(e);return"0px"!==a?{width:`calc(100% + ${x(a)})`,marginLeft:`-${x(a)}`,[`& > .${y.item}`]:{paddingLeft:x(a)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${y.item}`]:{paddingLeft:0}}}))}return a}),(function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce(((e,a)=>{let i={};if(r[a]&&(t=r[a]),!t)return e;if(!0===t)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const l=(0,s.kW)({values:r.columns,breakpoints:n.breakpoints.values}),c="object"===typeof l?l[a]:l;if(void 0===c||null===c)return e;const u=Math.round(t/c*1e8)/1e6+"%";let d={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t=`calc(${u} + ${x(e)})`;d={flexBasis:t,maxWidth:t}}}i=(0,o.A)({flexBasis:u,flexGrow:0,maxWidth:u},d)}return 0===n.breakpoints.values[a]?Object.assign(e,i):e[n.breakpoints.up(a)]=i,e}),{})}));const S=e=>{const{classes:t,container:n,direction:r,item:o,spacing:a,wrap:i,zeroMinWidth:s,breakpoints:l}=e;let u=[];n&&(u=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(a,l));const d=[];l.forEach((t=>{const n=e[t];n&&d.push(`grid-${t}-${String(n)}`)}));const p={root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...u,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==i&&`wrap-xs-${String(i)}`,...d]};return(0,c.A)(p,g,t)},k=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiGrid"}),{breakpoints:s}=(0,p.A)(),c=(0,l.A)(n),{className:u,columns:h,columnSpacing:m,component:g="div",container:v=!1,direction:y="row",item:x=!1,rowSpacing:C,spacing:k=0,wrap:M="wrap",zeroMinWidth:E=!1}=c,R=(0,r.A)(c,w),P=C||k,I=m||k,D=a.useContext(f),N=v?h||12:D,$={},O=(0,o.A)({},R);s.keys.forEach((e=>{null!=R[e]&&($[e]=R[e],delete O[e])}));const T=(0,o.A)({},c,{columns:N,container:v,direction:y,item:x,rowSpacing:P,columnSpacing:I,wrap:M,zeroMinWidth:E,spacing:k},$,{breakpoints:s.keys}),_=S(T);return(0,b.jsx)(f.Provider,{value:N,children:(0,b.jsx)(A,(0,o.A)({ownerState:T,className:(0,i.A)(_.root,u),as:g,ref:t},O))})}));const M=k},2046:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(61676),c=n(82053),u=n(15866),d=n(39766),p=n(59254),f=n(1763),h=n(423);function m(e){return(0,h.Ay)("MuiInputAdornment",e)}const g=(0,f.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var v,y=n(48283),b=n(44414);const w=["children","className","component","disablePointerEvents","disableTypography","position","variant"],x=(0,p.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,l.A)(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},"filled"===n.variant&&{[`&.${g.positionStart}&:not(.${g.hiddenLabel})`]:{marginTop:16}},"start"===n.position&&{marginRight:8},"end"===n.position&&{marginLeft:8},!0===n.disablePointerEvents&&{pointerEvents:"none"})})),C=a.forwardRef((function(e,t){const n=(0,y.A)({props:e,name:"MuiInputAdornment"}),{children:p,className:f,component:h="div",disablePointerEvents:g=!1,disableTypography:C=!1,position:A,variant:S}=n,k=(0,r.A)(n,w),M=(0,d.A)()||{};let E=S;S&&M.variant,M&&!E&&(E=M.variant);const R=(0,o.A)({},n,{hiddenLabel:M.hiddenLabel,size:M.size,disablePointerEvents:g,position:A,variant:E}),P=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:a,variant:i}=e,c={root:["root",n&&"disablePointerEvents",o&&`position${(0,l.A)(o)}`,i,r&&"hiddenLabel",a&&`size${(0,l.A)(a)}`]};return(0,s.A)(c,m,t)})(R);return(0,b.jsx)(u.A.Provider,{value:null,children:(0,b.jsx)(x,(0,o.A)({as:h,ownerState:R,className:(0,i.A)(P.root,f),ref:t},k,{children:"string"!==typeof p||C?(0,b.jsxs)(a.Fragment,{children:["start"===A?v||(v=(0,b.jsx)("span",{className:"notranslate",children:"\u200b"})):null,p]}):(0,b.jsx)(c.A,{color:"text.secondary",children:p})}))})}))},66699:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(69311),c=n(7083),u=n(61676),d=n(14857),p=n(59254),f=n(48283),h=n(1763),m=n(423);function g(e){return(0,m.Ay)("MuiLinearProgress",e)}(0,h.A)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var v=n(44414);const y=["className","color","value","valueBuffer","variant"];let b,w,x,C,A,S,k=e=>e;const M=(0,l.i7)(b||(b=k`
|
|
3
|
-
0% {
|
|
4
|
-
left: -35%;
|
|
5
|
-
right: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
60% {
|
|
9
|
-
left: 100%;
|
|
10
|
-
right: -90%;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
100% {
|
|
14
|
-
left: 100%;
|
|
15
|
-
right: -90%;
|
|
16
|
-
}
|
|
17
|
-
`)),E=(0,l.i7)(w||(w=k`
|
|
18
|
-
0% {
|
|
19
|
-
left: -200%;
|
|
20
|
-
right: 100%;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
60% {
|
|
24
|
-
left: 107%;
|
|
25
|
-
right: -8%;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
100% {
|
|
29
|
-
left: 107%;
|
|
30
|
-
right: -8%;
|
|
31
|
-
}
|
|
32
|
-
`)),R=(0,l.i7)(x||(x=k`
|
|
33
|
-
0% {
|
|
34
|
-
opacity: 1;
|
|
35
|
-
background-position: 0 -23px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
60% {
|
|
39
|
-
opacity: 0;
|
|
40
|
-
background-position: 0 -23px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
100% {
|
|
44
|
-
opacity: 1;
|
|
45
|
-
background-position: -200px -23px;
|
|
46
|
-
}
|
|
47
|
-
`)),P=(e,t)=>"inherit"===t?"currentColor":e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,c.a)(e.palette[t].main,.62):(0,c.e$)(e.palette[t].main,.5),I=(0,p.Ay)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,u.A)(n.color)}`],t[n.variant]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,o.A)({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:P(n,t.color)},"inherit"===t.color&&"buffer"!==t.variant&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},"buffer"===t.variant&&{backgroundColor:"transparent"},"query"===t.variant&&{transform:"rotate(180deg)"})})),D=(0,p.Ay)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${(0,u.A)(n.color)}`]]}})((e=>{let{ownerState:t,theme:n}=e;const r=P(n,t.color);return(0,o.A)({position:"absolute",marginTop:0,height:"100%",width:"100%"},"inherit"===t.color&&{opacity:.3},{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})}),(0,l.AH)(C||(C=k`
|
|
48
|
-
animation: ${0} 3s infinite linear;
|
|
49
|
-
`),R)),N=(0,p.Ay)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${(0,u.A)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,o.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"determinate"===t.variant&&{transition:"transform .4s linear"},"buffer"===t.variant&&{zIndex:1,transition:"transform .4s linear"})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,l.AH)(A||(A=k`
|
|
50
|
-
width: auto;
|
|
51
|
-
animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
52
|
-
`),M)})),$=(0,p.Ay)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${(0,u.A)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((e=>{let{ownerState:t,theme:n}=e;return(0,o.A)({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},"buffer"!==t.variant&&{backgroundColor:"inherit"===t.color?"currentColor":(n.vars||n).palette[t.color].main},"inherit"===t.color&&{opacity:.3},"buffer"===t.variant&&{backgroundColor:P(n,t.color),transition:"transform .4s linear"})}),(e=>{let{ownerState:t}=e;return("indeterminate"===t.variant||"query"===t.variant)&&(0,l.AH)(S||(S=k`
|
|
53
|
-
width: auto;
|
|
54
|
-
animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
55
|
-
`),E)})),O=a.forwardRef((function(e,t){const n=(0,f.A)({props:e,name:"MuiLinearProgress"}),{className:a,color:l="primary",value:c,valueBuffer:p,variant:h="indeterminate"}=n,m=(0,r.A)(n,y),b=(0,o.A)({},n,{color:l,variant:h}),w=(e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${(0,u.A)(r)}`,n],dashed:["dashed",`dashedColor${(0,u.A)(r)}`],bar1:["bar",`barColor${(0,u.A)(r)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","buffer"!==n&&`barColor${(0,u.A)(r)}`,"buffer"===n&&`color${(0,u.A)(r)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,s.A)(o,g,t)})(b),x=(0,d.A)(),C={},A={bar1:{},bar2:{}};if("determinate"===h||"buffer"===h)if(void 0!==c){C["aria-valuenow"]=Math.round(c),C["aria-valuemin"]=0,C["aria-valuemax"]=100;let e=c-100;"rtl"===x.direction&&(e=-e),A.bar1.transform=`translateX(${e}%)`}else 0;if("buffer"===h)if(void 0!==p){let e=(p||0)-100;"rtl"===x.direction&&(e=-e),A.bar2.transform=`translateX(${e}%)`}else 0;return(0,v.jsxs)(I,(0,o.A)({className:(0,i.A)(w.root,a),ownerState:b,role:"progressbar"},C,{ref:t},m,{children:["buffer"===h?(0,v.jsx)(D,{className:w.dashed,ownerState:b}):null,(0,v.jsx)(N,{className:w.bar1,ownerState:b,style:A.bar1}),"determinate"===h?null:(0,v.jsx)($,{className:w.bar2,ownerState:b,style:A.bar2})]}))}))},36080:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(61676),c=n(59254),u=n(48283),d=n(85080),p=n(31506),f=n(82053),h=n(1763),m=n(423);function g(e){return(0,m.Ay)("MuiLink",e)}const v=(0,h.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var y=n(12703),b=n(7083);const w={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=e=>{let{theme:t,ownerState:n}=e;const r=(e=>w[e]||e)(n.color),o=(0,y.Yn)(t,`palette.${r}`,!1)||n.color,a=(0,y.Yn)(t,`palette.${r}Channel`);return"vars"in t&&a?`rgba(${a} / 0.4)`:(0,b.X4)(o,.4)};var C=n(44414);const A=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],S=(0,c.Ay)(f.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${(0,l.A)(n.underline)}`],"button"===n.component&&t.button]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,o.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:x({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${v.focusVisible}`]:{outline:"auto"}})})),k=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiLink"}),{className:c,color:f="primary",component:h="a",onBlur:m,onFocus:v,TypographyClasses:y,underline:b="always",variant:x="inherit",sx:k}=n,M=(0,r.A)(n,A),{isFocusVisibleRef:E,onBlur:R,onFocus:P,ref:I}=(0,d.A)(),[D,N]=a.useState(!1),$=(0,p.A)(t,I),O=(0,o.A)({},n,{color:f,component:h,focusVisible:D,underline:b,variant:x}),T=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,a={root:["root",`underline${(0,l.A)(o)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,s.A)(a,g,t)})(O);return(0,C.jsx)(S,(0,o.A)({color:f,className:(0,i.A)(T.root,c),classes:y,component:h,onBlur:e=>{R(e),!1===E.current&&N(!1),m&&m(e)},onFocus:e=>{P(e),!0===E.current&&N(!0),v&&v(e)},ref:$,ownerState:O,variant:x,sx:[...Object.keys(w).includes(f)?[]:[{color:f}],...Array.isArray(k)?k:[k]]},M))}))},22758:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(58168),o=n(98587),a=n(9950),i=n(72004),s=n(88465),l=n(48283),c=n(1763),u=n(423);function d(e){return(0,u.Ay)("MuiPagination",e)}(0,c.A)("MuiPagination",["root","ul","outlined","text"]);var p=n(63931);const f=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];var h=n(50597),m=n(59254),g=n(44414);const v=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],y=(0,m.Ay)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),b=(0,m.Ay)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function w(e,t,n){return"page"===e?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const x=a.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiPagination"}),{boundaryCount:a=1,className:c,color:u="standard",count:m=1,defaultPage:x=1,disabled:C=!1,getItemAriaLabel:A=w,hideNextButton:S=!1,hidePrevButton:k=!1,renderItem:M=e=>(0,g.jsx)(h.A,(0,r.A)({},e)),shape:E="circular",showFirstButton:R=!1,showLastButton:P=!1,siblingCount:I=1,size:D="medium",variant:N="text"}=n,$=(0,o.A)(n,v),{items:O}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{boundaryCount:t=1,componentName:n="usePagination",count:a=1,defaultPage:i=1,disabled:s=!1,hideNextButton:l=!1,hidePrevButton:c=!1,onChange:u,page:d,showFirstButton:h=!1,showLastButton:m=!1,siblingCount:g=1}=e,v=(0,o.A)(e,f),[y,b]=(0,p.A)({controlled:d,default:i,name:n,state:"page"}),w=(e,t)=>{d||b(t),u&&u(e,t)},x=(e,t)=>{const n=t-e+1;return Array.from({length:n},((t,n)=>e+n))},C=x(1,Math.min(t,a)),A=x(Math.max(a-t+1,t+1),a),S=Math.max(Math.min(y-g,a-t-2*g-1),t+2),k=Math.min(Math.max(y+g,t+2*g+2),A.length>0?A[0]-2:a-1),M=[...h?["first"]:[],...c?[]:["previous"],...C,...S>t+2?["start-ellipsis"]:t+1<a-t?[t+1]:[],...x(S,k),...k<a-t-1?["end-ellipsis"]:a-t>t?[a-t]:[],...A,...l?[]:["next"],...m?["last"]:[]],E=e=>{switch(e){case"first":return 1;case"previous":return y-1;case"next":return y+1;case"last":return a;default:return null}},R=M.map((e=>"number"===typeof e?{onClick:t=>{w(t,e)},type:"page",page:e,selected:e===y,disabled:s,"aria-current":e===y?"true":void 0}:{onClick:t=>{w(t,E(e))},type:e,page:E(e),selected:!1,disabled:s||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?y>=a:y<=1)}));return(0,r.A)({items:R},v)}((0,r.A)({},n,{componentName:"Pagination"})),T=(0,r.A)({},n,{boundaryCount:a,color:u,count:m,defaultPage:x,disabled:C,getItemAriaLabel:A,hideNextButton:S,hidePrevButton:k,renderItem:M,shape:E,showFirstButton:R,showLastButton:P,siblingCount:I,size:D,variant:N}),_=(e=>{const{classes:t,variant:n}=e,r={root:["root",n],ul:["ul"]};return(0,s.A)(r,d,t)})(T);return(0,g.jsx)(y,(0,r.A)({"aria-label":"pagination navigation",className:(0,i.A)(_.root,c),ownerState:T,ref:t},$,{children:(0,g.jsx)(b,{className:_.ul,ownerState:T,children:O.map(((e,t)=>(0,g.jsx)("li",{children:M((0,r.A)({},e,{color:u,"aria-label":A(e.type,e.page,e.selected),shape:E,size:D,variant:N}))},t)))})}))}))},50597:(e,t,n)=>{"use strict";n.d(t,{A:()=>P});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(7083),c=n(48283),u=n(1763),d=n(423);function p(e){return(0,d.Ay)("MuiPaginationItem",e)}const f=(0,u.A)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon"]);var h=n(14857),m=n(24184),g=n(61676),v=n(68489),y=n(88113),b=n(65471),w=n(44414);const x=(0,b.A)((0,w.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),C=(0,b.A)((0,w.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");var A=n(59254);const S=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],k=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,g.A)(n.size)}`],"text"===n.variant&&t[`text${(0,g.A)(n.color)}`],"outlined"===n.variant&&t[`outlined${(0,g.A)(n.color)}`],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},M=(0,A.Ay)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:k})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,height:"auto",[`&.${f.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"small"===n.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)})})),E=(0,A.Ay)(m.A,{name:"MuiPaginationItem",slot:"Root",overridesResolver:k})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,[`&.${f.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${f.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},transition:t.transitions.create(["color","background-color"],{duration:t.transitions.duration.short}),"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.selected}`]:{backgroundColor:(t.vars||t).palette.action.selected,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${f.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,l.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},[`&.${f.disabled}`]:{opacity:1,color:(t.vars||t).palette.action.disabled,backgroundColor:(t.vars||t).palette.action.selected}}},"small"===n.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)},"rounded"===n.shape&&{borderRadius:(t.vars||t).shape.borderRadius})}),(e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({},"text"===n.variant&&{[`&.${f.selected}`]:(0,o.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}},[`&.${f.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n.color].dark}},{[`&.${f.disabled}`]:{color:(t.vars||t).palette.action.disabled}})},"outlined"===n.variant&&{border:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${f.selected}`]:(0,o.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / 0.5)`:(0,l.X4)(t.palette[n.color].main,.5)}`,backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.activatedOpacity})`:(0,l.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,l.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,l.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity)}},{[`&.${f.disabled}`]:{borderColor:(t.vars||t).palette.action.disabledBackground,color:(t.vars||t).palette.action.disabled}})})})),R=(0,A.Ay)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({fontSize:t.typography.pxToRem(20),margin:"0 -8px"},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(22)})})),P=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiPaginationItem"}),{className:a,color:l="standard",component:u,components:d={},disabled:f=!1,page:m,selected:b=!1,shape:A="circular",size:k="medium",slots:P={},type:I="page",variant:D="text"}=n,N=(0,r.A)(n,S),$=(0,o.A)({},n,{color:l,disabled:f,selected:b,shape:A,size:k,type:I,variant:D}),O=(0,h.A)(),T=(e=>{const{classes:t,color:n,disabled:r,selected:o,size:a,shape:i,type:l,variant:c}=e,u={root:["root",`size${(0,g.A)(a)}`,c,i,"standard"!==n&&`${c}${(0,g.A)(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[l]],icon:["icon"]};return(0,s.A)(u,p,t)})($),_=("rtl"===O.direction?{previous:P.next||d.next||C,next:P.previous||d.previous||x,last:P.first||d.first||v.A,first:P.last||d.last||y.A}:{previous:P.previous||d.previous||x,next:P.next||d.next||C,first:P.first||d.first||v.A,last:P.last||d.last||y.A})[I];return"start-ellipsis"===I||"end-ellipsis"===I?(0,w.jsx)(M,{ref:t,ownerState:$,className:(0,i.A)(T.root,a),children:"\u2026"}):(0,w.jsxs)(E,(0,o.A)({ref:t,ownerState:$,component:u,disabled:f,className:(0,i.A)(T.root,a)},N,{children:["page"===I&&m,_?(0,w.jsx)(R,{as:_,ownerState:$,className:T.icon}):null]}))}))},82917:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(69311),l=n(88465);function c(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function u(e){return parseFloat(e)}var d=n(7083),p=n(59254),f=n(48283),h=n(1763),m=n(423);function g(e){return(0,m.Ay)("MuiSkeleton",e)}(0,h.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var v=n(44414);const y=["animation","className","component","height","style","variant","width"];let b,w,x,C,A=e=>e;const S=(0,s.i7)(b||(b=A`
|
|
56
|
-
0% {
|
|
57
|
-
opacity: 1;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
50% {
|
|
61
|
-
opacity: 0.4;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
100% {
|
|
65
|
-
opacity: 1;
|
|
66
|
-
}
|
|
67
|
-
`)),k=(0,s.i7)(w||(w=A`
|
|
68
|
-
0% {
|
|
69
|
-
transform: translateX(-100%);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
50% {
|
|
73
|
-
/* +0.5s of delay between each loop */
|
|
74
|
-
transform: translateX(100%);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
100% {
|
|
78
|
-
transform: translateX(100%);
|
|
79
|
-
}
|
|
80
|
-
`)),M=(0,p.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((e=>{let{theme:t,ownerState:n}=e;const r=c(t.shape.borderRadius)||"px",a=u(t.shape.borderRadius);return(0,o.A)({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:(0,d.X4)(t.palette.text.primary,"light"===t.palette.mode?.11:.13),height:"1.2em"},"text"===n.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${a}${r}/${Math.round(a/.6*10)/10}${r}`,"&:empty:before":{content:'"\\00a0"'}},"circular"===n.variant&&{borderRadius:"50%"},"rounded"===n.variant&&{borderRadius:(t.vars||t).shape.borderRadius},n.hasChildren&&{"& > *":{visibility:"hidden"}},n.hasChildren&&!n.width&&{maxWidth:"fit-content"},n.hasChildren&&!n.height&&{height:"auto"})}),(e=>{let{ownerState:t}=e;return"pulse"===t.animation&&(0,s.AH)(x||(x=A`
|
|
81
|
-
animation: ${0} 2s ease-in-out 0.5s infinite;
|
|
82
|
-
`),S)}),(e=>{let{ownerState:t,theme:n}=e;return"wave"===t.animation&&(0,s.AH)(C||(C=A`
|
|
83
|
-
position: relative;
|
|
84
|
-
overflow: hidden;
|
|
85
|
-
|
|
86
|
-
/* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
|
|
87
|
-
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
|
88
|
-
|
|
89
|
-
&::after {
|
|
90
|
-
animation: ${0} 2s linear 0.5s infinite;
|
|
91
|
-
background: linear-gradient(
|
|
92
|
-
90deg,
|
|
93
|
-
transparent,
|
|
94
|
-
${0},
|
|
95
|
-
transparent
|
|
96
|
-
);
|
|
97
|
-
content: '';
|
|
98
|
-
position: absolute;
|
|
99
|
-
transform: translateX(-100%); /* Avoid flash during server-side hydration */
|
|
100
|
-
bottom: 0;
|
|
101
|
-
left: 0;
|
|
102
|
-
right: 0;
|
|
103
|
-
top: 0;
|
|
104
|
-
}
|
|
105
|
-
`),k,(n.vars||n).palette.action.hover)})),E=a.forwardRef((function(e,t){const n=(0,f.A)({props:e,name:"MuiSkeleton"}),{animation:a="pulse",className:s,component:c="span",height:u,style:d,variant:p="text",width:h}=n,m=(0,r.A)(n,y),b=(0,o.A)({},n,{animation:a,component:c,variant:p,hasChildren:Boolean(m.children)}),w=(e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:a,height:i}=e,s={root:["root",n,r,o&&"withChildren",o&&!a&&"fitContent",o&&!i&&"heightAuto"]};return(0,l.A)(s,g,t)})(b);return(0,v.jsx)(M,(0,o.A)({as:c,ref:t,className:(0,i.A)(w.root,s),ownerState:b},m,{style:(0,o.A)({width:h,height:u},d)}))}))},70849:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(87483),l=n(423),c=n(88465),u=n(95955),d=n(62161),p=n(80237),f=n(18970),h=n(28286),m=n(47937),g=n(44414);const v=["component","direction","spacing","divider","children","className","useFlexGap"],y=(0,f.A)(),b=(0,u.A)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function w(e){return(0,d.A)({props:e,name:"MuiStack",defaultTheme:y})}function x(e,t){const n=a.Children.toArray(e).filter(Boolean);return n.reduce(((e,r,o)=>(e.push(r),o<n.length-1&&e.push(a.cloneElement(t,{key:`separator-${o}`})),e)),[])}const C=e=>{let{ownerState:t,theme:n}=e,r=(0,o.A)({display:"flex",flexDirection:"column"},(0,h.NI)({theme:n},(0,h.kW)({values:t.direction,breakpoints:n.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,m.LX)(n),o=Object.keys(n.breakpoints.values).reduce(((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e)),{}),a=(0,h.kW)({values:t.direction,base:o}),i=(0,h.kW)({values:t.spacing,base:o});"object"===typeof a&&Object.keys(a).forEach(((e,t,n)=>{if(!a[e]){const r=t>0?a[n[t-1]]:"column";a[e]=r}}));const l=(n,r)=>{return t.useFlexGap?{gap:(0,m._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=r?a[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,m._W)(e,n)}};var o};r=(0,s.A)(r,(0,h.NI)({theme:n},i,l))}return r=(0,h.iZ)(n.breakpoints,r),r};var A=n(59254),S=n(48283);const k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=b,useThemeProps:n=w,componentName:s="MuiStack"}=e,u=t(C),d=a.forwardRef((function(e,t){const a=n(e),d=(0,p.A)(a),{component:f="div",direction:h="column",spacing:m=0,divider:y,children:b,className:w,useFlexGap:C=!1}=d,A=(0,r.A)(d,v),S={direction:h,spacing:m,useFlexGap:C},k=(0,c.A)({root:["root"]},(e=>(0,l.Ay)(s,e)),{});return(0,g.jsx)(u,(0,o.A)({as:f,ownerState:S,ref:t,className:(0,i.A)(k.root,w)},A,{children:y?x(b,y):b}))}));return d}({createStyledComponent:(0,A.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,S.A)({props:e,name:"MuiStack"})}),M=k},43754:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(55442),c=n(50792),u=n(48283),d=n(59254),p=n(1763),f=n(423);function h(e){return(0,f.Ay)("MuiStep",e)}(0,p.A)("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);var m=n(44414);const g=["active","children","className","component","completed","disabled","expanded","index","last"],v=(0,d.Ay)("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})((e=>{let{ownerState:t}=e;return(0,o.A)({},"horizontal"===t.orientation&&{paddingLeft:8,paddingRight:8},t.alternativeLabel&&{flex:1,position:"relative"})})),y=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiStep"}),{active:d,children:p,className:f,component:y="div",completed:b,disabled:w,expanded:x=!1,index:C,last:A}=n,S=(0,r.A)(n,g),{activeStep:k,connector:M,alternativeLabel:E,orientation:R,nonLinear:P}=a.useContext(l.A);let[I=!1,D=!1,N=!1]=[d,b,w];k===C?I=void 0===d||d:!P&&k>C?D=void 0===b||b:!P&&k<C&&(N=void 0===w||w);const $=a.useMemo((()=>({index:C,last:A,expanded:x,icon:C+1,active:I,completed:D,disabled:N})),[C,A,x,I,D,N]),O=(0,o.A)({},n,{active:I,orientation:R,alternativeLabel:E,completed:D,disabled:N,expanded:x,component:y}),T=(e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e,a={root:["root",n,r&&"alternativeLabel",o&&"completed"]};return(0,s.A)(a,h,t)})(O),_=(0,m.jsxs)(v,(0,o.A)({as:y,className:(0,i.A)(T.root,f),ref:t,ownerState:O},S,{children:[M&&E&&0!==C?M:null,p]}));return(0,m.jsx)(c.A.Provider,{value:$,children:M&&!E&&0!==C?(0,m.jsxs)(a.Fragment,{children:[M,_]}):_})}))},50792:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=n(9950).createContext({});const o=r},73163:(e,t,n)=>{"use strict";n.d(t,{A:()=>D});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(59254),c=n(48283),u=n(67279),d=n(75361),p=n(70576),f=n(14857),h=n(31506),m=n(1763),g=n(423);function v(e){return(0,g.Ay)("MuiCollapse",e)}(0,m.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var y=n(44414);const b=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],w=(0,l.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,o.A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})})),x=(0,l.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),C=(0,l.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((e=>{let{ownerState:t}=e;return(0,o.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),A=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiCollapse"}),{addEndListener:l,children:m,className:g,collapsedSize:A="0px",component:S,easing:k,in:M,onEnter:E,onEntered:R,onEntering:P,onExit:I,onExited:D,onExiting:N,orientation:$="vertical",style:O,timeout:T=d.p0.standard,TransitionComponent:_=u.Ay}=n,j=(0,r.A)(n,b),F=(0,o.A)({},n,{orientation:$,collapsedSize:A}),L=(e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return(0,s.A)(r,v,n)})(F),V=(0,f.A)(),z=a.useRef(),H=a.useRef(null),B=a.useRef(),G="number"===typeof A?`${A}px`:A,W="horizontal"===$,U=W?"width":"height";a.useEffect((()=>()=>{clearTimeout(z.current)}),[]);const K=a.useRef(null),q=(0,h.A)(t,K),Y=e=>t=>{if(e){const n=K.current;void 0===t?e(n):e(n,t)}},X=()=>H.current?H.current[W?"clientWidth":"clientHeight"]:0,Z=Y(((e,t)=>{H.current&&W&&(H.current.style.position="absolute"),e.style[U]=G,E&&E(e,t)})),Q=Y(((e,t)=>{const n=X();H.current&&W&&(H.current.style.position="");const{duration:r,easing:o}=(0,p.c)({style:O,timeout:T,easing:k},{mode:"enter"});if("auto"===T){const t=V.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,B.current=t}else e.style.transitionDuration="string"===typeof r?r:`${r}ms`;e.style[U]=`${n}px`,e.style.transitionTimingFunction=o,P&&P(e,t)})),J=Y(((e,t)=>{e.style[U]="auto",R&&R(e,t)})),ee=Y((e=>{e.style[U]=`${X()}px`,I&&I(e)})),te=Y(D),ne=Y((e=>{const t=X(),{duration:n,easing:r}=(0,p.c)({style:O,timeout:T,easing:k},{mode:"exit"});if("auto"===T){const n=V.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,B.current=n}else e.style.transitionDuration="string"===typeof n?n:`${n}ms`;e.style[U]=G,e.style.transitionTimingFunction=r,N&&N(e)}));return(0,y.jsx)(_,(0,o.A)({in:M,onEnter:Z,onEntered:J,onEntering:Q,onExit:ee,onExited:te,onExiting:ne,addEndListener:e=>{"auto"===T&&(z.current=setTimeout(e,B.current||0)),l&&l(K.current,e)},nodeRef:K,timeout:"auto"===T?null:T},j,{children:(e,t)=>(0,y.jsx)(w,(0,o.A)({as:S,className:(0,i.A)(L.root,g,{entered:L.entered,exited:!M&&"0px"===G&&L.hidden}[e]),style:(0,o.A)({[W?"minWidth":"minHeight"]:G},O),ownerState:(0,o.A)({},F,{state:e}),ref:q},t,{children:(0,y.jsx)(x,{ownerState:(0,o.A)({},F,{state:e}),className:L.wrapper,ref:H,children:(0,y.jsx)(C,{ownerState:(0,o.A)({},F,{state:e}),className:L.wrapperInner,children:m})})}))}))}));A.muiSupportAuto=!0;const S=A;var k=n(55442),M=n(50792);function E(e){return(0,g.Ay)("MuiStepContent",e)}(0,m.A)("MuiStepContent",["root","last","transition"]);const R=["children","className","TransitionComponent","transitionDuration","TransitionProps"],P=(0,l.Ay)("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})((e=>{let{ownerState:t,theme:n}=e;return(0,o.A)({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:n.vars?`1px solid ${n.vars.palette.StepContent.border}`:`1px solid ${"light"===n.palette.mode?n.palette.grey[400]:n.palette.grey[600]}`},t.last&&{borderLeft:"none"})})),I=(0,l.Ay)(S,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),D=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiStepContent"}),{children:l,className:u,TransitionComponent:d=S,transitionDuration:p="auto",TransitionProps:f}=n,h=(0,r.A)(n,R),{orientation:m}=a.useContext(k.A),{active:g,last:v,expanded:b}=a.useContext(M.A),w=(0,o.A)({},n,{last:v}),x=(e=>{const{classes:t,last:n}=e,r={root:["root",n&&"last"],transition:["transition"]};return(0,s.A)(r,E,t)})(w);let C=p;return"auto"!==p||d.muiSupportAuto||(C=void 0),(0,y.jsx)(P,(0,o.A)({className:(0,i.A)(x.root,u),ref:t,ownerState:w},h,{children:(0,y.jsx)(I,(0,o.A)({as:d,in:g||b,className:x.transition,ownerState:w,timeout:C,unmountOnExit:!0},f,{children:l}))}))}))},37885:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(59254),c=n(48283),u=n(65471),d=n(44414);const p=(0,u.A)((0,d.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),f=(0,u.A)((0,d.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");var h=n(9360),m=n(1763),g=n(423);function v(e){return(0,g.Ay)("MuiStepIcon",e)}const y=(0,m.A)("MuiStepIcon",["root","active","completed","error","text"]);var b;const w=["active","className","completed","error","icon"],x=(0,l.Ay)(h.A,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),color:(t.vars||t).palette.text.disabled,[`&.${y.completed}`]:{color:(t.vars||t).palette.primary.main},[`&.${y.active}`]:{color:(t.vars||t).palette.primary.main},[`&.${y.error}`]:{color:(t.vars||t).palette.error.main}}})),C=(0,l.Ay)("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})((e=>{let{theme:t}=e;return{fill:(t.vars||t).palette.primary.contrastText,fontSize:t.typography.caption.fontSize,fontFamily:t.typography.fontFamily}})),A=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiStepIcon"}),{active:a=!1,className:l,completed:u=!1,error:h=!1,icon:m}=n,g=(0,r.A)(n,w),y=(0,o.A)({},n,{active:a,completed:u,error:h}),A=(e=>{const{classes:t,active:n,completed:r,error:o}=e,a={root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]};return(0,s.A)(a,v,t)})(y);if("number"===typeof m||"string"===typeof m){const e=(0,i.A)(l,A.root);return h?(0,d.jsx)(x,(0,o.A)({as:f,className:e,ref:t,ownerState:y},g)):u?(0,d.jsx)(x,(0,o.A)({as:p,className:e,ref:t,ownerState:y},g)):(0,d.jsxs)(x,(0,o.A)({className:e,ref:t,ownerState:y},g,{children:[b||(b=(0,d.jsx)("circle",{cx:"12",cy:"12",r:"12"})),(0,d.jsx)(C,{className:A.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:y,children:m})]}))}return m}));var S=n(55442),k=n(50792);function M(e){return(0,g.Ay)("MuiStepLabel",e)}const E=(0,m.A)("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),R=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],P=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"flex",alignItems:"center",[`&.${E.alternativeLabel}`]:{flexDirection:"column"},[`&.${E.disabled}`]:{cursor:"default"}},"vertical"===t.orientation&&{textAlign:"left",padding:"8px 0"})})),I=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})((e=>{let{theme:t}=e;return(0,o.A)({},t.typography.body2,{display:"block",transition:t.transitions.create("color",{duration:t.transitions.duration.shortest}),[`&.${E.active}`]:{color:(t.vars||t).palette.text.primary,fontWeight:500},[`&.${E.completed}`]:{color:(t.vars||t).palette.text.primary,fontWeight:500},[`&.${E.alternativeLabel}`]:{marginTop:16},[`&.${E.error}`]:{color:(t.vars||t).palette.error.main}})})),D=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})((()=>({flexShrink:0,display:"flex",paddingRight:8,[`&.${E.alternativeLabel}`]:{paddingRight:0}}))),N=(0,l.Ay)("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((e=>{let{theme:t}=e;return{width:"100%",color:(t.vars||t).palette.text.secondary,[`&.${E.alternativeLabel}`]:{textAlign:"center"}}})),$=a.forwardRef((function(e,t){var n;const l=(0,c.A)({props:e,name:"MuiStepLabel"}),{children:u,className:p,componentsProps:f={},error:h=!1,icon:m,optional:g,slotProps:v={},StepIconComponent:y,StepIconProps:b}=l,w=(0,r.A)(l,R),{alternativeLabel:x,orientation:C}=a.useContext(S.A),{active:E,disabled:$,completed:O,icon:T}=a.useContext(k.A),_=m||T;let j=y;_&&!j&&(j=A);const F=(0,o.A)({},l,{active:E,alternativeLabel:x,completed:O,disabled:$,error:h,orientation:C}),L=(e=>{const{classes:t,orientation:n,active:r,completed:o,error:a,disabled:i,alternativeLabel:l}=e,c={root:["root",n,a&&"error",i&&"disabled",l&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",a&&"error",i&&"disabled",l&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",a&&"error",i&&"disabled",l&&"alternativeLabel"],labelContainer:["labelContainer",l&&"alternativeLabel"]};return(0,s.A)(c,M,t)})(F),V=null!=(n=v.label)?n:f.label;return(0,d.jsxs)(P,(0,o.A)({className:(0,i.A)(L.root,p),ref:t,ownerState:F},w,{children:[_||j?(0,d.jsx)(D,{className:L.iconContainer,ownerState:F,children:(0,d.jsx)(j,(0,o.A)({completed:O,active:E,error:h,icon:_},b))}):null,(0,d.jsxs)(N,{className:L.labelContainer,ownerState:F,children:[u?(0,d.jsx)(I,(0,o.A)({ownerState:F},V,{className:(0,i.A)(L.label,null==V?void 0:V.className),children:u})):null,g]})]}))}));$.muiName="StepLabel";const O=$},58535:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(48283),c=n(59254),u=n(1763),d=n(423);function p(e){return(0,d.Ay)("MuiStepper",e)}(0,u.A)("MuiStepper",["root","horizontal","vertical","alternativeLabel"]);var f=n(61676),h=n(55442),m=n(50792);function g(e){return(0,d.Ay)("MuiStepConnector",e)}(0,u.A)("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);var v=n(44414);const y=["className"],b=(0,c.Ay)("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})((e=>{let{ownerState:t}=e;return(0,o.A)({flex:"1 1 auto"},"vertical"===t.orientation&&{marginLeft:12},t.alternativeLabel&&{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})})),w=(0,c.Ay)("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${(0,f.A)(n.orientation)}`]]}})((e=>{let{ownerState:t,theme:n}=e;const r="light"===n.palette.mode?n.palette.grey[400]:n.palette.grey[600];return(0,o.A)({display:"block",borderColor:n.vars?n.vars.palette.StepConnector.border:r},"horizontal"===t.orientation&&{borderTopStyle:"solid",borderTopWidth:1},"vertical"===t.orientation&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})})),x=a.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiStepConnector"}),{className:c}=n,u=(0,r.A)(n,y),{alternativeLabel:d,orientation:p="horizontal"}=a.useContext(h.A),{active:x,disabled:C,completed:A}=a.useContext(m.A),S=(0,o.A)({},n,{alternativeLabel:d,orientation:p,active:x,completed:A,disabled:C}),k=(e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:a,disabled:i}=e,l={root:["root",n,r&&"alternativeLabel",o&&"active",a&&"completed",i&&"disabled"],line:["line",`line${(0,f.A)(n)}`]};return(0,s.A)(l,g,t)})(S);return(0,v.jsx)(b,(0,o.A)({className:(0,i.A)(k.root,c),ref:t,ownerState:S},u,{children:(0,v.jsx)(w,{className:k.line,ownerState:S})}))})),C=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],A=(0,c.Ay)("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel]}})((e=>{let{ownerState:t}=e;return(0,o.A)({display:"flex"},"horizontal"===t.orientation&&{flexDirection:"row",alignItems:"center"},"vertical"===t.orientation&&{flexDirection:"column"},t.alternativeLabel&&{alignItems:"flex-start"})})),S=(0,v.jsx)(x,{}),k=a.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiStepper"}),{activeStep:c=0,alternativeLabel:u=!1,children:d,className:f,component:m="div",connector:g=S,nonLinear:y=!1,orientation:b="horizontal"}=n,w=(0,r.A)(n,C),x=(0,o.A)({},n,{alternativeLabel:u,orientation:b,component:m}),k=(e=>{const{orientation:t,alternativeLabel:n,classes:r}=e,o={root:["root",t,n&&"alternativeLabel"]};return(0,s.A)(o,p,r)})(x),M=a.Children.toArray(d).filter(Boolean),E=M.map(((e,t)=>a.cloneElement(e,(0,o.A)({index:t,last:t+1===M.length},e.props)))),R=a.useMemo((()=>({activeStep:c,alternativeLabel:u,connector:g,nonLinear:y,orientation:b})),[c,u,g,y,b]);return(0,v.jsx)(h.A.Provider,{value:R,children:(0,v.jsx)(A,(0,o.A)({as:m,ownerState:x,className:(0,i.A)(k.root,f),ref:t},w,{children:E}))})}))},55442:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=n(9950).createContext({});const o=r},53924:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(7083),c=n(24184),u=n(61676),d=n(48283),p=n(59254),f=n(1763),h=n(423);function m(e){return(0,h.Ay)("MuiToggleButton",e)}const g=(0,f.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]);var v=n(44414);const y=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],b=(0,p.Ay)(c.A,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${(0,u.A)(n.size)}`]]}})((e=>{let t,{theme:n,ownerState:r}=e,a="standard"===r.color?n.palette.text.primary:n.palette[r.color].main;return n.vars&&(a="standard"===r.color?n.vars.palette.text.primary:n.vars.palette[r.color].main,t="standard"===r.color?n.vars.palette.text.primaryChannel:n.vars.palette[r.color].mainChannel),(0,o.A)({},n.typography.button,{borderRadius:(n.vars||n).shape.borderRadius,padding:11,border:`1px solid ${(n.vars||n).palette.divider}`,color:(n.vars||n).palette.action.active},r.fullWidth&&{width:"100%"},{[`&.${g.disabled}`]:{color:(n.vars||n).palette.action.disabled,border:`1px solid ${(n.vars||n).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:n.vars?`rgba(${n.vars.palette.text.primaryChannel} / ${n.vars.palette.action.hoverOpacity})`:(0,l.X4)(n.palette.text.primary,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g.selected}`]:{color:a,backgroundColor:n.vars?`rgba(${t} / ${n.vars.palette.action.selectedOpacity})`:(0,l.X4)(a,n.palette.action.selectedOpacity),"&:hover":{backgroundColor:n.vars?`rgba(${t} / calc(${n.vars.palette.action.selectedOpacity} + ${n.vars.palette.action.hoverOpacity}))`:(0,l.X4)(a,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:n.vars?`rgba(${t} / ${n.vars.palette.action.selectedOpacity})`:(0,l.X4)(a,n.palette.action.selectedOpacity)}}}},"small"===r.size&&{padding:7,fontSize:n.typography.pxToRem(13)},"large"===r.size&&{padding:15,fontSize:n.typography.pxToRem(15)})})),w=a.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiToggleButton"}),{children:a,className:l,color:c="standard",disabled:p=!1,disableFocusRipple:f=!1,fullWidth:h=!1,onChange:g,onClick:w,selected:x,size:C="medium",value:A}=n,S=(0,r.A)(n,y),k=(0,o.A)({},n,{color:c,disabled:p,disableFocusRipple:f,fullWidth:h,size:C}),M=(e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:a,color:i}=e,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${(0,u.A)(a)}`,i]};return(0,s.A)(l,m,t)})(k);return(0,v.jsx)(b,(0,o.A)({className:(0,i.A)(M.root,l),disabled:p,focusRipple:!f,ref:t,onClick:e=>{w&&(w(e,A),e.defaultPrevented)||g&&g(e,A)},onChange:g,value:A,ownerState:k,"aria-pressed":x},S,{children:a}))}))},77369:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(98587),o=n(58168),a=n(9950),i=(n(26429),n(72004)),s=n(88465),l=n(59254),c=n(48283),u=n(61676);function d(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}var p=n(1763),f=n(423);function h(e){return(0,f.Ay)("MuiToggleButtonGroup",e)}const m=(0,p.A)("MuiToggleButtonGroup",["root","selected","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth"]);var g=n(44414);const v=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],y=(0,l.Ay)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${m.grouped}`]:t.grouped},{[`& .${m.grouped}`]:t[`grouped${(0,u.A)(n.orientation)}`]},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((e=>{let{ownerState:t,theme:n}=e;return(0,o.A)({display:"inline-flex",borderRadius:(n.vars||n).shape.borderRadius},"vertical"===t.orientation&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{[`& .${m.grouped}`]:(0,o.A)({},"horizontal"===t.orientation?{"&:not(:first-of-type)":{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-of-type)":{borderTopRightRadius:0,borderBottomRightRadius:0},[`&.${m.selected} + .${m.grouped}.${m.selected}`]:{borderLeft:0,marginLeft:0}}:{"&:not(:first-of-type)":{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},"&:not(:last-of-type)":{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`&.${m.selected} + .${m.grouped}.${m.selected}`]:{borderTop:0,marginTop:0}})})})),b=a.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiToggleButtonGroup"}),{children:l,className:p,color:f="standard",disabled:m=!1,exclusive:b=!1,fullWidth:w=!1,onChange:x,orientation:C="horizontal",size:A="medium",value:S}=n,k=(0,r.A)(n,v),M=(0,o.A)({},n,{disabled:m,fullWidth:w,orientation:C,size:A}),E=(e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,a={root:["root","vertical"===n&&"vertical",r&&"fullWidth"],grouped:["grouped",`grouped${(0,u.A)(n)}`,o&&"disabled"]};return(0,s.A)(a,h,t)})(M),R=(e,t)=>{if(!x)return;const n=S&&S.indexOf(t);let r;S&&n>=0?(r=S.slice(),r.splice(n,1)):r=S?S.concat(t):[t],x(e,r)},P=(e,t)=>{x&&x(e,S===t?null:t)};return(0,g.jsx)(y,(0,o.A)({role:"group",className:(0,i.A)(E.root,p),ref:t,ownerState:M},k,{children:a.Children.map(l,(e=>a.isValidElement(e)?a.cloneElement(e,{className:(0,i.A)(E.grouped,e.props.className),onChange:b?P:R,selected:void 0===e.props.selected?d(e.props.value,S):e.props.selected,size:e.props.size||A,fullWidth:w,color:e.props.color||f,disabled:e.props.disabled||m}):null))}))}))},83239:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(88465),l=n(48283),c=n(59254),u=n(1763),d=n(423);function p(e){return(0,d.Ay)("MuiToolbar",e)}(0,u.A)("MuiToolbar",["root","gutters","regular","dense"]);var f=n(44414);const h=["className","component","disableGutters","variant"],m=(0,c.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===n.variant&&{minHeight:48})}),(e=>{let{theme:t,ownerState:n}=e;return"regular"===n.variant&&t.mixins.toolbar})),g=a.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiToolbar"}),{className:a,component:c="div",disableGutters:u=!1,variant:d="regular"}=n,g=(0,r.A)(n,h),v=(0,o.A)({},n,{component:c,disableGutters:u,variant:d}),y=(e=>{const{classes:t,disableGutters:n,variant:r}=e,o={root:["root",!n&&"gutters",r]};return(0,s.A)(o,p,t)})(v);return(0,f.jsx)(m,(0,o.A)({as:c,className:(0,i.A)(y.root,a),ref:t,ownerState:v},g))}))},82053:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),o=n(58168),a=n(9950),i=n(72004),s=n(80237),l=n(88465),c=n(59254),u=n(48283),d=n(61676),p=n(1763),f=n(423);function h(e){return(0,f.Ay)("MuiTypography",e)}(0,p.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var m=n(44414);const g=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],v=(0,c.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,d.A)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=a.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiTypography"}),a=(e=>b[e]||e)(n.color),c=(0,s.A)((0,o.A)({},n,{color:a})),{align:p="inherit",className:f,component:w,gutterBottom:x=!1,noWrap:C=!1,paragraph:A=!1,variant:S="body1",variantMapping:k=y}=c,M=(0,r.A)(c,g),E=(0,o.A)({},c,{align:p,color:a,className:f,component:w,gutterBottom:x,noWrap:C,paragraph:A,variant:S,variantMapping:k}),R=w||(A?"p":k[S]||y[S])||"span",P=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:i}=e,s={root:["root",a,"inherit"!==e.align&&`align${(0,d.A)(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,l.A)(s,h,i)})(E);return(0,m.jsx)(v,(0,o.A)({as:R,ref:t,ownerState:E,className:(0,i.A)(P.root,f)},M))}))},58094:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(58168),o=n(98587),a=n(9950),i=n(72004),s=n(35447),l=n(423),c=n(88465),u=n(95955),d=n(62161),p=n(7148),f=n(80237),h=n(18970);const m=(e,t,n)=>{const r=e.keys[0];if(Array.isArray(t))t.forEach(((t,r)=>{n(((t,n)=>{r<=e.keys.length-1&&(0===r?Object.assign(t,n):t[e.up(e.keys[r])]=n)}),t)}));else if(t&&"object"===typeof t){(Object.keys(t).length>e.keys.length?e.keys:(o=e.keys,a=Object.keys(t),o.filter((e=>a.includes(e))))).forEach((o=>{if(-1!==e.keys.indexOf(o)){const a=t[o];void 0!==a&&n(((t,n)=>{r===o?Object.assign(t,n):t[e.up(o)]=n}),a)}}))}else"number"!==typeof t&&"string"!==typeof t||n(((e,t)=>{Object.assign(e,t)}),t);var o,a};function g(e){return e?`Level${e}`:""}function v(e){return e.unstable_level>0&&e.container}function y(e){return function(t){return`var(--Grid-${t}Spacing${g(e.unstable_level)})`}}function b(e){return function(t){return 0===e.unstable_level?`var(--Grid-${t}Spacing)`:`var(--Grid-${t}Spacing${g(e.unstable_level-1)})`}}function w(e){return 0===e.unstable_level?"var(--Grid-columns)":`var(--Grid-columns${g(e.unstable_level-1)})`}const x=e=>{let{theme:t,ownerState:n}=e;const r=y(n),o={};return m(t.breakpoints,n.gridSize,((e,t)=>{let a={};!0===t&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"===typeof t&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / ${w(n)}${v(n)?` + ${r("column")}`:""})`}),e(o,a)})),o},C=e=>{let{theme:t,ownerState:n}=e;const r={};return m(t.breakpoints,n.gridOffset,((e,t)=>{let o={};"auto"===t&&(o={marginLeft:"auto"}),"number"===typeof t&&(o={marginLeft:0===t?"0px":`calc(100% * ${t} / ${w(n)})`}),e(r,o)})),r},A=e=>{let{theme:t,ownerState:n}=e;if(!n.container)return{};const r=v(n)?{[`--Grid-columns${g(n.unstable_level)}`]:w(n)}:{"--Grid-columns":12};return m(t.breakpoints,n.columns,((e,t)=>{e(r,{[`--Grid-columns${g(n.unstable_level)}`]:t})})),r},S=e=>{let{theme:t,ownerState:n}=e;if(!n.container)return{};const r=b(n),o=v(n)?{[`--Grid-rowSpacing${g(n.unstable_level)}`]:r("row")}:{};return m(t.breakpoints,n.rowSpacing,((e,r)=>{var a;e(o,{[`--Grid-rowSpacing${g(n.unstable_level)}`]:"string"===typeof r?r:null==(a=t.spacing)?void 0:a.call(t,r)})})),o},k=e=>{let{theme:t,ownerState:n}=e;if(!n.container)return{};const r=b(n),o=v(n)?{[`--Grid-columnSpacing${g(n.unstable_level)}`]:r("column")}:{};return m(t.breakpoints,n.columnSpacing,((e,r)=>{var a;e(o,{[`--Grid-columnSpacing${g(n.unstable_level)}`]:"string"===typeof r?r:null==(a=t.spacing)?void 0:a.call(t,r)})})),o},M=e=>{let{theme:t,ownerState:n}=e;if(!n.container)return{};const r={};return m(t.breakpoints,n.direction,((e,t)=>{e(r,{flexDirection:t})})),r},E=e=>{let{ownerState:t}=e;const n=y(t),o=b(t);return(0,r.A)({minWidth:0,boxSizing:"border-box"},t.container&&(0,r.A)({display:"flex",flexWrap:"wrap"},t.wrap&&"wrap"!==t.wrap&&{flexWrap:t.wrap},{margin:`calc(${n("row")} / -2) calc(${n("column")} / -2)`},t.disableEqualOverflow&&{margin:`calc(${n("row")} * -1) 0px 0px calc(${n("column")} * -1)`}),(!t.container||v(t))&&(0,r.A)({padding:`calc(${o("row")} / 2) calc(${o("column")} / 2)`},(t.disableEqualOverflow||t.parentDisableEqualOverflow)&&{padding:`${o("row")} 0px 0px ${o("column")}`}))},R=e=>{const t=[];return Object.entries(e).forEach((e=>{let[n,r]=e;!1!==r&&void 0!==r&&t.push(`grid-${n}-${String(r)}`)})),t},P=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"xs";function n(e){return void 0!==e&&("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e&&e>0)}if(n(e))return[`spacing-${t}-${String(e)}`];if("object"===typeof e&&!Array.isArray(e)){const t=[];return Object.entries(e).forEach((e=>{let[r,o]=e;n(o)&&t.push(`spacing-${r}-${String(o)}`)})),t}return[]},I=e=>void 0===e?[]:"object"===typeof e?Object.entries(e).map((e=>{let[t,n]=e;return`direction-${t}-${n}`})):[`direction-xs-${String(e)}`];var D=n(44414);const N=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],$=(0,h.A)(),O=(0,u.A)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function T(e){return(0,d.A)({props:e,name:"MuiGrid",defaultTheme:$})}var _=n(59254),j=n(48283);const F=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=O,useThemeProps:n=T,componentName:u="MuiGrid"}=e,d=a.createContext(void 0),h=t(A,k,S,x,M,E,C),m=a.forwardRef((function(e,t){var m,g,v,y,b,w,x,C;const A=(0,p.A)(),S=n(e),k=(0,f.A)(S),M=a.useContext(d),{className:E,children:$,columns:O=12,container:T=!1,component:_="div",direction:j="row",wrap:F="wrap",spacing:L=0,rowSpacing:V=L,columnSpacing:z=L,disableEqualOverflow:H,unstable_level:B=0}=k,G=(0,o.A)(k,N);let W=H;B&&void 0!==H&&(W=e.disableEqualOverflow);const U={},K={},q={};Object.entries(G).forEach((e=>{let[t,n]=e;void 0!==A.breakpoints.values[t]?U[t]=n:void 0!==A.breakpoints.values[t.replace("Offset","")]?K[t.replace("Offset","")]=n:q[t]=n}));const Y=null!=(m=e.columns)?m:B?void 0:O,X=null!=(g=e.spacing)?g:B?void 0:L,Z=null!=(v=null!=(y=e.rowSpacing)?y:e.spacing)?v:B?void 0:V,Q=null!=(b=null!=(w=e.columnSpacing)?w:e.spacing)?b:B?void 0:z,J=(0,r.A)({},k,{level:B,columns:Y,container:T,direction:j,wrap:F,spacing:X,rowSpacing:Z,columnSpacing:Q,gridSize:U,gridOffset:K,disableEqualOverflow:null!=(x=null!=(C=W)?C:M)&&x,parentDisableEqualOverflow:M}),ee=((e,t)=>{const{container:n,direction:r,spacing:o,wrap:a,gridSize:i}=e,s={root:["root",n&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...I(r),...R(i),...n?P(o,t.breakpoints.keys[0]):[]]};return(0,c.A)(s,(e=>(0,l.Ay)(u,e)),{})})(J,A);let te=(0,D.jsx)(h,(0,r.A)({ref:t,as:_,ownerState:J,className:(0,i.A)(ee.root,E)},q,{children:a.Children.map($,(e=>{var t;return a.isValidElement(e)&&(0,s.A)(e,["Grid"])?a.cloneElement(e,{unstable_level:null!=(t=e.props.unstable_level)?t:B+1}):e}))}));return void 0!==W&&W!==(null!=M&&M)&&(te=(0,D.jsx)(d.Provider,{value:W,children:te})),te}));return m.muiName="Grid",m}({createStyledComponent:(0,_.Ay)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>(0,j.A)({props:e,name:"MuiGrid2"})}),L=F},68489:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(9950);var r=n(65471),o=n(44414);const a=(0,r.A)((0,o.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage")},88113:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(9950);var r=n(65471),o=n(44414);const a=(0,r.A)((0,o.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage")},80237:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(58168),o=n(98587),a=n(87483),i=n(98076);const s=["sx"],l=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:i.A;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r};function c(e){const{sx:t}=e,n=(0,o.A)(e,s),{systemProps:i,otherProps:c}=l(n);let u;return u=Array.isArray(t)?[i,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,a.Q)(e)?(0,r.A)({},i,e):i}:(0,r.A)({},i,t),(0,r.A)({},c,{sx:u})}},95955:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(73891).Ay)()},52444:(e,t,n)=>{"use strict";n.d(t,{C:()=>Sd});var r=n(58168),o=n(9950),a=n(11942),i=n.n(a),s=n(69282),l=n(43514);var c=n(8332),u=n(46989);const d=o.createContext(void 0);function p(){const e=o.useContext(d);if(void 0===e)throw new Error(["MUI: Could not find the data grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join("\n"));return e}var f=n(12210),h=n(44414);function m(e){let{privateApiRef:t,props:n,children:r}=e;const a=o.useRef(t.current.getPublicApi());return(0,h.jsx)(f.y.Provider,{value:n,children:(0,h.jsx)(d.Provider,{value:t,children:(0,h.jsx)(u.k.Provider,{value:a,children:r})})})}var g=n(98587),v=n(72004),y=n(35501),b=n(88465),w=n(5393),x=n(61399),C=n(7083),A=n(59254),S=n(24005);const k={[`.${S.x.columnSeparator}, .${S.x["columnSeparator--resizing"]}`]:{visibility:"visible",width:"auto"}},M={[`& .${S.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${S.x.menuIcon}`]:{width:"auto",visibility:"visible"}},E=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${S.x.autoHeight}`]:t.autoHeight},{[`&.${S.x.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${S.x["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${S.x["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${S.x["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${S.x.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${S.x["root--disableUserSelection"]} .${S.x.cell}`]:t["root--disableUserSelection"]},{[`&.${S.x.autosizing}`]:t.autosizing},{[`& .${S.x.editBooleanCell}`]:t.editBooleanCell},{[`& .${S.x["cell--editing"]}`]:t["cell--editing"]},{[`& .${S.x["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${S.x["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${S.x["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${S.x["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${S.x.cell}`]:t.cell},{[`& .${S.x["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${S.x["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${S.x["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${S.x["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${S.x["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${S.x.cellContent}`]:t.cellContent},{[`& .${S.x.cellCheckbox}`]:t.cellCheckbox},{[`& .${S.x.cellSkeleton}`]:t.cellSkeleton},{[`& .${S.x.checkboxInput}`]:t.checkboxInput},{[`& .${S.x["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${S.x["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${S.x["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${S.x["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${S.x["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${S.x["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${S.x["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${S.x["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${S.x["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${S.x.columnHeader}`]:t.columnHeader},{[`& .${S.x.headerFilterRow}`]:t.headerFilterRow},{[`& .${S.x.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${S.x.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${S.x.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${S.x["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${S.x["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${S.x.columnSeparator}`]:t.columnSeparator},{[`& .${S.x.filterIcon}`]:t.filterIcon},{[`& .${S.x.iconSeparator}`]:t.iconSeparator},{[`& .${S.x.menuIcon}`]:t.menuIcon},{[`& .${S.x.menuIconButton}`]:t.menuIconButton},{[`& .${S.x.menuOpen}`]:t.menuOpen},{[`& .${S.x.menuList}`]:t.menuList},{[`& .${S.x["row--editable"]}`]:t["row--editable"]},{[`& .${S.x["row--editing"]}`]:t["row--editing"]},{[`& .${S.x["row--dragging"]}`]:t["row--dragging"]},{[`& .${S.x.row}`]:t.row},{[`& .${S.x.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${S.x.rowReorderCell}`]:t.rowReorderCell},{[`& .${S.x["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${S.x.sortIcon}`]:t.sortIcon},{[`& .${S.x.withBorderColor}`]:t.withBorderColor},{[`& .${S.x.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${S.x.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${S.x.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${S.x["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})((e=>{let{theme:t}=e;const n=function(e){return e.vars?e.vars.palette.TableCell.border:"light"===e.palette.mode?(0,C.a)((0,C.X4)(e.palette.divider,1),.88):(0,C.e$)((0,C.X4)(e.palette.divider,1),.68)}(t),o=t.shape.borderRadius;return(0,r.A)({"--unstable_DataGrid-radius":"number"===typeof o?`${o}px`:o,"--unstable_DataGrid-headWeight":t.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":t.vars?`rgba(${t.vars.palette.background.defaultChannel} / ${t.vars.palette.action.disabledOpacity})`:(0,C.X4)(t.palette.background.default,t.palette.action.disabledOpacity),"--DataGrid-cellOffsetMultiplier":2,flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:n,borderRadius:"var(--unstable_DataGrid-radius)",color:(t.vars||t).palette.text.primary},t.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflowAnchor:"none",[`&.${S.x.autoHeight}`]:{height:"auto",[`& .${S.x["row--lastVisible"]} .${S.x.cell}`]:{borderBottomColor:"transparent"}},[`&.${S.x.autosizing}`]:{[`& .${S.x.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},[`& .${S.x.cell} > *`]:{overflow:"visible !important",whiteSpace:"nowrap"}},[`& .${S.x["virtualScrollerContent--overflowed"]} .${S.x["row--lastVisible"]} .${S.x.cell}`]:{borderBottomColor:"transparent"},[`& .${S.x.columnHeader}, & .${S.x.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${S.x.columnHeader}:focus-within, & .${S.x.cell}:focus-within`]:{outline:`solid ${t.vars?`rgba(${t.vars.palette.primary.mainChannel} / 0.5)`:(0,C.X4)(t.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${S.x.columnHeader}:focus, & .${S.x.cell}:focus`]:{outline:`solid ${t.palette.primary.main} 1px`},[`& .${S.x.columnHeaderCheckbox}, & .${S.x.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${S.x.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${S.x["columnHeader--sorted"]} .${S.x.iconButtonContainer}, & .${S.x["columnHeader--filtered"]} .${S.x.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${S.x.columnHeader}:not(.${S.x["columnHeader--sorted"]}) .${S.x.sortIcon}`]:{opacity:0,transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.shorter})},[`& .${S.x.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden",position:"relative"},[`& .${S.x.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${S.x["columnHeader--filledGroup"]} .${S.x.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${S.x["columnHeader--filledGroup"]}.${S.x["columnHeader--showColumnBorder"]} .${S.x.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${S.x["columnHeader--filledGroup"]}.${S.x["columnHeader--showColumnBorder"]}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${S.x.headerFilterRow}`]:{borderTop:`1px solid ${n}`},[`& .${S.x.sortIcon}, & .${S.x.filterIcon}`]:{fontSize:"inherit"},[`& .${S.x["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${S.x["columnHeader--alignCenter"]} .${S.x.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${S.x["columnHeader--alignRight"]} .${S.x.columnHeaderDraggableContainer}, & .${S.x["columnHeader--alignRight"]} .${S.x.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${S.x["columnHeader--alignCenter"]} .${S.x.menuIcon}, & .${S.x["columnHeader--alignRight"]} .${S.x.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${S.x["columnHeader--alignRight"]} .${S.x.menuIcon}, & .${S.x["columnHeader--alignRight"]} .${S.x.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${S.x["columnHeader--moving"]}`]:{backgroundColor:(t.vars||t).palette.action.hover},[`& .${S.x.columnSeparator}`]:{visibility:"hidden",position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:n},"@media (hover: hover)":{[`& .${S.x.columnHeaders}:hover`]:k,[`& .${S.x.columnHeader}:hover`]:M,[`& .${S.x.columnHeader}:not(.${S.x["columnHeader--sorted"]}):hover .${S.x.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${S.x.columnHeaders}`]:k,[`& .${S.x.columnHeader}`]:M},[`& .${S.x["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${S.x["columnSeparator--sideRight"]}`]:{right:-12},[`& .${S.x["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:(t.vars||t).palette.text.primary,"@media (hover: none)":{color:n}},[`&.${S.x["columnSeparator--resizing"]}`]:{color:(t.vars||t).palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${S.x.iconSeparator}`]:{color:"inherit"},[`& .${S.x.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`.${S.x.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${S.x.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,C.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(\n ${t.vars.palette.action.selectedOpacity} + \n ${t.vars.palette.action.hoverOpacity}\n ))`:(0,C.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,C.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}}}},[`& .${S.x.cell}`]:{display:"flex",alignItems:"center",borderBottom:"1px solid","&.Mui-selected":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,C.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity+t.palette.action.hoverOpacity})`:(0,C.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,C.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}}}},[`&.${S.x["root--disableUserSelection"]} .${S.x.cell}`]:{userSelect:"none"},[`& .${S.x.row}:not(.${S.x["row--dynamicHeight"]}) > .${S.x.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${S.x.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${S.x.cell}.${S.x["cell--selectionMode"]}`]:{cursor:"default"},[`& .${S.x.cell}.${S.x["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:t.shadows[2],backgroundColor:(t.vars||t).palette.background.paper,"&:focus-within":{outline:`solid ${(t.vars||t).palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${S.x["row--editing"]}`]:{boxShadow:t.shadows[2]},[`& .${S.x["row--editing"]} .${S.x.cell}`]:{boxShadow:t.shadows[0],backgroundColor:(t.vars||t).palette.background.paper},[`& .${S.x.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${S.x.booleanCell}[data-value="true"]`]:{color:(t.vars||t).palette.text.secondary},[`& .${S.x.booleanCell}[data-value="false"]`]:{color:(t.vars||t).palette.text.disabled},[`& .${S.x.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:t.spacing(1)},[`& .${S.x.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(t.vars||t).palette.action.disabledOpacity},[`& .${S.x["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${S.x.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`.${S.x.withBorderColor}`]:{borderColor:n},[`& .${S.x["cell--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${S.x["columnHeader--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${S.x["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${S.x["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${S.x["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${S.x.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${S.x.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${S.x["columnHeader--dragging"]}, & .${S.x["row--dragging"]}`]:{background:(t.vars||t).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(t.vars||t).palette.action.disabledOpacity},[`& .${S.x["row--dragging"]}`]:{background:(t.vars||t).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(t.vars||t).palette.action.disabledOpacity,[`& .${S.x.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${S.x.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${S.x.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:t.spacing(2)},[`& .${S.x.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${S.x.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:t.spacing(2)}})}));var R=n(60539),P=n(90953);const I=e=>e.density,D=(0,P.Mz)(I,(e=>e.value)),N=(0,P.Mz)(I,(e=>e.factor));var $=n(44032);const O=e=>e.columnGrouping,T=(0,P.S)(O,(e=>{var t;return null!=(t=null==e?void 0:e.unwrappedGroupingModel)?t:{}})),_=(0,P.S)(O,(e=>{var t;return null!=(t=null==e?void 0:e.lookup)?t:{}})),j=(0,P.S)(O,(e=>{var t;return null!=(t=null==e?void 0:e.headerStructure)?t:[]})),F=(0,P.Mz)(O,(e=>{var t;return null!=(t=null==e?void 0:e.maxDepth)?t:0}));var L=n(18560);const V=()=>{var e;const t=p(),n=(0,R.A)(),r=(0,c.N)(t,$.iv),o=(0,c.N)(t,L.H0),a=(0,c.N)(t,F),i=(0,c.N)(t,L.OQ);let s="grid";return null!=(e=n.experimentalFeatures)&&e.ariaV7&&n.treeData&&(s="treegrid"),{role:s,"aria-colcount":r.length,"aria-rowcount":a+1+i+o,"aria-multiselectable":!n.disableMultipleRowSelection}},z=["children","className"],H=o.forwardRef((function(e,t){var n;const a=(0,R.A)(),{children:i,className:s}=e,l=(0,g.A)(e,z),u=p(),d=(0,c.N)(u,D),f=o.useRef(null),m=(0,w.A)(f,t),C=null!=(n=a.experimentalFeatures)&&n.ariaV7?null:V,A="function"===typeof C?C():null,k=(0,r.A)({},a,{density:d}),M=(e=>{const{autoHeight:t,density:n,classes:r}=e,o={root:["root",t&&"autoHeight",`root--density${(0,y.A)(n)}`,"withBorderColor"]};return(0,b.A)(o,S.B,r)})(k);u.current.register("public",{rootElementRef:f});const[P,I]=o.useState(!1);return(0,x.A)((()=>{I(!0)}),[]),P?(0,h.jsx)(E,(0,r.A)({ref:m,className:(0,v.A)(s,M.root),ownerState:k},A,l,{children:i})):null}));function B(){var e,t;const n=(0,R.A)();return(0,h.jsxs)(o.Fragment,{children:[(0,h.jsx)(n.slots.preferencesPanel,(0,r.A)({},null==(e=n.slotProps)?void 0:e.preferencesPanel)),n.slots.toolbar&&(0,h.jsx)(n.slots.toolbar,(0,r.A)({},null==(t=n.slotProps)?void 0:t.toolbar))]})}var G=n(95955);const W=(0,G.A)("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})((()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"}))),U=o.forwardRef(((e,t)=>{var n;const o=(0,R.A)(),a=(e=>{const{classes:t}=e;return(0,b.A)({root:["main"]},S.B,t)})(o),i=null!=(n=o.experimentalFeatures)&&n.ariaV7?V:null,s="function"===typeof i?i():null;return(0,h.jsx)(W,(0,r.A)({ref:t,className:a.root,ownerState:o},s,{children:e.children}))}));var K=n(31488);const q=e=>e.filter,Y=(0,P.Mz)(q,(e=>e.filterModel)),X=((0,P.Mz)(Y,(e=>e.quickFilterValues)),(0,P.Mz)(q,(e=>e.filteredRowsLookup))),Z=(0,P.Mz)(q,(e=>e.filteredDescendantCountLookup)),Q=(0,P.S)((e=>e.visibleRowsLookup),K.J6,((e,t)=>t.filter((t=>!1!==e[t.id])))),J=(0,P.S)(Q,(e=>e.map((e=>e.id)))),ee=(0,P.S)(X,K.J6,((e,t)=>t.filter((t=>!1!==e[t.id])))),te=(0,P.S)(ee,(e=>e.map((e=>e.id)))),ne=(0,P.S)(Q,L.qj,L.V2,((e,t,n)=>n<2?e:e.filter((e=>{var n;return 0===(null==(n=t[e.id])?void 0:n.depth)})))),re=(0,P.Mz)(Q,(e=>e.length)),oe=(0,P.Mz)(ne,(e=>e.length)),ae=(0,P.S)(Y,$.gv,((e,t)=>{var n;return null==(n=e.items)?void 0:n.filter((e=>{var n,r;if(!e.field)return!1;const o=t[e.field];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.operator));return!!a&&(!a.InputComponent||null!=e.value&&""!==(null==(r=e.value)?void 0:r.toString()))}))})),ie=(0,P.S)(ae,(e=>e.reduce(((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e)),{}))),se=e=>e.focus,le=(0,P.Mz)(se,(e=>e.cell)),ce=(0,P.Mz)(se,(e=>e.columnHeader)),ue=(0,P.Mz)(se,(e=>e.columnHeaderFilter)),de=(0,P.Mz)(se,(e=>e.columnGroupHeader)),pe=e=>e.tabIndex,fe=(0,P.Mz)(pe,(e=>e.cell)),he=(0,P.Mz)(pe,(e=>e.columnHeader)),me=(0,P.Mz)(pe,(e=>e.columnHeaderFilter)),ge=(0,P.Mz)(pe,(e=>e.columnGroupHeader)),ve=e=>e.columnMenu;function ye(e){const{VirtualScrollerComponent:t,ColumnHeadersProps:n,children:a}=e,i=p(),s=(0,R.A)(),l=o.useRef(null),u=(0,c.N)(i,$.iv),d=(0,c.N)(i,ie),f=(0,c.N)(i,K.oF),m=(0,c.N)(i,$.Sw),g=(0,c.N)(i,he),v=(0,c.N)(i,fe),y=(0,c.N)(i,ge),b=(0,c.N)(i,ce),w=(0,c.N)(i,de),C=(0,c.N)(i,N),A=(0,c.N)(i,F),S=(0,c.N)(i,ve),k=(0,c.N)(i,$.FY),M=(0,c.N)(i,j),E=!(null===y&&null===g&&null===v);(0,x.A)((()=>{i.current.computeSizeAndPublishResizeEvent();const e=l.current;if("undefined"===typeof ResizeObserver)return()=>{};let t;const n=new ResizeObserver((()=>{t=requestAnimationFrame((()=>{i.current.computeSizeAndPublishResizeEvent()}))}));return e&&n.observe(e),()=>{t&&window.cancelAnimationFrame(t),e&&n.unobserve(e)}}),[i]);const P=o.useRef(null),I=o.useRef(null),D=o.useRef(null);i.current.register("private",{columnHeadersContainerElementRef:I,columnHeadersElementRef:P,virtualScrollerRef:D,mainElementRef:l});const O=!!i.current.getRootDimensions();return(0,h.jsxs)(U,{ref:l,children:[(0,h.jsx)(s.slots.columnHeaders,(0,r.A)({ref:I,innerRef:P,visibleColumns:u,filterColumnLookup:d,sortColumnLookup:f,columnPositions:m,columnHeaderTabIndexState:g,columnGroupHeaderTabIndexState:y,columnHeaderFocus:b,columnGroupHeaderFocus:w,densityFactor:C,headerGroupingMaxDepth:A,columnMenuState:S,columnVisibility:k,columnGroupsHeaderStructure:M,hasOtherElementInTabSequence:E},n)),O&&(0,h.jsx)(t,{ref:D}),a]})}function be(){var e;const t=(0,R.A)();return t.hideFooter?null:(0,h.jsx)(t.slots.footer,(0,r.A)({},null==(e=t.slotProps)?void 0:e.footer))}var we=n(28436);function xe(e,t,n){const r=o.useRef(!0);o.useEffect((()=>{r.current=!1,e.current.register(n,t)}),[e,n,t]),r.current&&e.current.register(n,t)}const Ce=(0,we.s3)()&&null!=window.localStorage.getItem("DEBUG"),Ae=()=>{},Se={debug:Ae,info:Ae,warn:Ae,error:Ae},ke=["debug","info","warn","error"];function Me(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console;const r=ke.indexOf(t);if(-1===r)throw new Error(`MUI: Log level ${t} not recognized.`);const o=ke.reduce(((t,o,a)=>(t[o]=a>=r?function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];const[i,...s]=r;n[o](`MUI: ${e} - ${i}`,...s)}:Ae,t)),{});return o}class Ee{static create(e){return new Ee(e)}constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach((t=>t(e)))},this.value=e,this.listeners=new Set}}class Re{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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)}}class Pe{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 Ie=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e}(Ie||{});class De{}const Ne={registry:null},$e=function(e){let t=0;return function(n,r,a,i){null===e.registry&&(e.registry="undefined"!==typeof FinalizationRegistry?new Pe:new Re);const[s]=o.useState(new De),l=o.useRef(null),c=o.useRef();c.current=a;const u=o.useRef(null);if(!l.current&&c.current){const o=(e,t,n)=>{var r;t.defaultMuiPrevented||(null==(r=c.current)||r.call(c,e,t,n))};l.current=n.current.subscribeEvent(r,o,i),t+=1,u.current={cleanupToken:t},e.registry.register(s,(()=>{var e;null==(e=l.current)||e.call(l),l.current=null,u.current=null}),u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));o.useEffect((()=>{if(!l.current&&c.current){const e=(e,t,n)=>{var r;t.defaultMuiPrevented||(null==(r=c.current)||r.call(c,e,t,n))};l.current=n.current.subscribeEvent(r,e,i)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var e;null==(e=l.current)||e.call(l),l.current=null}}),[n,r,i])}}(Ne),Oe={isFirst:!0};function Te(e,t,n){$e(e,t,n,Oe)}class _e{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},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){const t=this.events[e];if(!t)return;const n=Array.from(t.highPriority.keys()),r=Array.from(t.regular.keys());for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];for(let s=n.length-1;s>=0;s-=1){const e=n[s];t.highPriority.has(e)&&e.apply(this,a)}for(let s=0;s<r.length;s+=1){const e=r[s];t.regular.has(e)&&e.apply(this,a)}}once(e,t){const n=this;this.on(e,(function r(){n.removeListener(e,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];t.apply(n,a)}))}}const je=Symbol("mui.api_private");let Fe=0;function Le(e,t){const n=o.useRef(),r=o.useRef();r.current||(r.current=function(e){var t;const n=null==(t=e.current)?void 0:t[je];if(n)return n;const r={},o={state:r,store:Ee.create(r),instanceId:{id:Fe}};return Fe+=1,o.getPublicApi=()=>e.current,o.register=(t,n)=>{Object.keys(n).forEach((r=>{const a=n[r],i=o[r];if(!0===(null==i?void 0:i.spying)?i.target=a:o[r]=a,"public"===t){const t=e.current,n=t[r];!0===(null==n?void 0:n.spying)?n.target=a:t[r]=a}}))},o.register("private",{caches:{},eventManager:new _e}),o}(n)),n.current||(n.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[je]:e.current}}(r));const a=o.useCallback((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];const[a,i,s={}]=n;if(s.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(s)&&s.isPropagationStopped())return;const l=t.signature===Ie.DataGridPro?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(a,i,s,l)}),[r,t.signature]),i=o.useCallback(((e,t,n)=>{r.current.eventManager.on(e,t,n);const o=r.current;return()=>{o.eventManager.removeListener(e,t)}}),[r]);return xe(r,{subscribeEvent:i,publishEvent:a},"public"),o.useImperativeHandle(e,(()=>n.current),[n]),o.useEffect((()=>{const e=r.current;return()=>{e.publishEvent("unmount")}}),[r]),r}var Ve=n(49922);const ze="none",He={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},Be=(e,t)=>{const n=Le(e,t);return((e,t)=>{xe(e,{getLogger:o.useCallback((e=>Ce?Me(e,"debug",t.logger):t.logLevel?Me(e,t.logLevel.toString(),t.logger):Se),[t.logLevel,t.logger])},"private")})(n,t),((e,t)=>{const n=o.useRef({}),[,a]=o.useState(),i=o.useCallback((e=>{n.current[e.stateId]=e}),[]),s=o.useCallback(((r,o)=>{let a;if(a=(0,we.Tn)(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),e.current.store.update(a)),1===s.length){const{stateId:r,hasPropChanged:l}=s[0],c=n.current[r],u=c.stateSelector(a,e.current.instanceId);if(c.propOnChange&&l){const n=t.signature===Ie.DataGridPro?{api:e.current,reason:o}:{reason:o};c.propOnChange(u,n)}i||e.current.publishEvent(c.changeEvent,u,{reason:o})}return!i}),[e,t.signature]),l=o.useCallback(((t,n,o)=>e.current.setState((e=>(0,r.A)({},e,{[t]:n(e[t])})),o)),[e]),c=o.useCallback((()=>a((()=>e.current.state))),[e]),u={updateControlState:l,registerControlState:i};xe(e,{setState:s,forceUpdate:c},"public"),xe(e,u,"private")})(n,t),(e=>{const t=o.useRef({}),n=o.useRef(!1),r=o.useCallback((e=>{!n.current&&e&&(n.current=!0,Object.values(e.appliers).forEach((e=>{e()})),n.current=!1)}),[]),a=o.useCallback(((e,n,o)=>{t.current[e]||(t.current[e]={processors:new Map,appliers:{}});const a=t.current[e];return a.processors.get(n)!==o&&(a.processors.set(n,o),r(a)),()=>{t.current[e].processors.set(n,null)}}),[r]),i=o.useCallback(((e,n,r)=>(t.current[e]||(t.current[e]={processors:new Map,appliers:{}}),t.current[e].appliers[n]=r,()=>{const r=t.current[e].appliers,o=(0,g.A)(r,[n].map(Ve.A));t.current[e].appliers=o})),[]),s=o.useCallback((e=>{const n=t.current[e];r(n)}),[r]),l={unstable_applyPipeProcessors:o.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const[o,a,i]=n;return t.current[o]?Array.from(t.current[o].processors.values()).reduce(((e,t)=>t?t(e,i):e),a):a}),[])};xe(e,{registerPipeProcessor:a,registerPipeApplier:i,requestPipeProcessorsApplication:s},"private"),xe(e,l,"public")})(n),(e=>{const t=o.useRef(new Map),n=o.useRef({}),r=o.useCallback(((t,r,o)=>{const a=()=>{const e=n.current[r],o=(0,g.A)(e,[t].map(Ve.A));n.current[r]=o};n.current[r]||(n.current[r]={});const i=n.current[r],s=i[t];return i[t]=o,s&&s!==o?(t===e.current.getActiveStrategy(He[r])&&e.current.publishEvent("activeStrategyProcessorChange",r),a):a}),[e]),a=o.useCallback(((t,r)=>{const o=e.current.getActiveStrategy(He[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]),i=o.useCallback((e=>{var n;const r=Array.from(t.current.entries()).find((t=>{let[,n]=t;return n.group===e&&n.isAvailable()}));return null!=(n=null==r?void 0:r[0])?n:ze}),[]),s=o.useCallback(((n,r,o)=>{t.current.set(r,{group:n,isAvailable:o}),e.current.publishEvent("strategyAvailabilityChange")}),[e]);xe(e,{registerStrategyProcessor:r,applyStrategyProcessor:a,getActiveStrategy:i,setStrategyAvailability:s},"private")})(n),((e,t)=>{const n=o.useCallback((e=>{if(null==t.localeText[e])throw new Error(`Missing translation for key ${e}.`);return t.localeText[e]}),[t.localeText]);e.current.register("public",{getLocaleText:n})})(n,t),n.current.register("private",{rootProps:t}),n},Ge=e=>{const t=o.useRef(!0);t.current&&(t.current=!1,e())},We=(e,t,n)=>{const r=o.useRef(),a=o.useRef(`mui-${Math.round(1e9*Math.random())}`),i=o.useCallback((()=>{r.current=e.current.registerPipeProcessor(t,a.current,n)}),[e,n,t]);Ge((()=>{i()}));const s=o.useRef(!0);o.useEffect((()=>(s.current?s.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)})),[i])},Ue=e=>"Escape"===e,Ke=e=>"Enter"===e,qe=e=>"Tab"===e,Ye=e=>" "===e;function Xe(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const Ze=e=>(e=>"Home"===e||"End"===e)(e)||(e=>0===e.indexOf("Arrow"))(e)||(e=>0===e.indexOf("Page"))(e)||Ye(e);var Qe=n(22482);const Je=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],et=o.forwardRef((function(e,t){var n;const{field:a,id:i,value:s,rowNode:l,hasFocus:c,tabIndex:u}=e,d=(0,g.A)(e,Je),p=(0,Qe.h)(),f=(0,R.A)(),m=(e=>{const{classes:t}=e;return(0,b.A)({root:["checkboxInput"]},S.B,t)})({classes:f.classes}),v=o.useRef(null),y=o.useRef(null),x=(0,w.A)(v,t),C=p.current.getCellElement(i,a);o.useLayoutEffect((()=>{0===u&&C&&(C.tabIndex=-1)}),[C,u]),o.useEffect((()=>{if(c){var e;const t=null==(e=v.current)?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else y.current&&y.current.stop({})}),[c]);const A=o.useCallback((e=>{Ye(e.key)&&e.stopPropagation()}),[]);if("footer"===l.type||"pinnedRow"===l.type)return null;const k=p.current.isRowSelectable(i),M=p.current.getLocaleText(s?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,h.jsx)(f.slots.baseCheckbox,(0,r.A)({ref:x,tabIndex:u,checked:s,onChange:e=>{const t={value:e.target.checked,id:i};p.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:m.root,inputProps:{"aria-label":M},onKeyDown:A,disabled:!k,touchRippleRef:y},null==(n=f.slotProps)?void 0:n.baseCheckbox,d))})),tt=e=>e.rowSelection,nt=(0,P.Mz)(tt,(e=>e.length)),rt=(0,P.S)(tt,L.rI,((e,t)=>new Map(e.map((e=>[e,t[e]]))))),ot=(0,P.S)(tt,(e=>e.reduce(((e,t)=>(e[t]=t,e)),{})));var at=n(72489);const it=(e,t)=>t>0&&e>0?Math.ceil(e/t):0,st=((0,at.f)(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error"),e=>({page:0,pageSize:e?0:100})),lt=(e,t)=>{if(t===Ie.DataGrid&&e>100)throw new Error(["MUI: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))},ct=e=>e.pagination,ut=(0,P.Mz)(ct,(e=>e.paginationModel)),dt=(0,P.Mz)(ut,(e=>e.page)),pt=(0,P.Mz)(ut,(e=>e.pageSize)),ft=((0,P.Mz)(ut,oe,((e,t)=>it(t,e.pageSize))),(0,P.S)(ut,L.qj,L.V2,Q,ne,((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],c=s-i+1,u=r.findIndex((e=>e.id===l.id));let d=u,p=0;for(;d<r.length&&p<=c;){var f;const e=null==(f=t[r[d].id])?void 0:f.depth;void 0===e?d+=1:((p<c||e>0)&&(d+=1),0===e&&(p+=1))}return{firstRowIndex:u,lastRowIndex:d-1}}))),ht=(0,P.S)(Q,ft,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),mt=(0,P.S)(J,ft,((e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[])),gt=["field","colDef"],vt=o.forwardRef((function(e,t){var n;const a=(0,g.A)(e,gt),[,i]=o.useState(!1),s=(0,Qe.h)(),l=(0,R.A)(),u=(e=>{const{classes:t}=e;return(0,b.A)({root:["checkboxInput"]},S.B,t)})({classes:l.classes}),d=(0,c.N)(s,he),p=(0,c.N)(s,tt),f=(0,c.N)(s,J),m=(0,c.N)(s,mt),v=o.useMemo((()=>"function"!==typeof l.isRowSelectable?p:p.filter((e=>!!s.current.getRow(e)&&l.isRowSelectable(s.current.getRowParams(e))))),[s,l.isRowSelectable,p]),y=o.useMemo((()=>(l.pagination&&l.checkboxSelectionVisibleOnly?m:f).reduce(((e,t)=>(e[t]=!0,e)),{})),[l.pagination,l.checkboxSelectionVisibleOnly,m,f]),w=o.useMemo((()=>v.filter((e=>y[e])).length),[v,y]),x=w>0&&w<Object.keys(y).length,C=w>0,A=null!==d&&d.field===e.field?0:-1;o.useLayoutEffect((()=>{const t=s.current.getColumnHeaderElement(e.field);0===A&&t&&(t.tabIndex=-1)}),[A,s,e.field]);const k=o.useCallback((e=>{" "===e.key&&s.current.publishEvent("headerSelectionCheckboxChange",{value:!C})}),[s,C]),M=o.useCallback((()=>{i((e=>!e))}),[]);o.useEffect((()=>s.current.subscribeEvent("rowSelectionChange",M)),[s,M]);const E=s.current.getLocaleText(C?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,h.jsx)(l.slots.baseCheckbox,(0,r.A)({ref:t,indeterminate:x,checked:C,onChange:e=>{const t={value:e.target.checked};s.current.publishEvent("headerSelectionCheckboxChange",t)},className:u.root,inputProps:{"aria-label":E},tabIndex:A,onKeyDown:k},null==(n=l.slotProps)?void 0:n.baseCheckbox,a))}));var yt=n(49864);const bt="auto-generated-group-node-root",wt=Symbol("mui.id_autogenerated"),xt=()=>({type:"group",id:bt,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});const Ct=(e,t,n)=>{const r=t?t(e):e.id;return function(e,t){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.",arguments.length>2&&void 0!==arguments[2]?arguments[2]:"A row was provided without id in the rows prop:",JSON.stringify(t)].join("\n"))}(r,e,n),r},At=e=>{let{rows:t,getRowId:n,loading:r,rowCount:o}=e;const a={type:"full",rows:[]},i={},s={};for(let l=0;l<t.length;l+=1){const e=t[l],r=Ct(e,n);i[r]=e,s[r]=r,a.rows.push(r)}return{rowsBeforePartialUpdates:t,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:o,updates:a,dataRowIdToIdLookup:s,dataRowIdToModelLookup:i}},St=e=>{let{tree:t,rowCountProp:n=0}=e;const r=t[bt];return Math.max(n,r.children.length+(null==r.footerId?0:1))},kt=e=>{let{apiRef:t,rowCountProp:n=0,loadingProp:o,previousTree:a,previousTreeDepths:i}=e;const s=t.current.caches.rows,{tree:l,treeDepths:c,dataRowIds:u,groupingName:d}=t.current.applyStrategyProcessor("rowTreeCreation",{previousTree:a,previousTreeDepths:i,updates:s.updates,dataRowIdToIdLookup:s.dataRowIdToIdLookup,dataRowIdToModelLookup:s.dataRowIdToModelLookup}),p=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:l,treeDepths:c,dataRowIdToIdLookup:s.dataRowIdToIdLookup,dataRowIds:u,dataRowIdToModelLookup:s.dataRowIdToModelLookup});return t.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,r.A)({},p,{totalRowCount:Math.max(n,p.dataRowIds.length),totalTopLevelRowCount:St({tree:p.tree,rowCountProp:n}),groupingName:d,loading:o})},Mt=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,Et=(e,t,n)=>{const r=e[t];if("group"!==r.type)return[];const o=[];for(let a=0;a<r.children.length;a+=1){const t=r.children[a];n&&Mt(e[t])||o.push(t),o.push(...Et(e,t,n))}return n||null==r.footerId||o.push(r.footerId),o};function Rt(e){var t,n;const r=(0,L.$2)(e);return{top:(null==r||null==(t=r.top)?void 0:t.reduce(((t,n)=>t+=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}}function Pt(e,t){const n=N(e);return`var(--DataGrid-overlayHeight, ${2*Math.floor(t*n)}px)`}const It=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex"];function Dt(e){const{value:t}=e,n=(0,g.A)(e,It),a=(0,Qe.h)(),i=(0,R.A)(),s=(e=>{const{classes:t}=e;return(0,b.A)({root:["booleanCell"]},S.B,t)})({classes:i.classes}),l=o.useMemo((()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon),[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return(0,h.jsx)(l,(0,r.A)({fontSize:"small",className:s.root,titleAccess:a.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(t)},n))}const Nt=o.memo(Dt);var $t=n(93539);const Ot=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function Tt(e){var t;const{id:n,value:a,field:i,className:s,hasFocus:l,onValueChange:c}=e,u=(0,g.A)(e,Ot),d=(0,Qe.h)(),p=o.useRef(null),f=(0,$t.A)(),[m,y]=o.useState(a),w=(0,R.A)(),C=(e=>{const{classes:t}=e;return(0,b.A)({root:["editBooleanCell"]},S.B,t)})({classes:w.classes}),A=o.useCallback((async e=>{const t=e.target.checked;c&&await c(e,t),y(t),await d.current.setEditCellValue({id:n,field:i,value:t},e)}),[d,i,n,c]);return o.useEffect((()=>{y(a)}),[a]),(0,x.A)((()=>{l&&p.current.focus()}),[l]),(0,h.jsx)("label",(0,r.A)({htmlFor:f,className:(0,v.A)(C.root,s)},u,{children:(0,h.jsx)(w.slots.baseCheckbox,(0,r.A)({id:f,inputRef:p,checked:Boolean(m),onChange:A,size:"small"},null==(t=w.slotProps)?void 0:t.baseCheckbox))}))}var _t=n(94696);const jt=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","InputLabelProps"],Ft=(0,A.Ay)("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function Lt(e){var t,n,a,i;const{item:s,applyValue:l,apiRef:c,focusElementRef:u,clearButton:d,tabIndex:p,label:f}=e,m=(0,g.A)(e,jt),[v,y]=o.useState(s.value||""),b=(0,R.A)(),w=(0,$t.A)(),x=(0,$t.A)(),C=(null==(t=b.slotProps)?void 0:t.baseSelect)||{},A=null==(n=C.native)||n,S=(null==(a=b.slotProps)?void 0:a.baseSelectOption)||{},k=o.useCallback((e=>{const t=e.target.value;y(t),l((0,r.A)({},s,{value:t}))}),[l,s]);o.useEffect((()=>{y(s.value||"")}),[s.value]);const M=null!=f?f:c.current.getLocaleText("filterPanelInputLabel");return(0,h.jsxs)(Ft,{children:[(0,h.jsxs)(b.slots.baseFormControl,{fullWidth:!0,children:[(0,h.jsx)(b.slots.baseInputLabel,(0,r.A)({},null==(i=b.slotProps)?void 0:i.baseInputLabel,{id:w,shrink:!0,variant:"standard",children:M})),(0,h.jsxs)(b.slots.baseSelect,(0,r.A)({labelId:w,id:x,label:M,value:v,onChange:k,variant:"standard",native:A,displayEmpty:!0,inputProps:{ref:u,tabIndex:p}},m,C,{children:[(0,h.jsx)(b.slots.baseSelectOption,(0,r.A)({},S,{native:A,value:"",children:c.current.getLocaleText("filterValueAny")})),(0,h.jsx)(b.slots.baseSelectOption,(0,r.A)({},S,{native:A,value:"true",children:c.current.getLocaleText("filterValueTrue")})),(0,h.jsx)(b.slots.baseSelectOption,(0,r.A)({},S,{native:A,value:"false",children:c.current.getLocaleText("filterValueFalse")}))]}))]}),d]})}var Vt=n(10272);const zt=(0,r.A)({},yt.C,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>Mt(e.rowNode)?"":(0,h.jsx)(Nt,(0,r.A)({},e)),renderEditCell:e=>(0,h.jsx)(Tt,(0,r.A)({},e)),sortComparator:_t.Ou,valueFormatter:function(e){let{value:t,api:n}=e;return t?n.getLocaleText("booleanCellTrueLabel"):n.getLocaleText("booleanCellFalseLabel")},filterOperators:(0,Vt.eW)([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t="true"===e.value;return e=>Boolean(e)===t},InputComponent:Lt}]),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)}),Ht="__check__",Bt=(0,r.A)({},zt,{field:Ht,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>void 0!==ot(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>(0,h.jsx)(vt,(0,r.A)({},e)),renderCell:e=>(0,h.jsx)(et,(0,r.A)({},e))}),Gt=(e,t)=>{const n=(e=>{const{classes:t}=e;return o.useMemo((()=>(0,b.A)({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},S.B,t)),[t])})({classes:t.classes}),a=o.useCallback((o=>{const a=(0,r.A)({},Bt,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),i=t.checkboxSelection,s=null!=o.lookup[Ht];return i&&!s?(o.lookup[Ht]=a,o.orderedFields=[Ht,...o.orderedFields]):!i&&s?(delete o.lookup[Ht],o.orderedFields=o.orderedFields.filter((e=>e!==Ht))):i&&s&&(o.lookup[Ht]=(0,r.A)({},a,o.lookup[Ht])),o}),[e,n,t.checkboxSelection]);We(e,"hydrateColumns",a)},Wt=(e,t,n,r)=>{const a=o.useCallback((()=>{e.current.registerStrategyProcessor(t,n,r)}),[e,r,n,t]);Ge((()=>{a()}));const i=o.useRef(!0);o.useEffect((()=>{i.current?i.current=!1:a()}),[a])},Ut=e=>"full"===e.updates.type?(e=>{const t={[bt]:(0,r.A)({},xt(),{children:e})};for(let n=0;n<e.length;n+=1){const r=e[n];t[r]={id:r,depth:0,parent:bt,type:"leaf",groupingKey:null}}return{groupingName:ze,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(e=>{let{previousTree:t,actions:n}=e;const o=(0,r.A)({},t),a={};for(let r=0;r<n.remove.length;r+=1){const e=n.remove[r];a[e]=!0,delete o[e]}for(let r=0;r<n.insert.length;r+=1){const e=n.insert[r];o[e]={id:e,depth:0,parent:bt,type:"leaf",groupingKey:null}}const i=o[bt];let s=[...i.children,...n.insert];return Object.values(a).length&&(s=s.filter((e=>!a[e]))),o[bt]=(0,r.A)({},i,{children:s}),{groupingName:ze,tree:o,treeDepths:{0:s.length},dataRowIds:s}})({previousTree:e.previousTree,actions:e.updates.actions}),Kt=(e,t,n)=>{const r=o.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function qt(e,t){const n=o.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const Yt=e=>(0,r.A)({},e,{headerFiltering:{editing:null,menuOpen:null}});var Xt=n(49380),Zt=n(14857),Qt=n(92529),Jt=n(26907);function en(e){return e.substring(2).toLowerCase()}function tn(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:a,touchEvent:i="onTouchEnd"}=e,s=o.useRef(!1),l=o.useRef(null),c=o.useRef(!1),u=o.useRef(!1);o.useEffect((()=>(setTimeout((()=>{c.current=!0}),0),()=>{c.current=!1})),[]);const d=(0,w.A)(t.ref,l),p=(0,Qt.A)((e=>{const t=u.current;u.current=!1;const r=(0,Jt.A)(l.current);if(!c.current||!l.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(s.current)return void(s.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(l.current)>-1:!r.documentElement.contains(e.target)||l.current.contains(e.target),o||!n&&t||a(e)})),f=e=>n=>{u.current=!0;const r=t.props[e];r&&r(n)},m={ref:d};return!1!==i&&(m[i]=f(i)),o.useEffect((()=>{if(!1!==i){const e=en(i),t=(0,Jt.A)(l.current),n=()=>{s.current=!0};return t.addEventListener(e,p),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,p),t.removeEventListener("touchmove",n)}}}),[p,i]),!1!==r&&(m[r]=f(r)),o.useEffect((()=>{if(!1!==r){const e=en(r),t=(0,Jt.A)(l.current);return t.addEventListener(e,p),()=>{t.removeEventListener(e,p)}}}),[p,r]),(0,h.jsx)(o.Fragment,{children:o.cloneElement(t,m)})}var nn=n(40165),rn=n(2235),on=n(81952);const an=["open","target","onClose","children","position","className","onExited"],sn=(0,A.Ay)(on.A,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})((e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal,[`& .${S.x.menuList}`]:{outline:0}}})),ln={"bottom-start":"top left","bottom-end":"top right"};function cn(e){var t;const{open:n,target:a,onClose:i,children:s,position:l,className:c,onExited:u}=e,d=(0,g.A)(e,an),p=(0,Qe.h)(),f=(0,R.A)(),m=(e=>{const{classes:t}=e;return(0,b.A)({root:["menu"]},S.B,t)})(f),y=o.useRef(null);(0,x.A)((()=>{var e,t;n?y.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(null==(e=y.current)||null==(t=e.focus)||t.call(e),y.current=null)}),[n]),o.useEffect((()=>{const e=n?"menuOpen":"menuClose";p.current.publishEvent(e,{target:a})}),[p,n,a]);const w=e=>{e.target&&(a===e.target||null!=a&&a.contains(e.target))||i(e)};return(0,h.jsx)(sn,(0,r.A)({as:f.slots.basePopper,className:(0,v.A)(c,m.root),ownerState:f,open:n,anchorEl:a,transition:!0,placement:l},d,null==(t=f.slotProps)?void 0:t.basePopper,{children:e=>{let{TransitionProps:t,placement:n}=e;return(0,h.jsx)(tn,{onClickAway:w,mouseEvent:"onMouseDown",children:(0,h.jsx)(nn.A,(0,r.A)({},t,{style:{transformOrigin:ln[n]},onExited:(o=null==t?void 0:t.onExited,e=>{o&&o(),u&&u(e)}),children:(0,h.jsx)(rn.A,{children:s})}))});var o}}))}const un=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function dn(e){var t;const{colDef:n,id:a,hasFocus:i,tabIndex:s,position:l="bottom-end",focusElementRef:c}=e,u=(0,g.A)(e,un),[d,p]=o.useState(-1),[f,m]=o.useState(!1),v=(0,Qe.h)(),y=o.useRef(null),b=o.useRef(null),w=o.useRef(!1),x=o.useRef({}),C=(0,Zt.A)(),A=(0,$t.A)(),k=(0,$t.A)(),M=(0,R.A)();if(!(e=>"function"===typeof e.getActions)(n))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const E=n.getActions(v.current.getRowParams(a)),P=E.filter((e=>!e.props.showInMenu)),I=E.filter((e=>e.props.showInMenu)),D=P.length+(I.length?1:0);o.useLayoutEffect((()=>{i||Object.entries(x.current).forEach((e=>{let[t,n]=e;null==n||n.stop({},(()=>{delete x.current[t]}))}))}),[i]),o.useEffect((()=>{if(d<0||!y.current)return;if(d>=y.current.children.length)return;y.current.children[d].focus({preventScroll:!0})}),[d]),o.useEffect((()=>{i||(p(-1),w.current=!1)}),[i]),o.useImperativeHandle(c,(()=>({focus(){if(!w.current){const e=E.findIndex((e=>!e.props.disabled));p(e)}}})),[E]),o.useEffect((()=>{d>=D&&p(D-1)}),[d,D]);const N=()=>{m(!1)},$=e=>t=>{x.current[e]=t},O=(e,t)=>n=>{p(e),w.current=!0,t&&t(n)};return(0,h.jsxs)("div",(0,r.A)({role:"menu",ref:y,tabIndex:-1,className:S.x.actionsCell,onKeyDown:e=>{if(D<=1)return;const t=(e,n)=>{var r;if(e<0||e>E.length)return e;const o=("left"===n?-1:1)*("rtl"===C.direction?-1:1);return null!=(r=E[e+o])&&r.props.disabled?t(e+o,n):e+o};let n=d;"ArrowRight"===e.key?n=t(d,"right"):"ArrowLeft"===e.key&&(n=t(d,"left")),n<0||n>=D||n!==d&&(e.preventDefault(),e.stopPropagation(),p(n))}},u,{children:[P.map(((e,t)=>o.cloneElement(e,{key:t,touchRippleRef:$(t),onClick:O(t,e.props.onClick),tabIndex:d===t?s:-1}))),I.length>0&&k&&(0,h.jsx)(M.slots.baseIconButton,(0,r.A)({ref:b,id:k,"aria-label":v.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?A:void 0,role:"menuitem",size:"small",onClick:()=>{m(!0),p(D-1),w.current=!0},touchRippleRef:$(k),tabIndex:d===P.length?s:-1},null==(t=M.slotProps)?void 0:t.baseIconButton,{children:(0,h.jsx)(M.slots.moreActionsIcon,{fontSize:"small"})})),I.length>0&&(0,h.jsx)(cn,{open:f,target:b.current,position:l,onClose:N,onClick:N,children:(0,h.jsx)(Xt.A,{id:A,className:S.x.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Enter","Escape"].includes(e.key)&&N()},"aria-labelledby":k,variant:"menu",autoFocusItem:!0,children:I.map(((e,t)=>o.cloneElement(e,{key:t})))})})]}))}const pn="actions",fn=(0,r.A)({},yt.C,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,h.jsx)(dn,(0,r.A)({},e)),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0});var hn=function(e){return e.Cell="cell",e.Row="row",e}(hn||{}),mn=function(e){return e.Edit="edit",e.View="view",e}(mn||{}),gn=function(e){return e.Edit="edit",e.View="view",e}(gn||{});const vn=(e,t)=>{let n,r;return t.pagination&&"client"===t.paginationMode?(r=ft(e),n=ht(e)):(n=Q(e),r=0===n.length?null:{firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},yn=(e,t)=>{const n=vn(e,t);return o.useMemo((()=>({rows:n.rows,range:n.range})),[n.rows,n.range])},bn="__detail_panel_toggle__";var wn=n(60168);const xn=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],Cn=(e,t)=>{var n;return(0,r.A)({},e,{rowSelection:t.rowSelection&&null!=(n=xn(t.rowSelectionModel))?n:[]})},An=(e,t,n)=>{const r=o.useRef(),a=o.useRef(`mui-${Math.round(1e9*Math.random())}`),i=o.useCallback((()=>{r.current=e.current.registerPipeApplier(t,a.current,n)}),[e,n,t]);Ge((()=>{i()}));const s=o.useRef(!0);o.useEffect((()=>(s.current?s.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)})),[i])};var Sn=n(78243),kn=n(94047);const Mn=e=>null==e?null:Number(e),En=(0,Vt.YB)((e=>null==e||Number.isNaN(e)||""===e?null:t=>Mn(t)===Mn(e))),Rn=(0,r.A)({},yt.C,{type:"number",align:"right",headerAlign:"right",sortComparator:_t.Ou,valueParser:e=>""===e?null:Number(e),valueFormatter:e=>{let{value:t}=e;return(0,we.Et)(t)?t.toLocaleString():t||""},filterOperators:(0,Vt.eW)([{value:"=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>Mn(t)===e.value,InputComponent:Sn.y,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>Mn(t)!==e.value,InputComponent:Sn.y,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Mn(t)>e.value,InputComponent:Sn.y,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Mn(t)>=e.value,InputComponent:Sn.y,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Mn(t)<e.value,InputComponent:Sn.y,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Mn(t)<=e.value,InputComponent:Sn.y,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:kn.M,InputComponentProps:{type:"number"}}]),getApplyQuickFilterFn:(0,Vt.UD)(En),getApplyQuickFilterFnV7:En});var Pn=n(37446);const In=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function Dn(e){var t,n;const{item:a,applyValue:i,type:s,apiRef:l,focusElementRef:c,InputProps:u,clearButton:d,tabIndex:p,disabled:f}=e,m=(0,g.A)(e,In),v=(0,Pn.Z)(),[y,b]=o.useState(null!=(t=a.value)?t:""),[w,x]=o.useState(!1),C=(0,$t.A)(),A=(0,R.A)(),S=o.useCallback((e=>{const t=e.target.value;b(String(t)),x(!0),v.start(A.filterDebounceMs,(()=>{i((0,r.A)({},a,{value:t})),x(!1)}))}),[i,a,A.filterDebounceMs,v]);return o.useEffect((()=>{var e;const t=null!=(e=a.value)?e:"";b(String(t))}),[a.value]),(0,h.jsx)(A.slots.baseTextField,(0,r.A)({fullWidth:!0,id:C,label:l.current.getLocaleText("filterPanelInputLabel"),placeholder:l.current.getLocaleText("filterPanelInputPlaceholder"),value:y,onChange:S,variant:"standard",type:s||"text",InputLabelProps:{shrink:!0},inputRef:c,InputProps:(0,r.A)({},w||d?{endAdornment:w?(0,h.jsx)(A.slots.loadIcon,{fontSize:"small",color:"action"}):d}:{},{disabled:f},u,{inputProps:(0,r.A)({max:"datetime-local"===s?"9999-12-31T23:59":"9999-12-31",tabIndex:p},null==u?void 0:u.inputProps)})},m,null==(n=A.slotProps)?void 0:n.baseTextField))}const Nn=/(\d+)-(\d+)-(\d+)/,$n=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function On(e,t,n,r){if(!e.value)return null;const[o,a,i,s,l]=e.value.match(n?$n:Nn).slice(1).map(Number),c=new Date(o,a-1,i,s||0,l||0).getTime();return e=>{if(!e)return!1;if(r)return t(e.getTime(),c);const o=new Date(e).setHours(n?e.getHours():0,n?e.getMinutes():0,0,0);return t(o,c)}}const Tn=e=>(0,Vt.eW)([{value:"is",getApplyFilterFnV7:t=>On(t,((e,t)=>e===t),e),InputComponent:Dn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>On(t,((e,t)=>e!==t),e),InputComponent:Dn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>On(t,((e,t)=>e>t),e),InputComponent:Dn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>On(t,((e,t)=>e>=t),e),InputComponent:Dn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>On(t,((e,t)=>e<t),e,!e),InputComponent:Dn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFnV7:t=>On(t,((e,t)=>e<=t),e),InputComponent:Dn,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1}]);var _n=n(57251);const jn=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],Fn=(0,A.Ay)(_n.Ay)({fontSize:"inherit"});function Ln(e){const{id:t,value:n,field:a,colDef:i,hasFocus:s,inputProps:l,onValueChange:c}=e,u=(0,g.A)(e,jn),d="dateTime"===i.type,p=(0,Qe.h)(),f=o.useRef(),m=o.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,d?16:10)}return{parsed:e,formatted:t}}),[n,d]),[v,y]=o.useState(m),w=(e=>{const{classes:t}=e;return(0,b.A)({root:["editInputCell"]},S.B,t)})({classes:(0,R.A)().classes}),C=o.useCallback((e=>{if(""===e)return null;const[t,n]=e.split("T"),[r,o,a]=t.split("-"),i=new Date;if(i.setFullYear(Number(r),Number(o)-1,Number(a)),i.setHours(0,0,0,0),n){const[e,t]=n.split(":");i.setHours(Number(e),Number(t),0,0)}return i}),[]),A=o.useCallback((async e=>{const n=e.target.value,r=C(n);c&&await c(e,r),y({parsed:r,formatted:n}),p.current.setEditCellValue({id:t,field:a,value:r},e)}),[p,a,t,c,C]);return o.useEffect((()=>{y((e=>{var t,n;return m.parsed!==e.parsed&&(null==(t=m.parsed)?void 0:t.getTime())!==(null==(n=e.parsed)?void 0:n.getTime())?m:e}))}),[m]),(0,x.A)((()=>{s&&f.current.focus()}),[s]),(0,h.jsx)(Fn,(0,r.A)({inputRef:f,fullWidth:!0,className:w.root,type:d?"datetime-local":"date",inputProps:(0,r.A)({max:d?"9999-12-31T23:59":"9999-12-31"},l),value:v.formatted,onChange:A},u))}const Vn=e=>(0,h.jsx)(Ln,(0,r.A)({},e));function zn(e){let{value:t,columnType:n,rowId:r,field:o}=e;if(!(t instanceof Date))throw new Error([`MUI: \`${n}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${o}".`].join("\n"))}const Hn=(0,r.A)({},yt.C,{type:"date",sortComparator:_t.VE,valueFormatter:function(e){let{value:t,field:n,id:r}=e;return t?(zn({value:t,columnType:"date",rowId:r,field:n}),t.toLocaleDateString()):""},filterOperators:Tn(),renderEditCell:Vn,pastedValueParser:e=>new Date(e)}),Bn=(0,r.A)({},yt.C,{type:"dateTime",sortComparator:_t.VE,valueFormatter:function(e){let{value:t,field:n,id:r}=e;return t?(zn({value:t,columnType:"dateTime",rowId:r,field:n}),t.toLocaleString()):""},filterOperators:Tn(!0),renderEditCell:Vn,pastedValueParser:e=>new Date(e)});var Gn=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Gn||{}),Wn=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Wn||{});function Un(e){return"singleSelect"===(null==e?void 0:e.type)}function Kn(e,t,n){if(void 0===t)return;const r=t.find((t=>{const r=n(t);return String(r)===String(e)}));return n(r)}const qn=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","getOptionLabel","getOptionValue"],Yn=["MenuProps"];function Xn(e){var t,n,a;const i=(0,R.A)(),{id:s,value:l,field:c,row:u,colDef:d,hasFocus:p,error:f,onValueChange:m,initialOpen:v=i.editMode===hn.Cell,getOptionLabel:y,getOptionValue:b}=e,w=(0,g.A)(e,qn),C=(0,Qe.h)(),A=o.useRef(),S=o.useRef(),[k,M]=o.useState(v),E=null!=(n=((null==(t=i.slotProps)?void 0:t.baseSelect)||{}).native)&&n,P=(null==(a=i.slotProps)?void 0:a.baseSelect)||{},{MenuProps:I}=P,D=(0,g.A)(P,Yn);if((0,x.A)((()=>{var e;p&&(null==(e=S.current)||e.focus())}),[p]),!Un(d))return null;let N;if(N="function"===typeof(null==d?void 0:d.valueOptions)?null==d?void 0:d.valueOptions({id:s,row:u,field:c}):null==d?void 0:d.valueOptions,!N)return null;const $=b||d.getOptionValue,O=y||d.getOptionLabel;return N&&d?(0,h.jsx)(i.slots.baseSelect,(0,r.A)({ref:A,inputRef:S,value:l,onChange:async e=>{if(!Un(d)||!N)return;M(!1);const t=Kn(e.target.value,N,$);m&&await m(e,t),await C.current.setEditCellValue({id:s,field:c,value:t},e)},open:k,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||M(!0)},MenuProps:(0,r.A)({onClose:(e,t)=>{if(i.editMode!==hn.Row){if("backdropClick"===t||Ue(e.key)){const t=C.current.getCellParams(s,c);C.current.publishEvent("cellEditStop",(0,r.A)({},t,{reason:Ue(e.key)?Wn.escapeKeyDown:Wn.cellFocusOut}))}}else M(!1)}},I),error:f,native:E,fullWidth:!0},w,D,{children:N.map((e=>{var t;const n=$(e);return(0,o.createElement)(i.slots.baseSelectOption,(0,r.A)({},(null==(t=i.slotProps)?void 0:t.baseSelectOption)||{},{native:E,key:n,value:n}),O(e))}))})):null}const Zn=["item","applyValue","type","apiRef","focusElementRef","getOptionLabel","getOptionValue","placeholder","tabIndex","label","isFilterActive","clearButton","InputLabelProps"],Qn=e=>{let{column:{valueOptions:t,field:n},OptionComponent:a,getOptionLabel:i,getOptionValue:s,isSelectNative:l,baseSelectOptionProps:c}=e;return("function"===typeof t?["",...t({field:n})]:["",...t||[]]).map((e=>{const t=s(e),n=i(e);return(0,o.createElement)(a,(0,r.A)({},c,{native:l,key:t,value:t}),n)}))},Jn=(0,A.Ay)("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function er(e){var t,n,a,i,s,l,c,u;const{item:d,applyValue:p,type:f,apiRef:m,focusElementRef:v,getOptionLabel:y,getOptionValue:b,placeholder:w,tabIndex:x,label:C,clearButton:A}=e,S=(0,g.A)(e,Zn),[k,M]=o.useState(null!=(t=d.value)?t:""),E=(0,$t.A)(),P=(0,$t.A)(),I=(0,R.A)(),D=null==(n=null==(a=I.slotProps)||null==(a=a.baseSelect)?void 0:a.native)||n;let N=null;if(d.field){const e=m.current.getColumn(d.field);Un(e)&&(N=e)}const $=b||(null==(i=N)?void 0:i.getOptionValue),O=y||(null==(s=N)?void 0:s.getOptionLabel),T=o.useMemo((()=>{if(N)return"function"===typeof N.valueOptions?N.valueOptions({field:N.field}):N.valueOptions}),[N]),_=o.useCallback((e=>{let t=e.target.value;t=Kn(t,T,$),M(String(t)),p((0,r.A)({},d,{value:t}))}),[T,$,p,d]);if(o.useEffect((()=>{var e;let t;if(void 0!==T){if(t=Kn(d.value,T,$),t!==d.value)return void p((0,r.A)({},d,{value:t}))}else t=d.value;t=null!=(e=t)?e:"",M(String(t))}),[d,T,p,$]),!Un(N))return null;if(!Un(N))return null;const j=null!=C?C:m.current.getLocaleText("filterPanelInputLabel");return(0,h.jsxs)(Jn,{children:[(0,h.jsxs)(I.slots.baseFormControl,{children:[(0,h.jsx)(I.slots.baseInputLabel,(0,r.A)({},null==(l=I.slotProps)?void 0:l.baseInputLabel,{id:P,htmlFor:E,shrink:!0,variant:"standard",children:j})),(0,h.jsx)(I.slots.baseSelect,(0,r.A)({id:E,label:j,labelId:P,value:k,onChange:_,variant:"standard",type:f||"text",inputProps:{tabIndex:x,ref:v,placeholder:null!=w?w:m.current.getLocaleText("filterPanelInputPlaceholder")},native:D},S,null==(c=I.slotProps)?void 0:c.baseSelect,{children:Qn({column:N,OptionComponent:I.slots.baseSelectOption,getOptionLabel:O,getOptionValue:$,isSelectNative:D,baseSelectOptionProps:null==(u=I.slotProps)?void 0:u.baseSelectOption})}))]}),A]})}var tr=n(58725),nr=n(45735);const rr=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant","getOptionLabel","getOptionValue"],or=(0,tr.Z)();function ar(e){var t,n;const{item:a,applyValue:i,apiRef:s,focusElementRef:l,color:c,error:u,helperText:d,size:p,variant:f="standard",getOptionLabel:m,getOptionValue:v}=e,y=(0,g.A)(e,rr),b={color:c,error:u,helperText:d,size:p,variant:f},w=(0,$t.A)(),x=(0,R.A)();let C=null;if(a.field){const e=s.current.getColumn(a.field);Un(e)&&(C=e)}const A=v||(null==(t=C)?void 0:t.getOptionValue),S=m||(null==(n=C)?void 0:n.getOptionLabel),k=o.useCallback(((e,t)=>A(e)===A(t)),[A]),M=o.useMemo((()=>{var e;return null!=(e=C)&&e.valueOptions?"function"===typeof C.valueOptions?C.valueOptions({field:C.field}):C.valueOptions:[]}),[C]),E=o.useMemo((()=>null==M?void 0:M.map(A)),[M,A]),P=o.useMemo((()=>{if(!Array.isArray(a.value))return[];if(void 0!==M){return a.value.map((e=>null==E?void 0:E.findIndex((t=>t===e)))).filter((e=>e>=0)).map((e=>M[e]))}return a.value}),[a.value,M,E]);o.useEffect((()=>{Array.isArray(a.value)&&P.length===a.value.length||i((0,r.A)({},a,{value:P.map(A)}))}),[a,P,i,A]);const I=o.useCallback(((e,t)=>{i((0,r.A)({},a,{value:t.map(A)}))}),[i,a,A]);return(0,h.jsx)(nr.A,(0,r.A)({multiple:!0,options:M,isOptionEqualToValue:k,filterOptions:or,id:w,value:P,onChange:I,getOptionLabel:S,renderTags:(e,t)=>e.map(((e,n)=>(0,h.jsx)(x.slots.baseChip,(0,r.A)({variant:"outlined",size:"small",label:S(e)},t({index:n}))))),renderInput:e=>{var t;return(0,h.jsx)(x.slots.baseTextField,(0,r.A)({},e,{label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,r.A)({},e.InputLabelProps,{shrink:!0}),inputRef:l,type:"singleSelect"},b,null==(t=x.slotProps)?void 0:t.baseTextField))}},y))}const ir=e=>null!=e&&(0,we.Gv)(e)?e.value:e,sr=(0,r.A)({},yt.C,{type:"singleSelect",getOptionLabel:e=>(0,we.Gv)(e)?e.label:String(e),getOptionValue:e=>(0,we.Gv)(e)?e.value:e,valueFormatter(e){const{id:t,field:n,value:r,api:o}=e,a=e.api.getColumn(n);if(!Un(a))return"";let i;if(i="function"===typeof a.valueOptions?a.valueOptions({id:t,row:t?o.getRow(t):null,field:n}):a.valueOptions,null==r)return"";if(!i)return r;if("object"!==typeof i[0])return a.getOptionLabel(r);const s=i.find((e=>a.getOptionValue(e)===r));return s?a.getOptionLabel(s):""},renderEditCell:e=>(0,h.jsx)(Xn,(0,r.A)({},e)),filterOperators:(0,Vt.eW)([{value:"is",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>ir(t)===ir(e.value),InputComponent:er},{value:"not",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>ir(t)!==ir(e.value),InputComponent:er},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(ir);return e=>t.includes(ir(e))},InputComponent:ar}]),pastedValueParser:(e,t)=>{const n=t.colDef,r=n.valueOptions,o="function"===typeof r?r({field:n.field}):r||[],a=n.getOptionValue;if(o.find((t=>a(t)===e)))return e}}),lr="__default__",cr=["maxWidth","minWidth","width","flex"];const ur=(e,t)=>{const n={};let o=0,a=0;const i=[];e.orderedFields.forEach((t=>{const s=(0,r.A)({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])s.computedWidth=0;else{let e;s.flex&&s.flex>0?(o+=s.flex,e=0,i.push(s)):e=(0,we.qE)(s.width||yt.C.width,s.minWidth||yt.C.minWidth,s.maxWidth||yt.C.maxWidth),a+=e,s.computedWidth=e}n[t]=s}));const s=Math.max(t-a,0);if(o>0&&t>0){const e=function(e){let{initialFreeSpace:t,totalFlexUnits:n,flexColumns:r}=e;const o=new Set(r.map((e=>e.field))),a={all:{},frozenFields:[],freeze:e=>{const t=a.all[e];t&&!0!==t.frozen&&(a.all[e].frozen=!0,a.frozenFields.push(e))}};return function e(){if(a.frozenFields.length===o.size)return;const i={min:{},max:{}};let s=t,l=n,c=0;a.frozenFields.forEach((e=>{s-=a.all[e].computedWidth,l-=a.all[e].flex}));for(let t=0;t<r.length;t+=1){const e=r[t];if(a.all[e.field]&&!0===a.all[e.field].frozen)continue;let n=s/l*e.flex;n<e.minWidth?(c+=e.minWidth-n,n=e.minWidth,i.min[e.field]=!0):n>e.maxWidth&&(c+=e.maxWidth-n,n=e.maxWidth,i.max[e.field]=!0),a.all[e.field]={frozen:!1,computedWidth:n,flex:e.flex}}c<0?Object.keys(i.max).forEach((e=>{a.freeze(e)})):c>0?Object.keys(i.min).forEach((e=>{a.freeze(e)})):r.forEach((e=>{let{field:t}=e;a.freeze(t)})),e()}(),a.all}({initialFreeSpace:s,totalFlexUnits:o,flexColumns:i});Object.keys(e).forEach((t=>{n[t].computedWidth=e[t].computedWidth}))}return(0,r.A)({},e,{lookup:n})};function dr(e,t){let n=e[lr];return t&&e[t]&&(n=e[t]),n}const pr=e=>{let{apiRef:t,columnsToUpsert:n,initialState:o,columnTypes:a,columnVisibilityModel:i=(0,$.FY)(t),keepOnlyColumnsToUpsert:s=!1}=e;var l,c,u;const d=!t.current.state.columns;let p;if(d)p={orderedFields:[],lookup:{},columnVisibilityModel:i};else{const e=(0,$.em)(t.current.state);p={orderedFields:s?[]:[...e.orderedFields],lookup:(0,r.A)({},e.lookup),columnVisibilityModel:i}}let f={};s&&!d&&(f=Object.keys(p.lookup).reduce(((e,t)=>(0,r.A)({},e,{[t]:!1})),{}));const h={};n.forEach((e=>{const{field:t}=e;h[t]=!0,f[t]=!0;let n=p.lookup[t];null==n?(n=(0,r.A)({},dr(a,e.type),{field:t,hasBeenResized:!1}),p.orderedFields.push(t)):s&&p.orderedFields.push(t),n&&n.type!==e.type&&(n=(0,r.A)({},dr(a,e.type),{field:t}));let o=n.hasBeenResized;cr.forEach((t=>{void 0!==e[t]&&(o=!0,-1===e[t]&&(e[t]=1/0))})),p.lookup[t]=(0,r.A)({},n,e,{hasBeenResized:o})})),s&&!d&&Object.keys(p.lookup).forEach((e=>{f[e]||delete p.lookup[e]}));const m=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:o={}}=t,a=Object.keys(o);if(0===a.length&&0===n.length)return e;const i={},s=[];for(let r=0;r<n.length;r+=1){const t=n[r];e.lookup[t]&&(i[t]=!0,s.push(t))}const l=0===s.length?e.orderedFields:[...s,...e.orderedFields.filter((e=>!i[e]))],c=(0,r.A)({},e.lookup);for(let u=0;u<a.length;u+=1){const e=a[u],t=(0,r.A)({},c[e],{hasBeenResized:!0});Object.entries(o[e]).forEach((e=>{let[n,r]=e;t[n]=-1===r?1/0:r})),c[e]=t}return(0,r.A)({},e,{orderedFields:l,lookup:c})})(t.current.unstable_applyPipeProcessors("hydrateColumns",p),o);return ur(m,null!=(l=null==(c=(u=t.current).getRootDimensions)||null==(c=c.call(u))?void 0:c.viewportInnerSize.width)?l:0)},fr=e=>t=>(0,r.A)({},t,{columns:e});function hr(e){let{firstColumnToRender:t,apiRef:n,firstRowToRender:r,lastRowToRender:o,visibleRows:a}=e,i=t;for(let s=r;s<o;s+=1){if(a[s]){const e=a[s].id,r=n.current.unstable_getCellColSpanInfo(e,t);r&&r.spannedByColSpan&&(i=r.leftVisibleCellIndex)}}return i}function mr(e){let{firstColumnIndex:t,minColumnIndex:n,columnBuffer:r,firstRowToRender:o,lastRowToRender:a,apiRef:i,visibleRows:s}=e;return hr({firstColumnToRender:Math.max(t-r,n),apiRef:i,firstRowToRender:o,lastRowToRender:a,visibleRows:s})}function gr(e,t){const n=N(e),r=F(e);return Math.floor(t*n)*((null!=r?r:0)+1)}var vr=function(e){return e.filters="filters",e.columns="columns",e}(vr||{});const yr={string:yt.C,number:Rn,date:Hn,dateTime:Bn,boolean:zt,singleSelect:sr,[pn]:fn,[lr]:yt.C},br=(e,t,n)=>{var o,a,i,s;const l=pr({apiRef:n,columnTypes:yr,columnsToUpsert:t.columns,initialState:null==(o=t.initialState)?void 0:o.columns,columnVisibilityModel:null!=(a=null!=(i=t.columnVisibilityModel)?i:null==(s=t.initialState)||null==(s=s.columns)?void 0:s.columnVisibilityModel)?a:{},keepOnlyColumnsToUpsert:!0});return(0,r.A)({},e,{columns:l})};const wr=(e,t,n)=>(n.current.caches.rows=At({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,r.A)({},e,{rows:kt({apiRef:n,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})})),xr=(e,t)=>{const n=qt(e,"useGridRows"),a=yn(e,t),i=o.useRef(Date.now()),s=(0,Pn.Z)(),l=o.useCallback((t=>{const n=(0,L.rI)(e)[t];if(n)return n;const r=e.current.getRowNode(t);return r&&Mt(r)?{[wt]:t}:null}),[e]),c=t.getRowId,u=o.useCallback((e=>wt in e?e[wt]:c?c(e):e.id),[c]),d=o.useMemo((()=>a.rows.reduce(((e,t,n)=>{let{id:r}=t;return e[r]=n,e}),{})),[a.rows]),p=o.useCallback((n=>{let{cache:o,throttle:a}=n;const l=()=>{i.current=Date.now(),e.current.setState((n=>(0,r.A)({},n,{rows:kt({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:(0,L.qj)(e),previousTreeDepths:(0,L.Mz)(e)})}))),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(s.clear(),e.current.caches.rows=o,!a)return void l();const c=t.throttleRowsMs-(Date.now()-i.current);c>0?s.start(c,l):l()}),[t.throttleRowsMs,t.rowCount,t.loading,e,s]),f=o.useCallback((r=>{n.debug(`Updating all rows, new length ${r.length}`);const o=At({rows:r,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),a=e.current.caches.rows;o.rowsBeforePartialUpdates=a.rowsBeforePartialUpdates,p({cache:o,throttle:!0})}),[n,t.getRowId,t.loading,t.rowCount,p,e]),h=o.useCallback((n=>{if(t.signature===Ie.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 o=[];n.forEach((n=>{const a=Ct(n,t.getRowId,"A row was provided without id when calling updateRows():"),i=e.current.getRowNode(a);if("pinnedRow"===(null==i?void 0:i.type)){const t=e.current.caches.pinnedRows,o=t.idLookup[a];o&&(t.idLookup[a]=(0,r.A)({},o,n))}else o.push(n)}));const a=(e=>{let{previousCache:t,getRowId:n,updates:o}=e;var a,i,s;if("full"===t.updates.type)throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const l=new Map;o.forEach((e=>{const t=Ct(e,n,"A row was provided without id when calling updateRows():");l.has(t)?l.set(t,(0,r.A)({},l.get(t),e)):l.set(t,e)}));const c={type:"partial",actions:{insert:[...null!=(a=t.updates.actions.insert)?a:[]],modify:[...null!=(i=t.updates.actions.modify)?i:[]],remove:[...null!=(s=t.updates.actions.remove)?s:[]]},idToActionLookup:(0,r.A)({},t.updates.idToActionLookup)},u=(0,r.A)({},t.dataRowIdToModelLookup),d=(0,r.A)({},t.dataRowIdToIdLookup),p={insert:{},modify:{},remove:{}};l.forEach(((e,t)=>{const n=c.idToActionLookup[t];if("delete"===e._action){if("remove"===n||!u[t])return;return null!=n&&(p[n][t]=!0),c.actions.remove.push(t),delete u[t],void delete d[t]}const o=u[t];if(o)return"remove"===n?(p.remove[t]=!0,c.actions.modify.push(t)):null==n&&c.actions.modify.push(t),void(u[t]=(0,r.A)({},o,e));"remove"===n?(p.remove[t]=!0,c.actions.insert.push(t)):null==n&&c.actions.insert.push(t),u[t]=e,d[t]=t}));const f=Object.keys(p);for(let r=0;r<f.length;r+=1){const e=f[r],t=p[e];Object.keys(t).length>0&&(c.actions[e]=c.actions[e].filter((e=>!t[e])))}return{dataRowIdToModelLookup:u,dataRowIdToIdLookup:d,updates:c,rowsBeforePartialUpdates:t.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:t.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:t.rowCountPropBeforePartialUpdates}})({updates:o,getRowId:t.getRowId,previousCache:e.current.caches.rows});p({cache:a,throttle:!0})}),[t.signature,t.getRowId,p,e]),m=o.useCallback((()=>{const t=(0,L.A6)(e),n=(0,L.rI)(e);return new Map(t.map((e=>{var t;return[e,null!=(t=n[e])?t:{}]})))}),[e]),g=o.useCallback((()=>(0,L.H0)(e)),[e]),v=o.useCallback((()=>(0,L.A6)(e)),[e]),y=o.useCallback((e=>d[e]),[d]),b=o.useCallback(((t,n)=>{const o=e.current.getRowNode(t);if(!o)throw new Error(`MUI: No row with id #${t} found`);if("group"!==o.type)throw new Error("MUI: Only group nodes can be expanded or collapsed");const a=(0,r.A)({},o,{childrenExpanded:n});e.current.setState((e=>(0,r.A)({},e,{rows:(0,r.A)({},e.rows,{tree:(0,r.A)({},e.rows.tree,{[t]:a})})}))),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",a)}),[e]),w=o.useCallback((t=>{var n;return null!=(n=(0,L.qj)(e)[t])?n:null}),[e]),x=o.useCallback((t=>{let{skipAutoGeneratedRows:n=!0,groupId:r,applySorting:o,applyFiltering:a}=t;const i=(0,L.qj)(e);let s;if(o){const t=i[r];if(!t)return[];const o=(0,K.RJ)(e);s=[];for(let e=o.findIndex((e=>e===r))+1;e<o.length&&i[o[e]].depth>t.depth;e+=1){const t=o[e];n&&Mt(i[t])||s.push(t)}}else s=Et(i,r,n);if(a){const t=X(e);s=s.filter((e=>!1!==t[e]))}return s}),[e]),C=o.useCallback(((t,o)=>{const a=e.current.getRowNode(t);if(!a)throw new Error(`MUI: No row with id #${t} found`);if(a.parent!==bt)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if("leaf"!==a.type)throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");e.current.setState((a=>{const i=(0,L.qj)(a,e.current.instanceId)[bt],s=i.children,l=s.findIndex((e=>e===t));if(-1===l||l===o)return a;n.debug(`Moving row ${t} to index ${o}`);const c=[...s];return c.splice(o,0,c.splice(l,1)[0]),(0,r.A)({},a,{rows:(0,r.A)({},a.rows,{tree:(0,r.A)({},a.rows.tree,{[bt]:(0,r.A)({},i,{children:c})})})})})),e.current.publishEvent("rowsSet")}),[e,n]),A={getRow:l,getRowId:u,getRowModels:m,getRowsCount:g,getAllRowIds:v,setRows:f,updateRows:h,getRowNode:w,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:o.useCallback(((n,o)=>{if(t.signature===Ie.DataGrid&&o.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===o.length)return;if((0,L.V2)(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const a=(0,r.A)({},(0,L.qj)(e)),i=(0,r.A)({},(0,L.rI)(e)),s=(0,r.A)({},(0,L.gk)(e)),l=a[bt],c=[...l.children];for(let e=0;e<o.length;e+=1){const r=o[e],l=Ct(r,t.getRowId,"A row was provided without id when calling replaceRows()."),[u]=c.splice(n+e,1,l);delete i[u],delete s[u],delete a[u];const d={id:l,depth:0,parent:bt,type:"leaf",groupingKey:null};i[l]=r,s[l]=l,a[l]=d}a[bt]=(0,r.A)({},l,{children:c});const u=c.filter((e=>"leaf"===a[e].type));e.current.caches.rows.dataRowIdToModelLookup=i,e.current.caches.rows.dataRowIdToIdLookup=s,e.current.setState((e=>(0,r.A)({},e,{rows:(0,r.A)({},e.rows,{dataRowIdToModelLookup:i,dataRowIdToIdLookup:s,dataRowIds:u,tree:a})}))),e.current.publishEvent("rowsSet")}),[e,t.signature,t.getRowId])},S={setRowIndex:C,setRowChildrenExpansion:b,getRowGroupChildren:x},k=o.useCallback((()=>{let o;n.info("Row grouping pre-processing have changed, regenerating the row tree"),o=e.current.caches.rows.rowsBeforePartialUpdates===t.rows?(0,r.A)({},e.current.caches.rows,{updates:{type:"full",rows:(0,L.A6)(e)}}):At({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),p({cache:o,throttle:!1})}),[n,e,t.rows,t.getRowId,t.loading,t.rowCount,p]),M=o.useCallback((e=>{"rowTreeCreation"===e&&k()}),[k]),E=o.useCallback((()=>{e.current.getActiveStrategy("rowTree")!==(0,L.Y1)(e)&&k()}),[e,k]);$e(e,"activeStrategyProcessorChange",M),$e(e,"strategyAvailabilityChange",E);const R=o.useCallback((()=>{e.current.setState((n=>{const o=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:(0,L.qj)(n,e.current.instanceId),treeDepths:(0,L.Mz)(n,e.current.instanceId),dataRowIds:(0,L.A6)(n,e.current.instanceId),dataRowIdToModelLookup:(0,L.rI)(n,e.current.instanceId),dataRowIdToIdLookup:(0,L.gk)(n,e.current.instanceId)});return(0,r.A)({},n,{rows:(0,r.A)({},n.rows,o,{totalTopLevelRowCount:St({tree:o.tree,rowCountProp:t.rowCount})})})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()}),[e,t.rowCount]);An(e,"hydrateRows",R),xe(e,A,"public"),xe(e,S,t.signature===Ie.DataGrid?"private":"public");const P=o.useRef(!0);o.useEffect((()=>{if(P.current)return void(P.current=!1);const o=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,a=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,i=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(o)return a||(e.current.setState((e=>(0,r.A)({},e,{rows:(0,r.A)({},e.rows,{loading:t.loading})}))),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),void(i||(e.current.setState((e=>(0,r.A)({},e,{rows:(0,r.A)({},e.rows,{totalRowCount:Math.max(t.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,e.rows.totalTopLevelRowCount)})}))),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()));n.debug(`Updating all rows, new length ${t.rows.length}`),p({cache:At({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1})}),[t.rows,t.rowCount,t.getRowId,t.loading,n,p,e])};var Cr=n(20151);const Ar=["id","field"],Sr=["id","field"],kr=(0,at.f)(["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. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error");var Mr=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Mr||{}),Er=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Er||{});const Rr=["id"],Pr=["id"],Ir=(0,at.f)(["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. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),Dr=e=>(0,r.A)({},e,{editRows:{}}),Nr=(e,t)=>{((e,t)=>{const[n,a]=o.useState({}),i=o.useRef(n),s=o.useRef({}),{processRowUpdate:l,onProcessRowUpdateError:c,cellModesModel:u,onCellModesModelChange:d}=t,p=e=>function(){t.editMode===hn.Cell&&e(...arguments)},f=o.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]),h=o.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=o.useCallback(((t,n)=>{if(!t.isEditable)return;if(t.cellMode===mn.Edit)return;const o=(0,r.A)({},t,{reason:Gn.cellDoubleClick});e.current.publishEvent("cellEditStart",o,n)}),[e]),v=o.useCallback(((t,n)=>{if(t.cellMode===mn.View)return;if(e.current.getCellMode(t.id,t.field)===mn.View)return;const o=(0,r.A)({},t,{reason:Wn.cellFocusOut});e.current.publishEvent("cellEditStop",o,n)}),[e]),y=o.useCallback(((t,n)=>{if(t.cellMode===mn.Edit){if(229===n.which)return;let o;if("Escape"===n.key?o=Wn.escapeKeyDown:"Enter"===n.key?o=Wn.enterKeyDown:"Tab"===n.key&&(o=n.shiftKey?Wn.shiftTabKeyDown:Wn.tabKeyDown,n.preventDefault()),o){const a=(0,r.A)({},t,{reason:o});e.current.publishEvent("cellEditStop",a,n)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:t,editMode:"cell"}))return;if(Xe(n)?o=Gn.printableKeyDown:(n.ctrlKey||n.metaKey)&&"v"===n.key?o=Gn.pasteKeyDown:"Enter"===n.key?o=Gn.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(o=Gn.deleteKeyDown),o){const a=(0,r.A)({},t,{reason:o,key:n.key});e.current.publishEvent("cellEditStart",a,n)}}}),[e]),b=o.useCallback((t=>{const{id:n,field:r,reason:o}=t,a={id:n,field:r};o!==Gn.printableKeyDown&&o!==Gn.deleteKeyDown&&o!==Gn.pasteKeyDown||(a.deleteValue=!0),e.current.startCellEditMode(a)}),[e]),w=o.useCallback((t=>{const{id:n,field:r,reason:o}=t;let a;e.current.runPendingEditCellValueMutation(n,r),o===Wn.enterKeyDown?a="below":o===Wn.tabKeyDown?a="right":o===Wn.shiftTabKeyDown&&(a="left");const i="escapeKeyDown"===o;e.current.stopCellEditMode({id:n,field:r,ignoreModifications:i,cellToFocusAfter:a})}),[e]);$e(e,"cellDoubleClick",p(m)),$e(e,"cellFocusOut",p(v)),$e(e,"cellKeyDown",p(y)),$e(e,"cellEditStart",p(b)),$e(e,"cellEditStop",p(w)),Te(e,"cellEditStart",t.onCellEditStart),Te(e,"cellEditStop",t.onCellEditStop);const C=o.useCallback(((t,n)=>{const r=(0,Cr.w)(e.current.state);return r[t]&&r[t][n]?mn.Edit:mn.View}),[e]),A=(0,Qt.A)((n=>{const r=n!==t.cellModesModel;d&&r&&d(n,{}),t.cellModesModel&&r||(a(n),i.current=n,e.current.publishEvent("cellModesModelChange",n))})),S=o.useCallback(((e,t,n)=>{const o=(0,r.A)({},i.current);if(null!==n)o[e]=(0,r.A)({},o[e],{[t]:(0,r.A)({},n)});else{const n=o[e],r=(0,g.A)(n,[t].map(Ve.A));o[e]=r,0===Object.keys(o[e]).length&&delete o[e]}A(o)}),[A]),k=o.useCallback(((t,n,o)=>{e.current.setState((e=>{const a=(0,r.A)({},e.editRows);return null!==o?a[t]=(0,r.A)({},a[t],{[n]:(0,r.A)({},o)}):(delete a[t][n],0===Object.keys(a[t]).length&&delete a[t]),(0,r.A)({},e,{editRows:a})})),e.current.forceUpdate()}),[e]),M=o.useCallback((e=>{const{id:t,field:n}=e,o=(0,g.A)(e,Ar);f(t,n),h(t,n,mn.View),S(t,n,(0,r.A)({mode:mn.Edit},o))}),[f,h,S]),E=(0,Qt.A)((t=>{const{id:n,field:r,deleteValue:o,initialValue:a}=t;let i=e.current.getCellValue(n,r);(o||a)&&(i=o?"":a),k(n,r,{value:i,error:!1,isProcessingProps:!1}),e.current.setCellFocus(n,r)})),R=o.useCallback((e=>{const{id:t,field:n}=e,o=(0,g.A)(e,Sr);h(t,n,mn.Edit),S(t,n,(0,r.A)({mode:mn.View},o))}),[h,S]),P=(0,Qt.A)((async t=>{const{id:n,field:r,ignoreModifications:o,cellToFocusAfter:a="none"}=t;h(n,r,mn.Edit),e.current.runPendingEditCellValueMutation(n,r);const i=()=>{k(n,r,null),S(n,r,null),"none"!==a&&e.current.moveFocusToRelativeCell(n,r,a)};if(o)return void i();const u=(0,Cr.w)(e.current.state),{error:d,isProcessingProps:p}=u[n][r];if(d||p)return s.current[n][r].mode=mn.Edit,void S(n,r,{mode:mn.Edit});const f=e.current.getRowWithUpdatedValuesFromCellEditing(n,r);if(l){const t=e=>{s.current[n][r].mode=mn.Edit,S(n,r,{mode:mn.Edit}),c?c(e):kr()};try{const r=e.current.getRow(n);Promise.resolve(l(f,r)).then((t=>{e.current.updateRows([t]),i()})).catch(t)}catch(m){t(m)}}else e.current.updateRows([f]),i()})),I={setCellEditingEditCellValue:o.useCallback((async t=>{var n;const{id:o,field:a,value:i,debounceMs:s,unstable_skipValueParser:l}=t;f(o,a),h(o,a,mn.Edit);const c=e.current.getColumn(a),u=e.current.getRow(o);let d=i;c.valueParser&&!l&&(d=c.valueParser(i,e.current.getCellParams(o,a)));let p=(0,Cr.w)(e.current.state),m=(0,r.A)({},p[o][a],{value:d,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(c.preProcessEditCellProps){const e=i!==p[o][a].value;m=(0,r.A)({},m,{isProcessingProps:!0}),k(o,a,m),m=await Promise.resolve(c.preProcessEditCellProps({id:o,row:u,props:m,hasChanged:e}))}return e.current.getCellMode(o,a)!==mn.View&&(p=(0,Cr.w)(e.current.state),m=(0,r.A)({},m,{isProcessingProps:!1}),m.value=c.preProcessEditCellProps?p[o][a].value:d,k(o,a,m),p=(0,Cr.w)(e.current.state),!(null!=(n=p[o])&&null!=(n=n[a])&&n.error))}),[e,f,h,k]),getRowWithUpdatedValuesFromCellEditing:o.useCallback(((t,n)=>{const o=e.current.getColumn(n),a=(0,Cr.w)(e.current.state),i=e.current.getRow(t);if(!a[t]||!a[t][n])return e.current.getRow(t);const{value:s}=a[t][n];return o.valueSetter?o.valueSetter({value:s,row:i}):(0,r.A)({},i,{[n]:s})}),[e])};xe(e,{getCellMode:C,startCellEditMode:M,stopCellEditMode:R},"public"),xe(e,I,"private"),o.useEffect((()=>{u&&A(u)}),[u,A]),(0,x.A)((()=>{const t=(0,L.gk)(e),o=s.current;s.current=(0,we.Go)(n),Object.entries(n).forEach((e=>{let[n,a]=e;Object.entries(a).forEach((e=>{let[a,i]=e;var s,l;const c=(null==(s=o[n])||null==(s=s[a])?void 0:s.mode)||mn.View,u=null!=(l=t[n])?l:n;i.mode===mn.Edit&&c===mn.View?E((0,r.A)({id:u,field:a},i)):i.mode===mn.View&&c===mn.Edit&&P((0,r.A)({id:u,field:a},i))}))}))}),[e,n,E,P])})(e,t),((e,t)=>{const[n,a]=o.useState({}),i=o.useRef(n),s=o.useRef({}),l=o.useRef(null),c=o.useRef(null),{processRowUpdate:u,onProcessRowUpdateError:d,rowModesModel:p,onRowModesModelChange:f}=t,h=e=>function(){t.editMode===hn.Row&&e(...arguments)},m=o.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]),v=o.useCallback(((t,n)=>{if(e.current.getRowMode(t)!==n)throw new Error(`MUI: The row with id=${t} is not in ${n} mode.`)}),[e]),y=o.useCallback(((t,n)=>{if(!t.isEditable)return;if(e.current.getRowMode(t.id)===gn.Edit)return;const o=e.current.getRowParams(t.id),a=(0,r.A)({},o,{field:t.field,reason:Mr.cellDoubleClick});e.current.publishEvent("rowEditStart",a,n)}),[e]),b=o.useCallback((e=>{c.current=e}),[]),w=o.useCallback(((t,n)=>{t.isEditable&&e.current.getRowMode(t.id)!==gn.View&&(c.current=null,l.current=setTimeout((()=>{var o;if(l.current=null,(null==(o=c.current)?void 0:o.id)!==t.id){if(!e.current.getRow(t.id))return;if(e.current.getRowMode(t.id)===gn.View)return;const o=e.current.getRowParams(t.id),a=(0,r.A)({},o,{field:t.field,reason:Er.rowFocusOut});e.current.publishEvent("rowEditStop",a,n)}})))}),[e]);o.useEffect((()=>()=>{clearTimeout(l.current)}),[]);const C=o.useCallback(((t,n)=>{if(t.cellMode===gn.Edit){if(229===n.which)return;let o;if("Escape"===n.key)o=Er.escapeKeyDown;else if("Enter"===n.key)o=Er.enterKeyDown;else if("Tab"===n.key){const r=(0,$.TI)(e).filter((n=>e.current.getColumn(n).type===pn||e.current.isCellEditable(e.current.getCellParams(t.id,n))));if(n.shiftKey?t.field===r[0]&&(o=Er.shiftTabKeyDown):t.field===r[r.length-1]&&(o=Er.tabKeyDown),n.preventDefault(),!o){const o=r.findIndex((e=>e===t.field)),a=r[n.shiftKey?o-1:o+1];e.current.setCellFocus(t.id,a)}}if(o){const a=(0,r.A)({},e.current.getRowParams(t.id),{reason:o,field:t.field});e.current.publishEvent("rowEditStop",a,n)}}else if(t.isEditable){let o;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:t,editMode:"row"}))return;if(Xe(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?o=Mr.printableKeyDown:"Enter"===n.key?o=Mr.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(o=Mr.deleteKeyDown),o){const a=e.current.getRowParams(t.id),i=(0,r.A)({},a,{field:t.field,reason:o});e.current.publishEvent("rowEditStart",i,n)}}}),[e]),A=o.useCallback((t=>{const{id:n,field:r,reason:o}=t,a={id:n,fieldToFocus:r};o!==Mr.printableKeyDown&&o!==Mr.deleteKeyDown||(a.deleteValue=!!r),e.current.startRowEditMode(a)}),[e]),S=o.useCallback((t=>{const{id:n,reason:r,field:o}=t;let a;e.current.runPendingEditCellValueMutation(n),r===Er.enterKeyDown?a="below":r===Er.tabKeyDown?a="right":r===Er.shiftTabKeyDown&&(a="left");const i="escapeKeyDown"===r;e.current.stopRowEditMode({id:n,ignoreModifications:i,field:o,cellToFocusAfter:a})}),[e]);$e(e,"cellDoubleClick",h(y)),$e(e,"cellFocusIn",h(b)),$e(e,"cellFocusOut",h(w)),$e(e,"cellKeyDown",h(C)),$e(e,"rowEditStart",h(A)),$e(e,"rowEditStop",h(S)),Te(e,"rowEditStart",t.onRowEditStart),Te(e,"rowEditStop",t.onRowEditStop);const k=o.useCallback((n=>{if(t.editMode===hn.Cell)return gn.View;const r=(0,Cr.w)(e.current.state);return r[n]&&Object.keys(r[n]).length>0?gn.Edit:gn.View}),[e,t.editMode]),M=(0,Qt.A)((n=>{const r=n!==t.rowModesModel;f&&r&&f(n,{}),t.rowModesModel&&r||(a(n),i.current=n,e.current.publishEvent("rowModesModelChange",n))})),E=o.useCallback(((e,t)=>{const n=(0,r.A)({},i.current);null!==t?n[e]=(0,r.A)({},t):delete n[e],M(n)}),[M]),R=o.useCallback(((t,n)=>{e.current.setState((e=>{const o=(0,r.A)({},e.editRows);return null!==n?o[t]=n:delete o[t],(0,r.A)({},e,{editRows:o})})),e.current.forceUpdate()}),[e]),P=o.useCallback(((t,n,o)=>{e.current.setState((e=>{const a=(0,r.A)({},e.editRows);return null!==o?a[t]=(0,r.A)({},a[t],{[n]:(0,r.A)({},o)}):(delete a[t][n],0===Object.keys(a[t]).length&&delete a[t]),(0,r.A)({},e,{editRows:a})})),e.current.forceUpdate()}),[e]),I=o.useCallback((e=>{const{id:t}=e,n=(0,g.A)(e,Rr);v(t,gn.View),E(t,(0,r.A)({mode:gn.Edit},n))}),[v,E]),D=(0,Qt.A)((t=>{const{id:n,fieldToFocus:r,deleteValue:o,initialValue:a}=t,i=(0,$.JR)(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}),{});R(n,i),r&&e.current.setCellFocus(n,r)})),N=o.useCallback((e=>{const{id:t}=e,n=(0,g.A)(e,Pr);v(t,gn.Edit),E(t,(0,r.A)({mode:gn.View},n))}),[v,E]),O=(0,Qt.A)((t=>{const{id:n,ignoreModifications:r,field:o,cellToFocusAfter:a="none"}=t;e.current.runPendingEditCellValueMutation(n);const i=()=>{"none"!==a&&o&&e.current.moveFocusToRelativeCell(n,o,a),R(n,null),E(n,null)};if(r)return void i();const l=(0,Cr.w)(e.current.state),c=e.current.getRow(n);if(Object.values(l[n]).some((e=>e.isProcessingProps)))return void(s.current[n].mode=gn.Edit);if(Object.values(l[n]).some((e=>e.error)))return s.current[n].mode=gn.Edit,void E(n,{mode:gn.Edit});const p=e.current.getRowWithUpdatedValuesFromRowEditing(n);if(u){const t=e=>{s.current[n].mode=gn.Edit,E(n,{mode:gn.Edit}),d?d(e):Ir()};try{Promise.resolve(u(p,c)).then((t=>{e.current.updateRows([t]),i()})).catch(t)}catch(f){t(f)}}else e.current.updateRows([p]),i()})),T={setRowEditingEditCellValue:o.useCallback((t=>{const{id:n,field:o,value:a,debounceMs:i,unstable_skipValueParser:s}=t;m(n,o);const l=e.current.getColumn(o),c=e.current.getRow(n);let u=a;l.valueParser&&!s&&(u=l.valueParser(a,e.current.getCellParams(n,o)));let d=(0,Cr.w)(e.current.state),p=(0,r.A)({},d[n][o],{value:u,changeReason:i?"debouncedSetEditCellValue":"setEditCellValue"});return l.preProcessEditCellProps||P(n,o,p),new Promise((t=>{const a=[];if(l.preProcessEditCellProps){const i=p.value!==d[n][o].value;p=(0,r.A)({},p,{isProcessingProps:!0}),P(n,o,p);const s=d[n],f=(0,g.A)(s,[o].map(Ve.A)),h=Promise.resolve(l.preProcessEditCellProps({id:n,row:c,props:p,hasChanged:i,otherFieldsProps:f})).then((a=>{e.current.getRowMode(n)!==gn.View?(d=(0,Cr.w)(e.current.state),(a=(0,r.A)({},a,{isProcessingProps:!1})).value=l.preProcessEditCellProps?d[n][o].value:u,P(n,o,a)):t(!1)}));a.push(h)}Object.entries(d[n]).forEach((i=>{let[s,l]=i;if(s===o)return;const u=e.current.getColumn(s);if(!u.preProcessEditCellProps)return;l=(0,r.A)({},l,{isProcessingProps:!0}),P(n,s,l),d=(0,Cr.w)(e.current.state);const p=d[n],f=(0,g.A)(p,[s].map(Ve.A)),h=Promise.resolve(u.preProcessEditCellProps({id:n,row:c,props:l,hasChanged:!1,otherFieldsProps:f})).then((o=>{e.current.getRowMode(n)!==gn.View?(o=(0,r.A)({},o,{isProcessingProps:!1}),P(n,s,o)):t(!1)}));a.push(h)})),Promise.all(a).then((()=>{e.current.getRowMode(n)===gn.Edit?(d=(0,Cr.w)(e.current.state),t(!d[n][o].error)):t(!1)}))}))}),[e,m,P]),getRowWithUpdatedValuesFromRowEditing:o.useCallback((t=>{const n=(0,Cr.w)(e.current.state),o=e.current.getRow(t);if(!n[t])return e.current.getRow(t);let a=(0,r.A)({},o);return Object.entries(n[t]).forEach((t=>{let[n,r]=t;const o=e.current.getColumn(n);o.valueSetter?a=o.valueSetter({value:r.value,row:a}):a[n]=r.value})),a}),[e])};xe(e,{getRowMode:k,startRowEditMode:I,stopRowEditMode:N},"public"),xe(e,T,"private"),o.useEffect((()=>{p&&M(p)}),[p,M]),(0,x.A)((()=>{const t=(0,L.gk)(e),o=s.current;s.current=(0,we.Go)(n),Object.entries(n).forEach((e=>{let[n,a]=e;var i,s;const l=(null==(i=o[n])?void 0:i.mode)||gn.View,c=null!=(s=t[n])?s:n;a.mode===gn.Edit&&l===gn.View?D((0,r.A)({id:c},a)):a.mode===gn.View&&l===gn.Edit&&O((0,r.A)({id:c},a))}))}),[e,n,D,O])})(e,t);const n=o.useRef({}),{isCellEditable:a}=t,i=o.useCallback((e=>!Mt(e.rowNode)&&(!!e.colDef.editable&&(!!e.colDef.renderEditCell&&(!a||a(e))))),[a]);o.useEffect((()=>{const e=n.current;return()=>{Object.entries(e).forEach((t=>{let[n,r]=t;Object.keys(r).forEach((t=>{const[r]=e[n][t];clearTimeout(r),delete e[n][t]}))}))}}),[]);const s=o.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()}))}),[]),l=o.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===hn.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(o,a)===mn.Edit){const e=await n(r);s(e)}}))}))}),[e,t.editMode]),c=o.useCallback(((n,r)=>t.editMode===hn.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(n,r):e.current.getRowWithUpdatedValuesFromRowEditing(n)),[e,t.editMode]),u=o.useCallback(((t,n)=>{var r,o;return null!=(r=null==(o=(0,Cr.w)(e.current.state)[t])?void 0:o[n])?r:null}),[e]),d={runPendingEditCellValueMutation:s};xe(e,{isCellEditable:i,setEditCellValue:l,getRowWithUpdatedValues:c,unstable_getEditCellMeta:u},"public"),xe(e,d,"private")},$r=e=>(0,r.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),Or=(e,t)=>{var n,o,a;const i=null!=(n=null!=(o=t.sortModel)?o:null==(a=t.initialState)||null==(a=a.sorting)?void 0:a.sortModel)?n:[];return(0,r.A)({},e,{sorting:{sortModel:(0,_t.Zx)(i,t.disableMultipleColumnsSorting),sortedRows:[]}})},Tr=e=>e.preferencePanel,_r=(e,t)=>{var n,o;return(0,r.A)({},e,{preferencePanel:null!=(n=null==(o=t.initialState)?void 0:o.preferencePanel)?n:{open:!1}})};var jr=n(10844),Fr=n(1134),Lr=n(37482),Vr=n(2407);const zr=(e,t,n)=>{var o,a,i;const s=null!=(o=null!=(a=t.filterModel)?a:null==(i=t.initialState)||null==(i=i.filter)?void 0:i.filterModel)?o:(0,Lr.T)();return(0,r.A)({},e,{filter:{filterModel:(0,Vr.L5)(s,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},Hr=e=>e.filteredRowsLookup;function Br(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function Gr(){return(0,jr.UI)(Object.values)}const Wr={compact:.7,comfortable:1.3,standard:1},Ur=(e,t)=>(0,r.A)({},e,{density:{value:t.density,factor:Wr[t.density]}}),Kr=(e,t)=>{var n,o;const a=(0,r.A)({},st(t.autoPageSize),null!=(n=t.paginationModel)?n:null==(o=t.initialState)||null==(o=o.pagination)?void 0:o.paginationModel);return lt(a.pageSize,t.signature),(0,r.A)({},e,{pagination:{paginationModel:a}})},qr=(e,t,n)=>o=>{var a;let i=o.paginationModel;const s=null!=(a=null==n?void 0:n.pageSize)?a:i.pageSize,l=it(e,s);!n||(null==n?void 0:n.page)===i.page&&(null==n?void 0:n.pageSize)===i.pageSize||(i=n);const c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 0===t?e:Math.max(Math.min(e,t-1),0)}(i.page,l);return c!==i.page&&(i=(0,r.A)({},i,{page:c})),lt(i.pageSize,t),{paginationModel:i}};var Yr=n(21927),Xr=n(82917);const Zr=["field","align","width","contentWidth"];var Qr=n(29481);var Jr=n(88494),eo=n(48283),to=n(61676),no=n(1763),ro=n(423);function oo(e){return(0,ro.Ay)("MuiBadge",e)}const ao=(0,no.A)("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),io=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],so=(0,A.Ay)("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),lo=(0,A.Ay)("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${(0,to.A)(n.anchorOrigin.vertical)}${(0,to.A)(n.anchorOrigin.horizontal)}${(0,to.A)(n.overlap)}`],"default"!==n.color&&t[`color${(0,to.A)(n.color)}`],n.invisible&&t.invisible]}})((e=>{let{theme:t}=e;var n;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n,r;return(null!=(n=t.vars)?n:t).palette[e].main&&(null!=(r=t.vars)?r:t).palette[e].contrastText})).map((e=>({props:{color:e},style:{backgroundColor:(t.vars||t).palette[e].main,color:(t.vars||t).palette[e].contrastText}}))),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ao.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ao.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ao.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"rectangular"===t.overlap},style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ao.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ao.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"right"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ao.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ao.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:e=>{let{ownerState:t}=e;return"bottom"===t.anchorOrigin.vertical&&"left"===t.anchorOrigin.horizontal&&"circular"===t.overlap},style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ao.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:t.transitions.create("transform",{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.leavingScreen})}}]}})),co=o.forwardRef((function(e,t){var n,o,a,i,s,l;const c=(0,eo.A)({props:e,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:d,component:p,components:f={},componentsProps:m={},children:y,overlap:w="rectangular",color:x="default",invisible:C=!1,max:A=99,badgeContent:S,slots:k,slotProps:M,showZero:E=!1,variant:R="standard"}=c,P=(0,g.A)(c,io),{badgeContent:I,invisible:D,max:N,displayValue:$}=function(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,a=(0,Qr.A)({badgeContent:t,max:r});let i=n;!1!==n||0!==t||o||(i=!0);const{badgeContent:s,max:l=r}=i?a:e;return{badgeContent:s,invisible:i,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}}({max:A,invisible:C,badgeContent:S,showZero:E}),O=(0,Qr.A)({anchorOrigin:u,color:x,overlap:w,variant:R,badgeContent:S}),T=D||null==I&&"dot"!==R,{color:_=x,overlap:j=w,anchorOrigin:F=u,variant:L=R}=T?O:c,V="dot"!==L?$:void 0,z=(0,r.A)({},c,{badgeContent:I,invisible:T,max:N,displayValue:V,showZero:E,anchorOrigin:F,color:_,overlap:j,variant:L}),H=(e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:a,classes:i={}}=e,s={root:["root"],badge:["badge",a,r&&"invisible",`anchorOrigin${(0,to.A)(n.vertical)}${(0,to.A)(n.horizontal)}`,`anchorOrigin${(0,to.A)(n.vertical)}${(0,to.A)(n.horizontal)}${(0,to.A)(o)}`,`overlap${(0,to.A)(o)}`,"default"!==t&&`color${(0,to.A)(t)}`]};return(0,b.A)(s,oo,i)})(z),B=null!=(n=null!=(o=null==k?void 0:k.root)?o:f.Root)?n:so,G=null!=(a=null!=(i=null==k?void 0:k.badge)?i:f.Badge)?a:lo,W=null!=(s=null==M?void 0:M.root)?s:m.root,U=null!=(l=null==M?void 0:M.badge)?l:m.badge,K=(0,Jr.Q)({elementType:B,externalSlotProps:W,externalForwardedProps:P,additionalProps:{ref:t,as:p},ownerState:z,className:(0,v.A)(null==W?void 0:W.className,H.root,d)}),q=(0,Jr.Q)({elementType:G,externalSlotProps:U,ownerState:z,className:(0,v.A)(H.badge,null==U?void 0:U.className)});return(0,h.jsxs)(B,(0,r.A)({},K,{children:[y,(0,h.jsx)(G,(0,r.A)({},q,{children:V}))]}))})),uo=["className"],po=(0,G.A)("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})((()=>({display:"flex",visibility:"hidden",width:0}))),fo=o.forwardRef((function(e,t){const{className:n}=e,o=(0,g.A)(e,uo),a=(0,R.A)(),i=(e=>{const{classes:t}=e;return(0,b.A)({root:["iconButtonContainer"]},S.B,t)})(a);return(0,h.jsx)(po,(0,r.A)({ref:t,className:(0,v.A)(i.root,n),ownerState:a},o))}));const ho=["className","selectedRowCount"],mo=(0,G.A)("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})((e=>{let{theme:t}=e;return{alignItems:"center",display:"flex",margin:t.spacing(0,2),visibility:"hidden",width:0,height:0,[t.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}}})),go=o.forwardRef((function(e,t){const{className:n,selectedRowCount:o}=e,a=(0,g.A)(e,ho),i=(0,Qe.h)(),s=(0,R.A)(),l=(e=>{const{classes:t}=e;return(0,b.A)({root:["selectedRowCount"]},S.B,t)})(s),c=i.current.getLocaleText("footerRowSelected")(o);return(0,h.jsx)(mo,(0,r.A)({ref:t,className:(0,v.A)(l.root,n),ownerState:s},a,{children:c}))})),vo=["className"],yo=(0,G.A)("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),bo=o.forwardRef((function(e,t){const{className:n}=e,o=(0,g.A)(e,vo),a=(0,R.A)(),i=(e=>{const{classes:t}=e;return(0,b.A)({root:["footerContainer","withBorderColor"]},S.B,t)})(a);return(0,h.jsx)(yo,(0,r.A)({ref:t,className:(0,v.A)(i.root,n),ownerState:a},o))})),wo=o.forwardRef((function(e,t){var n,o;const a=(0,Qe.h)(),i=(0,R.A)(),s=(0,c.N)(a,L.O8),l=(0,c.N)(a,nt),u=(0,c.N)(a,oe),d=!i.hideFooterSelectedRowCount&&l>0?(0,h.jsx)(go,{selectedRowCount:l}):(0,h.jsx)("div",{}),p=i.hideFooterRowCount||i.pagination?null:(0,h.jsx)(i.slots.footerRowCount,(0,r.A)({},null==(n=i.slotProps)?void 0:n.footerRowCount,{rowCount:s,visibleRowCount:u})),f=i.pagination&&!i.hideFooterPagination&&i.slots.pagination&&(0,h.jsx)(i.slots.pagination,(0,r.A)({},null==(o=i.slotProps)?void 0:o.pagination));return(0,h.jsxs)(bo,(0,r.A)({ref:t},e,{children:[d,p,f]}))})),xo=["className","rowCount","visibleRowCount"],Co=(0,G.A)("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})((e=>{let{theme:t}=e;return{alignItems:"center",display:"flex",margin:t.spacing(0,2)}})),Ao=o.forwardRef((function(e,t){const{className:n,rowCount:o,visibleRowCount:a}=e,i=(0,g.A)(e,xo),s=(0,Qe.h)(),l=(0,R.A)(),c=(e=>{const{classes:t}=e;return(0,b.A)({root:["rowCount"]},S.B,t)})(l);if(0===o)return null;const u=a<o?s.current.getLocaleText("footerTotalVisibleRows")(a,o):o.toLocaleString();return(0,h.jsxs)(Co,(0,r.A)({ref:t,className:(0,v.A)(c.root,n),ownerState:l},i,{children:[s.current.getLocaleText("footerTotalRows")," ",u]}))})),So=o.forwardRef((function(e,t){var n,o,a;const i=(0,Qe.h)(),s=(0,c.N)(i,$.OV),l=(0,R.A)(),u=(0,c.N)(i,Tr),d=i.current.unstable_applyPipeProcessors("preferencePanel",null,null!=(n=u.openedPanelValue)?n:vr.filters);return(0,h.jsx)(l.slots.panel,(0,r.A)({ref:t,as:l.slots.basePopper,open:s.length>0&&u.open,id:u.panelId,"aria-labelledby":u.labelId},null==(o=l.slotProps)?void 0:o.panel,e,null==(a=l.slotProps)?void 0:a.basePopper,{children:d}))}));var ko=n(46639);const Mo=["className"],Eo=(0,G.A)("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),Ro=o.forwardRef((function(e,t){const{className:n}=e,o=(0,g.A)(e,Mo),a=(0,R.A)(),i=(e=>{const{classes:t}=e;return(0,b.A)({root:["overlay"]},S.B,t)})(a);return(0,h.jsx)(Eo,(0,r.A)({ref:t,className:(0,v.A)(i.root,n),ownerState:a},o))})),Po=o.forwardRef((function(e,t){return(0,h.jsx)(Ro,(0,r.A)({ref:t},e,{children:(0,h.jsx)(ko.A,{})}))})),Io=o.forwardRef((function(e,t){const n=(0,Qe.h)().current.getLocaleText("noRowsLabel");return(0,h.jsx)(Ro,(0,r.A)({ref:t},e,{children:n}))}));var Do=n(74445),No=n(27987),$o=n(70006);const Oo=o.createContext();const To=o.createContext();function _o(e){return(0,ro.Ay)("MuiTableCell",e)}const jo=(0,no.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Fo=["align","className","component","padding","scope","size","sortDirection","variant"],Lo=(0,A.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,to.A)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,to.A)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,to.A)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid\n ${"light"===t.palette.mode?(0,C.a)((0,C.X4)(t.palette.divider,1),.88):(0,C.e$)((0,C.X4)(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",[`&.${jo.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),Vo=o.forwardRef((function(e,t){const n=(0,eo.A)({props:e,name:"MuiTableCell"}),{align:a="inherit",className:i,component:s,padding:l,scope:c,size:u,sortDirection:d,variant:p}=n,f=(0,g.A)(n,Fo),m=o.useContext(Oo),y=o.useContext(To),w=y&&"head"===y.variant;let x;x=s||(w?"th":"td");let C=c;"td"===x?C=void 0:!C&&w&&(C="col");const A=p||y&&y.variant,S=(0,r.A)({},n,{align:a,component:x,padding:l||(m&&m.padding?m.padding:"normal"),size:u||(m&&m.size?m.size:"medium"),sortDirection:d,stickyHeader:"head"===A&&m&&m.stickyHeader,variant:A}),k=(e=>{const{classes:t,variant:n,align:r,padding:o,size:a,stickyHeader:i}=e,s={root:["root",n,i&&"stickyHeader","inherit"!==r&&`align${(0,to.A)(r)}`,"normal"!==o&&`padding${(0,to.A)(o)}`,`size${(0,to.A)(a)}`]};return(0,b.A)(s,_o,t)})(S);let M=null;return d&&(M="asc"===d?"ascending":"descending"),(0,h.jsx)(Lo,(0,r.A)({as:x,ref:t,className:(0,v.A)(k.root,i),"aria-sort":M,scope:C,ownerState:S},f))}));var zo=n(83239),Ho=n(30099),Bo=n(88090),Go=n(25333),Wo=n(88113),Uo=n(68489);const Ko=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],qo=o.forwardRef((function(e,t){var n,o,a,i,s,l,c,u;const{backIconButtonProps:d,count:p,disabled:f=!1,getItemAriaLabel:m,nextIconButtonProps:v,onPageChange:y,page:b,rowsPerPage:w,showFirstButton:x,showLastButton:C,slots:A={},slotProps:S={}}=e,k=(0,g.A)(e,Ko),M=(0,Zt.A)(),E=null!=(n=A.firstButton)?n:Go.A,R=null!=(o=A.lastButton)?o:Go.A,P=null!=(a=A.nextButton)?a:Go.A,I=null!=(i=A.previousButton)?i:Go.A,D=null!=(s=A.firstButtonIcon)?s:Uo.A,N=null!=(l=A.lastButtonIcon)?l:Wo.A,$=null!=(c=A.nextButtonIcon)?c:Bo.A,O=null!=(u=A.previousButtonIcon)?u:Ho.A,T="rtl"===M.direction?R:E,_="rtl"===M.direction?P:I,j="rtl"===M.direction?I:P,F="rtl"===M.direction?E:R,L="rtl"===M.direction?S.lastButton:S.firstButton,V="rtl"===M.direction?S.nextButton:S.previousButton,z="rtl"===M.direction?S.previousButton:S.nextButton,H="rtl"===M.direction?S.firstButton:S.lastButton;return(0,h.jsxs)("div",(0,r.A)({ref:t},k,{children:[x&&(0,h.jsx)(T,(0,r.A)({onClick:e=>{y(e,0)},disabled:f||0===b,"aria-label":m("first",b),title:m("first",b)},L,{children:"rtl"===M.direction?(0,h.jsx)(N,(0,r.A)({},S.lastButtonIcon)):(0,h.jsx)(D,(0,r.A)({},S.firstButtonIcon))})),(0,h.jsx)(_,(0,r.A)({onClick:e=>{y(e,b-1)},disabled:f||0===b,color:"inherit","aria-label":m("previous",b),title:m("previous",b)},null!=V?V:d,{children:"rtl"===M.direction?(0,h.jsx)($,(0,r.A)({},S.nextButtonIcon)):(0,h.jsx)(O,(0,r.A)({},S.previousButtonIcon))})),(0,h.jsx)(j,(0,r.A)({onClick:e=>{y(e,b+1)},disabled:f||-1!==p&&b>=Math.ceil(p/w)-1,color:"inherit","aria-label":m("next",b),title:m("next",b)},null!=z?z:v,{children:"rtl"===M.direction?(0,h.jsx)(O,(0,r.A)({},S.previousButtonIcon)):(0,h.jsx)($,(0,r.A)({},S.nextButtonIcon))})),C&&(0,h.jsx)(F,(0,r.A)({onClick:e=>{y(e,Math.max(0,Math.ceil(p/w)-1))},disabled:f||b>=Math.ceil(p/w)-1,"aria-label":m("last",b),title:m("last",b)},H,{children:"rtl"===M.direction?(0,h.jsx)(D,(0,r.A)({},S.firstButtonIcon)):(0,h.jsx)(N,(0,r.A)({},S.lastButtonIcon))}))]}))}));var Yo=n(31014);function Xo(e){return(0,ro.Ay)("MuiTablePagination",e)}const Zo=(0,no.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Qo;const Jo=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],ea=(0,A.Ay)(Vo,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),ta=(0,A.Ay)(zo.A,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,r.A)({[`& .${Zo.actions}`]:t.actions},t.toolbar)})((e=>{let{theme:t}=e;return{minHeight:52,paddingRight:2,[`${t.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Zo.actions}`]:{flexShrink:0,marginLeft:20}}})),na=(0,A.Ay)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),ra=(0,A.Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((e=>{let{theme:t}=e;return(0,r.A)({},t.typography.body2,{flexShrink:0})})),oa=(0,A.Ay)($o.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,r.A)({[`& .${Zo.selectIcon}`]:t.selectIcon,[`& .${Zo.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Zo.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),aa=(0,A.Ay)(No.A,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),ia=(0,A.Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((e=>{let{theme:t}=e;return(0,r.A)({},t.typography.body2,{flexShrink:0})}));function sa(e){let{from:t,to:n,count:r}=e;return`${t}\u2013${n} of ${-1!==r?r:`more than ${n}`}`}function la(e){return`Go to ${e} page`}const ca=o.forwardRef((function(e,t){var n;const a=(0,eo.A)({props:e,name:"MuiTablePagination"}),{ActionsComponent:i=qo,backIconButtonProps:s,className:l,colSpan:c,component:u=Vo,count:d,disabled:p=!1,getItemAriaLabel:f=la,labelDisplayedRows:m=sa,labelRowsPerPage:y="Rows per page:",nextIconButtonProps:w,onPageChange:x,onRowsPerPageChange:C,page:A,rowsPerPage:S,rowsPerPageOptions:k=[10,25,50,100],SelectProps:M={},showFirstButton:E=!1,showLastButton:R=!1,slotProps:P={},slots:I={}}=a,D=(0,g.A)(a,Jo),N=a,$=(e=>{const{classes:t}=e;return(0,b.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},Xo,t)})(N),O=null!=(n=null==P?void 0:P.select)?n:M,T=O.native?"option":aa;let _;u!==Vo&&"td"!==u||(_=c||1e3);const j=(0,Yo.A)(O.id),F=(0,Yo.A)(O.labelId);return(0,h.jsx)(ea,(0,r.A)({colSpan:_,ref:t,as:u,ownerState:N,className:(0,v.A)($.root,l)},D,{children:(0,h.jsxs)(ta,{className:$.toolbar,children:[(0,h.jsx)(na,{className:$.spacer}),k.length>1&&(0,h.jsx)(ra,{className:$.selectLabel,id:F,children:y}),k.length>1&&(0,h.jsx)(oa,(0,r.A)({variant:"standard"},!O.variant&&{input:Qo||(Qo=(0,h.jsx)(_n.Ay,{}))},{value:S,onChange:C,id:j,labelId:F},O,{classes:(0,r.A)({},O.classes,{root:(0,v.A)($.input,$.selectRoot,(O.classes||{}).root),select:(0,v.A)($.select,(O.classes||{}).select),icon:(0,v.A)($.selectIcon,(O.classes||{}).icon)}),disabled:p,children:k.map((e=>(0,o.createElement)(T,(0,r.A)({},!(0,Do.g)(T)&&{ownerState:N},{className:$.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)))})),(0,h.jsx)(ia,{className:$.displayedRows,children:m({from:0===d?0:A*S+1,to:-1===d?(A+1)*S:-1===S?d:Math.min(d,(A+1)*S),count:-1===d?-1:d,page:A})}),(0,h.jsx)(i,{className:$.actions,backIconButtonProps:s,count:d,nextIconButtonProps:w,onPageChange:x,page:A,rowsPerPage:S,showFirstButton:E,showLastButton:R,slotProps:P.actions,slots:I.actions,getItemAriaLabel:f,disabled:p})]})}))})),ua=(0,A.Ay)(ca)((e=>{let{theme:t}=e;return{[`& .${Zo.selectLabel}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"block"}},[`& .${Zo.input}`]:{display:"none",[t.breakpoints.up("sm")]:{display:"inline-flex"}}}})),da=o.forwardRef((function(e,t){const n=(0,Qe.h)(),a=(0,R.A)(),i=(0,c.N)(n,ut),s=(0,c.N)(n,oe),l=o.useMemo((()=>{var e,t;return null!=(e=null!=(t=a.rowCount)?t:s)?e:0}),[a.rowCount,s]),u=o.useMemo((()=>Math.floor(l/(i.pageSize||1))),[l,i.pageSize]),d=o.useCallback((e=>{const t=Number(e.target.value);n.current.setPageSize(t)}),[n]),p=o.useCallback(((e,t)=>{n.current.setPage(t)}),[n]);const f=(e=>{for(let t=0;t<a.pageSizeOptions.length;t+=1){const n=a.pageSizeOptions[t];if("number"===typeof n){if(n===e)return!0}else if(n.value===e)return!0}return!1})(i.pageSize)?a.pageSizeOptions:[];return(0,h.jsx)(ua,(0,r.A)({ref:t,component:"div",count:l,page:i.page<=u?i.page:u,rowsPerPageOptions:f,rowsPerPage:i.pageSize,onPageChange:p,onRowsPerPageChange:d},n.current.getLocaleText("MuiTablePagination"),e))}));var pa=n(73077);const fa=["className"],ha=(0,G.A)("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function ma(e){const{className:t}=e,n=(0,g.A)(e,fa),o=(0,R.A)(),a=(e=>{const{classes:t}=e;return(0,b.A)({root:["panelContent"]},S.B,t)})(o);return(0,h.jsx)(ha,(0,r.A)({className:(0,v.A)(t,a.root),ownerState:o},n))}const ga=["className"],va=(0,G.A)("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})((e=>{let{theme:t}=e;return{padding:t.spacing(.5),display:"flex",justifyContent:"space-between"}}));function ya(e){const{className:t}=e,n=(0,g.A)(e,ga),o=(0,R.A)(),a=(e=>{const{classes:t}=e;return(0,b.A)({root:["panelFooter"]},S.B,t)})(o);return(0,h.jsx)(va,(0,r.A)({className:(0,v.A)(t,a.root),ownerState:o},n))}var ba=n(76493);const wa=["className","slotProps"],xa=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),Ca=()=>!0,Aa=o.forwardRef((function(e,t){const{className:n,slotProps:o={}}=e,a=(0,g.A)(e,wa),i=(0,R.A)(),s=(e=>{const{classes:t}=e;return(0,b.A)({root:["panelWrapper"]},S.B,t)})(i);return(0,h.jsx)(ba.s,(0,r.A)({open:!0,disableEnforceFocus:!0,isEnabled:Ca},o.TrapFocus,{children:(0,h.jsx)(xa,(0,r.A)({ref:t,tabIndex:-1,className:(0,v.A)(n,s.root),ownerState:i},a))}))})),Sa=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],ka=["InputComponentProps"],Ma=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})((e=>{let{theme:t}=e;return{display:"flex",padding:t.spacing(1)}})),Ea=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})((e=>{let{theme:t}=e;return{flexShrink:0,justifyContent:"flex-end",marginRight:t.spacing(.5),marginBottom:t.spacing(.2)}})),Ra=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),Pa=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),Ia=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),Da=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),Na=e=>e.headerName||e.field,$a=new Intl.Collator,Oa=o.forwardRef((function(e,t){var n,a,i,s,l,u,d,p,f,m;const{item:w,hasMultipleFilters:x,deleteFilter:C,applyFilterChanges:A,multiFilterOperator:k,showMultiFilterOperators:M,disableMultiFilterOperator:E,applyMultiFilterOperatorChanges:P,focusElementRef:I,logicOperators:D=[pa.V.And,pa.V.Or],columnsSort:N,filterColumns:O,deleteIconProps:T={},logicOperatorInputProps:_={},operatorInputProps:j={},columnInputProps:F={},valueInputProps:L={}}=e,V=(0,g.A)(e,Sa),z=(0,Qe.h)(),H=(0,c.N)(z,$.Oe),B=(0,c.N)(z,Y),G=(0,$t.A)(),W=(0,$t.A)(),U=(0,$t.A)(),K=(0,$t.A)(),q=(0,R.A)(),X=(e=>{const{classes:t}=e;return(0,b.A)({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},S.B,t)})(q),Z=o.useRef(null),Q=o.useRef(null),J=x&&D.length>0,ee=(null==(n=q.slotProps)?void 0:n.baseFormControl)||{},te=null==(i=((null==(a=q.slotProps)?void 0:a.baseSelect)||{}).native)||i,ne=(null==(s=q.slotProps)?void 0:s.baseInputLabel)||{},re=(null==(l=q.slotProps)?void 0:l.baseSelectOption)||{},{InputComponentProps:oe}=L,ae=(0,g.A)(L,ka),ie=o.useMemo((()=>{if(void 0===O||"function"!==typeof O)return H;const e=O({field:w.field,columns:H,currentFilters:(null==B?void 0:B.items)||[]});return H.filter((t=>e.includes(t.field)))}),[O,null==B?void 0:B.items,H,w.field]),se=o.useMemo((()=>{switch(N){case"asc":return ie.sort(((e,t)=>$a.compare(Na(e),Na(t))));case"desc":return ie.sort(((e,t)=>-$a.compare(Na(e),Na(t))));default:return ie}}),[ie,N]),le=w.field?z.current.getColumn(w.field):null,ce=o.useMemo((()=>{var e;return w.operator&&le?null==(e=le.filterOperators)?void 0:e.find((e=>e.value===w.operator)):null}),[w,le]),ue=o.useCallback((e=>{const t=e.target.value,n=z.current.getColumn(t);if(n.field===le.field)return;const o=n.filterOperators.find((e=>e.value===w.operator))||n.filterOperators[0],a=!o.InputComponent||o.InputComponent!==(null==ce?void 0:ce.InputComponent)||n.type!==le.type;A((0,r.A)({},w,{field:t,operator:o.value,value:a?void 0:w.value}))}),[z,A,w,le,ce]),de=o.useCallback((e=>{const t=e.target.value,n=null==le?void 0:le.filterOperators.find((e=>e.value===t)),o=!(null!=n&&n.InputComponent)||(null==n?void 0:n.InputComponent)!==(null==ce?void 0:ce.InputComponent);A((0,r.A)({},w,{operator:t,value:o?void 0:w.value}))}),[A,w,le,ce]),pe=o.useCallback((e=>{const t=e.target.value===pa.V.And.toString()?pa.V.And:pa.V.Or;P(t)}),[P]);return o.useImperativeHandle(I,(()=>({focus:()=>{var e;null!=ce&&ce.InputComponent?null==Z||null==(e=Z.current)||e.focus():Q.current.focus()}})),[ce]),(0,h.jsxs)(Ma,(0,r.A)({ref:t,className:X.root,"data-id":w.id,ownerState:q},V,{children:[(0,h.jsx)(Ea,(0,r.A)({variant:"standard",as:q.slots.baseFormControl},ee,T,{className:(0,v.A)(X.deleteIcon,ee.className,T.className),ownerState:q,children:(0,h.jsx)(q.slots.baseIconButton,(0,r.A)({"aria-label":z.current.getLocaleText("filterPanelDeleteIconLabel"),title:z.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{q.disableMultipleColumnsFiltering?void 0===w.value?C(w):A((0,r.A)({},w,{value:void 0})):C(w)},size:"small"},null==(u=q.slotProps)?void 0:u.baseIconButton,{children:(0,h.jsx)(q.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,h.jsx)(Ra,(0,r.A)({variant:"standard",as:q.slots.baseFormControl},ee,_,{sx:(0,r.A)({display:J?"flex":"none",visibility:M?"visible":"hidden"},ee.sx||{},_.sx||{}),className:(0,v.A)(X.logicOperatorInput,ee.className,_.className),ownerState:q,children:(0,h.jsx)(q.slots.baseSelect,(0,r.A)({inputProps:{"aria-label":z.current.getLocaleText("filterPanelLogicOperator")},value:k,onChange:pe,disabled:!!E||1===D.length,native:te},null==(d=q.slotProps)?void 0:d.baseSelect,{children:D.map((e=>(0,o.createElement)(q.slots.baseSelectOption,(0,r.A)({},re,{native:te,key:e.toString(),value:e.toString()}),z.current.getLocaleText((e=>{switch(e){case pa.V.And:return"filterPanelOperatorAnd";case pa.V.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(e)))))}))})),(0,h.jsxs)(Pa,(0,r.A)({variant:"standard",as:q.slots.baseFormControl},ee,F,{className:(0,v.A)(X.columnInput,ee.className,F.className),ownerState:q,children:[(0,h.jsx)(q.slots.baseInputLabel,(0,r.A)({},ne,{htmlFor:G,id:W,children:z.current.getLocaleText("filterPanelColumns")})),(0,h.jsx)(q.slots.baseSelect,(0,r.A)({labelId:W,id:G,label:z.current.getLocaleText("filterPanelColumns"),value:w.field||"",onChange:ue,native:te},null==(p=q.slotProps)?void 0:p.baseSelect,{children:se.map((e=>(0,o.createElement)(q.slots.baseSelectOption,(0,r.A)({},re,{native:te,key:e.field,value:e.field}),Na(e))))}))]})),(0,h.jsxs)(Ia,(0,r.A)({variant:"standard",as:q.slots.baseFormControl},ee,j,{className:(0,v.A)(X.operatorInput,ee.className,j.className),ownerState:q,children:[(0,h.jsx)(q.slots.baseInputLabel,(0,r.A)({},ne,{htmlFor:U,id:K,children:z.current.getLocaleText("filterPanelOperator")})),(0,h.jsx)(q.slots.baseSelect,(0,r.A)({labelId:K,label:z.current.getLocaleText("filterPanelOperator"),id:U,value:w.operator,onChange:de,native:te,inputRef:Q},null==(f=q.slotProps)?void 0:f.baseSelect,{children:null==le||null==(m=le.filterOperators)?void 0:m.map((e=>(0,o.createElement)(q.slots.baseSelectOption,(0,r.A)({},re,{native:te,key:e.value,value:e.value}),e.label||z.current.getLocaleText(`filterOperator${(0,y.A)(e.value)}`))))}))]})),(0,h.jsx)(Da,(0,r.A)({variant:"standard",as:q.slots.baseFormControl},ee,ae,{className:(0,v.A)(X.valueInput,ee.className,ae.className),ownerState:q,children:null!=ce&&ce.InputComponent?(0,h.jsx)(ce.InputComponent,(0,r.A)({apiRef:z,item:w,applyValue:A,focusElementRef:Z},ce.InputComponentProps,oe)):null}))]}))})),Ta=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],_a=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),ja=o.forwardRef((function(e,t){var n,a;const i=(0,Qe.h)(),s=(0,R.A)(),l=(0,c.N)(i,Y),u=(0,c.N)(i,$.Oe),d=o.useRef(null),p=o.useRef(null),{logicOperators:f=[pa.V.And,pa.V.Or],columnsSort:m,filterFormProps:v,getColumnForNewFilter:y,disableAddFilterButton:b=!1,disableRemoveAllButton:w=!1}=e,x=(0,g.A)(e,Ta),C=i.current.upsertFilterItem,A=o.useCallback((e=>{i.current.setFilterLogicOperator(e)}),[i]),S=o.useCallback((()=>{let e;if(y&&"function"===typeof y){const t=y({currentFilters:(null==l?void 0:l.items)||[],columns:u});if(null===t)return null;e=u.find((e=>{let{field:n}=e;return n===t}))}else e=u.find((e=>{var t;return null==(t=e.filterOperators)?void 0:t.length}));return e?_a(e):null}),[null==l?void 0:l.items,u,y]),k=o.useCallback((()=>{if(void 0===y||"function"!==typeof y)return S();const e=l.items.length?l.items:[S()].filter(Boolean),t=y({currentFilters:e,columns:u});if(null===t)return null;const n=u.find((e=>{let{field:n}=e;return n===t}));return n?_a(n):null}),[l.items,u,y,S]),M=o.useMemo((()=>l.items.length?l.items:(p.current||(p.current=S()),p.current?[p.current]:[])),[l.items,S]),E=M.length>1,P=o.useCallback((e=>{const t=1===M.length;i.current.deleteFilterItem(e),t&&i.current.hideFilterPanel()}),[i,M.length]);return o.useEffect((()=>{f.length>0&&l.logicOperator&&!f.includes(l.logicOperator)&&A(f[0])}),[f,A,l.logicOperator]),o.useEffect((()=>{M.length>0&&d.current.focus()}),[M.length]),(0,h.jsxs)(Aa,(0,r.A)({ref:t},x,{children:[(0,h.jsx)(ma,{children:M.map(((e,t)=>(0,h.jsx)(Oa,(0,r.A)({item:e,applyFilterChanges:C,deleteFilter:P,hasMultipleFilters:E,showMultiFilterOperators:t>0,multiFilterOperator:l.logicOperator,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:A,focusElementRef:t===M.length-1?d:null,logicOperators:f,columnsSort:m},v),null==e.id?t:e.id)))}),s.disableMultipleColumnsFiltering||b&&w?null:(0,h.jsxs)(ya,{children:[b?(0,h.jsx)("span",{}):(0,h.jsx)(s.slots.baseButton,(0,r.A)({onClick:()=>{const e=k();e&&i.current.upsertFilterItems([...M,e])},startIcon:(0,h.jsx)(s.slots.filterPanelAddIcon,{})},null==(n=s.slotProps)?void 0:n.baseButton,{children:i.current.getLocaleText("filterPanelAddFilter")})),w?null:(0,h.jsx)(s.slots.baseButton,(0,r.A)({onClick:()=>{1===M.length&&void 0===M[0].value&&(i.current.deleteFilterItem(M[0]),i.current.hideFilterPanel()),i.current.setFilterModel((0,r.A)({},l,{items:[]}))},startIcon:(0,h.jsx)(s.slots.filterPanelRemoveAllIcon,{})},null==(a=s.slotProps)?void 0:a.baseButton,{children:i.current.getLocaleText("filterPanelRemoveAll")}))]})]}))}));var Fa=n(20163),La=n(39766),Va=n(70849),za=n(82053);function Ha(e){return(0,ro.Ay)("MuiFormControlLabel",e)}const Ba=(0,no.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var Ga=n(68624);const Wa=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Ua=(0,A.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ba.label}`]:t.label},t.root,t[`labelPlacement${(0,to.A)(n.labelPlacement)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Ba.disabled}`]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${Ba.label}`]:{[`&.${Ba.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})})),Ka=(0,A.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{[`&.${Ba.error}`]:{color:(t.vars||t).palette.error.main}}})),qa=o.forwardRef((function(e,t){var n,a;const i=(0,eo.A)({props:e,name:"MuiFormControlLabel"}),{className:s,componentsProps:l={},control:c,disabled:u,disableTypography:d,label:p,labelPlacement:f="end",required:m,slotProps:y={}}=i,w=(0,g.A)(i,Wa),x=(0,La.A)(),C=null!=(n=null!=u?u:c.props.disabled)?n:null==x?void 0:x.disabled,A=null!=m?m:c.props.required,S={disabled:C,required:A};["checked","name","onChange","value","inputRef"].forEach((e=>{"undefined"===typeof c.props[e]&&"undefined"!==typeof i[e]&&(S[e]=i[e])}));const k=(0,Ga.A)({props:i,muiFormControl:x,states:["error"]}),M=(0,r.A)({},i,{disabled:C,labelPlacement:f,required:A,error:k.error}),E=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:a}=e,i={root:["root",n&&"disabled",`labelPlacement${(0,to.A)(r)}`,o&&"error",a&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,b.A)(i,Ha,t)})(M),R=null!=(a=y.typography)?a:l.typography;let P=p;return null==P||P.type===za.A||d||(P=(0,h.jsx)(za.A,(0,r.A)({component:"span"},R,{className:(0,v.A)(E.label,null==R?void 0:R.className),children:P}))),(0,h.jsxs)(Ua,(0,r.A)({className:(0,v.A)(E.root,s),ownerState:M,ref:t},w,{children:[o.cloneElement(c,S),A?(0,h.jsxs)(Va.A,{display:"block",children:[P,(0,h.jsxs)(Ka,{ownerState:M,"aria-hidden":!0,className:E.asterisk,children:["\u2009","*"]})]}):P]}))})),Ya=["className"],Xa=(0,G.A)("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})((e=>{let{theme:t}=e;return{padding:t.spacing(1)}}));function Za(e){const{className:t}=e,n=(0,g.A)(e,Ya),o=(0,R.A)(),a=(e=>{const{classes:t}=e;return(0,b.A)({root:["panelHeader"]},S.B,t)})(o);return(0,h.jsx)(Xa,(0,r.A)({className:(0,v.A)(t,a.root),ownerState:o},n))}const Qa=["sort","searchPredicate","autoFocusSearchField","disableHideAllButton","disableShowAllButton","getTogglableColumns"],Ja=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),ei=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${Fa.A.root}`]:{marginRight:t.spacing(.5)}}})),ti=((0,A.Ay)(Go.A)({justifyContent:"flex-end"}),new Intl.Collator),ni=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;const ri=["children","className","classes"],oi=(0,no.A)("MuiDataGrid",["panel","paper"]),ai=(0,A.Ay)(on.A,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})((e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal}})),ii=(0,A.Ay)(rn.A,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{theme:t}=e;return{backgroundColor:(t.vars||t).palette.background.paper,minWidth:300,maxHeight:450,display:"flex"}})),si=o.forwardRef(((e,t)=>{const{children:n,className:a}=e,i=(0,g.A)(e,ri),s=(0,Qe.h)(),l=(0,R.A)(),c=oi,[u,d]=o.useState(!1),p=o.useCallback((()=>{s.current.hidePreferences()}),[s]),f=o.useCallback((e=>{Ue(e.key)&&s.current.hidePreferences()}),[s]),m=o.useMemo((()=>[{name:"flip",enabled:!1},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{d(!0)},effect:()=>()=>{d(!1)}}]),[]),[y,b]=o.useState(null);return o.useEffect((()=>{var e;const t=null==(e=s.current.rootElementRef)||null==(e=e.current)?void 0:e.querySelector(`.${S.x.columnHeaders}`);t&&b(t)}),[s]),y?(0,h.jsx)(ai,(0,r.A)({ref:t,placement:"bottom-start",className:(0,v.A)(a,c.panel),ownerState:l,anchorEl:y,modifiers:m},i,{children:(0,h.jsx)(tn,{mouseEvent:"onMouseUp",onClickAway:p,children:(0,h.jsx)(ii,{className:c.paper,ownerState:l,elevation:8,onKeyDown:f,children:u&&n})})})):null}));var li=n(76915);function ci(e){return o.memo(e,li.v)}let ui;class di extends Error{}const pi=["changeReason","unstable_updateValueOnRender"],fi=["column","rowId","editCellState","align","children","colIndex","height","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","isNotVisible","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver","style"],hi=["changeReason","unstable_updateValueOnRender"],mi={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:mn.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},gi=e=>{const{align:t,showRightBorder:n,isEditable:r,isSelected:o,isSelectionMode:a,classes:i}=e,s={root:["cell",`cell--text${(0,y.A)(t)}`,r&&"cell--editable",o&&"selected",n&&"cell--withRightBorder",a&&!r&&"cell--selectionMode","withBorderColor"],content:["cellContent"]};return(0,b.A)(s,S.B,i)};const vi=ci(o.forwardRef(((e,t)=>{const{column:n,rowId:a,editCellState:i}=e,s=(0,Qe.h)(),l=(0,R.A)(),u=n.field,d=(0,c.N)(s,(()=>{try{const e=s.current.getCellParams(a,u);return e.api=s.current,e}catch(e){if(e instanceof di)return mi;throw e}}),c.T),p=(0,c.N)(s,(()=>s.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:a,field:u})));if(d===mi)return null;const{cellMode:f,hasFocus:h,isEditable:m,value:y,formattedValue:b}=d,w="actions"===n.type,x="view"!==f&&m||w?-1:d.tabIndex,{classes:C,getCellClassName:A}=l,k=s.current.unstable_applyPipeProcessors("cellClassName",[],{id:a,field:u});let M;if(n.cellClassName&&k.push("function"===typeof n.cellClassName?n.cellClassName(d):n.cellClassName),A&&k.push(A(d)),null==i&&n.renderCell&&(M=n.renderCell(d),k.push(S.x["cell--withRenderer"]),k.push(null==C?void 0:C["cell--withRenderer"])),null!=i&&n.renderEditCell){const e=s.current.getRowWithUpdatedValues(a,n.field),t=(0,g.A)(i,pi),o=(0,r.A)({},d,{row:e},t);M=n.renderEditCell(o),k.push(S.x["cell--editing"]),k.push(null==C?void 0:C["cell--editing"])}const{slots:E}=l,P=E.cell,I=(0,r.A)({},e,{ref:t,field:u,formattedValue:b,hasFocus:h,isEditable:m,isSelected:p,value:y,cellMode:f,children:M,tabIndex:x,className:(0,v.A)(k)});return o.createElement(P,I)}))),yi=ci(o.forwardRef(((e,t)=>{var n,a,i,s;const{column:l,rowId:u,editCellState:d,align:p,colIndex:f,height:m,width:y,className:b,showRightBorder:x,colSpan:C,disableDragEvents:A,isNotVisible:k,onClick:M,onDoubleClick:E,onMouseDown:P,onMouseUp:I,onMouseOver:D,onKeyDown:N,onKeyUp:$,onDragEnter:O,onDragOver:T,style:_}=e,j=(0,g.A)(e,fi),F=(0,Qe.h)(),L=(0,R.A)(),V=l.field,z=(0,c.N)(F,(()=>{try{const e=F.current.getCellParams(u,V);return e.api=F.current,e}catch(e){if(e instanceof di)return mi;throw e}}),c.T),H=(0,c.N)(F,(()=>F.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:u,field:V}))),{cellMode:B,hasFocus:G,isEditable:W,value:U,formattedValue:K}=z,q="actions"===l.type&&(null==(n=(a=l).getActions)?void 0:n.call(a,F.current.getRowParams(u)).some((e=>!e.props.disabled))),Y="view"!==B&&W||q?-1:z.tabIndex,{classes:X,getCellClassName:Z}=L,Q=F.current.unstable_applyPipeProcessors("cellClassName",[],{id:u,field:V});l.cellClassName&&Q.push("function"===typeof l.cellClassName?l.cellClassName(z):l.cellClassName),Z&&Q.push(Z(z));const J=null==K?U:K,ee=o.useRef(null),te=(0,w.A)(t,ee),ne=o.useRef(null),re=null!=(i=L.unstable_cellSelection)&&i,oe={align:p,showRightBorder:x,isEditable:W,classes:L.classes,isSelected:H,isSelectionMode:re},ae=gi(oe),ie=o.useCallback((e=>t=>{const n=F.current.getCellParams(u,V||"");F.current.publishEvent(e,n,t),I&&I(t)}),[F,V,I,u]),se=o.useCallback((e=>t=>{const n=F.current.getCellParams(u,V||"");F.current.publishEvent(e,n,t),P&&P(t)}),[F,V,P,u]),le=o.useCallback(((e,t)=>n=>{if(!F.current.getRow(u))return;const r=F.current.getCellParams(u,V||"");F.current.publishEvent(e,r,n),t&&t(n)}),[F,V,u]),ce=o.useMemo((()=>{if(k)return(0,r.A)({padding:0,opacity:0,width:0,border:0},_);return(0,r.A)({minWidth:y,maxWidth:y,minHeight:m,maxHeight:"auto"===m?"none":m},_)}),[y,m,k,_]);if(o.useEffect((()=>{if(!G||B===mn.Edit)return;const e=(0,Jt.A)(F.current.rootElementRef.current);if(ee.current&&!ee.current.contains(e.activeElement)){const e=ee.current.querySelector('[tabindex="0"]'),t=ne.current||e||ee.current;if(void 0===ui&&document.createElement("div").focus({get preventScroll(){return ui=!0,!1}}),ui)t.focus({preventScroll:!0});else{const e=F.current.getScrollPosition();t.focus(),F.current.scroll(e)}}}),[G,B,F]),z===mi)return null;let ue,de=j.onFocus;if(null==d&&l.renderCell&&(ue=l.renderCell(z),Q.push(S.x["cell--withRenderer"]),Q.push(null==X?void 0:X["cell--withRenderer"])),null!=d&&l.renderEditCell){const e=F.current.getRowWithUpdatedValues(u,l.field),t=(0,g.A)(d,hi),n=(0,r.A)({},z,{row:e},t);ue=l.renderEditCell(n),Q.push(S.x["cell--editing"]),Q.push(null==X?void 0:X["cell--editing"])}if(void 0===ue){const e=null==J?void 0:J.toString();ue=(0,h.jsx)("div",{className:ae.content,title:e,role:"presentation",children:e})}o.isValidElement(ue)&&q&&(ue=o.cloneElement(ue,{focusElementRef:ne}));const pe=A?null:{onDragEnter:le("cellDragEnter",O),onDragOver:le("cellDragOver",T)},fe=null==(s=L.experimentalFeatures)?void 0:s.ariaV7;return(0,h.jsx)("div",(0,r.A)({ref:te,className:(0,v.A)(b,Q,ae.root),role:fe?"gridcell":"cell","data-field":V,"data-colindex":f,"aria-colindex":f+1,"aria-colspan":C,style:ce,tabIndex:Y,onClick:le("cellClick",M),onDoubleClick:le("cellDoubleClick",E),onMouseOver:le("cellMouseOver",D),onMouseDown:se("cellMouseDown"),onMouseUp:ie("cellMouseUp"),onKeyDown:le("cellKeyDown",N),onKeyUp:le("cellKeyUp",$)},pe,j,{onFocus:de,children:ue}))}))),bi=["selected","hovered","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCellColumnIndexNotInRange","isNotVisible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"];function wi(e){let{width:t}=e;if(!t)return null;const n={width:t};return(0,h.jsx)("div",{className:`${S.x.cell} ${S.x.withBorderColor}`,style:n})}const xi=ci(o.forwardRef((function(e,t){const{selected:n,hovered:a,rowId:i,row:s,index:l,style:u,position:d,rowHeight:p,className:f,visibleColumns:m,renderedColumns:y,containerWidth:x,firstColumnToRender:C,isLastVisible:A=!1,focusedCellColumnIndexNotInRange:k,isNotVisible:M,focusedCell:E,onClick:P,onDoubleClick:I,onMouseEnter:D,onMouseLeave:N,onMouseOut:O,onMouseOver:T}=e,_=(0,g.A)(e,bi),j=(0,Qe.h)(),V=o.useRef(null),z=(0,R.A)(),H=yn(j,z),B=(0,c.N)(j,$.fc),G=(0,c.N)(j,K.XU),W=(0,c.N)(j,L.V2),U=(0,c.N)(j,F),q=(0,c.N)(j,Cr.w),Y=(0,w.A)(V,t),X=l+U+2,Z=(e=>{const{editable:t,editing:n,selected:r,isLastVisible:o,rowHeight:a,classes:i}=e,s={root:["row",r&&"selected",t&&"row--editable",n&&"row--editing",o&&"row--lastVisible","auto"===a&&"row--dynamicHeight"]};return(0,b.A)(s,S.B,i)})({selected:n,hovered:a,isLastVisible:A,classes:z.classes,editing:j.current.getRowMode(i)===gn.Edit,editable:z.editMode===hn.Row,rowHeight:p});o.useLayoutEffect((()=>{"auto"===p&&V.current&&"undefined"===typeof ResizeObserver&&j.current.unstable_storeRowHeightMeasurement(i,V.current.clientHeight,d)}),[j,p,i,d]),o.useLayoutEffect((()=>{if(H.range){const e=j.current.getRowIndexRelativeToVisibleRows(i);null!=e&&j.current.unstable_setLastMeasuredRowIndex(e)}const e=V.current;if(!e||"auto"!==p||"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;j.current.unstable_storeRowHeightMeasurement(i,n,d)}));return t.observe(e),()=>t.disconnect()}),[j,H.range,l,p,i,d]);const Q=o.useCallback(((e,t)=>n=>{(0,wn.TA)(n)||j.current.getRow(i)&&(j.current.publishEvent(e,j.current.getRowParams(i),n),t&&t(n))}),[j,i]),J=o.useCallback((e=>{const t=(0,wn.fl)(e.target,S.x.cell),n=null==t?void 0:t.getAttribute("data-field");if(n){if(n===Bt.field)return;if(n===bn)return;if("__reorder__"===n)return;if(j.current.getCellMode(i,n)===mn.Edit)return;const e=j.current.getColumn(n);if((null==e?void 0:e.type)===pn)return}Q("rowClick",P)(e)}),[j,P,Q,i]),{slots:ee,slotProps:te,disableColumnReorder:ne}=z,re=ee.cell===yi?yi:vi,oe=z.rowReordering,ae=(e,t)=>{var n,o;const a=ne&&e.disableReorder||!oe&&!!G.length&&W>1&&Object.keys(q).length>0,s=null!=(n=null==(o=q[i])?void 0:o[e.field])?n:null;let l=!1;return void 0!==k&&m[k].field===e.field&&(l=!0),(0,h.jsx)(re,(0,r.A)({column:e,width:t.width,rowId:i,height:p,showRightBorder:t.showRightBorder,align:e.align||"left",colIndex:t.indexRelativeToAllColumns,colSpan:t.colSpan,disableDragEvents:a,editCellState:s,isNotVisible:l},null==te?void 0:te.cell),e.field)},ie=(0,c.N)(j,(()=>(0,r.A)({},j.current.unstable_getRowInternalSizes(i))),c.T);let se=p;if("auto"===se&&ie){let e=0;const t=Object.entries(ie).reduce(((t,n)=>{let[r,o]=n;return/^base[A-Z]/.test(r)?(e+=1,o>t?o:t):t}),0);t>0&&e>1&&(se=t)}const le=o.useMemo((()=>{if(M)return{opacity:0,width:0,height:0};const e=(0,r.A)({},u,{maxHeight:"auto"===p?"none":p,minHeight:se});if(null!=ie&&ie.spacingTop){e["border"===z.rowSpacingType?"borderTopWidth":"marginTop"]=ie.spacingTop}if(null!=ie&&ie.spacingBottom){const t="border"===z.rowSpacingType?"borderBottomWidth":"marginBottom";let n=e[t];"number"!==typeof n&&(n=parseInt(n||"0",10)),n+=ie.spacingBottom,e[t]=n}return e}),[M,p,u,se,ie,z.rowSpacingType]),ce=j.current.unstable_applyPipeProcessors("rowClassName",[],i);if("function"===typeof z.getRowClassName){var ue;const e=l-((null==(ue=H.range)?void 0:ue.firstRowIndex)||0),t=(0,r.A)({},j.current.getRowParams(i),{isFirstVisible:0===e,isLastVisible:e===H.rows.length-1,indexRelativeToCurrentPage:e});ce.push(z.getRowClassName(t))}const de=(0,we.nX)(1e4,20,80),pe=j.current.getRowNode(i);if(!pe)return null;const fe=pe.type,he=[];for(let r=0;r<y.length;r+=1){const e=y[r];let t=C+r;void 0!==k&&E&&(m[k].field===e.field?t=k:t-=1);const n=j.current.unstable_getCellColSpanInfo(i,t);if(n&&!n.spannedByColSpan)if("skeletonRow"!==fe){const{colSpan:r,width:o}=n.cellProps,a={width:o,colSpan:r,showRightBorder:z.showCellVerticalBorder,indexRelativeToAllColumns:t};he.push(ae(e,a))}else{const{width:t}=n.cellProps,r=Math.round(de());he.push((0,h.jsx)(ee.skeletonCell,{width:t,contentWidth:r,field:e.field,align:e.align},e.field))}}const me=x-B,ge=s?{onClick:J,onDoubleClick:Q("rowDoubleClick",I),onMouseEnter:Q("rowMouseEnter",D),onMouseLeave:Q("rowMouseLeave",N),onMouseOut:Q("rowMouseOut",O),onMouseOver:Q("rowMouseOver",T)}:null;return(0,h.jsxs)("div",(0,r.A)({ref:Y,"data-id":i,"data-rowindex":l,role:"row",className:(0,v.A)(...ce,Z.root,f,a&&"Mui-hovered"),"aria-rowindex":X,"aria-selected":n,style:le},ge,_,{children:[he,me>0&&(0,h.jsx)(wi,{width:me})]}))})));var Ci=n(17119);function Ai(e){var t;const{direction:n,index:o,sortingOrder:a}=e,i=(0,Qe.h)(),s=(0,R.A)(),l=(e=>{const{classes:t}=e;return(0,b.A)({icon:["sortIcon"]},S.B,t)})((0,r.A)({},e,{classes:s.classes})),c=function(e,t,n,o){let a;const i={};return"asc"===t?a=e.columnSortedAscendingIcon:"desc"===t?a=e.columnSortedDescendingIcon:(a=e.columnUnsortedIcon,i.sortingOrder=o),a?(0,h.jsx)(a,(0,r.A)({fontSize:"small",className:n},i)):null}(s.slots,n,l.icon,a);if(!c)return null;const u=(0,h.jsx)(s.slots.baseIconButton,(0,r.A)({tabIndex:-1,"aria-label":i.current.getLocaleText("columnHeaderSortIconLabel"),title:i.current.getLocaleText("columnHeaderSortIconLabel"),size:"small"},null==(t=s.slotProps)?void 0:t.baseIconButton,{children:c}));return(0,h.jsxs)(fo,{children:[null!=o&&(0,h.jsx)(co,{badgeContent:o,color:"default",children:u}),null==o&&u]})}const Si=o.memo(Ai),ki=o.memo((e=>{var t,n;const{colDef:a,open:i,columnMenuId:s,columnMenuButtonId:l,iconButtonRef:c}=e,u=(0,Qe.h)(),d=(0,R.A)(),p=(e=>{const{classes:t,open:n}=e,r={root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]};return(0,b.A)(r,S.B,t)})((0,r.A)({},e,{classes:d.classes})),f=o.useCallback((e=>{e.preventDefault(),e.stopPropagation(),u.current.toggleColumnMenu(a.field)}),[u,a.field]);return(0,h.jsx)("div",{className:p.root,children:(0,h.jsx)(d.slots.baseTooltip,(0,r.A)({title:u.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},null==(t=d.slotProps)?void 0:t.baseTooltip,{children:(0,h.jsx)(d.slots.baseIconButton,(0,r.A)({ref:c,tabIndex:-1,className:p.button,"aria-label":u.current.getLocaleText("columnMenuLabel"),size:"small",onClick:f,"aria-haspopup":"menu","aria-expanded":i,"aria-controls":i?s:void 0,id:l},null==(n=d.slotProps)?void 0:n.baseIconButton,{children:(0,h.jsx)(d.slots.columnMenuIcon,{fontSize:"small"})}))}))})}));function Mi(e){let{columnMenuId:t,columnMenuButtonId:n,ContentComponent:o,contentComponentProps:a,field:i,open:s,target:l,onExited:c}=e;const u=(0,Qe.h)(),d=u.current.getColumn(i),p=(0,Qt.A)((e=>{e&&(e.stopPropagation(),null!=l&&l.contains(e.target))||u.current.hideColumnMenu()}));return l&&d?(0,h.jsx)(cn,{placement:"bottom-"+("right"===d.align?"start":"end"),open:s,target:l,onClose:p,onExited:c,children:(0,h.jsx)(o,(0,r.A)({colDef:d,hideMenu:p,open:s,id:t,labelledby:n},a))}):null}const Ei=["className"],Ri=(0,G.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)"}),Pi=o.forwardRef((function(e,t){const{className:n}=e,o=(0,g.A)(e,Ei),a=(0,R.A)(),i=(e=>{const{classes:t}=e;return(0,b.A)({root:["columnHeaderTitle"]},S.B,t)})(a);return(0,h.jsx)(Ri,(0,r.A)({ref:t,className:(0,v.A)(i.root,n),ownerState:a},o))}));function Ii(e){var t;const{label:n,description:a}=e,i=(0,R.A)(),s=o.useRef(null),[l,c]=o.useState(""),u=o.useCallback((()=>{if(!a&&null!=s&&s.current){const e=(0,wn.Dy)(s.current);c(e?n:"")}}),[a,n]);return(0,h.jsx)(i.slots.baseTooltip,(0,r.A)({title:a||l},null==(t=i.slotProps)?void 0:t.baseTooltip,{children:(0,h.jsx)(Pi,{onMouseOver:u,ref:s,children:n})}))}const Di=["resizable","resizing","height","side"];var Ni=function(e){return e.Left="left",e.Right="right",e}(Ni||{});function $i(e){const{height:t,side:n=Ni.Right}=e,a=(0,g.A)(e,Di),i=(0,R.A)(),s=(e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,a={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${(0,y.A)(o)}`],icon:["iconSeparator"]};return(0,b.A)(a,S.B,r)})((0,r.A)({},e,{side:n,classes:i.classes})),l=o.useCallback((e=>{e.preventDefault(),e.stopPropagation()}),[]);return(0,h.jsx)("div",(0,r.A)({className:s.root,style:{minHeight:t,opacity:i.showColumnVerticalBorder?0:1}},a,{onClick:l,children:(0,h.jsx)(i.slots.columnResizeIcon,{className:s.icon})}))}const Oi=o.memo($i),Ti=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps"],_i=o.forwardRef((function(e,t){const{classes:n,columnMenuOpen:a,colIndex:i,height:s,isResizing:l,sortDirection:c,hasFocus:u,tabIndex:d,separatorSide:f,isDraggable:m,headerComponent:y,description:b,width:x,columnMenuIconButton:C=null,columnMenu:A=null,columnTitleIconButtons:S=null,headerClassName:k,label:M,resizable:E,draggableContainerProps:P,columnHeaderSeparatorProps:I}=e,D=(0,g.A)(e,Ti),N=p(),$=(0,R.A)(),O=o.useRef(null),[T,_]=o.useState(a),j=(0,w.A)(O,t);let F="none";return null!=c&&(F="asc"===c?"ascending":"descending"),o.useEffect((()=>{T||_(a)}),[T,a]),o.useLayoutEffect((()=>{const e=N.current.state.columnMenu;if(u&&!e.open){const e=O.current.querySelector('[tabindex="0"]')||O.current;null==e||e.focus(),N.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[N,u]),(0,h.jsxs)("div",(0,r.A)({ref:j,className:(0,v.A)(n.root,k),style:{height:s,width:x,minWidth:x,maxWidth:x},role:"columnheader",tabIndex:d,"aria-colindex":i+1,"aria-sort":F,"aria-label":null==y?M:void 0},D,{children:[(0,h.jsxs)("div",(0,r.A)({className:n.draggableContainer,draggable:m,role:"presentation"},P,{children:[(0,h.jsxs)("div",{className:n.titleContainer,role:"presentation",children:[(0,h.jsx)("div",{className:n.titleContainerContent,children:void 0!==y?y:(0,h.jsx)(Ii,{label:M,description:b,columnWidth:x})}),S]}),C]})),(0,h.jsx)(Oi,(0,r.A)({resizable:!$.disableColumnResize&&!!E,resizing:l,height:s,side:f},I)),A]}))}));function ji(e){var t,n,a,i;const{colDef:s,columnMenuOpen:l,colIndex:c,headerHeight:u,isResizing:d,sortDirection:f,sortIndex:m,filterItemsCounter:g,hasFocus:v,tabIndex:y,disableReorder:w,separatorSide:x}=e,C=p(),A=(0,R.A)(),k=o.useRef(null),M=(0,$t.A)(),E=(0,$t.A)(),P=o.useRef(null),[I,D]=o.useState(l),N=o.useMemo((()=>!A.disableColumnReorder&&!w&&!s.disableReorder),[A.disableColumnReorder,w,s.disableReorder]);let $;s.renderHeader&&($=s.renderHeader(C.current.getColumnHeaderParams(s.field)));const O=(e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:a,filterItemsCounter:i}=e,s=null!=o,l=null!=i&&i>0,c="number"===t.type,u={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",c&&"columnHeader--numeric","withBorderColor",a&&"columnHeader--withRightBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,b.A)(u,S.B,n)})((0,r.A)({},e,{classes:A.classes,showRightBorder:A.showColumnVerticalBorder})),T=o.useCallback((e=>t=>{(0,wn.TA)(t)||C.current.publishEvent(e,C.current.getColumnHeaderParams(s.field),t)}),[C,s.field]),_=o.useMemo((()=>({onClick:T("columnHeaderClick"),onDoubleClick:T("columnHeaderDoubleClick"),onMouseOver:T("columnHeaderOver"),onMouseOut:T("columnHeaderOut"),onMouseEnter:T("columnHeaderEnter"),onMouseLeave:T("columnHeaderLeave"),onKeyDown:T("columnHeaderKeyDown"),onFocus:T("columnHeaderFocus"),onBlur:T("columnHeaderBlur")})),[T]),j=o.useMemo((()=>N?{onDragStart:T("columnHeaderDragStart"),onDragEnter:T("columnHeaderDragEnter"),onDragOver:T("columnHeaderDragOver"),onDragEnd:T("columnHeaderDragEnd")}:{}),[N,T]),F=o.useMemo((()=>({onMouseDown:T("columnSeparatorMouseDown"),onDoubleClick:T("columnSeparatorDoubleClick")})),[T]);o.useEffect((()=>{I||D(l)}),[I,l]);const L=o.useCallback((()=>{D(!1)}),[]),V=!A.disableColumnMenu&&!s.disableColumnMenu&&(0,h.jsx)(ki,{colDef:s,columnMenuId:M,columnMenuButtonId:E,open:I,iconButtonRef:P}),z=(0,h.jsx)(Mi,{columnMenuId:M,columnMenuButtonId:E,field:s.field,open:l,target:P.current,ContentComponent:A.slots.columnMenu,contentComponentProps:null==(t=A.slotProps)?void 0:t.columnMenu,onExited:L}),H=null!=(n=s.sortingOrder)?n:A.sortingOrder,B=(0,h.jsxs)(o.Fragment,{children:[!A.disableColumnFilter&&(0,h.jsx)(A.slots.columnHeaderFilterIconButton,(0,r.A)({field:s.field,counter:g},null==(a=A.slotProps)?void 0:a.columnHeaderFilterIconButton)),s.sortable&&!s.hideSortIcons&&(0,h.jsx)(Si,{direction:f,index:m,sortingOrder:H})]});o.useLayoutEffect((()=>{const e=C.current.state.columnMenu;if(v&&!e.open){const e=k.current.querySelector('[tabindex="0"]')||k.current;null==e||e.focus(),C.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[C,v]);const G="function"===typeof s.headerClassName?s.headerClassName({field:s.field,colDef:s}):s.headerClassName,W=null!=(i=s.headerName)?i:s.field;return(0,h.jsx)(_i,(0,r.A)({ref:k,classes:O,columnMenuOpen:l,colIndex:c,height:u,isResizing:d,sortDirection:f,hasFocus:v,tabIndex:y,separatorSide:x,isDraggable:N,headerComponent:$,description:s.description,elementId:s.field,width:s.computedWidth,columnMenuIconButton:V,columnTitleIconButtons:B,headerClassName:G,label:W,resizable:!A.disableColumnResize&&!!s.resizable,"data-field":s.field,columnMenu:z,draggableContainerProps:j,columnHeaderSeparatorProps:F},_))}const Fi=e=>e.rowsMeta,Li=e=>e.virtualization,Vi=(0,P.Mz)(Li,(e=>e.enabled)),zi=(0,P.Mz)(Li,(e=>e.enabledForColumns)),Hi=["style"],Bi=["style"];function Gi(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]: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]?Gi(e,t,n,o):Gi(e,t,o+1,r)}const Wi=e=>{let{firstIndex:t,lastIndex:n,buffer:r,minFirstIndex:o,maxLastIndex:a}=e;return[(0,we.qE)(t-r,o,a),(0,we.qE)(n+r,o,a)]},Ui=(e,t)=>e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,Ki={maxSize:3},qi=e=>{var t,n;const a=p(),i=(0,R.A)(),s=(0,c.N)(a,$.iv),l=(0,c.N)(a,Vi),u=(0,c.N)(a,zi),{ref:d,onRenderZonePositioning:f,renderZoneMinColumnIndex:m=0,renderZoneMaxColumnIndex:v=s.length,getRowProps:y}=e,b=(0,Zt.A)(),C=(0,c.N)(a,$.Sw),A=(0,c.N)(a,$.fc),S=(0,c.N)(a,le),k=(0,c.N)(a,fe),M=(0,c.N)(a,Fi),E=(0,c.N)(a,ot),P=yn(a,i),I=o.useRef(null),D=o.useRef(null),N=(0,w.A)(d,D),[O,T]=o.useState(null),_=o.useRef(O),j=o.useRef({top:0,left:0}),[F,L]=o.useState({width:null,height:null}),V=o.useRef(A),[z,H]=o.useState(null),B=o.useRef(Object.create(null)),G=o.useRef(),W=o.useRef(),U=o.useRef((0,jr.UI)(((e,t,n,r,o,a)=>{let i;return a>-1&&(t>a&&a>=r||n<a&&a<o)&&(i=a),{focusedCellColumnIndexNotInRange:i,renderedColumns:e.slice(t,n)}}),Ki)),K=o.useMemo((()=>null!==S?s.findIndex((e=>e.field===S.field)):-1),[S,s]),q=o.useCallback((e=>{var t,n;const r=a.current.getLastMeasuredRowIndex();let o=r===1/0;null!=(t=P.range)&&t.lastRowIndex&&!o&&(o=r>=P.range.lastRowIndex);const i=(0,we.qE)(r-((null==(n=P.range)?void 0:n.firstRowIndex)||0),0,M.positions.length);return o||M.positions[i]>=e?Gi(e,M.positions):function(e,t,n){let r=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=r,r*=2;return Gi(e,t,Math.floor(n/2),Math.min(n,t.length))}(e,M.positions,i)}),[a,null==(t=P.range)?void 0:t.firstRowIndex,null==(n=P.range)?void 0:n.lastRowIndex,M.positions]),Y=o.useCallback((()=>{if(!l)return{firstRowIndex:0,lastRowIndex:P.rows.length,firstColumnIndex:0,lastColumnIndex:s.length};const{top:e,left:t}=j.current,n=Math.min(q(e),M.positions.length-1),r=i.autoHeight?n+P.rows.length:q(e+F.height);let o=0,c=C.length;if(u){let e=!1;const[s,l]=Wi({firstIndex:n,lastIndex:r,minFirstIndex:0,maxLastIndex:P.rows.length,buffer:i.rowBuffer});for(let t=s;t<l&&!e;t+=1){const n=P.rows[t];e=a.current.rowHasAutoHeight(n.id)}e||(o=Gi(Math.abs(t),C),c=Gi(Math.abs(t)+F.width,C))}return{firstRowIndex:n,lastRowIndex:r,firstColumnIndex:o,lastColumnIndex:c}}),[l,u,q,M.positions.length,i.autoHeight,i.rowBuffer,P.rows,C,s.length,a,F]);(0,x.A)((()=>{l?(D.current.scrollLeft=0,D.current.scrollTop=0):I.current.style.transform="translate3d(0px, 0px, 0px)"}),[l]),(0,x.A)((()=>{L({width:D.current.clientWidth,height:D.current.clientHeight})}),[M.currentPageTotalHeight]);const X=o.useCallback((()=>{D.current&&L({width:D.current.clientWidth,height:D.current.clientHeight})}),[]);$e(a,"debouncedResize",X);const Z=o.useCallback((e=>{const[t,n]=Wi({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:P.rows.length,buffer:i.rowBuffer}),[r]=Wi({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:m,maxLastIndex:v,buffer:i.columnBuffer}),o=hr({firstColumnToRender:r,apiRef:a,firstRowToRender:t,lastRowToRender:n,visibleRows:P.rows}),s="ltr"===b.direction?1:-1,l=Fi(a.current.state).positions[t],c=s*(0,$.Sw)(a)[o];I.current.style.transform=`translate3d(${c}px, ${l}px, 0px)`,"function"===typeof f&&f({top:l,left:c})}),[a,P.rows,f,m,v,i.columnBuffer,i.rowBuffer,b.direction]),Q=o.useCallback((()=>_.current),[]),J=o.useCallback((e=>{if(_.current&&Ui(e,_.current))return void Z(e);T(e),Z(e);const[t,n]=Wi({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:P.rows.length,buffer:i.rowBuffer});a.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:t,lastRowToRender:n}),_.current=e}),[a,T,_,P.rows.length,i.rowBuffer,Z]);(0,x.A)((()=>{if(null==F.width)return;const e=Y();J(e);const{top:t,left:n}=j.current,r={top:t,left:n,renderContext:e};a.current.publishEvent("scrollPositionChange",r)}),[a,Y,F.width,J]);const ee=(0,Qt.A)((e=>{const{scrollTop:t,scrollLeft:n}=e.currentTarget;if(j.current.top=t,j.current.left=n,!_.current||t<0)return;if("ltr"===b.direction&&n<0)return;if("rtl"===b.direction&&n>0)return;const r=l?Y():_.current,o=Math.abs(r.firstRowIndex-_.current.firstRowIndex),s=Math.abs(r.lastRowIndex-_.current.lastRowIndex),c=Math.abs(r.firstColumnIndex-_.current.firstColumnIndex),u=Math.abs(r.lastColumnIndex-_.current.lastColumnIndex),d=o>=i.rowThreshold||s>=i.rowThreshold||c>=i.columnThreshold||u>=i.columnThreshold||V.current!==A;a.current.publishEvent("scrollPositionChange",{top:t,left:n,renderContext:d?r:_.current},e),d&&(Ci.flushSync((()=>{J(r)})),V.current=A)})),te=(0,Qt.A)((e=>{a.current.publishEvent("virtualScrollerWheel",{},e)})),ne=(0,Qt.A)((e=>{a.current.publishEvent("virtualScrollerTouchMove",{},e)})),re=o.useMemo((()=>null!==S?P.rows.findIndex((e=>e.id===S.id)):-1),[S,P.rows]);$e(a,"rowMouseOver",((e,t)=>{var n;t.currentTarget.contains(t.relatedTarget)||H(null!=(n=e.id)?n:null)})),$e(a,"rowMouseOut",((e,t)=>{t.currentTarget.contains(t.relatedTarget)||H(null)}));const oe=F.width&&A>=F.width,ae=o.useMemo((()=>{const e=Math.max(M.currentPageTotalHeight,1);let t=!1;null!=D&&D.current&&e<=(null==D?void 0:D.current.clientHeight)&&(t=!0);const n={width:oe?A:"auto",height:e,minHeight:t?"100%":"auto"};return i.autoHeight&&0===P.rows.length&&(n.height=Pt(a,i.rowHeight)),n}),[a,D,A,M.currentPageTotalHeight,oe,i.autoHeight,i.rowHeight,P.rows.length]);o.useEffect((()=>{a.current.publishEvent("virtualScrollerContentSizeChange")}),[a,ae]);const ie=o.useMemo((()=>{const e={};return oe||(e.overflowX="hidden"),i.autoHeight&&(e.overflowY="hidden"),e}),[oe,i.autoHeight]);return a.current.register("private",{getRenderContext:Q}),{renderContext:O,updateRenderZonePosition:Z,getRows:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{renderContext:O};var t;const{onRowRender:n,renderContext:o,minFirstColumn:c=m,maxLastColumn:u=v,availableSpace:d=F.width,rowIndexOffset:p=0,position:f="center"}=e;if(!o||null==d)return null;const b=l?i.rowBuffer:0,w=l?i.columnBuffer:0,[x,C]=Wi({firstIndex:o.firstRowIndex,lastIndex:o.lastRowIndex,minFirstIndex:0,maxLastIndex:P.rows.length,buffer:b}),A=[];if(e.rows)e.rows.forEach((e=>{A.push(e),a.current.calculateColSpan({rowId:e.id,minFirstColumn:c,maxLastColumn:u,columns:s})}));else{if(!P.range)return null;for(let e=x;e<C;e+=1){const t=P.rows[e];A.push(t),a.current.calculateColSpan({rowId:t.id,minFirstColumn:c,maxLastColumn:u,columns:s})}}let M=!1;if(re>-1){const e=P.rows[re];(x>re||C<re)&&(M=!0,re>x?A.push(e):A.unshift(e),a.current.calculateColSpan({rowId:e.id,minFirstColumn:c,maxLastColumn:u,columns:s}))}const[R,I]=Wi({firstIndex:o.firstColumnIndex,lastIndex:o.lastColumnIndex,minFirstIndex:c,maxLastIndex:u,buffer:w}),D=hr({firstColumnToRender:R,apiRef:a,firstRowToRender:x,lastRowToRender:C,visibleRows:P.rows});let N=!1;(D>K||I<K)&&(N=!0);const{focusedCellColumnIndexNotInRange:$,renderedColumns:T}=U.current(s,D,I,c,u,N?K:-1),_=(null==(t=i.slotProps)?void 0:t.row)||{},{style:j}=_,L=(0,g.A)(_,Hi);(G.current!==y||W.current!==j)&&(B.current=Object.create(null));const V=[];let H=!1;for(let l=0;l<A.length;l+=1){var q;const{id:e,model:t}=A[l],o=M&&S.id===e,c=M?x+l===P.rows.length:x+l===P.rows.length-1,u=a.current.rowHasAutoHeight(e)?"auto":a.current.unstable_getRowHeight(e);let m;m=null!=E[e]&&a.current.isRowSelectable(e),n&&n(e);const v=null!==S&&S.id===e?S.field:null,b=void 0!==$&&s[$],w=b&&v?[b,...T]:T;let C=null;if(null!==k&&k.id===e){C="view"===a.current.getCellParams(e,k.field).cellMode?k.field:null}const R="function"===typeof y&&y(e,t)||{},{style:N}=R,O=(0,g.A)(R,Bi);if(!B.current[e]){const t=(0,r.A)({},N,j);B.current[e]=t}let _=p+((null==P||null==(q=P.range)?void 0:q.firstRowIndex)||0)+x+l;M&&(null==S?void 0:S.id)===e?(_=re,H=!0):H&&(_-=1),V.push((0,h.jsx)(i.slots.row,(0,r.A)({row:t,rowId:e,focusedCellColumnIndexNotInRange:$,isNotVisible:o,rowHeight:u,focusedCell:v,tabbableCell:C,renderedColumns:w,visibleColumns:s,firstColumnToRender:D,lastColumnToRender:I,selected:m,index:_,containerWidth:d,isLastVisible:c,position:f},O,L,{hovered:z===e,style:B.current[e]}),e))}return G.current=y,W.current=j,V},getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.A)({ref:N,onScroll:ee,onWheel:te,onTouchMove:ne},e,{style:e.style?(0,r.A)({},e.style,ie):ie,role:"presentation"})},getContentProps:function(){let{style:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{style:e?(0,r.A)({},e,ae):ae,role:"presentation"}},getRenderZoneProps:()=>({ref:I,role:"rowgroup"})}};function Yi(e){var t;const{groupId:n,width:a,depth:i,maxDepth:s,fields:l,height:u,colIndex:d,hasFocus:p,tabIndex:f,isLastColumn:m}=e,g=(0,R.A)(),v=o.useRef(null),y=(0,Qe.h)(),w=(0,c.N)(y,_),x=n?w[n]:{},{headerName:C=(null!=n?n:""),description:A="",headerAlign:k}=x;let M;const E=n&&(null==(t=w[n])?void 0:t.renderHeaderGroup),P=o.useMemo((()=>({groupId:n,headerName:C,description:A,depth:i,maxDepth:s,fields:l,colIndex:d,isLastColumn:m})),[n,C,A,i,s,l,d,m]);n&&E&&(M=E(P));const I=g.showColumnVerticalBorder,D=(0,r.A)({},e,{classes:g.classes,showColumnBorder:I,headerAlign:k,depth:i,isDragging:!1}),N=null!=C?C:n,$=(0,$t.A)(),O=null===n?`empty-group-cell-${$}`:n,T=(e=>{const{classes:t,headerAlign:n,isDragging:r,showColumnBorder:o,groupId:a}=e,i={root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",r&&"columnHeader--moving",o&&"columnHeader--showColumnBorder",o&&"columnHeader--withRightBorder","withBorderColor",null===a?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]};return(0,b.A)(i,S.B,t)})(D);o.useLayoutEffect((()=>{if(p){const e=v.current.querySelector('[tabindex="0"]')||v.current;null==e||e.focus()}}),[y,p]);const j=o.useCallback((e=>t=>{(0,wn.TA)(t)||y.current.publishEvent(e,P,t)}),[y,P]),F=o.useMemo((()=>({onKeyDown:j("columnGroupHeaderKeyDown"),onFocus:j("columnGroupHeaderFocus"),onBlur:j("columnGroupHeaderBlur")})),[j]),L="function"===typeof x.headerClassName?x.headerClassName(P):x.headerClassName;return(0,h.jsx)(_i,(0,r.A)({ref:v,classes:T,columnMenuOpen:!1,colIndex:d,height:u,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:f,isDraggable:!1,headerComponent:M,headerClassName:L,description:A,elementId:O,width:a,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:N,"aria-colspan":l.length,"data-fields":`|-${l.join("-|-")}-|`},F))}const Xi=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})((()=>({display:"flex"})));const Zi=e=>{const{innerRef:t,minColumnIndex:n=0,visibleColumns:a,sortColumnLookup:i,filterColumnLookup:s,columnPositions:l,columnHeaderTabIndexState:u,columnGroupHeaderTabIndexState:d,columnHeaderFocus:f,columnGroupHeaderFocus:m,densityFactor:g,headerGroupingMaxDepth:v,columnMenuState:y,columnVisibility:b,columnGroupsHeaderStructure:x,hasOtherElementInTabSequence:C}=e,A=(0,Zt.A)(),[S,k]=o.useState(""),[M,E]=o.useState(""),P=p(),I=(0,c.N)(P,zi),D=(0,R.A)(),N=o.useRef(null),$=(0,w.A)(t,N),[O,T]=o.useState(null),_=o.useRef(O),j=o.useRef(0),F=yn(P,D),L=gr(P,D.columnHeaderHeight),V=Math.floor(D.columnHeaderHeight*g),z=o.useCallback((e=>{O&&e&&Ui(O,e)||T(e)}),[O]);o.useEffect((()=>{P.current.columnHeadersContainerElementRef.current.scrollLeft=0}),[P]);const H=o.useRef((0,jr.UI)(mr,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every((n=>e[n]===t[n]))})),B=o.useCallback((e=>{const[t,r]=Wi({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:F.rows.length,buffer:D.rowBuffer}),o=H.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:n,columnBuffer:D.columnBuffer,firstRowToRender:t,lastRowToRender:r,apiRef:P,visibleRows:F.rows}),a="ltr"===A.direction?1:-1,i=o>0?j.current-a*l[o]:j.current;N.current.style.transform=`translate3d(${-i}px, 0px, 0px)`}),[l,n,D.columnBuffer,P,F.rows,D.rowBuffer,A.direction]);o.useLayoutEffect((()=>{O&&B(O)}),[O,B]);const G=o.useCallback(((e,t)=>{let{left:n,renderContext:r=null}=e;var o,a;if(!N.current)return;if(j.current===n&&(null==(o=_.current)?void 0:o.firstColumnIndex)===(null==r?void 0:r.firstColumnIndex)&&(null==(a=_.current)?void 0:a.lastColumnIndex)===(null==r?void 0:r.lastColumnIndex))return;j.current=n;let i=!1;r===_.current&&_.current?i=!0:(!function(e){return!!e.target}(t)?z(r):(Ci.flushSync((()=>{z(r)})),i=!0),_.current=r),r&&i&&B(r)}),[B,z]),W=o.useCallback((e=>E(e.field)),[]),U=o.useCallback((()=>E("")),[]),K=o.useCallback((e=>k(e.field)),[]),q=o.useCallback((()=>k("")),[]);$e(P,"columnResizeStart",W),$e(P,"columnResizeStop",U),$e(P,"columnHeaderDragStart",K),$e(P,"columnHeaderDragEnd",q),$e(P,"scrollPositionChange",G);const Y=e=>{const{renderContext:t=O,minFirstColumn:r=n,maxLastColumn:o=a.length}=e||{};if(!t)return null;const[i,s]=Wi({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:F.rows.length,buffer:D.rowBuffer}),l=I?H.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:r,columnBuffer:D.columnBuffer,apiRef:P,firstRowToRender:i,lastRowToRender:s,visibleRows:F.rows}):0,c=I?Math.min(t.lastColumnIndex+D.columnBuffer,o):o;return{renderedColumns:a.slice(l,c),firstColumnToRender:l,lastColumnToRender:c,minFirstColumn:r,maxLastColumn:o}},X={minHeight:L,maxHeight:L,lineHeight:`${V}px`};return{renderContext:O,getColumnHeaders:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Y(e);if(null==n)return null;const{renderedColumns:o,firstColumnToRender:a}=n,l=[];for(let c=0;c<o.length;c+=1){const e=o[c],n=a+c,d=0===n,p=null!==u&&u.field===e.field||d&&!C?0:-1,m=null!==f&&f.field===e.field,g=y.open&&y.field===e.field;l.push((0,h.jsx)(ji,(0,r.A)({},i[e.field],{columnMenuOpen:g,filterItemsCounter:s[e.field]&&s[e.field].length,headerHeight:V,isDragging:e.field===S,colDef:e,colIndex:n,isResizing:M===e.field,hasFocus:m,tabIndex:p},t),e.field))}return(0,h.jsx)(Xi,{role:"row","aria-rowindex":v+1,ownerState:D,children:l})},getColumnsToRender:Y,getColumnGroupHeaders:e=>{if(0===v)return null;const t=Y(e);if(null==t||0===t.renderedColumns.length)return null;const{firstColumnToRender:n,lastColumnToRender:o}=t,i=[],s=[];for(let u=0;u<v;u+=1){var l,c;const e=x[u],t=a[n].field,i=null!=(l=P.current.unstable_getColumnGroupPath(t)[u])?l:null,p=e.findIndex((e=>{let{groupId:n,columnFields:r}=e;return n===i&&r.includes(t)})),f=a[o-1].field,h=null!=(c=P.current.unstable_getColumnGroupPath(f)[u])?c:null,g=e.findIndex((e=>{let{groupId:t,columnFields:n}=e;return t===h&&n.includes(f)})),v=e.slice(p,g+1).map((e=>(0,r.A)({},e,{columnFields:e.columnFields.filter((e=>!1!==b[e]))}))).filter((e=>e.columnFields.length>0)),y=v[0].columnFields.indexOf(t),w=v[0].columnFields.slice(0,y).reduce(((e,t)=>{var n;return e+(null!=(n=P.current.getColumn(t).computedWidth)?n:0)}),0);let C=n;const A=v.map((e=>{let{groupId:t,columnFields:n}=e;const r=null!==m&&m.depth===u&&n.includes(m.field),o=null!==d&&d.depth===u&&n.includes(d.field)?0:-1,a={groupId:t,width:n.reduce(((e,t)=>e+P.current.getColumn(t).computedWidth),0),fields:n,colIndex:C,hasFocus:r,tabIndex:o};return C+=n.length,a}));s.push({leftOverflow:w,elements:A})}return s.forEach(((e,t)=>{i.push((0,h.jsx)(Xi,{style:{height:`${V}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:D,children:e.elements.map(((e,n)=>{let{groupId:r,width:o,fields:i,colIndex:l,hasFocus:c,tabIndex:u}=e;return(0,h.jsx)(Yi,{groupId:r,width:o,fields:i,colIndex:l,depth:t,isLastColumn:l===a.length-i.length,maxDepth:s.length,height:V,hasFocus:c,tabIndex:u},n)}))},t))})),i},isDragging:!!S,getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.A)({style:X},e)},getInnerProps:()=>({ref:$,role:"rowgroup"}),headerHeight:V}},Qi=["className"],Ji=(0,G.A)("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),es=o.forwardRef((function(e,t){const{className:n}=e,o=(0,g.A)(e,Qi),a=(0,R.A)(),i=(e=>{const{classes:t}=e;return(0,b.A)({root:["columnHeaders","withBorderColor"]},S.B,t)})(a);return(0,h.jsx)(Ji,(0,r.A)({ref:t,className:(0,v.A)(n,i.root),ownerState:a},o,{role:"presentation"}))})),ts=["isDragging","className"],ns=(0,G.A)("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${S.x.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})((()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${S.x.columnHeaderDropZone} .${S.x.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${S.x["columnHeadersInner--scrollable"]} .${S.x.columnHeader}:last-child`]:{borderRight:"none"}}))),rs=o.forwardRef((function(e,t){var n,o;const{isDragging:a,className:i}=e,s=(0,g.A)(e,ts),l=(0,Qe.h)(),c=(0,R.A)(),u=(0,r.A)({},c,{isDragging:a,hasScrollX:null!=(n=null==(o=l.current.getRootDimensions())?void 0:o.hasScrollX)&&n}),d=(e=>{const{isDragging:t,hasScrollX:n,classes:r}=e,o={root:["columnHeadersInner",t&&"columnHeaderDropZone",n&&"columnHeadersInner--scrollable"]};return(0,b.A)(o,S.B,r)})(u);return(0,h.jsx)(ns,(0,r.A)({ref:t,className:(0,v.A)(i,d.root),ownerState:u},s))})),os=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],as=ci(o.forwardRef((function(e,t){const{innerRef:n,visibleColumns:o,sortColumnLookup:a,filterColumnLookup:i,columnPositions:s,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:c,columnHeaderFocus:u,columnGroupHeaderFocus:d,densityFactor:p,headerGroupingMaxDepth:f,columnMenuState:m,columnVisibility:v,columnGroupsHeaderStructure:y,hasOtherElementInTabSequence:b}=e,w=(0,g.A)(e,os),{isDragging:x,getRootProps:C,getInnerProps:A,getColumnHeaders:S,getColumnGroupHeaders:k}=Zi({innerRef:n,visibleColumns:o,sortColumnLookup:a,filterColumnLookup:i,columnPositions:s,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:c,columnHeaderFocus:u,columnGroupHeaderFocus:d,densityFactor:p,headerGroupingMaxDepth:f,columnMenuState:m,columnVisibility:v,columnGroupsHeaderStructure:y,hasOtherElementInTabSequence:b});return(0,h.jsx)(es,(0,r.A)({ref:t},C(w),{children:(0,h.jsxs)(rs,(0,r.A)({isDragging:x},A(),{children:[k(),S()]}))}))})));var is=n(74745);const ss=["displayOrder"],ls=["hideMenu","colDef","id","labelledby","className","children","open"],cs=(0,A.Ay)(Xt.A)((()=>({minWidth:248}))),us=o.forwardRef((function(e,t){const{hideMenu:n,id:a,labelledby:i,className:s,children:l,open:c}=e,u=(0,g.A)(e,ls),d=o.useCallback((e=>{var t;qe(e.key)&&e.preventDefault(),t=e.key,(qe(t)||Ue(t))&&n(e)}),[n]);return(0,h.jsx)(cs,(0,r.A)({id:a,ref:t,className:(0,v.A)(S.x.menuList,s),"aria-labelledby":i,onKeyDown:d,autoFocus:c},u,{children:l}))}));var ds=n(92455),ps=n(13372);const fs=["className"],hs=(0,A.Ay)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===n.alignItems&&{marginTop:8})})),ms=o.forwardRef((function(e,t){const n=(0,eo.A)({props:e,name:"MuiListItemIcon"}),{className:a}=n,i=(0,g.A)(n,fs),s=o.useContext(ps.A),l=(0,r.A)({},n,{alignItems:s.alignItems}),c=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,b.A)(r,ds.f,n)})(l);return(0,h.jsx)(hs,(0,r.A)({className:(0,v.A)(c.root,a),ownerState:l,ref:t},i))}));var gs=n(88543);const vs=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],ys=(0,A.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gs.A.primary}`]:t.primary},{[`& .${gs.A.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((e=>{let{ownerState:t}=e;return(0,r.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})})),bs=o.forwardRef((function(e,t){const n=(0,eo.A)({props:e,name:"MuiListItemText"}),{children:a,className:i,disableTypography:s=!1,inset:l=!1,primary:c,primaryTypographyProps:u,secondary:d,secondaryTypographyProps:p}=n,f=(0,g.A)(n,vs),{dense:m}=o.useContext(ps.A);let y=null!=c?c:a,w=d;const x=(0,r.A)({},n,{disableTypography:s,inset:l,primary:!!y,secondary:!!w,dense:m}),C=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e,i={root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,b.A)(i,gs.b,t)})(x);return null==y||y.type===za.A||s||(y=(0,h.jsx)(za.A,(0,r.A)({variant:m?"body2":"body1",className:C.primary,component:null!=u&&u.variant?void 0:"span",display:"block"},u,{children:y}))),null==w||w.type===za.A||s||(w=(0,h.jsx)(za.A,(0,r.A)({variant:"body2",className:C.secondary,color:"text.secondary",display:"block"},p,{children:w}))),(0,h.jsxs)(ys,(0,r.A)({className:(0,v.A)(C.root,i),ownerState:x,ref:t},f,{children:[y,w]}))}));function ws(e){const{colDef:t,onClick:n}=e,r=(0,Qe.h)(),a=(0,R.A)(),i=1===(0,$.iv)(r).filter((e=>!0!==e.disableColumnMenu)).length,s=o.useCallback((e=>{i||(r.current.setColumnVisibility(t.field,!1),n(e))}),[r,t.field,n,i]);return a.disableColumnSelector||!1===t.hideable?null:(0,h.jsxs)(No.A,{onClick:s,disabled:i,children:[(0,h.jsx)(ms,{children:(0,h.jsx)(a.slots.columnMenuHideIcon,{fontSize:"small"})}),(0,h.jsx)(bs,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function xs(e){const{onClick:t}=e,n=(0,Qe.h)(),r=(0,R.A)(),a=o.useCallback((e=>{t(e),n.current.showPreferences(vr.columns)}),[n,t]);return r.disableColumnSelector?null:(0,h.jsxs)(No.A,{onClick:a,children:[(0,h.jsx)(ms,{children:(0,h.jsx)(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),(0,h.jsx)(bs,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}const Cs=["defaultSlots","defaultSlotProps","slots","slotProps"],As={columnMenuSortItem:function(e){var t;const{colDef:n,onClick:r}=e,a=(0,Qe.h)(),i=(0,c.N)(a,K.XU),s=(0,R.A)(),l=o.useMemo((()=>{if(!n)return null;const e=i.find((e=>e.field===n.field));return null==e?void 0:e.sort}),[n,i]),u=null!=(t=n.sortingOrder)?t:s.sortingOrder,d=o.useCallback((e=>{r(e);const t=e.currentTarget.getAttribute("data-value")||null;a.current.sortColumn(n,t===l?null:t)}),[a,n,r,l]);if(!n||!n.sortable||!u.some((e=>!!e)))return null;const p=e=>{const t=a.current.getLocaleText(e);return"function"===typeof t?t(n):t};return(0,h.jsxs)(o.Fragment,{children:[u.includes("asc")&&"asc"!==l?(0,h.jsxs)(No.A,{onClick:d,"data-value":"asc",children:[(0,h.jsx)(ms,{children:(0,h.jsx)(s.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),(0,h.jsx)(bs,{children:p("columnMenuSortAsc")})]}):null,u.includes("desc")&&"desc"!==l?(0,h.jsxs)(No.A,{onClick:d,"data-value":"desc",children:[(0,h.jsx)(ms,{children:(0,h.jsx)(s.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),(0,h.jsx)(bs,{children:p("columnMenuSortDesc")})]}):null,u.includes(null)&&null!=l?(0,h.jsxs)(No.A,{onClick:d,children:[(0,h.jsx)(ms,{}),(0,h.jsx)(bs,{children:a.current.getLocaleText("columnMenuUnsort")})]}):null]})},columnMenuFilterItem:function(e){const{colDef:t,onClick:n}=e,r=(0,Qe.h)(),a=(0,R.A)(),i=o.useCallback((e=>{n(e),r.current.showFilterPanel(t.field)}),[r,t.field,n]);return a.disableColumnFilter||!t.filterable?null:(0,h.jsxs)(No.A,{onClick:i,children:[(0,h.jsx)(ms,{children:(0,h.jsx)(a.slots.columnMenuFilterIcon,{fontSize:"small"})}),(0,h.jsx)(bs,{children:r.current.getLocaleText("columnMenuFilter")})]})},columnMenuColumnsItem:function(e){return(0,h.jsxs)(o.Fragment,{children:[(0,h.jsx)(ws,(0,r.A)({},e)),(0,h.jsx)(xs,(0,r.A)({},e))]})}},Ss={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},ks=o.forwardRef((function(e,t){const{defaultSlots:n,defaultSlotProps:a,slots:i,slotProps:s}=e,l=(0,g.A)(e,Cs),c=(e=>{const t=p(),{defaultSlots:n,defaultSlotProps:a,slots:i={},slotProps:s={},hideMenu:l,colDef:c,addDividers:u=!0}=e,d=o.useMemo((()=>(0,r.A)({},n,i)),[n,i]),f=o.useMemo((()=>{if(!s||0===Object.keys(s).length)return a;const e=(0,r.A)({},s);return Object.entries(a).forEach((t=>{let[n,o]=t;e[n]=(0,r.A)({},o,s[n]||{})})),e}),[a,s]),h=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),m=o.useMemo((()=>{const e=Object.keys(n);return Object.keys(i).filter((t=>!e.includes(t)))}),[i,n]);return o.useMemo((()=>{const e=Array.from(new Set([...h,...m])).filter((e=>null!=d[e])).sort(((e,t)=>{const n=f[e],r=f[t];return(Number.isFinite(null==n?void 0:n.displayOrder)?n.displayOrder:100)-(Number.isFinite(null==r?void 0:r.displayOrder)?r.displayOrder:100)}));return e.reduce(((t,n,o)=>{let a={colDef:c,onClick:l};const i=f[n];if(i){const e=(0,g.A)(i,ss);a=(0,r.A)({},a,e)}return u&&o!==e.length-1?[...t,[d[n],a],[is.A,{}]]:[...t,[d[n],a]]}),[])}),[u,c,h,l,d,f,m])})((0,r.A)({},l,{defaultSlots:n,defaultSlotProps:a,slots:i,slotProps:s}));return(0,h.jsx)(us,(0,r.A)({ref:t},l,{children:c.map(((e,t)=>{let[n,o]=e;return(0,h.jsx)(n,(0,r.A)({},o),t)}))}))})),Ms=o.forwardRef((function(e,t){return(0,h.jsx)(ks,(0,r.A)({},e,{ref:t,defaultSlots:As,defaultSlotProps:Ss}))})),Es=o.forwardRef((function(e,t){const n=(0,Qe.h)().current.getLocaleText("noResultsOverlayLabel");return(0,h.jsx)(Ro,(0,r.A)({ref:t},e,{children:n}))}));var Rs=n(46282),Ps=n(65471);const Is=(0,Ps.A)((0,h.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),Ds=(0,Ps.A)((0,h.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Ns=(0,Ps.A)((0,h.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function $s(e){return(0,ro.Ay)("MuiCheckbox",e)}const Os=(0,no.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Ts=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],_s=(0,A.Ay)(Rs.A,{shouldForwardProp:e=>(0,A.ep)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,to.A)(n.size)}`],"default"!==n.color&&t[`color${(0,to.A)(n.color)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${"default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,C.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{[`&.${Os.checked}, &.${Os.indeterminate}`]:{color:(t.vars||t).palette[n.color].main},[`&.${Os.disabled}`]:{color:(t.vars||t).palette.action.disabled}})})),js=(0,h.jsx)(Ds,{}),Fs=(0,h.jsx)(Is,{}),Ls=(0,h.jsx)(Ns,{}),Vs=o.forwardRef((function(e,t){var n,a;const i=(0,eo.A)({props:e,name:"MuiCheckbox"}),{checkedIcon:s=js,color:l="primary",icon:c=Fs,indeterminate:u=!1,indeterminateIcon:d=Ls,inputProps:p,size:f="medium",className:m}=i,y=(0,g.A)(i,Ts),w=u?d:c,x=u?d:s,C=(0,r.A)({},i,{color:l,indeterminate:u,size:f}),A=(e=>{const{classes:t,indeterminate:n,color:o,size:a}=e,i={root:["root",n&&"indeterminate",`color${(0,to.A)(o)}`,`size${(0,to.A)(a)}`]},s=(0,b.A)(i,$s,t);return(0,r.A)({},t,s)})(C);return(0,h.jsx)(_s,(0,r.A)({type:"checkbox",inputProps:(0,r.A)({"data-indeterminate":u},p),icon:o.cloneElement(w,{fontSize:null!=(n=w.props.fontSize)?n:f}),checkedIcon:o.cloneElement(x,{fontSize:null!=(a=x.props.fontSize)?a:f}),ownerState:C,ref:t,className:(0,v.A)(A.root,m)},y,{classes:A}))}));var zs=n(29925),Hs=n(25979),Bs=n(77335),Gs=n(45098),Ws=n(2046),Us=n(53065),Ks=n(3788),qs=n(25277);const Ys=["sortingOrder"],Xs=o.memo((function(e){const{sortingOrder:t}=e,n=(0,g.A)(e,Ys),o=(0,R.A)(),[a]=t,i="asc"===a?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return i?(0,h.jsx)(i,(0,r.A)({},n)):null})),Zs=(0,Ps.A)((0,h.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Qs=(0,Ps.A)((0,h.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),Js=(0,Ps.A)((0,h.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),el=(0,Ps.A)((0,h.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),tl=(0,Ps.A)((0,h.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),nl=(0,Ps.A)((0,h.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"),rl=(0,Ps.A)((0,h.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"),ol=((0,Ps.A)((0,h.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),(0,Ps.A)((0,h.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"),(0,Ps.A)((0,h.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")),al=(0,Ps.A)((0,h.jsx)("path",{d:"M11 19V5h2v14z"}),"Separator"),il=(0,Ps.A)((0,h.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),sl=(0,Ps.A)((0,h.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),ll=(0,Ps.A)((0,h.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),cl=(0,Ps.A)((0,h.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"),ul=(0,Ps.A)((0,h.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"),dl=(0,Ps.A)((0,h.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),pl=(0,Ps.A)((0,h.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),fl=(0,Ps.A)((0,h.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"),hl=(0,Ps.A)((0,h.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"),ml=(0,Ps.A)((0,h.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"),gl=(0,Ps.A)((0,h.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),vl=(0,Ps.A)((0,h.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"),yl=(0,Ps.A)((0,h.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),bl=(0,Ps.A)((0,h.jsx)("g",{children:(0,h.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),wl=(0,Ps.A)((0,h.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"}),"Clear"),xl=((0,Ps.A)((0,h.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),(0,Ps.A)((0,h.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete")),Cl=["native"];const Al={BooleanCellTrueIcon:gl,BooleanCellFalseIcon:ul,ColumnMenuIcon:cl,OpenFilterButtonIcon:tl,FilterPanelDeleteIcon:ul,ColumnFilteredIcon:nl,ColumnSelectorIcon:ol,ColumnUnsortedIcon:Xs,ColumnSortedAscendingIcon:Zs,ColumnSortedDescendingIcon:Qs,ColumnResizeIcon:al,DensityCompactIcon:il,DensityStandardIcon:sl,DensityComfortableIcon:ll,ExportIcon:ml,MoreActionsIcon:vl,TreeDataCollapseIcon:el,TreeDataExpandIcon:Js,GroupingCriteriaCollapseIcon:el,GroupingCriteriaExpandIcon:Js,DetailPanelExpandIcon:dl,DetailPanelCollapseIcon:pl,RowReorderIcon:hl,QuickFilterIcon:rl,QuickFilterClearIcon:ul,ColumnMenuHideIcon:yl,ColumnMenuSortAscendingIcon:Zs,ColumnMenuSortDescendingIcon:Qs,ColumnMenuFilterIcon:nl,ColumnMenuManageColumnsIcon:bl,ColumnMenuClearIcon:wl,LoadIcon:fl,FilterPanelAddIcon:dl,FilterPanelRemoveAllIcon:xl,ColumnReorderIcon:hl},Sl=(0,r.A)({},Al,{BaseCheckbox:Vs,BaseTextField:zs.A,BaseFormControl:Hs.A,BaseSelect:$o.A,BaseSwitch:Bs.A,BaseButton:Gs.A,BaseIconButton:Go.A,BaseInputAdornment:Ws.A,BaseTooltip:Us.A,BasePopper:on.A,BaseInputLabel:Ks.A,BaseSelectOption:function(e){let{native:t}=e,n=(0,g.A)(e,Cl);return t?(0,h.jsx)("option",(0,r.A)({},n)):(0,h.jsx)(No.A,(0,r.A)({},n))},BaseChip:qs.A}),kl=(0,r.A)({},Sl,{Cell:yi,SkeletonCell:function(e){const{align:t,width:n,contentWidth:o}=e,a=(0,g.A)(e,Zr),i=(e=>{const{align:t,classes:n}=e,r={root:["cell","cellSkeleton",`cell--text${(0,y.A)(t)}`,"withBorderColor"]};return(0,b.A)(r,S.B,n)})({classes:(0,R.A)().classes,align:t});return(0,h.jsx)("div",(0,r.A)({className:i.root,style:{width:n}},a,{children:(0,h.jsx)(Xr.A,{width:`${o}%`})}))},ColumnHeaderFilterIconButton:function(e){var t,n;const{counter:a,field:i,onClick:s}=e,l=(0,Qe.h)(),u=(0,R.A)(),d=(e=>{const{classes:t}=e;return(0,b.A)({icon:["filterIcon"]},S.B,t)})((0,r.A)({},e,{classes:u.classes})),p=(0,c.N)(l,Tr),f=(0,$t.A)(),m=(0,$t.A)(),g=o.useCallback((e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:n}=Tr(l.current.state);t&&n===vr.filters?l.current.hideFilterPanel():l.current.showFilterPanel(void 0,m,f),s&&s(l.current.getColumnHeaderParams(i),e)}),[l,i,s,m,f]);if(!a)return null;const v=p.open&&p.labelId===f,y=(0,h.jsx)(u.slots.baseIconButton,(0,r.A)({id:f,onClick:g,color:"default","aria-label":l.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":v,"aria-controls":v?m:void 0},null==(t=u.slotProps)?void 0:t.baseIconButton,{children:(0,h.jsx)(u.slots.columnFilteredIcon,{className:d.icon,fontSize:"small"})}));return(0,h.jsx)(u.slots.baseTooltip,(0,r.A)({title:l.current.getLocaleText("columnHeaderFiltersTooltipActive")(a),enterDelay:1e3},null==(n=u.slotProps)?void 0:n.baseTooltip,{children:(0,h.jsxs)(fo,{children:[a>1&&(0,h.jsx)(co,{badgeContent:a,color:"default",children:y}),1===a&&y]})}))},ColumnMenu:Ms,ColumnHeaders:as,Footer:wo,FooterRowCount:Ao,Toolbar:null,PreferencesPanel:So,LoadingOverlay:Po,NoResultsOverlay:Es,NoRowsOverlay:Io,Pagination:da,FilterPanel:ja,ColumnsPanel:function(e){var t,n,a;const i=(0,Qe.h)(),s=o.useRef(null),l=(0,c.N)(i,$.OV),u=(0,c.N)(i,$.FY),d=(0,R.A)(),[p,f]=o.useState(""),m=(e=>{const{classes:t}=e;return(0,b.A)({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},S.B,t)})(d),{sort:v,searchPredicate:y=ni,autoFocusSearchField:w=!0,disableHideAllButton:x=!1,disableShowAllButton:C=!1,getTogglableColumns:A}=e,k=(0,g.A)(e,Qa),M=o.useMemo((()=>{switch(v){case"asc":return[...l].sort(((e,t)=>ti.compare(e.headerName||e.field,t.headerName||t.field)));case"desc":return[...l].sort(((e,t)=>-ti.compare(e.headerName||e.field,t.headerName||t.field)));default:return l}}),[l,v]),E=e=>{const{name:t}=e.target;i.current.setColumnVisibility(t,!1===u[t])},P=o.useCallback((e=>{const t=(0,$.FY)(i),n=(0,r.A)({},t),o=A?A(l):null;return l.forEach((t=>{t.hideable&&(null==o||o.includes(t.field))&&(e?delete n[t.field]:n[t.field]=!1)})),i.current.setColumnVisibilityModel(n)}),[i,l,A]),I=o.useCallback((e=>{f(e.target.value)}),[]),D=o.useMemo((()=>{const e=A?A(M):null,t=e?M.filter((t=>{let{field:n}=t;return e.includes(n)})):M;return p?t.filter((e=>y(e,p.toLowerCase()))):t}),[M,p,y,A]),N=o.useRef(null);o.useEffect((()=>{w?s.current.focus():N.current&&"function"===typeof N.current.focus&&N.current.focus()}),[w]);let O=!1;const T=e=>!1===O&&!1!==e.hideable&&(O=!0,!0);return(0,h.jsxs)(Aa,(0,r.A)({},k,{children:[(0,h.jsx)(Za,{children:(0,h.jsx)(d.slots.baseTextField,(0,r.A)({label:i.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:i.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:s,value:p,onChange:I,variant:"standard",fullWidth:!0},null==(t=d.slotProps)?void 0:t.baseTextField))}),(0,h.jsx)(ma,{children:(0,h.jsx)(Ja,{className:m.root,ownerState:d,children:D.map((e=>{var t;return(0,h.jsxs)(ei,{className:m.columnsPanelRow,ownerState:d,children:[(0,h.jsx)(qa,{control:(0,h.jsx)(d.slots.baseSwitch,(0,r.A)({disabled:!1===e.hideable,checked:!1!==u[e.field],onClick:E,name:e.field,size:"small",inputRef:T(e)?N:void 0},null==(t=d.slotProps)?void 0:t.baseSwitch)),label:e.headerName||e.field}),!d.disableColumnReorder&&false]},e.field)}))})}),C&&x?null:(0,h.jsxs)(ya,{children:[x?(0,h.jsx)("span",{}):(0,h.jsx)(d.slots.baseButton,(0,r.A)({onClick:()=>P(!1)},null==(n=d.slotProps)?void 0:n.baseButton,{disabled:x,children:i.current.getLocaleText("columnsPanelHideAllButton")})),C?null:(0,h.jsx)(d.slots.baseButton,(0,r.A)({onClick:()=>P(!0)},null==(a=d.slotProps)?void 0:a.baseButton,{disabled:C,children:i.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))},Panel:si,Row:xi}),Ml=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>(0,r.A)({},t,{[`${n.charAt(0).toLowerCase()}${n.slice(1)}`]:e[n]})),{})},El={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:hn.Cell,filterMode:"client",filterDebounceMs:150,columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:"\t",rowPositionsDebounceMs:166},Rl=(Ml(kl),e=>(0,r.A)({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}}));const Pl=(e,t,n)=>"number"===typeof e&&e>0?e:t,Il=(["MUI: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),["MUI: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n"),e=>(0,r.A)({},e,{columnMenu:{open:!1}}));function Dl(e){return void 0!==e.field}const Nl=(e,t,n)=>{if(Dl(e)){if(void 0!==n[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:r,children:o}=e;o.forEach((e=>{Nl(e,[...t,r],n)}))},$l=e=>{if(!e)return{};const t={};return e.forEach((e=>{Nl(e,[],t)})),t},Ol=(e,t,n)=>{const r=e=>{var n;return null!=(n=t[e])?n:[]},o=[],a=Math.max(...e.map((e=>r(e).length))),i=(e,t,n)=>(0,we.Hv)(r(e).slice(0,n+1),r(t).slice(0,n+1));for(let s=0;s<a;s+=1){const t=e.reduce(((e,t)=>{var o;const a=null!=(o=r(t)[s])?o:null;if(0===e.length)return[{columnFields:[t],groupId:a}];const l=e[e.length-1],c=l.columnFields[l.columnFields.length-1];return l.groupId!==a||!i(c,t,s)||(u=c,d=t,null!=n&&n.left&&n.left.includes(u)&&!n.left.includes(d)||null!=n&&n.right&&!n.right.includes(u)&&n.right.includes(d))?[...e,{columnFields:[t],groupId:a}]:[...e.slice(0,e.length-1),{columnFields:[...l.columnFields,t],groupId:a}];var u,d}),[]);o.push(t)}return o},Tl=["groupId","children"],_l=e=>{let t={};return e.forEach((e=>{if(Dl(e))return;const{groupId:n,children:o}=e,a=(0,g.A)(e,Tl);if(!n)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${n} has no children.`);const i=(0,r.A)({},a,{groupId:n}),s=_l(o);if(void 0!==s[n]||void 0!==t[n])throw new Error(`MUI: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=(0,r.A)({},t,s,{[n]:i})})),(0,r.A)({},t)},jl=(e,t,n)=>{var o,a,i,s;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return e;const l=(0,$.JR)(n),c=(0,$.TI)(n),u=_l(null!=(a=t.columnGroupingModel)?a:[]),d=$l(null!=(i=t.columnGroupingModel)?i:[]),p=Ol(l,d,null!=(s=n.current.state.pinnedColumns)?s:{}),f=0===c.length?0:Math.max(...c.map((e=>{var t,n;return null!=(t=null==(n=d[e])?void 0:n.length)?t:0})));return(0,r.A)({},e,{columnGrouping:{lookup:u,unwrappedGroupingModel:d,headerStructure:p,maxDepth:f}})},Fl=(e,t)=>{const n={enabled:!t.disableVirtualization,enabledForColumns:!0};return(0,r.A)({},e,{virtualization:n})};const Ll=e=>e.headerFiltering,Vl=(0,P.Mz)(Ll,(e=>e.editing)),zl=(0,P.Mz)(Ll,(e=>e.menuOpen));const Hl=e=>{let{currentColIndex:t,firstColIndex:n,lastColIndex:r,direction:o}=e;if("rtl"===o){if(t<r)return t+1}else if("ltr"===o&&t>n)return t-1;return null},Bl=e=>{let{currentColIndex:t,firstColIndex:n,lastColIndex:r,direction:o}=e;if("rtl"===o){if(t>n)return t-1}else if("ltr"===o&&t<r)return t+1;return null},Gl=(e,t)=>{const n=qt(e,"useGridKeyboardNavigation"),r=yn(e,t).rows,a=(0,Zt.A)(),i=o.useMemo((()=>function(e,t){const n=(0,L.$2)(e)||{};return[...n.top||[],...t,...n.bottom||[]]}(e,r)),[e,r]),s="DataGrid"!==t.signature&&t.unstable_headerFilters,l=o.useCallback((function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left";const a=Q(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]),c=o.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]),u=o.useCallback(((t,r)=>{n.debug(`Navigating to header filter col ${t}`),e.current.scrollToIndexes({colIndex:t});const o=e.current.getVisibleColumns()[t].field;e.current.setColumnHeaderFilterFocus(o,r)}),[e,n]),d=o.useCallback(((t,r,o)=>{n.debug(`Navigating to header col ${t}`),e.current.scrollToIndexes({colIndex:t});const{field:a}=e.current.getVisibleColumns()[t];e.current.setColumnGroupHeaderFocus(a,r,o)}),[e,n]),p=o.useCallback((e=>{var t;return null==(t=i[e])?void 0:t.id}),[i]),f=o.useCallback(((t,n)=>{const r=n.currentTarget.querySelector(`.${S.x.columnHeaderTitleContainerContent}`);if(!!r&&r.contains(n.target)&&t.field!==Bt.field)return;if(!e.current.getRootDimensions())return;const o=e.current.getViewportPageSize(),f=t.field?e.current.getColumnIndex(t.field):0,h=i.length>0?0:null,m=i.length-1,g=(0,$.iv)(e).length-1,v=F(e);let y=!0;switch(n.key){case"ArrowDown":null!==h&&(s?u(f,n):l(f,p(h)));break;case"ArrowRight":{const e=Bl({currentColIndex:f,firstColIndex:0,lastColIndex:g,direction:a.direction});null!==e&&c(e,n);break}case"ArrowLeft":{const e=Hl({currentColIndex:f,firstColIndex:0,lastColIndex:g,direction:a.direction});null!==e&&c(e,n);break}case"ArrowUp":v>0&&d(f,v-1,n);break;case"PageDown":null!==h&&null!==m&&l(f,p(Math.min(h+o,m)));break;case"Home":c(0,n);break;case"End":c(g,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&e.current.toggleColumnMenu(t.field);break;case" ":break;default:y=!1}y&&n.preventDefault()}),[e,i.length,s,u,l,p,a.direction,c,d]),h=o.useCallback(((t,n)=>{if(!e.current.getRootDimensions())return;const r=Vl(e)===t.field,o=zl(e)===t.field;if(r||o||!Ze(n.key))return;const s=e.current.getViewportPageSize(),d=t.field?e.current.getColumnIndex(t.field):0,f=i.length-1,h=(0,$.iv)(e).length-1;let m=!0;switch(n.key){case"ArrowDown":{const e=p(0);null!=e&&l(d,e);break}case"ArrowRight":{const e=Bl({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:a.direction});null!==e&&u(e,n);break}case"ArrowLeft":{const r=Hl({currentColIndex:d,firstColIndex:0,lastColIndex:h,direction:a.direction});null!==r?u(r,n):e.current.setColumnHeaderFilterFocus(t.field,n);break}case"ArrowUp":c(d,n);break;case"PageDown":null!==f&&l(d,p(Math.min(0+s,f)));break;case"Home":u(0,n);break;case"End":u(h,n);break;case" ":break;default:m=!1}m&&n.preventDefault()}),[e,i.length,u,a.direction,c,l,p]),m=o.useCallback(((t,n)=>{if(!e.current.getRootDimensions())return;const r=de(e);if(null===r)return;const{field:o,depth:a}=r,{fields:s,depth:u,maxDepth:f}=t,h=e.current.getViewportPageSize(),m=e.current.getColumnIndex(o),g=o?e.current.getColumnIndex(o):0,v=i.length-1,y=(0,$.iv)(e).length-1;let b=!0;switch(n.key){case"ArrowDown":u===f-1?c(m,n):d(m,a+1,n);break;case"ArrowUp":u>0&&d(m,a-1,n);break;case"ArrowRight":{const e=s.length-s.indexOf(o)-1;m+e+1<=y&&d(m+e+1,a,n);break}case"ArrowLeft":{const e=s.indexOf(o);m-e-1>=0&&d(m-e-1,a,n);break}case"PageDown":null!==v&&l(g,p(Math.min(0+h,v)));break;case"Home":d(0,a,n);break;case"End":d(y,a,n);break;case" ":break;default:b=!1}b&&n.preventDefault()}),[e,i.length,c,d,l,p]),g=o.useCallback(((t,n)=>{if((0,wn.TA)(n))return;const r=e.current.getCellParams(t.id,t.field);if(r.cellMode===mn.Edit||!Ze(n.key))return;if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:n,cell:r}))return;const o=e.current.getRootDimensions();if(0===i.length||!o)return;const d=a.direction,f=e.current.getViewportPageSize(),h=t.field?e.current.getColumnIndex(t.field):0,m=i.findIndex((e=>e.id===t.id)),g=i.length-1,v=(0,$.iv)(e).length-1;let y=!0;switch(n.key){case"ArrowDown":m<g&&l(h,p(m+1));break;case"ArrowUp":m>0?l(h,p(m-1)):s?u(h,n):c(h,n);break;case"ArrowRight":{const e=Bl({currentColIndex:h,firstColIndex:0,lastColIndex:v,direction:d});null!==e&&l(e,p(m),"rtl"===d?"left":"right");break}case"ArrowLeft":{const e=Hl({currentColIndex:h,firstColIndex:0,lastColIndex:v,direction:d});null!==e&&l(e,p(m),"rtl"===d?"right":"left");break}case"Tab":n.shiftKey&&h>0?l(h-1,p(m),"left"):!n.shiftKey&&h<v&&l(h+1,p(m),"right");break;case" ":{if(t.field===bn)break;const e=t.colDef;if(e&&"treeDataGroup"===e.type)break;!n.shiftKey&&m<g&&l(h,p(Math.min(m+f,g)));break}case"PageDown":m<g&&l(h,p(Math.min(m+f,g)));break;case"PageUp":{const e=Math.max(m-f,0);e!==m&&e>=0?l(h,p(e)):c(h,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?l(0,p(0)):l(0,p(m));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?l(v,p(g)):l(v,p(m));break;default:y=!1}y&&n.preventDefault()}),[e,i,a.direction,l,p,s,u,c]),v=o.useCallback(((e,t)=>{let{event:n}=t;return" "!==n.key&&e}),[]);We(e,"canStartEditing",v),$e(e,"columnHeaderKeyDown",f),$e(e,"headerFilterKeyDown",h),$e(e,"columnGroupHeaderKeyDown",m),$e(e,"cellKeyDown",g)};function Wl(e){const{clientHeight:t,scrollTop:n,offsetHeight:r,offsetTop:o}=e,a=o+r;return r>t?o:a-t>n?a-t:o<n?o:void 0}function Ul(e,t){return"string"===typeof e&&[t,"\n","\r",'"'].some((t=>e.includes(t)))?`"${e.replace(/"/g,'""')}"`:e}const Kl=(e,t)=>{const{delimiterCharacter:n,ignoreValueFormatter:r}=t;let o;if(r){var a;const t=e.colDef.type;if("number"===t)o=String(e.value);else if("date"===t||"dateTime"===t){var i;o=null==(i=e.value)?void 0:i.toISOString()}else o="function"===typeof(null==(a=e.value)?void 0:a.toString)?e.value.toString():e.value}else o=e.formattedValue;return Ul(o,n)};(0,at.f)(["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."]);class ql{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.delimiterCharacter),null===e||void 0===e?this.rowString+="":"function"===typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.delimiterCharacter):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}function Yl(e){const{columns:t,rowIds:n,delimiterCharacter:r,includeHeaders:o,includeColumnGroupsHeaders:a,ignoreValueFormatter:i,apiRef:s}=e,l=n.reduce(((e,n)=>`${e}${(e=>{let{id:t,columns:n,getCellParams:r,delimiterCharacter:o,ignoreValueFormatter:a}=e;const i=new ql({delimiterCharacter:o});return n.forEach((e=>{const n=r(t,e.field);i.addValue(Kl(n,{delimiterCharacter:o,ignoreValueFormatter:a}))})),i.getRowString()})({id:n,columns:t,getCellParams:s.current.getCellParams,delimiterCharacter:r,ignoreValueFormatter:i})}\r\n`),"").trim();if(!o)return l;const c=t.filter((e=>e.field!==Bt.field)),u=[];if(a){const e=s.current.unstable_getAllGroupDetails();let t=0;const n=c.reduce(((e,n)=>{const r=s.current.unstable_getColumnGroupPath(n.field);return e[n.field]=r,t=Math.max(t,r.length),e}),{});for(let o=0;o<t;o+=1){const t=new ql({delimiterCharacter:r,sanitizeCellValue:Ul});u.push(t),c.forEach((r=>{const a=(n[r.field]||[])[o],i=e[a];t.addValue(i?i.headerName||i.groupId:"")}))}}const d=new ql({delimiterCharacter:r,sanitizeCellValue:Ul});c.forEach((e=>{d.addValue(e.headerName||e.field)})),u.push(d);return`${`${u.map((e=>e.getRowString())).join("\r\n")}\r\n`}${l}`.trim()}const Xl=e=>{let{apiRef:t,options:n}=e;const r=(0,$.OV)(t);if(n.fields)return n.fields.reduce(((e,t)=>{const n=r.find((e=>e.field===t));return n&&e.push(n),e}),[]);return(n.allColumns?r:(0,$.iv)(t)).filter((e=>!e.disableExport))},Zl=e=>{let{apiRef:t}=e;var n,r;const o=te(t),a=(0,L.qj)(t),i=t.current.getSelectedRows(),s=o.filter((e=>"footer"!==a[e].type)),l=(0,L.$2)(t),c=(null==l||null==(n=l.top)?void 0:n.map((e=>e.id)))||[],u=(null==l||null==(r=l.bottom)?void 0:r.map((e=>e.id)))||[];return s.unshift(...c),s.push(...u),i.size>0?s.filter((e=>i.has(e))):s},Ql=["hideMenu","options"],Jl=["hideMenu","options"];function ec(e){const t=(0,Qe.h)(),{hideMenu:n,options:o}=e,a=(0,g.A)(e,Ql);return(0,h.jsx)(No.A,(0,r.A)({onClick:()=>{t.current.exportDataAsCsv(o),null==n||n()}},a,{children:t.current.getLocaleText("toolbarExportCSV")}))}function tc(e){const t=(0,Qe.h)(),{hideMenu:n,options:o}=e,a=(0,g.A)(e,Jl);return(0,h.jsx)(No.A,(0,r.A)({onClick:()=>{t.current.exportDataAsPrint(o),null==n||n()}},a,{children:t.current.getLocaleText("toolbarExportPrint")}))}const nc=(e,t)=>{const n=qt(e,"useGridCsvExport"),r=t.unstable_ignoreValueFormatterDuringExport,a=("object"===typeof r?null==r?void 0:r.csvExport:r)||!1,i=o.useCallback((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,o,i;n.debug("Get data as CSV");return Yl({columns:Xl({apiRef:e,options:t}),rowIds:(null!=(r=t.getRowsToExport)?r:Zl)({apiRef:e}),delimiterCharacter:t.delimiter||",",includeHeaders:null==(o=t.includeHeaders)||o,includeColumnGroupsHeaders:null==(i=t.includeColumnGroupsHeaders)||i,ignoreValueFormatter:a,apiRef:e})}),[n,e,a]),s=o.useCallback((e=>{n.debug("Export data as CSV");const t=i(e);!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"csv";const n=`${arguments.length>2&&void 0!==arguments[2]?arguments[2]:document.title||"untitled"}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),r=document.createElement("a");return r.href=t,r.download=n,r.click(),void setTimeout((()=>{URL.revokeObjectURL(t)}))}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)}),[n,i]);xe(e,{getDataAsCsv:i,exportDataAsCsv:s},"public");const l=o.useCallback(((e,t)=>{var n;return null!=(n=t.csvOptions)&&n.disableToolbarButton?e:[...e,{component:(0,h.jsx)(ec,{options:t.csvOptions}),componentName:"csvExport"}]}),[]);We(e,"exportMenu",l)};const rc=(e,t)=>{const n=qt(e,"useGridPrintExport"),a=o.useRef(null),i=o.useRef(null),s=o.useRef({}),l=o.useRef([]);o.useEffect((()=>{a.current=(0,Jt.A)(e.current.rootElementRef.current)}),[e]);const c=o.useCallback(((t,n,r)=>new Promise((o=>{const a=Xl({apiRef:e,options:{fields:t,allColumns:n}}).map((e=>e.field)),i=(0,$.OV)(e),s={};i.forEach((e=>{s[e.field]=a.includes(e.field)})),r&&(s[Bt.field]=!0),e.current.setColumnVisibilityModel(s),o()}))),[e]),u=o.useCallback((t=>{const n=t({apiRef:e}).map((t=>e.current.getRow(t)));e.current.setRows(n)}),[e]),d=o.useCallback(((n,o)=>{var i,s;const l=(0,r.A)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},o),c=n.contentDocument;if(!c)return;const u=Fi(e.current.state),d=e.current.rootElementRef.current,p=d.cloneNode(!0);p.querySelector(`.${S.x.main}`).style.overflow="visible",p.style.contain="size";p.querySelector(`.${S.x.columnHeaders}`).querySelector(`.${S.x.columnHeadersInner}`).style.width="100%";let f=(null==(i=d.querySelector(`.${S.x.toolbarContainer}`))?void 0:i.offsetHeight)||0,h=(null==(s=d.querySelector(`.${S.x.footerContainer}`))?void 0:s.offsetHeight)||0;var m,g;l.hideToolbar&&(null==(m=p.querySelector(`.${S.x.toolbarContainer}`))||m.remove(),f=0);l.hideFooter&&(null==(g=p.querySelector(`.${S.x.footerContainer}`))||g.remove(),h=0);const v=u.currentPageTotalHeight+gr(e,t.columnHeaderHeight)+f+h;if(p.style.height=`${v}px`,p.style.boxSizing="content-box",null!=o&&o.getRowsToExport){const e=p.querySelector(`.${S.x.footerContainer}`);e.style.position="absolute",e.style.width="100%",e.style.top=v-h+"px"}const y=document.createElement("div");y.appendChild(p),c.body.innerHTML=y.innerHTML;const b="function"===typeof l.pageStyle?l.pageStyle():l.pageStyle;if("string"===typeof b){const e=c.createElement("style");e.appendChild(c.createTextNode(b)),c.head.appendChild(e)}l.bodyClassName&&c.body.classList.add(...l.bodyClassName.split(" "));const w=[];if(l.copyStyles){const e=d.getRootNode(),t=("ShadowRoot"===e.constructor.name?e:a.current).querySelectorAll("style, link[rel='stylesheet']");for(let n=0;n<t.length;n+=1){const e=t[n];if("STYLE"===e.tagName){const t=c.createElement(e.tagName),n=e.sheet;if(n){let e="";for(let t=0;t<n.cssRules.length;t+=1)"string"===typeof n.cssRules[t].cssText&&(e+=`${n.cssRules[t].cssText}\r\n`);t.appendChild(c.createTextNode(e)),c.head.appendChild(t)}}else if(e.getAttribute("href")){const t=c.createElement(e.tagName);for(let n=0;n<e.attributes.length;n+=1){const r=e.attributes[n];r&&t.setAttribute(r.nodeName,r.nodeValue||"")}w.push(new Promise((e=>{t.addEventListener("load",(()=>e()))}))),c.head.appendChild(t)}}}Promise.all(w).then((()=>{n.contentWindow.print()}))}),[e,a,t.columnHeaderHeight]),p=o.useCallback((t=>{var n;a.current.body.removeChild(t),e.current.restoreState(i.current||{}),null!=(n=i.current)&&null!=(n=n.columns)&&n.columnVisibilityModel||e.current.setColumnVisibilityModel(s.current),e.current.unstable_setVirtualization(!0),e.current.setRows(l.current),i.current=null,s.current={},l.current=[]}),[e]),f=o.useCallback((async r=>{if(n.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");if(i.current=e.current.exportState(),s.current=(0,$.FY)(e),l.current=e.current.getSortedRows(),t.pagination){const t=re(e),n={page:0,pageSize:t};e.current.updateControlState("pagination",qr(t,"DataGridPro",n)),e.current.forceUpdate()}await c(null==r?void 0:r.fields,null==r?void 0:r.allColumns,null==r?void 0:r.includeCheckboxes),null!=r&&r.getRowsToExport&&u(r.getRowsToExport),e.current.unstable_setVirtualization(!1),await new Promise((e=>{requestAnimationFrame((()=>{e()}))}));const o=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(null==r?void 0:r.fileName);o.onload=()=>{d(o,r);o.contentWindow.matchMedia("print").addEventListener("change",(e=>{!1===e.matches&&p(o)}))},a.current.body.appendChild(o)}),[t,n,e,d,p,c,u]);xe(e,{exportDataAsPrint:f},"public");const m=o.useCallback(((e,t)=>{var n;return null!=(n=t.printOptions)&&n.disableToolbarButton?e:[...e,{component:(0,h.jsx)(tc,{options:t.printOptions}),componentName:"printExport"}]}),[]);We(e,"exportMenu",m)},oc=(e,t,n,r,a)=>{const i=qt(e,"useNativeEventListener"),[s,l]=o.useState(!1),c=o.useRef(r),u=o.useCallback((e=>c.current&&c.current(e)),[]);o.useEffect((()=>{c.current=r}),[r]),o.useEffect((()=>{let r;if(r=(0,we.Tn)(t)?t():t&&t.current?t.current:null,r&&n&&!s){i.debug(`Binding native ${n} event`),r.addEventListener(n,u,a);const t=r;l(!0);const o=()=>{i.debug(`Clearing native ${n} event`),t.removeEventListener(n,u,a)};e.current.subscribeEvent("unmount",o)}}),[t,u,n,s,i,a,e])};function ac(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 ic=(e,t)=>{const n=t.unstable_ignoreValueFormatterDuringExport,r=("object"===typeof n?null==n?void 0:n.clipboardExport:n)||!1,a=t.clipboardCopyCellDelimiter,i=o.useCallback((t=>{if(!t.ctrlKey&&!t.metaKey||"c"!==t.key)return;if(function(e){var t;return!(null==(t=window.getSelection())||!t.toString())||!!(e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}(t.target))return;let n="";if(e.current.getSelectedRows().size>0)n=e.current.getDataAsCsv({includeHeaders:!1,delimiter:a});else{const t=le(e);if(t){const o=e.current.getCellParams(t.id,t.field);n=Kl(o,{delimiterCharacter:a,ignoreValueFormatter:r})}}var o;n=e.current.unstable_applyPipeProcessors("clipboardCopy",n),n&&(o=n,navigator.clipboard?navigator.clipboard.writeText(o).catch((()=>{ac(o)})):ac(o),e.current.publishEvent("clipboardCopy",n))}),[e,r,a]);oc(e,e.current.rootElementRef,"keydown",i),Te(e,"clipboardCopy",t.onClipboardCopy)};var sc=n(28635);const lc=(0,P.Mz)((e=>e.columnReorder),(e=>e.dragCol)),cc="left",uc="right",dc=e=>(0,r.A)({},e,{columnReorder:{dragCol:""}}),pc=(e,t)=>{const n=qt(e,"useGridColumnReorder"),a=o.useRef(null),i=o.useRef({x:0,y:0}),s=o.useRef(null),l=o.useRef({}),c=o.useRef(),u=(e=>{const{classes:t}=e;return(0,b.A)({columnHeaderDragging:["columnHeader--dragging"]},S.B,t)})({classes:t.classes}),d=(0,Zt.A)();o.useEffect((()=>()=>{clearTimeout(c.current)}),[]);const p=o.useCallback(((o,i)=>{if(t.disableColumnReorder||o.colDef.disableReorder)return;n.debug(`Start dragging col ${o.field}`),i.stopPropagation(),a.current=i.currentTarget,a.current.classList.add(u.columnHeaderDragging),i.dataTransfer&&(i.dataTransfer.effectAllowed="move"),e.current.setState((e=>(0,r.A)({},e,{columnReorder:(0,r.A)({},e.columnReorder,{dragCol:o.field})}))),e.current.forceUpdate(),c.current=setTimeout((()=>{a.current.classList.remove(u.columnHeaderDragging)})),s.current=e.current.getColumnIndex(o.field,!1);const d=e.current.unstable_getColumnGroupPath(o.field),p=s.current,f=e.current.getAllColumns(),h=e.current.unstable_getAllGroupDetails(),m=t=>{const n=f[t].field;return e.current.unstable_getColumnGroupPath(n)};let g=null;d.forEach((e=>{var t;null!=(t=h[e])&&t.freeReordering||(p>0&&m(p-1).includes(e)||p+1<f.length&&m(p+1).includes(e))&&(g=e)})),l.current={};for(let e=0;e<f.length;e+=1){const t=e<=p?e-1:e,n=e<p?e:e+1;if(null!==g){let r=!1;(t>=0&&m(t).includes(g)||n<f.length&&m(n).includes(g))&&(r=!0),r||(l.current[e]=!0)}t>=0&&n<f.length&&m(n).forEach((n=>{var r;m(t).includes(n)&&(d.includes(n)||null!=(r=h[n])&&r.freeReordering||(l.current[e]=!0))}))}}),[t.disableColumnReorder,u.columnHeaderDragging,n,e]),f=o.useCallback(((e,t)=>{t.preventDefault(),t.stopPropagation()}),[]),h=o.useCallback(((t,r)=>{const o=lc(e);if(!o)return;n.debug(`Dragging over col ${t.field}`),r.preventDefault(),r.stopPropagation();const a={x:r.clientX,y:r.clientY};if(t.field!==o&&(s=i.current,c=a,s.x!==c.x||s.y!==c.y)){const n=e.current.getColumnIndex(t.field,!1),r=e.current.getColumnIndex(t.field,!0),s=e.current.getColumn(t.field),c=e.current.getColumnIndex(o,!1),u=e.current.getVisibleColumns(),p=e.current.getAllColumns(),f=((e,t)=>e.x<=t.x?uc:cc)(i.current,a),h=f===cc&&("rtl"===d.direction?c<n:n<c),m=f===uc&&("rtl"===d.direction?n<c:c<n);if(h||m){let t,a=0;if(t=!s.disableReorder||(h?r>0&&!u[r-1].disableReorder:r<u.length-1&&!u[r+1].disableReorder),l.current[n]){let e,o=n+a;if(h)for(e=r>0?u[r-1].field:null;o>0&&p[o].field!==e&&l.current[o];)a-=1,o=n+a;else for(e=r+1<u.length?u[r+1].field:null;o<p.length-1&&p[o].field!==e&&l.current[o];)a+=1,o=n+a;(l.current[o]||p[o].field===e)&&(t=!1)}e.current.unstable_applyPipeProcessors("canBeReordered",t,{targetIndex:r})&&e.current.setColumnIndex(o,n+a)}i.current=a}var s,c}),[e,n,d.direction]),m=o.useCallback(((o,i)=>{const l=lc(e);if(!t.disableColumnReorder&&l){if(n.debug("End dragging col"),i.preventDefault(),i.stopPropagation(),clearTimeout(c.current),a.current=null,"none"!==i.dataTransfer.dropEffect||t.keepColumnPositionIfDraggedOutside){const t={column:e.current.getColumn(l),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(l),oldIndex:s.current};e.current.publishEvent("columnOrderChange",t)}else e.current.setColumnIndex(l,s.current),s.current=null;e.current.setState((e=>(0,r.A)({},e,{columnReorder:(0,r.A)({},e.columnReorder,{dragCol:""})}))),e.current.forceUpdate()}}),[t.disableColumnReorder,t.keepColumnPositionIfDraggedOutside,n,e]);$e(e,"columnHeaderDragStart",p),$e(e,"columnHeaderDragEnter",f),$e(e,"columnHeaderDragOver",h),$e(e,"columnHeaderDragEnd",m),$e(e,"cellDragEnter",f),$e(e,"cellDragOver",h),Te(e,"columnOrderChange",t.onColumnOrderChange)};var fc=n(27187);function hc(e,t){var n;return Array.from(null!=(n=e.querySelectorAll(`[data-fields*="|-${t}-|"]`))?n:[])}function mc(e,t){var n,r;if(!(0,wn.fl)(e,S.x.root))throw new Error("MUI: The root element is not found.");const o=e.getAttribute("aria-colindex");if(!o)return[];const a=Number(o)-1,i=[];if(null==(n=t.virtualScrollerRef)||!n.current)return[];return(null==(r=t.virtualScrollerRef)?void 0:r.current.querySelectorAll(`:scope > div > div > .${S.x.row}`)).forEach((e=>{const n=e.getAttribute("data-id");if(!n)return;let r=a;const o=t.unstable_getCellColSpanInfo(n,a);o&&o.spannedByColSpan&&(r=o.leftVisibleCellIndex);const s=e.querySelector(`[data-colindex="${r}"]`);s&&i.push(s)})),i}const gc={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1};let vc=!1;function yc(){return void 0===vc&&(vc="undefined"===typeof CSS||"function"!==typeof CSS.supports||CSS.supports("touch-action","none")),vc}function bc(e,t){if(void 0!==t&&e.changedTouches){for(let n=0;n<e.changedTouches.length;n+=1){const r=e.changedTouches[n];if(r.identifier===t)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function wc(e,t,n,r){let o=e;return o+="Right"===r?t-n.left:n.right-t,o}function xc(e,t,n){return"Left"===n?e-t.left:t.right-e}function Cc(e,t){const n=e.classList.contains(S.x["columnSeparator--sideRight"])?"Right":"Left";return"rtl"===t?function(e){return"Right"===e?"Left":"Right"}(n):n}function Ac(e){e.preventDefault(),e.stopImmediatePropagation()}function Sc(e){const t=o.useRef(),n=()=>zi(e),r=(0,c.N)(e,n);o.useEffect((()=>{t.current&&!1===r&&(t.current.resolve(),t.current=void 0)}));return()=>{if(!t.current){if(!1===n())return Promise.resolve();t.current=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}()}return t.current}}function kc(e,t,n){const r={},o=e.current.rootElementRef.current;return o.classList.add(S.x.autosizing),n.forEach((n=>{const o=function(e,t){const n=e.virtualScrollerRef.current,r=e=>`:scope > div > div > div > [data-field="${t}"][role="${e}"]`;return Array.from(n.querySelectorAll(`${r("cell")}, ${r("gridcell")}`))}(e.current,n.field),a=o.map((e=>{var t,n;const r=window.getComputedStyle(e,null);return parseInt(r.paddingLeft,10)+parseInt(r.paddingRight,10)+(null!=(t=null==(n=e.firstElementChild)?void 0:n.getBoundingClientRect().width)?t:0)})),i=t.includeOutliers?a:function(e,t){if(e.length<4)return e;const n=e.slice();n.sort(((e,t)=>e-t));const r=n[Math.floor(.25*n.length)],o=n[Math.floor(.75*n.length)-1],a=o-r,i=a<5?5:a*t;return n.filter((e=>e>r-i&&e<o+i))}(a,t.outliersFactor);if(t.includeHeaders){const t=(s=e.current,l=n.field,s.columnHeadersContainerElementRef.current.querySelector(`:scope > div > div > [data-field="${l}"][role="columnheader"]`));if(t){const e=t.querySelector(`.${S.x.columnHeaderTitle}`),n=t.querySelector(`.${S.x.columnHeaderTitleContainerContent}`),r=null!=e?e:n,o=window.getComputedStyle(t,null),a=parseInt(o.paddingLeft,10)+parseInt(o.paddingRight,10)+(r.scrollWidth+1);i.push(a)}}var s,l;const c=n.minWidth!==-1/0&&void 0!==n.minWidth,u=n.maxWidth!==1/0&&void 0!==n.maxWidth,d=c?n.minWidth:0,p=u?n.maxWidth:1/0,f=0===i.length?0:Math.max(...i);r[n.field]=(0,we.qE)(f,d,p)})),o.classList.remove(S.x.autosizing),r}const Mc=e=>(0,r.A)({},e,{columnResize:{resizingColumnField:""}}),Ec=(0,r.A)({},yt.C,{type:"treeDataGroup",sortable:!1,filterable:!1,disableColumnMenu:!0,disableReorder:!0,align:"left",width:200,valueGetter:e=>"group"===e.rowNode.type||"leaf"===e.rowNode.type?e.rowNode.groupingKey:void 0}),Rc={field:"__tree_data_group__",editable:!1,groupable:!1},Pc="tree-data";var Ic=n(16491),Dc=n(12941);const Nc=Qe.h;function $c(e){var t,n;const{id:o,field:a,formattedValue:i,rowNode:s,hideDescendantCount:l,offsetMultiplier:u=2}=e,d=(0,Dc.A)(),p=Nc(),f=(e=>{const{classes:t}=e;return(0,b.A)({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"]},S.B,t)})({classes:d.classes}),m=null!=(t=(0,c.N)(p,Z)[s.id])?t:0,g=s.childrenExpanded?d.slots.treeDataCollapseIcon:d.slots.treeDataExpandIcon;return(0,h.jsxs)(Ic.A,{className:f.root,sx:{ml:s.depth*u},children:[(0,h.jsx)("div",{className:f.toggle,children:m>0&&(0,h.jsx)(d.slots.baseIconButton,(0,r.A)({size:"small",onClick:e=>{p.current.setRowChildrenExpansion(o,!s.childrenExpanded),p.current.setCellFocus(o,a),e.stopPropagation()},tabIndex:-1,"aria-label":s.childrenExpanded?p.current.getLocaleText("treeDataCollapse"):p.current.getLocaleText("treeDataExpand")},null==d||null==(n=d.slotProps)?void 0:n.baseIconButton,{children:(0,h.jsx)(g,{fontSize:"inherit"})}))}),(0,h.jsxs)("span",{children:[void 0===i?s.groupingKey:i,!l&&m>0?` (${m})`:""]})]})}const Oc=e=>`auto-generated-row-${e.map((e=>`${e.field}/${e.key}`)).join("-")}`,Tc=e=>{let{id:t,tree:n}=e;const r=[];let o=n[t];for(;o.id!==bt;)r.push({field:"leaf"===o.type?null:o.groupingField,key:o.groupingKey}),o=n[o.parent];return r.reverse(),r},_c=(e,t,n)=>{let r;return r=e.id===bt||(n?n(e):-1===t||t>e.depth),e.childrenExpanded=r,e},jc=(e,t,n,r)=>{var o;t[e.id]=e,n[e.depth]=(null!=(o=n[e.depth])?o:0)+1;const a=t[e.parent];if("group"===e.type||"leaf"===e.type){var i,s,l;const n=null!=(i=e.groupingField)?i:"__no_field__",o=null!=(s=e.groupingKey)?s:"__no_key__",c=null==(l=a.childrenFromPath)?void 0:l[n];null!==r&&r[a.id]===t[a.id]?a.children=[...a.children,e.id]:a.children.push(e.id),null==c?a.childrenFromPath[n]={[o.toString()]:e.id}:c[o.toString()]=e.id}else"footer"===e.type&&(a.footerId=e.id)},Fc=e=>{let{node:t,tree:n,treeDepths:o}=e;delete n[t.id];const a=t.depth,i=o[a];1===i?delete o[a]:o[a]=i-1;const s=n[t.parent];if("footer"===t.type)n[s.id]=(0,r.A)({},s,{footerId:null});else{var l,c;const e=null!=(l=t.groupingField)?l:"__no_field__",o=null!=(c=t.groupingKey)?c:"__no_key__",a=s.children.filter((e=>e!==t.id)),i=s.childrenFromPath;delete i[e][o.toString()],n[s.id]=(0,r.A)({},s,{children:a,childrenFromPath:i})}},Lc=e=>{let{node:t,updatedNode:n,previousTree:o,tree:a,treeDepths:i}=e;t.children.forEach((e=>{a[e]=(0,r.A)({},a[e],{parent:n.id})})),Fc({node:t,tree:a,treeDepths:i});const s=(0,r.A)({},t,n);jc(s,a,i,o)},Vc=()=>({value:{},addAction(e,t){this.value[e]||(this.value[e]={}),this.value[e][t]=!0}}),zc=e=>{let{tree:t,filteredRowsLookup:n}=e;if(!n)return{};const r={},o=(e,a)=>{const i=n[e.id];"group"===e.type&&e.children.forEach((n=>{const r=t[n];o(r,a&&!!e.childrenExpanded)})),r[e.id]=i&&a,"group"===e.type&&null!=e.footerId&&(r[e.footerId]=i&&a&&!!e.childrenExpanded)},a=Object.values(t);for(let i=0;i<a.length;i+=1){const e=a[i];0===e.depth&&o(e,!0)}return r},Hc=e=>{let{id:t,path:n,updatedGroupsManager:r,previousTree:o,tree:a,treeDepths:i,onDuplicatePath:s,isGroupExpandedByDefault:l,defaultGroupingExpansionDepth:c}=e,u=bt;for(let p=0;p<n.length;p+=1){var d;const{key:e,field:f}=n[p],h=null!=f?f:"__no_field__",m=null!=e?e:"__no_key__",g=null==(d=a[u].childrenFromPath)||null==(d=d[h])?void 0:d[m.toString()];if(p===n.length-1)if(null==g){const n={type:"leaf",id:t,depth:p,parent:u,groupingKey:e};null==r||r.addAction(u,"insertChildren"),jc(n,a,i,o)}else{const e=a[g];"group"===e.type&&e.isAutoGenerated?(null==r||r.addAction(u,"removeChildren"),null==r||r.addAction(u,"insertChildren"),Lc({tree:a,previousTree:o,treeDepths:i,node:e,updatedNode:{id:t,isAutoGenerated:!1}})):null==s||s(g,t,n)}else if(null==g){const t=Oc(n.slice(0,p+1)),s={type:"group",id:t,parent:u,depth:p,isAutoGenerated:!0,groupingKey:e,groupingField:f,children:[],childrenFromPath:{},childrenExpanded:!1};null==r||r.addAction(u,"insertChildren"),jc(_c(s,c,l),a,i,o),u=t}else{const t=a[g];if("group"!==t.type){const n={type:"group",id:t.id,parent:t.parent,depth:t.depth,isAutoGenerated:!1,groupingKey:e,groupingField:f,children:[],childrenFromPath:{},childrenExpanded:!1};a[g]=_c(n,c,l)}u=t.id}}};class Bc{constructor(e,t){this.next=void 0,this.data=void 0,this.next=t,this.data=e}insertAfter(e){if(!e.first||!e.last)return;const t=this.next;this.next=e.first,e.last.next=t}}class Gc{constructor(e,t){this.first=void 0,this.last=void 0,this.first=e,this.last=t}data(){const e=[];return this.forEach((t=>{e.push(t.data)})),e}forEach(e){let t=this.first;for(;null!==t;)e(t),t=t.next}static from(e){if(0===e.length)return new Gc(null,null);let t=0;const n=new Bc(e[t],null);let r=n;for(;t+1<e.length;){t+=1;const n=new Bc(e[t],null);r.next=n,r=n}return new Gc(n,r)}}const Wc=e=>{let{node:t,tree:n,treeDepths:r,updatedGroupsManager:o}=e;Fc({node:t,tree:n,treeDepths:r}),"group"===t.type&&null!=t.footerId&&Fc({node:n[t.footerId],tree:n,treeDepths:r});const a=n[t.parent];null==o||o.addAction(a.id,"removeChildren");a.id!==bt&&0===a.children.length&&(a.isAutoGenerated?Wc({node:a,tree:n,treeDepths:r}):n[a.id]={type:"leaf",id:a.id,depth:a.depth,parent:a.parent,groupingKey:a.groupingKey})},Uc=e=>{let{id:t,tree:n,treeDepths:r,updatedGroupsManager:o}=e;const a=n[t];"group"===a.type&&a.children.length>0?(e=>{let{node:t,tree:n,treeDepths:r,updatedGroupsManager:o}=e;null==o||o.addAction(t.parent,"removeChildren"),null==o||o.addAction(t.parent,"insertChildren"),Lc({previousTree:null,tree:n,treeDepths:r,node:t,updatedNode:{id:Oc(Tc({id:t.id,tree:n})),isAutoGenerated:!0}})})({node:a,tree:n,treeDepths:r,updatedGroupsManager:o}):Wc({node:a,tree:n,treeDepths:r,updatedGroupsManager:o})},Kc=["hideDescendantCount"],qc=(e,t)=>{const n=o.useCallback((()=>{e.current.setStrategyAvailability("rowTree",Pc,t.treeData?()=>!0:()=>!1)}),[e,t.treeData]),a=o.useCallback((()=>{var n;const o=t.groupingColDef;let a;if("function"===typeof o){a=o({groupingName:Pc,fields:[]})}else a=o;const i=null!=(n=a)?n:{},{hideDescendantCount:s}=i,l=(0,g.A)(i,Kc),c=(0,r.A)({},Ec,{renderCell:e=>(0,h.jsx)($c,(0,r.A)({},e,{hideDescendantCount:s})),headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return(0,r.A)({},c,l,Rc)}),[e,t.groupingColDef]),i=o.useCallback((e=>{const n=Rc.field,r=t.treeData,o=e.lookup[n];if(r){const t=a();if(o&&(t.width=o.width,t.flex=o.flex),e.lookup[n]=t,null==o){const t=e.orderedFields[0]===Ht?1:0;e.orderedFields=[...e.orderedFields.slice(0,t),n,...e.orderedFields.slice(t)]}}else!r&&o&&(delete e.lookup[n],e.orderedFields=e.orderedFields.filter((e=>e!==n)));return e}),[t.treeData,a]),s=o.useCallback((e=>{if(!t.getTreeDataPath)throw new Error("MUI: No getTreeDataPath given.");const n=n=>({id:n,path:t.getTreeDataPath(e.dataRowIdToModelLookup[n]).map((e=>({key:e,field:null})))}),o=(e,t,n)=>{throw new Error(["MUI: The path returned by `getTreeDataPath` should be unique.",`The rows with id #${e} and #${t} have the same.`,`Path: ${JSON.stringify(n.map((e=>e.key)))}.`].join("\n"))};return"full"===e.updates.type?(e=>{const t=[],n={[bt]:xt()},r={};for(let o=0;o<e.nodes.length;o+=1){const a=e.nodes[o];t.push(a.id),Hc({tree:n,previousTree:e.previousTree,id:a.id,path:a.path,onDuplicatePath:e.onDuplicatePath,treeDepths:r,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth})}return{tree:n,treeDepths:r,groupingName:e.groupingName,dataRowIds:t}})({previousTree:e.previousTree,nodes:e.updates.rows.map(n),defaultGroupingExpansionDepth:t.defaultGroupingExpansionDepth,isGroupExpandedByDefault:t.isGroupExpandedByDefault,groupingName:Pc,onDuplicatePath:o}):(e=>{const t=(0,r.A)({},e.previousTree),n=(0,r.A)({},e.previousTreeDepth),o=Vc();for(let r=0;r<e.nodes.inserted.length;r+=1){const{id:a,path:i}=e.nodes.inserted[r];Hc({previousTree:e.previousTree,tree:t,treeDepths:n,updatedGroupsManager:o,id:a,path:i,onDuplicatePath:e.onDuplicatePath,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth})}for(let r=0;r<e.nodes.removed.length;r+=1){const a=e.nodes.removed[r];Uc({tree:t,treeDepths:n,updatedGroupsManager:o,id:a})}for(let r=0;r<e.nodes.modified.length;r+=1){const{id:a,path:i}=e.nodes.modified[r],s=Tc({tree:t,id:a});(0,we.Hv)(s,i)?null==o||o.addAction(t[a].parent,"modifyChildren"):(Uc({tree:t,treeDepths:n,updatedGroupsManager:o,id:a}),Hc({previousTree:e.previousTree,tree:t,treeDepths:n,updatedGroupsManager:o,id:a,path:i,onDuplicatePath:e.onDuplicatePath,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth}))}const a=Et(t,bt,!0);return{tree:t,treeDepths:n,groupingName:e.groupingName,dataRowIds:a,updatedGroupsManager:o}})({nodes:{inserted:e.updates.actions.insert.map(n),modified:e.updates.actions.modify.map(n),removed:e.updates.actions.remove},previousTree:e.previousTree,previousTreeDepth:e.previousTreeDepths,defaultGroupingExpansionDepth:t.defaultGroupingExpansionDepth,isGroupExpandedByDefault:t.isGroupExpandedByDefault,groupingName:Pc})}),[t.getTreeDataPath,t.defaultGroupingExpansionDepth,t.isGroupExpandedByDefault]),l=o.useCallback((n=>(e=>{const{apiRef:t,rowTree:n,disableChildrenFiltering:r,isRowMatchingFilters:o}=e,a={},i={},s={},l={passingFilterItems:null,passingQuickFilterValues:null},c=(u,d,p)=>{let f;if(r&&u.depth>0)f=null;else if(o&&"footer"!==u.type){const n=t.current.getRow(u.id);o(n,void 0,l),f=(0,Vr.Ko)([l.passingFilterItems],[l.passingQuickFilterValues],e.filterModel,e.apiRef,s)}else f=!0;let h,m=0;switch("group"===u.type&&u.children.forEach((e=>{var t;const r=n[e],o=c(r,null!=(t=f)?t:d,p&&!!u.childrenExpanded);m+=o})),f){case!0:h=!0;break;case!1:h=m>0;break;default:h=d}return a[u.id]=h,h?(i[u.id]=m,"footer"===u.type?m:m+1):0},u=Object.values(n);for(let d=0;d<u.length;d+=1){const e=u[d];0===e.depth&&c(e,!0,!0)}return{filteredRowsLookup:a,filteredDescendantCountLookup:i}})({rowTree:(0,L.qj)(e),isRowMatchingFilters:n.isRowMatchingFilters,disableChildrenFiltering:t.disableChildrenFiltering,filterModel:n.filterModel,apiRef:e})),[e,t.disableChildrenFiltering]),c=o.useCallback((n=>(e=>{const{rowTree:t,disableChildrenSorting:n,sortRowList:r,shouldRenderGroupBelowLeaves:o}=e,a=new Map,i=e=>{let s;if(!r||n&&-1!==e.depth)if(o){const n=[],r=[];for(let o=0;o<e.children.length;o+=1){const a=e.children[o],s=t[a];"group"===s.type?(i(s),r.push(a)):"leaf"===s.type&&n.push(a)}s=[...n,...r]}else{for(let n=0;n<e.children.length;n+=1){const r=t[e.children[n]];"group"===r.type&&i(r)}s=[...e.children]}else{for(let n=0;n<e.children.length;n+=1){const r=t[e.children[n]];"group"===r.type&&i(r)}s=r(e.children.map((e=>t[e])))}null!=e.footerId&&s.push(e.footerId),a.set(e.id,s)};i(t[bt]);const s=Gc.from(a.get(bt));return s.forEach((e=>{const t=a.get(e.data);null!=t&&t.length&&e.insertAfter(Gc.from(t))})),s.data()})({rowTree:(0,L.qj)(e),sortRowList:n.sortRowList,disableChildrenSorting:t.disableChildrenSorting,shouldRenderGroupBelowLeaves:!1})),[e,t.disableChildrenSorting]);We(e,"hydrateColumns",i),Wt(e,Pc,"rowTreeCreation",s),Wt(e,Pc,"filtering",l),Wt(e,Pc,"sorting",c),Wt(e,Pc,"visibleRowsLookupCreation",zc),Ge((()=>{n()}));const u=o.useRef(!0);o.useEffect((()=>{u.current?u.current=!1:n()}),[n])};var Yc=function(e){return e.left="left",e.right="right",e}(Yc||{});const Xc=e=>e.pinnedColumns,Zc=(0,G.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e,overridesResolver:(e,t)=>t.overlayWrapper})((e=>{let{overlayType:t}=e;return{position:"sticky",top:0,left:0,width:0,height:0,zIndex:"loadingOverlay"===t?5:4}})),Qc=(0,G.A)("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e,overridesResolver:(e,t)=>t.overlayWrapperInner})({});function Jc(e){var t,n;const a=(0,Qe.h)(),i=(0,R.A)(),[s,l]=o.useState((()=>{var e,t;return null!=(e=null==(t=a.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null})),c=o.useCallback((()=>{var e,t;l(null!=(e=null==(t=a.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null)}),[a]);(0,x.A)((()=>a.current.subscribeEvent("viewportInnerSizeChange",c)),[a,c]);let u=null!=(t=null==s?void 0:s.height)?t:0;i.autoHeight&&0===u&&(u=Pt(a,i.rowHeight));const d=(e=>{const{classes:t}=e;return(0,b.A)({root:["overlayWrapper"],inner:["overlayWrapperInner"]},S.B,t)})((0,r.A)({},e,{classes:i.classes}));return s?(0,h.jsx)(Zc,{className:(0,v.A)(d.root),overlayType:e.overlayType,children:(0,h.jsx)(Qc,(0,r.A)({className:(0,v.A)(d.inner),style:{height:u,width:null!=(n=null==s?void 0:s.width)?n:0}},e))}):null}function eu(){const e=(0,Qe.h)(),t=(0,R.A)(),n=(0,c.N)(e,L.H0),o=(0,c.N)(e,re),a=(0,c.N)(e,L.Dl),i=!a&&n>0&&0===o;let s=null,l="";var u,d,p;a||0!==n||(s=(0,h.jsx)(t.slots.noRowsOverlay,(0,r.A)({},null==(u=t.slotProps)?void 0:u.noRowsOverlay)),l="noRowsOverlay");i&&(s=(0,h.jsx)(t.slots.noResultsOverlay,(0,r.A)({},null==(d=t.slotProps)?void 0:d.noResultsOverlay)),l="noResultsOverlay");a&&(s=(0,h.jsx)(t.slots.loadingOverlay,(0,r.A)({},null==(p=t.slotProps)?void 0:p.loadingOverlay)),l="loadingOverlay");return null===s?null:(0,h.jsx)(Jc,{overlayType:l,children:s})}const tu=(0,G.A)("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"},zIndex:0}),nu=o.forwardRef((function(e,t){const n=(0,R.A)(),o=(e=>{const{classes:t}=e;return(0,b.A)({root:["virtualScroller"]},S.B,t)})(n);return(0,h.jsx)(tu,(0,r.A)({ref:t},e,{className:(0,v.A)(o.root,e.className),ownerState:n}))})),ru=(0,G.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),ou=o.forwardRef((function(e,t){var n;const o=(0,R.A)(),a=((e,t)=>{const{classes:n}=e,r={root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]};return(0,b.A)(r,S.B,n)})(o,!o.autoHeight&&"auto"===(null==(n=e.style)?void 0:n.minHeight));return(0,h.jsx)(ru,(0,r.A)({ref:t},e,{ownerState:o,className:(0,v.A)(a.root,e.className)}))})),au=["className"],iu=(0,G.A)("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),su=o.forwardRef((function(e,t){const{className:n}=e,o=(0,g.A)(e,au),a=(0,R.A)(),i=(e=>{const{classes:t}=e;return(0,b.A)({root:["virtualScrollerRenderZone"]},S.B,t)})(a);return(0,h.jsx)(iu,(0,r.A)({ref:t,className:(0,v.A)(i.root,n),ownerState:a},o))})),lu=p,cu=e=>e.detailPanel.expandedRowIds,uu=e=>e.detailPanel.contentCache,du=e=>e.detailPanel.heightCache,pu=(0,P.S)(du,(e=>Object.entries(e).reduce(((e,t)=>{let[n,{height:r}]=t;return e[n]=r||0,e}),{}))),fu=["rowId","height","style"],hu=(0,A.Ay)(Ic.A,{name:"MuiDataGrid",slot:"DetailPanel",overridesResolver:(e,t)=>t.detailPanel})((e=>{let{theme:t}=e;return{zIndex:2,width:"100%",position:"absolute",backgroundColor:(t.vars||t).palette.background.default,overflow:"auto"}}));function mu(e){const{rowId:t,height:n,style:a={}}=e,i=(0,g.A)(e,fu),s=lu(),l=o.useRef(),c=(0,Dc.A)();o.useLayoutEffect((()=>{"auto"===n&&"undefined"===typeof ResizeObserver&&s.current.storeDetailPanelHeight(t,l.current.clientHeight)}),[s,n,t]),o.useLayoutEffect((()=>{if("auto"!==n||"undefined"===typeof ResizeObserver)return;const e=new ResizeObserver((e=>{const[n]=e,r=n.borderBoxSize&&n.borderBoxSize.length>0?n.borderBoxSize[0].blockSize:n.contentRect.height;s.current.storeDetailPanelHeight(t,r)}));return e.observe(l.current),()=>e.disconnect()}),[s,n,t]);const u=(0,r.A)({},a,{height:n});return(0,h.jsx)(hu,(0,r.A)({ref:l,ownerState:c,style:u},i))}const gu=["className","disableVirtualization"],vu=(e,t,n)=>{var r,o;if(!Array.isArray(e.left)&&!Array.isArray(e.right))return[[],[]];if(0===(null==(r=e.left)?void 0:r.length)&&0===(null==(o=e.right)?void 0:o.length))return[[],[]];const a=(e,t)=>Array.isArray(e)?e.filter((e=>t.includes(e))):[],i=a(e.left,t),s=t.filter((e=>!i.includes(e))),l=a(e.right,s);return n?[l,i]:[i,l]},yu=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,t/100},bu=e=>e.vars?"rgba(0 0 0 / 0.21)":(0,C.X4)(e.palette.common.black,.21),wu=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"DetailPanels",overridesResolver:(e,t)=>t.detailPanels})({position:"relative"}),xu=`linear-gradient(${(0,C.X4)("#fff",yu(2))}, ${(0,C.X4)("#fff",yu(2))})`,Cu=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"PinnedColumns",overridesResolver:(e,t)=>[{[`&.${S.x["pinnedColumns--left"]}`]:t["pinnedColumns--left"]},{[`&.${S.x["pinnedColumns--right"]}`]:t["pinnedColumns--right"]},t.pinnedColumns]})((e=>{let{theme:t,ownerState:n}=e;var o;const a=bu(t);return(0,r.A)({position:"sticky",overflow:"hidden",zIndex:1,backgroundColor:(t.vars||t).palette.background.default},t.vars?{backgroundImage:null==(o=t.vars.overlays)?void 0:o[2]}:(0,r.A)({},"dark"===t.palette.mode&&{backgroundImage:xu}),n.side===Yc.left&&{left:0,float:"left",boxShadow:`2px 0px 4px -2px ${a}`},n.side===Yc.right&&{right:0,float:"right",boxShadow:`-2px 0px 4px -2px ${a}`},n.side===Yc.right&&n.showCellVerticalBorder&&{borderLeftWidth:"1px",borderLeftStyle:"solid"})}));var Au=function(e){return e.top="top",e.bottom="bottom",e}(Au||{});const Su=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"PinnedRows",overridesResolver:(e,t)=>[{[`&.${S.x["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`&.${S.x["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},t.pinnedRows]})((e=>{let{theme:t,ownerState:n}=e;var o;const a=bu(t);return(0,r.A)({position:"sticky",zIndex:4,backgroundColor:(t.vars||t).palette.background.default},t.vars?{backgroundImage:null==(o=t.vars.overlays)?void 0:o[2]}:(0,r.A)({},"dark"===t.palette.mode&&{backgroundImage:xu}),"top"===n.position&&{top:0,boxShadow:`0px 3px 4px -2px ${a}`},n.position===Au.bottom&&{boxShadow:`0px -3px 4px -2px ${a}`,bottom:0})})),ku=(0,A.Ay)("div")({position:"absolute"}),Mu=o.forwardRef((function(e,t){const n=(0,g.A)(e,gu),a=lu(),i=(0,Dc.A)(),s=(0,c.N)(a,$.TI),l=(0,c.N)(a,cu),u=(0,c.N)(a,uu),d=(0,c.N)(a,pu),p=o.useRef(null),f=o.useRef(null),m=o.useRef(null),v=o.useRef(null),y=(0,Zt.A)(),w=o.useCallback((e=>{let{top:t,left:n}=e;p.current&&(p.current.style.transform=`translate3d(0px, ${t}px, 0px)`),f.current&&(f.current.style.transform=`translate3d(0px, ${t}px, 0px)`),m.current&&(m.current.style.transform=`translate3d(${n}px, 0px, 0px)`),v.current&&(v.current.style.transform=`translate3d(${n}px, 0px, 0px)`)}),[]),x=o.useMemo((()=>{const e=new Set;return l.forEach((t=>{e.add(t)})),e}),[l]),C=o.useCallback((e=>{if(!x.has(e))return null;return{style:{marginBottom:d[e]}}}),[d,x]),A=(0,c.N)(a,Xc),[k,M]=vu(A,s,"rtl"===y.direction),E=(0,c.N)(a,L.$2),R=o.useMemo((()=>(null==E?void 0:E.top)||[]),[null==E?void 0:E.top]),P=o.useMemo((()=>(null==E?void 0:E.bottom)||[]),[null==E?void 0:E.bottom]),I=(0,r.A)({},i,{classes:i.classes}),D=(e=>{const{classes:t}=e;return(0,b.A)({leftPinnedColumns:["pinnedColumns","pinnedColumns--left"],rightPinnedColumns:["pinnedColumns","pinnedColumns--right","withBorderColor"],topPinnedRows:["pinnedRows","pinnedRows--top"],bottomPinnedRows:["pinnedRows","pinnedRows--bottom"],pinnedRowsRenderZone:["pinnedRowsRenderZone"],detailPanels:["detailPanels"],detailPanel:["detailPanel"]},S.B,t)})(I),{renderContext:N,getRows:O,getRootProps:T,getContentProps:_,getRenderZoneProps:j,updateRenderZonePosition:F}=qi((0,r.A)({ref:t,renderZoneMinColumnIndex:k.length,renderZoneMaxColumnIndex:s.length-M.length,onRenderZonePositioning:w,getRowProps:C},e)),V=o.useCallback((()=>{N&&F(N)}),[N,F]);$e(a,"columnWidthChange",V),$e(a,"columnOrderChange",V),$e(a,"rowOrderChange",V);const z=N&&k.length>0?(0,r.A)({},N,{firstColumnIndex:0,lastColumnIndex:k.length}):null,H=N&&M.length>0?(0,r.A)({},N,{firstColumnIndex:s.length-M.length,lastColumnIndex:s.length}):null,B=[],G=O({renderContext:N,rows:R,position:"center"}),W=Rt(a),U=O({renderContext:N,rowIndexOffset:R.length,position:"center",onRowRender:e=>{if(null==i.getDetailPanelContent)return;if(!x.has(e))return;const t=(e=>{const t=Fi(a.current.state),n=u[e],r=a.current.getRowIndexRelativeToVisibleRows(e),i=void 0!==r;if(o.isValidElement(n)&&i){const o=a.current.detailPanelHasAutoHeight(e)?"auto":d[e],i=a.current.unstable_getRowInternalSizes(e),s=(null==i?void 0:i.spacingTop)||0,l=t.positions[r]+a.current.unstable_getRowHeight(e)+s;return(0,h.jsx)(mu,{rowId:e,style:{top:l},height:o,className:D.detailPanel,children:n},e)}return null})(e);t&&B.push(t)}}),K=O({renderContext:N,rows:P,rowIndexOffset:R.length+(U?U.length:0),position:"center"}),q=_(),Y={minHeight:q.style.minHeight};return q.style.minHeight&&"100%"===q.style.minHeight&&(q.style.minHeight=`calc(100% - ${W.top}px - ${W.bottom}px)`),(0,h.jsxs)(nu,(0,r.A)({},T(n),{children:[(0,h.jsx)(eu,{}),R.length>0?(0,h.jsxs)(Su,{className:D.topPinnedRows,ownerState:(0,r.A)({},I,{position:Au.top}),style:{width:q.style.width,height:W.top},role:"rowgroup",children:[z&&(0,h.jsx)(Cu,{className:D.leftPinnedColumns,ownerState:(0,r.A)({},I,{side:Yc.left,showCellVerticalBorder:i.showCellVerticalBorder}),children:O({renderContext:z,minFirstColumn:z.firstColumnIndex,maxLastColumn:z.lastColumnIndex,availableSpace:0,rows:R,position:"left"})}),(0,h.jsx)(ku,{className:D.pinnedRowsRenderZone,ref:m,role:"presentation",children:G}),H&&(0,h.jsx)(Cu,{className:D.rightPinnedColumns,ownerState:(0,r.A)({},I,{side:Yc.right,showCellVerticalBorder:i.showCellVerticalBorder}),children:O({renderContext:H,minFirstColumn:H.firstColumnIndex,maxLastColumn:H.lastColumnIndex,availableSpace:0,rows:R,position:"right"})})]}):null,(0,h.jsxs)(ou,(0,r.A)({},q,{children:[z&&(0,h.jsx)(Cu,{ref:p,className:D.leftPinnedColumns,ownerState:(0,r.A)({},I,{side:Yc.left,showCellVerticalBorder:i.showCellVerticalBorder}),style:Y,children:O({renderContext:z,minFirstColumn:z.firstColumnIndex,maxLastColumn:z.lastColumnIndex,availableSpace:0,rowIndexOffset:R.length,position:"left"})}),(0,h.jsx)(su,(0,r.A)({},j(),{children:U})),H&&(0,h.jsx)(Cu,{ref:f,ownerState:(0,r.A)({},I,{side:Yc.right,showCellVerticalBorder:i.showCellVerticalBorder}),className:D.rightPinnedColumns,style:Y,children:O({renderContext:H,minFirstColumn:H.firstColumnIndex,maxLastColumn:H.lastColumnIndex,availableSpace:0,rowIndexOffset:R.length,position:"right"})}),B.length>0&&(0,h.jsx)(wu,{className:D.detailPanels,ownerState:I,children:B})]})),P.length>0?(0,h.jsxs)(Su,{className:D.bottomPinnedRows,ownerState:(0,r.A)({},I,{position:Au.bottom}),style:{width:q.style.width,height:W.bottom},role:"rowgroup",children:[z&&(0,h.jsx)(Cu,{className:D.leftPinnedColumns,ownerState:(0,r.A)({},I,{side:Yc.left,showCellVerticalBorder:i.showCellVerticalBorder}),children:O({renderContext:z,minFirstColumn:z.firstColumnIndex,maxLastColumn:z.lastColumnIndex,availableSpace:0,rows:P,rowIndexOffset:R.length+(U?U.length:0),position:"left"})}),(0,h.jsx)(ku,{className:D.pinnedRowsRenderZone,ref:v,role:"presentation",children:K}),H&&(0,h.jsx)(Cu,{className:D.rightPinnedColumns,ownerState:(0,r.A)({},I,{side:Yc.right,showCellVerticalBorder:i.showCellVerticalBorder}),children:O({renderContext:H,minFirstColumn:H.firstColumnIndex,maxLastColumn:H.lastColumnIndex,availableSpace:0,rows:P,rowIndexOffset:R.length+(U?U.length:0),position:"right"})})]}):null]}))})),Eu=(e,t,n)=>{var o;let a;if(n.current.caches.columnPinning={orderedFieldsBeforePinningColumns:null},t.disableColumnPinning)a={};else if(t.pinnedColumns)a=t.pinnedColumns;else if(null!=(o=t.initialState)&&o.pinnedColumns){var i;a=null==(i=t.initialState)?void 0:i.pinnedColumns}else a={};return(0,r.A)({},e,{pinnedColumns:a})},Ru=e=>t=>(0,r.A)({},t,{pinnedColumns:e});function Pu(e){var t;const{id:n,value:a}=e,i=(0,Dc.A)(),s=Nc(),l=(e=>{const{classes:t,isExpanded:n}=e,r={root:["detailPanelToggleCell",n&&"detailPanelToggleCell--expanded"]};return(0,b.A)(r,S.B,t)})({classes:i.classes,isExpanded:a}),u=(0,c.N)(s,uu),d=o.isValidElement(u[n]),p=a?i.slots.detailPanelCollapseIcon:i.slots.detailPanelExpandIcon;return(0,h.jsx)(i.slots.baseIconButton,(0,r.A)({size:"small",tabIndex:-1,disabled:!d,className:l.root,"aria-label":a?s.current.getLocaleText("collapseDetailPanel"):s.current.getLocaleText("expandDetailPanel")},null==(t=i.slotProps)?void 0:t.baseIconButton,{children:(0,h.jsx)(p,{fontSize:"inherit"})}))}const Iu="__detail_panel_toggle__",Du=(0,r.A)({},yt.C,{field:Iu,type:"detailPanelToggle",editable:!1,sortable:!1,filterable:!1,resizable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,align:"left",width:40,valueGetter:e=>cu(e.api.state).includes(e.id),renderCell:e=>(0,h.jsx)(Pu,(0,r.A)({},e)),renderHeader:()=>null}),Nu=(e,t)=>{var n,o,a;return(0,r.A)({},e,{detailPanel:{heightCache:{},expandedRowIds:null!=(n=null!=(o=t.detailPanelExpandedRowIds)?o:null==(a=t.initialState)||null==(a=a.detailPanel)?void 0:a.expandedRowIds)?n:[]}})};function $u(e,t,n,r){if("function"!==typeof t)return{};const o=(0,L.A6)(e),a=o.reduce(((n,r)=>{const o=e.current.getRowParams(r);return n[r]=t(o),n}),{}),i=o.reduce(((t,o)=>{var i;if(null==a[o])return t;const s=e.current.getRowParams(o),l=n(s),c="auto"===l;return t[o]={autoHeight:c,height:c?null==(i=r[o])?void 0:i.height:l},t}),{});return{contentCache:a,heightCache:i}}var Ou=n(12795),Tu=function(e){return e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e}(Tu||{});let _u=null,ju={previousTargetId:null,dragDirection:null};const Fu=(e,t)=>{const n=qt(e,"useGridRowReorder"),r=(0,c.N)(e,K.XU),a=(0,c.N)(e,L.V2),i=o.useRef(null),s=o.useRef(null),l=o.useRef(),u=(e=>{const{classes:t}=e;return(0,b.A)({rowDragging:["row--dragging"]},S.B,t)})({classes:t.classes}),[d,p]=o.useState("");o.useEffect((()=>()=>{clearTimeout(l.current)}),[]);const f=o.useMemo((()=>!t.rowReordering||!!r.length||1!==a),[t.rowReordering,r,a]),h=o.useCallback(((t,r)=>{const o=(0,Cr.w)(e.current.state);f||0!==Object.keys(o).length||(n.debug(`Start dragging row ${t.id}`),r.stopPropagation(),i.current=r.currentTarget,i.current.classList.add(u.rowDragging),p(t.id),l.current=setTimeout((()=>{i.current.classList.remove(u.rowDragging)})),s.current=e.current.getRowIndexRelativeToVisibleRows(t.id),e.current.setCellFocus(t.id,Ou.A.field))}),[f,u.rowDragging,n,e]),m=o.useCallback(((t,r)=>{if(""===d)return;const o=e.current.getRowNode(t.id);if(!o||"footer"===o.type||"pinnedRow"===o.type)return;n.debug(`Dragging over row ${t.id}`),r.preventDefault(),r.stopPropagation();const a=_u?_u.y-r.clientY:r.clientY;if(t.id!==d){const n=e.current.getRowIndexRelativeToVisibleRows(t.id),r={dragDirection:a>0?Tu.DOWN:Tu.UP,previousTargetId:t.id},o=r.dragDirection!==ju.dragDirection||r.previousTargetId!==ju.previousTargetId;(null===ju.dragDirection||Math.abs(a)>=1&&o)&&(e.current.setRowIndex(d,n),ju=r)}_u={x:r.clientX,y:r.clientY}}),[e,n,d]),g=o.useCallback(((t,r)=>{const o=(0,Cr.w)(e.current.state);if(""!==d&&!f&&0===Object.keys(o).length){if(n.debug("End dragging row"),r.preventDefault(),r.stopPropagation(),clearTimeout(l.current),i.current=null,ju.dragDirection=null,"none"===r.dataTransfer.dropEffect)e.current.setRowIndex(d,s.current),s.current=null;else{const n={row:e.current.getRow(d),targetIndex:e.current.getRowIndexRelativeToVisibleRows(t.id),oldIndex:s.current};e.current.publishEvent("rowOrderChange",n)}p("")}}),[f,n,e,d]);$e(e,"rowDragStart",h),$e(e,"rowDragOver",m),$e(e,"rowDragEnd",g),$e(e,"cellDragOver",m),Te(e,"rowOrderChange",t.onRowOrderChange)},Lu=(e,t)=>{const n=(e=>{const{classes:t}=e;return o.useMemo((()=>(0,b.A)({rowReorderCellContainer:["rowReorderCellContainer"],columnHeaderReorder:["columnHeaderReorder"]},S.B,t)),[t])})({classes:t.classes}),a=o.useCallback((o=>{const a=(0,r.A)({},Ou.A,{cellClassName:n.rowReorderCellContainer,headerClassName:n.columnHeaderReorder,headerName:e.current.getLocaleText("rowReorderingHeaderName")}),i=t.rowReordering,s=null!=o.lookup[a.field];return i&&s||(i&&!s?(o.lookup[a.field]=a,o.orderedFields=[a.field,...o.orderedFields]):!i&&s&&(delete o.lookup[a.field],o.orderedFields=o.orderedFields.filter((e=>e!==a.field)))),o}),[e,n,t.rowReordering]);We(e,"hydrateColumns",a)};function Vu(e){let{lazyLoadingFeatureFlag:t,rowsLoadingMode:n,gridDimensions:r}=e;return!t||!r||"server"!==n}function zu(e,t){var n,r;const o={topIds:[],bottomIds:[],idLookup:{}};return null==e||null==(n=e.top)||n.forEach((e=>{const n=Ct(e,t);o.topIds.push(n),o.idLookup[n]=e})),null==e||null==(r=e.bottom)||r.forEach((e=>{const n=Ct(e,t);o.bottomIds.push(n),o.idLookup[n]=e})),o}const Hu=(e,t,n)=>{var o;return n.current.caches.pinnedRows=zu(t.pinnedRows,t.getRowId),(0,r.A)({},e,{rows:(0,r.A)({},e.rows,{additionalRowGroups:(0,r.A)({},null==(o=e.rows)?void 0:o.additionalRowGroups,{pinnedRows:{top:[],bottom:[]}})})})};function Bu(e){let{groupingParams:t,rowModel:n,rowId:o,position:a,apiRef:i,isAutoGenerated:s}=e;var l,c;const u=(0,r.A)({},t.dataRowIdToModelLookup),d=(0,r.A)({},t.dataRowIdToIdLookup),p=(0,r.A)({},t.tree),f=(0,r.A)({},t.treeDepths);jc({type:"pinnedRow",id:o,depth:0,parent:bt,isAutoGenerated:s},p,f,null),s||(u[o]=n,d[o]=o),i.current.caches.rows.dataRowIdToModelLookup[o]=(0,r.A)({},n),i.current.caches.rows.dataRowIdToIdLookup[o]=o;const h=(null==(l=t.additionalRowGroups)?void 0:l.pinnedRows)||{},m={id:o,model:n};return null!=(c=t.additionalRowGroups)&&null!=(c=c.pinnedRows)&&null!=(c=c[a])&&c.includes(m)?(0,r.A)({},t,{dataRowIdToModelLookup:u,dataRowIdToIdLookup:d,tree:p,treeDepths:f}):(0,r.A)({},t,{dataRowIdToModelLookup:u,dataRowIdToIdLookup:d,tree:p,treeDepths:f,additionalRowGroups:(0,r.A)({},t.additionalRowGroups,{pinnedRows:(0,r.A)({},h,{[a]:[...h[a]||[],m]})})})}const Gu=(e,t)=>{const n=Be(e,t);return Gt(n,t),Lu(n,t),qc(n,t),((e,t)=>{var n;const{lazyLoading:a}=null!=(n=t.experimentalFeatures)?n:{},i=o.useCallback((e=>{const n=e.tree[bt];if(!a||"server"!==t.rowsLoadingMode||!t.rowCount||n.children.length>=t.rowCount)return e;const o=(0,r.A)({},e.tree),i=[...n.children];for(let r=0;r<t.rowCount-n.children.length;r+=1){const e=`auto-generated-skeleton-row-root-${r}`;i.push(e);const t={type:"skeletonRow",id:e,parent:bt,depth:0};o[e]=t}return o[bt]=(0,r.A)({},n,{children:i}),(0,r.A)({},e,{tree:o})}),[t.rowCount,t.rowsLoadingMode,a]);We(e,"hydrateRows",i)})(n,t),(e=>{const t=o.useCallback((t=>{var n,o,a,i;const s=e.current.caches.pinnedRows||{};let l=(0,r.A)({},t,{additionalRowGroups:(0,r.A)({},t.additionalRowGroups,{pinnedRows:{}})});if(null==(n=s.topIds)||n.forEach((t=>{l=Bu({groupingParams:l,rowModel:s.idLookup[t],rowId:t,position:"top",apiRef:e,isAutoGenerated:!1})})),null==(o=s.bottomIds)||o.forEach((t=>{l=Bu({groupingParams:l,rowModel:s.idLookup[t],rowId:t,position:"bottom",apiRef:e,isAutoGenerated:!1})})),null!=(a=s.bottomIds)&&a.length||null!=(i=s.topIds)&&i.length){const e=e=>!l.tree[e]||"pinnedRow"!==l.tree[e].type,t=l.tree[bt];l.tree[bt]=(0,r.A)({},t,{children:t.children.filter(e)}),l.dataRowIds=l.dataRowIds.filter(e)}return l}),[e]);We(e,"hydrateRows",t)})(n),((e,t)=>{const n=o.useCallback((n=>null==t.getDetailPanelContent?(n.lookup[Iu]&&(delete n.lookup[Iu],n.orderedFields=n.orderedFields.filter((e=>e!==Iu))),n):(n.lookup[Iu]||(n.orderedFields=[Iu,...n.orderedFields],n.lookup[Iu]=(0,r.A)({},Du,{headerName:e.current.getLocaleText("detailPanelToggle")})),n)),[e,t.getDetailPanelContent]),a=o.useCallback(((n,r)=>null==t.getDetailPanelContent?n:cu(e.current.state).includes(r)?[...n,S.x["row--detailPanelExpanded"]]:n),[e,t.getDetailPanelContent]);We(e,"hydrateColumns",n),We(e,"rowClassName",a)})(n,t),((e,t)=>{const{disableColumnPinning:n,pinnedColumns:a,initialState:i}=t,s=(0,Zt.A)();let l=Xc(e.current.state);if(null==l){const t=Eu(e.current.state,{disableColumnPinning:n,pinnedColumns:a,initialState:i},e);l=Xc(t)}const c=o.useRef([]),u=o.useCallback((t=>{if(0===t.orderedFields.length||n)return t;const[o,a]=vu(l,t.orderedFields,"rtl"===s.direction);let i;const u=[...o,...a],{orderedFieldsBeforePinningColumns:d}=e.current.caches.columnPinning;if(d){i=new Array(t.orderedFields.length).fill(null);const n=[...i],r=[...t.orderedFields];c.current.forEach((e=>{if(!u.includes(e)&&t.lookup[e]){const t=d.indexOf(e);i[t]=e,n[t]=e,r.splice(r.indexOf(e),1)}})),u.forEach((e=>{let o=d.indexOf(e);if((-1===o||o>=n.length)&&(o=t.orderedFields.indexOf(e)),null!==n[o])for(o=0;null!==n[o];)o+=1;i[o]=e,n[o]=e,r.splice(r.indexOf(e),1)}));let o=0;r.forEach((e=>{for(;null!==n[o];)o+=1;n[o]=e,i[o]=e})),e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=n}else i=[...t.orderedFields],e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=[...t.orderedFields];c.current=u;const p=i.filter((e=>!o.includes(e)&&!a.includes(e)));return(0,r.A)({},t,{orderedFields:[...o,...p,...a]})}),[e,n,l,s.direction]);We(e,"hydrateColumns",u)})(n,t),(e=>{Wt(e,ze,"rowTreeCreation",Ut)})(n),Kt(Yt,n,t),Kt(Cn,n,t),Kt(Nu,n,t),Kt(Eu,n,t),Kt(br,n,t),Kt(Hu,n,t),Kt(wr,n,t),Kt(Dr,n,t),Kt($r,n,t),Kt(Or,n,t),Kt(_r,n,t),Kt(zr,n,t),Kt(Ur,n,t),Kt(dc,n,t),Kt(Mc,n,t),Kt(Kr,n,t),Kt(Rl,n,t),Kt(Il,n,t),Kt(jl,n,t),Kt(Fl,n,t),((e,t)=>{const n=qt(e,"useGridHeaderFiltering"),a=o.useCallback((n=>{e.current.setState((e=>{var o,a;return"DataGrid"===t.signature?e:(0,r.A)({},e,{headerFiltering:{editing:null!=(o=n.editing)?o:null,menuOpen:null!=(a=n.menuOpen)?a:null}})})),e.current.forceUpdate()}),[e,t.signature]),i=o.useCallback((t=>{n.debug(`Starting edit mode on header filter for field: ${t}`),e.current.setHeaderFilterState({editing:t})}),[e,n]),s=o.useCallback((()=>{n.debug("Stopping edit mode on header filter"),e.current.setHeaderFilterState({editing:null})}),[e,n]),l=o.useCallback((t=>{n.debug(`Opening header filter menu for field: ${t}`),e.current.setHeaderFilterState({menuOpen:t})}),[e,n]),c=o.useCallback((()=>{n.debug("Hiding header filter menu for active field");let t=e.current.state.headerFiltering.menuOpen;if(t){const n=(0,$.gv)(e),r=(0,$.FY)(e),o=(0,$.JR)(e);if(n[t]||(t=o[0]),!1===r[t]){const e=o.filter((e=>e===t||!1!==r[e])),n=e.indexOf(t);t=e[n+1]||e[n-1]}e.current.setHeaderFilterState({menuOpen:null}),e.current.setColumnHeaderFilterFocus(t)}}),[e,n]),u={setHeaderFilterState:a};xe(e,{startHeaderFilterEditMode:i,stopHeaderFilterEditMode:s,showHeaderFilterMenu:l,hideHeaderFilterMenu:c},"public"),xe(e,u,"private")})(n,t),(e=>{const t=o.useCallback(((t,n)=>{if("treeDataGroup"===e.current.getCellParams(t.id,t.field).colDef.type&&" "===n.key&&!n.shiftKey){if("group"!==t.rowNode.type)return;e.current.setRowChildrenExpansion(t.id,!t.rowNode.childrenExpanded)}}),[e]);$e(e,"cellKeyDown",t)})(n),Gl(n,t),((e,t)=>{const n=qt(e,"useGridSelection"),a=e=>function(){t.rowSelection&&e(...arguments)},i=o.useMemo((()=>xn(t.rowSelectionModel,tt(e.current.state))),[e,t.rowSelectionModel]),s=o.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:tt,changeEvent:"rowSelectionChange"});const{checkboxSelection:l,disableMultipleRowSelection:c,disableRowSelectionOnClick:u,isRowSelectable:d}=t,p=!c||l,f=yn(e,t),h=o.useCallback((t=>{var n;let r=t;const o=null!=(n=s.current)?n:t,a=e.current.isRowSelected(t);if(a){const t=J(e),n=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));if(n===a)return;r=n>a?t[a+1]:t[a-1]}s.current=t,e.current.selectRowRange({startId:o,endId:r},!a)}),[e]),m=o.useCallback((o=>{if(t.signature===Ie.DataGrid&&!t.checkboxSelection&&Array.isArray(o)&&o.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));tt(e.current.state)!==o&&(n.debug("Setting selection model"),e.current.setState((e=>(0,r.A)({},e,{rowSelection:t.rowSelection?o:[]}))),e.current.forceUpdate())}),[e,n,t.rowSelection,t.signature,t.checkboxSelection]),g=o.useCallback((t=>tt(e.current.state).includes(t)),[e]),v=o.useCallback((t=>{if(d&&!d(e.current.getRowParams(t)))return!1;const n=e.current.getRowNode(t);return"footer"!==(null==n?void 0:n.type)&&"pinnedRow"!==(null==n?void 0:n.type)}),[e,d]),y=o.useCallback((()=>rt(e)),[e]),b=o.useCallback((function(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.current.isRowSelectable(t))if(s.current=t,o)n.debug(`Setting selection for row ${t}`),e.current.setRowSelectionModel(r?[t]:[]);else{n.debug(`Toggling selection for row ${t}`);const o=tt(e.current.state).filter((e=>e!==t));r&&o.push(t),(o.length<2||p)&&e.current.setRowSelectionModel(o)}}),[e,n,p]),w=o.useCallback((function(t){let o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n.debug("Setting selection for several rows");const i=t.filter((t=>e.current.isRowSelectable(t)));let s;if(a)s=o?i:[];else{const t=(0,r.A)({},ot(e));i.forEach((e=>{o?t[e]=e:delete t[e]})),s=Object.values(t)}(s.length<2||p)&&e.current.setRowSelectionModel(s)}),[e,n,p]),x=o.useCallback((function(t){let{startId:r,endId:o}=t,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e.current.getRow(r)||!e.current.getRow(o))return;n.debug(`Expanding selection from row ${r} to row ${o}`);const s=J(e),l=s.indexOf(r),c=s.indexOf(o),[u,d]=l>c?[c,l]:[l,c],p=s.slice(u,d+1);e.current.selectRows(p,a,i)}),[e,n]),C={selectRows:w,selectRowRange:x};xe(e,{selectRow:b,setRowSelectionModel:m,getSelectedRows:y,isRowSelected:g,isRowSelectable:v},"public"),xe(e,C,t.signature===Ie.DataGrid?"private":"public");const A=o.useCallback((()=>{if(t.keepNonExistentRowsSelected)return;const n=tt(e.current.state),o=(0,L.rI)(e),a=(0,r.A)({},ot(e));let i=!1;n.forEach((e=>{o[e]||(delete a[e],i=!0)})),i&&e.current.setRowSelectionModel(Object.values(a))}),[e,t.keepNonExistentRowsSelected]),k=o.useCallback(((t,n)=>{const r=n.metaKey||n.ctrlKey,o=!l&&!r&&!(e=>!!e.key)(n),a=!p||o,i=e.current.isRowSelected(t);a?e.current.selectRow(t,!!o||!i,!0):e.current.selectRow(t,!i,!1)}),[e,p,l]),M=o.useCallback(((t,n)=>{var r;if(u)return;const o=null==(r=n.target.closest(`.${S.x.cell}`))?void 0:r.getAttribute("data-field");if(o!==Bt.field&&o!==bn){if(o){const t=e.current.getColumn(o);if((null==t?void 0:t.type)===pn)return}"pinnedRow"!==e.current.getRowNode(t.id).type&&(n.shiftKey&&(p||l)?h(t.id):k(t.id,n))}}),[u,p,l,e,h,k]),E=o.useCallback(((e,t)=>{var n;p&&t.shiftKey&&(null==(n=window.getSelection())||n.removeAllRanges())}),[p]),R=o.useCallback(((t,n)=>{n.nativeEvent.shiftKey?h(t.id):e.current.selectRow(t.id,t.value)}),[e,h]),P=o.useCallback((n=>{const r=t.checkboxSelectionVisibleOnly&&t.pagination?mt(e):J(e);e.current.selectRows(r,n.value)}),[e,t.checkboxSelectionVisibleOnly,t.pagination]),I=o.useCallback(((t,n)=>{if(e.current.getCellMode(t.id,t.field)!==mn.Edit&&!(0,wn.TA)(n)){if(Ze(n.key)&&n.shiftKey){const r=le(e);if(r&&r.id!==t.id){n.preventDefault();const o=e.current.isRowSelected(r.id);if(!p)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 c=f.rows.slice(s,l+1).map((e=>e.id));return void e.current.selectRows(c,!o)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void k(t.id,n);"a"===n.key&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),w(e.current.getAllRowIds(),!0))}}),[e,k,w,f.rows,p]);$e(e,"sortedRowsSet",a(A)),$e(e,"rowClick",a(M)),$e(e,"rowSelectionCheckboxChange",a(R)),$e(e,"headerSelectionCheckboxChange",P),$e(e,"cellMouseDown",a(E)),$e(e,"cellKeyDown",a(I)),o.useEffect((()=>{void 0!==i&&e.current.setRowSelectionModel(i)}),[e,i,t.rowSelection]),o.useEffect((()=>{t.rowSelection||e.current.setRowSelectionModel([])}),[e,t.rowSelection]);const D=null!=i;o.useEffect((()=>{if(D||!t.rowSelection)return;const n=tt(e.current.state);if(v){const t=n.filter((e=>v(e)));t.length<n.length&&e.current.setRowSelectionModel(t)}}),[e,v,D,t.rowSelection]),o.useEffect((()=>{if(!t.rowSelection||D)return;const n=tt(e.current.state);!p&&n.length>1&&e.current.setRowSelectionModel([])}),[e,p,l,D,t.rowSelection])})(n,t),((e,t)=>{var n;const a=(0,c.N)(e,Xc),i=(0,Zt.A)(),s=o.useCallback(((n,o)=>{if(t.disableColumnPinning)return n;const s=(0,$.TI)(e),[l,c]=vu(a,s,"rtl"===i.direction);if(!o.colIndex||0===l.length&&0===c.length)return n;const u=(0,$.iv)(e),d=(0,$.fc)(e),p=(0,$.Sw)(e),f=e.current.virtualScrollerRef.current.clientWidth,h=Math.abs(e.current.virtualScrollerRef.current.scrollLeft),m=u[o.colIndex].computedWidth,g=p[o.colIndex],v=p[l.length],y=d-p[p.length-c.length],b=g+m;if(b-(f-y)>h){const e=b-(f-y);return(0,r.A)({},n,{left:e})}if(g<h+v){const e=g-v;return(0,r.A)({},n,{left:e})}return n}),[e,a,t.disableColumnPinning,i.direction]),l=o.useCallback(((e,n)=>t.disableColumnPinning||!1===n.pinnable?e:[...e,"columnMenuPinningItem"]),[t.disableColumnPinning]),u=o.useCallback(((t,n)=>{let{targetIndex:r}=n;const o=(0,$.TI)(e),[s,l]=vu(a,o,"rtl"===i.direction);return 0===s.length&&0===l.length?t:!(s.length>0&&r<s.length)&&(l.length>0?!(r>=(0,$.iv)(e).length-l.length)&&t:t)}),[e,a,i.direction]),d=o.useCallback(((n,o)=>{var a,i,s;const l=Xc(e.current.state);return!o.exportOnlyDirtyModels||null!=t.pinnedColumns||null!=(null==(a=t.initialState)?void 0:a.pinnedColumns)||(null!=(i=l.left)?i:[]).length>0||(null!=(s=l.right)?s:[]).length>0?(0,r.A)({},n,{pinnedColumns:l}):n}),[e,t.pinnedColumns,null==(n=t.initialState)?void 0:n.pinnedColumns]),p=o.useCallback(((t,n)=>{const r=n.stateToRestore.pinnedColumns;return null!=r&&e.current.setState(Ru(r)),t}),[e]);We(e,"scrollToIndexes",s),We(e,"columnMenu",l),We(e,"canBeReordered",u),We(e,"exportState",d),We(e,"restoreState",p),e.current.registerControlState({stateId:"pinnedColumns",propModel:t.pinnedColumns,propOnChange:t.onPinnedColumnsChange,stateSelector:Xc,changeEvent:"pinnedColumnsChange"});const f=o.useCallback((e=>{if(t.disableColumnPinning)throw new Error(`MUI: You cannot call \`apiRef.current.${e}\` when \`disableColumnPinning\` is true.`)}),[t.disableColumnPinning]),h=o.useCallback(((t,n)=>{if(f("pinColumn"),e.current.isColumnPinned(t)===n)return;const r=n===Yc.right?Yc.left:Yc.right,o={[n]:[...a[n]||[],t],[r]:(a[r]||[]).filter((e=>e!==t))};e.current.setPinnedColumns(o)}),[e,f,a]),m=o.useCallback((t=>{f("unpinColumn"),e.current.setPinnedColumns({left:(a.left||[]).filter((e=>e!==t)),right:(a.right||[]).filter((e=>e!==t))})}),[e,f,a.left,a.right]),g=o.useCallback((()=>(f("getPinnedColumns"),Xc(e.current.state))),[e,f]),v=o.useCallback((t=>{f("setPinnedColumns"),e.current.setState(Ru(t)),e.current.forceUpdate()}),[e,f]),y=o.useCallback((e=>(f("isColumnPinned"),(a.left||[]).includes(e)?Yc.left:!!(a.right||[]).includes(e)&&Yc.right)),[a.left,a.right,f]);xe(e,{pinColumn:h,unpinColumn:m,getPinnedColumns:g,setPinnedColumns:v,isColumnPinned:y},"public");const b=o.useCallback((t=>{if(!e.current.caches.columnPinning.orderedFieldsBeforePinningColumns)return;const{column:n,targetIndex:r,oldIndex:o}=t,a=r>o?1:-1,i=(0,$.JR)(e)[r-a],s=[...e.current.caches.columnPinning.orderedFieldsBeforePinningColumns];let l=s.findIndex((e=>e===n.field)),c=l+a;const u=s.findIndex((e=>e===i));for(;a>0?l<u:l>u;){for(;e.current.isColumnPinned(s[c]);)c+=a;const t=s[l];s[l]=s[c],s[c]=t,l=c,c=l+a}e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=s}),[e]);$e(e,"columnOrderChange",b),o.useEffect((()=>{t.pinnedColumns&&e.current.setPinnedColumns(t.pinnedColumns)}),[e,t.pinnedColumns])})(n,t),((e,t)=>{const n=o.useCallback((n=>{e.current.caches.pinnedRows=zu(n,t.getRowId),e.current.requestPipeProcessorsApplication("hydrateRows")}),[e,t.getRowId]);xe(e,{unstable_setPinnedRows:n},"public");const r=o.useRef(!0);o.useEffect((()=>{r.current?r.current=!1:e.current.unstable_setPinnedRows(t.pinnedRows)}),[e,t.pinnedRows])})(n,t),function(e,t){var n,a;const i=qt(e,"useGridColumns"),s=yr,l=o.useRef(t.columns),c=o.useRef(s);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:$.FY,changeEvent:"columnVisibilityModelChange"});const u=o.useCallback((t=>{i.debug("Updating columns state."),e.current.setState(fr(t)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",t.orderedFields)}),[i,e]),d=o.useCallback((t=>(0,$.gv)(e)[t]),[e]),p=o.useCallback((()=>(0,$.OV)(e)),[e]),f=o.useCallback((()=>(0,$.iv)(e)),[e]),m=o.useCallback((function(t){return(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?(0,$.OV)(e):(0,$.iv)(e)).findIndex((e=>e.field===t))}),[e]),g=o.useCallback((t=>{const n=m(t);return(0,$.Sw)(e)[n]}),[e,m]),v=o.useCallback((t=>{(0,$.FY)(e)!==t&&(e.current.setState((n=>(0,r.A)({},n,{columns:pr({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:t,keepOnlyColumnsToUpsert:!1})}))),e.current.forceUpdate())}),[e,s]),y=o.useCallback((t=>{const n=pr({apiRef:e,columnTypes:s,columnsToUpsert:t,initialState:void 0,keepOnlyColumnsToUpsert:!1});u(n)}),[e,u,s]),b=o.useCallback(((t,n)=>{var o;const a=(0,$.FY)(e);if(n!==(null==(o=a[t])||o)){const o=(0,r.A)({},a,{[t]:n});e.current.setColumnVisibilityModel(o)}}),[e]),w=o.useCallback((t=>(0,$.JR)(e).findIndex((e=>e===t))),[e]),x=o.useCallback(((t,n)=>{const o=(0,$.JR)(e),a=w(t);if(a===n)return;i.debug(`Moving column ${t} to index ${n}`);const s=[...o],l=s.splice(a,1)[0];s.splice(n,0,l),u((0,r.A)({},(0,$.em)(e.current.state),{orderedFields:s}));const c={column:e.current.getColumn(t),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(t),oldIndex:a};e.current.publishEvent("columnIndexChange",c)}),[e,i,u,w]),C=o.useCallback(((t,n)=>{var o,a;i.debug(`Updating column ${t} width to ${n}`);const s=(0,$.em)(e.current.state),l=s.lookup[t],c=(0,r.A)({},l,{width:n,hasBeenResized:!0});u(ur((0,r.A)({},s,{lookup:(0,r.A)({},s.lookup,{[t]:c})}),null!=(o=null==(a=e.current.getRootDimensions())?void 0:a.viewportInnerSize.width)?o:0)),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(t),colDef:c,width:n})}),[e,i,u]),A={setColumnIndex:x};xe(e,{getColumn:d,getAllColumns:p,getColumnIndex:m,getColumnPosition:g,getVisibleColumns:f,getColumnIndexRelativeToVisibleColumns:w,updateColumns:y,setColumnVisibilityModel:v,setColumnVisibility:b,setColumnWidth:C},"public"),xe(e,A,t.signature===Ie.DataGrid?"private":"public");const S=o.useCallback(((n,o)=>{var a,i;const s={},l=(0,$.FY)(e);(!o.exportOnlyDirtyModels||null!=t.columnVisibilityModel||Object.keys(null!=(a=null==(i=t.initialState)||null==(i=i.columns)?void 0:i.columnVisibilityModel)?a:{}).length>0||Object.keys(l).length>0)&&(s.columnVisibilityModel=l),s.orderedFields=(0,$.JR)(e);const c=(0,$.OV)(e),u={};return c.forEach((e=>{if(e.hasBeenResized){const t={};cr.forEach((n=>{let r=e[n];r===1/0&&(r=-1),t[n]=r})),u[e.field]=t}})),Object.keys(u).length>0&&(s.dimensions=u),(0,r.A)({},n,{columns:s})}),[e,t.columnVisibilityModel,null==(n=t.initialState)?void 0:n.columns]),k=o.useCallback(((t,n)=>{var r;const o=null==(r=n.stateToRestore.columns)?void 0:r.columnVisibilityModel,a=n.stateToRestore.columns;if(null==o&&null==a)return t;const i=pr({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:a,columnVisibilityModel:o,keepOnlyColumnsToUpsert:!1});return e.current.setState(fr(i)),null!=a&&e.current.publishEvent("columnsChange",i.orderedFields),t}),[e,s]),M=o.useCallback(((e,n)=>{if(n===vr.columns){var o;const e=t.slots.columnsPanel;return(0,h.jsx)(e,(0,r.A)({},null==(o=t.slotProps)?void 0:o.columnsPanel))}return e}),[t.slots.columnsPanel,null==(a=t.slotProps)?void 0:a.columnsPanel]),E=o.useCallback((e=>t.disableColumnSelector?e:[...e,"columnMenuColumnsItem"]),[t.disableColumnSelector]);We(e,"columnMenu",E),We(e,"exportState",S),We(e,"restoreState",k),We(e,"preferencePanel",M);const R=o.useRef(null);$e(e,"viewportInnerSizeChange",(t=>{R.current!==t.width&&(R.current=t.width,u(ur((0,$.em)(e.current.state),t.width)))}));const P=o.useCallback((()=>{i.info("Columns pipe processing have changed, regenerating the columns");const t=pr({apiRef:e,columnTypes:s,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});u(t)}),[e,i,u,s]);An(e,"hydrateColumns",P);const I=o.useRef(!0);o.useEffect((()=>{if(I.current)return void(I.current=!1);if(i.info(`GridColumns have changed, new length ${t.columns.length}`),l.current===t.columns&&c.current===s)return;const n=pr({apiRef:e,columnTypes:s,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});l.current=t.columns,c.current=s,u(n)}),[i,e,u,t.columns,s]),o.useEffect((()=>{void 0!==t.columnVisibilityModel&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)}),[e,i,t.columnVisibilityModel])}(n,t),xr(n,t),function(e,t){const{getRowId:n}=t,r=o.useCallback((t=>({field:t,colDef:e.current.getColumn(t)})),[e]),a=o.useCallback((t=>{const n=e.current.getRow(t);if(!n)throw new di(`No row with id #${t} found`);return{id:t,columns:e.current.getAllColumns(),row:n}}),[e]),i=o.useCallback(((t,n)=>{const r=e.current.getRow(t),o=e.current.getRowNode(t);if(!r||!o)throw new di(`No row with id #${t} found`);const a=le(e),i=fe(e);return{id:t,field:n,row:r,rowNode:o,value:r[n],colDef:e.current.getColumn(n),cellMode:e.current.getCellMode(t,n),api:e.current,hasFocus:null!==a&&a.field===n&&a.id===t,tabIndex:i&&i.field===n&&i.id===t?0:-1}}),[e]),s=o.useCallback(((t,n)=>{const r=e.current.getColumn(n),o=e.current.getCellValue(t,n),a=e.current.getRow(t),i=e.current.getRowNode(t);if(!a||!i)throw new di(`No row with id #${t} found`);const s=le(e),l=fe(e),c={id:t,field:n,row:a,rowNode:i,colDef:r,cellMode:e.current.getCellMode(t,n),hasFocus:null!==s&&s.field===n&&s.id===t,tabIndex:l&&l.field===n&&l.id===t?0:-1,value:o,formattedValue:o,isEditable:!1};return r&&r.valueFormatter&&(c.formattedValue=r.valueFormatter({id:t,field:c.field,value:c.value,api:e.current})),c.isEditable=r&&e.current.isCellEditable(c),c}),[e]),l=o.useCallback(((t,n)=>{const r=e.current.getColumn(n);if(!r||!r.valueGetter){const r=e.current.getRow(t);if(!r)throw new di(`No row with id #${t} found`);return r[n]}return r.valueGetter(i(t,n))}),[e,i]),c=o.useCallback(((e,t)=>{var r;const o=wt in e?e[wt]:null!=(r=null==n?void 0:n(e))?r:e.id,a=t.field;return t&&t.valueGetter?t.valueGetter(i(o,a)):e[a]}),[i,n]),u=o.useCallback(((t,r)=>{var o;const a=c(t,r);if(!r||!r.valueFormatter)return a;const i=null!=(o=n?n(t):t.id)?o:t[wt],s=r.field;return r.valueFormatter({id:i,field:s,value:a,api:e.current})}),[e,n,c]),d=o.useCallback((t=>e.current.rootElementRef.current?(0,wn.u)(e.current.rootElementRef.current,t):null),[e]),p=o.useCallback((t=>e.current.rootElementRef.current?(0,wn.v_)(e.current.rootElementRef.current,t):null),[e]),f=o.useCallback(((t,n)=>e.current.rootElementRef.current?(0,wn.xE)(e.current.rootElementRef.current,{id:t,field:n}):null),[e]);xe(e,{getCellValue:l,getCellParams:s,getCellElement:f,getRowValue:c,getRowFormattedValue:u,getRowParams:a,getRowElement:p,getColumnHeaderParams:r,getColumnHeaderElement:d},"public")}(n,t),((e,t)=>{const n=(0,c.N)(e,cu),a=(0,c.N)(e,uu),i=o.useCallback(((n,r)=>{if(n.field!==Iu||null==t.getDetailPanelContent)return;const i=a[n.id];o.isValidElement(i)&&r.target!==r.currentTarget&&e.current.toggleDetailPanel(n.id)}),[e,a,t.getDetailPanelContent]),s=o.useCallback(((n,r)=>{null!=t.getDetailPanelContent&&n.field===Iu&&" "===r.key&&e.current.toggleDetailPanel(n.id)}),[e,t.getDetailPanelContent]);$e(e,"cellClick",i),$e(e,"cellKeyDown",s),e.current.registerControlState({stateId:"detailPanels",propModel:t.detailPanelExpandedRowIds,propOnChange:t.onDetailPanelExpandedRowIdsChange,stateSelector:cu,changeEvent:"detailPanelsExpandedRowIdsChange"});const l=o.useCallback((n=>{if(null==t.getDetailPanelContent)return;const r=a[n];if(!o.isValidElement(r))return;const i=e.current.getExpandedDetailPanels();e.current.setExpandedDetailPanels(i.includes(n)?i.filter((e=>e!==n)):[...i,n])}),[e,a,t.getDetailPanelContent]),u=o.useCallback((()=>cu(e.current.state)),[e]),d=o.useCallback((t=>{e.current.setState((e=>(0,r.A)({},e,{detailPanel:(0,r.A)({},e.detailPanel,{expandedRowIds:t})}))),e.current.forceUpdate()}),[e]),p={storeDetailPanelHeight:o.useCallback(((t,n)=>{const o=du(e.current.state);o[t]&&o[t].height!==n&&(e.current.setState((e=>(0,r.A)({},e,{detailPanel:(0,r.A)({},e.detailPanel,{heightCache:(0,r.A)({},o,{[t]:(0,r.A)({},o[t],{height:n})})})}))),e.current.requestPipeProcessorsApplication("rowHeight"))}),[e]),detailPanelHasAutoHeight:o.useCallback((t=>{const n=du(e.current.state);return!!n[t]&&n[t].autoHeight}),[e])};xe(e,{toggleDetailPanel:l,getExpandedDetailPanels:u,setExpandedDetailPanels:d},"public"),xe(e,p,"private"),o.useEffect((()=>{t.detailPanelExpandedRowIds&&cu(e.current.state)!==t.detailPanelExpandedRowIds&&e.current.setExpandedDetailPanels(t.detailPanelExpandedRowIds)}),[e,t.detailPanelExpandedRowIds]);const f=o.useCallback((()=>{e.current.setState((n=>(0,r.A)({},n,{detailPanel:(0,r.A)({},n.detailPanel,$u(e,t.getDetailPanelContent,t.getDetailPanelHeight,n.detailPanel.heightCache))}))),e.current.forceUpdate()}),[e,t.getDetailPanelContent,t.getDetailPanelHeight]);$e(e,"sortedRowsSet",f);const h=o.useRef(),m=o.useRef(),g=o.useCallback((()=>{t.getDetailPanelContent===h.current&&t.getDetailPanelHeight===m.current||(e.current.setState((n=>(0,r.A)({},n,{detailPanel:(0,r.A)({},n.detailPanel,$u(e,t.getDetailPanelContent,t.getDetailPanelHeight,n.detailPanel.heightCache))}))),h.current=t.getDetailPanelContent,m.current=t.getDetailPanelHeight)}),[e,t.getDetailPanelContent,t.getDetailPanelHeight]),v=o.useCallback(((t,r)=>{var o;if(!n||0===n.length||!n.includes(r.id))return t.detail=0,t;g();const a=pu(e);return t.detail=null!=(o=a[r.id])?o:0,t}),[e,n,g]);We(e,"rowHeight",v);const y=o.useRef(!0);y.current&&(y.current=!1,g())})(n,t),(e=>{const t=o.useRef({}),n=o.useCallback(((e,n,r)=>{const o=t.current;o[e]||(o[e]={}),o[e][n]=r}),[]),r=o.useCallback(((e,n)=>{var r;return null==(r=t.current[e])?void 0:r[n]}),[]),a=o.useCallback((t=>{const{columnIndex:r,rowId:o,minFirstColumnIndex:a,maxLastColumnIndex:i,columns:s}=t,l=s.length,c=s[r],u="function"===typeof c.colSpan?c.colSpan(e.current.getCellParams(o,c.field)):c.colSpan;if(!u||1===u)return n(o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let d=c.computedWidth;for(let e=1;e<u;e+=1){const t=r+e;t>=a&&t<i&&(d+=s[t].computedWidth,n(o,r+e,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(r+u,l-1),leftVisibleCellIndex:r})),n(o,r,{spannedByColSpan:!1,cellProps:{colSpan:u,width:d}})}return{colSpan:u}}),[e,n]),i={calculateColSpan:o.useCallback((e=>{let{rowId:t,minFirstColumn:n,maxLastColumn:r,columns:o}=e;for(let i=n;i<r;i+=1){const e=a({columnIndex:i,rowId:t,minFirstColumnIndex:n,maxLastColumnIndex:r,columns:o});e.colSpan>1&&(i+=e.colSpan-1)}}),[a])};xe(e,{unstable_getCellColSpanInfo:r},"public"),xe(e,i,"private");const s=o.useCallback((()=>{t.current={}}),[]);$e(e,"columnOrderChange",s)})(n),((e,t)=>{var n;const a=o.useCallback((t=>{var n;return null!=(n=T(e)[t])?n:[]}),[e]),i=o.useCallback((()=>_(e)),[e]);xe(e,{unstable_getColumnGroupPath:a,unstable_getAllGroupDetails:i},"public");const s=o.useCallback((()=>{var n;const o=$l(null!=(n=t.columnGroupingModel)?n:[]);e.current.setState((e=>{var t,n,a;const i=null!=(t=null==(n=e.columns)?void 0:n.orderedFields)?t:[],s=null!=(a=e.pinnedColumns)?a:{},l=Ol(i,o,s);return(0,r.A)({},e,{columnGrouping:(0,r.A)({},e.columnGrouping,{headerStructure:l})})}))}),[e,t.columnGroupingModel]),l=o.useCallback((n=>{var o,a,i,s;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return;const l=null!=(a=null==(i=(s=e.current).getPinnedColumns)?void 0:i.call(s))?a:{},c=(0,$.JR)(e),u=(0,$.TI)(e),d=_l(null!=n?n:[]),p=$l(null!=n?n:[]),f=Ol(c,p,l),h=0===u.length?0:Math.max(...u.map((e=>{var t,n;return null!=(t=null==(n=p[e])?void 0:n.length)?t:0})));e.current.setState((e=>(0,r.A)({},e,{columnGrouping:{lookup:d,unwrappedGroupingModel:p,headerStructure:f,maxDepth:h}})))}),[e,null==(n=t.experimentalFeatures)?void 0:n.columnGrouping]);$e(e,"columnIndexChange",s),$e(e,"columnsChange",(()=>{l(t.columnGroupingModel)})),$e(e,"columnVisibilityModelChange",(()=>{l(t.columnGroupingModel)})),o.useEffect((()=>{l(t.columnGroupingModel)}),[l,t.columnGroupingModel])})(n,t),Nr(n,t),((e,t)=>{const n=qt(e,"useGridFocus"),a=o.useRef(null),i=o.useCallback(((t,n)=>{t&&e.current.getRow(t.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(t.id,t.field),n)}),[e]),s=o.useCallback(((t,o)=>{const a=le(e);(null==a?void 0:a.id)===t&&(null==a?void 0:a.field)===o||(e.current.setState((e=>(n.debug(`Focusing on cell with id=${t} and field=${o}`),(0,r.A)({},e,{tabIndex:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:t,field:o},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))),e.current.forceUpdate(),e.current.getRow(t)&&(a&&i(a,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(t,o))))}),[e,n,i]),l=o.useCallback((function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=le(e);i(a,o),e.current.setState((e=>(n.debug(`Focusing on column header with colIndex=${t}`),(0,r.A)({},e,{tabIndex:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:t},columnHeaderFilter:null,cell:null,columnGroupHeader:null}})))),e.current.forceUpdate()}),[e,n,i]),c=o.useCallback((function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=le(e);i(a,o),e.current.setState((e=>(n.debug(`Focusing on column header filter with colIndex=${t}`),(0,r.A)({},e,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:t},cell:null,columnGroupHeader:null}})))),e.current.forceUpdate()}),[e,n,i]),u=o.useCallback((function(t,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=le(e);a&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(a.id,a.field),o),e.current.setState((e=>(0,r.A)({},e,{tabIndex:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:t,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null}}))),e.current.forceUpdate()}),[e]),d=o.useCallback((()=>de(e)),[e]),p=o.useCallback(((n,r,o)=>{let a=e.current.getColumnIndex(r);const i=(0,$.iv)(e),s=vn(e,{pagination:t.pagination,paginationMode:t.paginationMode}),l=(0,L.$2)(e),c=[].concat(l.top||[],s.rows,l.bottom||[]);let u=c.findIndex((e=>e.id===n));"right"===o?a+=1:"left"===o?a-=1:u+=1,a>=i.length?(u+=1,u<c.length&&(a=0)):a<0&&(u-=1,u>=0&&(a=i.length-1)),u=(0,we.qE)(u,0,c.length-1);const d=c[u];if(!d)return;const p=e.current.unstable_getCellColSpanInfo(d.id,a);p&&p.spannedByColSpan&&("left"===o||"below"===o?a=p.leftVisibleCellIndex:"right"===o&&(a=p.rightVisibleCellIndex)),a=(0,we.qE)(a,0,i.length-1);const f=i[a];e.current.setCellFocus(d.id,f.field)}),[e,t.pagination,t.paginationMode]),f=o.useCallback((t=>{let{id:n,field:r}=t;e.current.setCellFocus(n,r)}),[e]),h=o.useCallback(((t,n)=>{"Enter"===n.key||"Tab"===n.key||"Shift"===n.key||Ze(n.key)||e.current.setCellFocus(t.id,t.field)}),[e]),m=o.useCallback(((t,n)=>{let{field:r}=t;n.target===n.currentTarget&&e.current.setColumnHeaderFocus(r,n)}),[e]),g=o.useCallback(((t,n)=>{let{fields:r,depth:o}=t;if(n.target!==n.currentTarget)return;const a=de(e);null!==a&&a.depth===o&&r.includes(a.field)||e.current.setColumnGroupHeaderFocus(r[0],o,n)}),[e]),v=o.useCallback(((t,o)=>{var a;null!=(a=o.relatedTarget)&&a.className.includes(S.x.columnHeader)||(n.debug("Clearing focus"),e.current.setState((e=>(0,r.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))))}),[n,e]),y=o.useCallback((e=>{a.current=e}),[]),b=o.useCallback((t=>{const n=a.current;a.current=null;const o=le(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:t,cell:n}))return;if(!o)return void(n&&e.current.setCellFocus(n.id,n.field));if((null==n?void 0:n.id)===o.id&&(null==n?void 0:n.field)===o.field)return;const s=e.current.getCellElement(o.id,o.field);null!=s&&s.contains(t.target)||(n?e.current.setCellFocus(n.id,n.field):(e.current.setState((e=>(0,r.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),i(o,t)))}),[e,i]),w=o.useCallback((t=>{if("view"===t.cellMode)return;const n=le(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]),x=o.useCallback((()=>{const t=le(e);t&&!e.current.getRow(t.id)&&e.current.setState((e=>(0,r.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))}),[e]),C=(0,Qt.A)((()=>{const n=le(e);if(!n)return;const o=vn(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(o.rows.find((e=>e.id===n.id)))return;const a=(0,$.iv)(e);e.current.setState((e=>(0,r.A)({},e,{tabIndex:{cell:{id:o.rows[0].id,field:a[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}})))})),A={moveFocusToRelativeCell:p,setColumnGroupHeaderFocus:u,getColumnGroupHeaderFocus:d};xe(e,{setCellFocus:s,setColumnHeaderFocus:l,setColumnHeaderFilterFocus:c},"public"),xe(e,A,"private"),o.useEffect((()=>{const t=(0,Jt.A)(e.current.rootElementRef.current);return t.addEventListener("mouseup",b),()=>{t.removeEventListener("mouseup",b)}}),[e,b]),$e(e,"columnHeaderBlur",v),$e(e,"cellDoubleClick",f),$e(e,"cellMouseDown",y),$e(e,"cellKeyDown",h),$e(e,"cellModeChange",w),$e(e,"columnHeaderFocus",m),$e(e,"columnGroupHeaderFocus",g),$e(e,"rowsSet",x),$e(e,"paginationModelChange",C)})(n,t),((e,t)=>{var n;const a=qt(e,"useGridPreferencesPanel"),i=o.useRef(),s=o.useRef(),l=o.useCallback((()=>{a.debug("Hiding Preferences Panel");const t=Tr(e.current.state);t.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:t.openedPanelValue}),e.current.setState((e=>(0,r.A)({},e,{preferencePanel:{open:!1}}))),e.current.forceUpdate()}),[e,a]),c=o.useCallback((()=>{s.current=setTimeout((()=>clearTimeout(i.current)),0)}),[]),u=o.useCallback((()=>{i.current=setTimeout(l,100)}),[l]),d=o.useCallback(((t,n,o)=>{a.debug("Opening Preferences Panel"),c(),e.current.setState((e=>(0,r.A)({},e,{preferencePanel:(0,r.A)({},e.preferencePanel,{open:!0,openedPanelValue:t,panelId:n,labelId:o})}))),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:t}),e.current.forceUpdate()}),[a,c,e]);xe(e,{showPreferences:d,hidePreferences:u},"public");const p=o.useCallback(((n,o)=>{var a;const i=Tr(e.current.state);return!o.exportOnlyDirtyModels||null!=(null==(a=t.initialState)?void 0:a.preferencePanel)||i.open?(0,r.A)({},n,{preferencePanel:i}):n}),[e,null==(n=t.initialState)?void 0:n.preferencePanel]),f=o.useCallback(((t,n)=>{const o=n.stateToRestore.preferencePanel;return null!=o&&e.current.setState((e=>(0,r.A)({},e,{preferencePanel:o}))),t}),[e]);We(e,"exportState",p),We(e,"restoreState",f),o.useEffect((()=>()=>{clearTimeout(i.current),clearTimeout(s.current)}),[])})(n,t),((e,t)=>{var n,a;const i=qt(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Y,changeEvent:"filterModelChange"});const s=o.useCallback((()=>{e.current.setState((n=>{const o=Y(n,e.current.instanceId),a="client"===t.filterMode?(0,Vr.Fv)(o,e,t.disableEval):null,i=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:a,filterModel:null!=o?o:(0,Lr.T)()}),s=(0,r.A)({},n,{filter:(0,r.A)({},n.filter,i)}),l=Br(e,s);return(0,r.A)({},s,{visibleRowsLookup:l})})),e.current.publishEvent("filteredRowsSet")}),[e,t.filterMode,t.disableEval]),l=o.useCallback(((e,n)=>null==n||!1===n.filterable||t.disableColumnFilter?e:[...e,"columnMenuFilterItem"]),[t.disableColumnFilter]),c=o.useCallback((()=>{s(),e.current.forceUpdate()}),[e,s]),u=o.useCallback((t=>{const n=Y(e),o=[...n.items],a=o.findIndex((e=>e.id===t.id));-1===a?o.push(t):o[a]=t,e.current.setFilterModel((0,r.A)({},n,{items:o}),"upsertFilterItem")}),[e]),d=o.useCallback((t=>{const n=Y(e),o=[...n.items];t.forEach((e=>{const n=t.findIndex((t=>t.id===e.id));-1===n?o.push(e):o[n]=e})),e.current.setFilterModel((0,r.A)({},n,{items:t}),"upsertFilterItems")}),[e]),p=o.useCallback((t=>{const n=Y(e),o=n.items.filter((e=>e.id!==t.id));o.length!==n.items.length&&e.current.setFilterModel((0,r.A)({},n,{items:o}),"deleteFilterItem")}),[e]),f=o.useCallback(((n,o,a)=>{if(i.debug("Displaying filter panel"),n){const o=Y(e),a=o.items.filter((t=>{var n;if(void 0!==t.value)return!Array.isArray(t.value)||0!==t.value.length;const r=null==(n=e.current.getColumn(t.field).filterOperators)?void 0:n.find((e=>e.value===t.operator));return!("undefined"===typeof(null==r?void 0:r.requiresFilterValue)||(null==r?void 0:r.requiresFilterValue))}));let i;const s=a.find((e=>e.field===n)),l=e.current.getColumn(n);i=s?a:t.disableMultipleColumnsFiltering?[(0,Vr.zk)({field:n,operator:l.filterOperators[0].value},e)]:[...a,(0,Vr.zk)({field:n,operator:l.filterOperators[0].value},e)],e.current.setFilterModel((0,r.A)({},o,{items:i}))}e.current.showPreferences(vr.filters,o,a)}),[e,i,t.disableMultipleColumnsFiltering]),m=o.useCallback((()=>{i.debug("Hiding filter panel"),e.current.hidePreferences()}),[e,i]),g=o.useCallback((t=>{const n=Y(e);n.logicOperator!==t&&e.current.setFilterModel((0,r.A)({},n,{logicOperator:t}),"changeLogicOperator")}),[e]),v=o.useCallback((t=>{const n=Y(e);(0,we.Hv)(n.quickFilterValues,t)||e.current.setFilterModel((0,r.A)({},n,{quickFilterValues:[...t]}))}),[e]),y={setFilterLogicOperator:g,unstable_applyFilters:c,deleteFilterItem:p,upsertFilterItem:u,upsertFilterItems:d,setFilterModel:o.useCallback(((n,r)=>{Y(e)!==n&&(i.debug("Setting filter model"),e.current.updateControlState("filter",(0,Vr.zU)(n,t.disableMultipleColumnsFiltering,e),r),e.current.unstable_applyFilters())}),[e,i,t.disableMultipleColumnsFiltering]),showFilterPanel:f,hideFilterPanel:m,setQuickFilterValues:v,ignoreDiacritics:t.ignoreDiacritics};xe(e,y,"public");const b=o.useCallback(((n,o)=>{var a;const i=Y(e);return o.exportOnlyDirtyModels&&null==t.filterModel&&null==(null==(a=t.initialState)||null==(a=a.filter)?void 0:a.filterModel)&&(0,we.Hv)(i,(0,Lr.T)())?n:(0,r.A)({},n,{filter:{filterModel:i}})}),[e,t.filterModel,null==(n=t.initialState)||null==(n=n.filter)?void 0:n.filterModel]),w=o.useCallback(((n,o)=>{var a;const i=null==(a=o.stateToRestore.filter)?void 0:a.filterModel;return null==i?n:(e.current.updateControlState("filter",(0,Vr.zU)(i,t.disableMultipleColumnsFiltering,e),"restoreState"),(0,r.A)({},n,{callbacks:[...n.callbacks,e.current.unstable_applyFilters]}))}),[e,t.disableMultipleColumnsFiltering]),C=o.useCallback(((e,n)=>{if(n===vr.filters){var o;const e=t.slots.filterPanel;return(0,h.jsx)(e,(0,r.A)({},null==(o=t.slotProps)?void 0:o.filterPanel))}return e}),[t.slots.filterPanel,null==(a=t.slotProps)?void 0:a.filterPanel]),{getRowId:A}=t,S=(0,Fr.n)(Gr),k=o.useCallback((n=>{if("client"!==t.filterMode||!n.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const r=(0,L.rI)(e),o={},{isRowMatchingFilters:a}=n,i={},s={passingFilterItems:null,passingQuickFilterValues:null},l=S.current(e.current.state.rows.dataRowIdToModelLookup);for(let t=0;t<l.length;t+=1){const r=l[t],c=A?A(r):r.id;a(r,void 0,s);const u=(0,Vr.Ko)([s.passingFilterItems],[s.passingQuickFilterValues],n.filterModel,e,i);o[c]=u}const c="auto-generated-group-footer-root";return r[c]&&(o[c]=!0),{filteredRowsLookup:o,filteredDescendantCountLookup:{}}}),[e,t.filterMode,A,S]);We(e,"columnMenu",l),We(e,"exportState",b),We(e,"restoreState",w),We(e,"preferencePanel",C),Wt(e,ze,"filtering",k),Wt(e,ze,"visibleRowsLookupCreation",Hr);const M=o.useCallback((()=>{i.debug("onColUpdated - GridColumns changed, applying filters");const t=Y(e),n=(0,$.U8)(e),o=t.items.filter((e=>e.field&&n[e.field]));o.length<t.items.length&&e.current.setFilterModel((0,r.A)({},t,{items:o}))}),[e,i]),E=o.useCallback((t=>{"filtering"===t&&e.current.unstable_applyFilters()}),[e]),R=o.useCallback((()=>{e.current.setState((t=>(0,r.A)({},t,{visibleRowsLookup:Br(e,t)}))),e.current.forceUpdate()}),[e]);$e(e,"rowsSet",s),$e(e,"columnsChange",M),$e(e,"activeStrategyProcessorChange",E),$e(e,"rowExpansionChange",R),$e(e,"columnVisibilityModelChange",(()=>{const t=Y(e);t.quickFilterValues&&t.quickFilterExcludeHiddenColumns&&e.current.unstable_applyFilters()})),Ge((()=>{e.current.unstable_applyFilters()})),(0,x.A)((()=>{void 0!==t.filterModel&&e.current.setFilterModel(t.filterModel)}),[e,i,t.filterModel])})(n,t),((e,t)=>{var n;const a=qt(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:K.XU,changeEvent:"sortModelChange"});const i=o.useCallback(((t,n)=>{const r=(0,K.XU)(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]),s=o.useCallback(((n,o)=>{var a;const i=(0,K.XU)(e).find((e=>e.field===n.field));if(i){var s;const e=void 0===o?(0,_t.Hm)(null!=(s=n.sortingOrder)?s:t.sortingOrder,i.sort):o;return null==e?void 0:(0,r.A)({},i,{sort:e})}return{field:n.field,sort:void 0===o?(0,_t.Hm)(null!=(a=n.sortingOrder)?a:t.sortingOrder):o}}),[e,t.sortingOrder]),l=o.useCallback(((e,n)=>null==n||!1===n.sortable?e:(n.sortingOrder||t.sortingOrder).some((e=>!!e))?[...e,"columnMenuSortItem"]:e),[t.sortingOrder]),c=o.useCallback((()=>{e.current.setState((n=>{if("server"===t.sortingMode)return a.debug("Skipping sorting rows as sortingMode = server"),(0,r.A)({},n,{sorting:(0,r.A)({},n.sorting,{sortedRows:Et((0,L.qj)(e),bt,!1)})});const o=(0,K.XU)(n,e.current.instanceId),i=(0,_t.Lj)(o,e),s=e.current.applyStrategyProcessor("sorting",{sortRowList:i});return(0,r.A)({},n,{sorting:(0,r.A)({},n.sorting,{sortedRows:s})})})),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()}),[e,a,t.sortingMode]),u=o.useCallback((n=>{(0,K.XU)(e)!==n&&(a.debug("Setting sort model"),e.current.setState((0,_t.ps)(n,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())}),[e,a,t.disableMultipleColumnsSorting]),d=o.useCallback(((n,r,o)=>{if(!n.sortable)return;const a=s(n,r);let l;l=!o||t.disableMultipleColumnsSorting?a?[a]:[]:i(n.field,a),e.current.setSortModel(l)}),[e,i,s,t.disableMultipleColumnsSorting]),p=o.useCallback((()=>(0,K.XU)(e)),[e]),f=o.useCallback((()=>(0,K.J6)(e).map((e=>e.model))),[e]),h=o.useCallback((()=>(0,K.RJ)(e)),[e]),m=o.useCallback((t=>e.current.getSortedRowIds()[t]),[e]);xe(e,{getSortModel:p,getSortedRows:f,getSortedRowIds:h,getRowIdFromRowIndex:m,setSortModel:u,sortColumn:d,applySorting:c},"public");const g=o.useCallback(((n,o)=>{var a;const i=(0,K.XU)(e);return!o.exportOnlyDirtyModels||null!=t.sortModel||null!=(null==(a=t.initialState)||null==(a=a.sorting)?void 0:a.sortModel)||i.length>0?(0,r.A)({},n,{sorting:{sortModel:i}}):n}),[e,t.sortModel,null==(n=t.initialState)||null==(n=n.sorting)?void 0:n.sortModel]),v=o.useCallback(((n,o)=>{var a;const i=null==(a=o.stateToRestore.sorting)?void 0:a.sortModel;return null==i?n:(e.current.setState((0,_t.ps)(i,t.disableMultipleColumnsSorting)),(0,r.A)({},n,{callbacks:[...n.callbacks,e.current.applySorting]}))}),[e,t.disableMultipleColumnsSorting]),y=o.useCallback((t=>{const n=(0,L.qj)(e),r=n[bt],o=t.sortRowList?t.sortRowList(r.children.map((e=>n[e]))):[...r.children];return null!=r.footerId&&o.push(r.footerId),o}),[e]);We(e,"exportState",g),We(e,"restoreState",v),Wt(e,ze,"sorting",y);const b=o.useCallback(((e,t)=>{let{colDef:n}=e;const r=t.shiftKey||t.metaKey||t.ctrlKey;d(n,void 0,r)}),[d]),w=o.useCallback(((e,t)=>{let{colDef:n}=e;!Ke(t.key)||t.ctrlKey||t.metaKey||d(n,void 0,t.shiftKey)}),[d]),C=o.useCallback((()=>{const t=(0,K.XU)(e),n=(0,$.gv)(e);if(t.length>0){const r=t.filter((e=>n[e.field]));r.length<t.length&&e.current.setSortModel(r)}}),[e]),A=o.useCallback((t=>{"sorting"===t&&e.current.applySorting()}),[e]);We(e,"columnMenu",l),$e(e,"columnHeaderClick",b),$e(e,"columnHeaderKeyDown",w),$e(e,"rowsSet",e.current.applySorting),$e(e,"columnsChange",C),$e(e,"activeStrategyProcessorChange",A),Ge((()=>{e.current.applySorting()})),(0,x.A)((()=>{void 0!==t.sortModel&&e.current.setSortModel(t.sortModel)}),[e,t.sortModel])})(n,t),((e,t)=>{const n=qt(e,"useDensity"),a=o.useCallback((t=>{n.debug(`Set grid density to ${t}`),e.current.setState((e=>{const n=I(e),o={value:t,factor:Wr[t]};return(0,we.Hv)(n,o)?e:(0,r.A)({},e,{density:o})})),e.current.forceUpdate()}),[n,e]);o.useEffect((()=>{e.current.setDensity(t.density)}),[e,t.density]),xe(e,{setDensity:a},"public")})(n,t),pc(n,t),((e,t)=>{const n=qt(e,"useGridColumnResize"),a=o.useRef(),i=o.useRef(),s=o.useRef(),l=o.useRef(),c=o.useRef(),u=(0,Zt.A)(),d=o.useRef(),p=o.useRef(),f=(0,Pn.Z)(),h=o.useRef(),m=e=>{n.debug(`Updating width to ${e} for col ${a.current.field}`);const t=i.current.offsetWidth,r=e-t;a.current.computedWidth=e,a.current.width=e,a.current.flex=0,i.current.style.width=`${e}px`,i.current.style.minWidth=`${e}px`,i.current.style.maxWidth=`${e}px`;const o=s.current;o&&(o.style.width=`${e}px`,o.style.minWidth=`${e}px`,o.style.maxWidth=`${e}px`),[...c.current,...l.current].forEach((t=>{const n=t;let o;o="1"===n.getAttribute("aria-colspan")?`${e}px`:`${n.offsetWidth+r}px`,n.style.width=o,n.style.minWidth=o,n.style.maxWidth=o}))},g=t=>{C(),a.current&&(e.current.setColumnWidth(a.current.field,a.current.width),n.debug(`Updating col ${a.current.field} with new width: ${a.current.width}`)),f.start(0,(()=>{e.current.publishEvent("columnResizeStop",null,t)}))},v=(0,Qt.A)(g),y=(0,Qt.A)((t=>{if(0===t.buttons)return void v(t);let n=wc(d.current,t.clientX,i.current.getBoundingClientRect(),p.current);n=(0,we.qE)(n,a.current.minWidth,a.current.maxWidth),m(n);const r={element:i.current,colDef:a.current,width:n};e.current.publishEvent("columnResize",r,t)})),b=(0,Qt.A)((e=>{bc(e,h.current)&&g(e)})),w=(0,Qt.A)((t=>{const n=bc(t,h.current);if(!n)return;if("mousemove"===t.type&&0===t.buttons)return void b(t);let r=wc(d.current,n.x,i.current.getBoundingClientRect(),p.current);r=(0,we.qE)(r,a.current.minWidth,a.current.maxWidth),m(r);const o={element:i.current,colDef:a.current,width:r};e.current.publishEvent("columnResize",o,t)})),x=(0,Qt.A)((t=>{var r,o;if(!(0,wn.fl)(t.target,S.x["columnSeparator--resizable"]))return;yc()||t.preventDefault();const s=t.changedTouches[0];null!=s&&(h.current=s.identifier),i.current=(0,wn.fl)(t.target,S.x.columnHeader);const f=i.current.getAttribute("data-field"),m=e.current.getColumn(f);l.current=hc(null==(r=e.current.columnHeadersContainerElementRef)?void 0:r.current,f),n.debug(`Start Resize on col ${m.field}`),e.current.publishEvent("columnResizeStart",{field:f},t),a.current=m,i.current=function(e,t){return e.querySelector(`[data-field="${t}"]`)}(null==(o=e.current.columnHeadersElementRef)?void 0:o.current,m.field),c.current=mc(i.current,e.current),p.current=Cc(t.target,u.direction),d.current=xc(s.clientX,i.current.getBoundingClientRect(),p.current);const g=(0,Jt.A)(t.currentTarget);g.addEventListener("touchmove",w),g.addEventListener("touchend",b)})),C=o.useCallback((()=>{const t=(0,Jt.A)(e.current.rootElementRef.current);t.body.style.removeProperty("cursor"),t.removeEventListener("mousemove",y),t.removeEventListener("mouseup",v),t.removeEventListener("touchmove",w),t.removeEventListener("touchend",b),setTimeout((()=>{t.removeEventListener("click",Ac,!0)}),100),i.current&&(i.current.style.pointerEvents="unset")}),[e,i,y,v,w,b]),A=o.useCallback((t=>{let{field:n}=t;e.current.setState((e=>(0,r.A)({},e,{columnResize:(0,r.A)({},e.columnResize,{resizingColumnField:n})}))),e.current.forceUpdate()}),[e]),k=o.useCallback((()=>{e.current.setState((e=>(0,r.A)({},e,{columnResize:(0,r.A)({},e.columnResize,{resizingColumnField:""})}))),e.current.forceUpdate()}),[e]),M=(0,Qt.A)(((t,r)=>{let{colDef:o}=t;var f,h,m;if(0!==r.button)return;if(!r.currentTarget.classList.contains(S.x["columnSeparator--resizable"]))return;r.preventDefault(),n.debug(`Start Resize on col ${o.field}`),e.current.publishEvent("columnResizeStart",{field:o.field},r),a.current=o,i.current=null==(f=e.current.columnHeadersContainerElementRef)?void 0:f.current.querySelector(`[data-field="${o.field}"]`);const g=null==(h=e.current.headerFiltersElementRef)?void 0:h.current;g&&(s.current=g.querySelector(`[data-field="${o.field}"]`)),l.current=hc(null==(m=e.current.columnHeadersContainerElementRef)?void 0:m.current,o.field),c.current=mc(i.current,e.current);const b=(0,Jt.A)(e.current.rootElementRef.current);b.body.style.cursor="col-resize",p.current=Cc(r.currentTarget,u.direction),d.current=xc(r.clientX,i.current.getBoundingClientRect(),p.current),b.addEventListener("mousemove",y),b.addEventListener("mouseup",v),b.addEventListener("click",Ac,!0)})),E=(0,Qt.A)(((n,o)=>{if(t.disableAutosize)return;if(0!==o.button)return;const a=e.current.state.columns.lookup[n.field];!1!==a.resizable&&e.current.autosizeColumns((0,r.A)({},t.autosizeOptions,{columns:[a.field]}))})),R=Sc(e),P=o.useRef(!1),I=o.useCallback((async t=>{var n,o;if(!(null==(n=e.current.rootElementRef)?void 0:n.current))return;if(P.current)return;P.current=!0;const a=(0,$.em)(e.current.state),i=(0,r.A)({},gc,t,{columns:null!=(o=null==t?void 0:t.columns)?o:a.orderedFields});i.columns=i.columns.filter((e=>!1!==a.columnVisibilityModel[e]));const s=i.columns.map((t=>e.current.state.columns.lookup[t]));try{e.current.unstable_setColumnVirtualization(!1),await R();const t=kc(e,i,s),n=s.map((e=>(0,r.A)({},e,{width:t[e.field],computedWidth:t[e.field]})));if(i.expand){var l,c;const r=a.orderedFields.map((e=>a.lookup[e])).filter((e=>!1!==a.columnVisibilityModel[e.field])).reduce(((e,n)=>{var r,o;return e+(null!=(r=null!=(o=t[n.field])?o:n.computedWidth)?r:n.width)}),0),o=(null!=(l=null==(c=e.current.getRootDimensions())?void 0:c.viewportInnerSize.width)?l:0)-r;if(o>0){const e=o/(n.length||1);n.forEach((t=>{t.width+=e,t.computedWidth+=e}))}}e.current.updateColumns(n)}finally{e.current.unstable_setColumnVirtualization(!0),P.current=!1}}),[e,R]);o.useEffect((()=>C),[C]),(0,fc.y)((()=>{t.autosizeOnMount&&Promise.resolve().then((()=>{e.current.autosizeColumns(t.autosizeOptions)}))})),oc(e,(()=>{var t;return null==(t=e.current.columnHeadersElementRef)?void 0:t.current}),"touchstart",x,{passive:yc()}),xe(e,{autosizeColumns:I},"public"),$e(e,"columnResizeStop",k),$e(e,"columnResizeStart",A),$e(e,"columnSeparatorMouseDown",M),$e(e,"columnSeparatorDoubleClick",E),Te(e,"columnResize",t.onColumnResize),Te(e,"columnWidthChange",t.onColumnWidthChange)})(n,t),((e,t)=>{var n;const a=qt(e,"useGridPagination"),i=(0,c.N)(e,oe),s=(0,c.N)(e,N),l=Math.floor(t.rowHeight*s);e.current.registerControlState({stateId:"pagination",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:ut,changeEvent:"paginationModelChange"});const u=o.useCallback((t=>{const n=ut(e);t!==n.page&&(a.debug(`Setting page to ${t}`),e.current.setPaginationModel({page:t,pageSize:n.pageSize}))}),[e,a]),d=o.useCallback((t=>{const n=ut(e);t!==n.pageSize&&(a.debug(`Setting page size to ${t}`),e.current.setPaginationModel({pageSize:t,page:n.page}))}),[e,a]),p=o.useCallback((n=>{var r;n!==ut(e)&&(a.debug("Setting 'paginationModel' to",n),e.current.updateControlState("pagination",qr(null!=(r=t.rowCount)?r:i,t.signature,n),"setPaginationModel"),e.current.forceUpdate())}),[e,a,t.rowCount,t.signature,i]);xe(e,{setPage:u,setPageSize:d,setPaginationModel:p},"public");const f=o.useCallback(((n,o)=>{var a;const i=ut(e);return!o.exportOnlyDirtyModels||null!=t.paginationModel||null!=(null==(a=t.initialState)||null==(a=a.pagination)?void 0:a.paginationModel)||0!==i.page&&i.pageSize!==(t.autoPageSize?0:100)?(0,r.A)({},n,{pagination:(0,r.A)({},n.pagination,{paginationModel:i})}):n}),[e,t.paginationModel,null==(n=t.initialState)||null==(n=n.pagination)?void 0:n.paginationModel,t.autoPageSize]),h=o.useCallback(((n,o)=>{var a,s,l;const c=null!=(a=o.stateToRestore.pagination)&&a.paginationModel?(0,r.A)({},st(t.autoPageSize),null==(s=o.stateToRestore.pagination)?void 0:s.paginationModel):ut(e);return e.current.updateControlState("pagination",qr(null!=(l=t.rowCount)?l:i,t.signature,c),"stateRestorePreProcessing"),n}),[e,t.autoPageSize,t.rowCount,t.signature,i]);We(e,"exportState",f),We(e,"restoreState",h);const m=o.useCallback((()=>{const n=e.current.getRootDimensions();if(!t.autoPageSize||!n)return;const r=Rt(e),o=Math.floor((n.viewportInnerSize.height-r.top-r.bottom)/l);e.current.setPageSize(o)}),[e,t.autoPageSize,l]);$e(e,"viewportInnerSizeChange",m),$e(e,"paginationModelChange",(()=>{var t;const n=ut(e);null!=(t=e.current.virtualScrollerRef)&&t.current&&e.current.scrollToIndexes({rowIndex:n.page*n.pageSize}),e.current.forceUpdate()})),o.useEffect((()=>{}),[t.rowCount,t.paginationMode]),o.useEffect((()=>{var n;e.current.updateControlState("pagination",qr(null!=(n=t.rowCount)?n:i,t.signature,t.paginationModel))}),[e,t.paginationModel,t.rowCount,t.paginationMode,i,t.signature]),o.useEffect((()=>{m()}),[m])})(n,t),((e,t)=>{const{getRowHeight:n,getRowSpacing:a,getEstimatedRowHeight:i}=t,s=o.useRef(Object.create(null)),l=o.useRef(-1),u=o.useRef(!1),d=(0,c.N)(e,N),p=(0,c.N)(e,Y),f=(0,c.N)(e,ct),h=(0,c.N)(e,K.XU),m=yn(e,t),g=(0,c.N)(e,L.$2),v=Pl(t.rowHeight,El.rowHeight),b=Math.floor(v*d),w=o.useCallback((()=>{var t,o;u.current=!1;const c=t=>{s.current[t.id]||(s.current[t.id]={sizes:{baseCenter:b},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:o,needsFirstMeasurement:l,sizes:c}=s.current[t.id];let p="number"===typeof b&&b>0?b:52;const f=c.baseCenter;if(o)p=f;else if(n){const e=n((0,r.A)({},t,{densityFactor:d}));if("auto"===e){if(l){const e=i?i((0,r.A)({},t,{densityFactor:d})):b;p=null!=e?e:b}else p=f;u.current=!0,s.current[t.id].autoHeight=!0}else p=Pl(e,b),s.current[t.id].needsFirstMeasurement=!1,s.current[t.id].autoHeight=!1}else s.current[t.id].needsFirstMeasurement=!1;const h={};for(const e in c)/^base[A-Z]/.test(e)&&(h[e]=c[e]);if(h.baseCenter=p,a){var g,v;const n=e.current.getRowIndexRelativeToVisibleRows(t.id),o=a((0,r.A)({},t,{isFirstVisible:0===n,isLastVisible:n===m.rows.length-1,indexRelativeToCurrentPage:n}));h.spacingTop=null!=(g=o.top)?g:0,h.spacingBottom=null!=(v=o.bottom)?v:0}const y=e.current.unstable_applyPipeProcessors("rowHeight",h,t);return s.current[t.id].sizes=y,y},p=[],f=m.rows.reduce(((e,t)=>{p.push(e);let n=0,r=0;const o=c(t);for(const a in o){const e=o[a];/^base[A-Z]/.test(a)?n=e>n?e:n:r+=e}return e+n+r}),0);null==g||null==(t=g.top)||t.forEach((e=>{c(e)})),null==g||null==(o=g.bottom)||o.forEach((e=>{c(e)})),e.current.setState((e=>(0,r.A)({},e,{rowsMeta:{currentPageTotalHeight:f,positions:p}}))),u.current||(l.current=1/0),e.current.forceUpdate()}),[e,m.rows,b,n,a,i,g,d]),x=o.useCallback((e=>{const t=s.current[e];return t?t.sizes.baseCenter:b}),[b]),C=o.useCallback(((e,t)=>{s.current[e].sizes.baseCenter=t,s.current[e].isResized=!0,s.current[e].needsFirstMeasurement=!1,w()}),[w]),A=o.useMemo((()=>(0,Yr.A)(w,t.rowPositionsDebounceMs)),[w,t.rowPositionsDebounceMs]),S=o.useCallback(((e,t,n)=>{if(!s.current[e]||!s.current[e].autoHeight)return;const r=s.current[e].sizes[`base${(0,y.A)(n)}`]!==t;s.current[e].needsFirstMeasurement=!1,s.current[e].sizes[`base${(0,y.A)(n)}`]=t,r&&A()}),[A]),k=o.useCallback((e=>{var t;return(null==(t=s.current[e])?void 0:t.autoHeight)||!1}),[]),M=o.useCallback((()=>l.current),[]),E=o.useCallback((e=>{u.current&&e>l.current&&(l.current=e)}),[]),R=o.useCallback((()=>{s.current={},w()}),[w]);o.useEffect((()=>{w()}),[b,p,f,h,w]),An(e,"rowHeight",w);const P={getLastMeasuredRowIndex:M,rowHasAutoHeight:k};xe(e,{unstable_setLastMeasuredRowIndex:E,unstable_getRowHeight:x,unstable_getRowInternalSizes:e=>{var t;return null==(t=s.current[e])?void 0:t.sizes},unstable_setRowHeight:C,unstable_storeRowHeightMeasurement:S,resetRowHeights:R},"public"),xe(e,P,"private")})(n,t),Fu(n,t),((e,t)=>{const n=(0,Zt.A)(),r=qt(e,"useGridScroll"),a=e.current.columnHeadersElementRef,i=e.current.virtualScrollerRef,s=(0,c.N)(e,Q),l=o.useCallback((n=>{const o=(0,L.H0)(e),a=(0,$.iv)(e);if(null!=n.rowIndex&&0===o||0===a.length)return!1;r.debug(`Scrolling to cell at row ${n.rowIndex}, col: ${n.colIndex} `);let l={};if(null!=n.colIndex){const t=(0,$.Sw)(e);let r;if("undefined"!==typeof n.rowIndex){var c;const t=null==(c=s[n.rowIndex])?void 0:c.id,o=e.current.unstable_getCellColSpanInfo(t,n.colIndex);o&&!o.spannedByColSpan&&(r=o.cellProps.width)}"undefined"===typeof r&&(r=a[n.colIndex].computedWidth),l.left=Wl({clientHeight:i.current.clientWidth,scrollTop:Math.abs(i.current.scrollLeft),offsetHeight:r,offsetTop:t[n.colIndex]})}if(null!=n.rowIndex){var u,d;const r=Fi(e.current.state),o=dt(e),a=pt(e),s=t.pagination?n.rowIndex-o*a:n.rowIndex,c=r.positions[s+1]?r.positions[s+1]-r.positions[s]:r.currentPageTotalHeight-r.positions[s],p=(null==(u=i.current.querySelector(`.${S.x["pinnedRows--top"]}`))?void 0:u.clientHeight)||0,f=(null==(d=i.current.querySelector(`.${S.x["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;l.top=Wl({clientHeight:i.current.clientHeight-p-f,scrollTop:i.current.scrollTop,offsetHeight:c,offsetTop:r.positions[s]})}return l=e.current.unstable_applyPipeProcessors("scrollToIndexes",l,n),(void 0!==typeof l.left||void 0!==typeof l.top)&&(e.current.scroll(l),!0)}),[r,e,i,t.pagination,s]),u=o.useCallback((e=>{if(i.current&&null!=e.left&&a.current){const t="rtl"===n.direction?-1:1;a.current.scrollLeft=e.left,i.current.scrollLeft=t*e.left,r.debug(`Scrolling left: ${e.left}`)}i.current&&null!=e.top&&(i.current.scrollTop=e.top,r.debug(`Scrolling top: ${e.top}`)),r.debug("Scrolling, updating container, and viewport")}),[i,n.direction,a,r]),d=o.useCallback((()=>null!=i&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0}),[i]);xe(e,{scroll:u,scrollToIndexes:l,getScrollPosition:d},"public")})(n,t),((e,t)=>{const n=(0,c.N)(e,$.iv),r=yn(e,t),a=(0,c.N)(e,Fi),i=Math.max(a.currentPageTotalHeight,1),s=o.useRef(!1),l=o.useCallback((o=>{const a=e.current.getRootDimensions();if(!a||"client"!==t.rowsLoadingMode)return;const l=o.top+a.viewportOuterSize.height,c=e.current.getViewportPageSize();if(l<i-t.scrollEndThreshold&&(s.current=!1),l>=i-t.scrollEndThreshold&&!s.current){const t={visibleColumns:n,viewportPageSize:c,visibleRowsCount:r.rows.length};e.current.publishEvent("rowsScrollEnd",t),s.current=!0}}),[i,t.scrollEndThreshold,t.rowsLoadingMode,n,e,r.rows.length]),u=o.useCallback((e=>{let{left:t,top:n}=e;l({left:t,top:n})}),[l]);$e(e,"scrollPositionChange",u),Te(e,"rowsScrollEnd",t.onRowsScrollEnd)})(n,t),((e,t)=>{var n;const r=yn(e,t),a=(0,c.N)(e,K.XU),i=(0,c.N)(e,Y),s=o.useRef({firstRowToRender:0,lastRowToRender:0}),{lazyLoading:l}=null!=(n=t.experimentalFeatures)?n:{},u=o.useCallback((()=>{const n=e.current.getRenderContext(),[o,a]=Wi({firstIndex:n.firstRowIndex,lastIndex:n.lastRowIndex,minFirstIndex:0,maxLastIndex:r.rows.length,buffer:t.rowBuffer});return{firstRowToRender:o,lastRowToRender:a}}),[e,t.rowBuffer,r.rows.length]),d=o.useCallback((n=>{const o=e.current.getRootDimensions();if(Vu({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:o}))return;const c={firstRowToRender:n.firstRowToRender,lastRowToRender:n.lastRowToRender,sortModel:a,filterModel:i};if(s.current.firstRowToRender!==n.firstRowToRender||s.current.lastRowToRender!==n.lastRowToRender){if(0===a.length&&0===i.items.length){const t=function(e){let{apiRef:t,visibleRows:n,range:r}=e,{firstRowIndex:o,lastRowIndex:a}=r;const i=n.slice(r.firstRowIndex,r.lastRowIndex);let s=0,l=i.length-1,c=!1;for(;!c&&o<a;){var u,d;const e="skeletonRow"===(null==(u=t.current.getRowNode(i[s].id))?void 0:u.type),n="skeletonRow"===(null==(d=t.current.getRowNode(i[l].id))?void 0:d.type);e&&n&&(c=!0),e||(s+=1,o+=1),n||(l-=1,a-=1)}return c?{firstRowIndex:o,lastRowIndex:a}:void 0}({apiRef:e,visibleRows:r.rows,range:{firstRowIndex:n.firstRowToRender,lastRowIndex:n.lastRowToRender}});if(!t)return;c.firstRowToRender=t.firstRowIndex,c.lastRowToRender=t.lastRowIndex}s.current=n,e.current.publishEvent("fetchRows",c)}}),[e,t.rowsLoadingMode,a,i,r.rows,l]),p=o.useCallback((n=>{const r=e.current.getRootDimensions();if(Vu({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:r}))return;e.current.requestPipeProcessorsApplication("hydrateRows");const{firstRowToRender:o,lastRowToRender:a}=u(),s={firstRowToRender:o,lastRowToRender:a,sortModel:n,filterModel:i};e.current.publishEvent("fetchRows",s)}),[e,t.rowsLoadingMode,i,l,u]),f=o.useCallback((n=>{const r=e.current.getRootDimensions();if(Vu({lazyLoadingFeatureFlag:l,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:r}))return;e.current.requestPipeProcessorsApplication("hydrateRows");const{firstRowToRender:o,lastRowToRender:i}=u(),s={firstRowToRender:o,lastRowToRender:i,sortModel:a,filterModel:n};e.current.publishEvent("fetchRows",s)}),[e,t.rowsLoadingMode,a,l,u]);$e(e,"renderedRowsIntervalChange",d),$e(e,"sortModelChange",p),$e(e,"filterModelChange",f),Te(e,"fetchRows",t.onFetchRows)})(n,t),(e=>{const t=qt(e,"useGridColumnMenu"),n=o.useCallback((n=>{e.current.setState((e=>e.columnMenu.open&&e.columnMenu.field===n?e:(t.debug("Opening Column Menu"),(0,r.A)({},e,{columnMenu:{open:!0,field:n}}))))&&(e.current.hidePreferences(),e.current.forceUpdate())}),[e,t]),a=o.useCallback((()=>{const n=ve(e.current.state);if(n.field){const t=(0,$.gv)(e),r=(0,$.FY)(e),o=(0,$.JR)(e);let a=n.field;if(t[a]||(a=o[0]),!1===r[a]){const e=o.filter((e=>e===a||!1!==r[e])),t=e.indexOf(a);a=e[t+1]||e[t-1]}e.current.setColumnHeaderFocus(a)}e.current.setState((e=>e.columnMenu.open||void 0!==e.columnMenu.field?(t.debug("Hiding Column Menu"),(0,r.A)({},e,{columnMenu:(0,r.A)({},e.columnMenu,{open:!1,field:void 0})})):e))&&e.current.forceUpdate()}),[e,t]),i=o.useCallback((r=>{t.debug("Toggle Column Menu");const o=ve(e.current.state);o.open&&o.field===r?a():n(r)}),[e,t,n,a]);xe(e,{showColumnMenu:n,hideColumnMenu:a,toggleColumnMenu:i},"public"),$e(e,"columnResizeStart",a),$e(e,"virtualScrollerWheel",e.current.hideColumnMenu),$e(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)})(n),nc(n,t),rc(n,t),ic(n,t),function(e,t){const n=qt(e,"useResizeContainer"),r=o.useRef(!1),a=o.useRef(null),i=o.useRef(null),s=(0,c.N)(e,Fi),l=(0,c.N)(e,N),u=Math.floor(t.rowHeight*l),d=gr(e,t.columnHeaderHeight),p=o.useCallback((()=>{var n;const r=null==(n=e.current.rootElementRef)?void 0:n.current,o=(0,$.fc)(e),l=Rt(e);if(!a.current)return;let c,u,p,f;if(null!=t.scrollbarSize)c=t.scrollbarSize;else if(o&&r){const e=(0,Jt.A)(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(o)>Math.round(a.current.width),u={width:a.current.width,height:s.currentPageTotalHeight+(p?c:0)};else{u={width:a.current.width,height:Math.max(a.current.height-d,0)};const e=(e=>{let{content:t,container:n,scrollBarSize:r}=e;const o=t.width>n.width,a=t.height>n.height;let i=!1,s=!1;return(o||a)&&(i=o,s=t.height+(i?r:0)>n.height,s&&(i=t.width+r>n.width)),{hasScrollX:i,hasScrollY:s}})({content:{width:Math.round(o),height:s.currentPageTotalHeight},container:{width:Math.round(u.width),height:u.height-l.top-l.bottom},scrollBarSize:c});f=e.hasScrollY,p=e.hasScrollX}const h={viewportOuterSize:u,viewportInnerSize:{width:u.width-(f?c:0),height:u.height-(p?c:0)},hasScrollX:p,hasScrollY:f,scrollBarSize:c},m=i.current;i.current=h,h.viewportInnerSize.width===(null==m?void 0:m.viewportInnerSize.width)&&h.viewportInnerSize.height===(null==m?void 0:m.viewportInnerSize.height)||e.current.publishEvent("viewportInnerSizeChange",h.viewportInnerSize)}),[e,t.scrollbarSize,t.autoHeight,s.currentPageTotalHeight,d]),[f,h]=o.useState(),m=o.useMemo((()=>(0,Yr.A)(h,60)),[]),g=o.useRef();(0,x.A)((()=>{f&&(p(),e.current.publishEvent("debouncedResize",a.current))}),[e,f,p]);const v=o.useCallback((()=>{e.current.computeSizeAndPublishResizeEvent()}),[e]),y=o.useCallback((()=>i.current),[]),b=o.useCallback((()=>{const n=e.current.getRootDimensions();if(!n)return 0;const r=vn(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const t=e.current.getRenderContext(),n=t.lastRowIndex-t.firstRowIndex;return Math.min(n-1,r.rows.length)}const o=Math.floor(n.viewportInnerSize.height/u);return Math.min(o,r.rows.length)}),[e,t.pagination,t.paginationMode,t.getRowHeight,u]),w=o.useCallback((()=>{var t,n,r;const o=null==(t=e.current.mainElementRef)?void 0:t.current;if(!o)return;const a=(0,sc.A)(o).getComputedStyle(o),i=parseFloat(a.height)||0,s=parseFloat(a.width)||0,l=i!==(null==(n=g.current)?void 0:n.height),c=s!==(null==(r=g.current)?void 0:r.width);if(!g.current||l||c){const t={width:s,height:i};e.current.publishEvent("resize",t),g.current=t}}),[e]),C={getViewportPageSize:b,updateGridDimensionsRef:p,computeSizeAndPublishResizeEvent:w};xe(e,{resize:v,getRootDimensions:y},"public"),xe(e,C,"private");const A=o.useRef(!0),S=o.useCallback((e=>{a.current=e;const o=/jsdom/.test(window.navigator.userAgent);if(0!==e.height||r.current||t.autoHeight||o||(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||o||(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),A.current)return h(e),void(A.current=!1);m(e)}),[t.autoHeight,m,n]);(0,x.A)((()=>p()),[p]),Te(e,"sortedRowsSet",p),Te(e,"paginationModelChange",p),Te(e,"columnsChange",p),$e(e,"resize",S),Te(e,"debouncedResize",t.onResize)}(n,t),function(e,t){Te(e,"columnHeaderClick",t.onColumnHeaderClick),Te(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),Te(e,"columnHeaderOver",t.onColumnHeaderOver),Te(e,"columnHeaderOut",t.onColumnHeaderOut),Te(e,"columnHeaderEnter",t.onColumnHeaderEnter),Te(e,"columnHeaderLeave",t.onColumnHeaderLeave),Te(e,"cellClick",t.onCellClick),Te(e,"cellDoubleClick",t.onCellDoubleClick),Te(e,"cellKeyDown",t.onCellKeyDown),Te(e,"preferencePanelClose",t.onPreferencePanelClose),Te(e,"preferencePanelOpen",t.onPreferencePanelOpen),Te(e,"menuOpen",t.onMenuOpen),Te(e,"menuClose",t.onMenuClose),Te(e,"rowDoubleClick",t.onRowDoubleClick),Te(e,"rowClick",t.onRowClick),Te(e,"stateChange",t.onStateChange)}(n,t),(e=>{const t=o.useCallback((function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.current.unstable_applyPipeProcessors("exportState",{},t)}),[e]),n=o.useCallback((t=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:t}).callbacks.forEach((e=>{e()})),e.current.forceUpdate()}),[e]);xe(e,{exportState:t,restoreState:n},"public")})(n),function(e,t){const n=t=>{e.current.setState((e=>(0,r.A)({},e,{virtualization:(0,r.A)({},e.virtualization,{enabled:t})})))},a={unstable_setVirtualization:n,unstable_setColumnVirtualization:t=>{e.current.setState((e=>(0,r.A)({},e,{virtualization:(0,r.A)({},e.virtualization,{enabledForColumns:t})})))}};xe(e,a,"public"),o.useEffect((()=>{n(!t.disableVirtualization)}),[t.disableVirtualization])}(n,t),n},Wu={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",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\u2026",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",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"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","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorEquals:"Equals",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",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"},Uu=["components","componentsProps"];function Ku(e){var t;const n=Object.keys(e);if(!n.some((e=>e.startsWith("aria-")||e.startsWith("data-"))))return e;const r={},o=null!=(t=e.forwardedProps)?t:{};for(let a=0;a<n.length;a+=1){const t=n[a];t.startsWith("aria-")||t.startsWith("data-")?o[t]=e[t]:r[t]=e[t]}return r.forwardedProps=o,r}const qu=(0,r.A)({},As,{columnMenuPinningItem:function(e){const{colDef:t,onClick:n}=e,r=Nc(),a=(0,Dc.A)(),i=(0,Zt.A)(),s=o.useCallback((e=>o=>{r.current.pinColumn(t.field,e),n(o)}),[r,t.field,n]),l=e=>{r.current.unpinColumn(t.field),n(e)},c=(0,h.jsxs)(No.A,{onClick:s(Yc.left),children:[(0,h.jsx)(ms,{children:(0,h.jsx)(a.slots.columnMenuPinLeftIcon,{fontSize:"small"})}),(0,h.jsx)(bs,{children:r.current.getLocaleText("pinToLeft")})]}),u=(0,h.jsxs)(No.A,{onClick:s(Yc.right),children:[(0,h.jsx)(ms,{children:(0,h.jsx)(a.slots.columnMenuPinRightIcon,{fontSize:"small"})}),(0,h.jsx)(bs,{children:r.current.getLocaleText("pinToRight")})]});if(!t)return null;const d=r.current.isColumnPinned(t.field);if(d){const e=d===Yc.right?Yc.left:Yc.right,t=e===Yc.right?"pinToRight":"pinToLeft",n=d===Yc.right?a.slots.columnMenuPinLeftIcon:a.slots.columnMenuPinRightIcon;return(0,h.jsxs)(o.Fragment,{children:[(0,h.jsxs)(No.A,{onClick:s(e),children:[(0,h.jsx)(ms,{children:(0,h.jsx)(n,{fontSize:"small"})}),(0,h.jsx)(bs,{children:r.current.getLocaleText(t)})]}),(0,h.jsxs)(No.A,{onClick:l,children:[(0,h.jsx)(ms,{}),(0,h.jsx)(bs,{children:r.current.getLocaleText("unpin")})]})]})}return"rtl"===i.direction?(0,h.jsxs)(o.Fragment,{children:[u,c]}):(0,h.jsxs)(o.Fragment,{children:[c,u]})}}),Yu=(0,r.A)({},Ss,{columnMenuPinningItem:{displayOrder:15}}),Xu=o.forwardRef((function(e,t){return(0,h.jsx)(ks,(0,r.A)({ref:t},e,{defaultSlots:qu,defaultSlotProps:Yu}))})),Zu=["getColumnsToRender","getRootProps"],Qu=(0,G.A)("div",{name:"MuiDataGrid",slot:"HeaderFilterRow",overridesResolver:(e,t)=>t.headerFilterRow})((()=>({display:"flex"}))),Ju=Object.create(null),ed=e=>{const t=p(),{headerGroupingMaxDepth:n,hasOtherElementInTabSequence:a}=e,i=(0,c.N)(t,me),s=Zi((0,r.A)({},e,{hasOtherElementInTabSequence:a||null!==i})),{getColumnsToRender:l,getRootProps:u}=s,d=(0,g.A)(s,Zu),f=o.useRef(null);t.current.register("private",{headerFiltersElementRef:f});const m=o.useRef(null),v=(0,Dc.A)(),y=(e=>{const{classes:t}=e;return o.useMemo((()=>(0,b.A)({headerFilterRow:["headerFilterRow"]},S.B,t)),[t])})(v),w=!v.unstable_headerFilters,x=Math.floor(v.columnHeaderHeight*e.densityFactor),C=(0,c.N)(t,Y),A=gr(t,v.columnHeaderHeight)+(w?0:x),k=(0,c.N)(t,ue),M=o.useCallback((e=>{const t=null==C?void 0:C.items.find((t=>t.field===e.field&&"isAnyOf"!==t.operator));if(null!=t)return t;const n=Ju[e.field];if(null!=n)return n;const r=_a(e);return Ju[e.field]=r,r}),[C]),E={minHeight:A,maxHeight:A,lineHeight:`${x}px`};return(0,r.A)({},d,{getColumnFilters:function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(w)return null;const a=l(t);if(null==a)return null;const{renderedColumns:s,firstColumnToRender:c}=a,u=[];for(let n=0;n<s.length;n+=1){var d,p,g;const t=s[n],a=c+n,l=(null==k?void 0:k.field)===t.field,f=0===a,y=(null==i?void 0:i.field)===t.field||f&&!e.hasOtherElementInTabSequence?0:-1,b="function"===typeof t.headerClassName?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,w=null!=(d=null==(p=t.filterOperators)?void 0:p.filter((e=>"isAnyOf"!==e.value)))?d:[],C=M(t);u.push((0,h.jsx)(v.slots.headerFilterCell,(0,r.A)({colIndex:a,height:x,width:t.computedWidth,colDef:t,hasFocus:l,tabIndex:y,headerFilterMenuRef:m,headerClassName:b,filterOperators:w,"data-field":t.field,item:C},null==(g=v.slotProps)?void 0:g.headerFilterCell,o),`${t.field}-filter`))}return(0,h.jsx)(Qu,{ref:f,ownerState:v,className:y.headerFilterRow,role:"row","aria-rowindex":n+2,children:u})},getRootProps:w?u:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.A)({style:E},e)}})},td=(0,G.A)("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${S.x["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${S.x["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})((()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${S.x["scrollArea--left"]}`]:{left:0},[`&.${S.x["scrollArea--right"]}`]:{right:0}})));function nd(e){const{scrollDirection:t}=e,n=o.useRef(null),a=(0,Qe.h)(),i=(0,Pn.Z)(),[s,l]=o.useState(!1),[u,d]=o.useState(!0),p=(0,c.N)(a,N),f=(0,c.N)(a,$.fc),m=o.useRef({left:0,top:0}),g=(0,Dc.A)(),y=(0,r.A)({},g,{scrollDirection:t}),w=(e=>{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return(0,b.A)(r,S.B,n)})(y),x=gr(a,g.columnHeaderHeight),C=Math.floor(g.columnHeaderHeight*p),A=o.useCallback((e=>{m.current=e;const n=a.current.getRootDimensions();d((()=>{if("left"===t)return m.current.left>0;if("right"===t){const e=f-n.viewportInnerSize.width;return m.current.left<e}return!1}))}),[a,f,t]),k=o.useCallback((e=>{let r;if(e.preventDefault(),"left"===t)r=e.clientX-n.current.getBoundingClientRect().right;else{if("right"!==t)throw new Error("MUI: Wrong drag direction");r=Math.max(1,e.clientX-n.current.getBoundingClientRect().left)}r=1.5*(r-1)+1,i.start(0,(()=>{a.current.scroll({left:m.current.left+r,top:m.current.top})}))}),[t,a,i]),M=(0,Qt.A)((()=>{l(!0)})),E=(0,Qt.A)((()=>{l(!1)}));return $e(a,"scrollPositionChange",A),$e(a,"columnHeaderDragStart",M),$e(a,"columnHeaderDragEnd",E),s&&u?(0,h.jsx)(td,{ref:n,className:(0,v.A)(w.root),ownerState:y,onDragOver:k,style:{height:C,top:x-C}}):null}const rd=o.memo(nd),od=["style","className","innerRef","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence","pinnedColumns"],ad=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,t/100},id=(0,A.Ay)("div",{name:"MuiDataGrid",slot:"PinnedColumnHeaders",overridesResolver:(e,t)=>[{[`&.${S.x["pinnedColumnHeaders--left"]}`]:t["pinnedColumnHeaders--left"]},{[`&.${S.x["pinnedColumnHeaders--right"]}`]:t["pinnedColumnHeaders--right"]},t.pinnedColumnHeaders]})((e=>{let{theme:t,ownerState:n}=e;var o;return(0,r.A)({position:"absolute",top:0,overflow:"hidden",zIndex:1,display:"flex",flexDirection:"column",boxShadow:t.shadows[2],backgroundColor:(t.vars||t).palette.background.default},t.vars?{backgroundImage:null==(o=t.vars.overlays)?void 0:o[2]}:(0,r.A)({},"dark"===t.palette.mode&&{backgroundImage:`linear-gradient(${(0,C.X4)("#fff",ad(2))}, ${(0,C.X4)("#fff",ad(2))})`}),n.side===Yc.left&&{left:0},n.side===Yc.right&&{right:0},n.side===Yc.right&&n.showCellVerticalBorder&&{borderLeftWidth:"1px",borderLeftStyle:"solid"})}));id.propTypes={ownerState:i().object.isRequired};const sd=o.forwardRef((function(e,t){const{className:n,innerRef:a,visibleColumns:i,sortColumnLookup:s,filterColumnLookup:l,columnPositions:c,columnHeaderTabIndexState:u,columnGroupHeaderTabIndexState:d,columnHeaderFocus:p,columnGroupHeaderFocus:f,densityFactor:m,headerGroupingMaxDepth:v,columnMenuState:y,columnVisibility:w,columnGroupsHeaderStructure:x,hasOtherElementInTabSequence:C,pinnedColumns:A}=e,k=(0,g.A)(e,od),M=(0,Dc.A)(),E=Nc(),[R,P]=o.useState(0),I=(0,Zt.A)(),D=(0,Qt.A)((()=>{const e=E.current.getRootDimensions();if(!e)return;const t=e.hasScrollY?e.scrollBarSize:0;R!==t&&P(t)}));$e(E,"virtualScrollerContentSizeChange",D);const N=o.useMemo((()=>i.map((e=>{let{field:t}=e;return t}))),[i]),[$,O]=vu(A,N,"rtl"===I.direction),{isDragging:T,renderContext:_,getRootProps:j,getInnerProps:F,getColumnHeaders:L,getColumnFilters:V,getColumnGroupHeaders:z}=ed({innerRef:a,visibleColumns:i,sortColumnLookup:s,filterColumnLookup:l,columnPositions:c,columnHeaderTabIndexState:u,hasOtherElementInTabSequence:C,columnGroupHeaderTabIndexState:d,columnHeaderFocus:p,columnGroupHeaderFocus:f,densityFactor:m,headerGroupingMaxDepth:v,columnMenuState:y,columnVisibility:w,columnGroupsHeaderStructure:x,minColumnIndex:$.length}),H=(0,r.A)({},M,{leftPinnedColumns:$,rightPinnedColumns:O,classes:M.classes}),B=(e=>{const{leftPinnedColumns:t,rightPinnedColumns:n,classes:r}=e,o={leftPinnedColumns:["pinnedColumnHeaders",t&&t.length>0&&"pinnedColumnHeaders--left"],rightPinnedColumns:["pinnedColumnHeaders",n&&n.length>0&&"pinnedColumnHeaders--right","withBorderColor"]};return(0,b.A)(o,S.B,r)})(H),G=_&&$.length?(0,r.A)({},_,{firstColumnIndex:0,lastColumnIndex:$.length}):null,W=_&&O.length?(0,r.A)({},_,{firstColumnIndex:N.length-O.length,lastColumnIndex:N.length}):null,U=F(),K={role:U.role};return(0,h.jsxs)(es,(0,r.A)({ref:t,className:n},j(k),{children:[G&&(0,h.jsxs)(id,(0,r.A)({className:B.leftPinnedColumns,ownerState:(0,r.A)({},H,{side:Yc.left,showCellVerticalBorder:M.showCellVerticalBorder})},K,{children:[z({renderContext:G,minFirstColumn:G.firstColumnIndex,maxLastColumn:G.lastColumnIndex}),L({renderContext:G,minFirstColumn:G.firstColumnIndex,maxLastColumn:G.lastColumnIndex},{disableReorder:!0}),V({renderContext:G,minFirstColumn:G.firstColumnIndex,maxLastColumn:G.lastColumnIndex})]})),(0,h.jsx)(rd,{scrollDirection:"left"}),(0,h.jsxs)(rs,(0,r.A)({isDragging:T},U,{children:[z({renderContext:_,minFirstColumn:$.length,maxLastColumn:N.length-O.length}),L({renderContext:_,minFirstColumn:$.length,maxLastColumn:N.length-O.length}),V({renderContext:_,minFirstColumn:$.length,maxLastColumn:N.length-O.length})]})),(0,h.jsx)(rd,{scrollDirection:"right"}),W&&(0,h.jsxs)(id,(0,r.A)({ownerState:(0,r.A)({},H,{side:Yc.right,showCellVerticalBorder:M.showCellVerticalBorder}),className:B.rightPinnedColumns,style:{paddingRight:R}},K,{children:[z({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex}),L({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex},{disableReorder:!0,separatorSide:Ni.Left}),V({renderContext:W,minFirstColumn:W.firstColumnIndex,maxLastColumn:W.lastColumnIndex})]}))]}))}));const ld=["operators","item","field","buttonRef","headerFilterMenuRef"],cd={width:22,height:22,margin:"auto 0 10px 5px"};function ud(e){var t;const{operators:n,item:a,field:i,buttonRef:s,headerFilterMenuRef:l}=e,c=(0,g.A)(e,ld),u=(0,$t.A)(),d=(0,$t.A)(),p=(0,Dc.A)(),f=(0,Qe.h)(),m=Boolean(zl(f)===i&&l.current);return p.slots.headerFilterMenu?(0,h.jsxs)(o.Fragment,{children:[(0,h.jsx)(p.slots.baseIconButton,(0,r.A)({id:u,ref:s,"aria-label":f.current.getLocaleText("filterPanelOperator"),title:f.current.getLocaleText("filterPanelOperator"),"aria-controls":d,"aria-expanded":m?"true":void 0,"aria-haspopup":"true",tabIndex:-1,size:"small",onClick:e=>{l.current=e.currentTarget,f.current.showHeaderFilterMenu(i)},sx:cd},null==(t=p.slotProps)?void 0:t.baseIconButton,{children:(0,h.jsx)(p.slots.openFilterButtonIcon,{fontSize:"small"})})),(0,h.jsx)(p.slots.headerFilterMenu,(0,r.A)({field:i,open:m,item:a,target:l.current,operators:n,labelledBy:u,id:d},c))]}):null}const dd={padding:"2px"};function pd(e){let{onClick:t}=e;var n;const o=(0,Dc.A)();return(0,h.jsx)(o.slots.baseIconButton,(0,r.A)({tabIndex:-1,"aria-label":"Clear filter",size:"small",onClick:t,sx:dd},null==(n=o.slotProps)?void 0:n.baseIconButton,{children:(0,h.jsx)(o.slots.columnMenuClearIcon,{fontSize:"inherit"})}))}const fd=["colIndex","height","hasFocus","filterOperators","width","headerClassName","colDef","item","headerFilterMenuRef","InputComponentProps","showClearIcon"],hd={'& input[value=""]:not(:focus)':{color:"transparent"}},md=o.forwardRef(((e,t)=>{var n,a,i;const{colIndex:s,height:l,hasFocus:c,filterOperators:u,width:d,headerClassName:f,colDef:m,item:x,headerFilterMenuRef:C,InputComponentProps:A,showClearIcon:k=!0}=e,M=(0,g.A)(e,fd),E=p(),R=(0,$.TI)(E),P=(0,Dc.A)(),I=o.useRef(null),D=(0,w.A)(t,I),N=o.useRef(null),O=o.useRef(null),T=Vl(E)===m.field,_=zl(E)===m.field,j=u[0],F=m.filterable?j.InputComponent:null,L=o.useCallback((e=>{!x.value||e.value?E.current.upsertFilterItem(e):E.current.deleteFilterItem(e)}),[E,x]),V=o.useCallback((()=>{E.current.deleteFilterItem(x)}),[E,x]);let z;m.renderHeaderFilter&&(z=m.renderHeaderFilter(e)),o.useLayoutEffect((()=>{if(c&&!_){let e=I.current.querySelector('[tabindex="0"]');T&&F&&(e=N.current);const t=e||I.current;null==t||t.focus(),E.current.columnHeadersContainerElementRef.current.scrollLeft=0}}),[F,E,c,T,_]);const H=o.useCallback((e=>{if(!_&&!Ze(e.key))switch(e.key){case"Escape":T&&E.current.stopHeaderFilterEditMode();break;case"Enter":if(T){E.current.stopHeaderFilterEditMode();break}if(e.metaKey||e.ctrlKey){C.current=O.current,E.current.showHeaderFilterMenu(m.field);break}E.current.startHeaderFilterEditMode(m.field);break;case"Tab":if(T){var t;const n=null!=(t=R[s+(e.shiftKey?-1:1)])?t:null;n&&(E.current.startHeaderFilterEditMode(n),E.current.setColumnHeaderFilterFocus(n,e))}break;default:if(T||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)break;E.current.startHeaderFilterEditMode(m.field)}}),[E,m.field,s,R,C,T,_]),B=o.useCallback(((e,t)=>n=>{E.current.publishEvent(e,E.current.getColumnHeaderParams(m.field),n),t&&t(n)}),[E,m.field]),G=o.useCallback((e=>{c||(N.current&&N.current.contains(e.target)&&N.current.focus(),E.current.setColumnHeaderFilterFocus(m.field,e))}),[E,m.field,c]),W=o.useMemo((()=>({onKeyDown:B("headerFilterKeyDown",H),onClick:B("headerFilterClick"),onMouseDown:B("headerFilterMouseDown",G),onBlur:B("headerFilterBlur")})),[G,H,B]),U=(e=>{const{colDef:t,classes:n,showColumnVerticalBorder:r}=e,o={root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight","withBorderColor",r&&"columnHeader--withRightBorder"]};return(0,b.A)(o,S.B,n)})((0,r.A)({},P,{colDef:m})),K=!1===(null==u||null==(n=u.find((e=>{let{value:t}=e;return x.operator===t})))?void 0:n.requiresFilterValue),q=Boolean(null==x?void 0:x.value)||K,Y=null!=(a=j.headerLabel)?a:E.current.getLocaleText(`headerFilterOperator${(0,y.A)(x.operator)}`),X=q||c;return(0,h.jsxs)("div",(0,r.A)({className:(0,v.A)(U.root,f),ref:D,style:{height:l,width:d,minWidth:d,maxWidth:d},role:"columnheader","aria-colindex":s+1,"aria-label":null==z?null!=(i=m.headerName)?i:m.field:void 0},M,W,{children:[z,F&&void 0===z?(0,h.jsxs)(o.Fragment,{children:[(0,h.jsx)(F,(0,r.A)({apiRef:E,item:x,inputRef:N,applyValue:L,onFocus:()=>E.current.startHeaderFilterEditMode(m.field),onBlur:e=>{var t;E.current.stopHeaderFilterEditMode(),null!=(t=e.relatedTarget)&&t.className.includes("columnHeader")||E.current.setState((e=>(0,r.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},label:(0,y.A)(Y),placeholder:"",isFilterActive:X,clearButton:k&&q?(0,h.jsx)(pd,{onClick:V}):null,disabled:K,tabIndex:-1,InputLabelProps:null,sx:"date"===m.type||"dateTime"===m.type?hd:void 0},K?{value:""}:{},null==j?void 0:j.InputComponentProps,A)),(0,h.jsx)(ud,{operators:u,item:x,field:m.field,applyFilterChanges:L,headerFilterMenuRef:C,buttonRef:O})]}):null]}))})),gd={ColumnMenuPinRightIcon:(0,Ps.A)((0,h.jsx)("g",{transform:"rotate(-30 15 10)",children:(0,h.jsx)("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinRight"),ColumnMenuPinLeftIcon:(0,Ps.A)((0,h.jsx)("g",{transform:"rotate(30 8 12)",children:(0,h.jsx)("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinLeft")},vd=(0,r.A)({},gd),yd=(0,r.A)({},kl,vd,{ColumnMenu:Xu,ColumnHeaders:sd,HeaderFilterCell:md,HeaderFilterMenu:function(e){let{open:t,field:n,target:a,applyFilterChanges:i,operators:s,item:l,id:c,labelledBy:u}=e;const d=(0,Qe.h)(),p=o.useCallback((()=>{d.current.hideHeaderFilterMenu()}),[d]),f=o.useCallback((e=>{"Tab"===e.key&&e.preventDefault(),"Escape"!==e.key&&"Tab"!==e.key||p()}),[p]);return a?(0,h.jsx)(cn,{placement:"bottom-end",open:t,target:a,onClose:p,children:(0,h.jsx)(Xt.A,{"aria-labelledby":u,id:c,onKeyDown:f,children:s.map(((e,o)=>{var a;const s=null!=(a=null==e?void 0:e.headerLabel)?a:d.current.getLocaleText(`headerFilterOperator${(0,y.A)(e.value)}`);return(0,h.jsx)(No.A,{onClick:()=>{i((0,r.A)({},l,{operator:e.value})),p()},autoFocus:0===o&&t,selected:e.value===l.operator,children:s},`${n}-${e.value}`)}))})}):null}}),bd=(0,r.A)({},El,{scrollEndThreshold:80,treeData:!1,defaultGroupingExpansionDepth:0,autosizeOnMount:!1,disableAutosize:!1,disableColumnPinning:!1,keepColumnPositionIfDraggedOutside:!1,disableChildrenFiltering:!1,disableChildrenSorting:!1,rowReordering:!1,rowsLoadingMode:"client",getDetailPanelHeight:()=>500,unstable_headerFilters:!1}),wd=Ml(yd),xd=e=>{const[t,n,a]=(i=(0,eo.A)({props:e,name:"MuiDataGrid"}),o.useMemo((()=>{const{components:e,componentsProps:t}=i;return[e,t,Ku((0,g.A)(i,Uu))]}),[i]));var i;const s=o.useMemo((()=>(0,r.A)({},Wu,a.localeText)),[a.localeText]),l=o.useMemo((()=>function(e){let{defaultSlots:t,slots:n,components:o}=e;const a=null!=n?n:o?Ml(o):null;if(!a||0===Object.keys(a).length)return t;const i=(0,r.A)({},t);return Object.keys(a).forEach((e=>{const t=e;void 0!==a[t]&&(i[t]=a[t])})),i}({defaultSlots:wd,slots:a.slots,components:t})),[t,a.slots]);return o.useMemo((()=>{var e;return(0,r.A)({},bd,a,{localeText:s,slots:l,slotProps:null!=(e=a.slotProps)?e:n,signature:"DataGridPro"})}),[a,s,l,n])},Cd="MTcwMzIyMTIwMDAwMA==",Ad=o.forwardRef((function(e,t){const n=xd(e),o=Gu(n.apiRef,n);(0,s.L)("x-data-grid-pro",Cd);const a=(0,c.N)(o,Xc);return(0,h.jsx)(m,{privateApiRef:o,props:n,children:(0,h.jsxs)(H,(0,r.A)({className:n.className,style:n.style,sx:n.sx,ref:t},n.forwardedProps,{children:[(0,h.jsx)(B,{}),(0,h.jsx)(ye,{VirtualScrollerComponent:Mu,ColumnHeadersProps:{pinnedColumns:a},children:(0,h.jsx)(l.n,{packageName:"x-data-grid-pro",releaseInfo:Cd})}),(0,h.jsx)(be,{})]}))})})),Sd=o.memo(Ad);Ad.propTypes={apiRef:i().shape({current:i().object.isRequired}),"aria-label":i().string,"aria-labelledby":i().string,autoHeight:i().bool,autoPageSize:i().bool,autosizeOnMount:i().bool,autosizeOptions:i().shape({columns:i().arrayOf(i().string),expand:i().bool,includeHeaders:i().bool,includeOutliers:i().bool,outliersFactor:i().number}),cellModesModel:i().object,checkboxSelection:i().bool,checkboxSelectionVisibleOnly:(i().bool,()=>null),classes:i().object,clipboardCopyCellDelimiter:i().string,columnBuffer:i().number,columnGroupingModel:i().arrayOf(i().object),columnHeaderHeight:i().number,columns:i().arrayOf(i().object).isRequired,columnThreshold:i().number,columnVisibilityModel:i().object,components:i().object,componentsProps:i().object,defaultGroupingExpansionDepth:i().number,density:i().oneOf(["comfortable","compact","standard"]),detailPanelExpandedRowIds:i().arrayOf(i().oneOfType([i().number,i().string]).isRequired),disableAutosize:i().bool,disableChildrenFiltering:i().bool,disableChildrenSorting:i().bool,disableColumnFilter:i().bool,disableColumnMenu:i().bool,disableColumnPinning:i().bool,disableColumnReorder:i().bool,disableColumnResize:i().bool,disableColumnSelector:i().bool,disableDensitySelector:i().bool,disableEval:i().bool,disableMultipleColumnsFiltering:i().bool,disableMultipleColumnsSorting:i().bool,disableMultipleRowSelection:i().bool,disableRowSelectionOnClick:i().bool,disableVirtualization:i().bool,editMode:i().oneOf(["cell","row"]),experimentalFeatures:i().shape({ariaV7:i().bool,columnGrouping:i().bool,lazyLoading:i().bool,warnIfFocusStateIsNotSynced:i().bool}),filterDebounceMs:i().number,filterMode:(i().oneOf(["client","server"]),()=>null),filterModel:i().shape({items:i().arrayOf(i().shape({field:i().string.isRequired,id:i().oneOfType([i().number,i().string]),operator:i().string.isRequired,value:i().any})).isRequired,logicOperator:i().oneOf(["and","or"]),quickFilterExcludeHiddenColumns:i().bool,quickFilterLogicOperator:i().oneOf(["and","or"]),quickFilterValues:i().array}),forwardedProps:i().object,getCellClassName:i().func,getDetailPanelContent:i().func,getDetailPanelHeight:i().func,getEstimatedRowHeight:i().func,getRowClassName:i().func,getRowHeight:i().func,getRowId:i().func,getRowSpacing:i().func,getTreeDataPath:i().func,groupingColDef:i().oneOfType([i().func,i().object]),hideFooter:i().bool,hideFooterPagination:i().bool,hideFooterRowCount:(i().bool,()=>null),hideFooterSelectedRowCount:i().bool,ignoreDiacritics:i().bool,initialState:i().object,isCellEditable:i().func,isGroupExpandedByDefault:i().func,isRowSelectable:i().func,keepColumnPositionIfDraggedOutside:i().bool,keepNonExistentRowsSelected:i().bool,loading:i().bool,localeText:i().object,logger:i().shape({debug:i().func.isRequired,error:i().func.isRequired,info:i().func.isRequired,warn:i().func.isRequired}),logLevel:i().oneOf(["debug","error","info","warn",!1]),nonce:i().string,onCellClick:i().func,onCellDoubleClick:i().func,onCellEditStart:i().func,onCellEditStop:i().func,onCellKeyDown:i().func,onCellModesModelChange:i().func,onClipboardCopy:i().func,onColumnHeaderClick:i().func,onColumnHeaderDoubleClick:i().func,onColumnHeaderEnter:i().func,onColumnHeaderLeave:i().func,onColumnHeaderOut:i().func,onColumnHeaderOver:i().func,onColumnOrderChange:i().func,onColumnResize:i().func,onColumnVisibilityModelChange:i().func,onColumnWidthChange:i().func,onDetailPanelExpandedRowIdsChange:i().func,onFetchRows:i().func,onFilterModelChange:i().func,onMenuClose:i().func,onMenuOpen:i().func,onPaginationModelChange:i().func,onPinnedColumnsChange:i().func,onPreferencePanelClose:i().func,onPreferencePanelOpen:i().func,onProcessRowUpdateError:i().func,onResize:i().func,onRowClick:i().func,onRowDoubleClick:i().func,onRowEditCommit:i().func,onRowEditStart:i().func,onRowEditStop:i().func,onRowModesModelChange:i().func,onRowOrderChange:i().func,onRowSelectionModelChange:i().func,onRowsScrollEnd:i().func,onSortModelChange:i().func,onStateChange:i().func,pageSizeOptions:i().arrayOf(i().oneOfType([i().number,i().shape({label:i().string.isRequired,value:i().number.isRequired})]).isRequired),pagination:i().bool,paginationMode:i().oneOf(["client","server"]),paginationModel:i().shape({page:i().number.isRequired,pageSize:i().number.isRequired}),pinnedColumns:i().shape({left:i().arrayOf(i().string),right:i().arrayOf(i().string)}),pinnedRows:i().shape({bottom:i().arrayOf(i().object),top:i().arrayOf(i().object)}),processRowUpdate:i().func,rowBuffer:i().number,rowCount:i().number,rowHeight:i().number,rowModesModel:i().object,rowPositionsDebounceMs:i().number,rowReordering:i().bool,rows:i().arrayOf(i().object).isRequired,rowSelection:i().bool,rowSelectionModel:i().oneOfType([i().arrayOf(i().oneOfType([i().number,i().string]).isRequired),i().number,i().string]),rowsLoadingMode:i().oneOf(["client","server"]),rowSpacingType:i().oneOf(["border","margin"]),rowThreshold:i().number,scrollbarSize:i().number,scrollEndThreshold:i().number,showCellVerticalBorder:i().bool,showColumnVerticalBorder:i().bool,slotProps:i().object,slots:i().object,sortingMode:i().oneOf(["client","server"]),sortingOrder:i().arrayOf(i().oneOf(["asc","desc"])),sortModel:i().arrayOf(i().shape({field:i().string.isRequired,sort:i().oneOf(["asc","desc"])})),sx:i().oneOfType([i().arrayOf(i().oneOfType([i().func,i().object,i().bool])),i().func,i().object]),throttleRowsMs:i().number,treeData:i().bool,unstable_headerFilters:i().bool,unstable_ignoreValueFormatterDuringExport:i().oneOfType([i().shape({clipboardExport:i().bool,csvExport:i().bool}),i().bool])}},12795:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(58168),o=n(49864),a=n(9950),i=n(88465),s=n(24005),l=n(22482),c=n(8332),u=n(31488),d=n(18560),p=n(20151),f=n(60168),h=n(12941),m=n(44414);function g(e){const t=(0,l.h)(),n=(0,h.A)(),o=(0,c.N)(t,u.XU),g=(0,c.N)(t,d.V2),v=(0,c.N)(t,p.w),y=e.row.__reorder__||e.id,b=a.useMemo((()=>!!n.rowReordering&&!o.length&&1===g&&0===Object.keys(v).length),[n.rowReordering,o,g,v]),w=(e=>{const{isDraggable:t,classes:n}=e,r={root:["rowReorderCell",t&&"rowReorderCell--draggable"],placeholder:["rowReorderCellPlaceholder"]};return(0,i.A)(r,s.B,n)})({isDraggable:b,classes:n.classes}),x=a.useCallback(((n,r)=>o=>{(0,f.TA)(o)||t.current.getRow(e.id)&&(t.current.publishEvent(n,t.current.getRowParams(e.id),o),r&&r(o))}),[t,e.id]),C=b?{onDragStart:x("rowDragStart"),onDragOver:x("rowDragOver"),onDragEnd:x("rowDragEnd")}:null;return"footer"===e.rowNode.type?null:(0,m.jsxs)("div",(0,r.A)({className:w.root,draggable:b},C,{children:[(0,m.jsx)(n.slots.rowReorderIcon,{}),(0,m.jsx)("div",{className:w.placeholder,children:y})]}))}const v=(0,r.A)({},o.C,{field:"__reorder__",type:"reorder",sortable:!1,filterable:!1,width:50,align:"center",headerAlign:"center",disableColumnMenu:!0,disableExport:!0,disableReorder:!0,resizable:!1,aggregable:!1,renderHeader:()=>" ",renderCell:e=>"footer"===e.rowNode.type||"pinnedRow"===e.rowNode.type?null:(0,m.jsx)(g,(0,r.A)({},e))})},35545:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(9950);const o=()=>r.useRef({})},12941:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(60539).A},49864:(e,t,n)=>{"use strict";n.d(t,{C:()=>S});var r=n(98587),o=n(58168),a=n(9950),i=n(88465),s=n(61399),l=n(59254),c=n(57251),u=n(24005),d=n(60539),p=n(22482),f=n(44414);const h=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],m=(0,l.Ay)(c.Ay,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})((e=>{let{theme:t}=e;return(0,o.A)({},t.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})})),g=a.forwardRef(((e,t)=>{const n=(0,d.A)(),{id:l,value:c,field:g,colDef:v,hasFocus:y,debounceMs:b=200,isProcessingProps:w,onValueChange:x}=e,C=(0,r.A)(e,h),A=(0,p.h)(),S=a.useRef(),[k,M]=a.useState(c),E=(e=>{const{classes:t}=e;return(0,i.A)({root:["editInputCell"]},u.B,t)})(n),R=a.useCallback((async e=>{const t=e.target.value;x&&await x(e,t);const n=A.current.getColumn(g);let r=t;n.valueParser&&(r=n.valueParser(t,A.current.getCellParams(l,g))),M(r),A.current.setEditCellValue({id:l,field:g,value:r,debounceMs:b,unstable_skipValueParser:!0},e)}),[A,b,g,l,x]),P=A.current.unstable_getEditCellMeta(l,g);return a.useEffect((()=>{"debouncedSetEditCellValue"!==(null==P?void 0:P.changeReason)&&M(c)}),[P,c]),(0,s.A)((()=>{y&&S.current.focus()}),[y]),(0,f.jsx)(m,(0,o.A)({ref:t,inputRef:S,className:E.root,ownerState:n,fullWidth:!0,type:"number"===v.type?v.type:"text",value:null!=k?k:"",onChange:R,endAdornment:w?(0,f.jsx)(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},C))}));var v=n(94696),y=n(78243),b=n(28436),w=n(94047),x=n(10272),C=n(2407);const A=(0,x.YB)((e=>{if(!e)return null;const t=new RegExp((0,b.Nt)(e),"i");return(e,n,r,o)=>{let a=o.current.getRowFormattedValue(n,r);return o.current.ignoreDiacritics&&(a=(0,C.WL)(a)),null!=a&&t.test(a.toString())}})),S={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:v.Az,type:"string",align:"left",filterOperators:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,x.eW)([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp((0,b.Nt)(n),"i");return e=>null!=e&&r.test(String(e))},InputComponent:y.y},{value:"equals",getApplyFilterFnV7: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 e=>null!=e&&0===r.compare(n,e.toString())},InputComponent:y.y},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${(0,b.Nt)(n)}.*$`,"i");return e=>null!=e&&r.test(e.toString())},InputComponent:y.y},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${(0,b.Nt)(n)}$`,"i");return e=>null!=e&&r.test(e.toString())},InputComponent:y.y},{value:"isEmpty",getApplyFilterFnV7:()=>e=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>""!==e&&null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7: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 e=>null!=e&&n.some((t=>0===r.compare(t,e.toString()||"")))},InputComponent:w.M}])}(),renderEditCell:e=>(0,f.jsx)(g,(0,o.A)({},e)),getApplyQuickFilterFn:(0,x.UD)(A),getApplyQuickFilterFnV7:A}},10272:(e,t,n)=>{"use strict";n.d(t,{Dc:()=>o,E0:()=>i,UD:()=>l,YB:()=>a,eW:()=>s});var r=n(58168);const o={current:null};function a(e){return e.isInternal=!0,e}function i(e){return void 0!==e&&!0===e.isInternal}function s(e){return e.map((e=>{return(0,r.A)({},e,{getApplyFilterFn:(t=e.getApplyFilterFnV7,a(((e,n)=>{const r=t(e,n);return r?e=>r(e.value,e.row,n,o.current):r}))),getApplyFilterFnV7:a(e.getApplyFilterFnV7)});var t}))}function l(e){return a(((t,n,r)=>{const o=e(t,n,r);return o?e=>o(e.value,e.row,n,r):o}))}},46989:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r=n(9950).createContext(void 0)},94047:(e,t,n)=>{"use strict";n.d(t,{M:()=>d});var r=n(58168),o=n(98587),a=n(9950),i=n(45735),s=n(93539),l=n(60539),c=n(44414);const u=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function d(e){const{item:t,applyValue:n,type:d,apiRef:p,focusElementRef:f,color:h,error:m,helperText:g,size:v,variant:y}=e,b=(0,o.A)(e,u),w={color:h,error:m,helperText:g,size:v,variant:y},[x,C]=a.useState(t.value||[]),A=(0,s.A)(),S=(0,l.A)();a.useEffect((()=>{var e;const n=null!=(e=t.value)?e:[];C(n.map(String))}),[t.value]);const k=a.useCallback(((e,o)=>{C(o.map(String)),n((0,r.A)({},t,{value:[...o]}))}),[n,t]);return(0,c.jsx)(i.A,(0,r.A)({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:n}=t;return null==n||""===n?[]:[n]},id:A,value:x,onChange:k,renderTags:(e,t)=>e.map(((e,n)=>(0,c.jsx)(S.slots.baseChip,(0,r.A)({variant:"outlined",size:"small",label:e},t({index:n}))))),renderInput:e=>{var t;return(0,c.jsx)(S.slots.baseTextField,(0,r.A)({},e,{label:p.current.getLocaleText("filterPanelInputLabel"),placeholder:p.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,r.A)({},e.InputLabelProps,{shrink:!0}),inputRef:f,type:d||"text"},w,null==(t=S.slotProps)?void 0:t.baseTextField))}},b))}},78243:(e,t,n)=>{"use strict";n.d(t,{y:()=>d});var r=n(58168),o=n(98587),a=n(9950),i=n(93539),s=n(37446),l=n(60539),c=n(44414);const u=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps"];function d(e){var t,n;const{item:d,applyValue:p,type:f,apiRef:h,focusElementRef:m,tabIndex:g,disabled:v,clearButton:y,InputProps:b}=e,w=(0,o.A)(e,u),x=(0,s.Z)(),[C,A]=a.useState(null!=(t=d.value)?t:""),[S,k]=a.useState(!1),M=(0,i.A)(),E=(0,l.A)(),R=a.useCallback((e=>{const{value:t}=e.target;A(String(t)),k(!0),x.start(E.filterDebounceMs,(()=>{const e=(0,r.A)({},d,{value:t,fromInput:M});p(e),k(!1)}))}),[M,p,d,E.filterDebounceMs,x]);return a.useEffect((()=>{var e;d.fromInput===M&&void 0!==d.value||A(String(null!=(e=d.value)?e:""))}),[M,d]),(0,c.jsx)(E.slots.baseTextField,(0,r.A)({id:M,label:h.current.getLocaleText("filterPanelInputLabel"),placeholder:h.current.getLocaleText("filterPanelInputPlaceholder"),value:C,onChange:R,variant:"standard",type:f||"text",InputProps:(0,r.A)({},S||y?{endAdornment:S?(0,c.jsx)(E.slots.loadIcon,{fontSize:"small",color:"action"}):y}:{},{disabled:v},b,{inputProps:(0,r.A)({tabIndex:g},null==b?void 0:b.inputProps)}),InputLabelProps:{shrink:!0},inputRef:m},w,null==(n=E.slotProps)?void 0:n.baseTextField))}},24005:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,x:()=>a});var r=n(423);function o(e){return(0,r.Ay)("MuiDataGrid",e)}const a=(0,n(1763).A)("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--selectionMode","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","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","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","withBorderColor","cell--withRightBorder","columnHeader--withRightBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"])},12210:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});const r=n(9950).createContext(void 0)},44032:(e,t,n)=>{"use strict";n.d(t,{FY:()=>l,JR:()=>a,OV:()=>s,Oe:()=>f,Sw:()=>d,TI:()=>u,U8:()=>h,em:()=>o,fc:()=>p,gv:()=>i,iv:()=>c});var r=n(90953);const o=e=>e.columns,a=(0,r.Mz)(o,(e=>e.orderedFields)),i=(0,r.Mz)(o,(e=>e.lookup)),s=(0,r.S)(a,i,((e,t)=>e.map((e=>t[e])))),l=(0,r.Mz)(o,(e=>e.columnVisibilityModel)),c=(0,r.S)(s,l,((e,t)=>e.filter((e=>!1!==t[e.field])))),u=(0,r.S)(c,(e=>e.map((e=>e.field)))),d=(0,r.S)(c,(e=>{const t=[];let n=0;for(let r=0;r<e.length;r+=1)t.push(n),n+=e[r].computedWidth;return t})),p=(0,r.Mz)(c,d,((e,t)=>{const n=e.length;return 0===n?0:t[n-1]+e[n-1].computedWidth})),f=(0,r.S)(s,(e=>e.filter((e=>e.filterable)))),h=(0,r.S)(s,(e=>e.reduce(((e,t)=>(t.filterable&&(e[t.field]=t),e)),{})))},20151:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});const r=e=>e.editRows},37482:(e,t,n)=>{"use strict";n.d(t,{T:()=>o});var r=n(73077);const o=()=>({items:[],logicOperator:r.V.And,quickFilterValues:[],quickFilterLogicOperator:r.V.And})},2407:(e,t,n)=>{"use strict";n.d(t,{Fv:()=>x,zk:()=>p,zU:()=>v,Ko:()=>A,WL:()=>y,L5:()=>g});var r=n(58168),o=n(73077),a=n(10272),i=n(37482),s=n(72489);function l(e){return{current:e.current.getPublicApi()}}var c=n(44032);const u=("undefined"===typeof window?globalThis:window)[atob("ZXZhbA==")];let d;try{d=u("true")}catch(S){d=!1}const p=(e,t)=>{const n=(0,r.A)({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operator){const e=(0,c.gv)(t)[n.field];n.operator=e&&e.filterOperators[0].value}return n},f=(0,s.f)(["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"),h=(0,s.f)("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),m=(0,s.f)("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),g=(e,t,n)=>{const o=e.items.length>1;let a;o&&t?(f(),a=[e.items[0]]):a=e.items;const i=o&&a.some((e=>null==e.id)),s=a.some((e=>null==e.operator));return i&&h(),s&&m(),s||i?(0,r.A)({},e,{items:a.map((e=>p(e,n)))}):e.items!==a?(0,r.A)({},e,{items:a}):e},v=(e,t,n)=>o=>(0,r.A)({},o,{filterModel:g(e,t,n)}),y=e=>"string"===typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,b=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let o;if(n.valueParser){var i;const t=n.valueParser;o=Array.isArray(e.value)?null==(i=e.value)?void 0:i.map((e=>t(e))):t(e.value)}else o=e.value;const{ignoreDiacritics:s}=t.current.rootProps;s&&(o=y(o));const c=(0,r.A)({},e,{value:o}),u=n.filterOperators;if(null==u||!u.length)throw new Error(`MUI: No filter operators found for column '${n.field}'.`);const d=u.find((e=>e.value===c.operator));if(!d)throw new Error(`MUI: No filter operator found for column '${n.field}' and operator value '${c.operator}'.`);const p=!(0,a.E0)(d.getApplyFilterFn),f=!(0,a.E0)(d.getApplyFilterFnV7),h=l(t);if(d.getApplyFilterFnV7&&(!p||f)){const e=d.getApplyFilterFnV7(c,n);return"function"!==typeof e?null:{v7:!0,item:c,fn:r=>{let o=t.current.getRowValue(r,n);return s&&(o=y(o)),e(o,r,n,h)}}}const m=d.getApplyFilterFn(c,n);return"function"!==typeof m?null:{v7:!1,item:c,fn:e=>{const n=t.current.getCellParams(e,c.field);a.Dc.current=h,s&&(n.value=y(n.value));const r=m(n);return a.Dc.current=null,r}}};let w=1;const x=(e,t,n)=>{const r=((e,t,n)=>{const{items:r}=e,o=r.map((e=>b(e,t))).filter((e=>!!e));if(0===o.length)return null;if(!d||n)return(e,n)=>{const r={};for(let a=0;a<o.length;a+=1){const i=o[a];n&&!n(i.item.field)||(r[i.item.id]=i.v7?i.fn(e):i.fn(t.current.getRowId(e)))}return r};const a=`(function filterItem$$(getRowId, appliers, row, shouldApplyFilter) {\n ${o.map(((e,t)=>`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`)).join("\n")}\n\n const result$$ = {\n ${o.map(((e,t)=>`${JSON.stringify(String(e.item.id))}:\n !shouldApply${t} ?\n false :\n ${e.v7?`appliers[${t}].fn(row)`:`appliers[${t}].fn(getRowId(row))`},\n `)).join("\n")}};\n\n return result$$;\n })`,i=u(a.replaceAll("$$",String(w)));return w+=1,(e,n)=>i(t.current.getRowId,o,e,n)})(e,t,n),o=((e,t)=>{var n,r,o;const i=null!=(n=null==(r=e.quickFilterValues)?void 0:r.filter(Boolean))?n:[];if(0===i.length)return null;const s=null!=(o=e.quickFilterExcludeHiddenColumns)&&o?(0,c.TI)(t):(0,c.JR)(t),u=[],{ignoreDiacritics:d}=t.current.rootProps,p=l(t);return s.forEach((e=>{const n=t.current.getColumn(e),r=null==n?void 0:n.getApplyQuickFilterFn,o=null==n?void 0:n.getApplyQuickFilterFnV7,s=!(0,a.E0)(r),l=!(0,a.E0)(o);!o||s&&!l?r&&u.push({column:n,appliers:i.map((e=>{const t=d?y(e):e;return{v7:!1,fn:r(t,n,p)}}))}):u.push({column:n,appliers:i.map((e=>{const t=d?y(e):e;return{v7:!0,fn:o(t,n,p)}}))})})),function(e,n){const r={},o={};e:for(let s=0;s<i.length;s+=1){const l=i[s];for(let i=0;i<u.length;i+=1){const{column:c,appliers:f}=u[i],{field:h}=c;if(n&&!n(h))continue;const m=f[s];let g=t.current.getRowValue(e,c);if(null!==m.fn)if(m.v7){if(d&&(g=y(g)),m.fn(g,e,c,p)){r[l]=!0;continue e}}else{var a;const n=null!=(a=o[h])?a:t.current.getCellParams(t.current.getRowId(e),h);if(d&&(n.value=y(n.value)),o[h]=n,m.fn(n)){r[l]=!0;continue e}}}r[l]=!1}return r}})(e,t);return function(e,t,n){var a,i;n.passingFilterItems=null!=(a=null==r?void 0:r(e,t))?a:null,n.passingQuickFilterValues=null!=(i=null==o?void 0:o(e,t))?i:null}},C=e=>null!=e,A=(e,t,n,r,a)=>{const s=((e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter((e=>null!==b(e,t)))),e.cleanedFilterItems))(a,r,n.items),l=e.filter(C),c=t.filter(C);if(l.length>0){var u;const e=e=>l.some((t=>t[e.id]));if((null!=(u=n.logicOperator)?u:(0,i.T)().logicOperator)===o.V.And){if(!s.every(e))return!1}else{if(!s.some(e))return!1}}if(c.length>0&&null!=n.quickFilterValues){var d;const e=e=>c.some((t=>t[e]));if((null!=(d=n.quickFilterLogicOperator)?d:(0,i.T)().quickFilterLogicOperator)===o.V.And){if(!n.quickFilterValues.every(e))return!1}else{if(!n.quickFilterValues.some(e))return!1}}return!0}},18560:(e,t,n)=>{"use strict";n.d(t,{$2:()=>g,A6:()=>h,Dl:()=>i,H0:()=>a,Mz:()=>p,O8:()=>s,OQ:()=>v,V2:()=>f,Y1:()=>d,gk:()=>c,qj:()=>u,rI:()=>l});var r=n(90953);const o=e=>e.rows,a=(0,r.Mz)(o,(e=>e.totalRowCount)),i=(0,r.Mz)(o,(e=>e.loading)),s=(0,r.Mz)(o,(e=>e.totalTopLevelRowCount)),l=(0,r.Mz)(o,(e=>e.dataRowIdToModelLookup)),c=(0,r.Mz)(o,(e=>e.dataRowIdToIdLookup)),u=(0,r.Mz)(o,(e=>e.tree)),d=(0,r.Mz)(o,(e=>e.groupingName)),p=(0,r.Mz)(o,(e=>e.treeDepths)),f=(0,r.S)(o,(e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:t.filter((e=>{let[,t]=e;return t>0})).map((e=>{let[t]=e;return Number(t)})).sort(((e,t)=>t-e))[0]+1})),h=(0,r.Mz)(o,(e=>e.dataRowIds)),m=(0,r.Mz)(o,(e=>null==e?void 0:e.additionalRowGroups)),g=(0,r.S)(m,(e=>{var t,n;const r=null==e?void 0:e.pinnedRows;return{bottom:null==r||null==(t=r.bottom)?void 0:t.map((e=>{var t;return{id:e.id,model:null!=(t=e.model)?t:{}}})),top:null==r||null==(n=r.top)?void 0:n.map((e=>{var t;return{id:e.id,model:null!=(t=e.model)?t:{}}}))}})),v=(0,r.Mz)(g,(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)}))},31488:(e,t,n)=>{"use strict";n.d(t,{J6:()=>s,RJ:()=>i,XU:()=>l,oF:()=>c});var r=n(90953),o=n(18560);const a=e=>e.sorting,i=(0,r.Mz)(a,(e=>e.sortedRows)),s=(0,r.S)(i,o.rI,((e,t)=>e.map((e=>{var n;return{id:e,model:null!=(n=t[e])?n:{}}})))),l=(0,r.Mz)(a,(e=>e.sortModel)),c=(0,r.S)(l,(e=>e.reduce(((t,n,r)=>(t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?r+1:void 0},t)),{})))},94696:(e,t,n)=>{"use strict";n.d(t,{Az:()=>d,Hm:()=>l,Lj:()=>s,Ou:()=>p,VE:()=>f,Zx:()=>a,ps:()=>i});var r=n(58168);const o=(0,n(72489).f)(["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"),a=(e,t)=>t&&e.length>1?(o(),[e[0]]):e,i=(e,t)=>n=>(0,r.A)({},n,{sorting:(0,r.A)({},n.sorting,{sortModel:a(e,t)})}),s=(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?function(){return-1*n.sortComparator(...arguments)}: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))},l=(e,t)=>{const n=e.indexOf(t);return t&&-1!==n&&n+1!==e.length?e[n+1]:e[0]},c=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,u=new Intl.Collator,d=(e,t)=>{const n=c(e,t);return null!==n?n:"string"===typeof e?u.compare(e.toString(),t.toString()):e-t},p=(e,t)=>{const n=c(e,t);return null!==n?n:Number(e)-Number(t)},f=(e,t)=>{const n=c(e,t);return null!==n?n:e>t?1:e<t?-1:0}},22482:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(9950),o=n(46989);function a(){const e=r.useContext(o.k);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}},60539:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(9950),o=n(12210);const a=()=>{const e=r.useContext(o.y);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e}},8332:(e,t,n)=>{"use strict";n.d(t,{N:()=>p,T:()=>u});var r=n(9950),o=n(1134),a=n(27187),i=n(72489),s=n(76915);(0,i.f)(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);function l(e,t){return function(e){return e.acceptsApiRef}(t)?t(e):t(e.current.state)}const c=Object.is,u=s.v,d=()=>({state:null,equals:null,selector:null}),p=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c;const i=(0,o.n)(d),s=null!==i.current.selector,[u,p]=r.useState(s?null:l(e,t));return i.current.state=u,i.current.equals=n,i.current.selector=t,(0,a.y)((()=>e.current.store.subscribe((()=>{const t=l(e,i.current.selector);i.current.equals(i.current.state,t)||(i.current.state=t,p(t))})))),u}},1134:(e,t,n)=>{"use strict";n.d(t,{n:()=>a});var r=n(9950);const o={};function a(e,t){const n=r.useRef(o);return n.current===o&&(n.current=e(t)),n}},27187:(e,t,n)=>{"use strict";n.d(t,{y:()=>a});var r=n(9950);const o=[];function a(e){r.useEffect(e,o)}},37446:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(1134),o=n(27187);class a{constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new a}start(e,t){this.clear(),this.currentId=setTimeout(t,e)}}function i(){const e=(0,r.n)(a.create).current;return(0,o.y)(e.disposeEffect),e}},73077:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});var r=function(e){return e.And="and",e.Or="or",e}(r||{})},90953:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var a,i=0,s={memoizeOptions:void 0},l=r.pop();if("object"===typeof l&&(s=l,l=r.pop()),"function"!==typeof l)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof l+"]");var c=s.memoizeOptions,u=void 0===c?n:c,d=Array.isArray(u)?u:[u],p=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"===typeof e}))){var n=t.map((function(e){return"function"===typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}(r),f=e.apply(void 0,[function(){return i++,l.apply(null,arguments)}].concat(d)),h=e((function(){for(var e=[],t=p.length,n=0;n<t;n++)e.push(p[n].apply(null,arguments));return a=f.apply(null,e)}));return Object.assign(h,{resultFunc:l,memoizedResultFunc:f,dependencies:p,lastResult:function(){return a},recomputations:function(){return i},resetRecomputations:function(){return i=0}}),h}}n.d(t,{Mz:()=>c,S:()=>u});var o=r(n(10844).UI),a=n(72489);const i={cache:new WeakMap};(0,a.f)(["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)`."]);function s(e){return"current"in e&&"instanceId"in e.current}const l={id:"default"},c=function(e,t,n,r,o,a){if((arguments.length<=6?0:arguments.length-6)>0)throw new Error("Unsupported number of selectors");let i;if(e&&t&&n&&r&&o&&a)i=(i,c)=>{const u=s(i),d=null!=c?c:u?i.current.instanceId:l,p=u?i.current.state:i,f=e(p,d),h=t(p,d),m=n(p,d),g=r(p,d),v=o(p,d);return a(f,h,m,g,v)};else if(e&&t&&n&&r&&o)i=(a,i)=>{const c=s(a),u=null!=i?i:c?a.current.instanceId:l,d=c?a.current.state:a,p=e(d,u),f=t(d,u),h=n(d,u),m=r(d,u);return o(p,f,h,m)};else if(e&&t&&n&&r)i=(o,a)=>{const i=s(o),c=null!=a?a:i?o.current.instanceId:l,u=i?o.current.state:o,d=e(u,c),p=t(u,c),f=n(u,c);return r(d,p,f)};else if(e&&t&&n)i=(r,o)=>{const a=s(r),i=null!=o?o:a?r.current.instanceId:l,c=a?r.current.state:r,u=e(c,i),d=t(c,i);return n(u,d)};else{if(!e||!t)throw new Error("Missing arguments");i=(n,r)=>{const o=s(n),a=null!=r?r:o?n.current.instanceId:l,i=o?n.current.state:n,c=e(i,a);return t(c)}}return i.acceptsApiRef=!0,i},u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=function(){for(var e,n,r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];const[u,d]=a,p=s(u),f=p?u.current.instanceId:null!=d?d:l,h=p?u.current.state:u;const{cache:m}=i;var g;if(m.get(f)&&null!=(e=m.get(f))&&e.get(t))return null==(g=m.get(f))?void 0:g.get(t)(h,f);const v=o(...t);return m.get(f)||m.set(f,new Map),null==(n=m.get(f))||n.set(t,v),v(h,f)};return r.acceptsApiRef=!0,r}},60168:(e,t,n)=>{"use strict";n.d(t,{Dy:()=>o,TA:()=>d,fl:()=>a,u:()=>s,v_:()=>c,xE:()=>u});var r=n(24005);function o(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function a(e,t){return e.closest(`.${t}`)}function i(e){return e.replace(/["\\]/g,"\\$&")}function s(e,t){return e.querySelector(`[role="columnheader"][data-field="${i(t)}"]`)}function l(e){return`.${r.x.row}[data-id="${i(String(e))}"]`}function c(e,t){return e.querySelector(l(t))}function u(e,t){let{id:n,field:o}=t;const a=`${l(n)} ${`.${r.x.cell}[data-field="${i(o)}"]`}`;return e.querySelector(a)}function d(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}},76915:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});const r=Object.is;function o(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,o=0;for(const a in e){if(n+=1,!r(e[a],t[a]))return!1;if(!(a in t))return!1}for(const r in t)o+=1;return n===o}},28436:(e,t,n)=>{"use strict";function r(e){return"number"===typeof e&&!Number.isNaN(e)}function o(e){return"function"===typeof e}function a(e){return"object"===typeof e&&null!==e}function i(){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}}function s(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}n.d(t,{Et:()=>r,Go:()=>d,Gv:()=>a,Hv:()=>c,Nt:()=>s,Tn:()=>o,nX:()=>u,qE:()=>l,s3:()=>i});const l=(e,t,n)=>Math.max(t,Math.min(n,e));function c(e,t){if(e===t)return!0;if(e&&t&&"object"===typeof e&&"object"===typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r+=1)if(!c(e[r],t[r]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const n=Array.from(e.entries());for(let e=0;e<n.length;e+=1)if(!t.has(n[e][0]))return!1;for(let e=0;e<n.length;e+=1){const r=n[e];if(!c(r[1],t.get(r[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const n=Array.from(e.entries());for(let e=0;e<n.length;e+=1)if(!t.has(n[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r+=1)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),r=n.length;if(r!==Object.keys(t).length)return!1;for(let e=0;e<r;e+=1)if(!Object.prototype.hasOwnProperty.call(t,n[e]))return!1;for(let o=0;o<r;o+=1){const r=n[o];if(!c(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function u(e,t,n){const r=(o=e,()=>{let e=o+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296});var o;return()=>t+(n-t)*r()}function d(e){return"function"===typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}},72489:(e,t,n)=>{"use strict";n.d(t,{f:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warning",n=!1;const r=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(r):console.warn(r))}}},10533:(e,t,n)=>{"use strict";n.d(t,{U:()=>Br});var r=n(58168),o=n(98587),a=n(9950),i=n.t(a,2),s=n(90357),l=n(51522),c=n(79044);function u(e,t,n,r,o){const[i,s]=a.useState((()=>o&&n?n(e).matches:r?r(e).matches:t));return(0,c.A)((()=>{let t=!0;if(!n)return;const r=n(e),o=()=>{t&&s(r.matches)};return o(),r.addListener(o),()=>{t=!1,r.removeListener(o)}}),[e,n]),i}const d=i.useSyncExternalStore;function p(e,t,n,r,o){const i=a.useCallback((()=>t),[t]),s=a.useMemo((()=>{if(o&&n)return()=>n(e).matches;if(null!==r){const{matches:t}=r(e);return()=>t}return i}),[i,e,r,o,n]),[l,c]=a.useMemo((()=>{if(null===n)return[i,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]}),[i,n,e]);return d(c,l,s)}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,s.A)(),r="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:o=!1,matchMedia:a=(r?window.matchMedia:null),ssrMatchMedia:i=null,noSsr:c=!1}=(0,l.A)({name:"MuiUseMediaQuery",props:t,theme:n});let f="function"===typeof e?e(n):e;f=f.replace(/^@media( ?)/m,"");return(void 0!==d?p:u)(f,o,a,i,c)}var h=n(48283),m=n(11942),g=n.n(m),v=n(36369),y=n(69734);const b=g().oneOfType([g().func,g().object]);var w=n(83772),x=n(46),C=n(50853);const A=e=>{if(void 0!==e)return Object.keys(e).reduce(((t,n)=>(0,r.A)({},t,{[`${n.slice(0,1).toLowerCase()}${n.slice(1)}`]:e[n]})),{})};var S=n(72004),k=n(82053),M=n(59254),E=n(88465),R=n(423),P=n(1763);function I(e){return(0,R.Ay)("MuiPickersToolbar",e)}(0,P.A)("MuiPickersToolbar",["root","content"]);var D=n(44414);const N=(0,M.Ay)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3)},n.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})})),$=(0,M.Ay)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{ownerState:t}=e;var n;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:t.isLandscape?"flex-start":"space-between",flexDirection:t.isLandscape?null!=(n=t.landscapeDirection)?n:"column":"row",flex:1,alignItems:t.isLandscape?"flex-start":"center"}})),O=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiPickersToolbar"}),{children:r,className:o,toolbarTitle:a,hidden:i,titleId:s}=n,l=n,c=(e=>{const{classes:t,isLandscape:n}=e,r={root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]};return(0,E.A)(r,I,t)})(l);return i?null:(0,D.jsxs)(N,{ref:t,className:(0,S.A)(c.root,o),ownerState:l,children:[(0,D.jsx)(k.A,{color:"text.secondary",variant:"overline",id:s,children:a}),(0,D.jsx)($,{className:c.content,ownerState:l,children:r})]})}));var T=n(45098);function _(e){return(0,R.Ay)("MuiPickersToolbarText",e)}const j=(0,P.A)("MuiPickersToolbarText",["root","selected"]),F=["className","selected","value"],L=(0,M.Ay)(k.A,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${j.selected}`]:t.selected}]})((e=>{let{theme:t}=e;return{transition:t.transitions.create("color"),color:(t.vars||t).palette.text.secondary,[`&.${j.selected}`]:{color:(t.vars||t).palette.text.primary}}})),V=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiPickersToolbarText"}),{className:a,value:i}=n,s=(0,o.A)(n,F),l=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,E.A)(r,_,t)})(n);return(0,D.jsx)(L,(0,r.A)({ref:t,className:(0,S.A)(a,l.root),component:"span"},s,{children:i}))})),z=["align","className","selected","typographyClassName","value","variant","width"],H=(0,M.Ay)(T.A,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),B=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiPickersToolbarButton"}),{align:a,className:i,selected:s,typographyClassName:l,value:c,variant:u,width:d}=n,p=(0,o.A)(n,z),f=(e=>{const{classes:t}=e;return(0,E.A)({root:["root"]},I,t)})(n);return(0,D.jsx)(H,(0,r.A)({variant:"text",ref:t,className:(0,S.A)(i,f.root)},d?{sx:{width:d}}:{},p,{children:(0,D.jsx)(V,{align:a,className:l,variant:u,value:c,selected:s})}))}));function G(e){return(0,R.Ay)("MuiDateRangePickerToolbar",e)}(0,P.A)("MuiDateRangePickerToolbar",["root","container"]);const W=["value","rangePosition","onRangePositionChange","toolbarFormat","className"],U=(0,M.Ay)(O,{name:"MuiDateRangePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),K=(0,M.Ay)("div",{name:"MuiDateRangePickerToolbar",slot:"Container",overridesResolver:(e,t)=>t.container})({display:"flex"}),q=a.forwardRef((function(e,t){const n=(0,x.hc)(),a=(0,h.A)({props:e,name:"MuiDateRangePickerToolbar"}),{value:[i,s],rangePosition:l,onRangePositionChange:c,toolbarFormat:u,className:d}=a,p=(0,o.A)(a,W),f=(0,x.Nq)(),m=i?n.formatByString(i,u||n.formats.shortDate):f.start,g=s?n.formatByString(s,u||n.formats.shortDate):f.end,v=a,y=(e=>{const{classes:t}=e;return(0,E.A)({root:["root"],container:["container"]},G,t)})(v);return(0,D.jsx)(U,(0,r.A)({},p,{toolbarTitle:f.dateRangePickerToolbarTitle,isLandscape:!1,className:(0,S.A)(d,y.root),ownerState:v,ref:t,children:(0,D.jsxs)(K,{className:y.container,children:[(0,D.jsx)(B,{variant:null!==i?"h5":"h6",value:m,selected:"start"===l,onClick:()=>c("start")}),(0,D.jsxs)(k.A,{variant:"h5",children:["\xa0","\u2013","\xa0"]}),(0,D.jsx)(B,{variant:null!==s?"h5":"h6",value:g,selected:"end"===l,onClick:()=>c("end")})]})}))})),Y=["components","componentsProps"];function X(e,t){var n,i,s,l;const c=(0,x.hc)(),u=(0,x.Yg)(),d=(0,h.A)({props:e,name:t}),{components:p,componentsProps:f}=d,m=(0,o.A)(d,Y),g=a.useMemo((()=>{var e;return null==(null==(e=m.localeText)?void 0:e.toolbarTitle)?m.localeText:(0,r.A)({},m.localeText,{dateRangePickerToolbarTitle:m.localeText.toolbarTitle})}),[m.localeText]);return(0,r.A)({},m,{localeText:g,disableFuture:null!=(n=m.disableFuture)&&n,disablePast:null!=(i=m.disablePast)&&i,minDate:(0,C.IP)(c,m.minDate,u.minDate),maxDate:(0,C.IP)(c,m.maxDate,u.maxDate),slots:(0,r.A)({toolbar:q},null!=(s=m.slots)?s:A(p)),slotProps:null!=(l=m.slotProps)?l:f})}var Z=n(92529),Q=n(43514),J=n(57191),ee=n(75874),te=n(25333),ne=n(38166),re=n(14857);const oe=e=>(0,R.Ay)("MuiPickersFadeTransitionGroup",e),ae=((0,P.A)("MuiPickersFadeTransitionGroup",["root"]),(0,M.Ay)(ne.A,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function ie(e){const t=(0,h.A)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:a}=t,i=(e=>{const{classes:t}=e;return(0,E.A)({root:["root"]},oe,t)})(t),s=(0,re.A)();return o?n:(0,D.jsx)(ae,{className:(0,S.A)(i.root,r),children:(0,D.jsx)(J.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},a)})}var se=n(99743);function le(e){return(0,R.Ay)("MuiPickersArrowSwitcher",e)}(0,P.A)("MuiPickersArrowSwitcher",["root","spacer","button"]);const ce=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],ue=["ownerState"],de=["ownerState"],pe=(0,M.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),fe=(0,M.Ay)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((e=>{let{theme:t}=e;return{width:t.spacing(3)}})),he=(0,M.Ay)(te.A,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})((e=>{let{ownerState:t}=e;return(0,r.A)({},t.hidden&&{visibility:"hidden"})})),me=a.forwardRef((function(e,t){var n,a,i,s;const l="rtl"===(0,re.A)().direction,c=(0,h.A)({props:e,name:"MuiPickersArrowSwitcher"}),{children:u,className:d,slots:p,slotProps:f,isNextDisabled:m,isNextHidden:g,onGoToNext:v,nextLabel:y,isPreviousDisabled:b,isPreviousHidden:w,onGoToPrevious:x,previousLabel:C}=c,A=(0,o.A)(c,ce),M=c,R=(e=>{const{classes:t}=e;return(0,E.A)({root:["root"],spacer:["spacer"],button:["button"]},le,t)})(M),P={isDisabled:m,isHidden:g,goTo:v,label:y},I={isDisabled:b,isHidden:w,goTo:x,label:C},N=null!=(n=null==p?void 0:p.previousIconButton)?n:he,$=(0,ee.Q)({elementType:N,externalSlotProps:null==f?void 0:f.previousIconButton,additionalProps:{size:"medium",title:I.label,"aria-label":I.label,disabled:I.isDisabled,edge:"end",onClick:I.goTo},ownerState:(0,r.A)({},M,{hidden:I.isHidden}),className:R.button}),O=null!=(a=null==p?void 0:p.nextIconButton)?a:he,T=(0,ee.Q)({elementType:O,externalSlotProps:null==f?void 0:f.nextIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"start",onClick:P.goTo},ownerState:(0,r.A)({},M,{hidden:P.isHidden}),className:R.button}),_=null!=(i=null==p?void 0:p.leftArrowIcon)?i:se.A6,j=(0,ee.Q)({elementType:_,externalSlotProps:null==f?void 0:f.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),F=(0,o.A)(j,ue),L=null!=(s=null==p?void 0:p.rightArrowIcon)?s:se.fl,V=(0,ee.Q)({elementType:L,externalSlotProps:null==f?void 0:f.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),z=(0,o.A)(V,de);return(0,D.jsxs)(pe,(0,r.A)({ref:t,className:(0,S.A)(R.root,d),ownerState:M},A,{children:[(0,D.jsx)(N,(0,r.A)({},$,{children:l?(0,D.jsx)(L,(0,r.A)({},z)):(0,D.jsx)(_,(0,r.A)({},F))})),u?(0,D.jsx)(k.A,{variant:"subtitle1",component:"span",children:u}):(0,D.jsx)(fe,{className:R.spacer,ownerState:M}),(0,D.jsx)(O,(0,r.A)({},T,{children:l?(0,D.jsx)(_,(0,r.A)({},F)):(0,D.jsx)(L,(0,r.A)({},z))}))]}))}));function ge(e,t){let{disableFuture:n,maxDate:r,timezone:o}=t;const i=(0,x.hc)();return a.useMemo((()=>{const t=i.dateWithTimezone(void 0,o),a=i.startOfMonth(n&&i.isBefore(t,r)?t:r);return!i.isAfter(a,e)}),[n,r,e,i,o])}function ve(e,t){let{disablePast:n,minDate:r,timezone:o}=t;const i=(0,x.hc)();return a.useMemo((()=>{const t=i.dateWithTimezone(void 0,o),a=i.startOfMonth(n&&i.isAfter(t,r)?t:r);return!i.isBefore(a,e)}),[n,r,e,i,o])}const ye=e=>(0,R.Ay)("MuiPickersCalendarHeader",e),be=(0,P.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),we=["slots","slotProps","components","componentsProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],xe=["ownerState"],Ce=(0,M.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),Ae=(0,M.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((e=>{let{theme:t}=e;return(0,r.A)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})})),Se=(0,M.Ay)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),ke=(0,M.Ay)(te.A,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})((e=>{let{ownerState:t}=e;return(0,r.A)({marginRight:"auto"},"year"===t.view&&{[`.${be.switchViewIcon}`]:{transform:"rotate(180deg)"}})})),Me=(0,M.Ay)(se.iV,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((e=>{let{theme:t}=e;return{willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"}})),Ee=a.forwardRef((function(e,t){var n,a,i,s;const l=(0,x.Nq)(),c=(0,x.hc)(),u=(0,h.A)({props:e,name:"MuiPickersCalendarHeader"}),{slots:d,slotProps:p,components:f,currentMonth:m,disabled:g,disableFuture:v,disablePast:y,maxDate:b,minDate:w,onMonthChange:C,onViewChange:A,view:k,reduceAnimations:M,views:R,labelId:P,className:I,timezone:N}=u,$=(0,o.A)(u,we),O=u,T=(e=>{const{classes:t}=e;return(0,E.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},ye,t)})(u),_=null!=(n=null!=(a=null==d?void 0:d.switchViewButton)?a:null==f?void 0:f.SwitchViewButton)?n:ke,j=(0,ee.Q)({elementType:_,externalSlotProps:null==p?void 0:p.switchViewButton,additionalProps:{size:"small","aria-label":l.calendarViewSwitchingButtonAriaLabel(k)},ownerState:O,className:T.switchViewButton}),F=null!=(i=null!=(s=null==d?void 0:d.switchViewIcon)?s:null==f?void 0:f.SwitchViewIcon)?i:Me,L=(0,ee.Q)({elementType:F,externalSlotProps:null==p?void 0:p.switchViewIcon,ownerState:void 0,className:T.switchViewIcon}),V=(0,o.A)(L,xe),z=ge(m,{disableFuture:v,maxDate:b,timezone:N}),H=ve(m,{disablePast:y,minDate:w,timezone:N});return 1===R.length&&"year"===R[0]?null:(0,D.jsxs)(Ce,(0,r.A)({},$,{ownerState:O,className:(0,S.A)(I,T.root),ref:t,children:[(0,D.jsxs)(Ae,{role:"presentation",onClick:()=>{if(1!==R.length&&A&&!g)if(2===R.length)A(R.find((e=>e!==k))||R[0]);else{const e=0!==R.indexOf(k)?0:1;A(R[e])}},ownerState:O,"aria-live":"polite",className:T.labelContainer,children:[(0,D.jsx)(ie,{reduceAnimations:M,transKey:c.format(m,"monthAndYear"),children:(0,D.jsx)(Se,{id:P,ownerState:O,className:T.label,children:c.format(m,"monthAndYear")})}),R.length>1&&!g&&(0,D.jsx)(_,(0,r.A)({},j,{children:(0,D.jsx)(F,(0,r.A)({},V))}))]}),(0,D.jsx)(J.A,{in:"day"===k,children:(0,D.jsx)(me,{slots:d,slotProps:p,onGoToPrevious:()=>C(c.addMonths(m,-1),"right"),isPreviousDisabled:H,previousLabel:l.previousMonth,onGoToNext:()=>C(c.addMonths(m,1),"left"),isNextDisabled:z,nextLabel:l.nextMonth})})]}))}));var Re=n(46081),Pe=n(63931),Ie=n(24184),De=n(5393),Ne=n(61399),$e=n(7083);function Oe(e){return(0,R.Ay)("MuiPickersDay",e)}const Te=(0,P.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),_e=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],je=e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({},t.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,$e.X4)(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:(0,$e.X4)(t.palette.primary.main,t.palette.action.focusOpacity),[`&.${Te.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${Te.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${Te.disabled}:not(.${Te.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${Te.disabled}&.${Te.selected}`]:{opacity:.6}},!n.disableMargin&&{margin:"0 2px"},n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&{color:(t.vars||t).palette.text.secondary},!n.disableHighlightToday&&n.today&&{[`&:not(.${Te.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}})},Fe=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Le=(0,M.Ay)(Ie.A,{name:"MuiPickersDay",slot:"Root",overridesResolver:Fe})(je),Ve=(0,M.Ay)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Fe})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({},je({theme:t,ownerState:n}),{opacity:0,pointerEvents:"none"})})),ze=()=>{},He=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiPickersDay"}),{autoFocus:i=!1,className:s,day:l,disabled:c=!1,disableHighlightToday:u=!1,disableMargin:d=!1,isAnimating:p,onClick:f,onDaySelect:m,onFocus:g=ze,onBlur:v=ze,onKeyDown:y=ze,onMouseDown:b=ze,onMouseEnter:w=ze,outsideCurrentMonth:C,selected:A=!1,showDaysOutsideCurrentMonth:k=!1,children:M,today:R=!1}=n,P=(0,o.A)(n,_e),I=(0,r.A)({},n,{autoFocus:i,disabled:c,disableHighlightToday:u,disableMargin:d,selected:A,showDaysOutsideCurrentMonth:k,today:R}),N=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:a,outsideCurrentMonth:i,showDaysOutsideCurrentMonth:s,classes:l}=e,c=i&&!s,u={root:["root",t&&!c&&"selected",a&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",i&&s&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,E.A)(u,Oe,l)})(I),$=(0,x.hc)(),O=a.useRef(null),T=(0,De.A)(O,t);(0,Ne.A)((()=>{!i||c||p||C||O.current.focus()}),[i,c,p,C]);return C&&!k?(0,D.jsx)(Ve,{className:(0,S.A)(N.root,N.hiddenDaySpacingFiller,s),ownerState:I,role:P.role}):(0,D.jsx)(Le,(0,r.A)({className:(0,S.A)(N.root,s),ref:T,centerRipple:!0,disabled:c,tabIndex:A?0:-1,onKeyDown:e=>y(e,l),onFocus:e=>g(e,l),onBlur:e=>v(e,l),onMouseEnter:e=>w(e,l),onClick:e=>{c||m(l),C&&e.currentTarget.focus(),f&&f(e)},onMouseDown:e=>{b(e),C&&e.preventDefault()}},P,{ownerState:I,children:M||$.format(l,"dayOfMonth")}))})),Be=a.memo(He);var Ge=n(77387);function We(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Ue=n(67279),Ke=n(50385),qe=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"===typeof n.className?n.className=We(n.className,r):n.setAttribute("class",We(n.className&&n.className.baseVal||"",r)));var n,r}))},Ye=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1];t.removeClasses(o,"exit"),t.addClass(o,a?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.addClass(o,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],a=r[1]?"appear":"enter";t.removeClasses(o,a),t.addClass(o,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"===typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}(0,Ge.A)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&(0,Ke.F)(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,a=n.done;this.appliedClasses[t]={},r&&qe(e,r),o&&qe(e,o),a&&qe(e,a)},n.render=function(){var e=this.props,t=(e.classNames,(0,o.A)(e,["classNames"]));return a.createElement(Ue.Ay,(0,r.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(a.Component);Ye.defaultProps={classNames:""},Ye.propTypes={};const Xe=Ye,Ze=e=>(0,R.Ay)("MuiPickersSlideTransition",e),Qe=(0,P.A)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Je=["children","className","reduceAnimations","slideDirection","transKey","classes"],et=(0,M.Ay)(ne.A,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Qe["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Qe["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Qe.slideEnterActive}`]:t.slideEnterActive},{[`.${Qe.slideExit}`]:t.slideExit},{[`.${Qe["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Qe["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((e=>{let{theme:t}=e;const n=t.transitions.create("transform",{duration:t.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Qe["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Qe["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Qe.slideEnterActive}`]:{transform:"translate(0%)",transition:n},[`& .${Qe.slideExit}`]:{transform:"translate(0%)"},[`& .${Qe["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:n,zIndex:0},[`& .${Qe["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:n,zIndex:0}}}));var tt=n(53807);const nt=e=>{let{shouldDisableDate:t,shouldDisableMonth:n,shouldDisableYear:r,minDate:o,maxDate:i,disableFuture:s,disablePast:l,timezone:c}=e;const u=(0,x.u)();return a.useCallback((e=>null!==(0,tt.Z)({adapter:u,value:e,props:{shouldDisableDate:t,shouldDisableMonth:n,shouldDisableYear:r,minDate:o,maxDate:i,disableFuture:s,disablePast:l,timezone:c}})),[u,t,n,r,o,i,s,l,c])},rt=e=>(0,R.Ay)("MuiDayCalendar",e),ot=((0,P.A)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),at=["ownerState"],it=(0,M.Ay)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),st=(0,M.Ay)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),lt=(0,M.Ay)(k.A,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary}})),ct=(0,M.Ay)(k.A,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})((e=>{let{theme:t}=e;return{width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled}})),ut=(0,M.Ay)(k.A,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})((e=>{let{theme:t}=e;return(0,r.A)({},t.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})})),dt=(0,M.Ay)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),pt=(0,M.Ay)((function(e){const t=(0,h.A)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:i,reduceAnimations:s,transKey:l}=t,c=(0,o.A)(t,Je),u=(e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,E.A)(r,Ze,t)})(t),d=(0,re.A)();if(s)return(0,D.jsx)("div",{className:(0,S.A)(u.root,i),children:n});const p={exit:u.exit,enterActive:u.enterActive,enter:u.enter,exitActive:u.exitActive};return(0,D.jsx)(et,{className:(0,S.A)(u.root,i),childFactory:e=>a.cloneElement(e,{classNames:p}),role:"presentation",children:(0,D.jsx)(Xe,(0,r.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:d.transitions.duration.complex,classNames:p},c,{children:n}),l)})}),{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),ft=(0,M.Ay)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),ht=(0,M.Ay)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function mt(e){var t,n,i;let{parentProps:s,day:l,focusableDay:c,selectedDays:u,isDateDisabled:d,currentMonthNumber:p,isViewFocused:f}=e,h=(0,o.A)(e,ot);const{disabled:m,disableHighlightToday:g,isMonthSwitchingAnimating:v,showDaysOutsideCurrentMonth:y,components:b,componentsProps:w,slots:C,slotProps:A,timezone:S}=s,k=(0,x.hc)(),M=(0,x.cB)(S),E=null!==c&&k.isSameDay(l,c),R=u.some((e=>k.isSameDay(e,l))),P=k.isSameDay(l,M),I=null!=(t=null!=(n=null==C?void 0:C.day)?n:null==b?void 0:b.Day)?t:Be,N=(0,ee.Q)({elementType:I,externalSlotProps:null!=(i=null==A?void 0:A.day)?i:null==w?void 0:w.day,additionalProps:(0,r.A)({disableHighlightToday:g,showDaysOutsideCurrentMonth:y,role:"gridcell",isAnimating:v,"data-timestamp":k.toJsDate(l).valueOf()},h),ownerState:(0,r.A)({},s,{day:l,selected:R})}),$=(0,o.A)(N,at),O=a.useMemo((()=>m||d(l)),[m,d,l]),T=a.useMemo((()=>k.getMonth(l)!==p),[k,l,p]),_=a.useMemo((()=>{const e=k.startOfMonth(k.setMonth(l,p));return y?k.isSameDay(l,k.startOfWeek(e)):k.isSameDay(l,e)}),[p,l,y,k]),j=a.useMemo((()=>{const e=k.endOfMonth(k.setMonth(l,p));return y?k.isSameDay(l,k.endOfWeek(e)):k.isSameDay(l,e)}),[p,l,y,k]);return(0,D.jsx)(I,(0,r.A)({},$,{day:l,disabled:O,autoFocus:f&&E,today:P,outsideCurrentMonth:T,isFirstVisibleCell:_,isLastVisibleCell:j,selected:R,tabIndex:E?0:-1,"aria-selected":R,"aria-current":P?"date":void 0}))}const gt="undefined"!==typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),vt=gt&>[1]?parseInt(gt[1],10):null,yt=gt&>[2]?parseInt(gt[2],10):null,bt=vt&&vt<10||yt&&yt<13||!1,wt=()=>f("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||bt;var xt=n(79068),Ct=n(55969),At=n(75035),St=n(49204);const kt=["value","referenceDate"],Mt={emptyValue:null,getTodayValue:C.ak,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,o.A)(e,kt);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(0,At.$9)(r)},cleanValue:C.Q6,areValuesEqual:C.iH,isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},Et={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r,o)=>!e.isValid(t)&&!!n?n:(0,St.H6)(o(t),r),getValueStrFromSections:St.bl,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},Rt=e=>{const{value:t,referenceDate:n,defaultCalendarMonth:o,disableFuture:i,disablePast:s,disableSwitchToMonthOnDayFocus:l=!1,maxDate:c,minDate:u,onMonthChange:d,reduceAnimations:p,shouldDisableDate:f,timezone:h}=e,m=(0,x.cB)(h),g=(0,x.hc)(),v=a.useRef(((e,t,n)=>(o,a)=>{switch(a.type){case"changeMonth":return(0,r.A)({},o,{slideDirection:a.direction,currentMonth:a.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return(0,r.A)({},o,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=o.focusedDay&&null!=a.focusedDay&&n.isSameDay(a.focusedDay,o.focusedDay))return o;const i=null!=a.focusedDay&&!t&&!n.isSameMonth(o.currentMonth,a.focusedDay);return(0,r.A)({},o,{focusedDay:a.focusedDay,isMonthSwitchingAnimating:i&&!e&&!a.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(a.focusedDay):o.currentMonth,slideDirection:null!=a.focusedDay&&n.isAfterDay(a.focusedDay,o.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(p),l,g)).current,y=a.useMemo((()=>{let r=null;return n?r=n:o&&(r=g.startOfMonth(o)),Mt.getInitialReferenceValue({value:t,utils:g,timezone:h,props:e,referenceDate:r,granularity:At.yX.day})}),[]),[b,w]=a.useReducer(v,{isMonthSwitchingAnimating:!1,focusedDay:g.isValid(t)?t:m,currentMonth:g.startOfMonth(y),slideDirection:"left"}),C=a.useCallback((e=>{w((0,r.A)({type:"changeMonth"},e)),d&&d(e.newMonth)}),[d]),A=a.useCallback((e=>{const t=e;g.isSameMonth(t,b.currentMonth)||C({newMonth:g.startOfMonth(t),direction:g.isAfterDay(t,b.currentMonth)?"left":"right"})}),[b.currentMonth,C,g]),S=nt({shouldDisableDate:f,minDate:u,maxDate:c,disableFuture:i,disablePast:s,timezone:h}),k=a.useCallback((()=>{w({type:"finishMonthSwitchingAnimation"})}),[]),M=(0,Z.A)(((e,t)=>{S(e)||w({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}));return{referenceDate:y,calendarState:b,changeMonth:A,changeFocusedDay:M,isDateDisabled:S,onMonthSwitchingAnimationEnd:k,handleChangeMonth:C}};var Pt=n(70047),It=n(45151);function Dt(e){let{utils:t,range:n,newDate:r,rangePosition:o,allowRangeFlip:a=!1}=e;const[i,s]=n;if("start"===o){const e=a?{nextSelection:"start",newRange:[s,r]}:{nextSelection:"end",newRange:[r,null]};return Boolean(s)&&t.isAfter(r,s)?e:{nextSelection:"end",newRange:[r,s]}}const l=a?{nextSelection:"end",newRange:[r,i]}:{nextSelection:"end",newRange:[r,null]};return Boolean(i)&&t.isBefore(r,i)?l:{nextSelection:"start",newRange:[i,r]}}var Nt=n(95907),$t=n(69282);const Ot=["className","day","outsideCurrentMonth","isEndOfHighlighting","isEndOfPreviewing","isHighlighting","isPreviewing","isStartOfHighlighting","isStartOfPreviewing","selected","isVisuallySelected","sx","draggable","isFirstVisibleCell","isLastVisibleCell"],Tt={borderTopRightRadius:"50%",borderBottomRightRadius:"50%"},_t={borderTopLeftRadius:"50%",borderBottomLeftRadius:"50%"},jt=(0,M.Ay)("div",{name:"MuiDateRangePickerDay",slot:"Root",overridesResolver:(e,t)=>[{[`&.${Nt.s.rangeIntervalDayHighlight}`]:t.rangeIntervalDayHighlight},{[`&.${Nt.s.rangeIntervalDayHighlightStart}`]:t.rangeIntervalDayHighlightStart},{[`&.${Nt.s.rangeIntervalDayHighlightEnd}`]:t.rangeIntervalDayHighlightEnd},{[`&.${Nt.s.firstVisibleCell}`]:t.firstVisibleCell},{[`&.${Nt.s.lastVisibleCell}`]:t.lastVisibleCell},{[`&.${Nt.s.startOfMonth}`]:t.startOfMonth},{[`&.${Nt.s.endOfMonth}`]:t.endOfMonth},{[`&.${Nt.s.outsideCurrentMonth}`]:t.outsideCurrentMonth},{[`&.${Nt.s.hiddenDayFiller}`]:t.hiddenDayFiller},t.root]})((e=>{let{theme:t,ownerState:n}=e;return n.isHiddenDayFiller?{}:(0,r.A)({[`&:first-of-type .${Nt.s.rangeIntervalDayPreview}`]:(0,r.A)({},_t,{borderLeftColor:(t.vars||t).palette.divider}),[`&:last-of-type .${Nt.s.rangeIntervalDayPreview}`]:(0,r.A)({},Tt,{borderRightColor:(t.vars||t).palette.divider})},n.isHighlighting&&{borderRadius:0,color:(t.vars||t).palette.primary.contrastText,backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:(0,$e.X4)(t.palette.primary.main,t.palette.action.focusOpacity),"&:first-of-type":_t,"&:last-of-type":Tt},(n.isStartOfHighlighting||n.isFirstVisibleCell)&&(0,r.A)({},_t,{paddingLeft:0}),(n.isEndOfHighlighting||n.isLastVisibleCell)&&(0,r.A)({},Tt,{paddingRight:0}))}));jt.propTypes={ownerState:g().object.isRequired};const Ft=(0,M.Ay)("div",{name:"MuiDateRangePickerDay",slot:"RangeIntervalPreview",overridesResolver:(e,t)=>[{[`&.${Nt.s.rangeIntervalDayPreview}`]:t.rangeIntervalDayPreview},{[`&.${Nt.s.rangeIntervalDayPreviewStart}`]:t.rangeIntervalDayPreviewStart},{[`&.${Nt.s.rangeIntervalDayPreviewEnd}`]:t.rangeIntervalDayPreviewEnd},t.rangeIntervalPreview]})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({border:"2px solid transparent"},n.isPreviewing&&!n.isHiddenDayFiller&&(0,r.A)({borderRadius:0,border:`2px dashed ${(t.vars||t).palette.divider}`,borderLeftColor:"transparent",borderRightColor:"transparent"},(n.isStartOfPreviewing||n.isFirstVisibleCell)&&(0,r.A)({borderLeftColor:(t.vars||t).palette.divider},_t),(n.isEndOfPreviewing||n.isLastVisibleCell)&&(0,r.A)({borderRightColor:(t.vars||t).palette.divider},Tt)))}));Ft.propTypes={ownerState:g().object.isRequired};const Lt=(0,M.Ay)(Be,{name:"MuiDateRangePickerDay",slot:"Day",overridesResolver:(e,t)=>[{[`&.${Nt.s.dayInsideRangeInterval}`]:t.dayInsideRangeInterval},{[`&.${Nt.s.dayOutsideRangeInterval}`]:t.dayOutsideRangeInterval},{[`&.${Nt.s.notSelectedDate}`]:t.notSelectedDate},t.day]})((e=>{let{ownerState:t}=e;return(0,r.A)({transform:"scale(1.1)","& > *":{transform:"scale(0.9)"}},t.draggable&&{cursor:"grab"},t.draggable&&{touchAction:"none"})})),Vt=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiDateRangePickerDay"}),{className:a,day:i,outsideCurrentMonth:s,isHighlighting:l,isPreviewing:c,selected:u=!1,isVisuallySelected:d,sx:p,draggable:f,isFirstVisibleCell:m,isLastVisibleCell:g}=n,v=(0,o.A)(n,Ot);(0,$t.L)("x-date-pickers-pro","MTcwMzIyMTIwMDAwMA==");const y=(0,x.hc)(),b=y.isSameDay(i,y.endOfMonth(i)),w=y.isSameDay(i,y.startOfMonth(i)),C=(0,r.A)({},n,{selected:u,isStartOfMonth:w,isEndOfMonth:b,draggable:f,isFirstVisibleCell:m,isLastVisibleCell:g,isHiddenDayFiller:s&&!v.showDaysOutsideCurrentMonth}),A=(e=>{const{isHighlighting:t,outsideCurrentMonth:n,isStartOfHighlighting:r,isStartOfMonth:o,isEndOfHighlighting:a,isEndOfMonth:i,isPreviewing:s,isStartOfPreviewing:l,isEndOfPreviewing:c,isFirstVisibleCell:u,isLastVisibleCell:d,isHiddenDayFiller:p,selected:f,classes:h}=e,m={root:["root",t&&"rangeIntervalDayHighlight",r&&"rangeIntervalDayHighlightStart",a&&"rangeIntervalDayHighlightEnd",n&&"outsideCurrentMonth",o&&"startOfMonth",i&&"endOfMonth",u&&"firstVisibleCell",d&&"lastVisibleCell",p&&"hiddenDayFiller"],rangeIntervalPreview:["rangeIntervalPreview",s&&"rangeIntervalDayPreview",(l||o)&&"rangeIntervalDayPreviewStart",(c||i)&&"rangeIntervalDayPreviewEnd"],day:["day",!f&&"notSelectedDate",!t&&"dayOutsideRangeInterval",!f&&t&&"dayInsideRangeInterval"]};return(0,E.A)(m,Nt.k,h)})(C);return(0,D.jsx)(jt,{className:(0,S.A)(A.root,a),ownerState:C,sx:p,children:(0,D.jsx)(Ft,{className:A.rangeIntervalPreview,ownerState:C,children:(0,D.jsx)(Lt,(0,r.A)({},v,{ref:t,disableMargin:!0,day:i,selected:d,outsideCurrentMonth:s,className:A.day,ownerState:C,draggable:f,isFirstVisibleCell:m,isLastVisibleCell:g}))})})})),zt=a.memo(Vt),Ht=(e,t,n)=>{const r=e.dataset.timestamp;if(!r)return null;const o=+r;return t.dateWithTimezone(new Date(o).toISOString(),n)},Bt=e=>e?e instanceof HTMLButtonElement&&!e.disabled?e:e.children.length?Bt(e.children[0]):null:e,Gt=(e,t)=>{var n;if(1===(null==(n=e.changedTouches)?void 0:n.length)&&e.touches.length<=1){const n=document.elementFromPoint(e.changedTouches[0].clientX,e.changedTouches[0].clientY),r=Bt(n);return t&&r===e.changedTouches[0].target?null:r}return null},Wt=e=>{let{disableDragEditing:t,utils:n,onDatePositionChange:o,onDrop:i,dateRange:s,timezone:l}=e;const[c,u]=a.useState(!1),[d,p]=a.useState(null),f=(0,Z.A)((e=>{n.isEqual(e,d)||p(e)})),h=a.useMemo((()=>{const[e,t]=s;if(d){if(e&&n.isBefore(d,e))return"start";if(t&&n.isAfter(d,t))return"end"}return null}),[s,d,n]),m=(e=>{let{utils:t,setRangeDragDay:n,setIsDragging:r,isDragging:o,onDatePositionChange:i,onDrop:s,disableDragEditing:l,dateRange:c,timezone:u}=e;const d=a.useRef(null);a.useEffect((()=>{d.current=document.createElement("img"),d.current.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}),[]);const p=e=>{if(null==e)return!1;const n=!l&&!!c[0]&&!!c[1],r=(0,It.v8)(t,e,c),o=(0,It.es)(t,e,c);return n&&(r||o)},f=(0,Z.A)((e=>{const o=Ht(e.target,t,u);if(!p(o))return;e.stopPropagation(),d.current&&e.dataTransfer.setDragImage(d.current,0,0),n(o),e.dataTransfer.effectAllowed="move",r(!0);const a=e.target.dataset;a.timestamp&&e.dataTransfer.setData("draggingDate",a.timestamp),a.position&&i(a.position)})),h=(0,Z.A)((e=>{const r=Gt(e);if(!r)return;const o=Ht(r,t,u);p(o)&&n(o)})),m=(0,Z.A)((e=>{o&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="move",n(Ht(e.target,t,u)))})),g=(0,Z.A)((e=>{const o=Gt(e);if(!o)return;const a=Ht(o,t,u);if(a&&n(a),o!==e.changedTouches[0].target||!p(a))return;r(!0);const s=e.target.dataset;s.position&&i(s.position)})),v=(0,Z.A)((e=>{o&&(e.preventDefault(),e.stopPropagation())})),y=(0,Z.A)((e=>{o&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="move")})),b=(0,Z.A)((e=>{if(!o)return;n(null),r(!1);const a=Gt(e,!0);if(!a)return;a.focus();const i=Ht(a,t,u);i&&s(i)}));return{onDragStart:f,onDragEnter:m,onDragLeave:v,onDragOver:y,onDragEnd:(0,Z.A)((e=>{o&&(e.preventDefault(),e.stopPropagation(),r(!1),n(null))})),onDrop:(0,Z.A)((e=>{if(!o)return;if(e.preventDefault(),e.stopPropagation(),r(!1),n(null),e.currentTarget.focus(),(e=>e.target.dataset.timestamp===e.dataTransfer.getData("draggingDate"))(e))return;const a=Ht(e.target,t,u);a&&s(a)})),onTouchStart:h,onTouchMove:g,onTouchEnd:b}})({utils:n,onDatePositionChange:o,onDrop:i,setIsDragging:u,isDragging:c,setRangeDragDay:f,disableDragEditing:t,dateRange:s,timezone:l});return a.useMemo((()=>(0,r.A)({isDragging:c,rangeDragDay:d,draggingDatePosition:h},t?{}:m)),[c,d,h,t,m])},Ut=e=>{var t;const n=a.useRef(),[r,o]=(0,Pe.A)({name:"useRangePosition",state:"rangePosition",controlled:e.rangePosition,default:null!=(t=e.defaultRangePosition)?t:"start"});return{rangePosition:r,onRangePositionChange:(0,Z.A)((t=>{var r;o(t),null==(r=e.onRangePositionChange)||r.call(e,t),(e=>{if(null==n.current)return;const t=n.current.getSections(),r="start"===e?0:t.length/2;n.current.setSelectedSections(r)})(t)})),singleInputFieldRef:n}},Kt=["value","defaultValue","referenceDate","onChange","className","disableFuture","disablePast","minDate","maxDate","shouldDisableDate","reduceAnimations","onMonthChange","defaultCalendarMonth","rangePosition","defaultRangePosition","onRangePositionChange","calendars","currentMonthCalendarPosition","components","componentsProps","slots","slotProps","loading","renderLoading","disableHighlightToday","readOnly","disabled","showDaysOutsideCurrentMonth","dayOfWeekFormatter","disableAutoMonthSwitching","autoFocus","fixedWeekNumber","disableDragEditing","displayWeekNumber","timezone"],qt=["isDragging","rangeDragDay","draggingDatePosition"],Yt=(0,M.Ay)("div",{name:"MuiDateRangeCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row"}),Xt=(0,M.Ay)("div",{name:"MuiDateRangeCalendar",slot:"Container",overridesResolver:(e,t)=>t.monthContainer})((e=>{let{theme:t}=e;return{"&:not(:last-of-type)":{borderRight:`1px solid ${(t.vars||t).palette.divider}`}}})),Zt=(0,M.Ay)(me)({padding:"16px 16px 8px 16px",display:"flex",alignItems:"center",justifyContent:"space-between"}),Qt=((0,Re.f)(["The `currentMonthCalendarPosition` prop must be an integer between `1` and the amount of calendars rendered.","For example if you have 2 calendars rendered, it should be equal to either 1 or 2."]),(0,M.Ay)((function(e){const t=(0,h.A)({props:e,name:"MuiDayCalendar"}),{onFocusedDayChange:n,className:o,currentMonth:i,selectedDays:s,focusedDay:l,loading:c,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:p,reduceAnimations:f,renderLoading:m=()=>(0,D.jsx)("span",{children:"..."}),slideDirection:g,TransitionProps:v,disablePast:y,disableFuture:b,minDate:w,maxDate:A,shouldDisableDate:k,shouldDisableMonth:M,shouldDisableYear:R,dayOfWeekFormatter:P,hasFocus:I,onFocusedViewChange:N,gridLabelId:$,displayWeekNumber:O,fixedWeekNumber:T,autoFocus:_,timezone:j}=t,F=(0,x.cB)(j),L=(0,x.hc)(),V=(e=>{const{classes:t}=e;return(0,E.A)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},rt,t)})(t),z="rtl"===(0,re.A)().direction,H=P||((e,t)=>L.format(t,"weekdayShort").charAt(0).toUpperCase()),B=nt({shouldDisableDate:k,shouldDisableMonth:M,shouldDisableYear:R,minDate:w,maxDate:A,disablePast:y,disableFuture:b,timezone:j}),G=(0,x.Nq)(),[W,U]=(0,Pe.A)({name:"DayCalendar",state:"hasFocus",controlled:I,default:null!=_&&_}),[K,q]=a.useState((()=>l||F)),Y=(0,Z.A)((e=>{p||u(e)})),X=e=>{B(e)||(n(e),q(e),null==N||N(!0),U(!0))},Q=(0,Z.A)(((e,t)=>{switch(e.key){case"ArrowUp":X(L.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":X(L.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const n=L.addDays(t,z?1:-1),r=L.addMonths(t,z?1:-1),o=(0,C.il)({utils:L,date:n,minDate:z?n:L.startOfMonth(r),maxDate:z?L.endOfMonth(r):n,isDateDisabled:B,timezone:j});X(o||n),e.preventDefault();break}case"ArrowRight":{const n=L.addDays(t,z?-1:1),r=L.addMonths(t,z?-1:1),o=(0,C.il)({utils:L,date:n,minDate:z?L.startOfMonth(r):n,maxDate:z?n:L.endOfMonth(r),isDateDisabled:B,timezone:j});X(o||n),e.preventDefault();break}case"Home":X(L.startOfWeek(t)),e.preventDefault();break;case"End":X(L.endOfWeek(t)),e.preventDefault();break;case"PageUp":X(L.addMonths(t,1)),e.preventDefault();break;case"PageDown":X(L.addMonths(t,-1)),e.preventDefault()}})),J=(0,Z.A)(((e,t)=>X(t))),ee=(0,Z.A)(((e,t)=>{W&&L.isSameDay(K,t)&&(null==N||N(!1))})),te=L.getMonth(i),ne=a.useMemo((()=>s.filter((e=>!!e)).map((e=>L.startOfDay(e)))),[L,s]),oe=te,ae=a.useMemo((()=>a.createRef()),[oe]),ie=L.startOfWeek(F),se=a.useMemo((()=>{const e=L.startOfMonth(i),t=L.endOfMonth(i);return B(K)||L.isAfterDay(K,t)||L.isBeforeDay(K,e)?(0,C.il)({utils:L,date:K,minDate:e,maxDate:t,disablePast:y,disableFuture:b,isDateDisabled:B,timezone:j}):K}),[i,b,y,K,B,L,j]),le=a.useMemo((()=>{const e=L.setTimezone(i,j),t=L.getWeekArray(e);let n=L.addMonths(e,1);for(;T&&t.length<T;){const e=L.getWeekArray(n),r=L.isSameDay(t[t.length-1][0],e[0][0]);e.slice(r?1:0).forEach((e=>{t.length<T&&t.push(e)})),n=L.addMonths(n,1)}return t}),[i,T,L,j]);return(0,D.jsxs)(it,{role:"grid","aria-labelledby":$,className:V.root,children:[(0,D.jsxs)(st,{role:"row",className:V.header,children:[O&&(0,D.jsx)(ct,{variant:"caption",role:"columnheader","aria-label":G.calendarWeekNumberHeaderLabel,className:V.weekNumberLabel,children:G.calendarWeekNumberHeaderText}),(0,C.cH)(L,F).map(((e,t)=>{var n;const r=L.format(e,"weekdayShort");return(0,D.jsx)(lt,{variant:"caption",role:"columnheader","aria-label":L.format(L.addDays(ie,t),"weekday"),className:V.weekDayLabel,children:null!=(n=null==H?void 0:H(r,e))?n:r},r+t.toString())}))]}),c?(0,D.jsx)(dt,{className:V.loadingContainer,children:m()}):(0,D.jsx)(pt,(0,r.A)({transKey:oe,onExited:d,reduceAnimations:f,slideDirection:g,className:(0,S.A)(o,V.slideTransition)},v,{nodeRef:ae,children:(0,D.jsx)(ft,{ref:ae,role:"rowgroup",className:V.monthContainer,children:le.map(((e,n)=>(0,D.jsxs)(ht,{role:"row",className:V.weekContainer,"aria-rowindex":n+1,children:[O&&(0,D.jsx)(ut,{className:V.weekNumber,role:"rowheader","aria-label":G.calendarWeekNumberAriaLabelText(L.getWeekNumber(e[0])),children:G.calendarWeekNumberText(L.getWeekNumber(e[0]))}),e.map(((e,n)=>(0,D.jsx)(mt,{parentProps:t,day:e,selectedDays:ne,focusableDay:se,onKeyDown:Q,onFocus:J,onBlur:ee,onDaySelect:Y,isDateDisabled:B,currentMonthNumber:te,isViewFocused:W,"aria-colindex":n+1},e.toString())))]},`week-${e[0]}`)))})}))]})}))((e=>{let{theme:t}=e;return{minWidth:312,minHeight:264,[`&.${Pt.s.dayDragging}`]:{[`& .${Nt.s.day}`]:{cursor:"grabbing"},[`& .${Nt.s.root}:not(.${Nt.s.rangeIntervalDayHighlightStart}):not(.${Nt.s.rangeIntervalDayHighlightEnd}) .${Nt.s.day}:not(.${Nt.s.notSelectedDate})`]:{opacity:.6}},[`&:not(.${Pt.s.dayDragging}) .${Nt.s.dayOutsideRangeInterval}`]:{"@media (pointer: fine)":{"&:hover":{border:`1px solid ${(t.vars||t).palette.grey[500]}`}}}}})));const Jt=a.forwardRef((function(e,t){const n=function(e,t){var n,o,a,i,s,l,c;const u=(0,x.hc)(),d=(0,x.Yg)(),p=wt(),f=(0,h.A)({props:e,name:t});return(0,r.A)({},f,{renderLoading:null!=(n=f.renderLoading)?n:()=>(0,D.jsx)("span",{children:"..."}),reduceAnimations:null!=(o=f.reduceAnimations)?o:p,loading:null!=(a=e.loading)&&a,disablePast:null!=(i=e.disablePast)&&i,disableFuture:null!=(s=e.disableFuture)&&s,minDate:(0,C.IP)(u,f.minDate,d.minDate),maxDate:(0,C.IP)(u,f.maxDate,d.maxDate),calendars:null!=(l=f.calendars)?l:2,disableDragEditing:null!=(c=f.disableDragEditing)&&c})}(e,"MuiDateRangeCalendar"),i=f(xt.jX,{defaultMatches:!1}),{value:s,defaultValue:l,referenceDate:c,onChange:u,className:d,disableFuture:p,disablePast:m,minDate:g,maxDate:v,shouldDisableDate:b,reduceAnimations:k,onMonthChange:M,defaultCalendarMonth:R,rangePosition:P,defaultRangePosition:I,onRangePositionChange:N,calendars:$,currentMonthCalendarPosition:O=1,components:T,componentsProps:_,slots:j,slotProps:F,loading:L,renderLoading:V,disableHighlightToday:z,readOnly:H,disabled:B,showDaysOutsideCurrentMonth:G,dayOfWeekFormatter:W,disableAutoMonthSwitching:U,autoFocus:K,fixedWeekNumber:q,disableDragEditing:Y,displayWeekNumber:X,timezone:J}=n,ee=(0,o.A)(n,Kt),{value:te,handleValueChange:ne,timezone:re}=(0,Ct.Y)({name:"DateRangeCalendar",timezone:J,value:s,defaultValue:l,onChange:u,valueManager:w.S}),oe=(0,x.hc)(),ae=(0,x.Nq)(),ie=(0,x.cB)(re),se=null!=j?j:A(T),le=null!=F?F:_,{rangePosition:ce,onRangePositionChange:ue}=Ut({rangePosition:P,defaultRangePosition:I,onRangePositionChange:N}),de=(0,Z.A)((e=>{ce!==e&&ue(e)})),pe=(0,Z.A)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{nextSelection:r,newRange:o}=Dt({newDate:e,utils:oe,range:te,rangePosition:ce,allowRangeFlip:n});ue(r);const a="end"===ce&&(0,It.kB)(oe,o);ne(o,a?"finish":"partial")})),fe=(0,Z.A)((e=>{pe(e,void 0,!0)})),he=Y||B||H,me=a.useMemo((()=>[null!=te[0]&&oe.isValid(te[0])?oe.startOfDay(te[0]):te[0],null!=te[1]&&oe.isValid(te[1])?oe.endOfDay(te[1]):te[1]]),[te,oe]),ye=Wt({disableDragEditing:he,onDrop:fe,onDatePositionChange:de,utils:oe,dateRange:me,timezone:re}),{isDragging:be,rangeDragDay:we,draggingDatePosition:xe}=ye,Ce=(0,o.A)(ye,qt),Ae=(0,r.A)({},n,{isDragging:be}),Se=(e=>{const{classes:t,isDragging:n}=e,r={root:["root"],monthContainer:["monthContainer"],dayCalendar:[n&&"dayDragging"]};return(0,E.A)(r,Pt.m,t)})(Ae),ke=a.useMemo((()=>{if(!me[0]||!me[1]||!we)return[null,null];const e=Dt({utils:oe,range:me,newDate:we,rangePosition:ce,allowRangeFlip:!0}).newRange;return null!==e[0]&&null!==e[1]?[oe.startOfDay(e[0]),oe.endOfDay(e[1])]:e}),[ce,we,oe,me]),Me=a.useMemo((()=>{if(b)return e=>b(e,xe||ce)}),[b,ce,xe]),{calendarState:Re,changeFocusedDay:Pe,changeMonth:Ie,handleChangeMonth:De,onMonthSwitchingAnimationEnd:Ne}=Rt({value:te[0]||te[1],referenceDate:c,defaultCalendarMonth:R,disableFuture:p,disablePast:m,disableSwitchToMonthOnDayFocus:!0,maxDate:v,minDate:g,onMonthChange:M,reduceAnimations:k,shouldDisableDate:Me,timezone:re}),$e=a.useRef(null);a.useEffect((()=>{var e,t;const n="start"===ce?te[0]:te[1];if(!n||!oe.isValid(n))return;const r="start"===ce?null==(e=$e.current)?void 0:e[0]:null==(t=$e.current)?void 0:t[1];if($e.current=te,U&&r&&oe.isEqual(r,n))return;const o=$-1,a=oe.getMonth(Re.currentMonth),i=oe.getMonth(n);if(!oe.isSameYear(Re.currentMonth,n)||i<a||i>a+o){const e="start"===ce?n:oe.addMonths(n,-o);Ie(e)}}),[ce,te]);const Oe=a.useCallback((()=>{Ie(oe.addMonths(Re.currentMonth,1))}),[Ie,Re.currentMonth,oe]),Te=a.useCallback((()=>{Ie(oe.addMonths(Re.currentMonth,-1))}),[Ie,Re.currentMonth,oe]),_e=ge(Re.currentMonth,{disableFuture:p,maxDate:v,timezone:re}),je=ve(Re.currentMonth,{disablePast:m,minDate:g,timezone:re}),Fe={disablePast:m,disableFuture:p,maxDate:v,minDate:g},Le={disableHighlightToday:z,readOnly:H,disabled:B},Ve=B&&te[0]||g,ze=B&&te[1]||v,[He,Be]=a.useState(null),Ge=a.useMemo((()=>({onMouseLeave:()=>Be(null)})),[]),We=function(e){if(null==e.newDate)return[null,null];const[t,n]=e.range,{newRange:r}=Dt(e);if(!t||!n)return r;const[o,a]=r;return"end"===e.rangePosition?[n,a]:[o,t]}({utils:oe,range:me,newDate:He,rangePosition:ce}),Ue=(0,Z.A)(((e,t)=>{(0,It.XM)(oe,t,me)?Be(null):Be(t)})),Ke=(0,r.A)({day:zt},se),qe=(0,r.A)({},le,{day:e=>{var t;const{day:n}=e,o=(0,It.v8)(oe,n,me),a=(0,It.es)(oe,n,me),s=!he&&me[0]&&me[1]&&(o||a);let l;o?l="start":a&&(l="end");const c=be?(0,It.v8)(oe,n,ke):o,u=be?(0,It.es)(oe,n,ke):a;return(0,r.A)({isPreviewing:!!i&&(0,It.XM)(oe,n,We),isStartOfPreviewing:!!i&&(0,It.v8)(oe,n,We),isEndOfPreviewing:!!i&&(0,It.es)(oe,n,We),isHighlighting:(0,It.XM)(oe,n,be?ke:me),isStartOfHighlighting:c,isEndOfHighlighting:be?(0,It.es)(oe,n,ke):a,onMouseEnter:i?Ue:void 0,isVisuallySelected:e.selected||be&&(c||u),"data-position":l},Ce,{draggable:!!s||void 0},null!=(t=(0,y.Y)(null==le?void 0:le.day,e))?t:{})}}),Ye=a.useMemo((()=>Array.from({length:$}).map(((e,t)=>t))),[$]),Xe=a.useMemo((()=>{const e=oe.addMonths(Re.currentMonth,1-O);return Array.from({length:$}).map(((t,n)=>oe.addMonths(e,n)))}),[oe,Re.currentMonth,$,O]),Ze=a.useMemo((()=>{var e;return K?null!=te[0]?Xe.find((e=>oe.isSameMonth(e,te[0]))):null!=te[1]?Xe.find((e=>oe.isSameMonth(e,te[1]))):null!=(e=Xe.find((e=>oe.isSameMonth(e,ie))))?e:Xe[0]:null}),[oe,te,Xe,K,ie]);return(0,D.jsxs)(Yt,(0,r.A)({ref:t,className:(0,S.A)(d,Se.root),ownerState:Ae},ee,{children:[(0,D.jsx)(Q.n,{packageName:"x-date-pickers-pro",releaseInfo:"MTcwMzIyMTIwMDAwMA=="}),Ye.map(((e,t)=>(0,D.jsxs)(Xt,{className:Se.monthContainer,children:[1===$?(0,D.jsx)(Ee,{views:["day"],view:"day",currentMonth:Re.currentMonth,onMonthChange:(e,t)=>De({newMonth:e,direction:t}),minDate:Ve,maxDate:ze,disabled:B,disablePast:m,disableFuture:p,reduceAnimations:k,slots:se,slotProps:le,timezone:re}):(0,D.jsx)(Zt,{onGoToPrevious:Te,onGoToNext:Oe,isPreviousHidden:0!==t,isPreviousDisabled:je,previousLabel:ae.previousMonth,isNextHidden:t!==$-1,isNextDisabled:_e,nextLabel:ae.nextMonth,slots:se,slotProps:le,children:oe.format(Xe[e],"monthAndYear")}),(0,D.jsx)(Qt,(0,r.A)({className:Se.dayCalendar},Re,Fe,Le,{onMonthSwitchingAnimationEnd:Ne,onFocusedDayChange:Pe,reduceAnimations:k,selectedDays:te,onSelectedDaysChange:pe,currentMonth:Xe[e],TransitionProps:Ge,shouldDisableDate:Me,showDaysOutsideCurrentMonth:1===$&&G,dayOfWeekFormatter:W,loading:L,renderLoading:V,slots:Ke,slotProps:qe,autoFocus:Xe[e]===Ze,fixedWeekNumber:q,displayWeekNumber:X,timezone:re}),t)]},e)))]}))})),en=e=>{let{value:t,defaultValue:n,referenceDate:r,onChange:o,className:a,classes:i,disableFuture:s,disablePast:l,minDate:c,maxDate:u,shouldDisableDate:d,reduceAnimations:p,onMonthChange:f,defaultCalendarMonth:h,rangePosition:m,defaultRangePosition:g,onRangePositionChange:v,calendars:y,currentMonthCalendarPosition:b,components:w,componentsProps:x,slots:C,slotProps:A,loading:S,renderLoading:k,disableHighlightToday:M,readOnly:E,disabled:R,showDaysOutsideCurrentMonth:P,dayOfWeekFormatter:I,disableAutoMonthSwitching:N,sx:$,autoFocus:O,fixedWeekNumber:T,disableDragEditing:_,displayWeekNumber:j,timezone:F}=e;return(0,D.jsx)(Jt,{value:t,defaultValue:n,referenceDate:r,onChange:o,className:a,classes:i,disableFuture:s,disablePast:l,minDate:c,maxDate:u,shouldDisableDate:d,reduceAnimations:p,onMonthChange:f,defaultCalendarMonth:h,rangePosition:m,defaultRangePosition:g,onRangePositionChange:v,calendars:y,currentMonthCalendarPosition:b,components:w,componentsProps:x,slots:C,slotProps:A,loading:S,renderLoading:k,disableHighlightToday:M,readOnly:E,disabled:R,showDaysOutsideCurrentMonth:P,dayOfWeekFormatter:I,disableAutoMonthSwitching:N,sx:$,autoFocus:O,fixedWeekNumber:T,disableDragEditing:_,displayWeekNumber:j,timezone:F})};var tn=n(70849),nn=n(29925),rn=n(43446),on=n(59836),an=n(75432);const sn=e=>{let{props:t,inputRef:n}=e;const o=(e=>{var t,n,o;const a=(0,x.hc)(),i=(0,x.Yg)();return(0,r.A)({},e,{disablePast:null!=(t=e.disablePast)&&t,disableFuture:null!=(n=e.disableFuture)&&n,format:null!=(o=e.format)?o:a.formats.keyboardDate,minDate:(0,C.IP)(a,e.minDate,i.minDate),maxDate:(0,C.IP)(a,e.maxDate,i.maxDate)})})(t),{forwardedProps:a,internalProps:i}=(0,on.D)(o,"date");return(0,an.M)({inputRef:n,forwardedProps:a,internalProps:i,valueManager:Mt,fieldValueManager:Et,validator:tt.Z,valueType:"date"})};var ln=n(5380);const cn=e=>{var t,n,o;const a=(0,x.hc)(),i=(0,x.Yg)();return(0,r.A)({},e,{disablePast:null!=(t=e.disablePast)&&t,disableFuture:null!=(n=e.disableFuture)&&n,format:null!=(o=e.format)?o:a.formats.keyboardDate,minDate:(0,C.IP)(a,e.minDate,i.minDate),maxDate:(0,C.IP)(a,e.maxDate,i.maxDate)})},un=["shouldDisableDate"],dn=e=>{let{props:t,value:n,adapter:a}=e;const[i,s]=n,{shouldDisableDate:l}=t,c=(0,o.A)(t,un),u=[(0,tt.Z)({adapter:a,value:i,props:(0,r.A)({},c,{shouldDisableDate:e=>!(null==l||!l(e,"start"))})}),(0,tt.Z)({adapter:a,value:s,props:(0,r.A)({},c,{shouldDisableDate:e=>!(null==l||!l(e,"end"))})})];return u[0]||u[1]?u:null===i||null===s||(0,It.kB)(a.utils,n)?[null,null]:["invalidRange","invalidRange"]},pn=(e,t)=>Object.keys(e).reduce(((n,r)=>(t.includes(r)||(n[r]=e[r]),n)),{}),fn=["slots","slotProps","components","componentsProps","disabled","autoFocus","unstableStartFieldRef","unstableEndFieldRef","className"],hn=["onKeyDown","ref","readOnly","inputMode"],mn=["onKeyDown","ref","readOnly","inputMode"],gn=((0,P.A)("MuiMultiInputDateRangeField",["root","separator"]),e=>(0,R.Ay)("MuiMultiInputDateRangeField",e)),vn=(0,M.Ay)(a.forwardRef(((e,t)=>(0,D.jsx)(tn.A,(0,r.A)({ref:t,spacing:2,direction:"row",alignItems:"baseline"},e)))),{name:"MuiMultiInputDateRangeField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yn=(0,M.Ay)((e=>{var t;return(0,D.jsx)(k.A,(0,r.A)({},e,{children:null!=(t=e.children)?t:" \u2013 "}))}),{name:"MuiMultiInputDateRangeField",slot:"Separator",overridesResolver:(e,t)=>t.separator})({}),bn=a.forwardRef((function(e,t){var n,a,i,s;const l=(0,h.A)({props:e,name:"MuiMultiInputDateRangeField"}),{internalProps:c,forwardedProps:u}=(0,on.D)(l,"date"),{slots:d,slotProps:p,components:f,componentsProps:m,disabled:g,autoFocus:v,unstableStartFieldRef:y,unstableEndFieldRef:b,className:C}=u,k=(0,o.A)(u,fn),M=null!=d?d:A(f),R=null!=p?p:m,P=l,I=(e=>{const{classes:t}=e;return(0,E.A)({root:["root"],separator:["separator"]},gn,t)})(P),N=null!=(n=null==M?void 0:M.root)?n:vn,$=(0,rn.Q)({elementType:N,externalSlotProps:null==R?void 0:R.root,externalForwardedProps:k,additionalProps:{ref:t},ownerState:P,className:(0,S.A)(C,I.root)}),O=null!=(a=null==M?void 0:M.textField)?a:nn.A,T=(0,rn.Q)({elementType:O,externalSlotProps:null==R?void 0:R.textField,additionalProps:{autoFocus:v},ownerState:(0,r.A)({},P,{position:"start"})}),_=(0,rn.Q)({elementType:O,externalSlotProps:null==R?void 0:R.textField,ownerState:(0,r.A)({},P,{position:"end"})}),j=null!=(i=null==M?void 0:M.separator)?i:yn,F=(0,rn.Q)({elementType:j,externalSlotProps:null!=(s=null==R?void 0:R.separator)?s:null==m?void 0:m.separator,ownerState:P,className:I.separator}),L=(e=>{let{sharedProps:t,startTextFieldProps:n,startInputRef:o,unstableStartFieldRef:a,endTextFieldProps:i,endInputRef:s,unstableEndFieldRef:l}=e;const c=cn(t),u=(0,x.u)(),{value:d,defaultValue:p,format:f,formatDensity:h,shouldRespectLeadingZeros:m,onChange:g,disabled:v,readOnly:y,selectedSections:b,onSelectedSectionsChange:C,timezone:A}=c,{value:S,handleValueChange:k,timezone:M}=(0,Ct.Y)({name:"useMultiInputDateRangeField",timezone:A,value:d,defaultValue:p,onChange:g,valueManager:w.S}),E=e=>(t,n)=>{const o=0===e?[t,S[1]]:[S[0],t],a=(0,r.A)({},n,{validationError:dn({adapter:u,value:o,props:(0,r.A)({},c,{timezone:M})})});k(o,a)},R=(0,Z.A)(E(0)),P=(0,Z.A)(E(1)),I=(0,ln.$)((0,r.A)({},c,{value:S,timezone:M}),dn,w.S.isSameError,w.S.defaultErrorState),D=(0,r.A)({error:!!I[0]},n,{disabled:v,readOnly:y,format:f,formatDensity:h,shouldRespectLeadingZeros:m,timezone:M,unstableFieldRef:a,value:void 0===d?void 0:d[0],defaultValue:void 0===p?void 0:p[0],onChange:R,selectedSections:b,onSelectedSectionsChange:C}),N=(0,r.A)({error:!!I[1]},i,{format:f,formatDensity:h,shouldRespectLeadingZeros:m,disabled:v,readOnly:y,timezone:M,unstableFieldRef:l,value:void 0===d?void 0:d[1],defaultValue:void 0===p?void 0:p[1],onChange:P,selectedSections:b,onSelectedSectionsChange:C}),$=sn({props:D,inputRef:o}),O=sn({props:N,inputRef:s});return{startDate:pn($,["clearable","onClear"]),endDate:pn(O,["clearable","onClear"])}})({sharedProps:(0,r.A)({},c,{disabled:g}),startTextFieldProps:T,endTextFieldProps:_,unstableStartFieldRef:y,unstableEndFieldRef:b,startInputRef:T.inputRef,endInputRef:_.inputRef}),{startDate:{onKeyDown:V,ref:z,readOnly:H,inputMode:B},endDate:{onKeyDown:G,ref:W,readOnly:U,inputMode:K}}=L,q=(0,o.A)(L.startDate,mn),Y=(0,o.A)(L.endDate,hn);return(0,D.jsxs)(N,(0,r.A)({},$,{children:[(0,D.jsx)(O,(0,r.A)({fullWidth:!0},q,{InputProps:(0,r.A)({},q.InputProps,{readOnly:H}),inputProps:(0,r.A)({},q.inputProps,{ref:z,inputMode:B,onKeyDown:V})})),(0,D.jsx)(j,(0,r.A)({},F)),(0,D.jsx)(O,(0,r.A)({fullWidth:!0},Y,{InputProps:(0,r.A)({},Y.InputProps,{readOnly:U}),inputProps:(0,r.A)({},Y.inputProps,{ref:W,readOnly:U,inputMode:K,onKeyDown:G})}))]}))}));var wn=n(81831);function xn(e){return(0,R.Ay)("MuiPickersLayout",e)}const Cn=(0,P.A)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]);function An(e){return(0,R.Ay)("MuiDialogActions",e)}(0,P.A)("MuiDialogActions",["root","spacing"]);const Sn=["className","disableSpacing"],kn=(0,M.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,r.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),Mn=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiDialogActions"}),{className:a,disableSpacing:i=!1}=n,s=(0,o.A)(n,Sn),l=(0,r.A)({},n,{disableSpacing:i}),c=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,E.A)(r,An,t)})(l);return(0,D.jsx)(kn,(0,r.A)({className:(0,S.A)(c.root,a),ownerState:l,ref:t},s))})),En=["onAccept","onClear","onCancel","onSetToday","actions"];function Rn(e){const{onAccept:t,onClear:n,onCancel:a,onSetToday:i,actions:s}=e,l=(0,o.A)(e,En),c=(0,x.Nq)();if(null==s||0===s.length)return null;const u=null==s?void 0:s.map((e=>{switch(e){case"clear":return(0,D.jsx)(T.A,{onClick:n,children:c.clearButtonLabel},e);case"cancel":return(0,D.jsx)(T.A,{onClick:a,children:c.cancelButtonLabel},e);case"accept":return(0,D.jsx)(T.A,{onClick:t,children:c.okButtonLabel},e);case"today":return(0,D.jsx)(T.A,{onClick:i,children:c.todayButtonLabel},e);default:return null}}));return(0,D.jsx)(Mn,(0,r.A)({},l,{children:u}))}var Pn=n(249),In=n(74445),Dn=n(9785),Nn=n(31506),$n=n(13372);function On(e){return(0,R.Ay)("MuiListItem",e)}const Tn=(0,P.A)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);const _n=(0,P.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);var jn=n(71378);const Fn=["className"],Ln=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Vn=(0,M.Ay)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!n.disablePadding&&(0,r.A)({paddingTop:8,paddingBottom:8},n.dense&&{paddingTop:4,paddingBottom:4},!n.disableGutters&&{paddingLeft:16,paddingRight:16},!!n.secondaryAction&&{paddingRight:48}),!!n.secondaryAction&&{[`& > .${_n.root}`]:{paddingRight:48}},{[`&.${Tn.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${Tn.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,$e.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Tn.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:(0,$e.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${Tn.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"flex-start"===n.alignItems&&{alignItems:"flex-start"},n.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},n.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Tn.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:(0,$e.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:(0,$e.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}}},n.hasSecondaryAction&&{paddingRight:48})})),zn=(0,M.Ay)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Hn=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiListItem"}),{alignItems:i="center",autoFocus:s=!1,button:l=!1,children:u,className:d,component:p,components:f={},componentsProps:m={},ContainerComponent:g="li",ContainerProps:{className:v}={},dense:y=!1,disabled:b=!1,disableGutters:w=!1,disablePadding:x=!1,divider:C=!1,focusVisibleClassName:A,secondaryAction:k,selected:M=!1,slotProps:R={},slots:P={}}=n,I=(0,o.A)(n.ContainerProps,Fn),N=(0,o.A)(n,Ln),$=a.useContext($n.A),O=a.useMemo((()=>({dense:y||$.dense||!1,alignItems:i,disableGutters:w})),[i,$.dense,y,w]),T=a.useRef(null);(0,c.A)((()=>{s&&T.current&&T.current.focus()}),[s]);const _=a.Children.toArray(u),j=_.length&&(0,Dn.A)(_[_.length-1],["ListItemSecondaryAction"]),F=(0,r.A)({},n,{alignItems:i,autoFocus:s,button:l,dense:O.dense,disabled:b,disableGutters:w,disablePadding:x,divider:C,hasSecondaryAction:j,selected:M}),L=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:a,disableGutters:i,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e,d={root:["root",o&&"dense",!i&&"gutters",!s&&"padding",l&&"divider",a&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]};return(0,E.A)(d,On,r)})(F),V=(0,Nn.A)(T,t),z=P.root||f.Root||Vn,H=R.root||m.root||{},B=(0,r.A)({className:(0,S.A)(L.root,H.className,d),disabled:b},N);let G=p||"li";return l&&(B.component=p||"div",B.focusVisibleClassName=(0,S.A)(Tn.focusVisible,A),G=Ie.A),j?(G=B.component||p?G:"div","li"===g&&("li"===G?G="div":"li"===B.component&&(B.component="div")),(0,D.jsx)($n.A.Provider,{value:O,children:(0,D.jsxs)(zn,(0,r.A)({as:g,className:(0,S.A)(L.container,v),ref:V,ownerState:F},I,{children:[(0,D.jsx)(z,(0,r.A)({},H,!(0,In.g)(z)&&{as:G,ownerState:(0,r.A)({},F,H.ownerState)},B,{children:_})),_.pop()]}))})):(0,D.jsx)($n.A.Provider,{value:O,children:(0,D.jsxs)(z,(0,r.A)({},H,{as:G,ref:V},!(0,In.g)(z)&&{ownerState:(0,r.A)({},F,H.ownerState)},B,{children:[_,k&&(0,D.jsx)(jn.A,{children:k})]}))})}));var Bn=n(25277);const Gn=["items","changeImportance","isLandscape","onChange","isValid"],Wn=["getValue"];function Un(e){const{items:t,changeImportance:n,onChange:a,isValid:i}=e,s=(0,o.A)(e,Gn);if(null==t||0===t.length)return null;const l=t.map((e=>{let{getValue:t}=e,r=(0,o.A)(e,Wn);const s=t({isValid:i});return{label:r.label,onClick:()=>{a(s,n,r)},disabled:!i(s)}}));return(0,D.jsx)(Pn.A,(0,r.A)({dense:!0,sx:[{maxHeight:334,maxWidth:200,overflow:"auto"},...Array.isArray(s.sx)?s.sx:[s.sx]]},s,{children:l.map((e=>(0,D.jsx)(Hn,{children:(0,D.jsx)(Bn.A,(0,r.A)({},e))},e.label)))}))}const Kn=e=>{var t,n;const{wrapperVariant:o,onAccept:a,onClear:i,onCancel:s,onSetToday:l,view:c,views:u,onViewChange:d,value:p,onChange:f,onSelectShortcut:h,isValid:m,isLandscape:g,disabled:v,readOnly:y,children:b,components:w,componentsProps:x,slots:C,slotProps:S}=e,k=null!=C?C:A(w),M=null!=S?S:x,R=(e=>{const{classes:t,isLandscape:n}=e,r={root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]};return(0,E.A)(r,xn,t)})(e),P=null!=(t=null==k?void 0:k.actionBar)?t:Rn,I=(0,ee.Q)({elementType:P,externalSlotProps:null==M?void 0:M.actionBar,additionalProps:{onAccept:a,onClear:i,onCancel:s,onSetToday:l,actions:"desktop"===o?[]:["cancel","accept"],className:R.actionBar},ownerState:(0,r.A)({},e,{wrapperVariant:o})}),N=(0,D.jsx)(P,(0,r.A)({},I)),$=null==k?void 0:k.toolbar,O=(0,ee.Q)({elementType:$,externalSlotProps:null==M?void 0:M.toolbar,additionalProps:{isLandscape:g,onChange:f,value:p,view:c,onViewChange:d,views:u,disabled:v,readOnly:y,className:R.toolbar},ownerState:(0,r.A)({},e,{wrapperVariant:o})}),T=function(e){return null!==e.view}(O)&&$?(0,D.jsx)($,(0,r.A)({},O)):null,_=b,j=null==k?void 0:k.tabs,F=c&&j?(0,D.jsx)(j,(0,r.A)({view:c,onViewChange:d},null==M?void 0:M.tabs)):null,L=null!=(n=null==k?void 0:k.shortcuts)?n:Un,V=(0,ee.Q)({elementType:L,externalSlotProps:null==M?void 0:M.shortcuts,additionalProps:{isValid:m,isLandscape:g,onChange:h,className:R.shortcuts},ownerState:{isValid:m,isLandscape:g,onChange:h,className:R.shortcuts,wrapperVariant:o}});return{toolbar:T,content:_,tabs:F,actionBar:N,shortcuts:c&&L?(0,D.jsx)(L,(0,r.A)({},V)):null}},qn=(0,M.Ay)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:n}=e;return{display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Cn.toolbar}`]:n.isLandscape?{gridColumn:"rtl"===t.direction?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${Cn.shortcuts}`]:n.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:"rtl"===t.direction?3:1,gridRow:"2 / 3"},[`& .${Cn.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}}}));qn.propTypes={as:g().elementType,ownerState:g().shape({isLandscape:g().bool.isRequired}).isRequired,sx:g().oneOfType([g().arrayOf(g().oneOfType([g().func,g().object,g().bool])),g().func,g().object])};const Yn=(0,M.Ay)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Xn=function(e){const t=(0,h.A)({props:e,name:"MuiPickersLayout"}),{toolbar:n,content:r,tabs:o,actionBar:i,shortcuts:s}=Kn(t),{sx:l,className:c,isLandscape:u,ref:d,wrapperVariant:p}=t,f=t,m=(e=>{const{isLandscape:t,classes:n}=e,r={root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]};return(0,E.A)(r,xn,n)})(f);return(0,D.jsxs)(qn,{ref:d,sx:l,className:(0,S.A)(c,m.root),ownerState:f,children:[u?s:n,u?n:s,(0,D.jsx)(Yn,{className:m.contentWrapper,children:"desktop"===p?(0,D.jsxs)(a.Fragment,{children:[r,o]}):(0,D.jsxs)(a.Fragment,{children:[o,r]})}),i]})},Zn=e=>{let{props:t,valueManager:n,valueType:o,wrapperVariant:i,validator:s}=e;const{onAccept:l,onChange:c,value:u,defaultValue:d,closeOnSelect:p="desktop"===i,selectedSections:f,onSelectedSectionsChange:h,timezone:m}=t,{current:g}=a.useRef(d),{current:v}=a.useRef(void 0!==u);const y=(0,x.hc)(),b=(0,x.u)(),[w,C]=(0,Pe.A)({controlled:f,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:A,setIsOpen:S}=(e=>{let{open:t,onOpen:n,onClose:r}=e;const o=a.useRef("boolean"===typeof t).current,[i,s]=a.useState(!1);return a.useEffect((()=>{if(o){if("boolean"!==typeof t)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");s(t)}}),[o,t]),{isOpen:i,setIsOpen:a.useCallback((e=>{o||s(e),e&&n&&n(),!e&&r&&r()}),[o,n,r])}})(t),[k,M]=a.useState((()=>{let e;return e=void 0!==u?u:void 0!==g?g:n.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:u,hasBeenModifiedSinceMount:!1}})),{timezone:E,handleValueChange:R}=(0,Ct.M)({timezone:m,value:u,defaultValue:g,onChange:c,valueManager:n});(0,ln.$)((0,r.A)({},t,{value:k.draft,timezone:E}),s,n.isSameError,n.defaultErrorState);const P=(0,Z.A)((e=>{const o={action:e,dateState:k,hasChanged:t=>!n.areValuesEqual(y,e.value,t),isControlled:v,closeOnSelect:p},a=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,a=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!a||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!a||n(r.lastPublishedValue)))})(o),i=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:a}=e,i=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!i||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&a?!!i||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(o),c=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(o);if(M((t=>(0,r.A)({},t,{draft:e.value,lastPublishedValue:a?e.value:t.lastPublishedValue,lastCommittedValue:i?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}))),a){const n={validationError:"setValueFromField"===e.name?e.context.validationError:s({adapter:b,value:e.value,props:(0,r.A)({},t,{value:e.value,timezone:E})})};"setValueFromShortcut"===e.name&&null!=e.shortcut&&(n.shortcut=e.shortcut),R(e.value,n)}i&&l&&l(e.value),c&&S(!1)}));if(void 0!==u&&(void 0===k.lastControlledValue||!n.areValuesEqual(y,k.lastControlledValue,u))){const e=n.areValuesEqual(y,k.draft,u);M((t=>(0,r.A)({},t,{lastControlledValue:u},e?{}:{lastCommittedValue:u,lastPublishedValue:u,draft:u,hasBeenModifiedSinceMount:!0})))}const I=(0,Z.A)((()=>{P({value:n.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),D=(0,Z.A)((()=>{P({value:k.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),N=(0,Z.A)((()=>{P({value:k.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),$=(0,Z.A)((()=>{P({value:k.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),O=(0,Z.A)((()=>{P({value:n.getTodayValue(y,E,o),name:"setValueFromAction",pickerAction:"today"})})),T=(0,Z.A)((()=>S(!0))),_=(0,Z.A)((()=>S(!1))),j=(0,Z.A)((function(e){return P({name:"setValueFromView",value:e,selectionState:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"partial"})})),F=(0,Z.A)(((e,t,n)=>P({name:"setValueFromShortcut",value:e,changeImportance:null!=t?t:"accept",shortcut:n}))),L=(0,Z.A)(((e,t)=>P({name:"setValueFromField",value:e,context:t}))),V=(0,Z.A)((e=>{C(e),null==h||h(e)})),z={onClear:I,onAccept:D,onDismiss:N,onCancel:$,onSetToday:O,onOpen:T,onClose:_},H={value:k.draft,onChange:L,selectedSections:w,onSelectedSectionsChange:V},B=a.useMemo((()=>n.cleanValue(y,k.draft)),[y,n,k.draft]);return{open:A,fieldProps:H,viewProps:{value:B,onChange:j,onClose:_,open:A,onSelectedSectionsChange:V},layoutProps:(0,r.A)({},z,{value:B,onChange:j,onSelectShortcut:F,isValid:e=>{const o=s({adapter:b,value:e,props:(0,r.A)({},t,{value:e,timezone:E})});return!n.hasError(o)}}),actions:z}};var Qn=n(22412);const Jn=["className","sx"],er=e=>{let{props:t,propsFromPickerValue:n,additionalViewProps:i,inputRef:s,autoFocusView:l}=e;const{onChange:c,open:u,onSelectedSectionsChange:d,onClose:p}=n,{views:f,openTo:h,onViewChange:m,disableOpenPicker:g,viewRenderers:v,timezone:y}=t,b=(0,o.A)(t,Jn),{view:w,setView:x,defaultView:C,focusedView:A,setFocusedView:S,setValueAndGoToNextView:k}=function(e){let{onChange:t,onViewChange:n,openTo:r,view:o,views:i,autoFocus:s,focusedView:l,onFocusedViewChange:c}=e;var u,d;const p=a.useRef(r),f=a.useRef(i),h=a.useRef(i.includes(r)?r:i[0]),[m,g]=(0,Pe.A)({name:"useViews",state:"view",controlled:o,default:h.current}),v=a.useRef(s?m:null),[y,b]=(0,Pe.A)({name:"useViews",state:"focusedView",controlled:l,default:v.current});a.useEffect((()=>{(p.current&&p.current!==r||f.current&&f.current.some((e=>!i.includes(e))))&&(g(i.includes(r)?r:i[0]),f.current=i,p.current=r)}),[r,g,m,i]);const w=i.indexOf(m),x=null!=(u=i[w-1])?u:null,C=null!=(d=i[w+1])?d:null,A=(0,Z.A)(((e,t)=>{b(t?e:t=>e===t?null:t),null==c||c(e,t)})),S=(0,Z.A)((e=>{e!==m&&(g(e),A(e,!0),n&&n(e))})),k=(0,Z.A)((()=>{C&&S(C),A(C,!0)})),M=(0,Z.A)(((e,n,r)=>{const o="finish"===n,a=r?i.indexOf(r)<i.length-1:Boolean(C);t(e,o&&a?"partial":n),o&&k()})),E=(0,Z.A)(((e,n,r)=>{t(e,n?"partial":"finish",r),n&&(S(n),A(n,!0))}));return{view:m,setView:S,focusedView:y,setFocusedView:A,nextView:C,previousView:x,defaultView:i.includes(r)?r:i[0],goToNextView:k,setValueAndGoToNextView:M,setValueAndGoToView:E}}({view:void 0,views:f,openTo:h,onChange:c,onViewChange:m,autoFocus:l}),{hasUIView:M,viewModeLookup:E}=a.useMemo((()=>f.reduce(((e,t)=>{let n;return n=g?"field":null!=v[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e}),{hasUIView:!1,viewModeLookup:{}})),[g,v,f]),R=a.useMemo((()=>f.reduce(((e,t)=>null!=v[t]&&(0,Qn.hW)(t)?e+1:e),0)),[v,f]),P=E[w],I=(0,Z.A)((()=>"UI"===P)),[D,N]=a.useState("UI"===P?w:null);D!==w&&"UI"===E[w]&&N(w),(0,Ne.A)((()=>{"field"===P&&u&&(p(),setTimeout((()=>{null==s||s.current.focus(),d(w)})))}),[w]),(0,Ne.A)((()=>{if(!u)return;let e=w;"field"===P&&null!=D&&(e=D),e!==C&&"UI"===E[e]&&"UI"===E[C]&&(e=C),e!==w&&x(e),S(e,!0)}),[u]);return{hasUIView:M,shouldRestoreFocus:I,layoutProps:{views:f,view:D,onViewChange:x},renderCurrentView:()=>{if(null==D)return null;const e=v[D];return null==e?null:e((0,r.A)({},b,i,n,{views:f,timezone:y,onChange:k,view:D,onViewChange:x,focusedView:A,onFocusedViewChange:S,showViewSwitcher:R>1,timeViewsCount:R}))}}};function tr(){return"undefined"===typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const nr=e=>{let{props:t,propsFromPickerValue:n,propsFromPickerViews:o,wrapperVariant:i}=e;const{orientation:s}=t,l=((e,t)=>{const[n,r]=a.useState(tr);return(0,Ne.A)((()=>{const e=()=>{r(tr())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),!(0,xt.Xk)(e,["hours","minutes","seconds"])&&"landscape"===(t||n)})(o.views,s);return{layoutProps:(0,r.A)({},o,n,{isLandscape:l,wrapperVariant:i,disabled:t.disabled,readOnly:t.readOnly})}},rr=((0,Re.f)(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]),e=>{let{props:t,valueManager:n,valueType:r,wrapperVariant:o,inputRef:a,additionalViewProps:i,validator:s,autoFocusView:l}=e;const c=Zn({props:t,valueManager:n,valueType:r,wrapperVariant:o,validator:s}),u=er({props:t,inputRef:a,additionalViewProps:i,autoFocusView:l,propsFromPickerValue:c.viewProps}),d=nr({props:t,wrapperVariant:o,propsFromPickerValue:c.layoutProps,propsFromPickerViews:u.layoutProps});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:u.renderCurrentView,hasUIView:u.hasUIView,shouldRestoreFocus:u.shouldRestoreFocus,layoutProps:d.layoutProps}});var or=n(40165),ar=n(2235),ir=n(81952),sr=n(76493),lr=n(26907);function cr(e){return(0,R.Ay)("MuiPickersPopper",e)}(0,P.A)("MuiPickersPopper",["root","paper"]);const ur=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],dr=(0,M.Ay)(ir.A,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{zIndex:t.zIndex.modal}})),pr=(0,M.Ay)(ar.A,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})((e=>{let{ownerState:t}=e;return(0,r.A)({outline:0,transformOrigin:"top center"},t.placement.includes("top")&&{transformOrigin:"bottom center"})}));const fr=a.forwardRef(((e,t)=>{const{PaperComponent:n,popperPlacement:a,ownerState:i,children:s,paperSlotProps:l,paperClasses:c,onPaperClick:u,onPaperTouchStart:d}=e,p=(0,o.A)(e,ur),f=(0,r.A)({},i,{placement:a}),h=(0,ee.Q)({elementType:n,externalSlotProps:l,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:c,ownerState:f});return(0,D.jsx)(n,(0,r.A)({},p,h,{onClick:e=>{var t;u(e),null==(t=h.onClick)||t.call(h,e)},onTouchStart:e=>{var t;d(e),null==(t=h.onTouchStart)||t.call(h,e)},ownerState:f,children:s}))}));function hr(e){var t,n,o,i;const s=(0,h.A)({props:e,name:"MuiPickersPopper"}),{anchorEl:l,children:c,containerRef:u=null,shouldRestoreFocus:d,onBlur:p,onDismiss:f,open:m,role:g,placement:v,slots:y,slotProps:b,reduceAnimations:w}=s;a.useEffect((()=>{function e(e){!m||"Escape"!==e.key&&"Esc"!==e.key||f()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[f,m]);const x=a.useRef(null);a.useEffect((()=>{"tooltip"===g||d&&!d()||(m?x.current=(0,xt.bq)(document):x.current&&x.current instanceof HTMLElement&&setTimeout((()=>{x.current instanceof HTMLElement&&x.current.focus()})))}),[m,g,d]);const[C,A,S]=function(e,t){const n=a.useRef(!1),r=a.useRef(!1),o=a.useRef(null),i=a.useRef(!1);a.useEffect((()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),i.current=!1};function t(){i.current=!0}}),[e]);const s=(0,Z.A)((e=>{if(!i.current)return;const a=r.current;r.current=!1;const s=(0,lr.A)(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(o.current)>-1:!s.documentElement.contains(e.target)||o.current.contains(e.target),l||a||t(e)})),l=()=>{r.current=!0};return a.useEffect((()=>{if(e){const e=(0,lr.A)(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",s),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",t)}}}),[e,s]),a.useEffect((()=>{if(e){const e=(0,lr.A)(o.current);return e.addEventListener("click",s),()=>{e.removeEventListener("click",s),r.current=!1}}}),[e,s]),[o,l,l]}(m,null!=p?p:f),k=a.useRef(null),M=(0,De.A)(k,u),R=(0,De.A)(M,C),P=s,I=(e=>{const{classes:t}=e;return(0,E.A)({root:["root"],paper:["paper"]},cr,t)})(P),N=wt(),$=null!=w?w:N,O=(null!=(t=null==y?void 0:y.desktopTransition)?t:$)?J.A:or.A,T=null!=(n=null==y?void 0:y.desktopTrapFocus)?n:sr.s,_=null!=(o=null==y?void 0:y.desktopPaper)?o:pr,j=null!=(i=null==y?void 0:y.popper)?i:dr,F=(0,ee.Q)({elementType:j,externalSlotProps:null==b?void 0:b.popper,additionalProps:{transition:!0,role:g,open:m,anchorEl:l,placement:v,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),f())}},className:I.root,ownerState:s});return(0,D.jsx)(j,(0,r.A)({},F,{children:e=>{let{TransitionProps:t,placement:n}=e;return(0,D.jsx)(T,(0,r.A)({open:m,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===g,isEnabled:()=>!0},null==b?void 0:b.desktopTrapFocus,{children:(0,D.jsx)(O,(0,r.A)({},t,null==b?void 0:b.desktopTransition,{children:(0,D.jsx)(fr,{PaperComponent:_,ownerState:P,popperPlacement:n,ref:R,onPaperClick:A,onPaperTouchStart:S,paperClasses:I.paper,paperSlotProps:null==b?void 0:b.desktopPaper,children:c})}))}))}}))}const mr=["clearable","onClear"],gr=e=>"multi-input"===e.fieldType?(e=>{let{wrapperVariant:t,open:n,actions:i,readOnly:s,labelId:l,disableOpenPicker:c,onBlur:u,rangePosition:d,onRangePositionChange:p,localeText:f,pickerSlotProps:h,pickerSlots:m,fieldProps:g,anchorRef:v}=e;const b=(0,x.Nq)(),w=a.useRef(null),C=a.useRef(null);a.useEffect((()=>{var e;if(n)if("start"===d)null==(e=w.current)||e.focus();else if("end"===d){var t;null==(t=C.current)||t.focus()}}),[d,n]);const A=e=>{e.stopPropagation(),p("start"),s||c||i.onOpen()},S=e=>{e.stopPropagation(),p("end"),s||c||i.onOpen()},k=()=>{n&&p("start")},M=()=>{n&&p("end")},E=(0,r.A)({textField:null==m?void 0:m.textField,root:null==m?void 0:m.fieldRoot,separator:null==m?void 0:m.fieldSeparator},g.slots),R=(0,r.A)({},g.slotProps,{textField:e=>{const o=(0,y.Y)(null==h?void 0:h.textField,e);let a,i;var c,u;return"start"===e.position?(a=(0,r.A)({inputRef:w,label:null!=(c=null==f?void 0:f.start)?c:b.start,onKeyDown:(0,xt.rQ)(A),onFocus:k,focused:n?"start"===d:void 0},!s&&!g.disabled&&{onClick:A},"mobile"===t&&{readOnly:!0}),v&&(i=(0,r.A)({},null==o?void 0:o.InputProps,{ref:v}))):(a=(0,r.A)({inputRef:C,label:null!=(u=null==f?void 0:f.end)?u:b.end,onKeyDown:(0,xt.rQ)(S),onFocus:M,focused:n?"end"===d:void 0},!s&&!g.disabled&&{onClick:S},"mobile"===t&&{readOnly:!0}),i=null==o?void 0:o.InputProps),(0,r.A)({},null!=l&&{id:`${l}-${e.position}`},a,(0,y.Y)(null==h?void 0:h.textField,e),{InputProps:i})},root:e=>{const t={onBlur:u};return(0,r.A)({},t,(0,y.Y)(null==h?void 0:h.fieldRoot,e))},separator:null==h?void 0:h.fieldSeparator}),P=(0,o.A)(g,mr);return(0,r.A)({},P,{slots:E,slotProps:R})})(e):(e=>{let{wrapperVariant:t,open:n,actions:o,readOnly:i,inputRef:s,labelId:l,disableOpenPicker:c,label:u,onBlur:d,rangePosition:p,onRangePositionChange:f,singleInputFieldRef:h,pickerSlots:m,pickerSlotProps:g,fieldProps:v,anchorRef:y}=e;const b=a.useRef(null),w=(0,De.A)(s,b),x=(0,De.A)(v.unstableFieldRef,h);a.useEffect((()=>{var e;n&&(null==(e=b.current)||e.focus())}),[p,n]);const C=()=>{var e;if(!h.current||b.current!==(0,xt.bq)(document))return;const t=h.current.getSections(),n=null==(e=h.current)?void 0:e.getActiveSectionIndex(),r=null==n||n<t.length/2?"start":"end";null!=r&&r!==p&&f(r)},A=(0,Z.A)((e=>{var t;setTimeout(C),null==(t=v.onSelectedSectionsChange)||t.call(v,e)})),S=e=>{e.stopPropagation(),i||c||o.onOpen()},k=(0,r.A)({},v.slots,{textField:null==m?void 0:m.textField,clearButton:null==m?void 0:m.clearButton,clearIcon:null==m?void 0:m.clearIcon}),M=(0,r.A)({},v.slotProps,{textField:null==g?void 0:g.textField,clearButton:null==m?void 0:m.clearButton,clearIcon:null==m?void 0:m.clearIcon});return(0,r.A)({},v,{slots:k,slotProps:M,label:u,unstableFieldRef:x,inputRef:w,onKeyDown:(0,xt.rQ)(S,v.onKeyDown),onSelectedSectionsChange:A,onBlur:d,InputProps:(0,r.A)({ref:y},null==v?void 0:v.InputProps),focused:n},null!=l&&{id:l},"mobile"===t&&{readOnly:!0},!i&&!v.disabled&&{onClick:S})})(e),vr=["props"],yr=a.forwardRef((function(e,t){var n,i;const s=X(e,"MuiDesktopDateRangePicker"),l=(0,r.A)({day:en},s.viewRenderers),c=(0,r.A)({},s,{viewRenderers:l,calendars:null!=(n=s.calendars)?n:2,views:["day"],openTo:"day",slots:(0,r.A)({field:bn},s.slots),slotProps:(0,r.A)({},s.slotProps,{field:e=>{var n;return(0,r.A)({},(0,y.Y)(null==(n=s.slotProps)?void 0:n.field,e),(0,v.zd)(s),{ref:t})},toolbar:(0,r.A)({hidden:!0},null==(i=s.slotProps)?void 0:i.toolbar)})}),{renderPicker:u}=(e=>{var t,n;let{props:i}=e,s=(0,o.A)(e,vr);(0,$t.L)("x-date-pickers-pro","MTcwMzIyMTIwMDAwMA==");const{slots:l,slotProps:c,className:u,sx:d,format:p,formatDensity:f,timezone:h,label:m,inputRef:g,name:v,readOnly:y,disabled:b,autoFocus:w,disableOpenPicker:x,localeText:C,reduceAnimations:A}=i,S=a.useRef(null),k=a.useRef(null),M=a.useRef(null),{rangePosition:E,onRangePositionChange:R,singleInputFieldRef:P}=Ut(i),{open:I,actions:N,layoutProps:$,renderCurrentView:O,shouldRestoreFocus:T,fieldProps:_}=rr((0,r.A)({},s,{props:i,wrapperVariant:"desktop",autoFocusView:!0,additionalViewProps:{rangePosition:E,onRangePositionChange:R}})),j=()=>{(0,xt.G9)((()=>{var e,t;null!=(e=S.current)&&e.contains((0,xt.bq)(document))||null!=(t=M.current)&&t.contains((0,xt.bq)(document))||N.onDismiss()}))},F=l.field,L=null!=(t=F.fieldType)?t:"multi-input",V=(0,rn.Q)({elementType:F,externalSlotProps:null==c?void 0:c.field,additionalProps:(0,r.A)({},_,{readOnly:y,disabled:b,className:u,sx:d,format:p,formatDensity:f,timezone:h,autoFocus:w&&!i.open,ref:S},"single-input"===L&&{inputRef:g,name:v}),ownerState:i}),z=gr({wrapperVariant:"desktop",fieldType:L,open:I,actions:N,readOnly:y,disableOpenPicker:x,label:m,localeText:C,onBlur:j,rangePosition:E,onRangePositionChange:R,singleInputFieldRef:P,pickerSlotProps:c,pickerSlots:l,fieldProps:V,anchorRef:k}),H=(0,r.A)({},c,{toolbar:(0,r.A)({},null==c?void 0:c.toolbar,{rangePosition:E,onRangePositionChange:R})}),B=null!=(n=null==l?void 0:l.layout)?n:Xn;return{renderPicker:()=>(0,D.jsxs)(wn.$,{localeText:C,children:[(0,D.jsx)(F,(0,r.A)({},z)),(0,D.jsx)(hr,(0,r.A)({role:"tooltip",placement:"bottom-start",containerRef:M,anchorEl:k.current,onBlur:j},N,{open:I,slots:l,slotProps:c,shouldRestoreFocus:T,reduceAnimations:A,children:(0,D.jsx)(B,(0,r.A)({},$,null==c?void 0:c.layout,{slots:l,slotProps:H,children:O()}))}))]})}})({props:c,valueManager:w.S,valueType:"date",validator:dn});return u()}));function br(e){return(0,R.Ay)("MuiDialogContent",e)}yr.propTypes={autoFocus:g().bool,calendars:g().oneOf([1,2,3]),className:g().string,closeOnSelect:g().bool,components:g().object,componentsProps:g().object,currentMonthCalendarPosition:g().oneOf([1,2,3]),dayOfWeekFormatter:g().func,defaultCalendarMonth:g().any,defaultRangePosition:g().oneOf(["end","start"]),defaultValue:g().arrayOf(g().any),disableAutoMonthSwitching:g().bool,disabled:g().bool,disableDragEditing:g().bool,disableFuture:g().bool,disableHighlightToday:g().bool,disableOpenPicker:g().bool,disablePast:g().bool,displayWeekNumber:g().bool,fixedWeekNumber:g().number,format:g().string,formatDensity:g().oneOf(["dense","spacious"]),inputRef:b,label:g().node,loading:g().bool,localeText:g().object,maxDate:g().any,minDate:g().any,name:g().string,onAccept:g().func,onChange:g().func,onClose:g().func,onError:g().func,onMonthChange:g().func,onOpen:g().func,onRangePositionChange:g().func,onSelectedSectionsChange:g().func,open:g().bool,rangePosition:g().oneOf(["end","start"]),readOnly:g().bool,reduceAnimations:g().bool,referenceDate:g().any,renderLoading:g().func,selectedSections:g().oneOfType([g().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),g().number,g().shape({endIndex:g().number.isRequired,startIndex:g().number.isRequired})]),shouldDisableDate:g().func,showDaysOutsideCurrentMonth:g().bool,slotProps:g().object,slots:g().object,sx:g().oneOfType([g().arrayOf(g().oneOfType([g().func,g().object,g().bool])),g().func,g().object]),timezone:g().string,value:g().arrayOf(g().any),viewRenderers:g().shape({day:g().func})};(0,P.A)("MuiDialogContent",["root","dividers"]);const wr=(0,P.A)("MuiDialogTitle",["root"]),xr=["className","dividers"],Cr=(0,M.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${wr.root} + &`]:{paddingTop:0}})})),Ar=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiDialogContent"}),{className:a,dividers:i=!1}=n,s=(0,o.A)(n,xr),l=(0,r.A)({},n,{dividers:i}),c=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,E.A)(r,br,t)})(l);return(0,D.jsx)(Cr,(0,r.A)({className:(0,S.A)(c.root,a),ownerState:l,ref:t},s))}));var Sr=n(93539),kr=n(61676),Mr=n(13815);function Er(e){return(0,R.Ay)("MuiDialog",e)}const Rr=(0,P.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const Pr=a.createContext({});var Ir=n(55158);const Dr=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],Nr=(0,M.Ay)(Ir.A,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),$r=(0,M.Ay)(Mr.A,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Or=(0,M.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,kr.A)(n.scroll)}`]]}})((e=>{let{ownerState:t}=e;return(0,r.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),Tr=(0,M.Ay)(ar.A,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,kr.A)(n.scroll)}`],t[`paperWidth${(0,kr.A)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${Rr.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},n.maxWidth&&"xs"!==n.maxWidth&&{maxWidth:`${t.breakpoints.values[n.maxWidth]}${t.breakpoints.unit}`,[`&.${Rr.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Rr.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})})),_r=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiDialog"}),i=(0,re.A)(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":l,"aria-labelledby":c,BackdropComponent:u,BackdropProps:d,children:p,className:f,disableEscapeKeyDown:m=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:y="sm",onBackdropClick:b,onClose:w,open:x,PaperComponent:C=ar.A,PaperProps:A={},scroll:k="paper",TransitionComponent:M=J.A,transitionDuration:R=s,TransitionProps:P}=n,I=(0,o.A)(n,Dr),N=(0,r.A)({},n,{disableEscapeKeyDown:m,fullScreen:g,fullWidth:v,maxWidth:y,scroll:k}),$=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,i={root:["root"],container:["container",`scroll${(0,kr.A)(n)}`],paper:["paper",`paperScroll${(0,kr.A)(n)}`,`paperWidth${(0,kr.A)(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return(0,E.A)(i,Er,t)})(N),O=a.useRef(),T=(0,Sr.A)(c),_=a.useMemo((()=>({titleId:T})),[T]);return(0,D.jsx)($r,(0,r.A)({className:(0,S.A)($.root,f),closeAfterTransition:!0,components:{Backdrop:Nr},componentsProps:{backdrop:(0,r.A)({transitionDuration:R,as:u},d)},disableEscapeKeyDown:m,onClose:w,open:x,ref:t,onClick:e=>{O.current&&(O.current=null,b&&b(e),w&&w(e,"backdropClick"))},ownerState:N},I,{children:(0,D.jsx)(M,(0,r.A)({appear:!0,in:x,timeout:R,role:"presentation"},P,{children:(0,D.jsx)(Or,{className:(0,S.A)($.container),onMouseDown:e=>{O.current=e.target===e.currentTarget},ownerState:N,children:(0,D.jsx)(Tr,(0,r.A)({as:C,elevation:24,role:"dialog","aria-describedby":l,"aria-labelledby":T},A,{className:(0,S.A)($.paper,A.className),ownerState:N,children:(0,D.jsx)(Pr.Provider,{value:_,children:p})}))})}))}))})),jr=(0,M.Ay)(_r)({[`& .${Rr.container}`]:{outline:0},[`& .${Rr.paper}`]:{outline:0,minWidth:320}}),Fr=(0,M.Ay)(Ar)({"&:first-of-type":{padding:0}});function Lr(e){var t,n;const{children:o,onDismiss:a,open:i,slots:s,slotProps:l}=e,c=null!=(t=null==s?void 0:s.dialog)?t:jr,u=null!=(n=null==s?void 0:s.mobileTransition)?n:J.A;return(0,D.jsx)(c,(0,r.A)({open:i,onClose:a},null==l?void 0:l.dialog,{TransitionComponent:u,TransitionProps:null==l?void 0:l.mobileTransition,PaperComponent:null==s?void 0:s.mobilePaper,PaperProps:null==l?void 0:l.mobilePaper,children:(0,D.jsx)(Fr,{children:o})}))}const Vr=["props"],zr=a.forwardRef((function(e,t){var n;const a=X(e,"MuiMobileDateRangePicker"),i=(0,r.A)({day:en},a.viewRenderers),s=(0,r.A)({},a,{viewRenderers:i,calendars:1,views:["day"],openTo:"day",slots:(0,r.A)({field:bn},a.slots),slotProps:(0,r.A)({},a.slotProps,{field:e=>{var n;return(0,r.A)({},(0,y.Y)(null==(n=a.slotProps)?void 0:n.field,e),(0,v.zd)(a),{ref:t})},toolbar:(0,r.A)({hidden:!1},null==(n=a.slotProps)?void 0:n.toolbar)})}),{renderPicker:l}=(e=>{var t,n,a,i;let{props:s}=e,l=(0,o.A)(e,Vr);(0,$t.L)("x-date-pickers-pro","MTcwMzIyMTIwMDAwMA==");const{slots:c,slotProps:u,className:d,sx:p,format:f,formatDensity:h,timezone:m,label:g,inputRef:v,name:y,readOnly:b,disabled:w,disableOpenPicker:C,localeText:A}=s,{rangePosition:S,onRangePositionChange:k,singleInputFieldRef:M}=Ut(s),E=(0,Sr.A)(),R=(0,x.Nq)(),{open:P,actions:I,layoutProps:N,renderCurrentView:$,fieldProps:O}=rr((0,r.A)({},l,{props:s,wrapperVariant:"mobile",autoFocusView:!0,additionalViewProps:{rangePosition:S,onRangePositionChange:k}})),T=c.field,_=null!=(t=T.fieldType)?t:"multi-input",j=(0,rn.Q)({elementType:T,externalSlotProps:null==u?void 0:u.field,additionalProps:(0,r.A)({},O,{readOnly:null==b||b,disabled:w,className:d,sx:p,format:f,formatDensity:h,timezone:m},"single-input"===_&&{inputRef:v,name:y}),ownerState:s}),F=null!=(n=null==u||null==(a=u.toolbar)?void 0:a.hidden)&&n,L=gr({wrapperVariant:"mobile",fieldType:_,open:P,actions:I,readOnly:b,labelId:E,disableOpenPicker:C,label:g,localeText:A,rangePosition:S,onRangePositionChange:k,singleInputFieldRef:M,pickerSlots:c,pickerSlotProps:u,fieldProps:j}),V=(0,r.A)({},u,{toolbar:(0,r.A)({},null==u?void 0:u.toolbar,{titleId:E,rangePosition:S,onRangePositionChange:k})}),z=null!=(i=null==c?void 0:c.layout)?i:Xn,H=(0,r.A)({},R,A);let B=E;if(F){const e=[];"multi-input"===_?(H.start&&e.push(`${E}-start-label`),H.end&&e.push(`${E}-end-label`)):null!=g&&e.push(`${E}-label`),B=e.length>0?e.join(" "):void 0}const G=(0,r.A)({},u,{mobilePaper:(0,r.A)({"aria-labelledby":B},null==u?void 0:u.mobilePaper)});return{renderPicker:()=>(0,D.jsxs)(wn.$,{localeText:A,children:[(0,D.jsx)(T,(0,r.A)({},L)),(0,D.jsx)(Lr,(0,r.A)({},I,{open:P,slots:c,slotProps:G,children:(0,D.jsx)(z,(0,r.A)({},N,null==G?void 0:G.layout,{slots:c,slotProps:V,children:$()}))}))]})}})({props:s,valueManager:w.S,valueType:"date",validator:dn});return l()}));zr.propTypes={autoFocus:g().bool,calendars:g().oneOf([1,2,3]),className:g().string,closeOnSelect:g().bool,components:g().object,componentsProps:g().object,currentMonthCalendarPosition:g().oneOf([1,2,3]),dayOfWeekFormatter:g().func,defaultCalendarMonth:g().any,defaultRangePosition:g().oneOf(["end","start"]),defaultValue:g().arrayOf(g().any),disableAutoMonthSwitching:g().bool,disabled:g().bool,disableDragEditing:g().bool,disableFuture:g().bool,disableHighlightToday:g().bool,disableOpenPicker:g().bool,disablePast:g().bool,displayWeekNumber:g().bool,fixedWeekNumber:g().number,format:g().string,formatDensity:g().oneOf(["dense","spacious"]),inputRef:b,label:g().node,loading:g().bool,localeText:g().object,maxDate:g().any,minDate:g().any,name:g().string,onAccept:g().func,onChange:g().func,onClose:g().func,onError:g().func,onMonthChange:g().func,onOpen:g().func,onRangePositionChange:g().func,onSelectedSectionsChange:g().func,open:g().bool,rangePosition:g().oneOf(["end","start"]),readOnly:g().bool,reduceAnimations:g().bool,referenceDate:g().any,renderLoading:g().func,selectedSections:g().oneOfType([g().oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),g().number,g().shape({endIndex:g().number.isRequired,startIndex:g().number.isRequired})]),shouldDisableDate:g().func,showDaysOutsideCurrentMonth:g().bool,slotProps:g().object,slots:g().object,sx:g().oneOfType([g().arrayOf(g().oneOfType([g().func,g().object,g().bool])),g().func,g().object]),timezone:g().string,value:g().arrayOf(g().any),viewRenderers:g().shape({day:g().func})};const Hr=["desktopModeMediaQuery"],Br=a.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiDateRangePicker"}),{desktopModeMediaQuery:a="@media (pointer: fine)"}=n,i=(0,o.A)(n,Hr);return f(a,{defaultMatches:!0})?(0,D.jsx)(yr,(0,r.A)({ref:t},i)):(0,D.jsx)(zr,(0,r.A)({ref:t},i))}))},16479:(e,t,n)=>{"use strict";n.d(t,{J:()=>I});var r=n(58168),o=n(98587),a=n(9950),i=n(29925),s=n(48283),l=n(43446),c=n(75874),u=n(25333),d=n(2046),p=n(99743),f=n(46),h=n(44414);const m=["ownerState"];var g=n(50853),v=n(59836),y=n(75432),b=n(83772),w=n(53807),x=n(22412);const C=e=>{let{props:t,value:n,adapter:r}=e;const o=(0,w.Z)({adapter:r,value:n,props:t});return null!==o?o:(e=>{let{adapter:t,value:n,props:r}=e;if(null===n)return null;const{minTime:o,maxTime:a,minutesStep:i,shouldDisableClock:s,shouldDisableTime:l,disableIgnoringDatePartForTimeValidation:c=!1,disablePast:u,disableFuture:d,timezone:p}=r,f=t.utils.dateWithTimezone(void 0,p),h=(0,x.iF)(c,t.utils);switch(!0){case!t.utils.isValid(n):return"invalidDate";case Boolean(o&&h(o,n)):return"minTime";case Boolean(a&&h(n,a)):return"maxTime";case Boolean(d&&t.utils.isAfter(n,f)):return"disableFuture";case Boolean(u&&t.utils.isBefore(n,f)):return"disablePast";case Boolean(l&&l(n,"hours")):return"shouldDisableTime-hours";case Boolean(l&&l(n,"minutes")):return"shouldDisableTime-minutes";case Boolean(l&&l(n,"seconds")):return"shouldDisableTime-seconds";case Boolean(s&&s(t.utils.getHours(n),"hours")):return"shouldDisableClock-hours";case Boolean(s&&s(t.utils.getMinutes(n),"minutes")):return"shouldDisableClock-minutes";case Boolean(s&&s(t.utils.getSeconds(n),"seconds")):return"shouldDisableClock-seconds";case Boolean(i&&t.utils.getMinutes(n)%i!==0):return"minutesStep";default:return null}})({adapter:r,value:n,props:t})};var A=n(45151);const S=["shouldDisableDate"],k=e=>{let{props:t,value:n,adapter:a}=e;const[i,s]=n,{shouldDisableDate:l}=t,c=(0,o.A)(t,S),u=[C({adapter:a,value:i,props:(0,r.A)({},c,{shouldDisableDate:e=>!(null==l||!l(e,"start"))})}),C({adapter:a,value:s,props:(0,r.A)({},c,{shouldDisableDate:e=>!(null==l||!l(e,"end"))})})];return u[0]||u[1]?u:null===i||null===s||(0,A.kB)(a.utils,n)?[null,null]:["invalidRange","invalidRange"]},M=e=>{let{props:t,inputRef:n}=e;const o=(e=>{var t,n,o,a,i,s,l,c;const u=(0,f.hc)(),d=(0,f.Yg)(),p=(null!=(t=e.ampm)?t:u.is12HourCycleInCurrentLocale())?u.formats.keyboardDateTime12h:u.formats.keyboardDateTime24h;return(0,r.A)({},e,{disablePast:null!=(n=e.disablePast)&&n,disableFuture:null!=(o=e.disableFuture)&&o,format:null!=(a=e.format)?a:p,minDate:(0,g.IP)(u,null!=(i=e.minDateTime)?i:e.minDate,d.minDate),maxDate:(0,g.IP)(u,null!=(s=e.maxDateTime)?s:e.maxDate,d.maxDate),minTime:null!=(l=e.minDateTime)?l:e.minTime,maxTime:null!=(c=e.maxDateTime)?c:e.maxTime,disableIgnoringDatePartForTimeValidation:Boolean(e.minDateTime||e.maxDateTime)})})(t),{forwardedProps:a,internalProps:i}=(0,v.D)(o,"date-time");return(0,y.M)({inputRef:n,forwardedProps:a,internalProps:i,valueManager:b.S,fieldValueManager:b.u,validator:k,valueType:"date-time"})},E=["slots","slotProps","components","componentsProps","InputProps","inputProps"],R=["inputRef"],P=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],I=a.forwardRef((function(e,t){var n,g,v;const y=(0,s.A)({props:e,name:"MuiSingleInputDateTimeRangeField"}),{slots:b,slotProps:w,components:x,componentsProps:C,InputProps:A,inputProps:S}=y,k=(0,o.A)(y,E),I=y,D=null!=(n=null!=(g=null==b?void 0:b.textField)?g:null==x?void 0:x.TextField)?n:i.A,N=(0,l.Q)({elementType:D,externalSlotProps:null!=(v=null==w?void 0:w.textField)?v:null==C?void 0:C.textField,externalForwardedProps:k,ownerState:I}),{inputRef:$}=N,O=(0,o.A)(N,R);O.inputProps=(0,r.A)({},S,O.inputProps),O.InputProps=(0,r.A)({},A,O.InputProps);const T=M({props:O,inputRef:$}),{ref:_,onPaste:j,onKeyDown:F,inputMode:L,readOnly:V,clearable:z,onClear:H}=T,B=(0,o.A)(T,P),{InputProps:G,fieldProps:W}=(e=>{let{clearable:t,fieldProps:n,InputProps:i,onClear:s,slots:l,slotProps:g,components:v,componentsProps:y}=e;var b,w,x,C,A,S;const k=(0,f.Nq)(),M=null!=(b=null!=(w=null==l?void 0:l.clearButton)?w:null==v?void 0:v.ClearButton)?b:u.A,E=(0,c.Q)({elementType:M,externalSlotProps:null!=(x=null==g?void 0:g.clearButton)?x:null==y?void 0:y.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:k.fieldClearLabel}}),R=(0,o.A)(E,m),P=null!=(C=null!=(A=null==l?void 0:l.clearIcon)?A:null==v?void 0:v.ClearIcon)?C:p.vu,I=(0,c.Q)({elementType:P,externalSlotProps:null!=(S=null==g?void 0:g.clearIcon)?S:null==y?void 0:y.clearIcon,ownerState:{}});return{InputProps:(0,r.A)({},i,{endAdornment:t?(0,h.jsxs)(a.Fragment,{children:[(0,h.jsx)(d.A,{position:"end",sx:{marginRight:null!=i&&i.endAdornment?-1:-1.5},children:(0,h.jsx)(M,(0,r.A)({},R,{onClick:s,children:(0,h.jsx)(P,(0,r.A)({fontSize:"small"},I))}))}),null==i?void 0:i.endAdornment]}):null==i?void 0:i.endAdornment}),fieldProps:(0,r.A)({},n,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(n.sx)?n.sx:[n.sx]]})}})({onClear:H,clearable:z,fieldProps:B,InputProps:B.InputProps,slots:b,slotProps:w,components:x,componentsProps:C});return(0,h.jsx)(D,(0,r.A)({ref:t},W,{InputProps:(0,r.A)({},G,{readOnly:V}),inputProps:(0,r.A)({},B.inputProps,{inputMode:L,onPaste:j,onKeyDown:F,ref:_})}))}));I.fieldType="single-input"},45151:(e,t,n)=>{"use strict";n.d(t,{XM:()=>o,es:()=>i,kB:()=>r,v8:()=>a});const r=(e,t)=>Boolean(t&&t[0]&&t[1]&&!e.isBefore(t[1],t[0])),o=(e,t,n)=>r(e,n)&&e.isWithinRange(t,n),a=(e,t,n)=>r(e,n)&&e.isSameDay(t,n[0]),i=(e,t,n)=>r(e,n)&&e.isSameDay(t,n[1])},83772:(e,t,n)=>{"use strict";n.d(t,{u:()=>d,S:()=>u});var r=n(58168),o=n(98587),a=n(50853),i=n(75035),s=n(49204);const l=e=>{const t=[],n=[];return e.forEach((e=>{"start"===e.dateName?t.push(e):n.push(e)})),{startDate:t,endDate:n}},c=["value","referenceDate"],u={emptyValue:[null,null],getTodayValue:(e,t,n)=>[(0,a.ak)(e,t,n),(0,a.ak)(e,t,n)],getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,o.A)(e,c);const a=null!=t[0]&&r.utils.isValid(t[0]),s=null!=t[1]&&r.utils.isValid(t[1]);if(a&&s)return t;const l=null!=n?n:(0,i.$9)(r);return[a?t[0]:l,s?t[1]:l]},cleanValue:(e,t)=>t.map((t=>(0,a.Q6)(e,t))),areValuesEqual:(e,t,n)=>(0,a.iH)(e,t[0],n[0])&&(0,a.iH)(e,t[1],n[1]),isSameError:(e,t)=>null!==t&&e[1]===t[1]&&e[0]===t[0],hasError:e=>null!=e[0]||null!=e[1],defaultErrorState:[null,null],getTimezone:(e,t)=>{const n=null!=t[0]&&e.isValid(t[0])?e.getTimezone(t[0]):null,r=null!=t[1]&&e.isValid(t[1])?e.getTimezone(t[1]):null;if(null!=n&&null!=r&&n!==r)throw new Error("MUI: The timezone of the start and the end date should be the same");return null!=n?n:r},setTimezone:(e,t,n)=>[null==n[0]?null:e.setTimezone(n[0],t),null==n[1]?null:e.setTimezone(n[1],t)]},d={updateReferenceValue:(e,t,n)=>{const r=null!=t[0]&&e.isValid(t[0]),o=null!=t[1]&&e.isValid(t[1]);return r||o?r&&o?t:r?[t[0],n[0]]:[n[1],t[1]]:n},getSectionsFromValue:(e,t,n,o,a)=>{let[i,c]=t;const u=null==n?{startDate:null,endDate:null}:l(n),d=(t,n,i)=>{if(!e.isValid(t)&&!!n)return n;const s=a(t);return s.map(((e,t)=>t===s.length-1&&"start"===i?(0,r.A)({},e,{dateName:i,endSeparator:`${e.endSeparator}${o?"\u2069 \u2013 \u2066":" \u2013 "}`}):(0,r.A)({},e,{dateName:i})))};return(0,s.H6)([...d(i,u.startDate,"start"),...d(c,u.endDate,"end")],o)},getValueStrFromSections:(e,t)=>{const n=l(e);return(0,s.bl)([...n.startDate,...n.endDate],t)},parseValueStr:(e,t,n)=>{const[r,o]=e.split("\u2013");return[r,o].map(((e,r)=>null==e?null:n(e.trim(),t[r])))},getActiveDateManager:(e,t,n)=>{const o="start"===n.dateName?0:1,a=(e,t)=>0===o?[e,t[1]]:[t[0],e];return{date:t.value[o],referenceDate:t.referenceValue[o],getSections:e=>{const t=l(e);return 0===o?(n=t.startDate).map(((e,t)=>t===n.length-1?(0,r.A)({},e,{separator:null}):e)):t.endDate;var n},getNewValuesFromNewActiveDate:n=>({value:a(n,t.value),referenceValue:null!=n&&e.isValid(n)?a(n,t.referenceValue):t.referenceValue})}}}},69734:(e,t,n)=>{"use strict";function r(e,t,n){return"function"===typeof e?e(t,n):e}n.d(t,{Y:()=>r})},43446:(e,t,n)=>{"use strict";n.d(t,{Q:()=>l});var r=n(9950);var o=n(72004);function a(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function i(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const e=(0,o.A)(n?.className,s,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}({...i,...r}),c=a(r),u=a(i),d=t(l),p=(0,o.A)(d?.className,n?.className,s,i?.className,r?.className),f={...d?.style,...n?.style,...i?.style,...r?.style},h={...d,...n,...u,...c};return p.length>0&&(h.className=p),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:d.ref}}var s=n(69734);function l(e){const{elementType:t,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:a=!1,...l}=e,c=a?{}:(0,s.Y)(n,o),{props:u,internalRef:d}=i({...l,externalSlotProps:c}),p=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}(d,c?.ref,e.additionalProps?.ref),f=function(e,t,n){return void 0===e||"string"===typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(t,{...u,ref:p},o);return f}},95359:(e,t,n)=>{"use strict";n.d(t,{R:()=>w});var r=n(58168),o=n(4159),a=n.n(o),i=n(43540),s=n.n(i),l=n(90923),c=n.n(l),u=n(77588),d=n.n(u),p=n(87542),f=n.n(p),h=n(46081);a().extend(c()),a().extend(d()),a().extend(f());const m=(0,h.f)(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),g={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},v={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},y=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n"),b=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");class w{constructor(){let{locale:e,formats:t,instance:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var o,i,l;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=g,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasUTCPlugin=()=>"undefined"!==typeof a().utc,this.hasTimezonePlugin=()=>"undefined"!==typeof a().tz,this.isSame=(e,t,n)=>{const r=this.setTimezone(t,this.getTimezone(e));return e.format(n)===r.format(n)},this.cleanTimezone=e=>{switch(e){case"default":return;case"system":return a().tz.guess();default:return e}},this.createSystemDate=e=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(e);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const t=a().tz.guess();return"UTC"!==t?a().tz(e,t):a()(e)}return a()(e)},this.createUTCDate=e=>{if(!this.hasUTCPlugin())throw new Error(y);return a().utc(e)},this.createTZDate=(e,t)=>{if(!this.hasUTCPlugin())throw new Error(y);if(!this.hasTimezonePlugin())throw new Error(b);const n=void 0!==e&&!e.endsWith("Z");return a()(e).tz(this.cleanTimezone(t),n)},this.getLocaleFormats=()=>{const e=a().Ls;let t=e[this.locale||"en"];return void 0===t&&(m(),t=e.en),t.formats},this.adjustOffset=e=>{if(!this.hasTimezonePlugin())return e;const t=this.getTimezone(e);if("UTC"!==t){var n,r;const o=e.tz(this.cleanTimezone(t),!0);return(null!=(n=o.$offset)?n:0)===(null!=(r=e.$offset)?r:0)?e:o}return e},this.date=e=>null===e?null:this.dayjs(e),this.dateWithTimezone=(e,t)=>{if(null===e)return null;let n;return n="UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),void 0===this.locale?n:n.locale(this.locale)},this.getTimezone=e=>{if(this.hasTimezonePlugin()){var t;const n=null==(t=e.$x)?void 0:t.$timezone;if(n)return n}return this.hasUTCPlugin()&&e.isUTC()?"UTC":"system"},this.setTimezone=(e,t)=>{if(this.getTimezone(e)===t)return e;if("UTC"===t){if(!this.hasUTCPlugin())throw new Error(y);return e.utc()}if("system"===t)return e.local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(b)}return a().tz(e,this.cleanTimezone(t))},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.dayjs(e),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.dayjs(e,t,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=e=>{const t=this.getLocaleFormats();return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,((e,n,r)=>{const o=r&&r.toUpperCase();return n||t[r]||t[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,((e,t,n)=>t||n.slice(1)))}))},this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.dayjs(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>this.dayjs(e).format(t),this.formatNumber=e=>e,this.getDiff=(e,t,n)=>e.diff(t,n),this.isEqual=(e,t)=>null===e&&null===t||this.dayjs(e).toDate().getTime()===this.dayjs(t).toDate().getTime(),this.isSameYear=(e,t)=>this.isSame(e,t,"YYYY"),this.isSameMonth=(e,t)=>this.isSame(e,t,"YYYY-MM"),this.isSameDay=(e,t)=>this.isSame(e,t,"YYYY-MM-DD"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e>t,this.isAfterYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()>t.utc():e.isAfter(t,"year"),this.isAfterDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()>t.utc():e.isAfter(t,"day"),this.isBefore=(e,t)=>e<t,this.isBeforeYear=(e,t)=>this.hasUTCPlugin()?!this.isSameYear(e,t)&&e.utc()<t.utc():e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>this.hasUTCPlugin()?!this.isSameDay(e,t)&&e.utc()<t.utc():e.isBefore(t,"day"),this.isWithinRange=(e,t)=>{let[n,r]=t;return e>=n&&e<=r},this.startOfYear=e=>this.adjustOffset(e.startOf("year")),this.startOfMonth=e=>this.adjustOffset(e.startOf("month")),this.startOfWeek=e=>this.adjustOffset(e.startOf("week")),this.startOfDay=e=>this.adjustOffset(e.startOf("day")),this.endOfYear=e=>this.adjustOffset(e.endOf("year")),this.endOfMonth=e=>this.adjustOffset(e.endOf("month")),this.endOfWeek=e=>this.adjustOffset(e.endOf("week")),this.endOfDay=e=>this.adjustOffset(e.endOf("day")),this.addYears=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"year"):e.add(t,"year")),this.addMonths=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"month"):e.add(t,"month")),this.addWeeks=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"week"):e.add(t,"week")),this.addDays=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"day"):e.add(t,"day")),this.addHours=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"hour"):e.add(t,"hour")),this.addMinutes=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"minute"):e.add(t,"minute")),this.addSeconds=(e,t)=>this.adjustOffset(t<0?e.subtract(Math.abs(t),"second"):e.add(t,"second")),this.getYear=e=>e.year(),this.getMonth=e=>e.month(),this.getDate=e=>e.date(),this.getHours=e=>e.hour(),this.getMinutes=e=>e.minute(),this.getSeconds=e=>e.second(),this.getMilliseconds=e=>e.millisecond(),this.setYear=(e,t)=>this.adjustOffset(e.set("year",t)),this.setMonth=(e,t)=>this.adjustOffset(e.set("month",t)),this.setDate=(e,t)=>this.adjustOffset(e.set("date",t)),this.setHours=(e,t)=>this.adjustOffset(e.set("hour",t)),this.setMinutes=(e,t)=>this.adjustOffset(e.set("minute",t)),this.setSeconds=(e,t)=>this.adjustOffset(e.set("second",t)),this.setMilliseconds=(e,t)=>this.adjustOffset(e.set("millisecond",t)),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>this.addMonths(e,1),this.getPreviousMonth=e=>this.addMonths(e,-1),this.getMonthArray=e=>{const t=[e.startOf("year")];for(;t.length<12;){const e=t[t.length-1];t.push(this.addMonths(e,1))}return t},this.mergeDateAndTime=(e,t)=>e.hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>{const e=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map((t=>this.formatByString(this.addDays(e,t),"dd")))},this.getWeekArray=e=>{const t=this.setLocaleToValue(e),n=t.startOf("month").startOf("week"),r=t.endOf("month").endOf("week");let o=0,a=n;const i=[];for(;a<r;){const e=Math.floor(o/7);i[e]=i[e]||[],i[e].push(a),a=this.addDays(a,1),o+=1}return i},this.getWeekNumber=e=>e.week(),this.getYearRange=(e,t)=>{const n=e.startOf("year"),r=t.endOf("year"),o=[];let a=n;for(;a<r;)o.push(a),a=this.addYears(a,1);return o},this.getMeridiemText=e=>"am"===e?"AM":"PM",this.rawDayJsInstance=n,this.dayjs=(i=null!=(o=this.rawDayJsInstance)?o:a(),(l=e)?function(){return i(...arguments).locale(l)}:i),this.locale=e,this.formats=(0,r.A)({},v,t),a().extend(s())}}},81831:(e,t,n)=>{"use strict";n.d(t,{$:()=>u,F:()=>c});var r=n(58168),o=n(98587),a=n(9950),i=n(48283),s=n(44414);const l=["localeText"],c=a.createContext(null);const u=function(e){var t;const{localeText:n}=e,u=(0,o.A)(e,l),{utils:d,localeText:p}=null!=(t=a.useContext(c))?t:{utils:void 0,localeText:void 0},f=(0,i.A)({props:u,name:"MuiLocalizationProvider"}),{children:h,dateAdapter:m,dateFormats:g,dateLibInstance:v,adapterLocale:y,localeText:b}=f,w=a.useMemo((()=>(0,r.A)({},b,p,n)),[b,p,n]),x=a.useMemo((()=>{if(!m)return d||null;const e=new m({locale:y,formats:g,instance:v});if(!e.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join("\n"));return e}),[m,y,g,v,d]),C=a.useMemo((()=>x?{minDate:x.date("1900-01-01T00:00:00.000"),maxDate:x.date("2099-12-31T00:00:00.000")}:null),[x]),A=a.useMemo((()=>({utils:x,defaultDates:C,localeText:w})),[C,x,w]);return(0,s.jsx)(c.Provider,{value:A,children:h})}},99743:(e,t,n)=>{"use strict";n.d(t,{A6:()=>s,fl:()=>l,iV:()=>i,vu:()=>c});var r=n(65471),o=n(9950),a=n(44414);const i=(0,r.A)((0,a.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),s=(0,r.A)((0,a.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),l=(0,r.A)((0,a.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),c=((0,r.A)((0,a.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),(0,r.A)((0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,a.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),(0,r.A)((0,a.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),(0,r.A)((0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,a.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),(0,r.A)((0,a.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"))},75432:(e,t,n)=>{"use strict";n.d(t,{M:()=>w});var r=n(58168),o=n(98587),a=n(9950),i=n(61399),s=n(92529),l=n(5393),c=n(14857),u=n(5380),d=n(46),p=n(49204),f=n(63931),h=n(55969),m=n(75035);const g=e=>null!=e.saveQuery,v=e=>{let{sections:t,updateSectionValue:n,sectionsValueBoundaries:o,setTempAndroidValueStr:i,timezone:l}=e;const c=(0,d.hc)(),[u,f]=a.useState(null),h=(0,s.A)((()=>f(null)));a.useEffect((()=>{var e;null!=u&&(null==(e=t[u.sectionIndex])?void 0:e.type)!==u.sectionType&&h()}),[t,u,h]),a.useEffect((()=>{if(null!=u){const e=setTimeout((()=>h()),5e3);return()=>{window.clearTimeout(e)}}return()=>{}}),[u,h]);const m=(e,n,r)=>{let{keyPressed:o,sectionIndex:a}=e;const i=o.toLowerCase(),s=t[a];if(null!=u&&(!r||r(u.value))&&u.sectionIndex===a){const e=`${u.value}${i}`,t=n(e,s);if(!g(t))return f({sectionIndex:a,value:e,sectionType:s.type}),t}const l=n(i,s);return g(l)&&!l.saveQuery?(h(),null):(f({sectionIndex:a,value:i,sectionType:s.type}),g(l)?null:l)};return{applyCharacterEditing:(0,s.A)((e=>{const a=t[e.sectionIndex],s=!Number.isNaN(Number(e.keyPressed))?(e=>{const t=(e,t)=>{const n=Number(`${e}`),r=o[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(n>r.maximum)return{saveQuery:!1};if(n<r.minimum)return{saveQuery:!0};const a=Number(`${e}0`)>r.maximum||e.length===r.maximum.toString().length;return{sectionValue:(0,p.bQ)(c,l,n,r,t),shouldGoToNextSection:a}};return m(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const o=(0,p.Xw)(c,l,"digit","month","MM"),a=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:o,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(g(a))return a;const i=(0,p.C7)(c,a.sectionValue,"MM",n.format);return(0,r.A)({},a,{sectionValue:i})}if("weekDay"===n.type){const o=t(e,n);if(g(o))return o;const a=(0,p.s8)(c,l,n.format)[Number(o.sectionValue)-1];return(0,r.A)({},o,{sectionValue:a})}return{saveQuery:!1}}),(e=>!Number.isNaN(Number(e))))})(e):(e=>{const t=(e,t,n)=>{const r=t.filter((e=>e.toLowerCase().startsWith(n)));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,o,a)=>{const i=e=>(0,p.hk)(c,l,n.type,e);if("letter"===n.contentType)return t(n.format,i(n.format),e);if(o&&null!=a&&"letter"===(0,p.wp)(c,o).contentType){const n=i(o),s=t(0,n,e);return g(s)?{saveQuery:!1}:(0,r.A)({},s,{sectionValue:a(s.sectionValue,n)})}return{saveQuery:!1}};return m(e,((e,t)=>{switch(t.type){case"month":{const r=e=>(0,p.C7)(c,e,c.formats.month,t.format);return n(e,t,c.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,c.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(e);null==s?i(null):n({activeSection:a,newSectionValue:s.sectionValue,shouldGoToNextSection:s.shouldGoToNextSection})})),resetCharacterQuery:h}};var y=n(79068);const b=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],w=e=>{const t=(0,d.hc)(),{state:n,selectedSectionIndexes:g,setSelectedSections:w,clearValue:x,clearActiveSection:C,updateSectionValue:A,updateValueFromValueStr:S,setTempAndroidValueStr:k,sectionsValueBoundaries:M,placeholder:E,timezone:R}=(e=>{const t=(0,d.hc)(),n=(0,d.Nq)(),o=(0,d.u)(),i="rtl"===(0,c.A)().direction,{valueManager:s,fieldValueManager:l,valueType:u,validator:g,internalProps:v,internalProps:{value:y,defaultValue:b,referenceDate:w,onChange:x,format:C,formatDensity:A="dense",selectedSections:S,onSelectedSectionsChange:k,shouldRespectLeadingZeros:M=!1,timezone:E}}=e,{timezone:R,value:P,handleValueChange:I}=(0,h.M)({timezone:E,value:y,defaultValue:b,onChange:x,valueManager:s}),D=a.useMemo((()=>(0,p.Lz)(t,R)),[t,R]),N=a.useCallback((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return l.getSectionsFromValue(t,e,r,i,(e=>(0,p.MQ)(t,R,n,C,e,A,M,i)))}),[l,C,n,i,M,t,A,R]),$=a.useMemo((()=>l.getValueStrFromSections(N(s.emptyValue),i)),[l,N,s.emptyValue,i]),[O,T]=a.useState((()=>{const e=N(P);(0,p.xL)(e,u);const n={sections:e,value:P,referenceValue:s.emptyValue,tempValueStrAndroid:null},o=(0,m.kI)(e),a=s.getInitialReferenceValue({referenceDate:w,value:P,utils:t,props:v,granularity:o,timezone:R});return(0,r.A)({},n,{referenceValue:a})})),[_,j]=(0,f.A)({controlled:S,default:null,name:"useField",state:"selectedSectionIndexes"}),F=e=>{j(e),null==k||k(e),T((e=>(0,r.A)({},e,{selectedSectionQuery:null})))},L=a.useMemo((()=>{if(null==_)return null;if("all"===_)return{startIndex:0,endIndex:O.sections.length-1,shouldSelectBoundarySelectors:!0};if("number"===typeof _)return{startIndex:_,endIndex:_};if("string"===typeof _){const e=O.sections.findIndex((e=>e.type===_));return{startIndex:e,endIndex:e}}return _}),[_,O.sections]),V=e=>{let{value:n,referenceValue:a,sections:i}=e;if(T((e=>(0,r.A)({},e,{sections:i,value:n,referenceValue:a,tempValueStrAndroid:null}))),s.areValuesEqual(t,O.value,n))return;const l={validationError:g({adapter:o,value:n,props:(0,r.A)({},v,{value:n,timezone:R})})};I(n,l)},z=(e,t)=>{const n=[...O.sections];return n[e]=(0,r.A)({},n[e],{value:t,modified:!0}),(0,p.H6)(n,i)};return a.useEffect((()=>{const e=N(O.value);(0,p.xL)(e,u),T((t=>(0,r.A)({},t,{sections:e})))}),[C,t.locale]),a.useEffect((()=>{let e=!1;e=!s.areValuesEqual(t,O.value,P)||s.getTimezone(t,O.value)!==s.getTimezone(t,P),e&&T((e=>(0,r.A)({},e,{value:P,referenceValue:l.updateReferenceValue(t,P,e.referenceValue),sections:N(P)})))}),[P]),{state:O,selectedSectionIndexes:L,setSelectedSections:F,clearValue:()=>{V({value:s.emptyValue,referenceValue:O.referenceValue,sections:N(s.emptyValue)})},clearActiveSection:()=>{if(null==L)return;const e=O.sections[L.startIndex],n=l.getActiveDateManager(t,O,e),o=n.getSections(O.sections).filter((e=>""!==e.value)).length===(""===e.value?0:1),a=z(L.startIndex,""),i=o?null:t.date(new Date("")),s=n.getNewValuesFromNewActiveDate(i);(null!=i&&!t.isValid(i))!==(null!=n.date&&!t.isValid(n.date))?V((0,r.A)({},s,{sections:a})):T((e=>(0,r.A)({},e,s,{sections:a,tempValueStrAndroid:null})))},updateSectionValue:e=>{let{activeSection:n,newSectionValue:o,shouldGoToNextSection:a}=e;a&&L&&L.startIndex<O.sections.length-1?F(L.startIndex+1):L&&L.startIndex!==L.endIndex&&F(L.startIndex);const i=l.getActiveDateManager(t,O,n),s=z(L.startIndex,o),c=i.getSections(s),u=(0,p.$i)(t,c);let d,f;if(null!=u&&t.isValid(u)){const e=(0,p.Sp)(t,R,u,c,i.referenceDate,!0);d=i.getNewValuesFromNewActiveDate(e),f=!0}else d=i.getNewValuesFromNewActiveDate(u),f=(null!=u&&!t.isValid(u))!==(null!=i.date&&!t.isValid(i.date));return f?V((0,r.A)({},d,{sections:s})):T((e=>(0,r.A)({},e,d,{sections:s,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const r=l.parseValueStr(e,O.referenceValue,((e,r)=>{const o=t.parse(e,C);if(null==o||!t.isValid(o))return null;const a=(0,p.MQ)(t,R,n,C,o,A,M,i);return(0,p.Sp)(t,R,o,a,r,!1)})),o=l.updateReferenceValue(t,r,O.referenceValue);V({value:r,referenceValue:o,sections:N(r,O.sections)})},setTempAndroidValueStr:e=>T((t=>(0,r.A)({},t,{tempValueStrAndroid:e}))),sectionsValueBoundaries:D,placeholder:$,timezone:R}})(e),{inputRef:P,internalProps:I,internalProps:{readOnly:D=!1,unstableFieldRef:N,minutesStep:$},forwardedProps:{onClick:O,onKeyDown:T,onFocus:_,onBlur:j,onMouseUp:F,onPaste:L,error:V,clearable:z,onClear:H,disabled:B},fieldValueManager:G,valueManager:W,validator:U}=e,K=(0,o.A)(e.forwardedProps,b),{applyCharacterEditing:q,resetCharacterQuery:Y}=v({sections:n.sections,updateSectionValue:A,sectionsValueBoundaries:M,setTempAndroidValueStr:k,timezone:R}),X=a.useRef(null),Z=(0,l.A)(P,X),Q=a.useRef(void 0),J="rtl"===(0,c.A)().direction,ee=a.useMemo((()=>(0,p.gS)(n.sections,J)),[n.sections,J]),te=()=>{var e;if(D)return void w(null);const t=null!=(e=X.current.selectionStart)?e:0;let r;r=t<=n.sections[0].startInInput||t>=n.sections[n.sections.length-1].endInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>t));const o=-1===r?n.sections.length-1:r-1;w(o)},ne=(0,s.A)((function(e){if(!e.isDefaultPrevented()){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==O||O(e,...n),te()}})),re=(0,s.A)((e=>{null==F||F(e),e.preventDefault()})),oe=(0,s.A)((function(){null==_||_(...arguments);const e=X.current;window.clearTimeout(Q.current),Q.current=setTimeout((()=>{e&&e===X.current&&(null!=g||D||(e.value.length&&Number(e.selectionEnd)-Number(e.selectionStart)===e.value.length?w("all"):te()))}))})),ae=(0,s.A)((function(){null==j||j(...arguments),w(null)})),ie=(0,s.A)((e=>{if(null==L||L(e),D)return void e.preventDefault();const t=e.clipboardData.getData("text");if(g&&g.startIndex===g.endIndex){const r=n.sections[g.startIndex],o=/^[a-zA-Z]+$/.test(t),a=/^[0-9]+$/.test(t),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===r.contentType&&o||"digit"===r.contentType&&a||"digit-with-letter"===r.contentType&&i)return Y(),A({activeSection:r,newSectionValue:t,shouldGoToNextSection:!0}),void e.preventDefault();if(o||a)return void e.preventDefault()}e.preventDefault(),Y(),S(t)})),se=(0,s.A)((e=>{if(D)return;const t=e.target.value;if(""===t)return Y(),void x();const r=e.nativeEvent.data,o=r&&r.length>1,a=o?r:t,i=(0,p.HI)(a);if(null==g||o)return void S(o?r:i);let s;if(0===g.startIndex&&g.endIndex===n.sections.length-1&&1===i.length)s=i;else{const e=(0,p.HI)(G.getValueStrFromSections(n.sections,J));let t=-1,r=-1;for(let n=0;n<e.length;n+=1)-1===t&&e[n]!==i[n]&&(t=n),-1===r&&e[e.length-n-1]!==i[i.length-n-1]&&(r=n);const o=n.sections[g.startIndex];if(t<o.start||e.length-r-1>o.end)return;const a=i.length-e.length+o.end-(0,p.HI)(o.endSeparator||"").length;s=i.slice(o.start+(0,p.HI)(o.startSeparator||"").length,a)}0!==s.length?q({keyPressed:s,sectionIndex:g.startIndex}):(0,p.m0)()?k(a):(Y(),C())})),le=(0,s.A)((e=>{switch(null==T||T(e),!0){case"a"===e.key&&(e.ctrlKey||e.metaKey):e.preventDefault(),w("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==g)w(ee.startIndex);else if(g.startIndex!==g.endIndex)w(g.endIndex);else{const e=ee.neighbors[g.startIndex].rightIndex;null!==e&&w(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==g)w(ee.endIndex);else if(g.startIndex!==g.endIndex)w(g.startIndex);else{const e=ee.neighbors[g.startIndex].leftIndex;null!==e&&w(e)}break;case"Delete"===e.key:if(e.preventDefault(),D)break;null==g||0===g.startIndex&&g.endIndex===n.sections.length-1?x():C(),Y();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),D||null==g)break;const r=n.sections[g.startIndex],o=G.getActiveDateManager(t,n,r),a=(0,p.UY)(t,R,r,e.key,M,o.date,{minutesStep:$});A({activeSection:r,newSectionValue:a,shouldGoToNextSection:!1});break}}}));(0,i.A)((()=>{if(!X.current)return;if(null==g)return void(X.current.scrollLeft&&(X.current.scrollLeft=0));const e=n.sections[g.startIndex],t=n.sections[g.endIndex];let r=e.startInInput,o=t.endInInput;if(g.shouldSelectBoundarySelectors&&(r-=e.startSeparator.length,o+=t.endSeparator.length),r!==X.current.selectionStart||o!==X.current.selectionEnd){const e=X.current.scrollTop;X.current===(0,y.bq)(document)&&X.current.setSelectionRange(r,o),X.current.scrollTop=e}}));const ce=(0,u.$)((0,r.A)({},I,{value:n.value,timezone:R}),U,W.isSameError,W.defaultErrorState),ue=a.useMemo((()=>void 0!==V?V:W.hasError(ce)),[W,ce,V]);a.useEffect((()=>{ue||g||Y()}),[n.referenceValue,g,ue]),a.useEffect((()=>(X.current&&X.current===document.activeElement&&w("all"),()=>window.clearTimeout(Q.current))),[]),a.useEffect((()=>{null!=n.tempValueStrAndroid&&null!=g&&(Y(),C())}),[n.tempValueStrAndroid]);const de=a.useMemo((()=>{var e;return null!=(e=n.tempValueStrAndroid)?e:G.getValueStrFromSections(n.sections,J)}),[n.sections,G,n.tempValueStrAndroid,J]),pe=a.useMemo((()=>null==g||"letter"===n.sections[g.startIndex].contentType?"text":"numeric"),[g,n.sections]),fe=X.current&&X.current===(0,y.bq)(document),he=W.areValuesEqual(t,n.value,W.emptyValue),me=!fe&&he;a.useImperativeHandle(N,(()=>({getSections:()=>n.sections,getActiveSectionIndex:()=>{var e,t;const r=null!=(e=X.current.selectionStart)?e:0,o=null!=(t=X.current.selectionEnd)?t:0;if(0===r&&0===o)return null;const a=r<=n.sections[0].startInInput?1:n.sections.findIndex((e=>e.startInInput-e.startSeparator.length>r));return-1===a?n.sections.length-1:a-1},setSelectedSections:e=>w(e)})));const ge=(0,s.A)((function(e){var t;e.preventDefault();for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null==H||H(e,...r),x(),null==X||null==(t=X.current)||t.focus(),w(0)}));return(0,r.A)({placeholder:E,autoComplete:"off",disabled:Boolean(B)},K,{value:me?"":de,inputMode:pe,readOnly:D,onClick:ne,onFocus:oe,onBlur:ae,onPaste:ie,onChange:se,onKeyDown:le,onMouseUp:re,onClear:ge,error:ue,ref:Z,clearable:Boolean(z&&!he&&!D&&!B)})}},49204:(e,t,n)=>{"use strict";n.d(t,{$i:()=>b,C7:()=>m,H6:()=>f,HI:()=>p,Lz:()=>x,MQ:()=>y,Sp:()=>S,UY:()=>u,Xw:()=>v,bQ:()=>c,bl:()=>w,gS:()=>M,hk:()=>s,m0:()=>k,s8:()=>i,wp:()=>a,xL:()=>C});var r=n(58168),o=n(50853);const a=(e,t)=>{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"===typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},i=(e,t,n)=>{const r=[],o=e.dateWithTimezone(void 0,t),a=e.startOfWeek(o),i=e.endOfWeek(o);let s=a;for(;e.isBefore(s,i);)r.push(s),s=e.addDays(s,1);return r.map((t=>e.formatByString(t,n)))},s=(e,t,n,r)=>{switch(n){case"month":return(0,o.YQ)(e,e.dateWithTimezone(void 0,t)).map((t=>e.formatByString(t,r)));case"weekDay":return i(e,t,r);case"meridiem":{const n=e.dateWithTimezone(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map((t=>e.formatByString(t,r)))}default:return[]}},l=(e,t,n)=>{let r=t;for(r=Number(r).toString();r.length<n;)r=`0${r}`;return r},c=(e,t,n,r,o)=>{if("day"===o.type&&"digit-with-letter"===o.contentType){const t=e.setDate(r.longestMonth,n);return e.formatByString(t,o.format)}const a=n.toString();return o.hasLeadingZerosInInput?l(0,a,o.maxLength):a},u=(e,t,n,r,o,a,i)=>{const l=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(r),u="Home"===r,d="End"===r,p=""===n.value||u||d;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const r=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),s=o=>c(e,t,o,r,n),f="minutes"===n.type&&null!=i&&i.minutesStep?i.minutesStep:1;let h=parseInt(n.value,10)+l*f;if(p){if("year"===n.type&&!d&&!u)return e.formatByString(e.dateWithTimezone(void 0,t),n.format);h=l>0||u?r.minimum:r.maximum}return h%f!==0&&((l<0||u)&&(h+=f-(f+h)%f),(l>0||d)&&(h-=h%f)),h>r.maximum?s(r.minimum+(h-r.maximum-1)%(r.maximum-r.minimum+1)):h<r.minimum?s(r.maximum-(r.minimum-h-1)%(r.maximum-r.minimum+1)):s(h)})():(()=>{const r=s(e,t,n.type,n.format);if(0===r.length)return n.value;if(p)return l>0||u?r[0]:r[r.length-1];const o=r.indexOf(n.value);return r[(o+r.length+l)%r.length]})()},d=(e,t)=>{let n=e.value||e.placeholder;const r="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(n=Number(n).toString());return["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!r&&1===n.length&&(n=`${n}\u200e`),"input-rtl"===t&&(n=`\u2068${n}\u2069`),n},p=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),f=(e,t)=>{let n=0,o=t?1:0;const a=[];for(let i=0;i<e.length;i+=1){const s=e[i],l=d(s,t?"input-rtl":"input-ltr"),c=`${s.startSeparator}${l}${s.endSeparator}`,u=p(c).length,f=c.length,h=p(l),m=o+l.indexOf(h[0])+s.startSeparator.length,g=m+h.length;a.push((0,r.A)({},s,{start:n,end:n+u,startInInput:m,endInInput:g})),n+=u,o+=f}return a},h=(e,t,n,r,o)=>{switch(r.type){case"year":return n.fieldYearPlaceholder({digitAmount:e.formatByString(e.dateWithTimezone(void 0,t),o).length,format:o});case"month":return n.fieldMonthPlaceholder({contentType:r.contentType,format:o});case"day":return n.fieldDayPlaceholder({format:o});case"weekDay":return n.fieldWeekDayPlaceholder({contentType:r.contentType,format:o});case"hours":return n.fieldHoursPlaceholder({format:o});case"minutes":return n.fieldMinutesPlaceholder({format:o});case"seconds":return n.fieldSecondsPlaceholder({format:o});case"meridiem":return n.fieldMeridiemPlaceholder({format:o});default:return o}},m=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),g=(e,t,n)=>4===e.formatByString(e.dateWithTimezone(void 0,t),n).length,v=(e,t,n,r,o)=>{if("digit"!==n)return!1;const a=e.dateWithTimezone(void 0,t);switch(r){case"year":if(g(e,t,o)){return"0001"===e.formatByString(e.setYear(a,1),o)}return"01"===e.formatByString(e.setYear(a,2001),o);case"month":return e.formatByString(e.startOfYear(a),o).length>1;case"day":return e.formatByString(e.startOfMonth(a),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(a),o).length>1;case"hours":return e.formatByString(e.setHours(a,1),o).length>1;case"minutes":return e.formatByString(e.setMinutes(a,1),o).length>1;case"seconds":return e.formatByString(e.setSeconds(a,1),o).length>1;default:throw new Error("Invalid section type")}},y=(e,t,n,o,i,s,c,u)=>{let d="";const p=[],f=e.date(),m=o=>{if(""===o)return null;const s=a(e,o),u=v(e,t,s.contentType,s.type,o),m=c?u:"digit"===s.contentType,g=null!=i&&e.isValid(i);let y=g?e.formatByString(i,o):"",b=null;if(m)if(u)b=""===y?e.formatByString(f,o).length:y.length;else{if(null==s.maxLength)throw new Error(`MUI: The token ${o} should have a 'maxDigitNumber' property on it's adapter`);b=s.maxLength,g&&(y=l(0,y,b))}return p.push((0,r.A)({},s,{format:o,maxLength:b,value:y,placeholder:h(e,t,n,s,o),hasLeadingZeros:u,hasLeadingZerosInFormat:u,hasLeadingZerosInInput:m,startSeparator:0===p.length?d:"",endSeparator:"",modified:!1})),null};let g=10,y=o,b=e.expandFormat(o);for(;b!==y;)if(y=b,b=e.expandFormat(y),g-=1,g<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const w=b,x=((e,t)=>{const n=[],{start:r,end:o}=e.escapedCharacters,a=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let i=null;for(;i=a.exec(t);)n.push({start:i.index,end:a.lastIndex-1});return n})(e,w),C=new RegExp(`^(${Object.keys(e.formatTokenMap).sort(((e,t)=>t.length-e.length)).join("|")})`,"g");let A="";for(let r=0;r<w.length;r+=1){const e=x.find((e=>e.start<=r&&e.end>=r)),t=w[r],n=null!=e,o=`${A}${w.slice(r)}`,a=C.test(o);if(!n&&t.match(/([A-Za-z]+)/)&&a)A=o.slice(0,C.lastIndex),r+=C.lastIndex-1;else{n&&(null==e?void 0:e.start)===r||(null==e?void 0:e.end)===r||(m(A),A="",0===p.length?d+=t:p[p.length-1].endSeparator+=t)}}return m(A),p.map((e=>{const t=e=>{let t=e;return u&&null!==t&&t.includes(" ")&&(t=`\u2069${t}\u2066`),"spacious"===s&&["/",".","-"].includes(t)&&(t=` ${t} `),t};return e.startSeparator=t(e.startSeparator),e.endSeparator=t(e.endSeparator),e}))},b=(e,t)=>{const n=t.some((e=>"day"===e.type)),r=[],o=[];for(let s=0;s<t.length;s+=1){const e=t[s];n&&"weekDay"===e.type||(r.push(e.format),o.push(d(e,"non-input")))}const a=r.join(" "),i=o.join(" ");return e.parse(i,a)},w=(e,t)=>{const n=e.map((e=>{const n=d(e,t?"input-rtl":"input-ltr");return`${e.startSeparator}${n}${e.endSeparator}`})).join("");return t?`\u2066${n}\u2069`:n},x=(e,t)=>{const n=e.dateWithTimezone(void 0,t),r=e.endOfYear(n),a=e.endOfDay(n),{maxDaysInMonth:s,longestMonth:l}=(0,o.YQ)(e,n).reduce(((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:n=>{let{format:r}=n;return{minimum:0,maximum:g(e,t,r)?9999:99}},month:()=>({minimum:1,maximum:e.getMonth(r)+1}),day:t=>{let{currentDate:n}=t;return{minimum:1,maximum:null!=n&&e.isValid(n)?e.getDaysInMonth(n):s,longestMonth:l}},weekDay:n=>{let{format:r,contentType:o}=n;if("digit"===o){const n=i(e,t,r).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:t=>{let{format:r}=t;const o=e.getHours(a);return e.formatByString(e.endOfDay(n),r)!==o.toString()?{minimum:1,maximum:Number(e.formatByString(e.startOfDay(n),r))}:{minimum:0,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(a)}),seconds:()=>({minimum:0,maximum:e.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:0})}};const C=(e,t)=>{0},A={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},S=(e,t,n,r,o,a)=>[...r].sort(((e,t)=>A[e.type]-A[t.type])).reduce(((r,o)=>!a||o.modified?((e,t,n,r,o)=>{switch(n.type){case"year":return e.setYear(o,e.getYear(r));case"month":return e.setMonth(o,e.getMonth(r));case"weekDay":{const o=i(e,t,n.format),a=e.formatByString(r,n.format),s=o.indexOf(a),l=o.indexOf(n.value)-s;return e.addDays(r,l)}case"day":return e.setDate(o,e.getDate(r));case"meridiem":{const t=e.getHours(r)<12,n=e.getHours(o);return t&&n>=12?e.addHours(o,-12):!t&&n<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(r));case"minutes":return e.setMinutes(o,e.getMinutes(r));case"seconds":return e.setSeconds(o,e.getSeconds(r));default:return o}})(e,t,o,n,r):r),o),k=()=>navigator.userAgent.toLowerCase().indexOf("android")>-1,M=(e,t)=>{const n={};if(!t)return e.forEach(((t,r)=>{const o=0===r?null:r-1,a=r===e.length-1?null:r+1;n[r]={leftIndex:o,rightIndex:a}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let a=0,i=0,s=e.length-1;for(;s>=0;){i=e.findIndex(((e,t)=>{var n;return t>=a&&(null==(n=e.endSeparator)?void 0:n.includes(" "))&&" / "!==e.endSeparator})),-1===i&&(i=e.length-1);for(let e=i;e>=a;e-=1)o[e]=s,r[s]=e,s-=1;a=i+1}return e.forEach(((t,a)=>{const i=o[a],s=0===i?null:r[i-1],l=i===e.length-1?null:r[i+1];n[a]={leftIndex:s,rightIndex:l}})),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}}},46:(e,t,n)=>{"use strict";n.d(t,{Yg:()=>d,Nq:()=>p,u:()=>c,cB:()=>f,hc:()=>u});var r=n(58168),o=n(9950),a=n(81831);const i={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${null===t?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>null!==e&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},s=i;l=i,(0,r.A)({},l);var l;const c=()=>{const e=o.useContext(a.F);if(null===e)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=o.useMemo((()=>(0,r.A)({},s,e.localeText)),[e.localeText]);return o.useMemo((()=>(0,r.A)({},e,{localeText:t})),[e,t])},u=()=>c().utils,d=()=>c().defaultDates,p=()=>c().localeText,f=e=>{const t=u(),n=o.useRef();return void 0===n.current&&(n.current=t.dateWithTimezone(void 0,e)),n.current}},5380:(e,t,n)=>{"use strict";n.d(t,{$:()=>a});var r=n(9950),o=n(46);function a(e,t,n,a){const{value:i,onError:s}=e,l=(0,o.u)(),c=r.useRef(a),u=t({adapter:l,value:i,props:e});return r.useEffect((()=>{s&&!n(u,c.current)&&s(u,i),c.current=u}),[n,s,c,u,i]),u}},55969:(e,t,n)=>{"use strict";n.d(t,{M:()=>s,Y:()=>l});var r=n(9950),o=n(92529),a=n(63931),i=n(46);const s=e=>{let{timezone:t,value:n,defaultValue:a,onChange:s,valueManager:l}=e;var c,u;const d=(0,i.hc)(),p=r.useRef(a),f=null!=(c=null!=n?n:p.current)?c:l.emptyValue,h=r.useMemo((()=>l.getTimezone(d,f)),[d,l,f]),m=(0,o.A)((e=>null==h?e:l.setTimezone(d,h,e))),g=null!=(u=null!=t?t:h)?u:"default";return{value:r.useMemo((()=>l.setTimezone(d,g,f)),[l,d,g,f]),handleValueChange:(0,o.A)((function(e){const t=m(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];null==s||s(t,...r)})),timezone:g}},l=e=>{let{name:t,timezone:n,value:r,defaultValue:i,onChange:l,valueManager:c}=e;const[u,d]=(0,a.A)({name:t,state:"value",controlled:r,default:null!=i?i:c.emptyValue}),p=(0,o.A)((function(e){d(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==l||l(e,...n)}));return s({timezone:n,value:u,defaultValue:void 0,onChange:p,valueManager:c})}},50853:(e,t,n)=>{"use strict";n.d(t,{IP:()=>a,Q6:()=>o,YQ:()=>s,ak:()=>c,cH:()=>u,iH:()=>i,il:()=>r,jH:()=>l});const r=e=>{let{date:t,disableFuture:n,disablePast:r,maxDate:o,minDate:a,isDateDisabled:i,utils:s,timezone:l}=e;const c=s.startOfDay(s.dateWithTimezone(void 0,l));r&&s.isBefore(a,c)&&(a=c),n&&s.isAfter(o,c)&&(o=c);let u=t,d=t;for(s.isBefore(t,a)&&(u=a,d=null),s.isAfter(t,o)&&(d&&(d=o),u=null);u||d;){if(u&&s.isAfter(u,o)&&(u=null),d&&s.isBefore(d,a)&&(d=null),u){if(!i(u))return u;u=s.addDays(u,1)}if(d){if(!i(d))return d;d=s.addDays(d,-1)}}return null},o=(e,t)=>null!=t&&e.isValid(t)?t:null,a=(e,t,n)=>null!=t&&e.isValid(t)?t:n,i=(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),s=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},l=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r},c=(e,t,n)=>"date"===n?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),u=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map((t=>e.addDays(n,t)))}},59836:(e,t,n)=>{"use strict";n.d(t,{D:()=>i});var r=n(58168),o=n(36369);const a=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],i=(e,t)=>{const n=(0,r.A)({},e),i={},s=e=>{n.hasOwnProperty(e)&&(i[e]=n[e],delete n[e])};return a.forEach(s),"date"===t?o.eu.forEach(s):"time"===t?o.$5.forEach(s):"date-time"===t&&(o.eu.forEach(s),o.$5.forEach(s),o.QG.forEach(s)),{forwardedProps:n,internalProps:i}}},75035:(e,t,n)=>{"use strict";n.d(t,{$9:()=>l,kI:()=>i,yX:()=>a});var r=n(22412),o=n(50853);const a={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},i=e=>Math.max(...e.map((e=>{var t;return null!=(t=a[e.type])?t:1}))),s=(e,t,n)=>{if(t===a.year)return e.startOfYear(n);if(t===a.month)return e.startOfMonth(n);if(t===a.day)return e.startOfDay(n);let r=n;return t<a.minutes&&(r=e.setMinutes(r,0)),t<a.seconds&&(r=e.setSeconds(r,0)),t<a.milliseconds&&(r=e.setMilliseconds(r,0)),r},l=e=>{let{props:t,utils:n,granularity:a,timezone:i,getTodayDate:l}=e;var c;let u=l?l():s(n,a,(0,o.ak)(n,i));null!=t.minDate&&n.isAfterDay(t.minDate,u)&&(u=s(n,a,t.minDate)),null!=t.maxDate&&n.isBeforeDay(t.maxDate,u)&&(u=s(n,a,t.maxDate));const d=(0,r.iF)(null!=(c=t.disableIgnoringDatePartForTimeValidation)&&c,n);return null!=t.minTime&&d(t.minTime,u)&&(u=s(n,a,t.disableIgnoringDatePartForTimeValidation?t.minTime:(0,o.jH)(n,u,t.minTime))),null!=t.maxTime&&d(u,t.maxTime)&&(u=s(n,a,t.disableIgnoringDatePartForTimeValidation?t.maxTime:(0,o.jH)(n,u,t.maxTime))),u}},22412:(e,t,n)=>{"use strict";n.d(t,{hW:()=>o,iF:()=>i});const r=["hours","minutes","seconds"],o=e=>r.includes(e),a=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),i=(e,t)=>(n,r)=>e?t.isAfter(n,r):a(n,t)>a(r,t)},79068:(e,t,n)=>{"use strict";function r(e,t){return Array.isArray(t)?t.every((t=>-1!==e.indexOf(t))):-1!==e.indexOf(t)}n.d(t,{G9:()=>a,Xk:()=>r,bq:()=>i,jX:()=>s,rQ:()=>o});const o=(e,t)=>n=>{"Enter"!==n.key&&" "!==n.key||(e(n),n.preventDefault(),n.stopPropagation()),t&&t(n)},a=e=>{setTimeout(e,0)},i=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).activeElement;return e?e.shadowRoot?i(e.shadowRoot):e:null},s="@media (pointer: fine)"},36369:(e,t,n)=>{"use strict";n.d(t,{$5:()=>o,QG:()=>a,eu:()=>r,zd:()=>s});const r=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],o=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],a=["minDateTime","maxDateTime"],i=[...r,...o,...a],s=e=>i.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})},53807:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(50853);const o=e=>{let{props:t,value:n,adapter:o}=e;if(null===n)return null;const{shouldDisableDate:a,shouldDisableMonth:i,shouldDisableYear:s,disablePast:l,disableFuture:c,timezone:u}=t,d=o.utils.dateWithTimezone(void 0,u),p=(0,r.IP)(o.utils,t.minDate,o.defaultDates.minDate),f=(0,r.IP)(o.utils,t.maxDate,o.defaultDates.maxDate);switch(!0){case!o.utils.isValid(n):return"invalidDate";case Boolean(a&&a(n)):return"shouldDisableDate";case Boolean(i&&i(n)):return"shouldDisableMonth";case Boolean(s&&s(n)):return"shouldDisableYear";case Boolean(c&&o.utils.isAfterDay(n,d)):return"disableFuture";case Boolean(l&&o.utils.isBeforeDay(n,d)):return"disablePast";case Boolean(p&&o.utils.isBeforeDay(n,p)):return"minDate";case Boolean(f&&o.utils.isAfterDay(n,f)):return"maxDate";default:return null}}},46081:(e,t,n)=>{"use strict";n.d(t,{f:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warning",n=!1;const r=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(r):console.warn(r))}}},75874:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s});var r=n(9950);var o=n(72004);function a(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function i(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const e=(0,o.A)(n?.className,s,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},a={...n,...i,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}({...i,...r}),c=a(r),u=a(i),d=t(l),p=(0,o.A)(d?.className,n?.className,s,i?.className,r?.className),f={...d?.style,...n?.style,...i?.style,...r?.style},h={...d,...n,...u,...c};return p.length>0&&(h.className=p),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:d.ref}}function s(e){const{elementType:t,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:a=!1,...s}=e,l=a?{}:function(e,t,n){return"function"===typeof e?e(t,n):e}(n,o),{props:c,internalRef:u}=i({...s,externalSlotProps:l}),d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"===typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}(u,l?.ref,e.additionalProps?.ref),p=function(e,t,n){return void 0===e||"string"===typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(t,{...c,ref:d},o);return p}},43514:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});n(9950);var r=n(69282),o=n(63238),a=n(44414);function i(e){switch(e){case o.j.ExpiredAnnualGrace:case o.j.ExpiredAnnual:return"MUI X Expired license key";case o.j.ExpiredVersion:return"MUI X Expired package version";case o.j.Invalid:return"MUI X Invalid license key";case o.j.OutOfScope:return"MUI X License key plan mismatch";case o.j.NotFound:return"MUI X Missing license key";default:throw new Error("MUI: Unhandled MUI X license status.")}}function s(e){const{packageName:t,releaseInfo:n}=e,s=(0,r.L)(t,n);return s.status===o.j.Valid?null:(0,a.jsx)("div",{style:{position:"absolute",pointerEvents:"none",color:"#8282829e",zIndex:1e5,width:"100%",textAlign:"center",bottom:"50%",right:0,letterSpacing:5,fontSize:24},children:i(s.status)})}},69282:(e,t,n)=>{"use strict";n.d(t,{L:()=>b});var r=n(58168),o=n(9950);const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";const i=e=>{let t,n,r,o,i,s,l,c="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<e.length;)o=a.indexOf(e.charAt(u++)),i=a.indexOf(e.charAt(u++)),s=a.indexOf(e.charAt(u++)),l=a.indexOf(e.charAt(u++)),t=o<<2|i>>4,n=(15&i)<<4|s>>2,r=(3&s)<<6|l,c+=String.fromCharCode(t),64!=s&&(c+=String.fromCharCode(n)),64!=l&&(c+=String.fromCharCode(r));return c},s=[];let l=0;for(;l<64;)s[l]=0|4294967296*Math.sin(++l%Math.PI);var c=n(63238);const u=["pro","premium"],d=["perpetual","annual","subscription"];const p=/^.*EXPIRY=([0-9]+),.*$/,f=e=>{const t=i(e);return t.includes("KEYVERSION=1")?(e=>{let t;try{t=parseInt(e.match(p)[1],10),t&&!Number.isNaN(t)||(t=null)}catch(n){t=null}return{scope:"pro",licensingModel:"perpetual",expiryTimestamp:t}})(t):t.includes("KV=2")?(e=>{const t={scope:null,licensingModel:null,expiryTimestamp:null};return e.split(",").map((e=>e.split("="))).filter((e=>2===e.length)).forEach((e=>{let[n,r]=e;if("S"===n&&(t.scope=r),"LM"===n&&(t.licensingModel=r),"E"===n){const e=parseInt(r,10);e&&!Number.isNaN(e)&&(t.expiryTimestamp=e)}})),t})(t):null};function h(e){let{releaseInfo:t,licenseKey:n,acceptedScopes:r}=e;if(!t)throw new Error("MUI: The release information is missing. Not able to validate license.");if(!n)return{status:c.j.NotFound};const o=n.substr(0,32),a=n.substr(32);if(o!==function(e){const t=[];let n,r,o,a=unescape(encodeURI(e))+"\x80",i=a.length;const c=[n=1732584193,r=4023233417,~n,~r];for(e=--i/4+2|15,t[--e]=8*i;~i;)t[i>>2]|=a.charCodeAt(i)<<8*i--;for(l=a=0;l<e;l+=16){for(i=c;a<64;i=[o=i[3],n+((o=i[0]+[n&r|~n&o,o&n|~o&r,n^r^o,r^(n|~o)][i=a>>4]+s[a]+~~t[l|15&[a,5*a+1,3*a+5,7*a][i]])<<(i=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*i+a++%4])|o>>>-i),n,r])n=0|i[1],r=i[2];for(a=4;a;)c[--a]+=i[a]}for(e="";a<32;)e+=(c[a>>3]>>4*(1^a++)&15).toString(16);return e}(a))return{status:c.j.Invalid};const p=f(a);if(null==p)return console.error("Error checking license. Key version not found!"),{status:c.j.Invalid};if(null==p.licensingModel||!d.includes(p.licensingModel))return console.error("Error checking license. Licensing model not found or invalid!"),{status:c.j.Invalid};if(null==p.expiryTimestamp)return console.error("Error checking license. Expiry timestamp not found or invalid!"),{status:c.j.Invalid};p.licensingModel;{const e=parseInt(i(t),10);if(Number.isNaN(e))throw new Error("MUI: The release information is invalid. Not able to validate license.");if(p.expiryTimestamp<e)return{status:c.j.ExpiredVersion}}return null!=p.scope&&u.includes(p.scope)?r.includes(p.scope)?{status:c.j.Valid}:{status:c.j.OutOfScope}:(console.error("Error checking license. scope not found or invalid!"),{status:c.j.Invalid})}var m=n(78256);function g(e){console.error(["*************************************************************","",...e,"","*************************************************************"].join("\n"))}const v=o.createContext({key:void 0}),y={};function b(e,t){const{key:n}=o.useContext(v);return o.useMemo((()=>{const o=null!=n?n:m.K.getLicenseKey();if(y[e]&&y[e].key===o)return y[e].licenseVerifier;const a=e.includes("premium")?["premium"]:["pro","premium"],i=e.includes("premium")?"Premium":"Pro",s=h({releaseInfo:t,licenseKey:o,acceptedScopes:a});y[e]={key:o,licenseVerifier:s};const l=`@mui/${e}`;return s.status===c.j.Valid||(s.status===c.j.Invalid?g(["MUI: Invalid license key.","","Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.","","To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument","Please check the license key installation https://mui.com/r/x-license-key-installation."]):s.status===c.j.OutOfScope?g(["MUI: License key plan mismatch.","","Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use `DataGridPremium` with a license key for the Pro plan.","","To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.","Of if you didn't intend to use Premium features, you can replace the import of `@mui/x-data-grid-premium` with `@mui/x-data-grid-pro`."]):s.status===c.j.NotFound?function(e){let{plan:t,packageName:n}=e;g(["MUI: Missing license key.","",`The license key is missing. You might not be allowed to use \`${n}\` which is part of MUI X ${t}.`,"","To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.","If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately."])}({plan:i,packageName:l}):s.status===c.j.ExpiredAnnualGrace?function(e){let{plan:t,licenseKey:n,expiryTimestamp:r}=e;g(["MUI: Expired license key.","",`Your annual license key to use MUI X ${t}'s on non-production environments is expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${t} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${t}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(r)}`,`- Installed license key: ${n}`,""])}((0,r.A)({plan:i},s.meta)):s.status===c.j.ExpiredAnnual?function(e){let{plan:t,licenseKey:n,expiryTimestamp:r}=e;throw new Error(["MUI: Expired license key.","",`Your annual license key to use MUI X ${t}'s on non-production environments is expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${t} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${t}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(r)}`,`- Installed license key: ${n}`,""].join("\n"))}((0,r.A)({plan:i},s.meta)):s.status===c.j.ExpiredVersion&&function(e){let{packageName:t}=e;g(["MUI: Expired package version.","",`You have installed a version of \`${t}\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`,"","To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key."])}({packageName:l})),s}),[e,t,n])}},63238:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});let r=function(e){return e.NotFound="NotFound",e.Invalid="Invalid",e.ExpiredAnnual="ExpiredAnnual",e.ExpiredAnnualGrace="ExpiredAnnualGrace",e.ExpiredVersion="ExpiredVersion",e.Valid="Valid",e.OutOfScope="OutOfScope",e}({})},58900:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=n(25116),o=n(4794),a=n(72727),i=n(72079),s=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(i,s):i;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=n(53640);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=n(91459);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=n(46768);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var f=n(88185);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})},54926:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class n{}t._CodeOrName=n,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends n{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class o extends n{constructor(e){super(),this._items="string"===typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function a(e){const t=[e[0]];let n=0;for(var r=arguments.length,a=new Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];for(;n<a.length;)l(t,a[n]),t.push(e[++n]);return new o(t)}t._Code=o,t.nil=new o(""),t._=a;const i=new o("+");function s(e){const t=[u(e[0])];let n=0;for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];for(;n<a.length;)t.push(i),l(t,a[n]),t.push(i,u(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===i){const n=c(e[t-1],e[t+1]);if(void 0!==n){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}(t),new o(t)}function l(e,t){var n;t instanceof o?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(n=t)||"boolean"==typeof n||null===n?n:u(Array.isArray(n)?n.join(","):n))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=s,t.addCodeArg=l,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:s`${e}${t}`},t.stringify=function(e){return new o(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new o(`.${e}`):a`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new o(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new o(e.toString())}},91459:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const r=n(54926),o=n(387);var a=n(54926);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return a.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return a.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return a.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return a.Name}});var i=n(387);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends s{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render(e){let{es5:t,_n:n}=e;const r=t?o.varKinds.var:this.varKind,a=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${a};`+n}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=D(this.rhs,e,t)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render(e){let{_n:t}=e;return`${this.lhs} = ${this.rhs};`+t}optimizeNames(e,t){if(!(this.lhs instanceof r.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=D(this.rhs,e,t),this}get names(){return I(this.lhs instanceof r.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,n,r){super(e,n,r),this.op=t}render(e){let{_n:t}=e;return`${this.lhs} ${this.op}= ${this.rhs};`+t}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render(e){let{_n:t}=e;return`${this.label}:`+t}}class p extends s{constructor(e){super(),this.label=e,this.names={}}render(e){let{_n:t}=e;return`break${this.label?` ${this.label}`:""};`+t}}class f extends s{constructor(e){super(),this.error=e}render(e){let{_n:t}=e;return`throw ${this.error};`+t}get names(){return this.error.names}}class h extends s{constructor(e){super(),this.code=e}render(e){let{_n:t}=e;return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=D(this.code,e,t),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class m extends s{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];super(),this.nodes=e}render(e){return this.nodes.reduce(((t,n)=>t+n.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:n}=this;let r=n.length;for(;r--;){const o=n[r];o.optimizeNames(e,t)||(N(e,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>P(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class v extends m{}class y extends g{}y.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new y(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b($(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=D(this.condition,e,t),this}get names(){const e=super.names;return I(e,this.condition),this.else&&P(e,this.else.names),e}}b.kind="if";class w extends g{}w.kind="for";class x extends w{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=D(this.iteration,e,t),this}get names(){return P(super.names,this.iteration.names)}}class C extends w{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:n,from:r,to:a}=this;return`for(${t} ${n}=${r}; ${n}<${a}; ${n}++)`+super.render(e)}get names(){const e=I(super.names,this.from);return I(e,this.to)}}class A extends w{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=D(this.iterable,e,t),this}get names(){return P(super.names,this.iterable.names)}}class S extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}S.kind="func";class k extends m{render(e){return"return "+super.render(e)}}k.kind="return";class M extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(r=this.finally)||void 0===r||r.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class E extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}E.kind="catch";class R extends g{render(e){return"finally"+super.render(e)}}R.kind="finally";function P(e,t){for(const n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function I(e,t){return t instanceof r._CodeOrName?P(e,t.names):e}function D(e,t,n){return e instanceof r.Name?a(e):(o=e)instanceof r._Code&&o._items.some((e=>e instanceof r.Name&&1===t[e.str]&&void 0!==n[e.str]))?new r._Code(e._items.reduce(((e,t)=>(t instanceof r.Name&&(t=a(t)),t instanceof r._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function a(e){const r=n[e.str];return void 0===r||1!==t[e.str]?e:(delete t[e.str],r)}}function N(e,t){for(const n in t)e[n]=(e[n]||0)-(t[n]||0)}function $(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:r._`!${j(e)}`}t.CodeGen=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){const o=this._scope.toName(t);return void 0!==n&&r&&(this._constants[o.str]=n),this._leafNode(new l(e,o,n)),o}const(e,t,n){return this._def(o.varKinds.const,e,t,n)}let(e,t,n){return this._def(o.varKinds.let,e,t,n)}var(e,t,n){return this._def(o.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new c(e,t,n))}add(e,n){return this._leafNode(new u(e,t.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==r.nil&&this._leafNode(new h(e)),this}object(){const e=["{"];for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];for(const[a,i]of n)e.length>1&&e.push(","),e.push(a),(a!==i||this.opts.es5)&&(e.push(":"),(0,r.addCodeArg)(e,i));return e.push("}"),new r._Code(e)}if(e,t,n){if(this._blockNode(new b(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(b,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new x(e),t)}forRange(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?o.varKinds.var:o.varKinds.let;const i=this._scope.toName(e);return this._for(new C(a,i,t,n),(()=>r(i)))}forOf(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o.varKinds.const;const i=this._scope.toName(e);if(this.opts.es5){const e=t instanceof r.Name?t:this.var("_arr",t);return this.forRange("_i",0,r._`${e}.length`,(t=>{this.var(i,r._`${e}[${t}]`),n(i)}))}return this._for(new A("of",a,i,t),(()=>n(i)))}forIn(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?o.varKinds.var:o.varKinds.const;if(this.opts.ownProperties)return this.forOf(e,r._`Object.keys(${t})`,n);const i=this._scope.toName(e);return this._for(new A("in",a,i,t),(()=>n(i)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new M;if(this._blockNode(r),this.code(e),t){const e=this.name("e");this._currNode=r.catch=new E(e),t(e)}return n&&(this._currNode=r.finally=new R,this.code(n)),this._endBlockNode(E,R)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.nil,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;return this._blockNode(new S(e,t,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=$;const O=_(t.operators.AND);t.and=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(O)};const T=_(t.operators.OR);function _(e){return(t,n)=>t===r.nil?n:n===r.nil?t:r._`${j(t)} ${e} ${j(n)}`}function j(e){return e instanceof r.Name?e:r._`(${e})`}t.or=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(T)}},387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const r=n(54926);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var a;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(a||(t.UsedValueState=a={})),t.varKinds={const:new r.Name("const"),let:new r.Name("let"),var:new r.Name("var")};class i{constructor(){let{prefixes:e,parent:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof r.Name?e:this.name(e)}name(e){return new r.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=i;class s extends r.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,t){let{property:n,itemIndex:o}=t;this.value=e,this.scopePath=r._`.${new r.Name(n)}[${o}]`}}t.ValueScopeName=s;const l=r._`\n`;t.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:r.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(e),{prefix:o}=r,a=null!==(n=t.key)&&void 0!==n?n:t.ref;let i=this._values[o];if(i){const e=i.get(a);if(e)return e}else i=this._values[o]=new Map;i.set(a,r);const s=this._scope[o]||(this._scope[o]=[]),l=s.length;return s[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}getValue(e,t){const n=this._values[e];if(n)return n.get(t)}scopeRefs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values;return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return r._`${e}${t.scopePath}`}))}scopeCode(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,n)}_reduceValues(e,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0,l=r.nil;for(const c in e){const u=e[c];if(!u)continue;const d=i[c]=i[c]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,a.Started);let i=n(e);if(i){const n=this.opts.es5?t.varKinds.var:t.varKinds.const;l=r._`${l}${n} ${e} = ${i};${this.opts._n}`}else{if(!(i=null===s||void 0===s?void 0:s(e)))throw new o(e);l=r._`${l}${i}${this.opts._n}`}d.set(e,a.Completed)}))}return l}}},88546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const r=n(91459),o=n(73757),a=n(93349);function i(e,t){const n=e.const("err",t);e.if(r._`${a.default.vErrors} === null`,(()=>e.assign(a.default.vErrors,r._`[${n}]`)),r._`${a.default.vErrors}.push(${n})`),e.code(r._`${a.default.errors}++`)}function s(e,t){const{gen:n,validateName:o,schemaEnv:a}=e;a.$async?n.throw(r._`new ${e.ValidationError}(${t})`):(n.assign(r._`${o}.errors`,t),n.return(!1))}t.keywordError={message:e=>{let{keyword:t}=e;return r.str`must pass "${t}" keyword validation`}},t.keyword$DataError={message:e=>{let{keyword:t,schemaType:n}=e;return n?r.str`"${t}" keyword must be ${n} ($data)`:r.str`"${t}" keyword is invalid ($data)`}},t.reportError=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;const{it:l}=e,{gen:u,compositeRule:d,allErrors:p}=l,f=c(e,n,o);(null!==a&&void 0!==a?a:d||p)?i(u,f):s(l,r._`[${f}]`)},t.reportExtraError=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,r=arguments.length>2?arguments[2]:void 0;const{it:o}=e,{gen:l,compositeRule:u,allErrors:d}=o;i(l,c(e,n,r)),u||d||s(o,a.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(a.default.errors,t),e.if(r._`${a.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(r._`${a.default.vErrors}.length`,t)),(()=>e.assign(a.default.vErrors,null)))))},t.extendErrors=function(e){let{gen:t,keyword:n,schemaValue:o,data:i,errsCount:s,it:l}=e;if(void 0===s)throw new Error("ajv implementation error");const c=t.name("err");t.forRange("i",s,a.default.errors,(e=>{t.const(c,r._`${a.default.vErrors}[${e}]`),t.if(r._`${c}.instancePath === undefined`,(()=>t.assign(r._`${c}.instancePath`,(0,r.strConcat)(a.default.instancePath,l.errorPath)))),t.assign(r._`${c}.schemaPath`,r.str`${l.errSchemaPath}/${n}`),l.opts.verbose&&(t.assign(r._`${c}.schema`,o),t.assign(r._`${c}.data`,i))}))};const l={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function c(e,t,n){const{createErrors:o}=e.it;return!1===o?r._`{}`:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{gen:o,it:i}=e,s=[u(i,n),d(e,n)];return function(e,t,n){let{params:o,message:i}=t;const{keyword:s,data:c,schemaValue:u,it:d}=e,{opts:p,propertyName:f,topSchemaRef:h,schemaPath:m}=d;n.push([l.keyword,s],[l.params,"function"==typeof o?o(e):o||r._`{}`]),p.messages&&n.push([l.message,"function"==typeof i?i(e):i]);p.verbose&&n.push([l.schema,u],[l.parentSchema,r._`${h}${m}`],[a.default.data,c]);f&&n.push([l.propertyName,f])}(e,t,s),o.object(...s)}(e,t,n)}function u(e,t){let{errorPath:n}=e,{instancePath:i}=t;const s=i?r.str`${n}${(0,o.getErrorPath)(i,o.Type.Str)}`:n;return[a.default.instancePath,(0,r.strConcat)(a.default.instancePath,s)]}function d(e,t){let{keyword:n,it:{errSchemaPath:a}}=e,{schemaPath:i,parentSchema:s}=t,c=s?a:r.str`${a}/${n}`;return i&&(c=r.str`${c}${(0,o.getErrorPath)(i,o.Type.Str)}`),[l.schemaPath,c]}},30637:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const r=n(91459),o=n(46768),a=n(93349),i=n(85905),s=n(73757),l=n(53640);class c{constructor(e){var t;let n;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,i.normalizeId)(null===n||void 0===n?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null===n||void 0===n?void 0:n.$async,this.refs={}}}function u(e){const t=p.call(this,e);if(t)return t;const n=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:u}=this.opts,d=new r.CodeGen(this.scope,{es5:s,lines:c,ownProperties:u});let f;e.$async&&(f=d.scopeValue("Error",{ref:o.default,code:r._`require("ajv/dist/runtime/validation_error").default`}));const h=d.scopeName("validate");e.validateName=h;const m={gen:d,allErrors:this.opts.allErrors,data:a.default.data,parentData:a.default.parentData,parentDataProperty:a.default.parentDataProperty,dataNames:[a.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,r.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:f,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:r.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:r._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,l.validateFunctionCode)(m),d.optimize(this.opts.code.optimize);const t=d.toString();g=`${d.scopeRefs(a.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const n=new Function(`${a.default.self}`,`${a.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:n}),n.errors=null,n.schema=e.schema,n.schemaEnv=e,e.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:h,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=m;n.evaluated={props:e instanceof r.Name?void 0:e,items:t instanceof r.Name?void 0:t,dynamicProps:e instanceof r.Name,dynamicItems:t instanceof r.Name},n.source&&(n.source.evaluated=(0,r.stringify)(n.evaluated))}return e.validate=n,e}catch(v){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),v}finally{this._compilations.delete(e)}}function d(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function p(e){for(const r of this._compilations)if(n=e,(t=r).schema===n.schema&&t.root===n.root&&t.baseId===n.baseId)return r;var t,n}function f(e,t){let n;for(;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||h.call(this,e,t)}function h(e,t){const n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n);let o=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===o)return g.call(this,n,e);const a=(0,i.normalizeId)(r),s=this.refs[a]||this.schemas[a];if("string"==typeof s){const t=h.call(this,e,s);if("object"!==typeof(null===t||void 0===t?void 0:t.schema))return;return g.call(this,n,t)}if("object"===typeof(null===s||void 0===s?void 0:s.schema)){if(s.validate||u.call(this,s),a===(0,i.normalizeId)(t)){const{schema:t}=s,{schemaId:n}=this.opts,r=t[n];return r&&(o=(0,i.resolveUrl)(this.opts.uriResolver,o,r)),new c({schema:t,schemaId:n,root:e,baseId:o})}return g.call(this,n,s)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,n){var r;n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);const o=e.refs[n];if(o)return o;let a=f.call(this,e,n);if(void 0===a){const o=null===(r=e.localRefs)||void 0===r?void 0:r[n],{schemaId:i}=this.opts;o&&(a=new c({schema:o,schemaId:i,root:e,baseId:t}))}return void 0!==a?e.refs[n]=d.call(this,a):void 0},t.getCompilingSchema=p,t.resolveSchema=h;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,t){let{baseId:n,schema:r,root:o}=t;var a;if("/"!==(null===(a=e.fragment)||void 0===a?void 0:a[0]))return;for(const c of e.fragment.slice(1).split("/")){if("boolean"===typeof r)return;const e=r[(0,s.unescapeFragment)(c)];if(void 0===e)return;r=e;const t="object"===typeof r&&r[this.opts.schemaId];!m.has(c)&&t&&(n=(0,i.resolveUrl)(this.opts.uriResolver,n,t))}let l;if("boolean"!=typeof r&&r.$ref&&!(0,s.schemaHasRulesButRef)(r,this.RULES)){const e=(0,i.resolveUrl)(this.opts.uriResolver,n,r.$ref);l=h.call(this,o,e)}const{schemaId:u}=this.opts;return l=l||new c({schema:r,schemaId:u,root:o,baseId:n}),l.schema!==l.root.schema?l:void 0}},93349:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};t.default=o},88185:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(85905);class o extends Error{constructor(e,t,n,o){super(o||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,r.resolveUrl)(e,t,n),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(e,this.missingRef))}}t.default=o},85905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const r=n(73757),o=n(45355),a=n(72832),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(s.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(l))return!0;if("object"==typeof n&&l(n))return!0}return!1}function c(e){let t=0;for(const n in e){if("$ref"===n)return 1/0;if(t++,!i.has(n)&&("object"==typeof e[n]&&(0,r.eachItem)(e[n],(e=>t+=c(e))),t===1/0))return 1/0}return t}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(t=f(t));const n=e.parse(t);return d(e,n)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const p=/#\/?$/;function f(e){return e?e.replace(p,""):""}t.normalizeId=f,t.resolveUrl=function(e,t,n){return n=f(n),e.resolve(t,n)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:n,uriResolver:r}=this.opts,i=f(e[n]||t),s={"":i},l=u(r,i,!1),c={},d=new Set;return a(e,{allKeys:!0},((e,t,r,o)=>{if(void 0===o)return;const a=l+t;let i=s[o];function u(t){const n=this.opts.uriResolver.resolve;if(t=f(i?n(i,t):t),d.has(t))throw m(t);d.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?p(e,r.schema,t):t!==f(a)&&("#"===t[0]?(p(e,c[t],t),c[t]=e):this.refs[t]=a),t}function g(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[n]&&(i=u.call(this,e[n])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=i})),c;function p(e,t,n){if(void 0!==t&&!o(e,t))throw m(n)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},90626:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&n.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},73757:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const r=n(91459),o=n(54926);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.schema;const{opts:n,self:r}=e;if(!n.strictSchema)return;if("boolean"===typeof t)return;const o=r.RULES.keywords;for(const a in t)o[a]||h(e,`unknown keyword: "${a}"`)}function i(e,t){if("boolean"==typeof e)return!e;for(const n in e)if(t[n])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c(e){let{mergeNames:t,mergeToName:n,mergeValues:o,resultToName:a}=e;return(e,i,s,l)=>{const c=void 0===s?i:s instanceof r.Name?(i instanceof r.Name?t(e,i,s):n(e,i,s),s):i instanceof r.Name?(n(e,s,i),i):o(i,s);return l!==r.Name||c instanceof r.Name?c:a(e,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const n=e.var("props",r._`{}`);return void 0!==t&&d(e,n,t),n}function d(e,t,n){Object.keys(n).forEach((n=>e.assign(r._`${t}${(0,r.getProperty)(n)}`,!0)))}t.toHash=function(e){const t={};for(const n of e)t[n]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(a(e,t),!i(t,e.self.RULES.all))},t.checkUnknownRules=a,t.schemaHasRules=i,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const n in e)if("$ref"!==n&&t.all[n])return!0;return!1},t.schemaRefOrVal=function(e,t,n,o){let{topSchemaRef:a,schemaPath:i}=e;if(!o){if("number"==typeof t||"boolean"==typeof t)return t;if("string"==typeof t)return r._`${t}`}return r._`${a}${i}${(0,r.getProperty)(n)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(s(e))},t.escapeJsonPointer=s,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,n)=>e.if(r._`${n} !== true && ${t} !== undefined`,(()=>{e.if(r._`${t} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,r._`${n} || {}`).code(r._`Object.assign(${n}, ${t})`)))})),mergeToName:(e,t,n)=>e.if(r._`${n} !== true`,(()=>{!0===t?e.assign(n,!0):(e.assign(n,r._`${n} || {}`),d(e,n,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,n)=>e.if(r._`${n} !== true && ${t} !== undefined`,(()=>e.assign(n,r._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`))),mergeToName:(e,t,n)=>e.if(r._`${n} !== true`,(()=>e.assign(n,!0===t||r._`${n} > ${t} ? ${n} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=d;const p={};var f;function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.opts.strictSchema;if(n){if(t=`strict mode: ${t}`,!0===n)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:p[t.code]||(p[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f||(t.Type=f={})),t.getErrorPath=function(e,t,n){if(e instanceof r.Name){const o=t===f.Num;return n?o?r._`"[" + ${e} + "]"`:r._`"['" + ${e} + "']"`:o?r._`"/" + ${e}`:r._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,r.getProperty)(e).toString():"/"+s(e)},t.checkStrictMode=h},42609:(e,t)=>{"use strict";function n(e,t){return t.rules.some((t=>r(e,t)))}function r(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function(e,t){let{schema:r,self:o}=e;const a=o.RULES.types[t];return a&&!0!==a&&n(r,a)},t.shouldUseGroup=n,t.shouldUseRule=r},81161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const r=n(88546),o=n(91459),a=n(93349),i={message:"boolean schema is false"};function s(e,t){const{gen:n,data:o}=e,a={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,r.reportError)(a,i,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:n,validateName:r}=e;!1===n?s(e,!1):"object"==typeof n&&!0===n.$async?t.return(a.default.data):(t.assign(o._`${r}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:n,schema:r}=e;!1===r?(n.var(t,!1),s(e)):n.var(t,!0)}},90902:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const r=n(90626),o=n(42609),a=n(88546),i=n(91459),s=n(73757);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(r.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l||(t.DataType=l={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:n,data:r,opts:a}=e,s=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,a.coerceTypes),c=t.length>0&&!(0===s.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(c){const o=p(t,r,a.strictNumbers,l.Wrong);n.if(o,(()=>{s.length?function(e,t,n){const{gen:r,data:o,opts:a}=e,s=r.let("dataType",i._`typeof ${o}`),l=r.let("coerced",i._`undefined`);"array"===a.coerceTypes&&r.if(i._`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>r.assign(o,i._`${o}[0]`).assign(s,i._`typeof ${o}`).if(p(t,o,a.strictNumbers),(()=>r.assign(l,o)))));r.if(i._`${l} !== undefined`);for(const i of n)(u.has(i)||"array"===i&&"array"===a.coerceTypes)&&c(i);function c(e){switch(e){case"string":return void r.elseIf(i._`${s} == "number" || ${s} == "boolean"`).assign(l,i._`"" + ${o}`).elseIf(i._`${o} === null`).assign(l,i._`""`);case"number":return void r.elseIf(i._`${s} == "boolean" || ${o} === null
|
|
106
|
-
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(l,i._`+${o}`);case"integer":return void r.elseIf(i._`${s} === "boolean" || ${o} === null
|
|
107
|
-
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,i._`+${o}`);case"boolean":return void r.elseIf(i._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf(i._`${o} === "true" || ${o} === 1`).assign(l,!0);case"null":return r.elseIf(i._`${o} === "" || ${o} === 0 || ${o} === false`),void r.assign(l,null);case"array":r.elseIf(i._`${s} === "string" || ${s} === "number"
|
|
108
|
-
|| ${s} === "boolean" || ${o} === null`).assign(l,i._`[${o}]`)}}r.else(),h(e),r.endIf(),r.if(i._`${l} !== undefined`,(()=>{r.assign(o,l),function(e,t){let{gen:n,parentData:r,parentDataProperty:o}=e;n.if(i._`${r} !== undefined`,(()=>n.assign(i._`${r}[${o}]`,t)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.Correct;const o=r===l.Correct?i.operators.EQ:i.operators.NEQ;let a;switch(e){case"null":return i._`${t} ${o} null`;case"array":a=i._`Array.isArray(${t})`;break;case"object":a=i._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=s(i._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=s();break;default:return i._`typeof ${t} ${o} ${e}`}return r===l.Correct?a:(0,i.not)(a);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.nil;return(0,i.and)(i._`typeof ${t} == "number"`,e,n?i._`isFinite(${t})`:i.nil)}}function p(e,t,n,r){if(1===e.length)return d(e[0],t,n,r);let o;const a=(0,s.toHash)(e);if(a.array&&a.object){const e=i._`typeof ${t} != "object"`;o=a.null?e:i._`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else o=i.nil;a.number&&delete a.integer;for(const s in a)o=(0,i.and)(o,d(s,t,n,r));return o}t.checkDataType=d,t.checkDataTypes=p;const f={message:e=>{let{schema:t}=e;return`must be ${t}`},params:e=>{let{schema:t,schemaValue:n}=e;return"string"==typeof t?i._`{type: ${t}}`:i._`{type: ${n}}`}};function h(e){const t=function(e){const{gen:t,data:n,schema:r}=e,o=(0,s.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:e}}(e);(0,a.reportError)(t,f)}t.reportTypeError=h},64684:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const r=n(91459),o=n(73757);function a(e,t,n){const{gen:a,compositeRule:i,data:s,opts:l}=e;if(void 0===n)return;const c=r._`${s}${(0,r.getProperty)(t)}`;if(i)return void(0,o.checkStrictMode)(e,`default is ignored for: ${c}`);let u=r._`${c} === undefined`;"empty"===l.useDefaults&&(u=r._`${u} || ${c} === null || ${c} === ""`),a.if(u,r._`${c} = ${(0,r.stringify)(n)}`)}t.assignDefaults=function(e,t){const{properties:n,items:r}=e.schema;if("object"===t&&n)for(const o in n)a(e,o,n[o].default);else"array"===t&&Array.isArray(r)&&r.forEach(((t,n)=>a(e,n,t.default)))}},53640:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=n(81161),o=n(90902),a=n(42609),i=n(90902),s=n(64684),l=n(37355),c=n(54505),u=n(91459),d=n(93349),p=n(85905),f=n(73757),h=n(88546);function m(e,t){let{gen:n,validateName:r,schema:o,schemaEnv:a,opts:i}=e;i.code.es5?n.func(r,u._`${d.default.data}, ${d.default.valCxt}`,a.$async,(()=>{n.code(u._`"use strict"; ${g(o,i)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(n,i),n.code(t)})):n.func(r,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(i)}`,a.$async,(()=>n.code(g(o,i)).code(t)))}function g(e,t){const n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?u._`/*# sourceURL=${n} */`:u.nil}function v(e,t){b(e)&&(w(e),y(e))?function(e,t){const{schema:n,gen:r,opts:o}=e;o.$comment&&n.$comment&&C(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const a=r.const("_errs",d.default.errors);x(e,a),r.var(t,u._`${a} === ${d.default.errors}`)}(e,t):(0,r.boolOrEmptySchema)(e,t)}function y(e){let{schema:t,self:n}=e;if("boolean"==typeof t)return!t;for(const r in t)if(n.RULES.all[r])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function w(e){(0,f.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:n,opts:r,self:o}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function x(e,t){if(e.opts.jtd)return A(e,[],!1,t);const n=(0,o.getSchemaTypes)(e.schema);A(e,n,!(0,o.coerceAndCheckDataType)(e,n),t)}function C(e){let{gen:t,schemaEnv:n,schema:r,errSchemaPath:o,opts:a}=e;const i=r.$comment;if(!0===a.$comment)t.code(u._`${d.default.self}.logger.log(${i})`);else if("function"==typeof a.$comment){const e=u.str`${o}/$comment`,r=t.scopeValue("root",{ref:n.root});t.code(u._`${d.default.self}.opts.$comment(${i}, ${e}, ${r}.schema)`)}}function A(e,t,n,r){const{gen:o,schema:s,data:l,allErrors:c,opts:p,self:h}=e,{RULES:m}=h;function g(f){(0,a.shouldUseGroup)(s,f)&&(f.type?(o.if((0,i.checkDataType)(f.type,l,p.strictNumbers)),S(e,f),1===t.length&&t[0]===f.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):S(e,f),c||o.if(u._`${d.default.errors} === ${r||0}`))}!s.$ref||!p.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(s,m)?(p.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{M(e.dataTypes,t)||E(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const n=[];for(const r of e.dataTypes)M(t,r)?n.push(r):t.includes("integer")&&"number"===r&&n.push("integer");e.dataTypes=n}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&E(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const r in n){const o=n[r];if("object"==typeof o&&(0,a.shouldUseRule)(e.schema,o)){const{type:n}=o.definition;n.length&&!n.some((e=>k(t,e)))&&E(e,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(e,e.dataTypes)}(e,t),o.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):o.block((()=>P(e,"$ref",m.all.$ref.definition)))}function S(e,t){const{gen:n,schema:r,opts:{useDefaults:o}}=e;o&&(0,s.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,a.shouldUseRule)(r,n)&&P(e,n.keyword,n.definition,t.type)}))}function k(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function M(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function E(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(w(e),y(e))?function(e){const{schema:t,opts:n,gen:r}=e;m(e,(()=>{n.$comment&&t.$comment&&C(e),function(e){const{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),r.let(d.default.vErrors,null),r.let(d.default.errors,0),n.unevaluated&&function(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",u._`${n}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),x(e),function(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:o,opts:a}=e;n.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${o}(${d.default.vErrors})`))):(t.assign(u._`${r}.errors`,d.default.vErrors),a.unevaluated&&function(e){let{gen:t,evaluated:n,props:r,items:o}=e;r instanceof u.Name&&t.assign(u._`${n}.props`,r);o instanceof u.Name&&t.assign(u._`${n}.items`,o)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,r.topBoolOrEmptySchema)(e)))};class R{constructor(e,t,n){if((0,l.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",N(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,n){this.failResult((0,u.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.nil;this.gen.block((()=>{this.check$data(e,n),t()}))}check$data(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.nil,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.nil;if(!this.$data)return;const{gen:n,schemaCode:r,schemaType:o,def:a}=this;n.if((0,u.or)(u._`${r} === undefined`,t)),e!==u.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:r,it:o}=this;return(0,u.or)(function(){if(n.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(n)?n:[n];return u._`${(0,i.checkDataTypes)(e,t,o.opts.strictNumbers,i.DataType.Wrong)}`}return u.nil}(),function(){if(r.validateSchema){const n=e.scopeValue("validate$data",{ref:r.validateSchema});return u._`!${n}(${t})`}return u.nil}())}subschema(e,t){const n=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(n,this.it,e),(0,c.extendSubschemaMode)(n,e);const r={...this.it,...n,items:void 0,props:void 0};return v(r,t),r}mergeEvaluated(e,t){const{it:n,gen:r}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=f.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=f.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function P(e,t,n,r){const o=new R(e,n,t);"code"in n?n.code(o,r):o.$data&&n.validate?(0,l.funcKeywordCode)(o,n):"macro"in n?(0,l.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,l.funcKeywordCode)(o,n)}t.KeywordCxt=R;const I=/^\/(?:[^~]|~0|~1)*$/,D=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function N(e,t){let n,r,{dataLevel:o,dataNames:a,dataPathArr:i}=t;if(""===e)return d.default.rootData;if("/"===e[0]){if(!I.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,r=d.default.rootData}else{const t=D.exec(e);if(!t)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+t[1];if(n=t[2],"#"===n){if(s>=o)throw new Error(c("property/index",s));return i[o-s]}if(s>o)throw new Error(c("data",s));if(r=a[o-s],!n)return r}let s=r;const l=n.split("/");for(const d of l)d&&(r=u._`${r}${(0,u.getProperty)((0,f.unescapeJsonPointer)(d))}`,s=u._`${s} && ${r}`);return s;function c(e,t){return`Cannot access ${e} ${t} levels up, current level is ${o}`}}t.getData=N},37355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const r=n(91459),o=n(93349),a=n(75843),i=n(88546);function s(e){const{gen:t,data:n,it:o}=e;t.if(o.parentData,(()=>t.assign(n,r._`${o.parentData}[${o.parentDataProperty}]`)))}function l(e,t,n){if(void 0===n)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,r.stringify)(n)})}t.macroKeywordCode=function(e,t){const{gen:n,keyword:o,schema:a,parentSchema:i,it:s}=e,c=t.macro.call(s.self,a,i,s),u=l(n,o,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const d=n.name("valid");e.subschema({schema:c,schemaPath:r.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var n;const{gen:c,keyword:u,schema:d,parentSchema:p,$data:f,it:h}=e;!function(e,t){let{schemaEnv:n}=e;if(t.async&&!n.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,d,p,h):t.validate,g=l(c,u,m),v=c.let("valid");function y(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.async?r._`await `:r.nil;const i=h.opts.passContext?o.default.this:o.default.self,s=!("compile"in t&&!f||!1===t.schema);c.assign(v,r._`${n}${(0,a.callValidateCode)(e,g,i,s)}`,t.modifying)}function b(e){var n;c.if((0,r.not)(null!==(n=t.valid)&&void 0!==n?n:v),e)}e.block$data(v,(function(){if(!1===t.errors)y(),t.modifying&&s(e),b((()=>e.error()));else{const n=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>y(r._`await `)),(t=>c.assign(v,!1).if(r._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,r._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=r._`${g}.errors`;return c.assign(e,null),y(r.nil),e}();t.modifying&&s(e),b((()=>function(e,t){const{gen:n}=e;n.if(r._`Array.isArray(${t})`,(()=>{n.assign(o.default.vErrors,r._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,r._`${o.default.vErrors}.length`),(0,i.extendErrors)(e)}),(()=>e.error()))}(e,n)))}})),e.ok(null!==(n=t.valid)&&void 0!==n?n:v)},t.validSchemaType=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||n&&"undefined"==typeof e))},t.validateKeywordUsage=function(e,t,n){let{schema:r,opts:o,self:a,errSchemaPath:i}=e;if(Array.isArray(t.keyword)?!t.keyword.includes(n):t.keyword!==n)throw new Error("ajv implementation error");const s=t.dependencies;if(null===s||void 0===s?void 0:s.some((e=>!Object.prototype.hasOwnProperty.call(r,e))))throw new Error(`parent schema must have dependencies of ${n}: ${s.join(",")}`);if(t.validateSchema){if(!t.validateSchema(r[n])){const e=`keyword "${n}" value is invalid at path "${i}": `+a.errorsText(t.validateSchema.errors);if("log"!==o.validateSchema)throw new Error(e);a.logger.error(e)}}}},54505:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const r=n(91459),o=n(73757);t.getSubschema=function(e,t){let{keyword:n,schemaProp:a,schema:i,schemaPath:s,errSchemaPath:l,topSchemaRef:c}=t;if(void 0!==n&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const t=e.schema[n];return void 0===a?{schema:t,schemaPath:r._`${e.schemaPath}${(0,r.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${n}`}:{schema:t[a],schemaPath:r._`${e.schemaPath}${(0,r.getProperty)(n)}${(0,r.getProperty)(a)}`,errSchemaPath:`${e.errSchemaPath}/${n}/${(0,o.escapeFragment)(a)}`}}if(void 0!==i){if(void 0===s||void 0===l||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:s,topSchemaRef:c,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,n){let{dataProp:a,dataPropType:i,data:s,dataTypes:l,propertyName:c}=n;if(void 0!==s&&void 0!==a)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(void 0!==a){const{errorPath:n,dataPathArr:s,opts:l}=t;d(u.let("data",r._`${t.data}${(0,r.getProperty)(a)}`,!0)),e.errorPath=r.str`${n}${(0,o.getErrorPath)(a,i,l.jsPropertySyntax)}`,e.parentDataProperty=r._`${a}`,e.dataPathArr=[...s,e.parentDataProperty]}if(void 0!==s){d(s instanceof r.Name?s:u.let("data",s,!0)),void 0!==c&&(e.propertyName=c)}function d(n){e.data=n,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,n]}l&&(e.dataTypes=l)},t.extendSubschemaMode=function(e,t){let{jtdDiscriminator:n,jtdMetadata:r,compositeRule:o,createErrors:a,allErrors:i}=t;void 0!==o&&(e.compositeRule=o),void 0!==a&&(e.createErrors=a),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=n,e.jtdMetadata=r}},25116:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=n(53640);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var o=n(91459);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const a=n(46768),i=n(88185),s=n(90626),l=n(30637),c=n(91459),u=n(85905),d=n(90902),p=n(73757),f=n(63837),h=n(49106),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,n,r,o,a,i,s,l,c,u,d,p,f,g,v,y,b,w,x,C,A,S,k,M,E;const R=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,I=!0===P||void 0===P?1:P||0,D=null!==(r=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:m,N=null!==(o=e.uriResolver)&&void 0!==o?o:h.default;return{strictSchema:null===(i=null!==(a=e.strictSchema)&&void 0!==a?a:R)||void 0===i||i,strictNumbers:null===(l=null!==(s=e.strictNumbers)&&void 0!==s?s:R)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:R)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:R)&&void 0!==p?p:"log",strictRequired:null!==(g=null!==(f=e.strictRequired)&&void 0!==f?f:R)&&void 0!==g&&g,code:e.code?{...e.code,optimize:I,regExp:D}:{optimize:I,regExp:D},loopRequired:null!==(v=e.loopRequired)&&void 0!==v?v:200,loopEnum:null!==(y=e.loopEnum)&&void 0!==y?y:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(x=e.inlineRefs)||void 0===x||x,schemaId:null!==(C=e.schemaId)&&void 0!==C?C:"$id",addUsedSchema:null===(A=e.addUsedSchema)||void 0===A||A,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(k=e.validateFormats)||void 0===k||k,unicodeRegExp:null===(M=e.unicodeRegExp)||void 0===M||M,int32range:null===(E=e.int32range)||void 0===E||E,uriResolver:N}}class x{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:v,es5:t,lines:n}),this.logger=function(e){if(!1===e)return R;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),C.call(this,y,e,"NOT SUPPORTED"),C.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=E.call(this),e.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&M.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:n}=this.opts;let r=f;"id"===n&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let n;if("string"==typeof e){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);const r=n(t);return"$async"in n||(this.errors=n.errors),r}compile(e,t){const n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await o.call(this,e.$schema);const n=this._addSchema(e,t);return n.validate||a.call(this,n)}async function o(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await l.call(this,t.missingSchema),a.call(this,e)}}function s(e){let{missingSchema:t,missingRef:n}=e;if(this.refs[t])throw new Error(`AnySchema ${t} is loaded but ${n} cannot be resolved`)}async function l(e){const n=await c.call(this,e);this.refs[e]||await o.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,n,o);return this}if("object"===typeof e){const{schemaId:t}=this.opts;if(r=e[t],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,o,!0),this}addMetaSchema(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema;return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let n;if(n=e.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(n,e);if(!r&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=A.call(this,e));)e=t;if(void 0===t){const{schemaId:n}=this.opts,r=new l.SchemaEnv({schema:{},schemaId:n});if(t=l.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=A.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,u.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(I.call(this,n,t),!t)return(0,p.eachItem)(n,(e=>D.call(this,e))),this;$.call(this,t);const r={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(n,0===r.type.length?e=>D.call(this,e,r):e=>r.type.forEach((t=>D.call(this,e,r,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const n of t.rules){const t=n.rules.findIndex((t=>t.keyword===e));t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,{separator:t=", ",dataVar:n="data"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e&&0!==e.length?e.map((e=>`${n}${e.instancePath} ${e.message}`)).reduce(((e,n)=>e+t+n)):"No errors"}$dataMetaSchema(e,t){const n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const r of t){const t=r.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in n){const t=n[e];if("object"!=typeof t)continue;const{$data:r}=t.definition,a=o[e];r&&a&&(o[e]=T(a))}}return e}_removeAllSchemas(e,t){for(const n in e){const r=e[n];t&&!t.test(n)||("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema;const{schemaId:i}=this.opts;if("object"==typeof e)r=e[i];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;n=(0,u.normalizeId)(r||n);const c=u.getSchemaRefs.call(this,e,n);return s=new l.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:n,localRefs:c}),this._cache.set(s.schema,s),a&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=s),o&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function C(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(const o in e){const a=o;a in t&&this.logger[r](`${n}: option ${o}. ${e[a]}`)}}function A(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function k(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function M(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}}function E(){const e={...this.opts};for(const t of g)delete e[t];return e}x.ValidationError=a.default,x.MissingRefError=i.default,t.default=x;const R={log(){},warn(){},error(){}};const P=/^[a-z_$][a-z0-9_$:-]*$/i;function I(e,t){const{RULES:n}=this;if((0,p.eachItem)(e,(e=>{if(n.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function D(e,t,n){var r;const o=null===t||void 0===t?void 0:t.post;if(n&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:a}=this;let i=o?a.post:a.rules.find((e=>{let{type:t}=e;return t===n}));if(i||(i={type:n,rules:[]},a.rules.push(i)),a.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?N.call(this,i,s,t.before):i.rules.push(s),a.all[e]=s,null===(r=t.implements)||void 0===r||r.forEach((e=>this.addKeyword(e)))}function N(e,t,n){const r=e.rules.findIndex((e=>e.keyword===n));r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function $(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=T(t)),e.validateSchema=this.compile(t,!0))}const O={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function T(e){return{anyOf:[e,O]}}},49216:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(45355);r.code='require("ajv/dist/runtime/equal").default',t.default=r},91467:(e,t)=>{"use strict";function n(e){const t=e.length;let n,r=0,o=0;for(;o<t;)r++,n=e.charCodeAt(o++),n>=55296&&n<=56319&&o<t&&(n=e.charCodeAt(o),56320===(64512&n)&&o++);return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.code='require("ajv/dist/runtime/ucs2length").default'},49106:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(30075);r.code='require("ajv/dist/runtime/uri").default',t.default=r},46768:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=n},55155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const r=n(91459),o=n(73757),a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:e=>{let{params:{len:t}}=e;return r.str`must NOT have more than ${t} items`},params:e=>{let{params:{len:t}}=e;return r._`{limit: ${t}}`}},code(e){const{parentSchema:t,it:n}=e,{items:r}=t;Array.isArray(r)?i(e,r):(0,o.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function i(e,t){const{gen:n,schema:a,data:i,keyword:s,it:l}=e;l.items=!0;const c=n.const("len",r._`${i}.length`);if(!1===a)e.setParams({len:t.length}),e.pass(r._`${c} <= ${t.length}`);else if("object"==typeof a&&!(0,o.alwaysValidSchema)(l,a)){const a=n.var("valid",r._`${c} <= ${t.length}`);n.if((0,r.not)(a),(()=>function(a){n.forRange("i",t.length,c,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:o.Type.Num},a),l.allErrors||n.if((0,r.not)(a),(()=>n.break()))}))}(a))),e.ok(a)}}t.validateAdditionalItems=i,t.default=a},29838:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(75843),o=n(91459),a=n(93349),i=n(73757),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:e=>{let{params:t}=e;return o._`{additionalProperty: ${t.additionalProperty}}`}},code(e){const{gen:t,schema:n,parentSchema:s,data:l,errsCount:c,it:u}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:d,opts:p}=u;if(u.props=!0,"all"!==p.removeAdditional&&(0,i.alwaysValidSchema)(u,n))return;const f=(0,r.allSchemaProperties)(s.properties),h=(0,r.allSchemaProperties)(s.patternProperties);function m(e){t.code(o._`delete ${l}[${e}]`)}function g(r){if("all"===p.removeAdditional||p.removeAdditional&&!1===n)m(r);else{if(!1===n)return e.setParams({additionalProperty:r}),e.error(),void(d||t.break());if("object"==typeof n&&!(0,i.alwaysValidSchema)(u,n)){const n=t.name("valid");"failing"===p.removeAdditional?(v(r,n,!1),t.if((0,o.not)(n),(()=>{e.reset(),m(r)}))):(v(r,n),d||t.if((0,o.not)(n),(()=>t.break())))}}}function v(t,n,r){const o={keyword:"additionalProperties",dataProp:t,dataPropType:i.Type.Str};!1===r&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,n)}t.forIn("key",l,(n=>{f.length||h.length?t.if(function(n){let a;if(f.length>8){const e=(0,i.schemaRefOrVal)(u,s.properties,"properties");a=(0,r.isOwnProperty)(t,e,n)}else a=f.length?(0,o.or)(...f.map((e=>o._`${n} === ${e}`))):o.nil;return h.length&&(a=(0,o.or)(a,...h.map((t=>o._`${(0,r.usePattern)(e,t)}.test(${n})`)))),(0,o.not)(a)}(n),(()=>g(n))):g(n)})),e.ok(o._`${c} === ${a.default.errors}`)}};t.default=s},91098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(73757),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=t.name("valid");n.forEach(((t,n)=>{if((0,r.alwaysValidSchema)(o,t))return;const i=e.subschema({keyword:"allOf",schemaProp:n},a);e.ok(a),e.mergeEvaluated(i)}))}};t.default=o},38067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(75843).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r},63883:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(73757),a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:e=>{let{params:{min:t,max:n}}=e;return void 0===n?r.str`must contain at least ${t} valid item(s)`:r.str`must contain at least ${t} and no more than ${n} valid item(s)`},params:e=>{let{params:{min:t,max:n}}=e;return void 0===n?r._`{minContains: ${t}}`:r._`{minContains: ${t}, maxContains: ${n}}`}},code(e){const{gen:t,schema:n,parentSchema:a,data:i,it:s}=e;let l,c;const{minContains:u,maxContains:d}=a;s.opts.next?(l=void 0===u?1:u,c=d):l=1;const p=t.const("len",r._`${i}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,o.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,o.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(s,n)){let t=r._`${p} >= ${l}`;return void 0!==c&&(t=r._`${t} && ${p} <= ${c}`),void e.pass(t)}s.items=!0;const f=t.name("valid");function h(){const e=t.name("_valid"),n=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(r._`${e}++`),void 0===c?t.if(r._`${e} >= ${l}`,(()=>t.assign(f,!0).break())):(t.if(r._`${e} > ${c}`,(()=>t.assign(f,!1).break())),1===l?t.assign(f,!0):t.if(r._`${e} >= ${l}`,(()=>t.assign(f,!0))))}(n)))))}function m(n,r){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},n),r()}))}void 0===c&&1===l?m(f,(()=>t.if(f,(()=>t.break())))):0===l?(t.let(f,!0),void 0!==c&&t.if(r._`${i}.length > 0`,h)):(t.let(f,!1),h()),e.result(f,(()=>e.reset()))}};t.default=a},10403:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const r=n(91459),o=n(73757),a=n(75843);t.error={message:e=>{let{params:{property:t,depsCount:n,deps:o}}=e;const a=1===n?"property":"properties";return r.str`must have ${a} ${o} when property ${t} is present`},params:e=>{let{params:{property:t,depsCount:n,deps:o,missingProperty:a}}=e;return r._`{property: ${t},
|
|
109
|
-
missingProperty: ${a},
|
|
110
|
-
depsCount: ${n},
|
|
111
|
-
deps: ${o}}`}};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,n]=function(e){let{schema:t}=e;const n={},r={};for(const o in t){if("__proto__"===o)continue;(Array.isArray(t[o])?n:r)[o]=t[o]}return[n,r]}(e);s(e,t),l(e,n)}};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.schema;const{gen:n,data:o,it:i}=e;if(0===Object.keys(t).length)return;const s=n.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=(0,a.propertyInData)(n,o,l,i.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),i.allErrors?n.if(u,(()=>{for(const t of c)(0,a.checkReportMissingProp)(e,t)})):(n.if(r._`${u} && (${(0,a.checkMissingProp)(e,c,s)})`),(0,a.reportMissingProp)(e,s),n.else())}}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.schema;const{gen:n,data:r,keyword:i,it:s}=e,l=n.name("valid");for(const c in t)(0,o.alwaysValidSchema)(s,t[c])||(n.if((0,a.propertyInData)(n,r,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:i,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>n.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=i},31045:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(73757),a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:e=>{let{params:t}=e;return r.str`must match "${t.ifClause}" schema`},params:e=>{let{params:t}=e;return r._`{failingKeyword: ${t.ifClause}}`}},code(e){const{gen:t,parentSchema:n,it:a}=e;void 0===n.then&&void 0===n.else&&(0,o.checkStrictMode)(a,'"if" without "then" and "else" is ignored');const s=i(a,"then"),l=i(a,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(u,d("then",n),d("else",n))}else s?t.if(u,d("then")):t.if((0,r.not)(u),d("else"));function d(n,o){return()=>{const a=e.subschema({keyword:n},u);t.assign(c,u),e.mergeValidEvaluated(a,c),o?t.assign(o,r._`${n}`):e.setParams({ifClause:n})}}e.pass(c,(()=>e.error(!0)))}};function i(e,t){const n=e.schema[t];return void 0!==n&&!(0,o.alwaysValidSchema)(e,n)}t.default=a},33892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(55155),o=n(23084),a=n(18336),i=n(97120),s=n(63883),l=n(10403),c=n(81515),u=n(29838),d=n(33479),p=n(47619),f=n(27233),h=n(38067),m=n(55481),g=n(91098),v=n(31045),y=n(14492);t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[f.default,h.default,m.default,g.default,v.default,y.default,c.default,u.default,l.default,d.default,p.default];return e?t.push(o.default,i.default):t.push(r.default,a.default),t.push(s.default),t}},18336:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r=n(91459),o=n(73757),a=n(75843),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return s(e,"additionalItems",t);n.items=!0,(0,o.alwaysValidSchema)(n,t)||e.ok((0,a.validateArray)(e))}};function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.schema;const{gen:a,parentSchema:i,data:s,keyword:l,it:c}=e;!function(e){const{opts:r,errSchemaPath:a}=c,i=n.length,s=i===e.minItems&&(i===e.maxItems||!1===e[t]);if(r.strictTuples&&!s){const e=`"${l}" is ${i}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`;(0,o.checkStrictMode)(c,e,r.strictTuples)}}(i),c.opts.unevaluated&&n.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(a,n.length,c.items));const u=a.name("valid"),d=a.const("len",r._`${s}.length`);n.forEach(((t,n)=>{(0,o.alwaysValidSchema)(c,t)||(a.if(r._`${d} > ${n}`,(()=>e.subschema({keyword:l,schemaProp:n,dataProp:n},u))),e.ok(u))}))}t.validateTuple=s,t.default=i},97120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(73757),a=n(75843),i=n(55155),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:e=>{let{params:{len:t}}=e;return r.str`must NOT have more than ${t} items`},params:e=>{let{params:{len:t}}=e;return r._`{limit: ${t}}`}},code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:s}=n;r.items=!0,(0,o.alwaysValidSchema)(r,t)||(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,a.validateArray)(e)))}};t.default=s},27233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(73757),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:o}=e;if((0,r.alwaysValidSchema)(o,n))return void e.fail();const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},55481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(73757),a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:e=>{let{params:t}=e;return r._`{passingSchemas: ${t.passing}}`}},code(e){const{gen:t,schema:n,parentSchema:a,it:i}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(i.opts.discriminator&&a.discriminator)return;const s=n,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((n,a)=>{let s;(0,o.alwaysValidSchema)(i,n)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:a,compositeRule:!0},u),a>0&&t.if(r._`${u} && ${l}`).assign(l,!1).assign(c,r._`[${c}, ${a}]`).else(),t.if(u,(()=>{t.assign(l,!0),t.assign(c,a),s&&e.mergeEvaluated(s,r.Name)}))}))})),e.result(l,(()=>e.reset()),(()=>e.error(!0)))}};t.default=a},47619:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(75843),o=n(91459),a=n(73757),i=n(73757),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:s,parentSchema:l,it:c}=e,{opts:u}=c,d=(0,r.allSchemaProperties)(n),p=d.filter((e=>(0,a.alwaysValidSchema)(c,n[e])));if(0===d.length||p.length===d.length&&(!c.opts.unevaluated||!0===c.props))return;const f=u.strictSchema&&!u.allowMatchingProperties&&l.properties,h=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=(0,i.evaluatedPropsToName)(t,c.props));const{props:m}=c;function g(e){for(const t in f)new RegExp(e).test(t)&&(0,a.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(n){t.forIn("key",s,(a=>{t.if(o._`${(0,r.usePattern)(e,n)}.test(${a})`,(()=>{const r=p.includes(n);r||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:a,dataPropType:i.Type.Str},h),c.opts.unevaluated&&!0!==m?t.assign(o._`${m}[${a}]`,!0):r||c.allErrors||t.if((0,o.not)(h),(()=>t.break()))}))}))}!function(){for(const e of d)f&&g(e),c.allErrors?v(e):(t.var(h,!0),v(e),t.if(h))}()}};t.default=s},23084:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(18336),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r.validateTuple)(e,"items")};t.default=o},33479:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(53640),o=n(75843),a=n(73757),i=n(29838),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:s,data:l,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&i.default.code(new r.KeywordCxt(c,i.default,"additionalProperties"));const u=(0,o.allSchemaProperties)(n);for(const r of u)c.definedProperties.add(r);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=a.mergeEvaluated.props(t,(0,a.toHash)(u),c.props));const d=u.filter((e=>!(0,a.alwaysValidSchema)(c,n[e])));if(0===d.length)return;const p=t.name("valid");for(const r of d)f(r)?h(r):(t.if((0,o.propertyInData)(t,l,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function f(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==n[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=s},81515:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(73757),a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:e=>{let{params:t}=e;return r._`{propertyName: ${t.propertyName}}`}},code(e){const{gen:t,schema:n,data:a,it:i}=e;if((0,o.alwaysValidSchema)(i,n))return;const s=t.name("valid");t.forIn("key",a,(n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},s),t.if((0,r.not)(s),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(s)}};t.default=a},14492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(73757),o={keyword:["then","else"],schemaType:["object","boolean"],code(e){let{keyword:t,parentSchema:n,it:o}=e;void 0===n.if&&(0,r.checkStrictMode)(o,`"${t}" without "if" is ignored`)}};t.default=o},75843:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const r=n(91459),o=n(73757),a=n(93349),i=n(73757);function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:r._`Object.prototype.hasOwnProperty`})}function l(e,t,n){return r._`${s(e)}.call(${t}, ${n})`}function c(e,t,n,o){const a=r._`${t}${(0,r.getProperty)(n)} === undefined`;return o?(0,r.or)(a,(0,r.not)(l(e,t,n))):a}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:n,data:o,it:a}=e;n.if(c(n,o,t,a.opts.ownProperties),(()=>{e.setParams({missingProperty:r._`${t}`},!0),e.error()}))},t.checkMissingProp=function(e,t,n){let{gen:o,data:a,it:{opts:i}}=e;return(0,r.or)(...t.map((e=>(0,r.and)(c(o,a,e,i.ownProperties),r._`${n} = ${e}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=s,t.isOwnProperty=l,t.propertyInData=function(e,t,n,o){const a=r._`${t}${(0,r.getProperty)(n)} !== undefined`;return o?r._`${a} && ${l(e,t,n)}`:a},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((n=>!(0,o.alwaysValidSchema)(e,t[n])))},t.callValidateCode=function(e,t,n,o){let{schemaCode:i,data:s,it:{gen:l,topSchemaRef:c,schemaPath:u,errorPath:d},it:p}=e;const f=o?r._`${i}, ${s}, ${c}${u}`:s,h=[[a.default.instancePath,(0,r.strConcat)(a.default.instancePath,d)],[a.default.parentData,p.parentData],[a.default.parentDataProperty,p.parentDataProperty],[a.default.rootData,a.default.rootData]];p.opts.dynamicRef&&h.push([a.default.dynamicAnchors,a.default.dynamicAnchors]);const m=r._`${f}, ${l.object(...h)}`;return n!==r.nil?r._`${t}.call(${n}, ${m})`:r._`${t}(${m})`};const d=r._`new RegExp`;t.usePattern=function(e,t){let{gen:n,it:{opts:o}}=e;const a=o.unicodeRegExp?"u":"",{regExp:s}=o.code,l=s(t,a);return n.scopeValue("pattern",{key:l.toString(),ref:l,code:r._`${"new RegExp"===s.code?d:(0,i.useFunc)(n,s)}(${t}, ${a})`})},t.validateArray=function(e){const{gen:t,data:n,keyword:a,it:i}=e,s=t.name("valid");if(i.allErrors){const e=t.let("valid",!0);return l((()=>t.assign(e,!1))),e}return t.var(s,!0),l((()=>t.break())),s;function l(i){const l=t.const("len",r._`${n}.length`);t.forRange("i",0,l,(n=>{e.subschema({keyword:a,dataProp:n,dataPropType:o.Type.Num},s),t.if((0,r.not)(s),i)}))}},t.validateUnion=function(e){const{gen:t,schema:n,keyword:a,it:i}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((e=>(0,o.alwaysValidSchema)(i,e)))&&!i.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block((()=>n.forEach(((n,o)=>{const i=e.subschema({keyword:a,schemaProp:o,compositeRule:!0},l);t.assign(s,r._`${s} || ${l}`);e.mergeValidEvaluated(i,l)||t.if((0,r.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},36945:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=n},83298:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(36945),o=n(16731),a=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,o.default];t.default=a},16731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const r=n(88185),o=n(75843),a=n(91459),i=n(93349),s=n(30637),l=n(73757),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:o}=e,{baseId:i,schemaEnv:l,validateName:c,opts:p,self:f}=o,{root:h}=l;if(("#"===n||"#/"===n)&&i===h.baseId)return function(){if(l===h)return d(e,c,l,l.$async);const n=t.scopeValue("root",{ref:h});return d(e,a._`${n}.validate`,h,h.$async)}();const m=s.resolveRef.call(f,h,i,n);if(void 0===m)throw new r.default(o.opts.uriResolver,i,n);return m instanceof s.SchemaEnv?function(t){const n=u(e,t);d(e,n,t,t.$async)}(m):function(r){const o=t.scopeValue("schema",!0===p.code.source?{ref:r,code:(0,a.stringify)(r)}:{ref:r}),i=t.name("valid"),s=e.subschema({schema:r,dataTypes:[],schemaPath:a.nil,topSchemaRef:o,errSchemaPath:n},i);e.mergeEvaluated(s),e.ok(i)}(m)}};function u(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):a._`${n.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,r){const{gen:s,it:c}=e,{allErrors:u,schemaEnv:d,opts:p}=c,f=p.passContext?i.default.this:a.nil;function h(e){const t=a._`${e}.errors`;s.assign(i.default.vErrors,a._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),s.assign(i.default.errors,a._`${i.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const r=null===(t=null===n||void 0===n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=l.mergeEvaluated.props(s,r.props,c.props));else{const t=s.var("props",a._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(s,t,c.props,a.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=l.mergeEvaluated.items(s,r.items,c.items));else{const t=s.var("items",a._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(s,t,c.items,a.Name)}}r?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const n=s.let("valid");s.try((()=>{s.code(a._`await ${(0,o.callValidateCode)(e,t,f)}`),m(t),u||s.assign(n,!0)}),(e=>{s.if(a._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),u||s.assign(n,!1)})),e.ok(n)}():e.result((0,o.callValidateCode)(e,t,f),(()=>m(t)),(()=>h(t)))}t.getValidate=u,t.callRef=d,t.default=c},72727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(15278),a=n(30637),i=n(88185),s=n(73757),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:e=>{let{params:{discrError:t,tagName:n}}=e;return t===o.DiscrError.Tag?`tag "${n}" must be string`:`value of tag "${n}" must be in oneOf`},params:e=>{let{params:{discrError:t,tag:n,tagName:o}}=e;return r._`{error: ${t}, tag: ${o}, tagValue: ${n}}`}},code(e){const{gen:t,data:n,schema:l,parentSchema:c,it:u}=e,{oneOf:d}=c;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const p=l.propertyName;if("string"!=typeof p)throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),h=t.const("tag",r._`${n}${(0,r.getProperty)(p)}`);function m(n){const o=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:n},o);return e.mergeEvaluated(a,r.Name),o}t.if(r._`typeof ${h} == "string"`,(()=>function(){const n=function(){var e;const t={},n=o(c);let r=!0;for(let c=0;c<d.length;c++){let t=d[c];if((null===t||void 0===t?void 0:t.$ref)&&!(0,s.schemaHasRulesButRef)(t,u.self.RULES)){const e=t.$ref;if(t=a.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),t instanceof a.SchemaEnv&&(t=t.schema),void 0===t)throw new i.default(u.opts.uriResolver,u.baseId,e)}const f=null===(e=null===t||void 0===t?void 0:t.properties)||void 0===e?void 0:e[p];if("object"!=typeof f)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);r=r&&(n||o(t)),l(f,c)}if(!r)throw new Error(`discriminator: "${p}" must be required`);return t;function o(e){let{required:t}=e;return Array.isArray(t)&&t.includes(p)}function l(e,t){if(e.const)f(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${p}" must have "const" or "enum"`);for(const n of e.enum)f(n,t)}}function f(e,n){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${p}" values must be unique strings`);t[e]=n}}();t.if(!1);for(const e in n)t.elseIf(r._`${h} === ${e}`),t.assign(f,m(n[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:h,tagName:p}),t.endIf()}()),(()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:h,tagName:p}))),e.ok(f)}};t.default=l},15278:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(n||(t.DiscrError=n={}))},4794:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(83298),o=n(97014),a=n(33892),i=n(62078),s=n(25511),l=[r.default,o.default,(0,a.default)(),i.default,s.metadataVocabulary,s.contentVocabulary];t.default=l},88319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:e=>{let{schemaCode:t}=e;return r.str`must match format "${t}"`},params:e=>{let{schemaCode:t}=e;return r._`{format: ${t}}`}},code(e,t){const{gen:n,data:o,$data:a,schema:i,schemaCode:s,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:d,self:p}=l;c.validateFormats&&(a?function(){const a=n.scopeValue("formats",{ref:p.formats,code:c.code.formats}),i=n.const("fDef",r._`${a}[${s}]`),l=n.let("fType"),u=n.let("format");n.if(r._`typeof ${i} == "object" && !(${i} instanceof RegExp)`,(()=>n.assign(l,r._`${i}.type || "string"`).assign(u,r._`${i}.validate`)),(()=>n.assign(l,r._`"string"`).assign(u,i))),e.fail$data((0,r.or)(!1===c.strictSchema?r.nil:r._`${s} && !${u}`,function(){const e=d.$async?r._`(${i}.async ? await ${u}(${o}) : ${u}(${o}))`:r._`${u}(${o})`,n=r._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return r._`${u} && ${u} !== true && ${l} === ${t} && !${n}`}()))}():function(){const a=p.formats[i];if(!a)return void function(){if(!1===c.strictSchema)return void p.logger.warn(e());throw new Error(e());function e(){return`unknown format "${i}" ignored in schema at path "${u}"`}}();if(!0===a)return;const[s,l,f]=function(e){const t=e instanceof RegExp?(0,r.regexpCode)(e):c.code.formats?r._`${c.code.formats}${(0,r.getProperty)(i)}`:void 0,o=n.scopeValue("formats",{key:i,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,r._`${o}.validate`];return["string",e,o]}(a);s===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw new Error("async format in sync schema");return r._`await ${f}(${o})`}return"function"==typeof l?r._`${f}(${o})`:r._`${f}.test(${o})`}())}())}};t.default=o},62078:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=[n(88319).default];t.default=r},25511:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},15693:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(73757),a=n(49216),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:e=>{let{schemaCode:t}=e;return r._`{allowedValue: ${t}}`}},code(e){const{gen:t,data:n,$data:i,schemaCode:s,schema:l}=e;i||l&&"object"==typeof l?e.fail$data(r._`!${(0,o.useFunc)(t,a.default)}(${n}, ${s})`):e.fail(r._`${l} !== ${n}`)}};t.default=i},8321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(73757),a=n(49216),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:e=>{let{schemaCode:t}=e;return r._`{allowedValues: ${t}}`}},code(e){const{gen:t,data:n,$data:i,schema:s,schemaCode:l,it:c}=e;if(!i&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=c.opts.loopEnum;let d;const p=()=>null!==d&&void 0!==d?d:d=(0,o.useFunc)(t,a.default);let f;if(u||i)f=t.let("valid"),e.block$data(f,(function(){t.assign(f,!1),t.forOf("v",l,(e=>t.if(r._`${p()}(${n}, ${e})`,(()=>t.assign(f,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",l);f=(0,r.or)(...s.map(((t,o)=>function(e,t){const o=s[t];return"object"===typeof o&&null!==o?r._`${p()}(${n}, ${e}[${t}])`:r._`${n} === ${o}`}(e,o))))}e.pass(f)}};t.default=i},97014:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(81044),o=n(3945),a=n(22433),i=n(22756),s=n(244),l=n(98013),c=n(58417),u=n(40463),d=n(15693),p=n(8321),f=[r.default,o.default,a.default,i.default,s.default,l.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default];t.default=f},58417:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message(e){let{keyword:t,schemaCode:n}=e;const o="maxItems"===t?"more":"fewer";return r.str`must NOT have ${o} than ${n} items`},params:e=>{let{schemaCode:t}=e;return r._`{limit: ${t}}`}},code(e){const{keyword:t,data:n,schemaCode:o}=e,a="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`${n}.length ${a} ${o}`)}};t.default=o},22433:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=n(73757),a=n(91467),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message(e){let{keyword:t,schemaCode:n}=e;const o="maxLength"===t?"more":"fewer";return r.str`must NOT have ${o} than ${n} characters`},params:e=>{let{schemaCode:t}=e;return r._`{limit: ${t}}`}},code(e){const{keyword:t,data:n,schemaCode:i,it:s}=e,l="maxLength"===t?r.operators.GT:r.operators.LT,c=!1===s.opts.unicode?r._`${n}.length`:r._`${(0,o.useFunc)(e.gen,a.default)}(${n})`;e.fail$data(r._`${c} ${l} ${i}`)}};t.default=i},81044:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o=r.operators,a={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},i={message:e=>{let{keyword:t,schemaCode:n}=e;return r.str`must be ${a[t].okStr} ${n}`},params:e=>{let{keyword:t,schemaCode:n}=e;return r._`{comparison: ${a[t].okStr}, limit: ${n}}`}},s={keyword:Object.keys(a),type:"number",schemaType:"number",$data:!0,error:i,code(e){const{keyword:t,data:n,schemaCode:o}=e;e.fail$data(r._`${n} ${a[t].fail} ${o} || isNaN(${n})`)}};t.default=s},244:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message(e){let{keyword:t,schemaCode:n}=e;const o="maxProperties"===t?"more":"fewer";return r.str`must NOT have ${o} than ${n} properties`},params:e=>{let{schemaCode:t}=e;return r._`{limit: ${t}}`}},code(e){const{keyword:t,data:n,schemaCode:o}=e,a="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`Object.keys(${n}).length ${a} ${o}`)}};t.default=o},3945:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(91459),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:e=>{let{schemaCode:t}=e;return r.str`must be multiple of ${t}`},params:e=>{let{schemaCode:t}=e;return r._`{multipleOf: ${t}}`}},code(e){const{gen:t,data:n,schemaCode:o,it:a}=e,i=a.opts.multipleOfPrecision,s=t.let("res"),l=i?r._`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:r._`${s} !== parseInt(${s})`;e.fail$data(r._`(${o} === 0 || (${s} = ${n}/${o}, ${l}))`)}};t.default=o},22756:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(75843),o=n(91459),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:e=>{let{schemaCode:t}=e;return o.str`must match pattern "${t}"`},params:e=>{let{schemaCode:t}=e;return o._`{pattern: ${t}}`}},code(e){const{data:t,$data:n,schema:a,schemaCode:i,it:s}=e,l=s.opts.unicodeRegExp?"u":"",c=n?o._`(new RegExp(${i}, ${l}))`:(0,r.usePattern)(e,a);e.fail$data(o._`!${c}.test(${t})`)}};t.default=a},98013:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(75843),o=n(91459),a=n(73757),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:e=>{let{params:{missingProperty:t}}=e;return o.str`must have required property '${t}'`},params:e=>{let{params:{missingProperty:t}}=e;return o._`{missingProperty: ${t}}`}},code(e){const{gen:t,schema:n,schemaCode:i,data:s,$data:l,it:c}=e,{opts:u}=c;if(!l&&0===n.length)return;const d=n.length>=u.loopRequired;if(c.allErrors?function(){if(d||l)e.block$data(o.nil,p);else for(const t of n)(0,r.checkReportMissingProp)(e,t)}():function(){const a=t.let("missing");if(d||l){const n=t.let("valid",!0);e.block$data(n,(()=>function(n,a){e.setParams({missingProperty:n}),t.forOf(n,i,(()=>{t.assign(a,(0,r.propertyInData)(t,s,n,u.ownProperties)),t.if((0,o.not)(a),(()=>{e.error(),t.break()}))}),o.nil)}(a,n))),e.ok(n)}else t.if((0,r.checkMissingProp)(e,n,a)),(0,r.reportMissingProp)(e,a),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:r}=e.it;for(const e of n)if(void 0===(null===t||void 0===t?void 0:t[e])&&!r.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,a.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",i,(n=>{e.setParams({missingProperty:n}),t.if((0,r.noPropertyInData)(t,s,n,u.ownProperties),(()=>e.error()))}))}}};t.default=i},40463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(90902),o=n(91459),a=n(73757),i=n(49216),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:e=>{let{params:{i:t,j:n}}=e;return o.str`must NOT have duplicate items (items ## ${n} and ${t} are identical)`},params:e=>{let{params:{i:t,j:n}}=e;return o._`{i: ${t}, j: ${n}}`}},code(e){const{gen:t,data:n,$data:s,schema:l,parentSchema:c,schemaCode:u,it:d}=e;if(!s&&!l)return;const p=t.let("valid"),f=c.items?(0,r.getSchemaTypes)(c.items):[];function h(a,i){const s=t.name("item"),l=(0,r.checkDataTypes)(f,s,d.opts.strictNumbers,r.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${a}--;`,(()=>{t.let(s,o._`${n}[${a}]`),t.if(l,o._`continue`),f.length>1&&t.if(o._`typeof ${s} == "string"`,o._`${s} += "_"`),t.if(o._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(i,o._`${c}[${s}]`),e.error(),t.assign(p,!1).break()})).code(o._`${c}[${s}] = ${a}`)}))}function m(r,s){const l=(0,a.useFunc)(t,i.default),c=t.name("outer");t.label(c).for(o._`;${r}--;`,(()=>t.for(o._`${s} = ${r}; ${s}--;`,(()=>t.if(o._`${l}(${n}[${r}], ${n}[${s}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const r=t.let("i",o._`${n}.length`),a=t.let("j");e.setParams({i:r,j:a}),t.assign(p,!0),t.if(o._`${r} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?h:m)(r,a)))}),o._`${u} === false`),e.ok(p)}};t.default=s},86189:(e,t)=>{"use strict";t.A=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(0===n.length)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),a=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?a===t.replace(/\/.*$/,""):o===t}))}return!0}},9516:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}};return n.default.locale(r,null,!0),r}(n(4159))},90923:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,o=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},s=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=i[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=i.meridiem;if(r){for(var o=1;o<=24;o+=1)if(e.indexOf(r(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},p={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,l("seconds")],ss:[o,l("seconds")],m:[o,l("minutes")],mm:[o,l("minutes")],H:[o,l("hours")],h:[o,l("hours")],HH:[o,l("hours")],hh:[o,l("hours")],D:[o,l("day")],DD:[r,l("day")],Do:[a,function(e){var t=i.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[o,l("week")],ww:[r,l("week")],M:[o,l("month")],MM:[r,l("month")],MMM:[a,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,l("year")],Z:c,ZZ:c};function f(n){var r,o;r=n,o=i&&i.formats;for(var a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||o[r]||e[r]||o[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,l=0;l<s;l+=1){var c=a[l],u=p[c],d=u&&u[0],f=u&&u[1];a[l]=f?{regex:d,parser:f}:c.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var o=a[n];if("string"==typeof o)r+=o.length;else{var i=o.regex,l=o.parser,c=e.slice(r),u=i.exec(c)[0];l.call(t,u),e=e.replace(u,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,o=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if("string"==typeof s){var l=!0===a[2],c=!0===a[3],u=l||c,d=a[2];c&&(d=a[2]),i=this.$locale(),!l&&d&&(i=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var o=f(t)(e),a=o.year,i=o.month,s=o.day,l=o.hours,c=o.minutes,u=o.seconds,d=o.milliseconds,p=o.zone,h=o.week,m=new Date,g=s||(a||i?1:m.getDate()),v=a||m.getFullYear(),y=0;a&&!i||(y=i>0?i-1:m.getMonth());var b,w=l||0,x=c||0,C=u||0,A=d||0;return p?new Date(Date.UTC(v,y,g,w,x,C,A+60*p.offset*1e3)):n?new Date(Date.UTC(v,y,g,w,x,C,A)):(b=new Date(v,y,g,w,x,C,A),h&&(b=r(b).week(h).toDate()),b)}catch(e){return new Date("")}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date("")),i={}}else if(s instanceof Array)for(var p=s.length,h=1;h<=p;h+=1){a[1]=s[h-1];var m=n.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}h===p&&(this.$d=new Date(""))}else o.call(this,e)}}}()},87542:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isBetween=function(e,t,r,o){var a=n(e),i=n(t),s="("===(o=o||"()")[0],l=")"===o[1];return(s?this.isAfter(a,r):!this.isBefore(a,r))&&(l?this.isBefore(i,r):!this.isAfter(i,r))||(s?this.isBefore(a,r):!this.isAfter(a,r))&&(l?this.isAfter(i,r):!this.isBefore(i,r))}}}()},77588:function(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,r){var o=n.prototype,a=o.format;r.en.formats=e,o.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,o){var a=o&&o.toUpperCase();return r||n[o]||e[o]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,void 0===n?{}:n);return a.call(this,r)}}}()},43540:function(e){e.exports=function(){"use strict";var e="week",t="year";return function(n,r,o){var a=r.prototype;a.week=function(n){if(void 0===n&&(n=null),null!==n)return this.add(7*(n-this.week()),"day");var r=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var a=o(this).startOf(t).add(1,t).date(r),i=o(this).endOf(e);if(a.isBefore(i))return 1}var s=o(this).startOf(t).date(r).startOf(e).subtract(1,"millisecond"),l=this.diff(s,e,!0);return l<0?o(this).startOf("week").week():Math.ceil(l)},a.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}()},45355:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!==o--;){var i=a[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}},72832:e=>{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),n(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function n(e,r,o,a,i,s,l,c,u,d){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var p in r(a,i,s,l,c,u,d),a){var f=a[p];if(Array.isArray(f)){if(p in t.arrayKeywords)for(var h=0;h<f.length;h++)n(e,r,o,f[h],i+"/"+p+"/"+h,s,i,p,a,h)}else if(p in t.propsKeywords){if(f&&"object"==typeof f)for(var m in f)n(e,r,o,f[m],i+"/"+p+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,p,a,m)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&n(e,r,o,f,i+"/"+p,s,i,p,a)}o(a,i,s,l,c,u,d)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},54472:(e,t,n)=>{"use strict";n.d(t,{VB:()=>le});var r=n(9950),o=n(11942),a=n.n(o);function i(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(t){a(t)}}function s(e){try{l(r.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"===typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(l){s=[6,l],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}Object.create;function l(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}Object.create;"function"===typeof SuppressedError&&SuppressedError;var u=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function d(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=u.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"===typeof t?t:"string"===typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var p=[".DS_Store","Thumbs.db"];function f(e){return"object"===typeof e&&null!==e}function h(e){return y(e.target.files).map((function(e){return d(e)}))}function m(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return d(e)}))]}}))}))}function g(e,t){return i(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return null===e?[2,[]]:e.items?(n=y(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(b))]):[3,2];case 1:return[2,v(w(r.sent()))];case 2:return[2,v(y(e.files).map((function(e){return d(e)})))]}}))}))}function v(e){return e.filter((function(e){return-1===p.indexOf(e.name)}))}function y(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function b(e){if("function"!==typeof e.webkitGetAsEntry)return x(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?A(t):x(e)}function w(e){return e.reduce((function(e,t){return c(e,Array.isArray(t)?w(t):[t])}),[])}function x(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=d(t);return Promise.resolve(n)}function C(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,e.isDirectory?A(e):S(e)]}))}))}function A(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var a=this;t.readEntries((function(t){return i(a,void 0,void 0,(function(){var a,i,l;return s(this,(function(s){switch(s.label){case 0:if(t.length)return[3,5];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=s.sent(),e(a),[3,4];case 3:return i=s.sent(),n(i),[3,4];case 4:return[3,6];case 5:l=Promise.all(t.map(C)),r.push(l),o(),s.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function S(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=d(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var k=n(86189);function M(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(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(l){s=!0,o=l}finally{try{i||null==n.return||n.return()}finally{if(s)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var D="file-invalid-type",N="file-too-large",$="file-too-small",O="too-many-files",T=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:D,message:"File type must be ".concat(t)}},_=function(e){return{code:N,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},j=function(e){return{code:$,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},F={code:O,message:"Too many files"};function L(e,t){var n="application/x-moz-file"===e.type||(0,k.A)(e,t);return[n,n?null:T(t)]}function V(e,t,n){if(z(e.size))if(z(t)&&z(n)){if(e.size>n)return[!1,_(n)];if(e.size<t)return[!1,j(t)]}else{if(z(t)&&e.size<t)return[!1,j(t)];if(z(n)&&e.size>n)return[!1,_(n)]}return[!0,null]}function z(e){return void 0!==e&&null!==e}function H(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function B(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function G(e){e.preventDefault()}function W(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!H(e)&&t&&t.apply(void 0,[e].concat(r)),H(e)}))}}function U(e){return e="string"===typeof e?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter((function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)})).reduce((function(e,t){return E(E({},e),{},R({},t,[]))}),{}):{}}]}var K=["children"],q=["open"],Y=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],X=["refKey","onChange","onClick"];function Z(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||J(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(l){s=!0,o=l}finally{try{i||null==n.return||n.return()}finally{if(s)throw o}}return a}(e,t)||J(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){if(e){if("string"===typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ee(e,t):void 0}}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function te(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 ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ae=(0,r.forwardRef)((function(e,t){var n=e.children,o=le(oe(e,K)),a=o.open,i=oe(o,q);return(0,r.useImperativeHandle)(t,(function(){return{open:a}}),[a]),r.createElement(r.Fragment,null,n(ne(ne({},i),{},{open:a})))}));ae.displayName="Dropzone";var ie={disabled:!1,getFilesFromEvent:function(e){return i(this,void 0,void 0,(function(){return s(this,(function(t){return f(e)&&f(e.dataTransfer)?[2,g(e.dataTransfer,e.type)]:function(e){return f(e)&&f(e.target)}(e)?[2,h(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"===typeof e.getFile}))?[2,m(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};ae.defaultProps=ie,ae.propTypes={children:a().func,accept:a().oneOfType([a().string,a().arrayOf(a().string)]),multiple:a().bool,preventDropOnDocument:a().bool,noClick:a().bool,noKeyboard:a().bool,noDrag:a().bool,noDragEventsBubbling:a().bool,minSize:a().number,maxSize:a().number,maxFiles:a().number,disabled:a().bool,getFilesFromEvent:a().func,onFileDialogCancel:a().func,onFileDialogOpen:a().func,useFsAccessApi:a().bool,onDragEnter:a().func,onDragLeave:a().func,onDragOver:a().func,onDrop:a().func,onDropAccepted:a().func,onDropRejected:a().func,validator:a().func};var se={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ne(ne({},ie),e),n=t.accept,o=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,p=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,v=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.preventDropOnDocument,w=t.noClick,x=t.noKeyboard,C=t.noDrag,A=t.noDragEventsBubbling,S=t.validator,k=(0,r.useMemo)((function(){return"function"===typeof v?v:ue}),[v]),M=(0,r.useMemo)((function(){return"function"===typeof g?g:ue}),[g]),E=(0,r.useRef)(null),R=(0,r.useRef)(null),I=Q((0,r.useReducer)(ce,se),2),D=I[0],N=I[1],$=D.isFocused,O=D.isFileDialogActive,T=D.draggedFiles,_=(0,r.useRef)("undefined"!==typeof window&&window.isSecureContext&&y&&"showOpenFilePicker"in window),j=function(){!_.current&&O&&setTimeout((function(){R.current&&(R.current.files.length||(N({type:"closeDialog"}),M()))}),300)};(0,r.useEffect)((function(){return window.addEventListener("focus",j,!1),function(){window.removeEventListener("focus",j,!1)}}),[R,O,M,_]);var z=(0,r.useRef)([]),K=function(e){E.current&&E.current.contains(e.target)||(e.preventDefault(),z.current=[])};(0,r.useEffect)((function(){return b&&(document.addEventListener("dragover",G,!1),document.addEventListener("drop",K,!1)),function(){b&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",K))}}),[E,b]);var q=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),ye(e),z.current=[].concat(Z(z.current),[e.target]),B(e)&&Promise.resolve(a(e)).then((function(t){H(e)&&!A||(N({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e))}))}),[a,u,A]),J=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),ye(e);var t=B(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&p&&p(e),!1}),[p,A]),ee=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),ye(e);var t=z.current.filter((function(e){return E.current&&E.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),z.current=t,t.length>0||(N({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),B(e)&&d&&d(e))}),[E,d,A]),te=(0,r.useCallback)((function(e,t){var r=[],o=[];e.forEach((function(e){var t=Q(L(e,n),2),a=t[0],l=t[1],c=Q(V(e,s,i),2),u=c[0],d=c[1],p=S?S(e):null;if(a&&u&&!p)r.push(e);else{var f=[l,d];p&&(f=f.concat(p)),o.push({file:e,errors:f.filter((function(e){return e}))})}})),(!l&&r.length>1||l&&c>=1&&r.length>c)&&(r.forEach((function(e){o.push({file:e,errors:[F]})})),r.splice(0)),N({acceptedFiles:r,fileRejections:o,type:"setFiles"}),f&&f(r,o,t),o.length>0&&m&&m(o,t),r.length>0&&h&&h(r,t)}),[N,l,n,s,i,c,f,h,m,S]),ae=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),ye(e),z.current=[],B(e)&&Promise.resolve(a(e)).then((function(t){H(e)&&!A||te(t,e)})),N({type:"reset"})}),[a,te,A]),le=(0,r.useCallback)((function(){if(_.current){N({type:"openDialog"}),k();var e={multiple:l,types:U(n)};window.showOpenFilePicker(e).then((function(e){return a(e)})).then((function(e){te(e,null),N({type:"closeDialog"})})).catch((function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(M(e),N({type:"closeDialog"})):function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)&&(_.current=!1,R.current&&(R.current.value=null,R.current.click()))}))}else R.current&&(N({type:"openDialog"}),k(),R.current.value=null,R.current.click())}),[N,k,M,y,te,n,l]),de=(0,r.useCallback)((function(e){E.current&&E.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),le()))}),[E,le]),pe=(0,r.useCallback)((function(){N({type:"focus"})}),[]),fe=(0,r.useCallback)((function(){N({type:"blur"})}),[]),he=(0,r.useCallback)((function(){w||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?le():setTimeout(le,0))}),[w,le]),me=function(e){return o?null:e},ge=function(e){return x?null:me(e)},ve=function(e){return C?null:me(e)},ye=function(e){A&&e.stopPropagation()},be=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.role,a=e.onKeyDown,i=e.onFocus,s=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,p=e.onDrop,f=oe(e,Y);return ne(ne(re({onKeyDown:ge(W(a,de)),onFocus:ge(W(i,pe)),onBlur:ge(W(s,fe)),onClick:me(W(l,he)),onDragEnter:ve(W(c,q)),onDragOver:ve(W(u,J)),onDragLeave:ve(W(d,ee)),onDrop:ve(W(p,ae)),role:"string"===typeof r&&""!==r?r:"button"},n,E),o||x?{}:{tabIndex:0}),f)}}),[E,de,pe,fe,he,q,J,ee,ae,x,C,o]),we=(0,r.useCallback)((function(e){e.stopPropagation()}),[]),xe=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,a=e.onClick,i=oe(e,X);return ne(ne({},re({accept:n,multiple:l,type:"file",style:{display:"none"},onChange:me(W(o,ae)),onClick:me(W(a,we)),tabIndex:-1},r,R)),i)}}),[R,n,l,ae,o]),Ce=T.length,Ae=Ce>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,a=e.multiple,i=e.maxFiles;return!(!a&&t.length>1||a&&i>=1&&t.length>i)&&t.every((function(e){var t=P(L(e,n),1)[0],a=P(V(e,r,o),1)[0];return t&&a}))}({files:T,accept:n,minSize:s,maxSize:i,multiple:l,maxFiles:c}),Se=Ce>0&&!Ae;return ne(ne({},D),{},{isDragAccept:Ae,isDragReject:Se,isFocused:$&&!o,getRootProps:be,getInputProps:xe,rootRef:E,inputRef:R,open:me(le)})}function ce(e,t){switch(t.type){case"focus":return ne(ne({},e),{},{isFocused:!0});case"blur":return ne(ne({},e),{},{isFocused:!1});case"openDialog":return ne(ne({},se),{},{isFileDialogActive:!0});case"closeDialog":return ne(ne({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ne(ne({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ne(ne({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ne({},se);default:return e}}function ue(){}},87658:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});var r=n(9950),o={then:function(){}};function a(e){var t=e.freeze,n=e.children;if(t)throw o;return r.createElement(r.Fragment,null,n)}function i(e){var t=e.freeze,n=e.children,o=e.placeholder,i=void 0===o?null:o;return r.createElement(r.Suspense,{fallback:i},r.createElement(a,{freeze:t},n))}},10844:(e,t,n)=>{"use strict";n.d(t,{UI:()=>a});var r="NOT_FOUND";var o=function(e,t){return e===t};function a(e,t){var n="object"===typeof t?t:{equalityCheck:t},a=n.equalityCheck,i=void 0===a?o:a,s=n.maxSize,l=void 0===s?1:s,c=n.resultEqualityCheck,u=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(i),d=1===l?function(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:r},put:function(e,n){t={key:e,value:n}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}(u):function(e,t){var n=[];function o(e){var o=n.findIndex((function(n){return t(e,n.key)}));if(o>-1){var a=n[o];return o>0&&(n.splice(o,1),n.unshift(a)),a.value}return r}return{get:o,put:function(t,a){o(t)===r&&(n.unshift({key:t,value:a}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(l,u);function p(){var t=d.get(arguments);if(t===r){if(t=e.apply(null,arguments),c){var n=d.getEntries().find((function(e){return c(e.value,t)}));n&&(t=n.value)}d.put(arguments,t)}return t}return p.clearCache=function(){return d.clear()},p}},87737:(e,t,n)=>{"use strict";var r=n(9950);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=r.useState,i=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(r){return!0}}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),i((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},7286:(e,t,n)=>{"use strict";var r=n(9950),o=n(6538);var a="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},i=o.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=c((function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&p.hasValue){var t=p.value;if(o(t,e))return s=t}return s=e}if(t=s,a(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,s=n)}var i,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var f=i(e,d[0],d[1]);return l((function(){p.hasValue=!0,p.value=f}),[f]),u(f),f}},6538:(e,t,n)=>{"use strict";e.exports=n(87737)},53044:(e,t,n)=>{"use strict";e.exports=n(7286)},88626:()=>{},30075:(e,t,n)=>{"use strict";const{normalizeIPv6:r,normalizeIPv4:o,removeDotSegments:a,recomposeAuthority:i,normalizeComponentEncoding:s}=n(21942),l=n(17355);function c(e,t,n,r){const o={};return r||(e=f(u(e,n),n),t=f(u(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=a(t.path||""),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=a(t.path||""),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=a(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=a(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function u(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),o=[],s=l[(r.scheme||n.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(n,r),void 0!==n.path&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),void 0!==n.scheme&&(n.path=n.path.split("%3A").join(":")))),"suffix"!==r.reference&&n.scheme&&o.push(n.scheme,":");const c=i(n,r);if(void 0!==c&&("suffix"!==r.reference&&o.push("//"),o.push(c),n.path&&"/"!==n.path.charAt(0)&&o.push("/")),void 0!==n.path){let e=n.path;r.absolutePath||s&&s.absolutePath||(e=a(e)),void 0===c&&(e=e.replace(/^\/\//u,"/%2F")),o.push(e)}return void 0!==n.query&&o.push("?",n.query),void 0!==n.fragment&&o.push("#",n.fragment),o.join("")}const d=Array.from({length:127},((e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t))));const p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function f(e,t){const n=Object.assign({},t),a={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=-1!==e.indexOf("%");let s=!1;"suffix"===n.reference&&(e=(n.scheme?n.scheme+":":"")+"//"+e);const c=e.match(p);if(c){if(a.scheme=c[1],a.userinfo=c[3],a.host=c[4],a.port=parseInt(c[5],10),a.path=c[6]||"",a.query=c[7],a.fragment=c[8],isNaN(a.port)&&(a.port=c[5]),a.host){const e=o(a.host);if(!1===e.isIPV4){const t=r(e.host,{isIPV4:!1});a.host=t.host.toLowerCase(),s=t.isIPV6}else a.host=e.host,s=!0}void 0!==a.scheme||void 0!==a.userinfo||void 0!==a.host||void 0!==a.port||a.path||void 0!==a.query?void 0===a.scheme?a.reference="relative":void 0===a.fragment?a.reference="absolute":a.reference="uri":a.reference="same-document",n.reference&&"suffix"!==n.reference&&n.reference!==a.reference&&(a.error=a.error||"URI is not a "+n.reference+" reference.");const e=l[(n.scheme||a.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!e||!e.unicodeSupport)&&a.host&&(n.domainHost||e&&e.domainHost)&&!1===s&&function(e){let t=0;for(let n=0,r=e.length;n<r;++n)if(t=e.charCodeAt(n),t>126||d[t])return!0;return!1}(a.host))try{a.host=URL.domainToASCII(a.host.toLowerCase())}catch(u){a.error=a.error||"Host's domain name can not be converted to ASCII: "+u}(!e||e&&!e.skipNormalize)&&(i&&void 0!==a.scheme&&(a.scheme=unescape(a.scheme)),i&&void 0!==a.host&&(a.host=unescape(a.host)),void 0!==a.path&&a.path.length&&(a.path=escape(unescape(a.path))),void 0!==a.fragment&&a.fragment.length&&(a.fragment=encodeURI(decodeURIComponent(a.fragment)))),e&&e.parse&&e.parse(a,n)}else a.error=a.error||"URI can not be parsed.";return a}const h={SCHEMES:l,normalize:function(e,t){return"string"===typeof e?e=u(f(e,t),t):"object"===typeof e&&(e=f(u(e,t),t)),e},resolve:function(e,t,n){const r=Object.assign({scheme:"null"},n);return u(c(f(e,r),f(t,r),r,!0),{...r,skipEscape:!0})},resolveComponents:c,equal:function(e,t,n){return"string"===typeof e?(e=unescape(e),e=u(s(f(e,n),!0),{...n,skipEscape:!0})):"object"===typeof e&&(e=u(s(e,!0),{...n,skipEscape:!0})),"string"===typeof t?(t=unescape(t),t=u(s(f(t,n),!0),{...n,skipEscape:!0})):"object"===typeof t&&(t=u(s(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:u,parse:f};e.exports=h,e.exports.default=h,e.exports.fastUri=h},17355:e=>{"use strict";const t=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(e){return"boolean"===typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function a(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const i={scheme:"http",domainHost:!0,parse:o,serialize:a},s={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=r(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if(e.port!==(r(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"===typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,n]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}},l={http:i,https:{scheme:"https",domainHost:i.domainHost,parse:o,serialize:a},ws:s,wss:{scheme:"wss",domainHost:s.domainHost,parse:s.parse,serialize:s.serialize},urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(n);if(r){const n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const o=`${n}:${t.nid||e.nid}`,a=l[o];e.path=void 0,a&&(e=a.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){const n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),o=`${n}:${t.nid||r}`,a=l[o];a&&(e=a.serialize(e,t));const i=e,s=e.nss;return i.path=`${r||t.nid}:${s}`,t.skipEscape=!0,i},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,n){const r=e;return r.uuid=r.nss,r.nss=void 0,n.tolerant||r.uuid&&t.test(r.uuid)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};e.exports=l},39126:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},21942:(e,t,n)=>{"use strict";const{HEX:r}=n(39126);function o(e){if(l(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[n]=t;return n?{host:s(n,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function a(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="",o=!0;for(const a of e){if(void 0===r[a])return;"0"!==a&&!0===o&&(o=!1),o||(n+=a)}return t&&0===n.length&&(n="0"),n}function i(e){if(l(e,":")<2)return{host:e,isIPV6:!1};const t=function(e){let t=0;const n={error:!1,address:"",zone:""},r=[],o=[];let i=!1,s=!1,l=!1;function c(){if(o.length){if(!1===i){const e=a(o);if(void 0===e)return n.error=!0,!1;r.push(e)}o.length=0}return!0}for(let a=0;a<e.length;a++){const u=e[a];if("["!==u&&"]"!==u)if(":"!==u)if("%"===u){if(!c())break;i=!0}else o.push(u);else{if(!0===s&&(l=!0),!c())break;if(t++,r.push(":"),t>7){n.error=!0;break}a-1>=0&&":"===e[a-1]&&(s=!0)}}return o.length&&(i?n.zone=o.join(""):l?r.push(o.join("")):r.push(a(o))),n.address=r.join(""),n}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+="%"+t.zone,n+="%25"+t.zone),{host:e,escapedHost:n,isIPV6:!0}}}function s(e,t){let n="",r=!0;const o=e.length;for(let a=0;a<o;a++){const i=e[a];"0"===i&&r?(a+1<=o&&e[a+1]===t||a+1===o)&&(n+=i,r=!1):(r=i===t,n+=i)}return n}function l(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}const c=/^\.\.?\//u,u=/^\/\.(?:\/|$)/u,d=/^\/\.\.(?:\/|$)/u,p=/^\/?(?:.|\n)*?(?=\/|$)/u;e.exports={recomposeAuthority:function(e,t){const n=[];if(void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host){let t=unescape(e.host);const r=o(t);if(r.isIPV4)t=r.host;else{const n=i(r.host,{isIPV4:!1});t=!0===n.isIPV6?`[${n.escapedHost}]`:e.host}n.push(t)}return"number"!==typeof e.port&&"string"!==typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0},normalizeComponentEncoding:function(e,t){const n=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=n(e.scheme)),void 0!==e.userinfo&&(e.userinfo=n(e.userinfo)),void 0!==e.host&&(e.host=n(e.host)),void 0!==e.path&&(e.path=n(e.path)),void 0!==e.query&&(e.query=n(e.query)),void 0!==e.fragment&&(e.fragment=n(e.fragment)),e},removeDotSegments:function(e){const t=[];for(;e.length;)if(e.match(c))e=e.replace(c,"");else if(e.match(u))e=e.replace(u,"/");else if(e.match(d))e=e.replace(d,"/"),t.pop();else if("."===e||".."===e)e="";else{const n=e.match(p);if(!n)throw new Error("Unexpected dot segment condition");{const r=n[0];e=e.slice(r.length),t.push(r)}}return t.join("")},normalizeIPv4:o,normalizeIPv6:i,stringArrayToHexStripped:a}},85668:(e,t,n)=>{"use strict";n.d(t,{V:()=>h,_:()=>r});var r,o=n(9950),a=n(73380),i=n(89614),s=n(75386);function l(e){let{color:t,dimensions:n,lineWidth:r}=e;return o.createElement("path",{stroke:t,strokeWidth:r,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`})}function c(e){let{color:t,radius:n}=e;return o.createElement("circle",{cx:n,cy:n,r:n,fill:t})}!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(r||(r={}));const u={[r.Dots]:"#91919a",[r.Lines]:"#eee",[r.Cross]:"#e2e2e2"},d={[r.Dots]:1,[r.Lines]:1,[r.Cross]:6},p=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function f(e){let{id:t,variant:n=r.Dots,gap:f=20,size:h,lineWidth:m=1,offset:g=2,color:v,style:y,className:b}=e;const w=(0,o.useRef)(null),{transform:x,patternId:C}=(0,i.Pj)(p,s.x),A=v||u[n],S=h||d[n],k=n===r.Dots,M=n===r.Cross,E=Array.isArray(f)?f:[f,f],R=[E[0]*x[2]||1,E[1]*x[2]||1],P=S*x[2],I=M?[P,P]:R,D=k?[P/g,P/g]:[I[0]/g,I[1]/g];return o.createElement("svg",{className:(0,a.A)(["react-flow__background",b]),style:{...y,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:w,"data-testid":"rf__background"},o.createElement("pattern",{id:C+t,x:x[0]%R[0],y:x[1]%R[1],width:R[0],height:R[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${D[0]},-${D[1]})`},k?o.createElement(c,{color:A,radius:P/g}):o.createElement(l,{dimensions:I,color:A,lineWidth:m})),o.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${C+t})`}))}f.displayName="Background";var h=(0,o.memo)(f)},37630:(e,t,n)=>{"use strict";n.d(t,{H:()=>m});var r=n(9950),o=n(73380),a=n(75386),i=n(89614);function s(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},r.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function l(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},r.createElement("path",{d:"M0 0h32v4.2H0z"}))}function c(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},r.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function u(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function d(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const p=e=>{let{children:t,className:n,...a}=e;return r.createElement("button",{type:"button",className:(0,o.A)(["react-flow__controls-button",n]),...a},t)};p.displayName="ControlButton";const f=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),h=e=>{let{style:t,showZoom:n=!0,showFitView:h=!0,showInteractive:m=!0,fitViewOptions:g,onZoomIn:v,onZoomOut:y,onFitView:b,onInteractiveChange:w,className:x,children:C,position:A="bottom-left"}=e;const S=(0,i.PI)(),[k,M]=(0,r.useState)(!1),{isInteractive:E,minZoomReached:R,maxZoomReached:P}=(0,i.Pj)(f,a.x),{zoomIn:I,zoomOut:D,fitView:N}=(0,i.VH)();if((0,r.useEffect)((()=>{M(!0)}),[]),!k)return null;return r.createElement(i.Zk,{className:(0,o.A)(["react-flow__controls",x]),position:A,style:t,"data-testid":"rf__controls"},n&&r.createElement(r.Fragment,null,r.createElement(p,{onClick:()=>{I(),v?.()},className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:P},r.createElement(s,null)),r.createElement(p,{onClick:()=>{D(),y?.()},className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:R},r.createElement(l,null))),h&&r.createElement(p,{className:"react-flow__controls-fitview",onClick:()=>{N(g),b?.()},title:"fit view","aria-label":"fit view"},r.createElement(c,null)),m&&r.createElement(p,{className:"react-flow__controls-interactive",onClick:()=>{S.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),w?.(!E)},title:"toggle interactivity","aria-label":"toggle interactivity"},E?r.createElement(d,null):r.createElement(u,null)),C)};h.displayName="Controls";var m=(0,r.memo)(h)},89614:(e,t,n)=>{"use strict";n.d(t,{rV:()=>ii,h7:()=>Ur,TG:()=>sr,Zk:()=>In,yX:()=>lr,Gc:()=>oi,Fp:()=>xr,Jo:()=>Ir,oN:()=>mr,VH:()=>No,Pj:()=>En,PI:()=>Rn});var r=n(9950),o=n(73380),a=n(53044);const i=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:()=>{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},s=e=>e?i(e):i;const{useDebugValue:l}=r,{useSyncExternalStoreWithSelector:c}=a,u=e=>e;function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,n=arguments.length>2?arguments[2]:void 0;const r=c(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return l(r),r}const p=(e,t)=>{const n=s(e),r=function(e){return d(n,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t)};return Object.assign(r,n),r};var f=n(75386),h={value:()=>{}};function m(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new g(r)}function g(e){this._=e}function v(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function y(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=h,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}g.prototype=m.prototype={constructor:g,on:function(e,t){var n,r,o=this._,a=(r=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),i=-1,s=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++i<s;)if(n=(e=a[i]).type)o[n]=y(o[n],e.name,t);else if(null==t)for(n in o)o[n]=y(o[n],e.name,null);return this}for(;++i<s;)if((n=(e=a[i]).type)&&(n=v(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new g(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),a=0;a<n;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};const b=m;function w(){}function x(e){return null==e?w:function(){return this.querySelector(e)}}function C(){return[]}function A(e){return null==e?C:function(){return this.querySelectorAll(e)}}function S(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function k(e){return function(){return this.matches(e)}}function M(e){return function(t){return t.matches(e)}}var E=Array.prototype.find;function R(){return this.firstElementChild}var P=Array.prototype.filter;function I(){return Array.from(this.children)}function D(e){return new Array(e.length)}function N(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function $(e,t,n,r,o,a){for(var i,s=0,l=t.length,c=a.length;s<c;++s)(i=t[s])?(i.__data__=a[s],r[s]=i):n[s]=new N(e,a[s]);for(;s<l;++s)(i=t[s])&&(o[s]=i)}function O(e,t,n,r,o,a,i){var s,l,c,u=new Map,d=t.length,p=a.length,f=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(f[s]=c=i.call(l,l.__data__,s,t)+"",u.has(c)?o[s]=l:u.set(c,l));for(s=0;s<p;++s)c=i.call(e,a[s],s,a)+"",(l=u.get(c))?(r[s]=l,l.__data__=a[s],u.delete(c)):n[s]=new N(e,a[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(f[s])===l&&(o[s]=l)}function T(e){return e.__data__}function _(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function j(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}N.prototype={constructor:N,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var F="http://www.w3.org/1999/xhtml";const L={svg:"http://www.w3.org/2000/svg",xhtml:F,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function V(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),L.hasOwnProperty(t)?{space:L[t],local:e}:e}function z(e){return function(){this.removeAttribute(e)}}function H(e){return function(){this.removeAttributeNS(e.space,e.local)}}function B(e,t){return function(){this.setAttribute(e,t)}}function G(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function W(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function U(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function K(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function q(e){return function(){this.style.removeProperty(e)}}function Y(e,t,n){return function(){this.style.setProperty(e,t,n)}}function X(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Z(e,t){return e.style.getPropertyValue(t)||K(e).getComputedStyle(e,null).getPropertyValue(t)}function Q(e){return function(){delete this[e]}}function J(e,t){return function(){this[e]=t}}function ee(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function te(e){return e.trim().split(/^|\s+/)}function ne(e){return e.classList||new re(e)}function re(e){this._node=e,this._names=te(e.getAttribute("class")||"")}function oe(e,t){for(var n=ne(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function ae(e,t){for(var n=ne(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function ie(e){return function(){oe(this,e)}}function se(e){return function(){ae(this,e)}}function le(e,t){return function(){(t.apply(this,arguments)?oe:ae)(this,e)}}function ce(){this.textContent=""}function ue(e){return function(){this.textContent=e}}function de(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function pe(){this.innerHTML=""}function fe(e){return function(){this.innerHTML=e}}function he(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function me(){this.nextSibling&&this.parentNode.appendChild(this)}function ge(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ve(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===F&&t.documentElement.namespaceURI===F?t.createElement(e):t.createElementNS(n,e)}}function ye(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function be(e){var t=V(e);return(t.local?ye:ve)(t)}function we(){return null}function xe(){var e=this.parentNode;e&&e.removeChild(this)}function Ce(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ae(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Se(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function ke(e,t,n){return function(){var r,o=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var i=0,s=o.length;i<s;++i)if((r=o[i]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t);this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function Me(e,t,n){var r=K(e),o=r.CustomEvent;"function"===typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Ee(e,t){return function(){return Me(this,e,t)}}function Re(e,t){return function(){return Me(this,e,t.apply(this,arguments))}}re.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Pe=[null];function Ie(e,t){this._groups=e,this._parents=t}function De(){return new Ie([[document.documentElement]],Pe)}Ie.prototype=De.prototype={constructor:Ie,select:function(e){"function"!==typeof e&&(e=x(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i,s=t[o],l=s.length,c=r[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(i=e.call(a,a.__data__,u,s))&&("__data__"in a&&(i.__data__=a.__data__),c[u]=i);return new Ie(r,this._parents)},selectAll:function(e){e="function"===typeof e?S(e):A(e);for(var t=this._groups,n=t.length,r=[],o=[],a=0;a<n;++a)for(var i,s=t[a],l=s.length,c=0;c<l;++c)(i=s[c])&&(r.push(e.call(i,i.__data__,c,s)),o.push(i));return new Ie(r,o)},selectChild:function(e){return this.select(null==e?R:function(e){return function(){return E.call(this.children,e)}}("function"===typeof e?e:M(e)))},selectChildren:function(e){return this.selectAll(null==e?I:function(e){return function(){return P.call(this.children,e)}}("function"===typeof e?e:M(e)))},filter:function(e){"function"!==typeof e&&(e=k(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],s=i.length,l=r[o]=[],c=0;c<s;++c)(a=i[c])&&e.call(a,a.__data__,c,i)&&l.push(a);return new Ie(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,T);var n,r=t?O:$,o=this._parents,a=this._groups;"function"!==typeof e&&(n=e,e=function(){return n});for(var i=a.length,s=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var d=o[u],p=a[u],f=p.length,h=_(e.call(d,d&&d.__data__,u,o)),m=h.length,g=l[u]=new Array(m),v=s[u]=new Array(m);r(d,p,g,v,c[u]=new Array(f),h,t);for(var y,b,w=0,x=0;w<m;++w)if(y=g[w]){for(w>=x&&(x=w+1);!(b=v[x])&&++x<m;);y._next=b||null}}return(s=new Ie(s,o))._enter=l,s._exit=c,s},enter:function(){return new Ie(this._enter||this._groups.map(D),this._parents)},exit:function(){return new Ie(this._exit||this._groups.map(D),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,a=this.exit();return"function"===typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?a.remove():n(a),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),s=new Array(o),l=0;l<i;++l)for(var c,u=n[l],d=r[l],p=u.length,f=s[l]=new Array(p),h=0;h<p;++h)(c=u[h]||d[h])&&(f[h]=c);for(;l<o;++l)s[l]=n[l];return new Ie(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],a=o.length-1,i=o[a];--a>=0;)(r=o[a])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=j);for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i,s=n[a],l=s.length,c=o[a]=new Array(l),u=0;u<l;++u)(i=s[u])&&(c[u]=i);c.sort(t)}return new Ie(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,a=t[n],i=0,s=a.length;i<s;++i)(o=a[i])&&e.call(o,o.__data__,i,a);return this},attr:function(e,t){var n=V(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?H:z:"function"===typeof t?n.local?U:W:n.local?G:B)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?q:"function"===typeof t?X:Y)(e,t,null==n?"":n)):Z(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Q:"function"===typeof t?ee:J)(e,t)):this.node()[e]},classed:function(e,t){var n=te(e+"");if(arguments.length<2){for(var r=ne(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"===typeof t?le:t?ie:se)(n,t))},text:function(e){return arguments.length?this.each(null==e?ce:("function"===typeof e?de:ue)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?pe:("function"===typeof e?he:fe)(e)):this.node().innerHTML},raise:function(){return this.each(me)},lower:function(){return this.each(ge)},append:function(e){var t="function"===typeof e?e:be(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"===typeof e?e:be(e),r=null==t?we:"function"===typeof t?t:x(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(xe)},clone:function(e){return this.select(e?Ae:Ce)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,a=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),i=a.length;if(!(arguments.length<2)){for(s=t?ke:Se,r=0;r<i;++r)this.each(s(a[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<i;++r)if((o=a[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"===typeof t?Re:Ee)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],a=0,i=o.length;a<i;++a)(r=o[a])&&(yield r)}};const Ne=De;function $e(e){return"string"===typeof e?new Ie([[document.querySelector(e)]],[document.documentElement]):new Ie([[e]],Pe)}const Oe={passive:!1},Te={capture:!0,passive:!1};function _e(e){e.stopImmediatePropagation()}function je(e){e.preventDefault(),e.stopImmediatePropagation()}function Fe(e){var t=e.document.documentElement,n=$e(e).on("dragstart.drag",je,Te);"onselectstart"in t?n.on("selectstart.drag",je,Te):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Le(e,t){var n=e.document.documentElement,r=$e(e).on("dragstart.drag",null);t&&(r.on("click.drag",je,Te),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Ve(e){return((e=Math.exp(e))+1/e)/2}const ze=function e(t,n,r){function o(e,o){var a,i,s=e[0],l=e[1],c=e[2],u=o[0],d=o[1],p=o[2],f=u-s,h=d-l,m=f*f+h*h;if(m<1e-12)i=Math.log(p/c)/t,a=function(e){return[s+e*f,l+e*h,c*Math.exp(t*e*i)]};else{var g=Math.sqrt(m),v=(p*p-c*c+r*m)/(2*c*n*g),y=(p*p-c*c-r*m)/(2*p*n*g),b=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(y*y+1)-y);i=(w-b)/t,a=function(e){var r,o=e*i,a=Ve(b),u=c/(n*g)*(a*(r=t*o+b,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[s+u*f,l+u*h,c*a/Ve(t*o+b)]}}return a.duration=1e3*i*t/Math.SQRT2,a}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4);function He(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}var Be,Ge,We=0,Ue=0,Ke=0,qe=0,Ye=0,Xe=0,Ze="object"===typeof performance&&performance.now?performance:Date,Qe="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Je(){return Ye||(Qe(et),Ye=Ze.now()+Xe)}function et(){Ye=0}function tt(){this._call=this._time=this._next=null}function nt(e,t,n){var r=new tt;return r.restart(e,t,n),r}function rt(){Ye=(qe=Ze.now())+Xe,We=Ue=0;try{!function(){Je(),++We;for(var e,t=Be;t;)(e=Ye-t._time)>=0&&t._call.call(void 0,e),t=t._next;--We}()}finally{We=0,function(){var e,t,n=Be,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Be=t);Ge=e,at(r)}(),Ye=0}}function ot(){var e=Ze.now(),t=e-qe;t>1e3&&(Xe-=t,qe=e)}function at(e){We||(Ue&&(Ue=clearTimeout(Ue)),e-Ye>24?(e<1/0&&(Ue=setTimeout(rt,e-Ze.now()-Xe)),Ke&&(Ke=clearInterval(Ke))):(Ke||(qe=Ze.now(),Ke=setInterval(ot,1e3)),We=1,Qe(rt)))}function it(e,t,n){var r=new tt;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}tt.prototype=nt.prototype={constructor:tt,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?Je():+n)+(null==t?0:+t),this._next||Ge===this||(Ge?Ge._next=this:Be=this,Ge=this),this._call=e,this._time=n,at()},stop:function(){this._call&&(this._call=null,this._time=1/0,at())}};var st=b("start","end","cancel","interrupt"),lt=[];function ct(e,t,n,r,o,a){var i=e.__transition;if(i){if(n in i)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function a(e){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=e&&i(e-n.delay)}function i(a){var c,u,d,p;if(1!==n.state)return l();for(c in o)if((p=o[c]).name===n.name){if(3===p.state)return it(i);4===p.state?(p.state=6,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[c]):+c<t&&(p.state=6,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[c])}if(it((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=p);r.length=u+1}}function s(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,i=r.length;++a<i;)r[a].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=nt(a,0,n.time)}(e,n,{name:t,index:r,group:o,on:st,tween:lt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ut(e,t){var n=pt(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function dt(e,t){var n=pt(e,t);if(n.state>3)throw new Error("too late; already running");return n}function pt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ft(e,t){var n,r,o,a=e.__transition,i=!0;if(a){for(o in t=null==t?null:t+"",a)(n=a[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[o]):i=!1;i&&delete e.__transition}}var ht,mt=n(89253),gt=180/Math.PI,vt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yt(e,t,n,r,o,a){var i,s,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*gt,skewX:Math.atan(l)*gt,scaleX:i,scaleY:s}}function bt(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(a,i){var s=[],l=[];return a=e(a),i=e(i),function(e,r,o,a,i,s){if(e!==o||r!==a){var l=i.push("translate(",null,t,null,n);s.push({i:l-4,x:(0,mt.A)(e,o)},{i:l-2,x:(0,mt.A)(r,a)})}else(o||a)&&i.push("translate("+o+t+a+n)}(a.translateX,a.translateY,i.translateX,i.translateY,s,l),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:(0,mt.A)(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(a.rotate,i.rotate,s,l),function(e,t,n,a){e!==t?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:(0,mt.A)(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(a.skewX,i.skewX,s,l),function(e,t,n,r,a,i){if(e!==n||t!==r){var s=a.push(o(a)+"scale(",null,",",null,")");i.push({i:s-4,x:(0,mt.A)(e,n)},{i:s-2,x:(0,mt.A)(t,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,i.scaleX,i.scaleY,s,l),a=i=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var wt=bt((function(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?vt:yt(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),xt=bt((function(e){return null==e?vt:(ht||(ht=document.createElementNS("http://www.w3.org/2000/svg","g")),ht.setAttribute("transform",e),(e=ht.transform.baseVal.consolidate())?yt((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):vt)}),", ",")",")");function Ct(e,t){var n,r;return function(){var o=dt(this,e),a=o.tween;if(a!==n)for(var i=0,s=(r=n=a).length;i<s;++i)if(r[i].name===t){(r=r.slice()).splice(i,1);break}o.tween=r}}function At(e,t,n){var r,o;if("function"!==typeof n)throw new Error;return function(){var a=dt(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}a.tween=o}}function St(e,t,n){var r=e._id;return e.each((function(){var e=dt(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return pt(e,r).value[t]}}var kt=n(35795),Mt=n(80206),Et=n(33449);function Rt(e,t){var n;return("number"===typeof t?mt.A:t instanceof kt.Ay?Mt.Ay:(n=(0,kt.Ay)(t))?(t=n,Mt.Ay):Et.A)(e,t)}function Pt(e){return function(){this.removeAttribute(e)}}function It(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dt(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttribute(e);return i===a?null:i===r?o:o=t(r=i,n)}}function Nt(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttributeNS(e.space,e.local);return i===a?null:i===r?o:o=t(r=i,n)}}function $t(e,t,n){var r,o,a;return function(){var i,s,l=n(this);if(null!=l)return(i=this.getAttribute(e))===(s=l+"")?null:i===r&&s===o?a:(o=s,a=t(r=i,l));this.removeAttribute(e)}}function Ot(e,t,n){var r,o,a;return function(){var i,s,l=n(this);if(null!=l)return(i=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:i===r&&s===o?a:(o=s,a=t(r=i,l));this.removeAttributeNS(e.space,e.local)}}function Tt(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function _t(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function jt(e,t){return function(){ut(this,e).delay=+t.apply(this,arguments)}}function Ft(e,t){return t=+t,function(){ut(this,e).delay=t}}function Lt(e,t){return function(){dt(this,e).duration=+t.apply(this,arguments)}}function Vt(e,t){return t=+t,function(){dt(this,e).duration=t}}var zt=Ne.prototype.constructor;function Ht(e){return function(){this.style.removeProperty(e)}}var Bt=0;function Gt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Wt(){return++Bt}var Ut=Ne.prototype;Gt.prototype=function(e){return Ne().transition(e)}.prototype={constructor:Gt,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=x(e));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var s,l,c=r[i],u=c.length,d=a[i]=new Array(u),p=0;p<u;++p)(s=c[p])&&(l=e.call(s,s.__data__,p,c))&&("__data__"in s&&(l.__data__=s.__data__),d[p]=l,ct(d[p],t,n,p,d,pt(s,n)));return new Gt(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=A(e));for(var r=this._groups,o=r.length,a=[],i=[],s=0;s<o;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var p,f=e.call(l,l.__data__,d,c),h=pt(l,n),m=0,g=f.length;m<g;++m)(p=f[m])&&ct(p,t,n,m,f,h);a.push(f),i.push(l)}return new Gt(a,i,t,n)},selectChild:Ut.selectChild,selectChildren:Ut.selectChildren,filter:function(e){"function"!==typeof e&&(e=k(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],s=i.length,l=r[o]=[],c=0;c<s;++c)(a=i[c])&&e.call(a,a.__data__,c,i)&&l.push(a);return new Gt(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=new Array(r),s=0;s<a;++s)for(var l,c=t[s],u=n[s],d=c.length,p=i[s]=new Array(d),f=0;f<d;++f)(l=c[f]||u[f])&&(p[f]=l);for(;s<r;++s)i[s]=t[s];return new Gt(i,this._parents,this._name,this._id)},selection:function(){return new zt(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Wt(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i,s=r[a],l=s.length,c=0;c<l;++c)if(i=s[c]){var u=pt(i,t);ct(i,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Gt(r,this._parents,e,n)},call:Ut.call,nodes:Ut.nodes,node:Ut.node,size:Ut.size,empty:Ut.empty,each:Ut.each,on:function(e,t){var n=this._id;return arguments.length<2?pt(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,a=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?ut:dt;return function(){var i=a(this,e),s=i.on;s!==r&&(o=(r=s).copy()).on(t,n),i.on=o}}(n,e,t))},attr:function(e,t){var n=V(e),r="transform"===n?xt:Rt;return this.attrTween(e,"function"===typeof t?(n.local?Ot:$t)(n,r,St(this,"attr."+e,t)):null==t?(n.local?It:Pt)(n):(n.local?Nt:Dt)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var r=V(e);return this.tween(n,(r.local?Tt:_t)(r,t))},style:function(e,t,n){var r="transform"===(e+="")?wt:Rt;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var a=Z(this,e),i=(this.style.removeProperty(e),Z(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}(e,r)).on("end.style."+e,Ht(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var r,o,a;return function(){var i=Z(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Z(this,e)),i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}}(e,r,St(this,"style."+e,t))).each(function(e,t){var n,r,o,a,i="style."+t,s="end."+i;return function(){var l=dt(this,e),c=l.on,u=null==l.value[i]?a||(a=Ht(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(s,o=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,a=n+"";return function(){var i=Z(this,e);return i===a?null:i===r?o:o=t(r=i,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!==typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function a(){var a=t.apply(this,arguments);return a!==o&&(r=(o=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(St(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=pt(this.node(),n).tween,a=0,i=o.length;a<i;++a)if((r=o[a]).name===e)return r.value;return null}return this.each((null==t?Ct:At)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?jt:Ft)(t,e)):pt(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?Lt:Vt)(t,e)):pt(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!==typeof t)throw new Error;return function(){dt(this,e).ease=t}}(t,e)):pt(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;dt(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(a,i){var s={value:i},l={value:function(){0===--o&&a()}};n.each((function(){var n=dt(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===o&&a()}))},[Symbol.iterator]:Ut[Symbol.iterator]};var Kt={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function qt(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Ne.prototype.interrupt=function(e){return this.each((function(){ft(this,e)}))},Ne.prototype.transition=function(e){var t,n;e instanceof Gt?(t=e._id,e=e._name):(t=Wt(),(n=Kt).time=Je(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i,s=r[a],l=s.length,c=0;c<l;++c)(i=s[c])&&ct(i,e,t,c,s,n||qt(i,t));return new Gt(r,this._parents,e,t)};const Yt=e=>()=>e;function Xt(e,t){let{sourceEvent:n,target:r,transform:o,dispatch:a}=t;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:a}})}function Zt(e,t,n){this.k=e,this.x=t,this.y=n}Zt.prototype={constructor:Zt,scale:function(e){return 1===e?this:new Zt(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Zt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Qt=new Zt(1,0,0);function Jt(e){e.stopImmediatePropagation()}function en(e){e.preventDefault(),e.stopImmediatePropagation()}function tn(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function nn(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function rn(){return this.__zoom||Qt}function on(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function an(){return navigator.maxTouchPoints||"ontouchstart"in this}function sn(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}Zt.prototype;const ln=e=>()=>e;function cn(e,t){let{sourceEvent:n,subject:r,target:o,identifier:a,active:i,x:s,y:l,dx:c,dy:u,dispatch:d}=t;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}function un(e){return!e.ctrlKey&&!e.button}function dn(){return this.parentNode}function pn(e,t){return null==t?{x:e.x,y:e.y}:t}function fn(){return navigator.maxTouchPoints||"ontouchstart"in this}cn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var hn=n(17119);const mn=(0,r.createContext)(null),gn=mn.Provider,vn=e=>`Node type "${e}" not found. Using fallback type "default".`,yn=()=>"The React Flow parent container needs a width and a height to render the graph.",bn=()=>"Only child nodes can use a parent extent.",wn=()=>"Can't create edge. An edge needs a source and a target.",xn=e=>`Marker type "${e}" doesn't exist.`,Cn=(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,An=()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",Sn=e=>`Edge type "${e}" not found. Using fallback type "default".`,kn=e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,Mn=(()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001")();function En(e,t){const n=(0,r.useContext)(mn);if(null===n)throw new Error(Mn);return d(n,e,t)}const Rn=()=>{const e=(0,r.useContext)(mn);if(null===e)throw new Error(Mn);return(0,r.useMemo)((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy})),[e])},Pn=e=>e.userSelectionActive?"none":"all";function In(e){let{position:t,children:n,className:a,style:i,...s}=e;const l=En(Pn),c=`${t}`.split("-");return r.createElement("div",{className:(0,o.A)(["react-flow__panel",a,...c]),style:{...i,pointerEvents:l},...s},n)}function Dn(e){let{proOptions:t,position:n="bottom-right"}=e;return t?.hideAttribution?null:r.createElement(In,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},r.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}var Nn=(0,r.memo)((e=>{let{x:t,y:n,label:a,labelStyle:i={},labelShowBg:s=!0,labelBgStyle:l={},labelBgPadding:c=[2,4],labelBgBorderRadius:u=2,children:d,className:p,...f}=e;const h=(0,r.useRef)(null),[m,g]=(0,r.useState)({x:0,y:0,width:0,height:0}),v=(0,o.A)(["react-flow__edge-textwrapper",p]);return(0,r.useEffect)((()=>{if(h.current){const e=h.current.getBBox();g({x:e.x,y:e.y,width:e.width,height:e.height})}}),[a]),"undefined"!==typeof a&&a?r.createElement("g",{transform:`translate(${t-m.width/2} ${n-m.height/2})`,className:v,visibility:m.width?"visible":"hidden",...f},s&&r.createElement("rect",{width:m.width+2*c[0],x:-c[0],y:-c[1],height:m.height+2*c[1],className:"react-flow__edge-textbg",style:l,rx:u,ry:u}),r.createElement("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:h,style:i},a),d):null}));const $n=e=>({width:e.offsetWidth,height:e.offsetHeight}),On=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)},Tn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0},t=arguments.length>1?arguments[1]:void 0;return{x:On(e.x,t[0][0],t[1][0]),y:On(e.y,t[0][1],t[1][1])}},_n=(e,t,n)=>e<t?On(Math.abs(e-t),1,50)/50:e>n?-On(Math.abs(e-n),1,50)/50:0,jn=(e,t)=>[20*_n(e.x,35,t.width-35),20*_n(e.y,35,t.height-35)],Fn=e=>e.getRootNode?.()||window?.document,Ln=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Vn=e=>{let{x:t,y:n,width:r,height:o}=e;return{x:t,y:n,x2:t+r,y2:n+o}},zn=e=>{let{x:t,y:n,x2:r,y2:o}=e;return{x:t,y:n,width:r-t,height:o-n}},Hn=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),Bn=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Gn=e=>Wn(e.width)&&Wn(e.height)&&Wn(e.x)&&Wn(e.y),Wn=e=>!isNaN(e)&&isFinite(e),Un=Symbol.for("internals"),Kn=["Enter"," ","Escape"],qn=(e,t)=>{0};function Yn(e){const t=(e=>"nativeEvent"in e)(e)?e.nativeEvent:e,n=t.composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}const Xn=e=>"clientX"in e,Zn=(e,t)=>{const n=Xn(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},Qn=()=>"undefined"!==typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0,Jn=e=>{let{id:t,path:n,labelX:o,labelY:a,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:f,markerStart:h,interactionWidth:m=20}=e;return r.createElement(r.Fragment,null,r.createElement("path",{id:t,style:p,d:n,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:h}),m&&r.createElement("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}),i&&Wn(o)&&Wn(a)?r.createElement(Nn,{x:o,y:a,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d}):null)};Jn.displayName="BaseEdge";function er(e,t,n){return void 0===n?n:r=>{const o=t().edges.find((t=>t.id===e));o&&n(r,{...o})}}function tr(e){let{sourceX:t,sourceY:n,targetX:r,targetY:o}=e;const a=Math.abs(r-t)/2,i=r<t?r+a:r-a,s=Math.abs(o-n)/2;return[i,o<n?o+s:o-s,a,s]}function nr(e){let{sourceX:t,sourceY:n,targetX:r,targetY:o,sourceControlX:a,sourceControlY:i,targetControlX:s,targetControlY:l}=e;const c=.125*t+.375*a+.375*s+.125*r,u=.125*n+.375*i+.375*l+.125*o;return[c,u,Math.abs(c-t),Math.abs(u-n)]}var rr,or,ar,ir,sr,lr;function cr(e){let{pos:t,x1:n,y1:r,x2:o,y2:a}=e;return t===lr.Left||t===lr.Right?[.5*(n+o),r]:[n,.5*(r+a)]}function ur(e){let{sourceX:t,sourceY:n,sourcePosition:r=lr.Bottom,targetX:o,targetY:a,targetPosition:i=lr.Top}=e;const[s,l]=cr({pos:r,x1:t,y1:n,x2:o,y2:a}),[c,u]=cr({pos:i,x1:o,y1:a,x2:t,y2:n}),[d,p,f,h]=nr({sourceX:t,sourceY:n,targetX:o,targetY:a,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${t},${n} C${s},${l} ${c},${u} ${o},${a}`,d,p,f,h]}!function(e){e.Strict="strict",e.Loose="loose"}(rr||(rr={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(or||(or={})),function(e){e.Partial="partial",e.Full="full"}(ar||(ar={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(ir||(ir={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(sr||(sr={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(lr||(lr={}));const dr=(0,r.memo)((e=>{let{sourceX:t,sourceY:n,targetX:o,targetY:a,sourcePosition:i=lr.Bottom,targetPosition:s=lr.Top,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:f,style:h,markerEnd:m,markerStart:g,interactionWidth:v}=e;const[y,b,w]=ur({sourceX:t,sourceY:n,sourcePosition:i,targetX:o,targetY:a,targetPosition:s});return r.createElement(Jn,{path:y,labelX:b,labelY:w,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:f,style:h,markerEnd:m,markerStart:g,interactionWidth:v})}));dr.displayName="SimpleBezierEdge";const pr={[lr.Left]:{x:-1,y:0},[lr.Right]:{x:1,y:0},[lr.Top]:{x:0,y:-1},[lr.Bottom]:{x:0,y:1}},fr=e=>{let{source:t,sourcePosition:n=lr.Bottom,target:r}=e;return n===lr.Left||n===lr.Right?t.x<r.x?{x:1,y:0}:{x:-1,y:0}:t.y<r.y?{x:0,y:1}:{x:0,y:-1}},hr=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function mr(e){let{sourceX:t,sourceY:n,sourcePosition:r=lr.Bottom,targetX:o,targetY:a,targetPosition:i=lr.Top,borderRadius:s=5,centerX:l,centerY:c,offset:u=20}=e;const[d,p,f,h,m]=function(e){let{source:t,sourcePosition:n=lr.Bottom,target:r,targetPosition:o=lr.Top,center:a,offset:i}=e;const s=pr[n],l=pr[o],c={x:t.x+s.x*i,y:t.y+s.y*i},u={x:r.x+l.x*i,y:r.y+l.y*i},d=fr({source:c,sourcePosition:n,target:u}),p=0!==d.x?"x":"y",f=d[p];let h,m,g=[];const v={x:0,y:0},y={x:0,y:0},[b,w,x,C]=tr({sourceX:t.x,sourceY:t.y,targetX:r.x,targetY:r.y});if(s[p]*l[p]===-1){h=a.x??b,m=a.y??w;const e=[{x:h,y:c.y},{x:h,y:u.y}],t=[{x:c.x,y:m},{x:u.x,y:m}];g=s[p]===f?"x"===p?e:t:"x"===p?t:e}else{const e=[{x:c.x,y:u.y}],a=[{x:u.x,y:c.y}];if(g="x"===p?s.x===f?a:e:s.y===f?e:a,n===o){const e=Math.abs(t[p]-r[p]);if(e<=i){const n=Math.min(i-1,i-e);s[p]===f?v[p]=(c[p]>t[p]?-1:1)*n:y[p]=(u[p]>r[p]?-1:1)*n}}if(n!==o){const t="x"===p?"y":"x",n=s[p]===l[t],r=c[t]>u[t],o=c[t]<u[t];(1===s[p]&&(!n&&r||n&&o)||1!==s[p]&&(!n&&o||n&&r))&&(g="x"===p?e:a)}const d={x:c.x+v.x,y:c.y+v.y},b={x:u.x+y.x,y:u.y+y.y};Math.max(Math.abs(d.x-g[0].x),Math.abs(b.x-g[0].x))>=Math.max(Math.abs(d.y-g[0].y),Math.abs(b.y-g[0].y))?(h=(d.x+b.x)/2,m=g[0].y):(h=g[0].x,m=(d.y+b.y)/2)}return[[t,{x:c.x+v.x,y:c.y+v.y},...g,{x:u.x+y.x,y:u.y+y.y},r],h,m,x,C]}({source:{x:t,y:n},sourcePosition:r,target:{x:o,y:a},targetPosition:i,center:{x:l,y:c},offset:u}),g=d.reduce(((e,t,n)=>{let r="";return r=n>0&&n<d.length-1?function(e,t,n,r){const o=Math.min(hr(e,t)/2,hr(t,n)/2,r),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i)return`L ${a+o*(e.x<n.x?-1:1)},${i}Q ${a},${i} ${a},${i+o*(e.y<n.y?1:-1)}`;const s=e.x<n.x?1:-1;return`L ${a},${i+o*(e.y<n.y?-1:1)}Q ${a},${i} ${a+o*s},${i}`}(d[n-1],t,d[n+1],s):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=r}),"");return[g,p,f,h,m]}const gr=(0,r.memo)((e=>{let{sourceX:t,sourceY:n,targetX:o,targetY:a,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,sourcePosition:f=lr.Bottom,targetPosition:h=lr.Top,markerEnd:m,markerStart:g,pathOptions:v,interactionWidth:y}=e;const[b,w,x]=mr({sourceX:t,sourceY:n,sourcePosition:f,targetX:o,targetY:a,targetPosition:h,borderRadius:v?.borderRadius,offset:v?.offset});return r.createElement(Jn,{path:b,labelX:w,labelY:x,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:m,markerStart:g,interactionWidth:y})}));gr.displayName="SmoothStepEdge";const vr=(0,r.memo)((e=>r.createElement(gr,{...e,pathOptions:(0,r.useMemo)((()=>({borderRadius:0,offset:e.pathOptions?.offset})),[e.pathOptions?.offset])})));vr.displayName="StepEdge";const yr=(0,r.memo)((e=>{let{sourceX:t,sourceY:n,targetX:o,targetY:a,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:f,markerStart:h,interactionWidth:m}=e;const[g,v,y]=function(e){let{sourceX:t,sourceY:n,targetX:r,targetY:o}=e;const[a,i,s,l]=tr({sourceX:t,sourceY:n,targetX:r,targetY:o});return[`M ${t},${n}L ${r},${o}`,a,i,s,l]}({sourceX:t,sourceY:n,targetX:o,targetY:a});return r.createElement(Jn,{path:g,labelX:v,labelY:y,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:f,markerStart:h,interactionWidth:m})}));function br(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function wr(e){let{pos:t,x1:n,y1:r,x2:o,y2:a,c:i}=e;switch(t){case lr.Left:return[n-br(n-o,i),r];case lr.Right:return[n+br(o-n,i),r];case lr.Top:return[n,r-br(r-a,i)];case lr.Bottom:return[n,r+br(a-r,i)]}}function xr(e){let{sourceX:t,sourceY:n,sourcePosition:r=lr.Bottom,targetX:o,targetY:a,targetPosition:i=lr.Top,curvature:s=.25}=e;const[l,c]=wr({pos:r,x1:t,y1:n,x2:o,y2:a,c:s}),[u,d]=wr({pos:i,x1:o,y1:a,x2:t,y2:n,c:s}),[p,f,h,m]=nr({sourceX:t,sourceY:n,targetX:o,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${t},${n} C${l},${c} ${u},${d} ${o},${a}`,p,f,h,m]}yr.displayName="StraightEdge";const Cr=(0,r.memo)((e=>{let{sourceX:t,sourceY:n,targetX:o,targetY:a,sourcePosition:i=lr.Bottom,targetPosition:s=lr.Top,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:f,style:h,markerEnd:m,markerStart:g,pathOptions:v,interactionWidth:y}=e;const[b,w,x]=xr({sourceX:t,sourceY:n,sourcePosition:i,targetX:o,targetY:a,targetPosition:s,curvature:v?.curvature});return r.createElement(Jn,{path:b,labelX:w,labelY:x,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:f,style:h,markerEnd:m,markerStart:g,interactionWidth:y})}));Cr.displayName="BezierEdge";const Ar=(0,r.createContext)(null),Sr=Ar.Provider;Ar.Consumer;const kr=e=>{let{source:t,sourceHandle:n,target:r,targetHandle:o}=e;return`reactflow__edge-${t}${n||""}-${r}${o||""}`},Mr=(e,t)=>{if("undefined"===typeof e)return"";if("string"===typeof e)return e;return`${t?`${t}__`:""}${Object.keys(e).sort().map((t=>`${t}=${e[t]}`)).join("&")}`},Er=(e,t,n,r)=>{let{x:o,y:a}=e,[i,s,l]=t,[c,u]=r;const d={x:(o-i)/l,y:(a-s)/l};return n?{x:c*Math.round(d.x/c),y:u*Math.round(d.y/u)}:d},Rr=(e,t)=>{let{x:n,y:r}=e,[o,a,i]=t;return{x:n*i+o,y:r*i+a}},Pr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},Ir=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];if(0===e.length)return{x:0,y:0,width:0,height:0};const n=e.reduce(((e,n)=>{const{x:r,y:o}=Pr(n,t).positionAbsolute;return Ln(e,Vn({x:r,y:o,width:n.width||0,height:n.height||0}))}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return zn(n)},Dr=function(e,t){let[n,r,o]=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,1],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[0,0];const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},c=[];return e.forEach((e=>{const{width:t,height:n,selectable:r=!0,hidden:o=!1}=e;if(i&&!r||o)return!1;const{positionAbsolute:u}=Pr(e,s),d={x:u.x,y:u.y,width:t||0,height:n||0},p=Bn(l,d);("undefined"===typeof t||"undefined"===typeof n||null===t||null===n||a&&p>0||p>=(t||0)*(n||0)||e.dragging)&&c.push(e)})),c},Nr=(e,t)=>{const n=e.map((e=>e.id));return t.filter((e=>n.includes(e.source)||n.includes(e.target)))},$r=function(e,t,n,r,o){let a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:.1;const i=t/(e.width*(1+a)),s=n/(e.height*(1+a)),l=Math.min(i,s),c=On(l,r,o);return{x:t/2-(e.x+e.width/2)*c,y:n/2-(e.y+e.height/2)*c,zoom:c}},Or=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.transition().duration(t)};function Tr(e,t,n,r){return(t[n]||[]).reduce(((t,o)=>(`${e.id}-${o.id}-${n}`!==r&&t.push({id:o.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+o.x+o.width/2,y:(e.positionAbsolute?.y??0)+o.y+o.height/2}),t)),[])}const _r={source:null,target:null,sourceHandle:null,targetHandle:null},jr=()=>({handleDomNode:null,isValid:!1,connection:_r,endHandle:null});function Fr(e,t,n,r,o,a,i){const s="target"===o,l=i.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...jr(),handleDomNode:l};if(l){const e=Lr(void 0,l),o=l.getAttribute("data-nodeid"),i=l.getAttribute("data-handleid"),u=l.classList.contains("connectable"),d=l.classList.contains("connectableend"),p={source:s?o:n,sourceHandle:s?i:r,target:s?n:o,targetHandle:s?r:i};c.connection=p;u&&d&&(t===rr.Strict?s&&"source"===e||!s&&"target"===e:o!==n||i!==r)&&(c.endHandle={nodeId:o,handleId:i,type:e},c.isValid=a(p))}return c}function Lr(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Vr(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function zr(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Hr(e){let{event:t,handleId:n,nodeId:r,onConnect:o,isTarget:a,getState:i,setState:s,isValidConnection:l,edgeUpdaterType:c,onReconnectEnd:u}=e;const d=Fn(t.target),{connectionMode:p,domNode:f,autoPanOnConnect:h,connectionRadius:m,onConnectStart:g,panBy:v,getNodes:y,cancelConnection:b}=i();let w,x=0;const{x:C,y:A}=Zn(t),S=d?.elementFromPoint(C,A),k=Lr(c,S),M=f?.getBoundingClientRect();if(!M||!k)return;let E,R=Zn(t,M),P=!1,I=null,D=!1,N=null;const $=function(e){let{nodes:t,nodeId:n,handleId:r,handleType:o}=e;return t.reduce(((e,t)=>{if(t[Un]){const{handleBounds:a}=t[Un];let i=[],s=[];a&&(i=Tr(t,a,"source",`${n}-${r}-${o}`),s=Tr(t,a,"target",`${n}-${r}-${o}`)),e.push(...i,...s)}return e}),[])}({nodes:y(),nodeId:r,handleId:n,handleType:k}),O=()=>{if(!h)return;const[e,t]=jn(R,M);v({x:e,y:t}),x=requestAnimationFrame(O)};function T(e){const{transform:t}=i();R=Zn(e,M);const{handle:o,validHandleResult:c}=function(e,t,n,r,o,a){const{x:i,y:s}=Zn(e),l=t.elementsFromPoint(i,s).find((e=>e.classList.contains("react-flow__handle")));if(l){const e=l.getAttribute("data-nodeid");if(e){const t=Lr(void 0,l),r=l.getAttribute("data-handleid"),i=a({nodeId:e,id:r,type:t});if(i){const a=o.find((n=>n.nodeId===e&&n.type===t&&n.id===r));return{handle:{id:r,type:t,nodeId:e,x:a?.x||n.x,y:a?.y||n.y},validHandleResult:i}}}}let c=[],u=1/0;if(o.forEach((e=>{const t=Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2);if(t<=r){const n=a(e);t<=u&&(t<u?c=[{handle:e,validHandleResult:n}]:t===u&&c.push({handle:e,validHandleResult:n}),u=t)}})),!c.length)return{handle:null,validHandleResult:jr()};if(1===c.length)return c[0];const d=c.some((e=>{let{validHandleResult:t}=e;return t.isValid})),p=c.some((e=>{let{handle:t}=e;return"target"===t.type}));return c.find((e=>{let{handle:t,validHandleResult:n}=e;return p?"target"===t.type:!d||n.isValid}))||c[0]}(e,d,Er(R,t,!1,[1,1]),m,$,(e=>Fr(e,p,r,n,a?"target":"source",l,d)));if(w=o,P||(O(),P=!0),N=c.handleDomNode,I=c.connection,D=c.isValid,s({connectionPosition:w&&D?Rr({x:w.x,y:w.y},t):R,connectionStatus:zr(!!w,D),connectionEndHandle:c.endHandle}),!w&&!D&&!N)return Vr(E);I.source!==I.target&&N&&(Vr(E),E=N,N.classList.add("connecting","react-flow__handle-connecting"),N.classList.toggle("valid",D),N.classList.toggle("react-flow__handle-valid",D))}function _(e){(w||N)&&I&&D&&o?.(I),i().onConnectEnd?.(e),c&&u?.(e),Vr(E),b(),cancelAnimationFrame(x),P=!1,D=!1,I=null,N=null,d.removeEventListener("mousemove",T),d.removeEventListener("mouseup",_),d.removeEventListener("touchmove",T),d.removeEventListener("touchend",_)}s({connectionPosition:R,connectionStatus:null,connectionNodeId:r,connectionHandleId:n,connectionHandleType:k,connectionStartHandle:{nodeId:r,handleId:n,type:k},connectionEndHandle:null}),g?.(t,{nodeId:r,handleId:n,handleType:k}),d.addEventListener("mousemove",T),d.addEventListener("mouseup",_),d.addEventListener("touchmove",T),d.addEventListener("touchend",_)}const Br=()=>!0,Gr=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Wr=(0,r.forwardRef)(((e,t)=>{let{type:n="source",position:a=lr.Top,isValidConnection:i,isConnectable:s=!0,isConnectableStart:l=!0,isConnectableEnd:c=!0,id:u,onConnect:d,children:p,className:h,onMouseDown:m,onTouchStart:g,...v}=e;const y=u||null,b="target"===n,w=Rn(),x=(0,r.useContext)(Ar),{connectOnClick:C,noPanClassName:A}=En(Gr,f.x),{connecting:S,clickConnecting:k}=En(((e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:a,connectionClickStartHandle:i}=r;return{connecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n||a?.nodeId===e&&a?.handleId===t&&a?.type===n,clickConnecting:i?.nodeId===e&&i?.handleId===t&&i?.type===n}})(x,y,n),f.x);x||w.getState().onError?.("010",An());const M=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=w.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=w.getState();t(((e,t)=>{if(!e.source||!e.target)return qn(0,wn()),t;let n;var r;return n="id"in(r=e)&&"source"in r&&"target"in r?{...e}:{...e,id:kr(e)},((e,t)=>t.some((t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))))(n,t)?t:t.concat(n)})(o,e))}n?.(o),d?.(o)},E=e=>{if(!x)return;const t=Xn(e);l&&(t&&0===e.button||!t)&&Hr({event:e,handleId:y,nodeId:x,onConnect:M,isTarget:b,getState:w.getState,setState:w.setState,isValidConnection:i||w.getState().isValidConnection||Br}),t?m?.(e):g?.(e)};return r.createElement("div",{"data-handleid":y,"data-nodeid":x,"data-handlepos":a,"data-id":`${x}-${y}-${n}`,className:(0,o.A)(["react-flow__handle",`react-flow__handle-${a}`,"nodrag",A,h,{source:!b,target:b,connectable:s,connectablestart:l,connectableend:c,connecting:k,connectionindicator:s&&(l&&!S||c&&S)}]),onMouseDown:E,onTouchStart:E,onClick:C?e=>{const{onClickConnectStart:t,onClickConnectEnd:r,connectionClickStartHandle:o,connectionMode:a,isValidConnection:s}=w.getState();if(!x||!o&&!l)return;if(!o)return t?.(e,{nodeId:x,handleId:y,handleType:n}),void w.setState({connectionClickStartHandle:{nodeId:x,type:n,handleId:y}});const c=Fn(e.target),u=i||s||Br,{connection:d,isValid:p}=Fr({nodeId:x,id:y,type:n},a,o.nodeId,o.handleId||null,o.type,u,c);p&&M(d),r?.(e),w.setState({connectionClickStartHandle:null})}:void 0,ref:t,...v},p)}));Wr.displayName="Handle";var Ur=(0,r.memo)(Wr);const Kr=e=>{let{data:t,isConnectable:n,targetPosition:o=lr.Top,sourcePosition:a=lr.Bottom}=e;return r.createElement(r.Fragment,null,r.createElement(Ur,{type:"target",position:o,isConnectable:n}),t?.label,r.createElement(Ur,{type:"source",position:a,isConnectable:n}))};Kr.displayName="DefaultNode";var qr=(0,r.memo)(Kr);const Yr=e=>{let{data:t,isConnectable:n,sourcePosition:o=lr.Bottom}=e;return r.createElement(r.Fragment,null,t?.label,r.createElement(Ur,{type:"source",position:o,isConnectable:n}))};Yr.displayName="InputNode";var Xr=(0,r.memo)(Yr);const Zr=e=>{let{data:t,isConnectable:n,targetPosition:o=lr.Top}=e;return r.createElement(r.Fragment,null,r.createElement(Ur,{type:"target",position:o,isConnectable:n}),t?.label)};Zr.displayName="OutputNode";var Qr=(0,r.memo)(Zr);const Jr=()=>null;Jr.displayName="GroupNode";const eo=e=>({selectedNodes:e.getNodes().filter((e=>e.selected)),selectedEdges:e.edges.filter((e=>e.selected)).map((e=>({...e})))}),to=e=>e.id;function no(e,t){return(0,f.x)(e.selectedNodes.map(to),t.selectedNodes.map(to))&&(0,f.x)(e.selectedEdges.map(to),t.selectedEdges.map(to))}const ro=(0,r.memo)((e=>{let{onSelectionChange:t}=e;const n=Rn(),{selectedNodes:o,selectedEdges:a}=En(eo,no);return(0,r.useEffect)((()=>{const e={nodes:o,edges:a};t?.(e),n.getState().onSelectionChange.forEach((t=>t(e)))}),[o,a,t]),null}));ro.displayName="SelectionListener";const oo=e=>!!e.onSelectionChange;function ao(e){let{onSelectionChange:t}=e;const n=En(oo);return t||n?r.createElement(ro,{onSelectionChange:t}):null}const io=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function so(e,t){(0,r.useEffect)((()=>{"undefined"!==typeof e&&t(e)}),[e])}function lo(e,t,n){(0,r.useEffect)((()=>{"undefined"!==typeof t&&n({[e]:t})}),[t])}const co=e=>{let{nodes:t,edges:n,defaultNodes:o,defaultEdges:a,onConnect:i,onConnectStart:s,onConnectEnd:l,onClickConnectStart:c,onClickConnectEnd:u,nodesDraggable:d,nodesConnectable:p,nodesFocusable:h,edgesFocusable:m,edgesUpdatable:g,elevateNodesOnSelect:v,minZoom:y,maxZoom:b,nodeExtent:w,onNodesChange:x,onEdgesChange:C,elementsSelectable:A,connectionMode:S,snapGrid:k,snapToGrid:M,translateExtent:E,connectOnClick:R,defaultEdgeOptions:P,fitView:I,fitViewOptions:D,onNodesDelete:N,onEdgesDelete:$,onNodeDrag:O,onNodeDragStart:T,onNodeDragStop:_,onSelectionDrag:j,onSelectionDragStart:F,onSelectionDragStop:L,noPanClassName:V,nodeOrigin:z,rfId:H,autoPanOnConnect:B,autoPanOnNodeDrag:G,onError:W,connectionRadius:U,isValidConnection:K,nodeDragThreshold:q}=e;const{setNodes:Y,setEdges:X,setDefaultNodesAndEdges:Z,setMinZoom:Q,setMaxZoom:J,setTranslateExtent:ee,setNodeExtent:te,reset:ne}=En(io,f.x),re=Rn();return(0,r.useEffect)((()=>{const e=a?.map((e=>({...e,...P})));return Z(o,e),()=>{ne()}}),[]),lo("defaultEdgeOptions",P,re.setState),lo("connectionMode",S,re.setState),lo("onConnect",i,re.setState),lo("onConnectStart",s,re.setState),lo("onConnectEnd",l,re.setState),lo("onClickConnectStart",c,re.setState),lo("onClickConnectEnd",u,re.setState),lo("nodesDraggable",d,re.setState),lo("nodesConnectable",p,re.setState),lo("nodesFocusable",h,re.setState),lo("edgesFocusable",m,re.setState),lo("edgesUpdatable",g,re.setState),lo("elementsSelectable",A,re.setState),lo("elevateNodesOnSelect",v,re.setState),lo("snapToGrid",M,re.setState),lo("snapGrid",k,re.setState),lo("onNodesChange",x,re.setState),lo("onEdgesChange",C,re.setState),lo("connectOnClick",R,re.setState),lo("fitViewOnInit",I,re.setState),lo("fitViewOnInitOptions",D,re.setState),lo("onNodesDelete",N,re.setState),lo("onEdgesDelete",$,re.setState),lo("onNodeDrag",O,re.setState),lo("onNodeDragStart",T,re.setState),lo("onNodeDragStop",_,re.setState),lo("onSelectionDrag",j,re.setState),lo("onSelectionDragStart",F,re.setState),lo("onSelectionDragStop",L,re.setState),lo("noPanClassName",V,re.setState),lo("nodeOrigin",z,re.setState),lo("rfId",H,re.setState),lo("autoPanOnConnect",B,re.setState),lo("autoPanOnNodeDrag",G,re.setState),lo("onError",W,re.setState),lo("connectionRadius",U,re.setState),lo("isValidConnection",K,re.setState),lo("nodeDragThreshold",q,re.setState),so(t,Y),so(n,X),so(y,Q),so(b,J),so(E,ee),so(w,te),null},uo={display:"none"},po={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},fo="react-flow__node-desc",ho="react-flow__edge-desc",mo=e=>e.ariaLiveMessage;function go(e){let{rfId:t}=e;const n=En(mo);return r.createElement("div",{id:`react-flow__aria-live-${t}`,"aria-live":"assertive","aria-atomic":"true",style:po},n)}function vo(e){let{rfId:t,disableKeyboardA11y:n}=e;return r.createElement(r.Fragment,null,r.createElement("div",{id:`${fo}-${t}`,style:uo},"Press enter or space to select a node.",!n&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),r.createElement("div",{id:`${ho}-${t}`,style:uo},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!n&&r.createElement(go,{rfId:t}))}var yo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{actInsideInputWithModifier:!0};const[n,o]=(0,r.useState)(!1),a=(0,r.useRef)(!1),i=(0,r.useRef)(new Set([])),[s,l]=(0,r.useMemo)((()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter((e=>"string"===typeof e)).map((e=>e.split("+"))),n=t.reduce(((e,t)=>e.concat(...t)),[]);return[t,n]}return[[],[]]}),[e]);return(0,r.useEffect)((()=>{const n="undefined"!==typeof document?document:null,r=t?.target||n;if(null!==e){const e=e=>{a.current=e.ctrlKey||e.metaKey||e.shiftKey;if((!a.current||a.current&&!t.actInsideInputWithModifier)&&Yn(e))return!1;const n=wo(e.code,l);i.current.add(e[n]),bo(s,i.current,!1)&&(e.preventDefault(),o(!0))},n=e=>{if((!a.current||a.current&&!t.actInsideInputWithModifier)&&Yn(e))return!1;const n=wo(e.code,l);bo(s,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(e[n]),"Meta"===e.key&&i.current.clear(),a.current=!1},c=()=>{i.current.clear(),o(!1)};return r?.addEventListener("keydown",e),r?.addEventListener("keyup",n),window.addEventListener("blur",c),()=>{r?.removeEventListener("keydown",e),r?.removeEventListener("keyup",n),window.removeEventListener("blur",c)}}}),[e,o]),n};function bo(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function wo(e,t){return t.includes(e)?"code":"key"}function xo(e,t,n,r){const o=e.parentNode||e.parentId;if(!o)return n;const a=t.get(o),i=Pr(a,r);return xo(a,t,{x:(n.x??0)+i.x,y:(n.y??0)+i.y,z:(a[Un]?.z??0)>(n.z??0)?a[Un]?.z??0:n.z??0},r)}function Co(e,t,n){e.forEach((r=>{const o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n?.[r.id]){const{x:o,y:a,z:i}=xo(r,e,{...r.position,z:r[Un]?.z??0},t);r.positionAbsolute={x:o,y:a},r[Un].z=i,n?.[r.id]&&(r[Un].isParent=!0)}}))}function Ao(e,t,n,r){const o=new Map,a={},i=r?1e3:0;return e.forEach((e=>{const n=(Wn(e.zIndex)?e.zIndex:0)+(e.selected?i:0),r=t.get(e.id),s={...e,positionAbsolute:{x:e.position.x,y:e.position.y}},l=e.parentNode||e.parentId;l&&(a[l]=!0);const c=r?.type&&r?.type!==e.type;Object.defineProperty(s,Un,{enumerable:!1,value:{handleBounds:c?void 0:r?.[Un]?.handleBounds,z:n}}),o.set(e.id,s)})),Co(o,n,a),o}function So(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{getNodes:n,width:r,height:o,minZoom:a,maxZoom:i,d3Zoom:s,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:u,nodeOrigin:d}=e(),p=t.initial&&!c&&u;if(s&&l&&(p||!t.initial)){const e=n().filter((e=>{const n=t.includeHiddenNodes?e.width&&e.height:!e.hidden;return t.nodes?.length?n&&t.nodes.some((t=>t.id===e.id)):n})),c=e.every((e=>e.width&&e.height));if(e.length>0&&c){const n=Ir(e,d),{x:c,y:u,zoom:p}=$r(n,r,o,t.minZoom??a,t.maxZoom??i,t.padding??.1),f=Qt.translate(c,u).scale(p);return"number"===typeof t.duration&&t.duration>0?s.transform(Or(l,t.duration),f):s.transform(l,f),!0}}return!1}function ko(e,t){return e.forEach((e=>{const n=t.get(e.id);n&&t.set(n.id,{...n,[Un]:n[Un],selected:e.selected})})),new Map(t)}function Mo(e,t){return t.map((t=>{const n=e.find((e=>e.id===t.id));return n&&(t.selected=n.selected),t}))}function Eo(e){let{changedNodes:t,changedEdges:n,get:r,set:o}=e;const{nodeInternals:a,edges:i,onNodesChange:s,onEdgesChange:l,hasDefaultNodes:c,hasDefaultEdges:u}=r();t?.length&&(c&&o({nodeInternals:ko(t,a)}),s?.(t)),n?.length&&(u&&o({edges:Mo(n,i)}),l?.(n))}const Ro=()=>{},Po={zoomIn:Ro,zoomOut:Ro,zoomTo:Ro,getZoom:()=>1,setViewport:Ro,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Ro,fitBounds:Ro,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},Io=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),Do=()=>{const e=Rn(),{d3Zoom:t,d3Selection:n}=En(Io,f.x),o=(0,r.useMemo)((()=>n&&t?{zoomIn:e=>t.scaleBy(Or(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(Or(n,e?.duration),1/1.2),zoomTo:(e,r)=>t.scaleTo(Or(n,r?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(r,o)=>{const[a,i,s]=e.getState().transform,l=Qt.translate(r.x??a,r.y??i).scale(r.zoom??s);t.transform(Or(n,o?.duration),l)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>So(e.getState,t),setCenter:(r,o,a)=>{const{width:i,height:s,maxZoom:l}=e.getState(),c="undefined"!==typeof a?.zoom?a.zoom:l,u=i/2-r*c,d=s/2-o*c,p=Qt.translate(u,d).scale(c);t.transform(Or(n,a?.duration),p)},fitBounds:(r,o)=>{const{width:a,height:i,minZoom:s,maxZoom:l}=e.getState(),{x:c,y:u,zoom:d}=$r(r,a,i,s,l,o?.padding??.1),p=Qt.translate(c,u).scale(d);t.transform(Or(n,o?.duration),p)},project:t=>{const{transform:n,snapToGrid:r,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Er(t,n,r,o)},screenToFlowPosition:t=>{const{transform:n,snapToGrid:r,snapGrid:o,domNode:a}=e.getState();if(!a)return t;const{x:i,y:s}=a.getBoundingClientRect(),l={x:t.x-i,y:t.y-s};return Er(l,n,r,o)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:a}=r.getBoundingClientRect(),i=Rr(t,n);return{x:i.x+o,y:i.y+a}},viewportInitialized:!0}:Po),[t,n]);return o};function No(){const e=Do(),t=Rn(),n=(0,r.useCallback)((()=>t.getState().getNodes().map((e=>({...e})))),[]),o=(0,r.useCallback)((e=>t.getState().nodeInternals.get(e)),[]),a=(0,r.useCallback)((()=>{const{edges:e=[]}=t.getState();return e.map((e=>({...e})))}),[]),i=(0,r.useCallback)((e=>{const{edges:n=[]}=t.getState();return n.find((t=>t.id===e))}),[]),s=(0,r.useCallback)((e=>{const{getNodes:n,setNodes:r,hasDefaultNodes:o,onNodesChange:a}=t.getState(),i=n(),s="function"===typeof e?e(i):e;if(o)r(s);else if(a){const e=0===s.length?i.map((e=>({type:"remove",id:e.id}))):s.map((e=>({item:e,type:"reset"})));a(e)}}),[]),l=(0,r.useCallback)((e=>{const{edges:n=[],setEdges:r,hasDefaultEdges:o,onEdgesChange:a}=t.getState(),i="function"===typeof e?e(n):e;if(o)r(i);else if(a){a(0===i.length?n.map((e=>({type:"remove",id:e.id}))):i.map((e=>({item:e,type:"reset"}))))}}),[]),c=(0,r.useCallback)((e=>{const n=Array.isArray(e)?e:[e],{getNodes:r,setNodes:o,hasDefaultNodes:a,onNodesChange:i}=t.getState();if(a){o([...r(),...n])}else if(i){const e=n.map((e=>({item:e,type:"add"})));i(e)}}),[]),u=(0,r.useCallback)((e=>{const n=Array.isArray(e)?e:[e],{edges:r=[],setEdges:o,hasDefaultEdges:a,onEdgesChange:i}=t.getState();if(a)o([...r,...n]);else if(i){i(n.map((e=>({item:e,type:"add"}))))}}),[]),d=(0,r.useCallback)((()=>{const{getNodes:e,edges:n=[],transform:r}=t.getState(),[o,a,i]=r;return{nodes:e().map((e=>({...e}))),edges:n.map((e=>({...e}))),viewport:{x:o,y:a,zoom:i}}}),[]),p=(0,r.useCallback)((e=>{let{nodes:n,edges:r}=e;const{nodeInternals:o,getNodes:a,edges:i,hasDefaultNodes:s,hasDefaultEdges:l,onNodesDelete:c,onEdgesDelete:u,onNodesChange:d,onEdgesChange:p}=t.getState(),f=(n||[]).map((e=>e.id)),h=(r||[]).map((e=>e.id)),m=a().reduce(((e,t)=>{const n=t.parentNode||t.parentId,r=!f.includes(t.id)&&n&&e.find((e=>e.id===n));return("boolean"!==typeof t.deletable||t.deletable)&&(f.includes(t.id)||r)&&e.push(t),e}),[]),g=i.filter((e=>"boolean"!==typeof e.deletable||e.deletable)),v=g.filter((e=>h.includes(e.id)));if(m||v){const e=Nr(m,g),n=[...v,...e],r=n.reduce(((e,t)=>(e.includes(t.id)||e.push(t.id),e)),[]);if((l||s)&&(l&&t.setState({edges:i.filter((e=>!r.includes(e.id)))}),s&&(m.forEach((e=>{o.delete(e.id)})),t.setState({nodeInternals:new Map(o)}))),r.length>0&&(u?.(n),p&&p(r.map((e=>({id:e,type:"remove"}))))),m.length>0&&(c?.(m),d)){d(m.map((e=>({id:e.id,type:"remove"}))))}}}),[]),f=(0,r.useCallback)((e=>{const n=Gn(e),r=n?null:t.getState().nodeInternals.get(e.id);if(!n&&!r)return[null,null,n];return[n?e:Hn(r),r,n]}),[]),h=(0,r.useCallback)((function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0;const[o,a,i]=f(e);return o?(r||t.getState().getNodes()).filter((e=>{if(!i&&(e.id===a.id||!e.positionAbsolute))return!1;const t=Hn(e),r=Bn(t,o);return n&&r>0||r>=o.width*o.height})):[]}),[]),m=(0,r.useCallback)((function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const[r]=f(e);if(!r)return!1;const o=Bn(r,t);return n&&o>0||o>=r.width*r.height}),[]);return(0,r.useMemo)((()=>({...e,getNodes:n,getNode:o,getEdges:a,getEdge:i,setNodes:s,setEdges:l,addNodes:c,addEdges:u,toObject:d,deleteElements:p,getIntersectingNodes:h,isNodeIntersecting:m})),[e,n,o,a,i,s,l,c,u,d,p,h,m])}const $o={actInsideInputWithModifier:!1};const Oo={position:"absolute",width:"100%",height:"100%",top:0,left:0},To=e=>({x:e.x,y:e.y,zoom:e.k}),_o=(e,t)=>e.target.closest(`.${t}`),jo=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),Fo=e=>{const t=e.ctrlKey&&Qn()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t},Lo=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),Vo=e=>{let{onMove:t,onMoveStart:n,onMoveEnd:o,onPaneContextMenu:a,zoomOnScroll:i=!0,zoomOnPinch:s=!0,panOnScroll:l=!1,panOnScrollSpeed:c=.5,panOnScrollMode:u=or.Free,zoomOnDoubleClick:d=!0,elementsSelectable:p,panOnDrag:h=!0,defaultViewport:m,translateExtent:g,minZoom:v,maxZoom:y,zoomActivationKeyCode:w,preventScrolling:x=!0,children:C,noWheelClassName:A,noPanClassName:S}=e;const k=(0,r.useRef)(),M=Rn(),E=(0,r.useRef)(!1),R=(0,r.useRef)(!1),P=(0,r.useRef)(null),I=(0,r.useRef)({x:0,y:0,zoom:0}),{d3Zoom:D,d3Selection:N,d3ZoomHandler:$,userSelectionActive:O}=En(Lo,f.x),T=yo(w),_=(0,r.useRef)(0),j=(0,r.useRef)(!1),F=(0,r.useRef)();return function(e){const t=Rn();(0,r.useEffect)((()=>{let n;const r=()=>{if(!e.current)return;const n=$n(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004",yn()),t.setState({width:n.width||500,height:n.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver((()=>r())),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}}),[])}(P),(0,r.useEffect)((()=>{if(P.current){const e=P.current.getBoundingClientRect(),t=function(){var e,t,n,r=tn,o=nn,a=sn,i=on,s=an,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,d=ze,p=b("start","zoom","end"),f=0,h=10;function m(e){e.property("__zoom",rn).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",k).filter(s).on("touchstart.zoom",M).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Zt(t,e.x,e.y)}function v(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new Zt(e.k,r,o)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function w(e,t,n,r){e.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,a=arguments,i=x(e,a).event(r),s=o.apply(e,a),l=null==n?y(s):"function"===typeof n?n.apply(e,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,p="function"===typeof t?t.apply(e,a):t,f=d(u.invert(l).concat(c/u.k),p.invert(l).concat(c/p.k));return function(e){if(1===e)e=p;else{var t=f(e),n=c/t[2];e=new Zt(n,l[0]-t[0]*n,l[1]-t[1]*n)}i.zoom(null,e)}}))}function x(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function A(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(r.apply(this,arguments)){var s=x(this,n).event(e),u=this.__zoom,d=Math.max(l[0],Math.min(l[1],u.k*Math.pow(2,i.apply(this,arguments)))),p=He(e);if(s.wheel)s.mouse[0][0]===p[0]&&s.mouse[0][1]===p[1]||(s.mouse[1]=u.invert(s.mouse[0]=p)),clearTimeout(s.wheel);else{if(u.k===d)return;s.mouse=[p,u.invert(p)],ft(this),s.start()}en(e),s.wheel=setTimeout((function(){s.wheel=null,s.end()}),150),s.zoom("mouse",a(v(g(u,d),s.mouse[0],s.mouse[1]),s.extent,c))}}function S(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];if(!n&&r.apply(this,arguments)){var s=e.currentTarget,l=x(this,o,!0).event(e),u=$e(e.view).on("mousemove.zoom",(function(e){if(en(e),!l.moved){var t=e.clientX-p,n=e.clientY-h;l.moved=t*t+n*n>f}l.event(e).zoom("mouse",a(v(l.that.__zoom,l.mouse[0]=He(e,s),l.mouse[1]),l.extent,c))}),!0).on("mouseup.zoom",(function(e){u.on("mousemove.zoom mouseup.zoom",null),Le(e.view,l.moved),en(e),l.event(e).end()}),!0),d=He(e,s),p=e.clientX,h=e.clientY;Fe(e.view),Jt(e),l.mouse=[d,this.__zoom.invert(d)],ft(this),l.start()}}function k(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(r.apply(this,arguments)){var s=this.__zoom,l=He(e.changedTouches?e.changedTouches[0]:e,this),d=s.invert(l),p=s.k*(e.shiftKey?.5:2),f=a(v(g(s,p),l,d),o.apply(this,n),c);en(e),u>0?$e(this).transition().duration(u).call(w,f,l,e):$e(this).call(m.transform,f,l,e)}}function M(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];if(r.apply(this,arguments)){var s,l,c,u,d=n.touches,p=d.length,f=x(this,a,n.changedTouches.length===p).event(n);for(Jt(n),l=0;l<p;++l)u=[u=He(c=d[l],this),this.__zoom.invert(u),c.identifier],f.touch0?f.touch1||f.touch0[2]===u[2]||(f.touch1=u,f.taps=0):(f.touch0=u,s=!0,f.taps=1+!!e);e&&(e=clearTimeout(e)),s&&(f.taps<2&&(t=u[0],e=setTimeout((function(){e=null}),500)),ft(this),f.start())}}function E(e){if(this.__zooming){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o,i,s,l,u=x(this,n).event(e),d=e.changedTouches,p=d.length;for(en(e),o=0;o<p;++o)s=He(i=d[o],this),u.touch0&&u.touch0[2]===i.identifier?u.touch0[0]=s:u.touch1&&u.touch1[2]===i.identifier&&(u.touch1[0]=s);if(i=u.that.__zoom,u.touch1){var f=u.touch0[0],h=u.touch0[1],m=u.touch1[0],y=u.touch1[1],b=(b=m[0]-f[0])*b+(b=m[1]-f[1])*b,w=(w=y[0]-h[0])*w+(w=y[1]-h[1])*w;i=g(i,Math.sqrt(b/w)),s=[(f[0]+m[0])/2,(f[1]+m[1])/2],l=[(h[0]+y[0])/2,(h[1]+y[1])/2]}else{if(!u.touch0)return;s=u.touch0[0],l=u.touch0[1]}u.zoom("touch",a(v(i,s,l),u.extent,c))}}function R(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];if(this.__zooming){var i,s,l=x(this,o).event(e),c=e.changedTouches,u=c.length;for(Jt(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),i=0;i<u;++i)s=c[i],l.touch0&&l.touch0[2]===s.identifier?delete l.touch0:l.touch1&&l.touch1[2]===s.identifier&&delete l.touch1;if(l.touch1&&!l.touch0&&(l.touch0=l.touch1,delete l.touch1),l.touch0)l.touch0[1]=this.__zoom.invert(l.touch0[0]);else if(l.end(),2===l.taps&&(s=He(s,this),Math.hypot(t[0]-s[0],t[1]-s[1])<h)){var d=$e(this).on("dblclick.zoom");d&&d.apply(this,arguments)}}}return m.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",rn),e!==o?w(e,t,n,r):o.interrupt().each((function(){x(this,arguments).event(r).start().zoom(null,"function"===typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,n,r){m.scaleTo(e,(function(){return this.__zoom.k*("function"===typeof t?t.apply(this,arguments):t)}),n,r)},m.scaleTo=function(e,t,n,r){m.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,i=null==n?y(e):"function"===typeof n?n.apply(this,arguments):n,s=r.invert(i),l="function"===typeof t?t.apply(this,arguments):t;return a(v(g(r,l),i,s),e,c)}),n,r)},m.translateBy=function(e,t,n,r){m.transform(e,(function(){return a(this.__zoom.translate("function"===typeof t?t.apply(this,arguments):t,"function"===typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,r)},m.translateTo=function(e,t,n,r,i){m.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,s=null==r?y(e):"function"===typeof r?r.apply(this,arguments):r;return a(Qt.translate(s[0],s[1]).scale(i.k).translate("function"===typeof t?-t.apply(this,arguments):-t,"function"===typeof n?-n.apply(this,arguments):-n),e,c)}),r,i)},C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=$e(this.that).datum();p.call(e,this.that,new Xt(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:p}),t)}},m.wheelDelta=function(e){return arguments.length?(i="function"===typeof e?e:Yt(+e),m):i},m.filter=function(e){return arguments.length?(r="function"===typeof e?e:Yt(!!e),m):r},m.touchable=function(e){return arguments.length?(s="function"===typeof e?e:Yt(!!e),m):s},m.extent=function(e){return arguments.length?(o="function"===typeof e?e:Yt([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):o},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(a=e,m):a},m.duration=function(e){return arguments.length?(u=+e,m):u},m.interpolate=function(e){return arguments.length?(d=e,m):d},m.on=function(){var e=p.on.apply(p,arguments);return e===p?m:e},m.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,m):Math.sqrt(f)},m.tapDistance=function(e){return arguments.length?(h=+e,m):h},m}().scaleExtent([v,y]).translateExtent(g),n=$e(P.current).call(t),r=Qt.translate(m.x,m.y).scale(On(m.zoom,v,y)),o=[[0,0],[e.width,e.height]],a=t.constrain()(r,o,g);t.transform(n,a),t.wheelDelta(Fo),M.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on("wheel.zoom"),transform:[a.x,a.y,a.k],domNode:P.current.closest(".react-flow")})}}),[]),(0,r.useEffect)((()=>{N&&D&&(!l||T||O?"undefined"!==typeof $&&N.on("wheel.zoom",(function(e,t){if(!x&&"wheel"===e.type&&!e.ctrlKey||_o(e,A))return null;e.preventDefault(),$.call(this,e,t)}),{passive:!1}):N.on("wheel.zoom",(e=>{if(_o(e,A))return!1;e.preventDefault(),e.stopImmediatePropagation();const r=N.property("__zoom").k||1;if(e.ctrlKey&&s){const t=He(e),n=Fo(e),o=r*Math.pow(2,n);return void D.scaleTo(N,o,t,e)}const a=1===e.deltaMode?20:1;let i=u===or.Vertical?0:e.deltaX*a,l=u===or.Horizontal?0:e.deltaY*a;!Qn()&&e.shiftKey&&u!==or.Vertical&&(i=e.deltaY*a,l=0),D.translateBy(N,-i/r*c,-l/r*c,{internal:!0});const d=To(N.property("__zoom")),{onViewportChangeStart:p,onViewportChange:f,onViewportChangeEnd:h}=M.getState();clearTimeout(F.current),j.current||(j.current=!0,n?.(e,d),p?.(d)),j.current&&(t?.(e,d),f?.(d),F.current=setTimeout((()=>{o?.(e,d),h?.(d),j.current=!1}),150))}),{passive:!1}))}),[O,l,u,N,D,$,T,s,x,A,n,t,o]),(0,r.useEffect)((()=>{D&&D.on("start",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;_.current=e.sourceEvent?.button;const{onViewportChangeStart:t}=M.getState(),r=To(e.transform);E.current=!0,I.current=r,"mousedown"===e.sourceEvent?.type&&M.setState({paneDragging:!0}),t?.(r),n?.(e.sourceEvent,r)}))}),[D,n]),(0,r.useEffect)((()=>{D&&(O&&!E.current?D.on("zoom",null):O||D.on("zoom",(e=>{const{onViewportChange:n}=M.getState();if(M.setState({transform:[e.transform.x,e.transform.y,e.transform.k]}),R.current=!(!a||!jo(h,_.current??0)),(t||n)&&!e.sourceEvent?.internal){const r=To(e.transform);n?.(r),t?.(e.sourceEvent,r)}})))}),[O,D,t,h,a]),(0,r.useEffect)((()=>{D&&D.on("end",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;const{onViewportChangeEnd:t}=M.getState();if(E.current=!1,M.setState({paneDragging:!1}),a&&jo(h,_.current??0)&&!R.current&&a(e.sourceEvent),R.current=!1,(o||t)&&(n=I.current,r=e.transform,n.x!==r.x||n.y!==r.y||n.zoom!==r.k)){const n=To(e.transform);I.current=n,clearTimeout(k.current),k.current=setTimeout((()=>{t?.(n),o?.(e.sourceEvent,n)}),l?150:0)}var n,r}))}),[D,l,h,o,a]),(0,r.useEffect)((()=>{D&&D.filter((e=>{const t=T||i,n=s&&e.ctrlKey;if((!0===h||Array.isArray(h)&&h.includes(1))&&1===e.button&&"mousedown"===e.type&&(_o(e,"react-flow__node")||_o(e,"react-flow__edge")))return!0;if(!h&&!t&&!l&&!d&&!s)return!1;if(O)return!1;if(!d&&"dblclick"===e.type)return!1;if(_o(e,A)&&"wheel"===e.type)return!1;if(_o(e,S)&&("wheel"!==e.type||l&&"wheel"===e.type&&!T))return!1;if(!s&&e.ctrlKey&&"wheel"===e.type)return!1;if(!t&&!l&&!n&&"wheel"===e.type)return!1;if(!h&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(Array.isArray(h)&&!h.includes(e.button)&&"mousedown"===e.type)return!1;const r=Array.isArray(h)&&h.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&r}))}),[O,D,i,s,l,d,h,p,T]),r.createElement("div",{className:"react-flow__renderer",ref:P,style:Oo},C)},zo=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Ho(){const{userSelectionActive:e,userSelectionRect:t}=En(zo,f.x);return e&&t?r.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function Bo(e,t){const n=t.parentNode||t.parentId,r=e.find((e=>e.id===n));if(r){const e=t.position.x+t.width-r.width,n=t.position.y+t.height-r.height;if(e>0||n>0||t.position.x<0||t.position.y<0){if(r.style={...r.style}||{},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,e>0&&(r.style.width+=e),n>0&&(r.style.height+=n),t.position.x<0){const e=Math.abs(t.position.x);r.position.x=r.position.x-e,r.style.width+=e,t.position.x=0}if(t.position.y<0){const e=Math.abs(t.position.y);r.position.y=r.position.y-e,r.style.height+=e,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function Go(e,t){if(e.some((e=>"reset"===e.type)))return e.filter((e=>"reset"===e.type)).map((e=>e.item));const n=e.filter((e=>"add"===e.type)).map((e=>e.item));return t.reduce(((t,n)=>{const r=e.filter((e=>e.id===n.id));if(0===r.length)return t.push(n),t;const o={...n};for(const e of r)if(e)switch(e.type){case"select":o.selected=e.selected;break;case"position":"undefined"!==typeof e.position&&(o.position=e.position),"undefined"!==typeof e.positionAbsolute&&(o.positionAbsolute=e.positionAbsolute),"undefined"!==typeof e.dragging&&(o.dragging=e.dragging),o.expandParent&&Bo(t,o);break;case"dimensions":"undefined"!==typeof e.dimensions&&(o.width=e.dimensions.width,o.height=e.dimensions.height),"undefined"!==typeof e.updateStyle&&(o.style={...o.style||{},...e.dimensions}),"boolean"===typeof e.resizing&&(o.resizing=e.resizing),o.expandParent&&Bo(t,o);break;case"remove":return t}return t.push(o),t}),n)}function Wo(e,t){return Go(e,t)}const Uo=(e,t)=>({id:e,type:"select",selected:t});function Ko(e,t){return e.reduce(((e,n)=>{const r=t.includes(n.id);return!n.selected&&r?(n.selected=!0,e.push(Uo(n.id,!0))):n.selected&&!r&&(n.selected=!1,e.push(Uo(n.id,!1))),e}),[])}const qo=(e,t)=>n=>{n.target===t.current&&e?.(n)},Yo=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),Xo=(0,r.memo)((e=>{let{isSelecting:t,selectionMode:n=ar.Full,panOnDrag:a,onSelectionStart:i,onSelectionEnd:s,onPaneClick:l,onPaneContextMenu:c,onPaneScroll:u,onPaneMouseEnter:d,onPaneMouseMove:p,onPaneMouseLeave:h,children:m}=e;const g=(0,r.useRef)(null),v=Rn(),y=(0,r.useRef)(0),b=(0,r.useRef)(0),w=(0,r.useRef)(),{userSelectionActive:x,elementsSelectable:C,dragging:A}=En(Yo,f.x),S=()=>{v.setState({userSelectionActive:!1,userSelectionRect:null}),y.current=0,b.current=0},k=e=>{l?.(e),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},M=u?e=>u(e):void 0,E=C&&(t||x);return r.createElement("div",{className:(0,o.A)(["react-flow__pane",{dragging:A,selection:t}]),onClick:E?void 0:qo(k,g),onContextMenu:qo((e=>{Array.isArray(a)&&a?.includes(2)?e.preventDefault():c?.(e)}),g),onWheel:qo(M,g),onMouseEnter:E?void 0:d,onMouseDown:E?e=>{const{resetSelectedElements:n,domNode:r}=v.getState();if(w.current=r?.getBoundingClientRect(),!C||!t||0!==e.button||e.target!==g.current||!w.current)return;const{x:o,y:a}=Zn(e,w.current);n(),v.setState({userSelectionRect:{width:0,height:0,startX:o,startY:a,x:o,y:a}}),i?.(e)}:void 0,onMouseMove:E?e=>{const{userSelectionRect:r,nodeInternals:o,edges:a,transform:i,onNodesChange:s,onEdgesChange:l,nodeOrigin:c,getNodes:u}=v.getState();if(!t||!w.current||!r)return;v.setState({userSelectionActive:!0,nodesSelectionActive:!1});const d=Zn(e,w.current),p=r.startX??0,f=r.startY??0,h={...r,x:d.x<p?d.x:p,y:d.y<f?d.y:f,width:Math.abs(d.x-p),height:Math.abs(d.y-f)},m=u(),g=Dr(o,h,i,n===ar.Partial,!0,c),x=Nr(g,a).map((e=>e.id)),C=g.map((e=>e.id));if(y.current!==C.length){y.current=C.length;const e=Ko(m,C);e.length&&s?.(e)}if(b.current!==x.length){b.current=x.length;const e=Ko(a,x);e.length&&l?.(e)}v.setState({userSelectionRect:h})}:p,onMouseUp:E?e=>{if(0!==e.button)return;const{userSelectionRect:t}=v.getState();!x&&t&&e.target===g.current&&k?.(e),v.setState({nodesSelectionActive:y.current>0}),S(),s?.(e)}:void 0,onMouseLeave:E?e=>{x&&(v.setState({nodesSelectionActive:y.current>0}),s?.(e)),S()}:h,ref:g,style:Oo},m,r.createElement(Ho,null))}));function Zo(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return!!r&&(!!r.selected||Zo(r,t))}function Qo(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function Jo(e,t,n,r){return Array.from(e.values()).filter((n=>(n.selected||n.id===r)&&(!n.parentNode||n.parentId||!Zo(n,e))&&(n.draggable||t&&"undefined"===typeof n.draggable))).map((e=>({id:e.id,position:e.position||{x:0,y:0},positionAbsolute:e.positionAbsolute||{x:0,y:0},distance:{x:n.x-(e.positionAbsolute?.x??0),y:n.y-(e.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:e.extent,parentNode:e.parentNode||e.parentId,parentId:e.parentNode||e.parentId,width:e.width,height:e.height,expandParent:e.expandParent})))}function ea(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[0,0],a=arguments.length>5?arguments[5]:void 0;const i=function(e,t){return t&&"parent"!==t?[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]:t}(e,e.extent||r);let s=i;const l=e.parentNode||e.parentId;if("parent"!==e.extent||e.expandParent){if(e.extent&&l&&"parent"!==e.extent){const t=n.get(l),{x:r,y:a}=Pr(t,o).positionAbsolute;s=[[e.extent[0][0]+r,e.extent[0][1]+a],[e.extent[1][0]+r,e.extent[1][1]+a]]}}else if(l&&e.width&&e.height){const t=n.get(l),{x:r,y:a}=Pr(t,o).positionAbsolute;s=t&&Wn(r)&&Wn(a)&&Wn(t.width)&&Wn(t.height)?[[r+e.width*o[0],a+e.height*o[1]],[r+t.width-e.width+e.width*o[0],a+t.height-e.height+e.height*o[1]]]:s}else a?.("005",bn()),s=i;let c={x:0,y:0};if(l){const e=n.get(l);c=Pr(e,o).positionAbsolute}const u=s&&"parent"!==s?Tn(t,s):t;return{position:{x:u.x-c.x,y:u.y-c.y},positionAbsolute:u}}function ta(e){let{nodeId:t,dragItems:n,nodeInternals:r}=e;const o=n.map((e=>({...r.get(e.id),position:e.position,positionAbsolute:e.positionAbsolute})));return[t?o.find((e=>e.id===t)):o[0],o]}Xo.displayName="Pane";const na=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const a=Array.from(o),i=t.getBoundingClientRect(),s=i.width*r[0],l=i.height*r[1];return a.map((e=>{const t=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),position:e.getAttribute("data-handlepos"),x:(t.left-i.left-s)/n,y:(t.top-i.top-l)/n,...$n(e)}}))};function ra(e,t,n){return void 0===n?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function oa(e){let{id:t,store:n,unselect:r=!1,nodeRef:o}=e;const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:s,nodeInternals:l,onError:c}=n.getState(),u=l.get(t);u?(n.setState({nodesSelectionActive:!1}),u.selected?(r||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame((()=>o?.current?.blur()))):a([t])):c?.("012",kn(t))}function aa(e){return(t,n,r)=>e?.(t,r)}function ia(e){let{nodeRef:t,disabled:n=!1,noDragClassName:o,handleSelector:a,nodeId:i,isSelectable:s,selectNodesOnDrag:l}=e;const c=Rn(),[u,d]=(0,r.useState)(!1),p=(0,r.useRef)([]),f=(0,r.useRef)({x:null,y:null}),h=(0,r.useRef)(0),m=(0,r.useRef)(null),g=(0,r.useRef)({x:0,y:0}),v=(0,r.useRef)(null),y=(0,r.useRef)(!1),w=(0,r.useRef)(!1),x=(0,r.useRef)(!1),C=function(){const e=Rn(),t=(0,r.useCallback)((t=>{let{sourceEvent:n}=t;const{transform:r,snapGrid:o,snapToGrid:a}=e.getState(),i=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,l={x:(i-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:a?o[0]*Math.round(l.x/o[0]):l.x,ySnapped:a?o[1]*Math.round(l.y/o[1]):l.y,...l}}),[]);return t}();return(0,r.useEffect)((()=>{if(t?.current){const e=$e(t.current),r=e=>{let{x:t,y:n}=e;const{nodeInternals:r,onNodeDrag:o,onSelectionDrag:a,updateNodePositions:s,nodeExtent:l,snapGrid:u,snapToGrid:h,nodeOrigin:m,onError:g}=c.getState();f.current={x:t,y:n};let y=!1,b={x:0,y:0,x2:0,y2:0};if(p.current.length>1&&l){const e=Ir(p.current,m);b=Vn(e)}if(p.current=p.current.map((e=>{const o={x:t-e.distance.x,y:n-e.distance.y};h&&(o.x=u[0]*Math.round(o.x/u[0]),o.y=u[1]*Math.round(o.y/u[1]));const a=[[l[0][0],l[0][1]],[l[1][0],l[1][1]]];p.current.length>1&&l&&!e.extent&&(a[0][0]=e.positionAbsolute.x-b.x+l[0][0],a[1][0]=e.positionAbsolute.x+(e.width??0)-b.x2+l[1][0],a[0][1]=e.positionAbsolute.y-b.y+l[0][1],a[1][1]=e.positionAbsolute.y+(e.height??0)-b.y2+l[1][1]);const i=ea(e,o,r,a,m,g);return y=y||e.position.x!==i.position.x||e.position.y!==i.position.y,e.position=i.position,e.positionAbsolute=i.positionAbsolute,e})),!y)return;s(p.current,!0,!0),d(!0);const w=i?o:aa(a);if(w&&v.current){const[e,t]=ta({nodeId:i,dragItems:p.current,nodeInternals:r});w(v.current,e,t)}},u=()=>{if(!m.current)return;const[e,t]=jn(g.current,m.current);if(0!==e||0!==t){const{transform:n,panBy:o}=c.getState();f.current.x=(f.current.x??0)-e/n[2],f.current.y=(f.current.y??0)-t/n[2],o({x:e,y:t})&&r(f.current)}h.current=requestAnimationFrame(u)},A=e=>{const{nodeInternals:n,multiSelectionActive:r,nodesDraggable:o,unselectNodesAndEdges:a,onNodeDragStart:u,onSelectionDragStart:d}=c.getState();w.current=!0;const h=i?u:aa(d);l&&s||r||!i||n.get(i)?.selected||a(),i&&s&&l&&oa({id:i,store:c,nodeRef:t});const m=C(e);if(f.current=m,p.current=Jo(n,o,m,i),h&&p.current){const[t,r]=ta({nodeId:i,dragItems:p.current,nodeInternals:n});h(e.sourceEvent,t,r)}};if(!n){const n=function(){var e,t,n,r,o=un,a=dn,i=pn,s=fn,l={},c=b("start","drag","end"),u=0,d=0;function p(e){e.on("mousedown.drag",f).filter(s).on("touchstart.drag",g).on("touchmove.drag",v,Oe).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(i,s){if(!r&&o.call(this,i,s)){var l=w(this,a.call(this,i,s),i,s,"mouse");l&&($e(i.view).on("mousemove.drag",h,Te).on("mouseup.drag",m,Te),Fe(i.view),_e(i),n=!1,e=i.clientX,t=i.clientY,l("start",i))}}function h(r){if(je(r),!n){var o=r.clientX-e,a=r.clientY-t;n=o*o+a*a>d}l.mouse("drag",r)}function m(e){$e(e.view).on("mousemove.drag mouseup.drag",null),Le(e.view,n),je(e),l.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,i=e.changedTouches,s=a.call(this,e,t),l=i.length;for(n=0;n<l;++n)(r=w(this,s,e,t,i[n].identifier,i[n]))&&(_e(e),r("start",e,i[n]))}}function v(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=l[r[t].identifier])&&(je(e),n("drag",e,r[t]))}function y(e){var t,n,o=e.changedTouches,a=o.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<a;++t)(n=l[o[t].identifier])&&(_e(e),n("end",e,o[t]))}function w(e,t,n,r,o,a){var s,d,f,h=c.copy(),m=He(a||n,t);if(null!=(f=i.call(e,new cn("beforestart",{sourceEvent:n,target:p,identifier:o,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:h}),r)))return s=f.x-m[0]||0,d=f.y-m[1]||0,function n(a,i,c){var g,v=m;switch(a){case"start":l[o]=n,g=u++;break;case"end":delete l[o],--u;case"drag":m=He(c||i,t),g=u}h.call(a,e,new cn(a,{sourceEvent:i,subject:f,target:p,identifier:o,active:g,x:m[0]+s,y:m[1]+d,dx:m[0]-v[0],dy:m[1]-v[1],dispatch:h}),r)}}return p.filter=function(e){return arguments.length?(o="function"===typeof e?e:ln(!!e),p):o},p.container=function(e){return arguments.length?(a="function"===typeof e?e:ln(e),p):a},p.subject=function(e){return arguments.length?(i="function"===typeof e?e:ln(e),p):i},p.touchable=function(e){return arguments.length?(s="function"===typeof e?e:ln(!!e),p):s},p.on=function(){var e=c.on.apply(c,arguments);return e===c?p:e},p.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,p):Math.sqrt(d)},p}().on("start",(e=>{const{domNode:t,nodeDragThreshold:n}=c.getState();0===n&&A(e),x.current=!1;const r=C(e);f.current=r,m.current=t?.getBoundingClientRect()||null,g.current=Zn(e.sourceEvent,m.current)})).on("drag",(e=>{const t=C(e),{autoPanOnNodeDrag:n,nodeDragThreshold:o}=c.getState();if("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1&&(x.current=!0),!x.current){if(!y.current&&w.current&&n&&(y.current=!0,u()),!w.current){const n=t.xSnapped-(f?.current?.x??0),r=t.ySnapped-(f?.current?.y??0);Math.sqrt(n*n+r*r)>o&&A(e)}(f.current.x!==t.xSnapped||f.current.y!==t.ySnapped)&&p.current&&w.current&&(v.current=e.sourceEvent,g.current=Zn(e.sourceEvent,m.current),r(t))}})).on("end",(e=>{if(w.current&&!x.current&&(d(!1),y.current=!1,w.current=!1,cancelAnimationFrame(h.current),p.current)){const{updateNodePositions:t,nodeInternals:n,onNodeDragStop:r,onSelectionDragStop:o}=c.getState(),a=i?r:aa(o);if(t(p.current,!1,!1),a){const[t,r]=ta({nodeId:i,dragItems:p.current,nodeInternals:n});a(e.sourceEvent,t,r)}}})).filter((e=>{const n=e.target;return!e.button&&(!o||!Qo(n,`.${o}`,t))&&(!a||Qo(n,a,t))}));return e.call(n),()=>{e.on(".drag",null)}}e.on(".drag",null)}}),[t,n,o,a,s,c,i,l,C]),u}function sa(){const e=Rn();return(0,r.useCallback)((t=>{const{nodeInternals:n,nodeExtent:r,updateNodePositions:o,getNodes:a,snapToGrid:i,snapGrid:s,onError:l,nodesDraggable:c}=e.getState(),u=a().filter((e=>e.selected&&(e.draggable||c&&"undefined"===typeof e.draggable))),d=i?s[0]:5,p=i?s[1]:5,f=t.isShiftPressed?4:1,h=t.x*d*f,m=t.y*p*f;o(u.map((e=>{if(e.positionAbsolute){const t={x:e.positionAbsolute.x+h,y:e.positionAbsolute.y+m};i&&(t.x=s[0]*Math.round(t.x/s[0]),t.y=s[1]*Math.round(t.y/s[1]));const{positionAbsolute:o,position:a}=ea(e,t,n,r,void 0,l);e.position=a,e.positionAbsolute=o}return e})),!0,!1)}),[])}const la={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var ca=e=>{const t=t=>{let{id:n,type:a,data:i,xPos:s,yPos:l,xPosOrigin:c,yPosOrigin:u,selected:d,onClick:p,onMouseEnter:f,onMouseMove:h,onMouseLeave:m,onContextMenu:g,onDoubleClick:v,style:y,className:b,isDraggable:w,isSelectable:x,isConnectable:C,isFocusable:A,selectNodesOnDrag:S,sourcePosition:k,targetPosition:M,hidden:E,resizeObserver:R,dragHandle:P,zIndex:I,isParent:D,noDragClassName:N,noPanClassName:$,initialized:O,disableKeyboardA11y:T,ariaLabel:_,rfId:j,hasHandleBounds:F}=t;const L=Rn(),V=(0,r.useRef)(null),z=(0,r.useRef)(null),H=(0,r.useRef)(k),B=(0,r.useRef)(M),G=(0,r.useRef)(a),W=x||w||p||f||h||m,U=sa(),K=ra(n,L.getState,f),q=ra(n,L.getState,h),Y=ra(n,L.getState,m),X=ra(n,L.getState,g),Z=ra(n,L.getState,v);(0,r.useEffect)((()=>()=>{z.current&&(R?.unobserve(z.current),z.current=null)}),[]),(0,r.useEffect)((()=>{if(V.current&&!E){const e=V.current;O&&F&&z.current===e||(z.current&&R?.unobserve(z.current),R?.observe(e),z.current=e)}}),[E,O,F]),(0,r.useEffect)((()=>{const e=G.current!==a,t=H.current!==k,r=B.current!==M;V.current&&(e||t||r)&&(e&&(G.current=a),t&&(H.current=k),r&&(B.current=M),L.getState().updateNodeDimensions([{id:n,nodeElement:V.current,forceUpdate:!0}]))}),[n,a,k,M]);const Q=ia({nodeRef:V,disabled:E||!w,noDragClassName:N,handleSelector:P,nodeId:n,isSelectable:x,selectNodesOnDrag:S});return E?null:r.createElement("div",{className:(0,o.A)(["react-flow__node",`react-flow__node-${a}`,{[$]:w},b,{selected:d,selectable:x,parent:D,dragging:Q}]),ref:V,style:{zIndex:I,transform:`translate(${c}px,${u}px)`,pointerEvents:W?"all":"none",visibility:O?"visible":"hidden",...y},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:K,onMouseMove:q,onMouseLeave:Y,onContextMenu:X,onClick:e=>{const{nodeDragThreshold:t}=L.getState();if(x&&(!S||!w||t>0)&&oa({id:n,store:L,nodeRef:V}),p){const t=L.getState().nodeInternals.get(n);t&&p(e,{...t})}},onDoubleClick:Z,onKeyDown:A?e=>{if(!Yn(e)&&!T)if(Kn.includes(e.key)&&x){const t="Escape"===e.key;oa({id:n,store:L,unselect:t,nodeRef:V})}else w&&d&&Object.prototype.hasOwnProperty.call(la,e.key)&&(L.setState({ariaLiveMessage:`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~s}, y: ${~~l}`}),U({x:la[e.key].x,y:la[e.key].y,isShiftPressed:e.shiftKey}))}:void 0,tabIndex:A?0:void 0,role:A?"button":void 0,"aria-describedby":T?void 0:`${fo}-${j}`,"aria-label":_},r.createElement(Sr,{value:n},r.createElement(e,{id:n,data:i,type:a,xPos:s,yPos:l,selected:d,isConnectable:C,sourcePosition:k,targetPosition:M,dragging:Q,dragHandle:P,zIndex:I})))};return t.displayName="NodeWrapper",(0,r.memo)(t)};const ua=e=>{const t=e.getNodes().filter((e=>e.selected));return{...Ir(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};var da=(0,r.memo)((function(e){let{onSelectionContextMenu:t,noPanClassName:n,disableKeyboardA11y:a}=e;const i=Rn(),{width:s,height:l,x:c,y:u,transformString:d,userSelectionActive:p}=En(ua,f.x),h=sa(),m=(0,r.useRef)(null);if((0,r.useEffect)((()=>{a||m.current?.focus({preventScroll:!0})}),[a]),ia({nodeRef:m}),p||!s||!l)return null;const g=t?e=>{const n=i.getState().getNodes().filter((e=>e.selected));t(e,n)}:void 0;return r.createElement("div",{className:(0,o.A)(["react-flow__nodesselection","react-flow__container",n]),style:{transform:d}},r.createElement("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:a?void 0:-1,onKeyDown:a?void 0:e=>{Object.prototype.hasOwnProperty.call(la,e.key)&&h({x:la[e.key].x,y:la[e.key].y,isShiftPressed:e.shiftKey})},style:{width:s,height:l,top:u,left:c}}))}));const pa=e=>e.nodesSelectionActive,fa=e=>{let{children:t,onPaneClick:n,onPaneMouseEnter:o,onPaneMouseMove:a,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:l,deleteKeyCode:c,onMove:u,onMoveStart:d,onMoveEnd:p,selectionKeyCode:f,selectionOnDrag:h,selectionMode:m,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:y,panActivationKeyCode:b,zoomActivationKeyCode:w,elementsSelectable:x,zoomOnScroll:C,zoomOnPinch:A,panOnScroll:S,panOnScrollSpeed:k,panOnScrollMode:M,zoomOnDoubleClick:E,panOnDrag:R,defaultViewport:P,translateExtent:I,minZoom:D,maxZoom:N,preventScrolling:$,onSelectionContextMenu:O,noWheelClassName:T,noPanClassName:_,disableKeyboardA11y:j}=e;const F=En(pa),L=yo(f),V=yo(b),z=V||R,H=V||S,B=L||h&&!0!==z;return(e=>{let{deleteKeyCode:t,multiSelectionKeyCode:n}=e;const o=Rn(),{deleteElements:a}=No(),i=yo(t,$o),s=yo(n);(0,r.useEffect)((()=>{if(i){const{edges:e,getNodes:t}=o.getState(),n=t().filter((e=>e.selected)),r=e.filter((e=>e.selected));a({nodes:n,edges:r}),o.setState({nodesSelectionActive:!1})}}),[i]),(0,r.useEffect)((()=>{o.setState({multiSelectionActive:s})}),[s])})({deleteKeyCode:c,multiSelectionKeyCode:y}),r.createElement(Vo,{onMove:u,onMoveStart:d,onMoveEnd:p,onPaneContextMenu:s,elementsSelectable:x,zoomOnScroll:C,zoomOnPinch:A,panOnScroll:H,panOnScrollSpeed:k,panOnScrollMode:M,zoomOnDoubleClick:E,panOnDrag:!L&&z,defaultViewport:P,translateExtent:I,minZoom:D,maxZoom:N,zoomActivationKeyCode:w,preventScrolling:$,noWheelClassName:T,noPanClassName:_},r.createElement(Xo,{onSelectionStart:g,onSelectionEnd:v,onPaneClick:n,onPaneMouseEnter:o,onPaneMouseMove:a,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:l,panOnDrag:z,isSelecting:!!B,selectionMode:m},t,F&&r.createElement(da,{onSelectionContextMenu:O,noPanClassName:_,disableKeyboardA11y:j})))};fa.displayName="FlowRenderer";var ha=(0,r.memo)(fa);function ma(e){return{...{input:ca(e.input||Xr),default:ca(e.default||qr),output:ca(e.output||Qr),group:ca(e.group||Jr)},...Object.keys(e).filter((e=>!["input","default","output","group"].includes(e))).reduce(((t,n)=>(t[n]=ca(e[n]||qr),t)),{})}}const ga=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),va=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:a,updateNodeDimensions:i,onError:s}=En(ga,f.x),l=(c=e.onlyRenderVisibleElements,En((0,r.useCallback)((e=>c?Dr(e.nodeInternals,{x:0,y:0,width:e.width,height:e.height},e.transform,!0):e.getNodes()),[c])));var c;const u=(0,r.useRef)(),d=(0,r.useMemo)((()=>{if("undefined"===typeof ResizeObserver)return null;const e=new ResizeObserver((e=>{const t=e.map((e=>({id:e.target.getAttribute("data-id"),nodeElement:e.target,forceUpdate:!0})));i(t)}));return u.current=e,e}),[]);return(0,r.useEffect)((()=>()=>{u?.current?.disconnect()}),[]),r.createElement("div",{className:"react-flow__nodes",style:Oo},l.map((i=>{let l=i.type||"default";e.nodeTypes[l]||(s?.("003",vn(l)),l="default");const c=e.nodeTypes[l]||e.nodeTypes.default,u=!!(i.draggable||t&&"undefined"===typeof i.draggable),p=!!(i.selectable||a&&"undefined"===typeof i.selectable),f=!!(i.connectable||n&&"undefined"===typeof i.connectable),h=!!(i.focusable||o&&"undefined"===typeof i.focusable),m=e.nodeExtent?Tn(i.positionAbsolute,e.nodeExtent):i.positionAbsolute,g=m?.x??0,v=m?.y??0,y=(e=>{let{x:t,y:n,width:r,height:o,origin:a}=e;return r&&o?a[0]<0||a[1]<0||a[0]>1||a[1]>1?{x:t,y:n}:{x:t-r*a[0],y:n-o*a[1]}:{x:t,y:n}})({x:g,y:v,width:i.width??0,height:i.height??0,origin:e.nodeOrigin});return r.createElement(c,{key:i.id,id:i.id,className:i.className,style:i.style,type:l,data:i.data,sourcePosition:i.sourcePosition||lr.Bottom,targetPosition:i.targetPosition||lr.Top,hidden:i.hidden,xPos:g,yPos:v,xPosOrigin:y.x,yPosOrigin:y.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!i.selected,isDraggable:u,isSelectable:p,isConnectable:f,isFocusable:h,resizeObserver:d,dragHandle:i.dragHandle,zIndex:i[Un]?.z??0,isParent:!!i[Un]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!i.width&&!!i.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:i.ariaLabel,hasHandleBounds:!!i[Un]?.handleBounds})})))};va.displayName="NodeRenderer";var ya=(0,r.memo)(va);const ba=(e,t,n)=>n===lr.Left?e-t:n===lr.Right?e+t:e,wa=(e,t,n)=>n===lr.Top?e-t:n===lr.Bottom?e+t:e,xa="react-flow__edgeupdater",Ca=e=>{let{position:t,centerX:n,centerY:a,radius:i=10,onMouseDown:s,onMouseEnter:l,onMouseOut:c,type:u}=e;return r.createElement("circle",{onMouseDown:s,onMouseEnter:l,onMouseOut:c,className:(0,o.A)([xa,`${xa}-${u}`]),cx:ba(n,i,t),cy:wa(a,i,t),r:i,stroke:"transparent",fill:"transparent"})},Aa=()=>!0;var Sa=e=>{const t=t=>{let{id:n,className:a,type:i,data:s,onClick:l,onEdgeDoubleClick:c,selected:u,animated:d,label:p,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:y,source:b,target:w,sourceX:x,sourceY:C,targetX:A,targetY:S,sourcePosition:k,targetPosition:M,elementsSelectable:E,hidden:R,sourceHandleId:P,targetHandleId:I,onContextMenu:D,onMouseEnter:N,onMouseMove:$,onMouseLeave:O,reconnectRadius:T,onReconnect:_,onReconnectStart:j,onReconnectEnd:F,markerEnd:L,markerStart:V,rfId:z,ariaLabel:H,isFocusable:B,isReconnectable:G,pathOptions:W,interactionWidth:U,disableKeyboardA11y:K}=t;const q=(0,r.useRef)(null),[Y,X]=(0,r.useState)(!1),[Z,Q]=(0,r.useState)(!1),J=Rn(),ee=(0,r.useMemo)((()=>`url('#${Mr(V,z)}')`),[V,z]),te=(0,r.useMemo)((()=>`url('#${Mr(L,z)}')`),[L,z]);if(R)return null;const ne=er(n,J.getState,c),re=er(n,J.getState,D),oe=er(n,J.getState,N),ae=er(n,J.getState,$),ie=er(n,J.getState,O),se=(e,t)=>{if(0!==e.button)return;const{edges:r,isValidConnection:o}=J.getState(),a=t?w:b,i=(t?I:P)||null,s=t?"target":"source",l=o||Aa,c=t,u=r.find((e=>e.id===n));Q(!0),j?.(e,u,s);Hr({event:e,handleId:i,nodeId:a,onConnect:e=>_?.(u,e),isTarget:c,getState:J.getState,setState:J.setState,isValidConnection:l,edgeUpdaterType:s,onReconnectEnd:e=>{Q(!1),F?.(e,u,s)}})},le=()=>X(!0),ce=()=>X(!1),ue=!E&&!l;return r.createElement("g",{className:(0,o.A)(["react-flow__edge",`react-flow__edge-${i}`,a,{selected:u,animated:d,inactive:ue,updating:Y}]),onClick:e=>{const{edges:t,addSelectedEdges:r,unselectNodesAndEdges:o,multiSelectionActive:a}=J.getState(),i=t.find((e=>e.id===n));i&&(E&&(J.setState({nodesSelectionActive:!1}),i.selected&&a?(o({nodes:[],edges:[i]}),q.current?.blur()):r([n])),l&&l(e,i))},onDoubleClick:ne,onContextMenu:re,onMouseEnter:oe,onMouseMove:ae,onMouseLeave:ie,onKeyDown:B?e=>{if(!K&&Kn.includes(e.key)&&E){const{unselectNodesAndEdges:t,addSelectedEdges:r,edges:o}=J.getState();"Escape"===e.key?(q.current?.blur(),t({edges:[o.find((e=>e.id===n))]})):r([n])}}:void 0,tabIndex:B?0:void 0,role:B?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":null===H?void 0:H||`Edge from ${b} to ${w}`,"aria-describedby":B?`${ho}-${z}`:void 0,ref:q},!Z&&r.createElement(e,{id:n,source:b,target:w,selected:u,animated:d,label:p,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,data:s,style:y,sourceX:x,sourceY:C,targetX:A,targetY:S,sourcePosition:k,targetPosition:M,sourceHandleId:P,targetHandleId:I,markerStart:ee,markerEnd:te,pathOptions:W,interactionWidth:U}),G&&r.createElement(r.Fragment,null,("source"===G||!0===G)&&r.createElement(Ca,{position:k,centerX:x,centerY:C,radius:T,onMouseDown:e=>se(e,!0),onMouseEnter:le,onMouseOut:ce,type:"source"}),("target"===G||!0===G)&&r.createElement(Ca,{position:M,centerX:A,centerY:S,radius:T,onMouseDown:e=>se(e,!1),onMouseEnter:le,onMouseOut:ce,type:"target"})))};return t.displayName="EdgeWrapper",(0,r.memo)(t)};function ka(e){return{...{default:Sa(e.default||Cr),straight:Sa(e.bezier||yr),step:Sa(e.step||vr),smoothstep:Sa(e.step||gr),simplebezier:Sa(e.simplebezier||dr)},...Object.keys(e).filter((e=>!["default","bezier"].includes(e))).reduce(((t,n)=>(t[n]=Sa(e[n]||Cr),t)),{})}}function Ma(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=(n?.x||0)+t.x,o=(n?.y||0)+t.y,a=n?.width||t.width,i=n?.height||t.height;switch(e){case lr.Top:return{x:r+a/2,y:o};case lr.Right:return{x:r+a,y:o+i/2};case lr.Bottom:return{x:r+a/2,y:o+i};case lr.Left:return{x:r,y:o+i/2}}}function Ea(e,t){return e?1!==e.length&&t?t&&e.find((e=>e.id===t))||null:e[0]:null}function Ra(e){const t=e?.[Un]?.handleBounds||null,n=t&&e?.width&&e?.height&&"undefined"!==typeof e?.positionAbsolute?.x&&"undefined"!==typeof e?.positionAbsolute?.y;return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}const Pa=[{level:0,isMaxLevel:!0,edges:[]}];function Ia(e,t,n){const o=En((0,r.useCallback)((n=>e?n.edges.filter((e=>{const r=t.get(e.source),o=t.get(e.target);return r?.width&&r?.height&&o?.width&&o?.height&&function(e){let{sourcePos:t,targetPos:n,sourceWidth:r,sourceHeight:o,targetWidth:a,targetHeight:i,width:s,height:l,transform:c}=e;const u={x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),x2:Math.max(t.x+r,n.x+a),y2:Math.max(t.y+o,n.y+i)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const d=Vn({x:(0-c[0])/c[2],y:(0-c[1])/c[2],width:s/c[2],height:l/c[2]}),p=Math.max(0,Math.min(d.x2,u.x2)-Math.max(d.x,u.x)),f=Math.max(0,Math.min(d.y2,u.y2)-Math.max(d.y,u.y));return Math.ceil(p*f)>0}({sourcePos:r.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:r.width,sourceHeight:r.height,targetWidth:o.width,targetHeight:o.height,width:n.width,height:n.height,transform:n.transform})})):n.edges),[e,t]));return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1;const o=e.reduce(((e,o)=>{const a=Wn(o.zIndex);let i=a?o.zIndex:0;if(n){const e=t.get(o.target),n=t.get(o.source),r=o.selected||e?.selected||n?.selected,s=Math.max(n?.[Un]?.z||0,e?.[Un]?.z||0,1e3);i=(a?o.zIndex:0)+(r?s:0)}return e[i]?e[i].push(o):e[i]=[o],r=i>r?i:r,e}),{}),a=Object.entries(o).map((e=>{let[t,n]=e;const o=+t;return{edges:n,level:o,isMaxLevel:o===r}}));return 0===a.length?Pa:a}(o,t,n)}const Da={[sr.Arrow]:e=>{let{color:t="none",strokeWidth:n=1}=e;return r.createElement("polyline",{style:{stroke:t,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"})},[sr.ArrowClosed]:e=>{let{color:t="none",strokeWidth:n=1}=e;return r.createElement("polyline",{style:{stroke:t,fill:t,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})}};const Na=e=>{let{id:t,type:n,color:o,width:a=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"}=e;const u=function(e){const t=Rn();return(0,r.useMemo)((()=>Object.prototype.hasOwnProperty.call(Da,e)?Da[e]:(t.getState().onError?.("009",xn(e)),null)),[e])}(n);return u?r.createElement("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${a}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0"},r.createElement(u,{color:o,strokeWidth:l})):null},$a=e=>{let{defaultColor:t,rfId:n}=e;const o=En((0,r.useCallback)((e=>{let{defaultColor:t,rfId:n}=e;return e=>{const r=[];return e.edges.reduce(((e,o)=>([o.markerStart,o.markerEnd].forEach((o=>{if(o&&"object"===typeof o){const a=Mr(o,n);r.includes(a)||(e.push({id:a,color:o.color||t,...o}),r.push(a))}})),e)),[]).sort(((e,t)=>e.id.localeCompare(t.id)))}})({defaultColor:t,rfId:n}),[t,n]),((e,t)=>!(e.length!==t.length||e.some(((e,n)=>e.id!==t[n].id)))));return r.createElement("defs",null,o.map((e=>r.createElement(Na,{id:e.id,key:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient}))))};$a.displayName="MarkerDefinitions";var Oa=(0,r.memo)($a);const Ta=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),_a=e=>{let{defaultMarkerColor:t,onlyRenderVisibleElements:n,elevateEdgesOnSelect:a,rfId:i,edgeTypes:s,noPanClassName:l,onEdgeContextMenu:c,onEdgeMouseEnter:u,onEdgeMouseMove:d,onEdgeMouseLeave:p,onEdgeClick:h,onEdgeDoubleClick:m,onReconnect:g,onReconnectStart:v,onReconnectEnd:y,reconnectRadius:b,children:w,disableKeyboardA11y:x}=e;const{edgesFocusable:C,edgesUpdatable:A,elementsSelectable:S,width:k,height:M,connectionMode:E,nodeInternals:R,onError:P}=En(Ta,f.x),I=Ia(n,R,a);return k?r.createElement(r.Fragment,null,I.map((e=>{let{level:n,edges:a,isMaxLevel:f}=e;return r.createElement("svg",{key:n,style:{zIndex:n},width:k,height:M,className:"react-flow__edges react-flow__container"},f&&r.createElement(Oa,{defaultColor:t,rfId:i}),r.createElement("g",null,a.map((e=>{const[t,n,a]=Ra(R.get(e.source)),[f,w,k]=Ra(R.get(e.target));if(!a||!k)return null;let M=e.type||"default";s[M]||(P?.("011",Sn(M)),M="default");const I=s[M]||s.default,D=E===rr.Strict?w.target:(w.target??[]).concat(w.source??[]),N=Ea(n.source,e.sourceHandle),$=Ea(D,e.targetHandle),O=N?.position||lr.Bottom,T=$?.position||lr.Top,_=!!(e.focusable||C&&"undefined"===typeof e.focusable),j=e.reconnectable||e.updatable,F="undefined"!==typeof g&&(j||A&&"undefined"===typeof j);if(!N||!$)return P?.("008",Cn(N,e)),null;const{sourceX:L,sourceY:V,targetX:z,targetY:H}=((e,t,n,r,o,a)=>{const i=Ma(n,e,t),s=Ma(a,r,o);return{sourceX:i.x,sourceY:i.y,targetX:s.x,targetY:s.y}})(t,N,O,f,$,T);return r.createElement(I,{key:e.id,id:e.id,className:(0,o.A)([e.className,l]),type:M,data:e.data,selected:!!e.selected,animated:!!e.animated,hidden:!!e.hidden,label:e.label,labelStyle:e.labelStyle,labelShowBg:e.labelShowBg,labelBgStyle:e.labelBgStyle,labelBgPadding:e.labelBgPadding,labelBgBorderRadius:e.labelBgBorderRadius,style:e.style,source:e.source,target:e.target,sourceHandleId:e.sourceHandle,targetHandleId:e.targetHandle,markerEnd:e.markerEnd,markerStart:e.markerStart,sourceX:L,sourceY:V,targetX:z,targetY:H,sourcePosition:O,targetPosition:T,elementsSelectable:S,onContextMenu:c,onMouseEnter:u,onMouseMove:d,onMouseLeave:p,onClick:h,onEdgeDoubleClick:m,onReconnect:g,onReconnectStart:v,onReconnectEnd:y,reconnectRadius:b,rfId:i,ariaLabel:e.ariaLabel,isFocusable:_,isReconnectable:F,pathOptions:"pathOptions"in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth,disableKeyboardA11y:x})}))))})),w):null};_a.displayName="EdgeRenderer";var ja=(0,r.memo)(_a);const Fa=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function La(e){let{children:t}=e;const n=En(Fa);return r.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:n}},t)}const Va={[lr.Left]:lr.Right,[lr.Right]:lr.Left,[lr.Top]:lr.Bottom,[lr.Bottom]:lr.Top},za=e=>{let{nodeId:t,handleType:n,style:o,type:a=ir.Bezier,CustomComponent:i,connectionStatus:s}=e;const{fromNode:l,handleId:c,toX:u,toY:d,connectionMode:p}=En((0,r.useCallback)((e=>({fromNode:e.nodeInternals.get(t),handleId:e.connectionHandleId,toX:(e.connectionPosition.x-e.transform[0])/e.transform[2],toY:(e.connectionPosition.y-e.transform[1])/e.transform[2],connectionMode:e.connectionMode})),[t]),f.x),h=l?.[Un]?.handleBounds;let m=h?.[n];if(p===rr.Loose&&(m=m||h?.["source"===n?"target":"source"]),!l||!m)return null;const g=c?m.find((e=>e.id===c)):m[0],v=g?g.x+g.width/2:(l.width??0)/2,y=g?g.y+g.height/2:l.height??0,b=(l.positionAbsolute?.x??0)+v,w=(l.positionAbsolute?.y??0)+y,x=g?.position,C=x?Va[x]:null;if(!x||!C)return null;if(i)return r.createElement(i,{connectionLineType:a,connectionLineStyle:o,fromNode:l,fromHandle:g,fromX:b,fromY:w,toX:u,toY:d,fromPosition:x,toPosition:C,connectionStatus:s});let A="";const S={sourceX:b,sourceY:w,sourcePosition:x,targetX:u,targetY:d,targetPosition:C};return a===ir.Bezier?[A]=xr(S):a===ir.Step?[A]=mr({...S,borderRadius:0}):a===ir.SmoothStep?[A]=mr(S):a===ir.SimpleBezier?[A]=ur(S):A=`M${b},${w} ${u},${d}`,r.createElement("path",{d:A,fill:"none",className:"react-flow__connection-path",style:o})};za.displayName="ConnectionLine";const Ha=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function Ba(e){let{containerStyle:t,style:n,type:a,component:i}=e;const{nodeId:s,handleType:l,nodesConnectable:c,width:u,height:d,connectionStatus:p}=En(Ha,f.x);return!!(s&&l&&u&&c)?r.createElement("svg",{style:t,width:u,height:d,className:"react-flow__edges react-flow__connectionline react-flow__container"},r.createElement("g",{className:(0,o.A)(["react-flow__connection",p])},r.createElement(za,{nodeId:s,handleType:l,style:n,type:a,CustomComponent:i,connectionStatus:p}))):null}function Ga(e,t){(0,r.useRef)(null),Rn();return(0,r.useMemo)((()=>t(e)),[e])}const Wa=e=>{let{nodeTypes:t,edgeTypes:n,onMove:o,onMoveStart:a,onMoveEnd:i,onInit:s,onNodeClick:l,onEdgeClick:c,onNodeDoubleClick:u,onEdgeDoubleClick:d,onNodeMouseEnter:p,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:m,onSelectionContextMenu:g,onSelectionStart:v,onSelectionEnd:y,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:C,selectionKeyCode:A,selectionOnDrag:S,selectionMode:k,multiSelectionKeyCode:M,panActivationKeyCode:E,zoomActivationKeyCode:R,deleteKeyCode:P,onlyRenderVisibleElements:I,elementsSelectable:D,selectNodesOnDrag:N,defaultViewport:$,translateExtent:O,minZoom:T,maxZoom:_,preventScrolling:j,defaultMarkerColor:F,zoomOnScroll:L,zoomOnPinch:V,panOnScroll:z,panOnScrollSpeed:H,panOnScrollMode:B,zoomOnDoubleClick:G,panOnDrag:W,onPaneClick:U,onPaneMouseEnter:K,onPaneMouseMove:q,onPaneMouseLeave:Y,onPaneScroll:X,onPaneContextMenu:Z,onEdgeContextMenu:Q,onEdgeMouseEnter:J,onEdgeMouseMove:ee,onEdgeMouseLeave:te,onReconnect:ne,onReconnectStart:re,onReconnectEnd:oe,reconnectRadius:ae,noDragClassName:ie,noWheelClassName:se,noPanClassName:le,elevateEdgesOnSelect:ce,disableKeyboardA11y:ue,nodeOrigin:de,nodeExtent:pe,rfId:fe}=e;const he=Ga(t,ma),me=Ga(n,ka);return function(e){const t=No(),n=(0,r.useRef)(!1);(0,r.useEffect)((()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),n.current=!0)}),[e,t.viewportInitialized])}(s),r.createElement(ha,{onPaneClick:U,onPaneMouseEnter:K,onPaneMouseMove:q,onPaneMouseLeave:Y,onPaneContextMenu:Z,onPaneScroll:X,deleteKeyCode:P,selectionKeyCode:A,selectionOnDrag:S,selectionMode:k,onSelectionStart:v,onSelectionEnd:y,multiSelectionKeyCode:M,panActivationKeyCode:E,zoomActivationKeyCode:R,elementsSelectable:D,onMove:o,onMoveStart:a,onMoveEnd:i,zoomOnScroll:L,zoomOnPinch:V,zoomOnDoubleClick:G,panOnScroll:z,panOnScrollSpeed:H,panOnScrollMode:B,panOnDrag:W,defaultViewport:$,translateExtent:O,minZoom:T,maxZoom:_,onSelectionContextMenu:g,preventScrolling:j,noDragClassName:ie,noWheelClassName:se,noPanClassName:le,disableKeyboardA11y:ue},r.createElement(La,null,r.createElement(ja,{edgeTypes:me,onEdgeClick:c,onEdgeDoubleClick:d,onlyRenderVisibleElements:I,onEdgeContextMenu:Q,onEdgeMouseEnter:J,onEdgeMouseMove:ee,onEdgeMouseLeave:te,onReconnect:ne,onReconnectStart:re,onReconnectEnd:oe,reconnectRadius:ae,defaultMarkerColor:F,noPanClassName:le,elevateEdgesOnSelect:!!ce,disableKeyboardA11y:ue,rfId:fe},r.createElement(Ba,{style:w,type:b,component:x,containerStyle:C})),r.createElement("div",{className:"react-flow__edgelabel-renderer"}),r.createElement(ya,{nodeTypes:he,onNodeClick:l,onNodeDoubleClick:u,onNodeMouseEnter:p,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:m,selectNodesOnDrag:N,onlyRenderVisibleElements:I,noPanClassName:le,noDragClassName:ie,disableKeyboardA11y:ue,nodeOrigin:de,nodeExtent:pe,rfId:fe})))};Wa.displayName="GraphView";var Ua=(0,r.memo)(Wa);const Ka=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],qa={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ka,nodeExtent:Ka,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:rr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:qn,isValidConnection:void 0},Ya=()=>{return e=(e,t)=>({...qa,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:a}=t();e({nodeInternals:Ao(n,r,o,a)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map((e=>({...r,...e})))})},setDefaultNodesAndEdges:(n,r)=>{const o="undefined"!==typeof n,a="undefined"!==typeof r,i=o?Ao(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:i,edges:a?r:[],hasDefaultNodes:o,hasDefaultEdges:a})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:a,fitViewOnInitDone:i,fitViewOnInitOptions:s,domNode:l,nodeOrigin:c}=t(),u=l?.querySelector(".react-flow__viewport");if(!u)return;const d=window.getComputedStyle(u),{m22:p}=new window.DOMMatrixReadOnly(d.transform),f=n.reduce(((e,t)=>{const n=o.get(t.id);if(n?.hidden)o.set(n.id,{...n,[Un]:{...n[Un],handleBounds:void 0}});else if(n){const r=$n(t.nodeElement);r.width&&r.height&&(n.width!==r.width||n.height!==r.height||t.forceUpdate)&&(o.set(n.id,{...n,[Un]:{...n[Un],handleBounds:{source:na(".source",t.nodeElement,p,c),target:na(".target",t.nodeElement,p,c)}},...r}),e.push({id:n.id,type:"dimensions",dimensions:r}))}return e}),[]);Co(o,c);const h=i||a&&!i&&So(t,{initial:!0,...s});e({nodeInternals:new Map(o),fitViewOnInitDone:h}),f?.length>0&&r?.(f)},updateNodePositions:function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{triggerNodeChanges:o}=t(),a=e.map((e=>{const t={id:e.id,type:"position",dragging:r};return n&&(t.positionAbsolute=e.positionAbsolute,t.position=e.position),t}));o(a)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:a,nodeOrigin:i,getNodes:s,elevateNodesOnSelect:l}=t();if(n?.length){if(a){const t=Ao(Wo(n,s()),o,i,l);e({nodeInternals:t})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:a}=t();let i,s=null;r?i=n.map((e=>Uo(e,!0))):(i=Ko(a(),n),s=Ko(o,[])),Eo({changedNodes:i,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:a}=t();let i,s=null;r?i=n.map((e=>Uo(e,!0))):(i=Ko(o,n),s=Ko(a(),[])),Eo({changedNodes:s,changedEdges:i,get:t,set:e})},unselectNodesAndEdges:function(){let{nodes:n,edges:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{edges:o,getNodes:a}=t(),i=r||o;Eo({changedNodes:(n||a()).map((e=>(e.selected=!1,Uo(e.id,!1)))),changedEdges:i.map((e=>Uo(e.id,!1))),get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r?.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r?.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t();Eo({changedNodes:r().filter((e=>e.selected)).map((e=>Uo(e.id,!1))),changedEdges:n.filter((e=>e.selected)).map((e=>Uo(e.id,!1))),get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach((e=>{e.positionAbsolute=Tn(e.position,n)})),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:e=>{const{transform:n,width:r,height:o,d3Zoom:a,d3Selection:i,translateExtent:s}=t();if(!a||!i||!e.x&&!e.y)return!1;const l=Qt.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),c=[[0,0],[r,o]],u=a?.constrain()(l,c,s);return a.transform(i,u),n[0]!==u.x||n[1]!==u.y||n[2]!==u.k},cancelConnection:()=>e({connectionNodeId:qa.connectionNodeId,connectionHandleId:qa.connectionHandleId,connectionHandleType:qa.connectionHandleType,connectionStatus:qa.connectionStatus,connectionStartHandle:qa.connectionStartHandle,connectionEndHandle:qa.connectionEndHandle}),reset:()=>e({...qa})}),t=Object.is,e?p(e,t):p;var e,t},Xa=e=>{let{children:t}=e;const n=(0,r.useRef)(null);return n.current||(n.current=Ya()),r.createElement(gn,{value:n.current},t)};Xa.displayName="ReactFlowProvider";const Za=e=>{let{children:t}=e;return(0,r.useContext)(mn)?r.createElement(r.Fragment,null,t):r.createElement(Xa,null,t)};Za.displayName="ReactFlowWrapper";const Qa={input:Xr,default:qr,output:Qr,group:Jr},Ja={default:Cr,straight:yr,step:vr,smoothstep:gr,simplebezier:dr},ei=[0,0],ti=[15,15],ni={x:0,y:0,zoom:1},ri={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},oi=(0,r.forwardRef)(((e,t)=>{let{nodes:n,edges:a,defaultNodes:i,defaultEdges:s,className:l,nodeTypes:c=Qa,edgeTypes:u=Ja,onNodeClick:d,onEdgeClick:p,onInit:f,onMove:h,onMoveStart:m,onMoveEnd:g,onConnect:v,onConnectStart:y,onConnectEnd:b,onClickConnectStart:w,onClickConnectEnd:x,onNodeMouseEnter:C,onNodeMouseMove:A,onNodeMouseLeave:S,onNodeContextMenu:k,onNodeDoubleClick:M,onNodeDragStart:E,onNodeDrag:R,onNodeDragStop:P,onNodesDelete:I,onEdgesDelete:D,onSelectionChange:N,onSelectionDragStart:$,onSelectionDrag:O,onSelectionDragStop:T,onSelectionContextMenu:_,onSelectionStart:j,onSelectionEnd:F,connectionMode:L=rr.Strict,connectionLineType:V=ir.Bezier,connectionLineStyle:z,connectionLineComponent:H,connectionLineContainerStyle:B,deleteKeyCode:G="Backspace",selectionKeyCode:W="Shift",selectionOnDrag:U=!1,selectionMode:K=ar.Full,panActivationKeyCode:q="Space",multiSelectionKeyCode:Y=(Qn()?"Meta":"Control"),zoomActivationKeyCode:X=(Qn()?"Meta":"Control"),snapToGrid:Z=!1,snapGrid:Q=ti,onlyRenderVisibleElements:J=!1,selectNodesOnDrag:ee=!0,nodesDraggable:te,nodesConnectable:ne,nodesFocusable:re,nodeOrigin:oe=ei,edgesFocusable:ae,edgesUpdatable:ie,elementsSelectable:se,defaultViewport:le=ni,minZoom:ce=.5,maxZoom:ue=2,translateExtent:de=Ka,preventScrolling:pe=!0,nodeExtent:fe,defaultMarkerColor:he="#b1b1b7",zoomOnScroll:me=!0,zoomOnPinch:ge=!0,panOnScroll:ve=!1,panOnScrollSpeed:ye=.5,panOnScrollMode:be=or.Free,zoomOnDoubleClick:we=!0,panOnDrag:xe=!0,onPaneClick:Ce,onPaneMouseEnter:Ae,onPaneMouseMove:Se,onPaneMouseLeave:ke,onPaneScroll:Me,onPaneContextMenu:Ee,children:Re,onEdgeContextMenu:Pe,onEdgeDoubleClick:Ie,onEdgeMouseEnter:De,onEdgeMouseMove:Ne,onEdgeMouseLeave:$e,onEdgeUpdate:Oe,onEdgeUpdateStart:Te,onEdgeUpdateEnd:_e,onReconnect:je,onReconnectStart:Fe,onReconnectEnd:Le,reconnectRadius:Ve=10,edgeUpdaterRadius:ze=10,onNodesChange:He,onEdgesChange:Be,noDragClassName:Ge="nodrag",noWheelClassName:We="nowheel",noPanClassName:Ue="nopan",fitView:Ke=!1,fitViewOptions:qe,connectOnClick:Ye=!0,attributionPosition:Xe,proOptions:Ze,defaultEdgeOptions:Qe,elevateNodesOnSelect:Je=!0,elevateEdgesOnSelect:et=!1,disableKeyboardA11y:tt=!1,autoPanOnConnect:nt=!0,autoPanOnNodeDrag:rt=!0,connectionRadius:ot=20,isValidConnection:at,onError:it,style:st,id:lt,nodeDragThreshold:ct,...ut}=e;const dt=lt||"1";return r.createElement("div",{...ut,style:{...st,...ri},ref:t,className:(0,o.A)(["react-flow",l]),"data-testid":"rf__wrapper",id:lt},r.createElement(Za,null,r.createElement(Ua,{onInit:f,onMove:h,onMoveStart:m,onMoveEnd:g,onNodeClick:d,onEdgeClick:p,onNodeMouseEnter:C,onNodeMouseMove:A,onNodeMouseLeave:S,onNodeContextMenu:k,onNodeDoubleClick:M,nodeTypes:c,edgeTypes:u,connectionLineType:V,connectionLineStyle:z,connectionLineComponent:H,connectionLineContainerStyle:B,selectionKeyCode:W,selectionOnDrag:U,selectionMode:K,deleteKeyCode:G,multiSelectionKeyCode:Y,panActivationKeyCode:q,zoomActivationKeyCode:X,onlyRenderVisibleElements:J,selectNodesOnDrag:ee,defaultViewport:le,translateExtent:de,minZoom:ce,maxZoom:ue,preventScrolling:pe,zoomOnScroll:me,zoomOnPinch:ge,zoomOnDoubleClick:we,panOnScroll:ve,panOnScrollSpeed:ye,panOnScrollMode:be,panOnDrag:xe,onPaneClick:Ce,onPaneMouseEnter:Ae,onPaneMouseMove:Se,onPaneMouseLeave:ke,onPaneScroll:Me,onPaneContextMenu:Ee,onSelectionContextMenu:_,onSelectionStart:j,onSelectionEnd:F,onEdgeContextMenu:Pe,onEdgeDoubleClick:Ie,onEdgeMouseEnter:De,onEdgeMouseMove:Ne,onEdgeMouseLeave:$e,onReconnect:je??Oe,onReconnectStart:Fe??Te,onReconnectEnd:Le??_e,reconnectRadius:Ve??ze,defaultMarkerColor:he,noDragClassName:Ge,noWheelClassName:We,noPanClassName:Ue,elevateEdgesOnSelect:et,rfId:dt,disableKeyboardA11y:tt,nodeOrigin:oe,nodeExtent:fe}),r.createElement(co,{nodes:n,edges:a,defaultNodes:i,defaultEdges:s,onConnect:v,onConnectStart:y,onConnectEnd:b,onClickConnectStart:w,onClickConnectEnd:x,nodesDraggable:te,nodesConnectable:ne,nodesFocusable:re,edgesFocusable:ae,edgesUpdatable:ie,elementsSelectable:se,elevateNodesOnSelect:Je,minZoom:ce,maxZoom:ue,nodeExtent:fe,onNodesChange:He,onEdgesChange:Be,snapToGrid:Z,snapGrid:Q,connectionMode:L,translateExtent:de,connectOnClick:Ye,defaultEdgeOptions:Qe,fitView:Ke,fitViewOptions:qe,onNodesDelete:I,onEdgesDelete:D,onNodeDragStart:E,onNodeDrag:R,onNodeDragStop:P,onSelectionDrag:O,onSelectionDragStart:$,onSelectionDragStop:T,noPanClassName:Ue,nodeOrigin:oe,rfId:dt,autoPanOnConnect:nt,autoPanOnNodeDrag:rt,onError:it,connectionRadius:ot,isValidConnection:at,nodeDragThreshold:ct}),r.createElement(ao,{onSelectionChange:N}),Re,r.createElement(Dn,{proOptions:Ze,position:Xe}),r.createElement(vo,{rfId:dt,disableKeyboardA11y:tt})))}));oi.displayName="ReactFlow";const ai=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function ii(e){let{children:t}=e;const n=En(ai);return n?(0,hn.createPortal)(t,n):null}function si(e){return t=>{const[n,o]=(0,r.useState)(t),a=(0,r.useCallback)((t=>o((n=>e(t,n)))),[]);return[n,o,a]}}si(Wo),si((function(e,t){return Go(e,t)}))},73380:(e,t,n)=>{"use strict";function r(e){if("string"===typeof e||"number"===typeof e)return""+e;let t="";if(Array.isArray(e))for(let n,o=0;o<e.length;o++)""!==(n=r(e[o]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}n.d(t,{A:()=>r})},35795:(e,t,n)=>{"use strict";function r(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function o(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function a(){}n.d(t,{Ay:()=>x,Qh:()=>S});var i=.7,s=1/i,l="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d=/^#([0-9a-f]{3,8})$/,p=new RegExp(`^rgb\\(${l},${l},${l}\\)$`),f=new RegExp(`^rgb\\(${u},${u},${u}\\)$`),h=new RegExp(`^rgba\\(${l},${l},${l},${c}\\)$`),m=new RegExp(`^rgba\\(${u},${u},${u},${c}\\)$`),g=new RegExp(`^hsl\\(${c},${u},${u}\\)$`),v=new RegExp(`^hsla\\(${c},${u},${u},${c}\\)$`),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function b(){return this.rgb().formatHex()}function w(){return this.rgb().formatRgb()}function x(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=d.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?C(t):3===n?new k(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?A(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?A(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=p.exec(e))?new k(t[1],t[2],t[3],1):(t=f.exec(e))?new k(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=h.exec(e))?A(t[1],t[2],t[3],t[4]):(t=m.exec(e))?A(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=g.exec(e))?D(t[1],t[2]/100,t[3]/100,1):(t=v.exec(e))?D(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?C(y[e]):"transparent"===e?new k(NaN,NaN,NaN,0):null}function C(e){return new k(e>>16&255,e>>8&255,255&e,1)}function A(e,t,n,r){return r<=0&&(e=t=n=NaN),new k(e,t,n,r)}function S(e,t,n,r){return 1===arguments.length?((o=e)instanceof a||(o=x(o)),o?new k((o=o.rgb()).r,o.g,o.b,o.opacity):new k):new k(e,t,n,null==r?1:r);var o}function k(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function M(){return`#${I(this.r)}${I(this.g)}${I(this.b)}`}function E(){const e=R(this.opacity);return`${1===e?"rgb(":"rgba("}${P(this.r)}, ${P(this.g)}, ${P(this.b)}${1===e?")":`, ${e})`}`}function R(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function P(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function I(e){return((e=P(e))<16?"0":"")+e.toString(16)}function D(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new $(e,t,n,r)}function N(e){if(e instanceof $)return new $(e.h,e.s,e.l,e.opacity);if(e instanceof a||(e=x(e)),!e)return new $;if(e instanceof $)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,l=i-o,c=(i+o)/2;return l?(s=t===i?(n-r)/l+6*(n<r):n===i?(r-t)/l+2:(t-n)/l+4,l/=c<.5?i+o:2-i-o,s*=60):l=c>0&&c<1?0:s,new $(s,l,c,e.opacity)}function $(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function O(e){return(e=(e||0)%360)<0?e+360:e}function T(e){return Math.max(0,Math.min(1,e||0))}function _(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}r(a,x,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:b,formatHex:b,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return N(this).formatHsl()},formatRgb:w,toString:w}),r(k,S,o(a,{brighter(e){return e=null==e?s:Math.pow(s,e),new k(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?i:Math.pow(i,e),new k(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new k(P(this.r),P(this.g),P(this.b),R(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:M,formatHex:M,formatHex8:function(){return`#${I(this.r)}${I(this.g)}${I(this.b)}${I(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:E,toString:E})),r($,(function(e,t,n,r){return 1===arguments.length?N(e):new $(e,t,n,null==r?1:r)}),o(a,{brighter(e){return e=null==e?s:Math.pow(s,e),new $(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?i:Math.pow(i,e),new $(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new k(_(e>=240?e-240:e+120,o,r),_(e,o,r),_(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new $(O(this.h),T(this.s),T(this.l),R(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=R(this.opacity);return`${1===e?"hsl(":"hsla("}${O(this.h)}, ${100*T(this.s)}%, ${100*T(this.l)}%${1===e?")":`, ${e})`}`}}))},93852:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=e=>()=>e},89253:(e,t,n)=>{"use strict";function r(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}n.d(t,{A:()=>r})},80206:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>c});var r=n(35795);function o(e,t,n,r,o){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*n+(1+3*e+3*a-3*i)*r+i*o)/6}var a=n(93852);function i(e,t){return function(n){return e+n*t}}function s(e){return 1===(e=+e)?l:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):(0,a.A)(isNaN(t)?n:t)}}function l(e,t){var n=t-e;return n?i(e,n):(0,a.A)(isNaN(e)?t:e)}const c=function e(t){var n=s(t);function o(e,t){var o=n((e=(0,r.Qh)(e)).r,(t=(0,r.Qh)(t)).r),a=n(e.g,t.g),i=n(e.b,t.b),s=l(e.opacity,t.opacity);return function(t){return e.r=o(t),e.g=a(t),e.b=i(t),e.opacity=s(t),e+""}}return o.gamma=e,o}(1);function u(e){return function(t){var n,o,a=t.length,i=new Array(a),s=new Array(a),l=new Array(a);for(n=0;n<a;++n)o=(0,r.Qh)(t[n]),i[n]=o.r||0,s[n]=o.g||0,l[n]=o.b||0;return i=e(i),s=e(s),l=e(l),o.opacity=1,function(e){return o.r=i(e),o.g=s(e),o.b=l(e),o+""}}}u((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],s=r>0?e[r-1]:2*a-i,l=r<t-1?e[r+2]:2*i-a;return o((n-r/t)*t,s,a,i,l)}})),u((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),a=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],l=e[(r+2)%t];return o((n-r/t)*t,a,i,s,l)}}))},33449:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(89253),o=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,a=new RegExp(o.source,"g");function i(e,t){var n,i,s,l=o.lastIndex=a.lastIndex=0,c=-1,u=[],d=[];for(e+="",t+="";(n=o.exec(e))&&(i=a.exec(t));)(s=i.index)>l&&(s=t.slice(l,s),u[c]?u[c]+=s:u[++c]=s),(n=n[0])===(i=i[0])?u[c]?u[c]+=i:u[++c]=i:(u[++c]=null,d.push({i:c,x:(0,r.A)(n,i)})),l=a.lastIndex;return l<t.length&&(s=t.slice(l),u[c]?u[c]+=s:u[++c]=s),u.length<2?d[0]?function(e){return function(t){return e(t)+""}}(d[0].x):function(e){return function(){return e}}(t):(t=d.length,function(e){for(var n,r=0;r<t;++r)u[(n=d[r]).i]=n.x(e);return u.join("")})}},15079:(e,t,n)=>{"use strict";n.d(t,{A:()=>Z});const r=Math.sqrt(50),o=Math.sqrt(10),a=Math.sqrt(2);function i(e,t,n){const s=(t-e)/Math.max(0,n),l=Math.floor(Math.log10(s)),c=s/Math.pow(10,l),u=c>=r?10:c>=o?5:c>=a?2:1;let d,p,f;return l<0?(f=Math.pow(10,-l)/u,d=Math.round(e*f),p=Math.round(t*f),d/f<e&&++d,p/f>t&&--p,f=-f):(f=Math.pow(10,l)*u,d=Math.round(e/f),p=Math.round(t/f),d*f<e&&++d,p*f>t&&--p),p<d&&.5<=n&&n<2?i(e,t,2*n):[d,p,f]}function s(e,t,n){return i(e=+e,t=+t,n=+n)[2]}function l(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function c(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function u(e){let t,n,r;function o(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(o<a){if(0!==t(r,r))return a;do{const t=o+a>>>1;n(e[t],r)<0?o=t+1:a=t}while(o<a)}return o}return 2!==e.length?(t=l,n=(t,n)=>l(e(t),n),r=(t,n)=>e(t)-n):(t=e===l||e===c?e:d,n=e,r=e),{left:o,center:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const a=o(e,t,n,(arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length)-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(o<a){if(0!==t(r,r))return a;do{const t=o+a>>>1;n(e[t],r)<=0?o=t+1:a=t}while(o<a)}return o}}}function d(){return 0}const p=u(l),f=p.right,h=(p.left,u((function(e){return null===e?NaN:+e})).center,f);var m=n(35795),g=n(80206);function v(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,a=new Array(o),i=new Array(r);for(n=0;n<o;++n)a[n]=S(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<o;++n)i[n]=a[n](e);return i}}function y(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}var b=n(89253);function w(e,t){var n,r={},o={};for(n in null!==e&&"object"===typeof e||(e={}),null!==t&&"object"===typeof t||(t={}),t)n in e?r[n]=S(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var x=n(33449),C=n(93852);function A(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(a){for(n=0;n<r;++n)o[n]=e[n]*(1-a)+t[n]*a;return o}}function S(e,t){var n,r,o=typeof t;return null==t||"boolean"===o?(0,C.A)(t):("number"===o?b.A:"string"===o?(n=(0,m.Ay)(t))?(t=n,g.Ay):x.A:t instanceof m.Ay?g.Ay:t instanceof Date?y:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?v:"function"!==typeof t.valueOf&&"function"!==typeof t.toString||isNaN(t)?w:b.A:A))(e,t)}function k(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function M(e){return+e}var E=[0,1];function R(e){return e}function P(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function I(e,t,n){var r=e[0],o=e[1],a=t[0],i=t[1];return o<r?(r=P(o,r),a=n(i,a)):(r=P(r,o),a=n(a,i)),function(e){return a(r(e))}}function D(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),a=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)o[i]=P(e[i],e[i+1]),a[i]=n(t[i],t[i+1]);return function(t){var n=h(e,t,1,r)-1;return a[n](o[n](t))}}function N(){var e,t,n,r,o,a,i=E,s=E,l=S,c=R;function u(){var e=Math.min(i.length,s.length);return c!==R&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(i[0],i[e-1])),r=e>2?D:I,o=a=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(i.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((a||(a=r(s,i.map(e),b.A)))(n)))},d.domain=function(e){return arguments.length?(i=Array.from(e,M),u()):i.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=k,u()},d.clamp=function(e){return arguments.length?(c=!!e||R,u()):c!==R},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function $(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var O,T=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _(e){if(!(t=T.exec(e)))throw new Error("invalid format: "+e);var t;return new j({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function j(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function F(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function L(e){return(e=F(Math.abs(e)))?e[1]:NaN}function V(e,t){var n=F(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}_.prototype=j.prototype,j.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const z={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>V(100*e,t),r:V,s:function(e,t){var n=F(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(O=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+F(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function H(e){return e}var B,G,W,U=Array.prototype.map,K=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function q(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?H:(t=U.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[i=(i+1)%t.length];return a.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?H:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(U.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"\u2212":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=_(e)).fill,n=e.align,d=e.sign,p=e.symbol,f=e.zero,h=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):z[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var b="$"===p?o:"#"===p&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===p?a:/[%p]/.test(y)?l:"",x=z[y],C=/[defgprs%]/.test(y);function A(e){var o,a,l,p=b,A=w;if("c"===y)A=x(e)+A,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0===+e&&"+"!==d&&(S=!1),p=(S?"("===d?d:c:"-"===d||"("===d?"":d)+p,A=("s"===y?K[8+O/3]:"")+A+(S&&"("===d?")":""),C)for(o=-1,a=e.length;++o<a;)if(48>(l=e.charCodeAt(o))||l>57){A=(46===l?i+e.slice(o+1):e.slice(o))+A,e=e.slice(0,o);break}}m&&!f&&(e=r(e,1/0));var k=p.length+e.length+A.length,M=k<h?new Array(h-k+1).join(t):"";switch(m&&f&&(e=r(M+e,M.length?h-A.length:1/0),M=""),n){case"<":e=p+e+A+M;break;case"=":e=p+M+e+A;break;case"^":e=M.slice(0,k=M.length>>1)+p+e+A+M.slice(k);break;default:e=M+p+e+A}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),A.toString=function(){return e+""},A}return{format:d,formatPrefix:function(e,t){var n=d(((e=_(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(L(t)/3))),o=Math.pow(10,-r),a=K[8+r/3];return function(e){return n(o*e)+a}}}}function Y(e,t,n,r){var o,a=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?s(t,e,n):s(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}(e,t,n);switch((r=_(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(L(t)/3)))-L(Math.abs(e)))}(a,i))||(r.precision=o),W(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,L(t)-L(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-L(Math.abs(e)))}(a))||(r.precision=o-2*("%"===r.type))}return G(r)}function X(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,a,s]=r?i(t,e,n):i(e,t,n);if(!(a>=o))return[];const l=a-o+1,c=new Array(l);if(r)if(s<0)for(let i=0;i<l;++i)c[i]=(a-i)/-s;else for(let i=0;i<l;++i)c[i]=(a-i)*s;else if(s<0)for(let i=0;i<l;++i)c[i]=(o+i)/-s;else for(let i=0;i<l;++i)c[i]=(o+i)*s;return c}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Y(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,a=t(),i=0,l=a.length-1,c=a[i],u=a[l],d=10;for(u<c&&(o=c,c=u,u=o,o=i,i=l,l=o);d-- >0;){if((o=s(c,u,n))===r)return a[i]=c,a[l]=u,t(a);if(o>0)c=Math.floor(c/o)*o,u=Math.ceil(u/o)*o;else{if(!(o<0))break;c=Math.ceil(c*o)/o,u=Math.floor(u*o)/o}r=o}return e},e}function Z(){var e=N()(R,R);return e.copy=function(){return t=e,Z().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},$.apply(e,arguments),X(e)}B=q({thousands:",",grouping:[3],currency:["$",""]}),G=B.format,W=B.formatPrefix},51084:(e,t,n)=>{"use strict";let r;function o(){if(!r)throw new Error("Monaco is undefined. Call setMonaco(monaco) first.");return r}function a(e,t,n){const r=new Map,o=e=>{if("*"===t)return!0;const n=e.getLanguageId();return Array.isArray(t)?t.includes(n):t===n},a=async t=>{const r=t.getVersionId(),a=await n.provideMarkerData(t);!t.isDisposed()&&r===t.getVersionId()&&o(t)&&e.editor.setModelMarkers(t,n.owner,a??[])},i=e=>{if(!o(e))return;let t;const n=e.onDidChangeContent((()=>{clearTimeout(t),t=setTimeout((()=>{a(e)}),500)}));r.set(e,{dispose(){clearTimeout(t),n.dispose()}}),a(e)},s=t=>{e.editor.setModelMarkers(t,n.owner,[]);const o=r.get(t);o&&(o.dispose(),r.delete(t))},l=e.editor.onDidCreateModel(i),c=e.editor.onWillDisposeModel((e=>{s(e),n.doReset?.(e)})),u=e.editor.onDidChangeModelLanguage((e=>{let{model:t}=e;s(t),i(t),n.doReset?.(t)}));for(const d of e.editor.getModels())i(d);return{dispose(){for(const e of r.keys())s(e);l.dispose(),c.dispose(),u.dispose()},async revalidate(){await Promise.all(e.editor.getModels().map(a))}}}function i(e){const{MarkerSeverity:t}=o();return e===t.Error?1:e===t.Warning?2:e===t.Info?3:4}function s(e){const{MarkerSeverity:t}=o();return 1===e?t.Error:2===e?t.Warning:3===e?t.Info:t.Hint}function l(e){return e}function c(e){return e}function u(e){return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function d(e){return{startLineNumber:e.start.line+1,startColumn:e.start.character+1,endLineNumber:e.end.line+1,endColumn:e.end.character+1}}function p(e){return{location:{range:u(e),uri:String(e.resource)},message:e.message}}function f(e){const{Uri:t}=o();return{...d(e.location.range),message:e.message,resource:t.parse(e.location.uri)}}function h(e){const t={message:e.message,range:u(e),severity:i(e.severity)};return"string"===typeof e.code?t.code=e.code:null!=e.code&&(t.code=e.code.value,t.codeDescription={href:String(e.code.target)}),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(p)),e.tags&&(t.tags=e.tags.map(l)),null!=e.source&&(t.source=e.source),t}function m(e,t){var n;const{MarkerSeverity:r,Uri:a}=o(),i={...d(e.range),message:e.message,severity:e.severity?s(e.severity):null!==(n=null===t||void 0===t?void 0:t.defaultSeverity)&&void 0!==n?n:r.Error};return null!=e.code&&(i.code=null==e.codeDescription?String(e.code):{value:String(e.code),target:a.parse(e.codeDescription.href)}),e.relatedInformation&&(i.relatedInformation=e.relatedInformation.map(f)),e.tags&&(i.tags=e.tags.map(c)),null!=e.source&&(i.source=e.source),i}function g(e){return{character:e.column-1,line:e.lineNumber-1}}function v(e){const{CompletionItemKind:t}=o().languages;return 1===e?t.Text:2===e?t.Method:3===e?t.Function:4===e?t.Constructor:5===e?t.Field:6===e?t.Variable:7===e?t.Class:8===e?t.Interface:9===e?t.Module:10===e?t.Property:11===e?t.Unit:12===e?t.Value:13===e?t.Enum:14===e?t.Keyword:15===e?t.Snippet:16===e?t.Color:17===e?t.File:18===e?t.Reference:19===e?t.Folder:20===e?t.EnumMember:21===e?t.Constant:22===e?t.Struct:23===e?t.Event:24===e?t.Operator:t.TypeParameter}function y(e){return e}function b(e){return{value:e.value}}function w(e){return{range:d(e.range),text:e.newText}}function x(e,t){var n,r,a,i,s;const{CompletionItemInsertTextRule:l,CompletionItemKind:c}=o().languages,u=null!==(n=t.itemDefaults)&&void 0!==n?n:{},p=null!==(r=e.textEdit)&&void 0!==r?r:u.editRange,f=null!==(a=e.commitCharacters)&&void 0!==a?a:u.commitCharacters,h=null!==(i=e.insertTextFormat)&&void 0!==i?i:u.insertTextFormat,m=null!==(s=e.insertTextMode)&&void 0!==s?s:u.insertTextMode;let g,x=e.insertText;var C;p?(g="range"in(C=p)?d(C.range):"insert"in C&&"replace"in C?{insert:d(C.insert),replace:d(C.replace)}:d(C),"newText"in p&&(x=p.newText)):g={...t.range};const A={insertText:null!==x&&void 0!==x?x:"",kind:null==e.kind?c.Text:v(e.kind),label:e.label,range:g};return e.additionalTextEdits&&(A.additionalTextEdits=e.additionalTextEdits.map(w)),e.command&&(A.command=function(e){const t={title:e.title,id:e.command};return e.arguments&&(t.arguments=e.arguments),t}(e.command)),f&&(A.commitCharacters=f),null!=e.detail&&(A.detail=e.detail),"string"===typeof e.documentation?A.documentation=e.documentation:e.documentation&&(A.documentation=b(e.documentation)),null!=e.filterText&&(A.filterText=e.filterText),2===h?A.insertTextRules=l.InsertAsSnippet:2===m&&(A.insertTextRules=l.KeepWhitespace),null!=e.preselect&&(A.preselect=e.preselect),null!=e.sortText&&(A.sortText=e.sortText),e.tags&&(A.tags=e.tags.map(y)),A}function C(e){const{Uri:t}=o(),n={range:d(e.targetRange),targetSelectionRange:d(e.targetSelectionRange),uri:t.parse(e.targetUri)};return e.originSelectionRange&&(n.originSelectionRange=d(e.originSelectionRange)),n}function A(e){return"string"===typeof e?{value:e}:{value:`\`\`\`${e.language}\n${e.value}\n\`\`\``}}function S(e){const{SymbolKind:t}=o().languages;return 1===e?t.File:2===e?t.Module:3===e?t.Namespace:4===e?t.Package:5===e?t.Class:6===e?t.Method:7===e?t.Property:8===e?t.Field:9===e?t.Constructor:10===e?t.Enum:11===e?t.Interface:12===e?t.Function:13===e?t.Variable:14===e?t.Constant:15===e?t.String:16===e?t.Number:17===e?t.Boolean:18===e?t.Array:19===e?t.Object:20===e?t.Key:21===e?t.Null:22===e?t.EnumMember:23===e?t.Struct:24===e?t.Event:25===e?t.Operator:t.TypeParameter}function k(e){return e}function M(e){var t,n,r;const o={detail:null!==(t=e.detail)&&void 0!==t?t:"",kind:S(e.kind),name:e.name,range:d(e.range),selectionRange:d(e.selectionRange),tags:null!==(r=null===(n=e.tags)||void 0===n?void 0:n.map(k))&&void 0!==r?r:[]};return e.children&&(o.children=e.children.map(M)),o}function E(e){return{range:d(e.range),text:e.newText}}function R(e){const{Uri:t}=o(),n={range:d(e.range)};return null!=e.tooltip&&(n.tooltip=e.tooltip),null!=e.target&&(n.url=t.parse(e.target)),n}function P(e){const{Uri:t}=o(),n="create"===e.kind?{newResource:t.parse(e.uri)}:"delete"===e.kind?{oldResource:t.parse(e.uri)}:{oldResource:t.parse(e.oldUri),newResource:t.parse(e.newUri)};return e.options&&(n.options=function(e){const t={};return null!=e.ignoreIfExists&&(t.ignoreIfExists=e.ignoreIfExists),null!=e.ignoreIfNotExists&&(t.ignoreIfNotExists=e.ignoreIfNotExists),null!=e.overwrite&&(t.overwrite=e.overwrite),null!=e.recursive&&(t.recursive=e.recursive),t}(e.options)),n}function I(e,t,n){const{Uri:r}=o();return{resource:r.parse(t),versionId:n,textEdit:E(e)}}function D(e,t){const n={title:e.title,isPreferred:e.isPreferred};return e.diagnostics&&(n.diagnostics=e.diagnostics.map((e=>m(e,t)))),e.disabled&&(n.disabled=e.disabled.reason),e.edit&&(n.edit=function(e){var t;const n=[];if(e.changes)for(const[r,o]of Object.entries(e.changes))for(const e of o)n.push(I(e,r));if(e.documentChanges)for(const r of e.documentChanges)if("textDocument"in r)for(const e of r.edits)n.push(I(e,r.textDocument.uri,null!==(t=r.textDocument.version)&&void 0!==t?t:void 0));else n.push(P(r));return{edits:n}}(e.edit)),null!=e.isPreferred&&(n.isPreferred=e.isPreferred),e.kind&&(n.kind=e.kind),n}function N(e){const t={start:e.startLine+1,end:e.endLine+1};return null!=e.kind&&(t.kind={value:e.kind}),t}function $(e){return{owner:"yaml",async provideMarkerData(t){const n=await e(t.uri),r=await n.doValidation(String(t.uri));return null==r?void 0:r.map((e=>m(e)))},async doReset(t){const n=await e(t.uri);await n.resetSchema(String(t.uri))}}}function O(e){return{triggerCharacters:[" ",":"],async provideCompletionItems(t,n){const r=t.uri,o=t.getWordUntilPosition(n),a=await e(r),i=await a.doComplete(String(r),g(n));if(i)return s=i,l={range:{startLineNumber:n.lineNumber,startColumn:o.startColumn,endLineNumber:n.lineNumber,endColumn:o.endColumn}},{incomplete:Boolean(s.isIncomplete),suggestions:s.items.map((e=>x(e,{range:l.range,itemDefaults:s.itemDefaults})))};var s,l}}}function T(e){return{async provideHover(t,n){const r=t.uri,o=await e(r),a=await o.doHover(String(r),g(n));if(a)return function(e){const t={contents:(n=e.contents,"string"===typeof n||"language"in n?[A(n)]:Array.isArray(n)?n.map(A):[b(n)])};var n;return e.range&&(t.range=d(e.range)),t}(a)}}}function _(e){return{async provideDocumentSymbols(t){const n=t.uri,r=await e(n),o=await r.findDocumentSymbols(String(n));return null==o?void 0:o.map(M)}}}function j(e){return{async provideDocumentFormattingEdits(t){const n=t.uri,r=await e(n),o=await r.format(String(n));return null==o?void 0:o.map(E)}}}function F(e){return{async provideLinks(t){const n=t.uri,r=await e(n),o=await r.findLinks(String(n));if(o)return{links:o.map(R)}}}}function L(e){return{async provideCodeActions(t,n,r){const o=t.uri,a=await e(o),i=await a.getCodeAction(String(o),u(n),function(e){const t={diagnostics:e.markers.map(h),triggerKind:e.trigger};return null!=e.only&&(t.only=[e.only]),t}(r));if(i)return{actions:i.map((e=>D(e))),dispose(){}}}}}function V(e){return{async provideFoldingRanges(t){const n=t.uri,r=await e(n),o=await r.getFoldingRanges(String(n));return null==o?void 0:o.map(N)}}}function z(e,t){const n={completion:!0,customTags:[],enableSchemaRequest:!1,format:!0,isKubernetes:!1,hover:!0,schemas:[],validate:!0,yamlVersion:"1.2",...t};!function(e){r=e}(e),e.languages.register({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml"]});const o=function(e,t){let n,{createData:r,interval:o=3e4,label:a,moduleId:i,stopWhenIdleFor:s=12e4}=t,l=0,c=!1;const u=()=>{n&&(n.dispose(),n=void 0)},d=setInterval((()=>{n&&Date.now()-l>s&&u()}),o);return{dispose(){c=!0,clearInterval(d),u()},getWorker(){if(c)throw new Error("Worker manager has been disposed");l=Date.now(),n||(n=e.editor.createWebWorker({createData:r,label:a,moduleId:i}));for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return n.withSyncedResources(o)},updateCreateData(e){r=e,u()}}}(e,{label:"yaml",moduleId:"monaco-yaml/yaml.worker",createData:n});let i=a(e,"yaml",$(o.getWorker));const s=[o,e.languages.registerCompletionItemProvider("yaml",O(o.getWorker)),e.languages.registerHoverProvider("yaml",T(o.getWorker)),e.languages.registerDefinitionProvider("yaml",(l=o.getWorker,{async provideDefinition(e,t){const n=e.uri,r=await l(n),o=await r.doDefinition(String(n),g(t));return null==o?void 0:o.map(C)}})),e.languages.registerDocumentSymbolProvider("yaml",_(o.getWorker)),e.languages.registerDocumentFormattingEditProvider("yaml",j(o.getWorker)),e.languages.registerLinkProvider("yaml",F(o.getWorker)),e.languages.registerCodeActionProvider("yaml",L(o.getWorker)),e.languages.registerFoldingRangeProvider("yaml",V(o.getWorker)),e.languages.setLanguageConfiguration("yaml",{comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.languages.IndentAction.Indent}}]})];var l;return{dispose(){for(const e of s)e.dispose()},update(t){o.updateCreateData(Object.assign(n,t)),i.dispose(),i=a(e,"yaml",$(o.getWorker))}}}n.d(t,{f:()=>z})},67011:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>Ln});var r={};n.r(r),n.d(r,{BOM:()=>dn,DOCUMENT:()=>pn,FLOW_END:()=>fn,SCALAR:()=>hn,createScalarToken:()=>Qt,isCollection:()=>mn,isScalar:()=>gn,prettyToken:()=>vn,resolveAsScalar:()=>Zt,setScalarValue:()=>Jt,stringify:()=>nn,tokenType:()=>yn,visit:()=>cn});var o={};n.r(o),n.d(o,{Alias:()=>F,CST:()=>r,Composer:()=>Xt,Document:()=>Ct,Lexer:()=>kn,LineCounter:()=>Mn,Pair:()=>me,Parser:()=>$n,Scalar:()=>z,Schema:()=>xt,YAMLError:()=>St,YAMLMap:()=>xe,YAMLParseError:()=>kt,YAMLSeq:()=>Ae,YAMLWarning:()=>Mt,isAlias:()=>p,isCollection:()=>y,isDocument:()=>f,isMap:()=>h,isNode:()=>b,isPair:()=>m,isScalar:()=>g,isSeq:()=>v,parse:()=>jn,parseAllDocuments:()=>Tn,parseDocument:()=>_n,stringify:()=>Fn,visit:()=>A,visitAsync:()=>k});const a=Symbol.for("yaml.alias"),i=Symbol.for("yaml.document"),s=Symbol.for("yaml.map"),l=Symbol.for("yaml.pair"),c=Symbol.for("yaml.scalar"),u=Symbol.for("yaml.seq"),d=Symbol.for("yaml.node.type"),p=e=>!!e&&"object"===typeof e&&e[d]===a,f=e=>!!e&&"object"===typeof e&&e[d]===i,h=e=>!!e&&"object"===typeof e&&e[d]===s,m=e=>!!e&&"object"===typeof e&&e[d]===l,g=e=>!!e&&"object"===typeof e&&e[d]===c,v=e=>!!e&&"object"===typeof e&&e[d]===u;function y(e){if(e&&"object"===typeof e)switch(e[d]){case s:case u:return!0}return!1}function b(e){if(e&&"object"===typeof e)switch(e[d]){case a:case s:case c:case u:return!0}return!1}const w=Symbol("break visit"),x=Symbol("skip children"),C=Symbol("remove node");function A(e,t){const n=E(t);if(f(e)){S(null,e.contents,n,Object.freeze([e]))===C&&(e.contents=null)}else S(null,e,n,Object.freeze([]))}function S(e,t,n,r){const o=R(e,t,n,r);if(b(o)||m(o))return P(e,r,o),S(e,o,n,r);if("symbol"!==typeof o)if(y(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const o=S(e,t.items[e],n,r);if("number"===typeof o)e=o-1;else{if(o===w)return w;o===C&&(t.items.splice(e,1),e-=1)}}}else if(m(t)){r=Object.freeze(r.concat(t));const e=S("key",t.key,n,r);if(e===w)return w;e===C&&(t.key=null);const o=S("value",t.value,n,r);if(o===w)return w;o===C&&(t.value=null)}return o}async function k(e,t){const n=E(t);if(f(e)){await M(null,e.contents,n,Object.freeze([e]))===C&&(e.contents=null)}else await M(null,e,n,Object.freeze([]))}async function M(e,t,n,r){const o=await R(e,t,n,r);if(b(o)||m(o))return P(e,r,o),M(e,o,n,r);if("symbol"!==typeof o)if(y(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){const o=await M(e,t.items[e],n,r);if("number"===typeof o)e=o-1;else{if(o===w)return w;o===C&&(t.items.splice(e,1),e-=1)}}}else if(m(t)){r=Object.freeze(r.concat(t));const e=await M("key",t.key,n,r);if(e===w)return w;e===C&&(t.key=null);const o=await M("value",t.value,n,r);if(o===w)return w;o===C&&(t.value=null)}return o}function E(e){return"object"===typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function R(e,t,n,r){return"function"===typeof n?n(e,t,r):h(t)?n.Map?.(e,t,r):v(t)?n.Seq?.(e,t,r):m(t)?n.Pair?.(e,t,r):g(t)?n.Scalar?.(e,t,r):p(t)?n.Alias?.(e,t,r):void 0}function P(e,t,n){const r=t[t.length-1];if(y(r))r.items[e]=n;else if(m(r))"key"===e?r.key=n:r.value=n;else{if(!f(r)){const e=p(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}r.contents=n}}A.BREAK=w,A.SKIP=x,A.REMOVE=C,k.BREAK=w,k.SKIP=x,k.REMOVE=C;const I={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};class D{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},D.defaultYaml,e),this.tags=Object.assign({},D.defaultTags,t)}clone(){const e=new D(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new D(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:D.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},D.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:D.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},D.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;return t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}const[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const o=this.tags[n];if(o)try{return o+decodeURIComponent(r)}catch(a){return t(String(a)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+e.substring(n.length).replace(/[!,[\]{}]/g,(e=>I[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let r;if(e&&n.length>0&&b(e.contents)){const t={};A(e.contents,((e,n)=>{b(n)&&n.tag&&(t[n.tag]=!0)})),r=Object.keys(t)}else r=[];for(const[o,a]of n)"!!"===o&&"tag:yaml.org,2002:"===a||e&&!r.some((e=>e.startsWith(a)))||t.push(`%TAG ${o} ${a}`);return t.join("\n")}}function N(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function $(e){const t=new Set;return A(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function O(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function T(e,t,n,r){if(r&&"object"===typeof r)if(Array.isArray(r))for(let o=0,a=r.length;o<a;++o){const t=r[o],n=T(e,r,String(o),t);void 0===n?delete r[o]:n!==t&&(r[o]=n)}else if(r instanceof Map)for(const o of Array.from(r.keys())){const t=r.get(o),n=T(e,r,o,t);void 0===n?r.delete(o):n!==t&&r.set(o,n)}else if(r instanceof Set)for(const o of Array.from(r)){const t=T(e,r,o,o);void 0===t?r.delete(o):t!==o&&(r.delete(o),r.add(t))}else for(const[o,a]of Object.entries(r)){const t=T(e,r,o,a);void 0===t?delete r[o]:t!==a&&(r[o]=t)}return e.call(t,n,r)}function _(e,t,n){if(Array.isArray(e))return e.map(((e,t)=>_(e,String(t),n)));if(e&&"function"===typeof e.toJSON){if(!n||(!g(r=e)&&!y(r)||!r.anchor))return e.toJSON(t,n);const o={aliasCount:0,count:1,res:void 0};n.anchors.set(e,o),n.onCreate=e=>{o.res=e,delete n.onCreate};const a=e.toJSON(t,n);return n.onCreate&&n.onCreate(a),a}var r;return"bigint"!==typeof e||n?.keep?e:Number(e)}D.defaultYaml={explicit:!1,version:"1.2"},D.defaultTags={"!!":"tag:yaml.org,2002:"};class j{constructor(e){Object.defineProperty(this,d,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e){let{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!f(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"===typeof n?n:100},i=_(this,"",a);if("function"===typeof r)for(const{count:s,res:l}of a.anchors.values())r(l,s);return"function"===typeof o?T(o,{"":i},"",i):i}}class F extends j{constructor(e){super(a),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return A(e,{Node:(e,n)=>{if(n===this)return A.BREAK;n.anchor===this.source&&(t=n)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:r,maxAliasCount:o}=t,a=this.resolve(r);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let i=n.get(a);if(i||(_(a,null,t),i=n.get(a)),!i||void 0===i.res){throw new ReferenceError("This should not happen: Alias anchor was not resolved?")}if(o>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=L(r,a,n)),i.count*i.aliasCount>o)){throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return i.res}toString(e,t,n){const r=`*${this.source}`;if(e){if(N(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${r} `}return r}}function L(e,t,n){if(p(t)){const r=t.resolve(e),o=n&&r&&n.get(r);return o?o.count*o.aliasCount:0}if(y(t)){let r=0;for(const o of t.items){const t=L(e,o,n);t>r&&(r=t)}return r}if(m(t)){const r=L(e,t.key,n),o=L(e,t.value,n);return Math.max(r,o)}return 1}const V=e=>!e||"function"!==typeof e&&"object"!==typeof e;class z extends j{constructor(e){super(c),this.value=e}toJSON(e,t){return t?.keep?this.value:_(this.value,e,t)}toString(){return String(this.value)}}z.BLOCK_FOLDED="BLOCK_FOLDED",z.BLOCK_LITERAL="BLOCK_LITERAL",z.PLAIN="PLAIN",z.QUOTE_DOUBLE="QUOTE_DOUBLE",z.QUOTE_SINGLE="QUOTE_SINGLE";function H(e,t,n){if(f(e)&&(e=e.contents),b(e))return e;if(m(e)){const t=n.schema[s].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!==typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:o,onTagObj:a,schema:i,sourceObjects:l}=n;let c;if(r&&e&&"object"===typeof e){if(c=l.get(e),c)return c.anchor||(c.anchor=o(e)),new F(c.anchor);c={anchor:null,node:null},l.set(e,c)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let d=function(e,t,n){if(t){const e=n.filter((e=>e.tag===t)),r=e.find((e=>!e.format))??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find((t=>t.identify?.(e)&&!t.format))}(e,t,i.tags);if(!d){if(e&&"function"===typeof e.toJSON&&(e=e.toJSON()),!e||"object"!==typeof e){const t=new z(e);return c&&(c.node=t),t}d=e instanceof Map?i[s]:Symbol.iterator in Object(e)?i[u]:i[s]}a&&(a(d),delete n.onTagObj);const p=d?.createNode?d.createNode(n.schema,e,n):"function"===typeof d?.nodeClass?.from?d.nodeClass.from(n.schema,e,n):new z(e);return t?p.tag=t:d.default||(p.tag=d.tag),c&&(c.node=p),p}function B(e,t,n){let r=n;for(let o=t.length-1;o>=0;--o){const e=t[o];if("number"===typeof e&&Number.isInteger(e)&&e>=0){const t=[];t[e]=r,r=t}else r=new Map([[e,r]])}return H(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const G=e=>null==e||"object"===typeof e&&!!e[Symbol.iterator]().next().done;class W extends j{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>b(t)||m(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(G(e))this.add(t);else{const[n,...r]=e,o=this.get(n,!0);if(y(o))o.addIn(r,t);else{if(void 0!==o||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,B(this.schema,r,t))}}}deleteIn(e){const[t,...n]=e;if(0===n.length)return this.delete(t);const r=this.get(t,!0);if(y(r))return r.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...r]=e,o=this.get(n,!0);return 0===r.length?!t&&g(o)?o.value:o:y(o)?o.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!m(t))return!1;const n=t.value;return null==n||e&&g(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn(e){const[t,...n]=e;if(0===n.length)return this.has(t);const r=this.get(t,!0);return!!y(r)&&r.hasIn(n)}setIn(e,t){const[n,...r]=e;if(0===r.length)this.set(n,t);else{const e=this.get(n,!0);if(y(e))e.setIn(r,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);this.set(n,B(this.schema,r,t))}}}}const U=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function K(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const q=(e,t,n)=>e.endsWith("\n")?K(n,t):n.includes("\n")?"\n"+K(n,t):(e.endsWith(" ")?"":" ")+n,Y="flow",X="block",Z="quoted";function Q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:a=20,onFold:i,onOverflow:s}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!o||o<0)return e;o<a&&(a=0);const l=Math.max(1+a,1+o-t.length);if(e.length<=l)return e;const c=[],u={};let d,p,f=o-t.length;"number"===typeof r&&(r>o-Math.max(2,a)?c.push(0):f=o-r);let h=!1,m=-1,g=-1,v=-1;n===X&&(m=J(e,m,t.length),-1!==m&&(f=m+l));for(let b;b=e[m+=1];){if(n===Z&&"\\"===b){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}v=m}if("\n"===b)n===X&&(m=J(e,m,t.length)),f=m+t.length+l,d=void 0;else{if(" "===b&&p&&" "!==p&&"\n"!==p&&"\t"!==p){const t=e[m+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(d=m)}if(m>=f)if(d)c.push(d),f=d+l,d=void 0;else if(n===Z){for(;" "===p||"\t"===p;)p=b,b=e[m+=1],h=!0;const t=m>v+1?m-2:g-1;if(u[t])return e;c.push(t),u[t]=!0,f=t+l,d=void 0}else h=!0}p=b}if(h&&s&&s(),0===c.length)return e;i&&i();let y=e.slice(0,c[0]);for(let b=0;b<c.length;++b){const r=c[b],o=c[b+1]||e.length;0===r?y=`\n${t}${e.slice(0,o)}`:(n===Z&&u[r]&&(y+=`${e[r]}\\`),y+=`\n${t}${e.slice(r+1,o)}`)}return y}function J(e,t,n){let r=t,o=t+1,a=e[o];for(;" "===a||"\t"===a;)if(t<o+n)a=e[++t];else{do{a=e[++t]}while(a&&"\n"!==a);r=t,o=t+1,a=e[o]}return r}const ee=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),te=e=>/^(%|---|\.\.\.)/m.test(e);function ne(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,o=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(te(e)?" ":"");let i="",s=0;for(let l=0,c=n[l];c;c=n[++l])if(" "===c&&"\\"===n[l+1]&&"n"===n[l+2]&&(i+=n.slice(s,l)+"\\ ",l+=1,s=l,c="\\"),"\\"===c)switch(n[l+1]){case"u":{i+=n.slice(s,l);const e=n.substr(l+2,4);switch(e){case"0000":i+="\\0";break;case"0007":i+="\\a";break;case"000b":i+="\\v";break;case"001b":i+="\\e";break;case"0085":i+="\\N";break;case"00a0":i+="\\_";break;case"2028":i+="\\L";break;case"2029":i+="\\P";break;default:"00"===e.substr(0,2)?i+="\\x"+e.substr(2):i+=n.substr(l,6)}l+=5,s=l+1}break;case"n":if(r||'"'===n[l+2]||n.length<o)l+=1;else{for(i+=n.slice(s,l)+"\n\n";"\\"===n[l+2]&&"n"===n[l+3]&&'"'!==n[l+4];)i+="\n",l+=2;i+=a," "===n[l+2]&&(i+="\\"),l+=1,s=l+1}break;default:l+=1}return i=s?i+n.slice(s):n,r?i:Q(i,a,Z,ee(t,!1))}function re(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ne(e,t);const n=t.indent||(te(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return t.implicitKey?r:Q(r,n,Y,ee(t,!1))}function oe(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=ne;else{const t=e.includes('"'),o=e.includes("'");r=t&&!o?re:o&&!t?ne:n?re:ne}return r(e,t)}let ae;try{ae=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{ae=/\n+(?!\n|$)/g}function ie(e,t,n,r){let{comment:o,type:a,value:i}=e;const{blockQuote:s,commentString:l,lineWidth:c}=t.options;if(!s||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return oe(i,t);const u=t.indent||(t.forceBlockIndent||te(i)?" ":""),d="literal"===s||"folded"!==s&&a!==z.BLOCK_FOLDED&&(a===z.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,o=e.length;if(o<=r)return!1;for(let a=0,i=0;a<o;++a)if("\n"===e[a]){if(a-i>r)return!0;if(i=a+1,o-i<=r)return!1}return!0}(i,c,u.length));if(!i)return d?"|\n":">\n";let p,f;for(f=i.length;f>0;--f){const e=i[f-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let h=i.substring(f);const m=h.indexOf("\n");-1===m?p="-":i===h||m!==h.length-1?(p="+",r&&r()):p="",h&&(i=i.slice(0,-h.length),"\n"===h[h.length-1]&&(h=h.slice(0,-1)),h=h.replace(ae,`$&${u}`));let g,v=!1,y=-1;for(g=0;g<i.length;++g){const e=i[g];if(" "===e)v=!0;else{if("\n"!==e)break;y=g}}let b=i.substring(0,y<g?y+1:g);b&&(i=i.substring(b.length),b=b.replace(/\n+/g,`$&${u}`));let w=(d?"|":">")+(v?u?"2":"1":"")+p;if(o&&(w+=" "+l(o.replace(/ ?[\r\n]+/g," ")),n&&n()),d)return i=i.replace(/\n+/g,`$&${u}`),`${w}\n${u}${b}${i}${h}`;i=i.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);return`${w}\n${u}${Q(`${b}${i}${h}`,u,X,ee(t,!0))}`}function se(e,t,n,r){const{implicitKey:o,inFlow:a}=t,i="string"===typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:s}=e;s!==z.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(i.value)&&(s=z.QUOTE_DOUBLE);const l=e=>{switch(e){case z.BLOCK_FOLDED:case z.BLOCK_LITERAL:return o||a?oe(i.value,t):ie(i,t,n,r);case z.QUOTE_DOUBLE:return ne(i.value,t);case z.QUOTE_SINGLE:return re(i.value,t);case z.PLAIN:return function(e,t,n,r){const{type:o,value:a}=e,{actualString:i,implicitKey:s,indent:l,indentStep:c,inFlow:u}=t;if(s&&a.includes("\n")||u&&/[[\]{},]/.test(a))return oe(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes("\n")?oe(a,t):ie(e,t,n,r);if(!s&&!u&&o!==z.PLAIN&&a.includes("\n"))return ie(e,t,n,r);if(te(a)){if(""===l)return t.forceBlockIndent=!0,ie(e,t,n,r);if(s&&l===c)return oe(a,t)}const d=a.replace(/\n+/g,`$&\n${l}`);if(i){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return oe(a,t)}return s?d:Q(d,l,Y,ee(t,!1))}(i,t,n,r);default:return null}};let c=l(s);if(null===c){const{defaultKeyType:e,defaultStringType:n}=t.options,r=o&&e||n;if(c=l(r),null===c)throw new Error(`Unsupported default string type ${r}`)}return c}function le(e,t){const n=Object.assign({blockQuote:!0,commentString:U,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:"number"===typeof n.indent?" ".repeat(n.indent):" ",inFlow:r,options:n}}function ce(e,t,n,r){if(m(e))return e.toString(t,n,r);if(p(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let o;const a=b(e)?e:t.doc.createNode(e,{onTagObj:e=>o=e});o||(o=function(e,t){if(t.tag){const n=e.filter((e=>e.tag===t.tag));if(n.length>0)return n.find((e=>e.format===t.format))??n[0]}let n,r;if(g(t)){r=t.value;const o=e.filter((e=>e.identify?.(r)));n=o.find((e=>e.format===t.format))??o.find((e=>!e.format))}else r=t,n=e.find((e=>e.nodeClass&&r instanceof e.nodeClass));if(!n)throw new Error(`Tag not resolved for ${r?.constructor?.name??typeof r} value`);return n}(t.doc.schema.tags,a));const i=function(e,t,n){let{anchors:r,doc:o}=n;if(!o.directives)return"";const a=[],i=(g(e)||y(e))&&e.anchor;i&&N(i)&&(r.add(i),a.push(`&${i}`));const s=e.tag?e.tag:t.default?null:t.tag;return s&&a.push(o.directives.tagString(s)),a.join(" ")}(a,o,t);i.length>0&&(t.indentAtStart=(t.indentAtStart??0)+i.length+1);const s="function"===typeof o.stringify?o.stringify(a,t,n,r):g(a)?se(a,t,n,r):a.toString(t,n,r);return i?g(a)||"{"===s[0]||"["===s[0]?`${i} ${s}`:`${i}\n${t.indent}${s}`:s}function ue(e,t){"debug"!==e&&"warn"!==e||("undefined"!==typeof process&&process.emitWarning?process.emitWarning(t):console.warn(t))}function de(e,t,n){let{key:r,value:o}=n;if(e?.doc.schema.merge&&pe(r))if(o=p(o)?o.resolve(e.doc):o,v(o))for(const a of o.items)fe(e,t,a);else if(Array.isArray(o))for(const a of o)fe(e,t,a);else fe(e,t,o);else{const n=_(r,"",e);if(t instanceof Map)t.set(n,_(o,n,e));else if(t instanceof Set)t.add(n);else{const a=function(e,t,n){if(null===t)return"";if("object"!==typeof t)return String(t);if(b(e)&&n?.doc){const t=le(n.doc,{});t.anchors=new Set;for(const e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+'..."'),ue(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}(r,n,e),i=_(o,a,e);a in t?Object.defineProperty(t,a,{value:i,writable:!0,enumerable:!0,configurable:!0}):t[a]=i}}return t}const pe=e=>"<<"===e||g(e)&&"<<"===e.value&&(!e.type||e.type===z.PLAIN);function fe(e,t,n){const r=e&&p(n)?n.resolve(e.doc):n;if(!h(r))throw new Error("Merge sources must be maps or map aliases");const o=r.toJSON(null,e,Map);for(const[a,i]of o)t instanceof Map?t.has(a)||t.set(a,i):t instanceof Set?t.add(a):Object.prototype.hasOwnProperty.call(t,a)||Object.defineProperty(t,a,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function he(e,t,n){const r=H(e,void 0,n),o=H(t,void 0,n);return new me(r,o)}class me{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Object.defineProperty(this,d,{value:l}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return b(t)&&(t=t.clone(e)),b(n)&&(n=n.clone(e)),new me(t,n)}toJSON(e,t){return de(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?function(e,t,n,r){let{key:o,value:a}=e;const{allNullValues:i,doc:s,indent:l,indentStep:c,options:{commentString:u,indentSeq:d,simpleKeys:p}}=t;let f=b(o)&&o.comment||null;if(p){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(y(o)||!b(o)&&"object"===typeof o)throw new Error("With simple keys, collection cannot be used as a key value")}let h=!p&&(!o||f&&null==a&&!t.inFlow||y(o)||(g(o)?o.type===z.BLOCK_FOLDED||o.type===z.BLOCK_LITERAL:"object"===typeof o));t=Object.assign({},t,{allNullValues:!1,implicitKey:!h&&(p||!i),indent:l+c});let m,w,x,C=!1,A=!1,S=ce(o,t,(()=>C=!0),(()=>A=!0));if(!h&&!t.inFlow&&S.length>1024){if(p)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(t.inFlow){if(i||null==a)return C&&n&&n(),""===S?"?":h?`? ${S}`:S}else if(i&&!p||null==a&&h)return S=`? ${S}`,f&&!C?S+=q(S,t.indent,u(f)):A&&r&&r(),S;C&&(f=null),h?(f&&(S+=q(S,t.indent,u(f))),S=`? ${S}\n${l}:`):(S=`${S}:`,f&&(S+=q(S,t.indent,u(f)))),b(a)?(m=!!a.spaceBefore,w=a.commentBefore,x=a.comment):(m=!1,w=null,x=null,a&&"object"===typeof a&&(a=s.createNode(a))),t.implicitKey=!1,h||f||!g(a)||(t.indentAtStart=S.length+1),A=!1,d||!(c.length>=2)||t.inFlow||h||!v(a)||a.flow||a.tag||a.anchor||(t.indent=t.indent.substring(2));let k=!1;const M=ce(a,t,(()=>k=!0),(()=>A=!0));let E=" ";if(f||m||w)E=m?"\n":"",w&&(E+=`\n${K(u(w),t.indent)}`),""!==M||t.inFlow?E+=`\n${t.indent}`:"\n"===E&&(E="\n\n");else if(!h&&y(a)){const e=M[0],n=M.indexOf("\n"),r=-1!==n,o=t.inFlow??a.flow??0===a.items.length;if(r||!o){let o=!1;if(r&&("&"===e||"!"===e)){let t=M.indexOf(" ");"&"===e&&-1!==t&&t<n&&"!"===M[t+1]&&(t=M.indexOf(" ",t+1)),(-1===t||n<t)&&(o=!0)}o||(E=`\n${t.indent}`)}}else""!==M&&"\n"!==M[0]||(E="");return S+=E+M,t.inFlow?k&&n&&n():x&&!k?S+=q(S,t.indent,u(x)):A&&r&&r(),S}(this,e,t,n):JSON.stringify(this)}}function ge(e,t,n){return(t.inFlow??e.flow?ye:ve)(e,t,n)}function ve(e,t,n){let{comment:r,items:o}=e,{blockItemPrefix:a,flowChars:i,itemIndent:s,onChompKeep:l,onComment:c}=n;const{indent:u,options:{commentString:d}}=t,p=Object.assign({},t,{indent:s,type:null});let f=!1;const h=[];for(let v=0;v<o.length;++v){const e=o[v];let n=null;if(b(e))!f&&e.spaceBefore&&h.push(""),be(t,h,e.commentBefore,f),e.comment&&(n=e.comment);else if(m(e)){const n=b(e.key)?e.key:null;n&&(!f&&n.spaceBefore&&h.push(""),be(t,h,n.commentBefore,f))}f=!1;let r=ce(e,p,(()=>n=null),(()=>f=!0));n&&(r+=q(r,s,d(n))),f&&n&&(f=!1),h.push(a+r)}let g;if(0===h.length)g=i.start+i.end;else{g=h[0];for(let e=1;e<h.length;++e){const t=h[e];g+=t?`\n${u}${t}`:"\n"}}return r?(g+="\n"+K(d(r),u),c&&c()):f&&l&&l(),g}function ye(e,t,n){let{items:r}=e,{flowChars:o,itemIndent:a}=n;const{indent:i,indentStep:s,flowCollectionPadding:l,options:{commentString:c}}=t;a+=s;const u=Object.assign({},t,{indent:a,inFlow:!0,type:null});let d=!1,p=0;const f=[];for(let v=0;v<r.length;++v){const e=r[v];let n=null;if(b(e))e.spaceBefore&&f.push(""),be(t,f,e.commentBefore,!1),e.comment&&(n=e.comment);else if(m(e)){const r=b(e.key)?e.key:null;r&&(r.spaceBefore&&f.push(""),be(t,f,r.commentBefore,!1),r.comment&&(d=!0));const o=b(e.value)?e.value:null;o?(o.comment&&(n=o.comment),o.commentBefore&&(d=!0)):null==e.value&&r?.comment&&(n=r.comment)}n&&(d=!0);let o=ce(e,u,(()=>n=null));v<r.length-1&&(o+=","),n&&(o+=q(o,a,c(n))),!d&&(f.length>p||o.includes("\n"))&&(d=!0),f.push(o),p=f.length}const{start:h,end:g}=o;if(0===f.length)return h+g;if(!d){const e=f.reduce(((e,t)=>e+t.length+2),2);d=t.options.lineWidth>0&&e>t.options.lineWidth}if(d){let e=h;for(const t of f)e+=t?`\n${s}${i}${t}`:"\n";return`${e}\n${i}${g}`}return`${h}${l}${f.join(" ")}${l}${g}`}function be(e,t,n,r){let{indent:o,options:{commentString:a}}=e;if(n&&r&&(n=n.replace(/^\n+/,"")),n){const e=K(a(n),o);t.push(e.trimStart())}}function we(e,t){const n=g(t)?t.value:t;for(const r of e)if(m(r)){if(r.key===t||r.key===n)return r;if(g(r.key)&&r.key.value===n)return r}}class xe extends W{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(s,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:o}=n,a=new this(e),i=(e,i)=>{if("function"===typeof o)i=o.call(t,e,i);else if(Array.isArray(o)&&!o.includes(e))return;(void 0!==i||r)&&a.items.push(he(e,i,n))};if(t instanceof Map)for(const[s,l]of t)i(s,l);else if(t&&"object"===typeof t)for(const s of Object.keys(t))i(s,t[s]);return"function"===typeof e.sortMapEntries&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=m(e)?e:e&&"object"===typeof e&&"key"in e?new me(e.key,e.value):new me(e,e?.value);const r=we(this.items,n.key),o=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${n.key} already set`);g(r.value)&&V(n.value)?r.value.value=n.value:r.value=n.value}else if(o){const e=this.items.findIndex((e=>o(n,e)<0));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=we(this.items,e);if(!t)return!1;return this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=we(this.items,e),r=n?.value;return(!t&&g(r)?r.value:r)??void 0}has(e){return!!we(this.items,e)}set(e,t){this.add(new me(e,t),!0)}toJSON(e,t,n){const r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(const o of this.items)de(t,r,o);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(const r of this.items)if(!m(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ge(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const Ce={collection:"map",default:!0,nodeClass:xe,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,n)=>xe.from(e,t,n)};class Ae extends W{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(u,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Se(e);if("number"!==typeof t)return!1;return this.items.splice(t,1).length>0}get(e,t){const n=Se(e);if("number"!==typeof n)return;const r=this.items[n];return!t&&g(r)?r.value:r}has(e){const t=Se(e);return"number"===typeof t&&t<this.items.length}set(e,t){const n=Se(e);if("number"!==typeof n)throw new Error(`Expected a valid index, not ${e}.`);const r=this.items[n];g(r)&&V(t)?r.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const o of this.items)n.push(_(o,String(r++),t));return n}toString(e,t,n){return e?ge(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:r}=n,o=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if("function"===typeof r){const n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}o.items.push(H(a,void 0,n))}}return o}}function Se(e){let t=g(e)?e.value:e;return t&&"string"===typeof t&&(t=Number(t)),"number"===typeof t&&Number.isInteger(t)&&t>=0?t:null}const ke={collection:"seq",default:!0,nodeClass:Ae,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(v(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,n)=>Ae.from(e,t,n)},Me={identify:e=>"string"===typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,r)=>se(e,t=Object.assign({actualString:!0},t),n,r)},Ee={identify:e=>null==e,createNode:()=>new z(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new z(null),stringify:(e,t)=>{let{source:n}=e;return"string"===typeof n&&Ee.test.test(n)?n:t.options.nullStr}},Re={identify:e=>"boolean"===typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new z("t"===e[0]||"T"===e[0]),stringify(e,t){let{source:n,value:r}=e;if(n&&Re.test.test(n)){if(r===("t"===n[0]||"T"===n[0]))return n}return r?t.options.trueStr:t.options.falseStr}};function Pe(e){let{format:t,minFractionDigits:n,tag:r,value:o}=e;if("bigint"===typeof o)return String(o);const a="number"===typeof o?o:Number(o);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let i=JSON.stringify(o);if(!t&&n&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(i)){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let t=n-(i.length-e-1);for(;t-- >0;)i+="0"}return i}const Ie={identify:e=>"number"===typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Pe},De={identify:e=>"number"===typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Pe(e)}},Ne={identify:e=>"number"===typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new z(parseFloat(e)),n=e.indexOf(".");return-1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:Pe},$e=e=>"bigint"===typeof e||Number.isInteger(e),Oe=(e,t,n,r)=>{let{intAsBigInt:o}=r;return o?BigInt(e):parseInt(e.substring(t),n)};function Te(e,t,n){const{value:r}=e;return $e(r)&&r>=0?n+r.toString(t):Pe(e)}const _e={identify:e=>$e(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Oe(e,2,8,n),stringify:e=>Te(e,8,"0o")},je={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Oe(e,0,10,n),stringify:Pe},Fe={identify:e=>$e(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Oe(e,2,16,n),stringify:e=>Te(e,16,"0x")},Le=[Ce,ke,Me,Ee,Re,_e,je,Fe,Ie,De,Ne];function Ve(e){return"bigint"===typeof e||Number.isInteger(e)}const ze=e=>{let{value:t}=e;return JSON.stringify(t)},He=[Ce,ke].concat([{identify:e=>"string"===typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:ze},{identify:e=>null==e,createNode:()=>new z(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ze},{identify:e=>"boolean"===typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>"true"===e,stringify:ze},{identify:Ve,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,n)=>{let{intAsBigInt:r}=n;return r?BigInt(e):parseInt(e,10)},stringify:e=>{let{value:t}=e;return Ve(t)?t.toString():JSON.stringify(t)}},{identify:e=>"number"===typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:ze}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),Be={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"===typeof Buffer)return Buffer.from(e,"base64");if("function"===typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify(e,t,n,r){let{comment:o,type:a,value:i}=e;const s=i;let l;if("function"===typeof Buffer)l=s instanceof Buffer?s.toString("base64"):Buffer.from(s.buffer).toString("base64");else{if("function"!==typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);l=btoa(e)}}if(a||(a=z.BLOCK_LITERAL),a!==z.QUOTE_DOUBLE){const e=Math.max(t.options.lineWidth-t.indent.length,t.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,o=0;t<n;++t,o+=e)r[t]=l.substr(o,e);l=r.join(a===z.BLOCK_LITERAL?"\n":" ")}return se({comment:o,type:a,value:l},t,n,r)}};function Ge(e,t){if(v(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!m(r)){if(h(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const e=r.items[0]||new me(new z(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){const t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=m(r)?r:new me(r)}}else t("Expected a sequence for this tag");return e}function We(e,t,n){const{replacer:r}=n,o=new Ae(e);o.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let i of t){let e,s;if("function"===typeof r&&(i=r.call(t,String(a++),i)),Array.isArray(i)){if(2!==i.length)throw new TypeError(`Expected [key, value] tuple: ${i}`);e=i[0],s=i[1]}else if(i&&i instanceof Object){const t=Object.keys(i);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);e=t[0],s=i[e]}else e=i;o.items.push(he(e,s,n))}return o}const Ue={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ge,createNode:We};class Ke extends Ae{constructor(){super(),this.add=xe.prototype.add.bind(this),this.delete=xe.prototype.delete.bind(this),this.get=xe.prototype.get.bind(this),this.has=xe.prototype.has.bind(this),this.set=xe.prototype.set.bind(this),this.tag=Ke.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t?.onCreate&&t.onCreate(n);for(const r of this.items){let e,o;if(m(r)?(e=_(r.key,"",t),o=_(r.value,e,t)):e=_(r,"",t),n.has(e))throw new Error("Ordered maps must not include duplicate keys");n.set(e,o)}return n}static from(e,t,n){const r=We(e,t,n),o=new this;return o.items=r.items,o}}Ke.tag="tag:yaml.org,2002:omap";const qe={collection:"seq",identify:e=>e instanceof Map,nodeClass:Ke,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Ge(e,t),r=[];for(const{key:o}of n.items)g(o)&&(r.includes(o.value)?t(`Ordered maps must not include duplicate keys: ${o.value}`):r.push(o.value));return Object.assign(new Ke,n)},createNode:(e,t,n)=>Ke.from(e,t,n)};function Ye(e,t){let{value:n,source:r}=e;return r&&(n?Xe:Ze).test.test(r)?r:n?t.options.trueStr:t.options.falseStr}const Xe={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new z(!0),stringify:Ye},Ze={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new z(!1),stringify:Ye},Qe={identify:e=>"number"===typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Pe},Je={identify:e=>"number"===typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Pe(e)}},et={identify:e=>"number"===typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new z(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){const r=e.substring(n+1).replace(/_/g,"");"0"===r[r.length-1]&&(t.minFractionDigits=r.length)}return t},stringify:Pe},tt=e=>"bigint"===typeof e||Number.isInteger(e);function nt(e,t,n,r){let{intAsBigInt:o}=r;const a=e[0];if("-"!==a&&"+"!==a||(t+=1),e=e.substring(t).replace(/_/g,""),o){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===a?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===a?-1*i:i}function rt(e,t,n){const{value:r}=e;if(tt(r)){const e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return Pe(e)}const ot={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>nt(e,2,2,n),stringify:e=>rt(e,2,"0b")},at={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>nt(e,1,8,n),stringify:e=>rt(e,8,"0")},it={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>nt(e,0,10,n),stringify:Pe},st={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>nt(e,2,16,n),stringify:e=>rt(e,16,"0x")};class lt extends xe{constructor(e){super(e),this.tag=lt.tag}add(e){let t;t=m(e)?e:e&&"object"===typeof e&&"key"in e&&"value"in e&&null===e.value?new me(e.key,null):new me(e,null);we(this.items,t.key)||this.items.push(t)}get(e,t){const n=we(this.items,e);return!t&&m(n)?g(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!==typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const n=we(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new me(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:r}=n,o=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)"function"===typeof r&&(a=r.call(t,a,a)),o.items.push(he(a,null,n));return o}}lt.tag="tag:yaml.org,2002:set";const ct={collection:"map",identify:e=>e instanceof Set,nodeClass:lt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>lt.from(e,t,n),resolve(e,t){if(h(e)){if(e.hasAllNullValues(!0))return Object.assign(new lt,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ut(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,o=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,"").split(":").reduce(((e,t)=>e*o(60)+o(t)),o(0));return"-"===n?o(-1)*a:a}function dt(e){let{value:t}=e,n=e=>e;if("bigint"===typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Pe(e);let r="";t<0&&(r="-",t*=n(-1));const o=n(60),a=[t%o];return t<60?a.unshift(0):(t=(t-a[0])/o,a.unshift(t%o),t>=60&&(t=(t-a[0])/o,a.unshift(t))),r+a.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const pt={identify:e=>"bigint"===typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,n)=>{let{intAsBigInt:r}=n;return ut(e,r)},stringify:dt},ft={identify:e=>"number"===typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ut(e,!1),stringify:dt},ht={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(ht.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,o,a,i,s]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(n,r-1,o,a||0,i||0,s||0,l);const u=t[8];if(u&&"Z"!==u){let e=ut(u,!1);Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:e=>{let{value:t}=e;return t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}},mt=[Ce,ke,Me,Ee,Xe,Ze,ot,at,it,st,Qe,Je,et,Be,qe,Ue,ct,pt,ft,ht],gt=new Map([["core",Le],["failsafe",[Ce,ke,Me]],["json",He],["yaml11",mt],["yaml-1.1",mt]]),vt={binary:Be,bool:Re,float:Ne,floatExp:De,floatNaN:Ie,floatTime:ft,int:je,intHex:Fe,intOct:_e,intTime:pt,map:Ce,null:Ee,omap:qe,pairs:Ue,seq:ke,set:ct,timestamp:ht},yt={"tag:yaml.org,2002:binary":Be,"tag:yaml.org,2002:omap":qe,"tag:yaml.org,2002:pairs":Ue,"tag:yaml.org,2002:set":ct,"tag:yaml.org,2002:timestamp":ht};function bt(e,t){let n=gt.get(t);if(!n){if(!Array.isArray(e)){const e=Array.from(gt.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}n=[]}if(Array.isArray(e))for(const r of e)n=n.concat(r);else"function"===typeof e&&(n=e(n.slice()));return n.map((e=>{if("string"!==typeof e)return e;const t=vt[e];if(t)return t;const n=Object.keys(vt).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag "${e}"; use one of ${n}`)}))}const wt=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class xt{constructor(e){let{compat:t,customTags:n,merge:r,resolveKnownTags:o,schema:a,sortMapEntries:i,toStringDefaults:l}=e;this.compat=Array.isArray(t)?bt(t,"compat"):t?bt(null,t):null,this.merge=!!r,this.name="string"===typeof a&&a||"core",this.knownTags=o?yt:{},this.tags=bt(n,this.name),this.toStringOptions=l??null,Object.defineProperty(this,s,{value:Ce}),Object.defineProperty(this,c,{value:Me}),Object.defineProperty(this,u,{value:ke}),this.sortMapEntries="function"===typeof i?i:!0===i?wt:null}clone(){const e=Object.create(xt.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class Ct{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,d,{value:i});let r=null;"function"===typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=o;let{version:a}=o;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new D({version:a}),this.setSchema(a,n),this.contents=void 0===e?null:this.createNode(e,r,n)}clone(){const e=Object.create(Ct.prototype,{[d]:{value:i}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=b(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){At(this.contents)&&this.contents.add(e)}addIn(e,t){At(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=$(this);e.anchor=!t||n.has(t)?O(t||"a",n):t}return new F(e.anchor)}createNode(e,t,n){let r;if("function"===typeof t)e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){const e=e=>"number"===typeof e||e instanceof String||e instanceof Number,n=t.filter(e).map(String);n.length>0&&(t=t.concat(n)),r=t}else void 0===n&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:a,flow:i,keepUndefined:s,onTagObj:l,tag:c}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:p}=function(e,t){const n=[],r=new Map;let o=null;return{onAnchor:r=>{n.push(r),o||(o=$(e));const a=O(t,o);return o.add(a),a},setAnchors:()=>{for(const e of n){const t=r.get(e);if("object"!==typeof t||!t.anchor||!g(t.node)&&!y(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:r}}(this,a||"a"),f=H(e,c,{aliasDuplicateObjects:o??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:l,replacer:r,schema:this.schema,sourceObjects:p});return i&&y(f)&&(f.flow=!0),d(),f}createPair(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.createNode(e,null,n),o=this.createNode(t,null,n);return new me(r,o)}delete(e){return!!At(this.contents)&&this.contents.delete(e)}deleteIn(e){return G(e)?null!=this.contents&&(this.contents=null,!0):!!At(this.contents)&&this.contents.deleteIn(e)}get(e,t){return y(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return G(e)?!t&&g(this.contents)?this.contents.value:this.contents:y(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!y(this.contents)&&this.contents.has(e)}hasIn(e){return G(e)?void 0!==this.contents:!!y(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=B(this.schema,[e],t):At(this.contents)&&this.contents.set(e,t)}setIn(e,t){G(e)?this.contents=t:null==this.contents?this.contents=B(this.schema,Array.from(e),t):At(this.contents)&&this.contents.setIn(e,t)}setSchema(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch("number"===typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new D({version:"1.1"}),t={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new D({version:e}),t={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,t=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(n.schema instanceof Object)this.schema=n.schema;else{if(!t)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new xt(Object.assign(t,n))}}toJS(){let{json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:o,reviver:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"===typeof r?r:100},s=_(this.contents,t??"",i);if("function"===typeof o)for(const{count:l,res:c}of i.anchors.values())o(c,l);return"function"===typeof a?T(a,{"":s},"",s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const n=[];let r=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const o=le(e,t),{commentString:a}=o.options;if(e.commentBefore){1!==n.length&&n.unshift("");const t=a(e.commentBefore);n.unshift(K(t,""))}let i=!1,s=null;if(e.contents){if(b(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const t=a(e.contents.commentBefore);n.push(K(t,""))}o.forceBlockIndent=!!e.comment,s=e.contents.comment}const t=s?void 0:()=>i=!0;let l=ce(e.contents,o,(()=>s=null),t);s&&(l+=q(l,"",a(s))),"|"!==l[0]&&">"!==l[0]||"---"!==n[n.length-1]?n.push(l):n[n.length-1]=`--- ${l}`}else n.push(ce(e.contents,o));if(e.directives?.docEnd)if(e.comment){const t=a(e.comment);t.includes("\n")?(n.push("..."),n.push(K(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&i&&(t=t.replace(/^\n+/,"")),t&&(i&&!s||""===n[n.length-1]||n.push(""),n.push(K(a(t),"")))}return n.join("\n")+"\n"}(this,e)}}function At(e){if(y(e))return!0;throw new Error("Expected a YAML collection as document contents")}class St extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}class kt extends St{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class Mt extends St{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const Et=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map((e=>t.linePos(e)));const{line:r,col:o}=n.linePos[0];n.message+=` at line ${r}, column ${o}`;let a=o-1,i=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(a>=60&&i.length>80){const e=Math.min(a-39,i.length-79);i="\u2026"+i.substring(e),a-=e-1}if(i.length>80&&(i=i.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(i.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"\u2026\n"),i=n+i}if(/[^ ]/.test(i)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>o&&(e=Math.max(1,Math.min(t.col-o,80-a)));const s=" ".repeat(a)+"^".repeat(e);n.message+=`:\n\n${i}\n${s}\n`}};function Rt(e,t){let{flow:n,indicator:r,next:o,offset:a,onError:i,parentIndent:s,startOnNewline:l}=t,c=!1,u=l,d=l,p="",f="",h=!1,m=!1,g=null,v=null,y=null,b=null,w=null,x=null,C=null;for(const k of e)switch(m&&("space"!==k.type&&"newline"!==k.type&&"comma"!==k.type&&i(k.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),g&&(u&&"comment"!==k.type&&"newline"!==k.type&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),k.type){case"space":n||"doc-start"===r&&"flow-collection"===o?.type||!k.source.includes("\t")||(g=k),d=!0;break;case"comment":{d||i(k,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=k.source.substring(1)||" ";p?p+=f+e:p=e,f="",u=!1;break}case"newline":u?p?p+=k.source:c=!0:f+=k.source,u=!0,h=!0,(v||y)&&(b=k),d=!0;break;case"anchor":v&&i(k,"MULTIPLE_ANCHORS","A node can have at most one anchor"),k.source.endsWith(":")&&i(k.offset+k.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=k,null===C&&(C=k.offset),u=!1,d=!1,m=!0;break;case"tag":y&&i(k,"MULTIPLE_TAGS","A node can have at most one tag"),y=k,null===C&&(C=k.offset),u=!1,d=!1,m=!0;break;case r:(v||y)&&i(k,"BAD_PROP_ORDER",`Anchors and tags must be after the ${k.source} indicator`),x&&i(k,"UNEXPECTED_TOKEN",`Unexpected ${k.source} in ${n??"collection"}`),x=k,u="seq-item-ind"===r||"explicit-key-ind"===r,d=!1;break;case"comma":if(n){w&&i(k,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),w=k,u=!1,d=!1;break}default:i(k,"UNEXPECTED_TOKEN",`Unexpected ${k.type} token`),u=!1,d=!1}const A=e[e.length-1],S=A?A.offset+A.source.length:a;return m&&o&&"space"!==o.type&&"newline"!==o.type&&"comma"!==o.type&&("scalar"!==o.type||""!==o.source)&&i(o.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(u&&g.indent<=s||"block-map"===o?.type||"block-seq"===o?.type)&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:x,spaceBefore:c,comment:p,hasNewline:h,anchor:v,tag:y,newlineAfterProp:b,end:S,start:C??S}}function Pt(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Pt(t.key)||Pt(t.value))return!0}return!1;default:return!0}}function It(e,t,n){if("flow-collection"===t?.type){const r=t.end[0];if(r.indent===e&&("]"===r.source||"}"===r.source)&&Pt(t)){n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}}function Dt(e,t,n){const{uniqueKeys:r}=e.options;if(!1===r)return!1;const o="function"===typeof r?r:(t,n)=>t===n||g(t)&&g(n)&&t.value===n.value&&!("<<"===t.value&&e.schema.merge);return t.some((e=>o(e.key,n)))}const Nt="All mapping items must start at the same column";function $t(e,t,n,r){let o="";if(e){let a=!1,i="";for(const s of e){const{source:e,type:l}=s;switch(l){case"space":a=!0;break;case"comment":{n&&!a&&r(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";o?o+=i+t:o=t,i="";break}case"newline":o&&(i+=e),a=!0;break;default:r(s,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:o,offset:t}}const Ot="Block collections are not allowed within flow collections",Tt=e=>e&&("block-map"===e.type||"block-seq"===e.type);function _t(e,t,n,r,o,a){const i="block-map"===n.type?function(e,t,n,r,o){let{composeNode:a,composeEmptyNode:i}=e;const s=new(o?.nodeClass??xe)(t.schema);t.atRoot&&(t.atRoot=!1);let l=n.offset,c=null;for(const u of n.items){const{start:e,key:o,sep:d,value:p}=u,f=Rt(e,{indicator:"explicit-key-ind",next:o??d?.[0],offset:l,onError:r,parentIndent:n.indent,startOnNewline:!0}),h=!f.found;if(h){if(o&&("block-seq"===o.type?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in o&&o.indent!==n.indent&&r(l,"BAD_INDENT",Nt)),!f.anchor&&!f.tag&&!d){c=f.end,f.comment&&(s.comment?s.comment+="\n"+f.comment:s.comment=f.comment);continue}(f.newlineAfterProp||Pt(o))&&r(o??e[e.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else f.found?.indent!==n.indent&&r(l,"BAD_INDENT",Nt);const m=f.end,g=o?a(t,o,f,r):i(t,m,e,null,f,r);t.schema.compat&&It(n.indent,o,r),Dt(t,s.items,g)&&r(m,"DUPLICATE_KEY","Map keys must be unique");const v=Rt(d??[],{indicator:"map-value-ind",next:p,offset:g.range[2],onError:r,parentIndent:n.indent,startOnNewline:!o||"block-scalar"===o.type});if(l=v.end,v.found){h&&("block-map"!==p?.type||v.hasNewline||r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&f.start<v.found.offset-1024&&r(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const e=p?a(t,p,v,r):i(t,l,d,null,v,r);t.schema.compat&&It(n.indent,p,r),l=e.range[2];const o=new me(g,e);t.options.keepSourceTokens&&(o.srcToken=u),s.items.push(o)}else{h&&r(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(g.comment?g.comment+="\n"+v.comment:g.comment=v.comment);const e=new me(g);t.options.keepSourceTokens&&(e.srcToken=u),s.items.push(e)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),s.range=[n.offset,l,c??l],s}(e,t,n,r,a):"block-seq"===n.type?function(e,t,n,r,o){let{composeNode:a,composeEmptyNode:i}=e;const s=new(o?.nodeClass??Ae)(t.schema);t.atRoot&&(t.atRoot=!1);let l=n.offset,c=null;for(const{start:u,value:d}of n.items){const e=Rt(u,{indicator:"seq-item-ind",next:d,offset:l,onError:r,parentIndent:n.indent,startOnNewline:!0});if(!e.found){if(!(e.anchor||e.tag||d)){c=e.end,e.comment&&(s.comment=e.comment);continue}d&&"block-seq"===d.type?r(e.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator")}const o=d?a(t,d,e,r):i(t,e.end,u,null,e,r);t.schema.compat&&It(n.indent,d,r),l=o.range[2],s.items.push(o)}return s.range=[n.offset,l,c??l],s}(e,t,n,r,a):function(e,t,n,r,o){let{composeNode:a,composeEmptyNode:i}=e;const s="{"===n.start.source,l=s?"flow map":"flow sequence",c=new(o?.nodeClass??(s?xe:Ae))(t.schema);c.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1);let d=n.offset+n.start.source.length;for(let v=0;v<n.items.length;++v){const e=n.items[v],{start:o,key:u,sep:p,value:f}=e,h=Rt(o,{flow:l,indicator:"explicit-key-ind",next:u??p?.[0],offset:d,onError:r,parentIndent:n.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!f){0===v&&h.comma?r(h.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):v<n.items.length-1&&r(h.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),h.comment&&(c.comment?c.comment+="\n"+h.comment:c.comment=h.comment),d=h.end;continue}!s&&t.options.strict&&Pt(u)&&r(u,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===v)h.comma&&r(h.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(h.comma||r(h.start,"MISSING_CHAR",`Missing , between ${l} items`),h.comment){let e="";e:for(const t of o)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=c.items[c.items.length-1];m(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(s||p||h.found){const m=h.end,g=u?a(t,u,h,r):i(t,m,o,null,h,r);Tt(u)&&r(g.range,"BLOCK_IN_FLOW",Ot);const v=Rt(p??[],{flow:l,indicator:"map-value-ind",next:f,offset:g.range[2],onError:r,parentIndent:n.indent,startOnNewline:!1});if(v.found){if(!s&&!h.found&&t.options.strict){if(p)for(const e of p){if(e===v.found)break;if("newline"===e.type){r(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}h.start<v.found.offset-1024&&r(v.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else f&&("source"in f&&f.source&&":"===f.source[0]?r(f,"MISSING_CHAR",`Missing space after : in ${l}`):r(v.start,"MISSING_CHAR",`Missing , or : between ${l} items`));const y=f?a(t,f,v,r):v.found?i(t,v.end,p,null,v,r):null;y?Tt(f)&&r(y.range,"BLOCK_IN_FLOW",Ot):v.comment&&(g.comment?g.comment+="\n"+v.comment:g.comment=v.comment);const b=new me(g,y);if(t.options.keepSourceTokens&&(b.srcToken=e),s){const e=c;Dt(t,e.items,g)&&r(m,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(b)}else{const e=new xe(t.schema);e.flow=!0,e.items.push(b);const n=(y??g).range;e.range=[g.range[0],n[1],n[2]],c.items.push(e)}d=y?y.range[2]:v.end}else{const e=f?a(t,f,h,r):i(t,h.end,p,null,h,r);c.items.push(e),d=e.range[2],Tt(f)&&r(e.range,"BLOCK_IN_FLOW",Ot)}}const p=s?"}":"]",[f,...h]=n.end;let g=d;if(f&&f.source===p)g=f.offset+f.source.length;else{const e=l[0].toUpperCase()+l.substring(1);r(d,u?"MISSING_CHAR":"BAD_INDENT",u?`${e} must end with a ${p}`:`${e} in block collection must be sufficiently indented and end with a ${p}`),f&&1!==f.source.length&&h.unshift(f)}if(h.length>0){const e=$t(h,g,t.options.strict,r);e.comment&&(c.comment?c.comment+="\n"+e.comment:c.comment=e.comment),c.range=[n.offset,g,e.offset]}else c.range=[n.offset,g,g];return c}(e,t,n,r,a),s=i.constructor;return"!"===o||o===s.tagName?(i.tag=s.tagName,i):(o&&(i.tag=o),i)}function jt(e,t,n){const r=t.offset,o=function(e,t,n){let{offset:r,props:o}=e;if("block-scalar-header"!==o[0].type)return n(o[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=o[0],i=a[0];let s=0,l="",c=-1;for(let f=1;f<a.length;++f){const e=a[f];if(l||"-"!==e&&"+"!==e){const t=Number(e);!s&&t?s=t:-1===c&&(c=r+f)}else l=e}-1!==c&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let u=!1,d="",p=a.length;for(let f=1;f<o.length;++f){const e=o[f];switch(e.type){case"space":u=!0;case"newline":p+=e.source.length;break;case"comment":if(t&&!u){n(e,"MISSING_CHAR","Comments must be separated from other tokens by white space characters")}p+=e.source.length,d=e.source.substring(1);break;case"error":n(e,"UNEXPECTED_TOKEN",e.message),p+=e.source.length;break;default:{n(e,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${e.type}`);const t=e.source;t&&"string"===typeof t&&(p+=t.length)}}}return{mode:i,indent:s,chomp:l,comment:d,length:p}}(t,e.options.strict,n);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};const a=">"===o.mode?z.BLOCK_FOLDED:z.BLOCK_LITERAL,i=t.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),o=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let a=1;a<t.length;a+=2)o.push([t[a],t[a+1]]);return o}(t.source):[];let s=i.length;for(let m=i.length-1;m>=0;--m){const e=i[m][1];if(""!==e&&"\r"!==e)break;s=m}if(0===s){const e="+"===o.chomp&&i.length>0?"\n".repeat(Math.max(1,i.length-1)):"";let n=r+o.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:o.comment,range:[r,n,n]}}let l=t.indent+o.indent,c=t.offset+o.length,u=0;for(let m=0;m<s;++m){const[t,r]=i[m];if(""!==r&&"\r"!==r){if(t.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(c+t.length,"MISSING_CHAR",e)}if(0===o.indent&&(l=t.length),u=m,0===l&&!e.atRoot){n(c,"BAD_INDENT","Block scalar values in collections must be indented")}break}0===o.indent&&t.length>l&&(l=t.length),c+=t.length+r.length+1}for(let m=i.length-1;m>=s;--m)i[m][0].length>l&&(s=m+1);let d="",p="",f=!1;for(let m=0;m<u;++m)d+=i[m][0].slice(l)+"\n";for(let m=u;m<s;++m){let[e,t]=i[m];c+=e.length+t.length+1;const r="\r"===t[t.length-1];if(r&&(t=t.slice(0,-1)),t&&e.length<l){const a=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;n(c-t.length-(r?2:1),"BAD_INDENT",a),e=""}a===z.BLOCK_LITERAL?(d+=p+e.slice(l)+t,p="\n"):e.length>l||"\t"===t[0]?(" "===p?p="\n":f||"\n"!==p||(p="\n\n"),d+=p+e.slice(l)+t,p="\n",f=!0):""===t?"\n"===p?d+="\n":p="\n":(d+=p+t,p=" ",f=!1)}switch(o.chomp){case"-":break;case"+":for(let e=s;e<i.length;++e)d+="\n"+i[e][0].slice(l);"\n"!==d[d.length-1]&&(d+="\n");break;default:d+="\n"}const h=r+o.length+t.source.length;return{value:d,type:a,comment:o.comment,range:[r,h,h]}}function Ft(e,t,n){const{offset:r,type:o,source:a,end:i}=e;let s,l;const c=(e,t,o)=>n(r+e,t,o);switch(o){case"scalar":s=z.PLAIN,l=function(e,t){let n="";switch(e[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`);return Lt(e)}(a,c);break;case"single-quoted-scalar":s=z.QUOTE_SINGLE,l=function(e,t){"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote");return Lt(e.slice(1,-1)).replace(/''/g,"'")}(a,c);break;case"double-quoted-scalar":s=z.QUOTE_DOUBLE,l=function(e,t){let n="";for(let r=1;r<e.length-1;++r){const o=e[r];if("\r"!==o||"\n"!==e[r+1])if("\n"===o){const{fold:t,offset:o}=Vt(e,r);n+=t,r=o}else if("\\"===o){let o=e[++r];const a=zt[o];if(a)n+=a;else if("\n"===o)for(o=e[r+1];" "===o||"\t"===o;)o=e[1+ ++r];else if("\r"===o&&"\n"===e[r+1])for(o=e[1+ ++r];" "===o||"\t"===o;)o=e[1+ ++r];else if("x"===o||"u"===o||"U"===o){const a={x:2,u:4,U:8}[o];n+=Ht(e,r+1,a,t),r+=a}else{const o=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),n+=o}}else if(" "===o||"\t"===o){const t=r;let a=e[r+1];for(;" "===a||"\t"===a;)a=e[1+ ++r];"\n"===a||"\r"===a&&"\n"===e[r+2]||(n+=r>t?e.slice(t,r+1):o)}else n+=o}'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote');return n}(a,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+a.length,r+a.length]}}const u=r+a.length,d=$t(i,u,t,n);return{value:l,type:s,comment:d.comment,range:[r,u,d.offset]}}function Lt(e){let t,n;try{t=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy"),n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let o=r[1],a=" ",i=t.lastIndex;for(n.lastIndex=i;r=n.exec(e);)""===r[1]?"\n"===a?o+=a:a="\n":(o+=a+r[1],a=" "),i=n.lastIndex;const s=/[ \t]*(.*)/sy;return s.lastIndex=i,r=s.exec(e),o+a+(r?.[1]??"")}function Vt(e,t){let n="",r=e[t+1];for(;(" "===r||"\t"===r||"\n"===r||"\r"===r)&&("\r"!==r||"\n"===e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const zt={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xa0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function Ht(e,t,n,r){const o=e.substr(t,n),a=o.length===n&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(a)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(a)}function Bt(e,t,n,r){const{value:o,type:a,comment:i,range:s}="block-scalar"===t.type?jt(e,t,r):Ft(t,e.options.strict,r),l=n?e.directives.tagName(n.source,(e=>r(n,"TAG_RESOLVE_FAILED",e))):null,u=n&&l?function(e,t,n,r,o){if("!"===n)return e[c];const a=[];for(const s of e.tags)if(!s.collection&&s.tag===n){if(!s.default||!s.test)return s;a.push(s)}for(const s of a)if(s.test?.test(t))return s;const i=e.knownTags[n];if(i&&!i.collection)return e.tags.push(Object.assign({},i,{default:!1,test:void 0})),i;return o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[c]}(e.schema,o,l,n,r):"scalar"===t.type?function(e,t,n,r){let{directives:o,schema:a}=e;const i=a.tags.find((e=>e.default&&e.test?.test(t)))||a[c];if(a.compat){const e=a.compat.find((e=>e.default&&e.test?.test(t)))??a[c];if(i.tag!==e.tag){r(n,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${o.tagString(i.tag)} or ${o.tagString(e.tag)}`,!0)}}return i}(e,o,t,r):e.schema[c];let d;try{const a=u.resolve(o,(e=>r(n??t,"TAG_RESOLVE_FAILED",e)),e.options);d=g(a)?a:new z(a)}catch(p){const e=p instanceof Error?p.message:String(p);r(n??t,"TAG_RESOLVE_FAILED",e),d=new z(o)}return d.range=s,d.source=o,a&&(d.type=a),l&&(d.tag=l),u.format&&(d.format=u.format),i&&(d.comment=i),d}function Gt(e,t,n){if(t){null===n&&(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e}const Wt={composeNode:Ut,composeEmptyNode:Kt};function Ut(e,t,n,r){const{spaceBefore:o,comment:a,anchor:i,tag:s}=n;let l,c=!0;switch(t.type){case"alias":l=function(e,t,n){let{options:r}=e,{offset:o,source:a,end:i}=t;const s=new F(a.substring(1));""===s.source&&n(o,"BAD_ALIAS","Alias cannot be an empty string");s.source.endsWith(":")&&n(o+a.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const l=o+a.length,c=$t(i,l,r.strict,n);s.range=[o,l,c.offset],c.comment&&(s.comment=c.comment);return s}(e,t,r),(i||s)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=Bt(e,t,s,r),i&&(l.anchor=i.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":l=function(e,t,n,r,o){const a=r.tag,i=a?t.directives.tagName(a.source,(e=>o(a,"TAG_RESOLVE_FAILED",e))):null;if("block-seq"===n.type){const{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&o(n,"MISSING_CHAR","Missing newline after block sequence props")}const s="block-map"===n.type?"map":"block-seq"===n.type?"seq":"{"===n.start.source?"map":"seq";if(!a||!i||"!"===i||i===xe.tagName&&"map"===s||i===Ae.tagName&&"seq"===s)return _t(e,t,n,o,i);let l=t.schema.tags.find((e=>e.tag===i&&e.collection===s));if(!l){const r=t.schema.knownTags[i];if(!r||r.collection!==s)return r?.collection?o(a,"BAD_COLLECTION_TYPE",`${r.tag} used for ${s} collection, but expects ${r.collection}`,!0):o(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,!0),_t(e,t,n,o,i);t.schema.tags.push(Object.assign({},r,{default:!1})),l=r}const c=_t(e,t,n,o,i,l),u=l.resolve?.(c,(e=>o(a,"TAG_RESOLVE_FAILED",e)),t.options)??c,d=b(u)?u:new z(u);return d.range=c.range,d.tag=i,l?.format&&(d.format=l.format),d}(Wt,e,t,n,r),i&&(l.anchor=i.source.substring(1));break;default:r(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),l=Kt(e,t.offset,void 0,null,n,r),c=!1}return i&&""===l.anchor&&r(i,"BAD_ALIAS","Anchor cannot be an empty string"),o&&(l.spaceBefore=!0),a&&("scalar"===t.type&&""===t.source?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&c&&(l.srcToken=t),l}function Kt(e,t,n,r,o,a){let{spaceBefore:i,comment:s,anchor:l,tag:c,end:u}=o;const d=Bt(e,{type:"scalar",offset:Gt(t,n,r),indent:-1,source:""},c,a);return l&&(d.anchor=l.source.substring(1),""===d.anchor&&a(l,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),s&&(d.comment=s,d.range[2]=u),d}function qt(e){if("number"===typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+("string"===typeof n?n.length:1)]}function Yt(e){let t="",n=!1,r=!1;for(let o=0;o<e.length;++o){const a=e[o];switch(a[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(a.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[o+1]?.[0]&&(o+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class Xt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{const o=qt(e);r?this.warnings.push(new Mt(o,t,n)):this.errors.push(new kt(o,t,n))},this.directives=new D({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=Yt(this.prelude);if(n){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!o)e.commentBefore=n;else if(y(o)&&!o.flow&&o.items.length>0){let e=o.items[0];m(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{const e=o.commentBefore;o.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Yt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}compose(e){var t=this;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return function*(){for(const n of e)yield*t.next(n);yield*t.end(n,r)}()}*next(e){switch(e.type){case"directive":this.directives.add(e.source,((t,n,r)=>{const o=qt(e);o[0]+=t,this.onError(o,"BAD_DIRECTIVE",n,r)})),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,n,r){let{offset:o,start:a,value:i,end:s}=n;const l=Object.assign({_directives:t},e),c=new Ct(void 0,l),u={atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=Rt(a,{indicator:"doc-start",next:i??s?.[0],offset:o,onError:r,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,!i||"block-map"!==i.type&&"block-seq"!==i.type||d.hasNewline||r(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?Ut(u,i,d,r):Kt(u,d.end,a,null,d,r);const p=c.contents.range[2],f=$t(s,p,!1,r);return f.comment&&(c.comment=f.comment),c.range=[o,p,f.offset],c}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new kt(qt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new kt(qt(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=$t(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new kt(qt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}end(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return function*(){if(e.doc)e.decorate(e.doc,!0),yield e.doc,e.doc=null;else if(t){const t=Object.assign({_directives:e.directives},e.options),r=new Ct(void 0,t);e.atDirectives&&e.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],e.decorate(r,!1),yield r}}()}}function Zt(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;if(e){const r=(e,t,r)=>{const o="number"===typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!n)throw new kt([o,o+1],t,r);n(o,t,r)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Ft(e,t,r);case"block-scalar":return jt({options:{strict:t}},e,r)}}return null}function Qt(e,t){const{implicitKey:n=!1,indent:r,inFlow:o=!1,offset:a=-1,type:i="PLAIN"}=t,s=se({type:i,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:r,source:"\n"}];switch(s[0]){case"|":case">":{const e=s.indexOf("\n"),t=s.substring(0,e),n=s.substring(e+1)+"\n",o=[{type:"block-scalar-header",offset:a,indent:r,source:t}];return en(o,l)||o.push({type:"newline",offset:-1,indent:r,source:"\n"}),{type:"block-scalar",offset:a,indent:r,props:o,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:r,source:s,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:r,source:s,end:l};default:return{type:"scalar",offset:a,indent:r,source:s,end:l}}}function Jt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{afterKey:r=!1,implicitKey:o=!1,inFlow:a=!1,type:i}=n,s="indent"in e?e.indent:null;if(r&&"number"===typeof s&&(s+=2),!i)switch(e.type){case"single-quoted-scalar":i="QUOTE_SINGLE";break;case"double-quoted-scalar":i="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");i=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:i="PLAIN"}const l=se({type:i,value:t},{implicitKey:o||null===s,indent:null!==s&&s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=t.substring(0,n),o=t.substring(n+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=r,e.source=o}else{const{offset:t}=e,n="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:t,indent:n,source:r}];en(a,"end"in e?e.end:void 0)||a.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const r of Object.keys(e))"type"!==r&&"offset"!==r&&delete e[r];Object.assign(e,{type:"block-scalar",indent:n,props:a,source:o})}}(e,l);break;case'"':tn(e,l,"double-quoted-scalar");break;case"'":tn(e,l,"single-quoted-scalar");break;default:tn(e,l,"scalar")}}function en(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function tn(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let o=t.length;"block-scalar-header"===e.props[0].type&&(o-=e.props[0].source.length);for(const e of r)e.offset+=o;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,o="end"in e&&Array.isArray(e.end)?e.end.filter((e=>"space"===e.type||"comment"===e.type||"newline"===e.type)):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:o})}}}const nn=e=>"type"in e?rn(e):on(e);function rn(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=rn(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=on(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=on(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=on(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function on(e){let{start:t,key:n,sep:r,value:o}=e,a="";for(const i of t)a+=i.source;if(n&&(a+=rn(n)),r)for(const i of r)a+=i.source;return o&&(a+=rn(o)),a}const an=Symbol("break visit"),sn=Symbol("skip children"),ln=Symbol("remove item");function cn(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),un(Object.freeze([]),e,t)}function un(e,t,n){let r=n(t,e);if("symbol"===typeof r)return r;for(const o of["key","value"]){const a=t[o];if(a&&"items"in a){for(let t=0;t<a.items.length;++t){const r=un(Object.freeze(e.concat([[o,t]])),a.items[t],n);if("number"===typeof r)t=r-1;else{if(r===an)return an;r===ln&&(a.items.splice(t,1),t-=1)}}"function"===typeof r&&"key"===o&&(r=r(t,e))}}return"function"===typeof r?r(t,e):r}cn.BREAK=an,cn.SKIP=sn,cn.REMOVE=ln,cn.itemAtPath=(e,t)=>{let n=e;for(const[r,o]of t){const e=n?.[r];if(!e||!("items"in e))return;n=e.items[o]}return n},cn.parentCollection=(e,t)=>{const n=cn.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],o=n?.[r];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};const dn="\ufeff",pn="\x02",fn="\x18",hn="\x1f",mn=e=>!!e&&"items"in e,gn=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function vn(e){switch(e){case dn:return"<BOM>";case pn:return"<DOC>";case fn:return"<FLOW_END>";case hn:return"<SCALAR>";default:return JSON.stringify(e)}}function yn(e){switch(e){case dn:return"byte-order-mark";case pn:return"doc-mode";case fn:return"flow-error-end";case hn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function bn(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const wn=new Set("0123456789ABCDEFabcdef"),xn=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Cn=new Set(",[]{}"),An=new Set(" ,[]{}\n\r\t"),Sn=e=>!e||An.has(e);class kn{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}lex(e){var t=this;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function*(){if(e){if("string"!==typeof e)throw TypeError("source is not a string");t.buffer=t.buffer?t.buffer+e:e,t.lineEndPos=null}t.atEnd=!n;let r=t.next??"stream";for(;r&&(n||t.hasChars(1));)r=yield*t.parseNext(r)}()}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){const t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"===t||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&bn(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!==typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===dn&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,n=e.indexOf("#");for(;-1!==n;){const r=e[n-1];if(" "===r||"\t"===r){t=n-1;break}n=e.indexOf("#",n+1)}for(;;){const n=e[t-1];if(" "!==n&&"\t"!==n)break;t-=1}const r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield pn,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&bn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!bn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&bn(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Sn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const r=this.getLine();if(null===r)return this.setNext("flow");if(-1!==n&&n<this.indentNext&&"#"!==r[0]||0===n&&(r.startsWith("---")||r.startsWith("..."))&&bn(r[3])){if(!(n===this.indentNext-1&&1===this.flowLevel&&("]"===r[0]||"}"===r[0])))return this.flowLevel=0,yield fn,yield*this.parseLineStart()}let o=0;for(;","===r[o];)o+=(yield*this.pushCount(1)),o+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(o+=(yield*this.pushIndicators()),r[o]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Sn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||bn(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2===0)break;t=this.buffer.indexOf('"',t+1)}const n=this.buffer.substring(0,t);let r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil((e=>bn(e)||"#"===e))}*parseBlockScalar(){let e,t=this.pos-1,n=0;e:for(let o=this.pos;e=this.buffer[o];++o)switch(e){case" ":n+=1;break;case"\n":t=o,n=0;break;case"\r":{const e=this.buffer[o+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let r=t+1;for(e=this.buffer[r];" "===e;)e=this.buffer[++r];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++r];t=r-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,r=this.buffer[e];"\r"===r&&(r=this.buffer[--e]);const o=e;for(;" "===r;)r=this.buffer[--e];if(!("\n"===r&&e>=this.pos&&e+1+n>o))break;t=e}return yield hn,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,n=this.pos-1,r=this.pos-1;for(;t=this.buffer[++r];)if(":"===t){const t=this.buffer[r+1];if(bn(t)||e&&Cn.has(t))break;n=r}else if(bn(t)){let o=this.buffer[r+1];if("\r"===t&&("\n"===o?(r+=1,t="\n",o=this.buffer[r+1]):n=r),"#"===o||e&&Cn.has(o))break;if("\n"===t){const e=this.continueScalar(r+1);if(-1===e)break;r=Math.max(r,e-2)}}else{if(e&&Cn.has(t))break;n=r}return t||this.atEnd?(yield hn,yield*this.pushToIndex(n+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Sn))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(bn(t)||e&&Cn.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!bn(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(xn.has(t))t=this.buffer[++e];else{if("%"!==t||!wn.has(this.buffer[e+1])||!wn.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do{t=this.buffer[++n]}while(" "===t||e&&"\t"===t);const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class Mn{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){const r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};return{line:t,col:e-this.lineStarts[t-1]+1}}}}function En(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Rn(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Pn(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function In(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Dn(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function Nn(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||En(t.start,"explicit-key-ind")||En(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,Pn(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class $n{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new kn,this.onNewLine=e}parse(e){var t=this;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function*(){t.onNewLine&&0===t.offset&&t.onNewLine(0);for(const r of t.lexer.lex(e,n))yield*t.next(r);n||(yield*t.end())}()}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=yn(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||e&&"doc-end"===e.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&Nn(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const n=e.items[e.items.length-1];if(n.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!n.sep)return Object.assign(n,{key:t,sep:[]}),void(this.onKeyLine=!n.explicitKey);n.value=t;break}case"block-seq":{const n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=e.items[e.items.length-1];return void(!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===Rn(n.start)&&(0===t.indent||n.start.every((e=>"comment"!==e.type||e.indent<t.indent)))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==Rn(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=Dn(In(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let o=[];if(r&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const o=t.sep[r];switch(o.type){case"newline":n.push(r);break;case"space":break;case"comment":o.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(o=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(r||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?r||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(En(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Pn(t.key)&&!En(t.sep,"newline")){const e=Dn(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(En(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=Dn(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:o,key:null,sep:[this.sourceToken]}):En(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(r||t.value?(e.items.push({start:o,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const t=this.startBlockValue(e);if(t)return n&&"block-seq"!==t.type&&e.items.push({start:o}),void this.stack.push(t)}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.type?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||En(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while(e&&"flow-collection"===e.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const n=Dn(In(t));Nn(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Dn(In(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Dn(In(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&(!(this.indent<=t)&&e.every((e=>"newline"===e.type||"space"===e.type)))}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function On(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new Mn||null,prettyErrors:t}}function Tn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{lineCounter:n,prettyErrors:r}=On(t),o=new $n(n?.addNewLine),a=new Xt(t),i=Array.from(a.compose(o.parse(e)));if(r&&n)for(const s of i)s.errors.forEach(Et(e,n)),s.warnings.forEach(Et(e,n));return i.length>0?i:Object.assign([],{empty:!0},a.streamInfo())}function _n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{lineCounter:n,prettyErrors:r}=On(t),o=new $n(n?.addNewLine),a=new Xt(t);let i=null;for(const s of a.compose(o.parse(e),!0,e.length))if(i){if("silent"!==i.options.logLevel){i.errors.push(new kt(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else i=s;return r&&n&&(i.errors.forEach(Et(e,n)),i.warnings.forEach(Et(e,n))),i}function jn(e,t,n){let r;"function"===typeof t?r=t:void 0===n&&t&&"object"===typeof t&&(n=t);const o=_n(e,n);if(!o)return null;if(o.warnings.forEach((e=>ue(o.options.logLevel,e))),o.errors.length>0){if("silent"!==o.options.logLevel)throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function Fn(e,t,n){let r=null;if("function"===typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t),"string"===typeof n&&(n=n.length),"number"===typeof n){const e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=n??t??{};if(!e)return}return new Ct(e,r,n).toString(n)}const Ln=o},75386:(e,t,n)=>{"use strict";function r(e,t){if(Object.is(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}n.d(t,{x:()=>r})},63837:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},72079:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}}]);
|