diff --git a/assets/main-BeMQKKHo.js b/assets/main-BeMQKKHo.js deleted file mode 100644 index 5b4e201..0000000 --- a/assets/main-BeMQKKHo.js +++ /dev/null @@ -1,1043 +0,0 @@ -var lv=Object.defineProperty;var av=(e,t,n)=>t in e?lv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Wo=(e,t,n)=>av(e,typeof t!="symbol"?t+"":t,n);function uv(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Bm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Om={exports:{}},jl={},Mm={exports:{}},Ce={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Zi=Symbol.for("react.element"),cv=Symbol.for("react.portal"),dv=Symbol.for("react.fragment"),fv=Symbol.for("react.strict_mode"),pv=Symbol.for("react.profiler"),mv=Symbol.for("react.provider"),hv=Symbol.for("react.context"),gv=Symbol.for("react.forward_ref"),vv=Symbol.for("react.suspense"),yv=Symbol.for("react.memo"),Sv=Symbol.for("react.lazy"),xf=Symbol.iterator;function xv(e){return e===null||typeof e!="object"?null:(e=xf&&e[xf]||e["@@iterator"],typeof e=="function"?e:null)}var Nm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$m=Object.assign,zm={};function Do(e,t,n){this.props=e,this.context=t,this.refs=zm,this.updater=n||Nm}Do.prototype.isReactComponent={};Do.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Do.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _m(){}_m.prototype=Do.prototype;function Yc(e,t,n){this.props=e,this.context=t,this.refs=zm,this.updater=n||Nm}var Xc=Yc.prototype=new _m;Xc.constructor=Yc;$m(Xc,Do.prototype);Xc.isPureReactComponent=!0;var wf=Array.isArray,Lm=Object.prototype.hasOwnProperty,Kc={current:null},Am={key:!0,ref:!0,__self:!0,__source:!0};function Fm(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Lm.call(t,r)&&!Am.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1{const t={...e};return C.jsx(Um.Provider,{value:t,children:e.children})},qc=()=>{const e=v.useContext(Um);if(!e)throw new Error("useCanvasContext must be used within a CanvasContextProvider");return e},Zc=v.createContext(null),Mv=({children:e})=>{const t=qc(),n=v.useRef(null),[r,o]=qe.useState(null);return v.useEffect(()=>{n.current&&o(n.current)},[n.current]),C.jsxs(C.Fragment,{children:[C.jsx("canvas",{ref:n,width:t==null?void 0:t.canvasSize.width,height:t==null?void 0:t.canvasSize.height}),r&&C.jsx(Zc.Provider,{value:r,children:e})]})},Nv=()=>{const e=v.useContext(Zc);if(!e)throw new Error("useCanvasRefContext must be used within a CanvasRefProvider");return e},jm=qe.createContext(null),$v=e=>{const t=e;return C.jsx(jm.Provider,{value:t,children:e.children})},zv=()=>{const e=qe.useContext(jm);if(!e)throw new Error("useGridContext must be used within a GridContextProvider");return e},Vm=qe.createContext(null),_v=e=>{const t=e;return C.jsx(Vm.Provider,{value:t,children:e.children})},Lv=()=>{const e=qe.useContext(Vm);if(!e)throw new Error("useViewportContext must be used within a ViewportContextProvider");return e},Gm=qe.createContext(null),Av=({children:e})=>{const[t,n]=v.useState(null);return v.useLayoutEffect(()=>((async()=>await async function(o){const i=async()=>{try{const s=await navigator.gpu.requestAdapter();if(!s)throw new Error("No appropriate GPUAdapter found.");const l=await s.requestDevice();return l.lost.then(async a=>{if(console.error(`WebGPU device was lost: ${a.message}: ${a.reason}`),a.reason!=="destroyed")return console.error("Trying to recreate the device..."),o(await i())}),l}catch{return console.error("Trying to recreate the device..."),await i()}};o(await i())}(o=>{if(!navigator.gpu)throw new Error("WebGPU not supported on this browser.");n(o)}))(),()=>{t==null||t.destroy()}),[]),t?C.jsx(Gm.Provider,{value:t,children:e}):null},Jc=()=>{const e=qe.useContext(Gm);if(e==null)throw new Error("useWebGPUDeviceContext must be used within a WebGPUDeviceContextProvider");return e},Wm=qe.createContext(null),Fv=({children:e})=>{const t=Jc(),n=qc(),r=v.useContext(Zc),[o,i]=qe.useState(null);return v.useEffect(()=>{if(!t)throw new Error("device is not configured.");if(!n)throw new Error("CanvasContext not found.");if(!r)throw new Error("CanvasRef not found.");const s=navigator.gpu.getPreferredCanvasFormat(),l=r.getContext("webgpu");if(!l)throw new Error("WebGPU not supported on this browser.");l.configure({device:t,format:s,alphaMode:"premultiplied"});const a=l.getCurrentTexture();return i({gpuCanvasContext:l,textureFormat:s,texture:a}),()=>{a==null||a.destroy()}},[t,n,r]),o&&C.jsx(Wm.Provider,{value:o,children:e})},Dv=()=>{const e=qe.useContext(Wm);if(!e)throw new Error("useWebGPUCanvasContext must be used within a WebGPUCanvasContextProvider");return e},Hm=2,sl=4,Ri=4,nr=3,lr=99999,Uv=(e,t,n)=>t.createBuffer({label:e,size:n,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST}),Cf=(e,t,n)=>t.createBuffer({label:e,size:n,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),Gs=(e,t,n)=>t.createBuffer({label:e,size:n,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),Ir=(e,t,n)=>{e.queue.writeBuffer(t,0,n),t.unmap()},Ym=8,jv=Ym*Ri,Vv=(e,t,n,r)=>(e[0]=n.numColumns,e[1]=n.numRows,e[2]=t.canvasSize.width,e[3]=t.canvasSize.height,e[4]=t.headerOffset.left,e[5]=t.headerOffset.top,e[6]=r.x,e[7]=r.y,e),Xm=6,Gv=Xm*sl,Wv=(e,t,n,r,o)=>(e[0]=t.numColumns,e[1]=t.numRows,e[2]=n.numColumnsToShow,e[3]=n.numRowsToShow,e[4]=r,e[5]=o,e),Hv=(e,t,n)=>Gs(e,t,n*4*Ri),Yv=`struct VertexOutput { - @builtin(position) position: vec4f, - @location(0) @interpolate(flat) isFocused: u32, - @location(1) @interpolate(flat) isSelected: u32, - @location(2) @interpolate(flat) rgba: vec4f, -}; -@group(0) @binding(5) var gridData: array; - -fn u32ToVec4f(value: u32) -> vec4 { - // Mask to isolate 8-bit segments - let mask: u32 = 0xFF; - - // Extract each 8-bit segment - let value0: f32 = f32((value >> 0) & mask); - let value1: f32 = f32((value >> 8) & mask); - let value2: f32 = f32((value >> 16) & mask); - let value3: f32 = f32((value >> 24) & mask); - - return vec4f(value0, value1, value2, value3); -} - -@vertex -fn vertexBody( - input: VertexInput -) -> VertexOutput { - let cellX: u32 = input.instanceIndex % u32uni.numColumnsToShow; - let cellY: u32 = input.instanceIndex / u32uni.numColumnsToShow; - let left = u32(viewports[u32uni.viewportIndex].x); - let top = u32(viewports[u32uni.viewportIndex].y); - let gridX: u32 = cellX + left; - let gridY: u32 = cellY + top; - let gridIndex = gridX + gridY * u32uni.gridSize.x; - let columnFocused = checkColumnFocused(gridX); - let rowFocused = checkRowFocused(gridY); - - var output: VertexOutput; - output.position = vec4f(transform(cellX, cellY, input.position), 0, 1); - output.isFocused = select(FALSE, TRUE, (!(columnFocused && rowFocused)) && (columnFocused || rowFocused)); - output.isSelected = select(FALSE, TRUE, checkSelected(gridX) || checkSelected(gridY)); - output.rgba = u32ToVec4f(gridData[gridIndex]) / 255.0; - return output; -} - -@fragment -fn fragmentBody(input: VertexOutput) -> @location(0) vec4f { - return input.rgba; -} -`,Xv=`const TRUE = 1u; -const FALSE = 0u; -override scrollBarRadius: f32 = 5.0; -override scrollBarMargin: f32 = 2.0; - -const rectVertices = array( - // X, Y, - // bottom right triangle (anti-clockwise) - // 0 left-bottom 1 right-bottom 2 right-top - vec2f(-1, -1), vec2f(1, -1), vec2f(1, 1), - // top left triangle (anti-clockwise) - // 3 left-bottom 4 right-top 5 left-top - vec2f(-1, -1), vec2f(1, 1), vec2f(-1, 1) -); - -/* -struct VertexOutput { - @builtin(position) position: vec4, - @location(0) texCoord: vec2, -} - -@vertex -fn main( - @builtin(vertex_index) VertexIndex : u32 -) -> VertexOutput { - var output : VertexOutput; - let x = f32((VertexIndex & 1) << 2); - let y = f32((VertexIndex & 2) << 1); - output.texCoord.x = x * 0.5; - output.texCoord.y = y * 0.5; - output.position = vec4(x - 1.0, y - 1.0, 0, 1); - return output; -} -*/ - -struct F32uni { - gridSize: vec2f, - canvasSize: vec2f, - header: vec2f, - overscroll: vec2f -}; -@group(0) @binding(0) var f32uni: F32uni; - -struct U32uni { - gridSize: vec2u, - numColumnsToShow: u32, - numRowsToShow: u32, - scrollBarState: u32, - viewportIndex: u32, -}; -@group(0) @binding(1) var u32uni: U32uni; -@group(0) @binding(2) var viewports: array; -@group(0) @binding(3) var focused: array; -@group(0) @binding(4) var selected: array; - -struct VertexInput { - @builtin(instance_index) instanceIndex: u32, - @builtin(vertex_index) vertexIndex: u32, - @location(0) position: vec2f, -}; -struct RectVertexInput { - @builtin(instance_index) instanceIndex: u32, - @builtin(vertex_index) vertexIndex: u32, -}; - -fn shapeToWorld(center: vec2f, scale: vec2f, position: vec2f) -> vec2f { - return center + (scale * position * vec2f(0.5, -0.5)); -} - -fn cellToWorld(cellX: u32, cellY: u32, position: vec2f) -> vec2f { - let cell = vec2f(f32(cellX), f32(cellY)); - return floor(viewports[u32uni.viewportIndex].xy) + (cell + (position * vec2f(0.5, -0.5) + 0.5) ); -} - -fn worldToViewport(world: vec2f) -> vec2f { - let viewportSize = viewports[u32uni.viewportIndex].zw - viewports[u32uni.viewportIndex].xy; - return (world - viewports[u32uni.viewportIndex].xy) / viewportSize; -} - -fn viewportToFrame(viewport: vec2f) -> vec2f { - return (f32uni.header * viewport + f32uni.canvasSize * (1 - viewport)) / f32uni.canvasSize; -} - -fn frameToCanvas(frame: vec2f) -> vec2f { - // return frame - ( f32uni.overscroll + f32uni.header) / f32uni.canvasSize; - return frame + ( f32uni.overscroll - f32uni.header) / f32uni.canvasSize; -} - -fn canvasToDimension(canvas: vec2f) -> vec2f { - return canvas * vec2f(-1, 1) + (1 - canvas) * vec2f(1, -1); -} - -fn transform(cellX: u32, cellY: u32, position: vec2f) -> vec2f { - let world = cellToWorld(cellX, cellY, position); // 0.0 - 1.0 - let viewport = worldToViewport(world); // 0.0 - 1.0 - let frame = viewportToFrame(viewport); // 0.0 - 1.0 - let canvas = frameToCanvas(frame); // 0.0 - 1.0 - // let dimension = canvasToDimension(world / f32uni.gridSize); // test 1 passed - // let dimension = canvasToDimension(viewport); // test 2 passed - // let dimension = canvasToDimension(frame); // test 3 passed - let dimension = canvasToDimension(canvas); - return dimension; -} - -fn transform2(center: vec2f, scale: vec2f, position: vec2f) -> vec2f { - let world = shapeToWorld(center, scale, position); // 0.0 - 1.0 - let viewport = worldToViewport(world); // 0.0 - 1.0 - let frame = viewportToFrame(viewport); // 0.0 - 1.0 - let canvas = frameToCanvas(frame); // 0.0 - 1.0 - let dimension = canvasToDimension(canvas); - return dimension; -} - -fn createPosition(instanceIndex: u32, position: vec2f) -> vec2f { - let cellX: u32 = instanceIndex % u32uni.numColumnsToShow; - let cellY: u32 = instanceIndex / u32uni.numColumnsToShow; - let left = u32(viewports[u32uni.viewportIndex].x); - let top = u32(viewports[u32uni.viewportIndex].y); - let gridX: u32 = cellX + left; - let gridY: u32 = cellY + top; - let gridIndex = gridX + gridY * u32uni.gridSize.x; - return transform(cellX, cellY, position); -} - - -@vertex -fn vertexLeftHeader(input: VertexInput) -> VertexOutput { - var output: VertexOutput; - let cellY: u32 = input.instanceIndex; - let top: u32 = u32(viewports[u32uni.viewportIndex].y); - let gridY: u32 = cellY + top; - let rowIndex: u32 = top + input.instanceIndex; - var transformed: vec2f = transform(0, cellY, input.position); - output.position = vec4f(transformed, 0.0, 1.0); - // output.vertexIndex = input.vertexIndex; - output.isFocused = select(FALSE, TRUE, checkRowFocused(rowIndex)); - output.isSelected = select(FALSE, TRUE, checkSelected(rowIndex)); - if(input.instanceIndex == 0){ - if(input.vertexIndex == 0u || input.vertexIndex == 3u || input.vertexIndex == 5u){ - output.position.x = -1.0; - }else{ - output.position.x = -1 + 2 * f32uni.header.x / f32uni.canvasSize.x; - } - if(input.vertexIndex == 2u || input.vertexIndex == 4u || input.vertexIndex == 5u){ - output.position.y = 1.0; - } - }else{ - if(input.vertexIndex == 0u || input.vertexIndex == 3u || input.vertexIndex == 5u){ - output.position.x = -1.0; - }else{ - output.position.x = -1 + 2 * f32uni.header.x / f32uni.canvasSize.x; - } - } - return output; -} - -@vertex -fn vertexTopHeader(input: VertexInput) -> VertexOutput { - var output: VertexOutput; - let cellX: u32 = input.instanceIndex; - let left: u32 = u32(viewports[u32uni.viewportIndex].x); - let gridX: u32 = cellX + left; - let colIndex = left + input.instanceIndex; - var transformed: vec2f = transform(cellX, 0, input.position); - output.position = vec4f(transformed, 0.0, 1.0); - // output.vertexIndex = input.vertexIndex; - output.isFocused = select(FALSE, TRUE, checkColumnFocused(colIndex)); - output.isSelected = select(FALSE, TRUE, checkSelected(colIndex)); - if(input.instanceIndex == 0){ - if(input.vertexIndex == 2u || input.vertexIndex == 3u || input.vertexIndex == 4u){ - output.position.y = 1.0; - //output.position.y = 1 - 2 * f32uni.header.y / f32uni.canvasSize.y; - }else{ - output.position.y = 1 - 2 * f32uni.header.y / f32uni.canvasSize.y; - } - if(input.vertexIndex == 0u || input.vertexIndex == 3u || input.vertexIndex == 5u){ - output.position.x = -1.0; - } - }else{ - if(input.vertexIndex == 2u || input.vertexIndex == 3u || input.vertexIndex == 4u){ - output.position.y = 1.0; - }else{ - output.position.y = 1 + -2 * f32uni.header.y / f32uni.canvasSize.y; - } - } - return output; -} - -@vertex -fn vertexColumnFocusSelect(input: VertexInput) -> VertexOutput{ - var output: VertexOutput; - let cellX: u32 = input.instanceIndex; - let left: u32 = u32(viewports[u32uni.viewportIndex].x); - let gridX: u32 = cellX + left; - let colIndex = left + input.instanceIndex; - var transformed: vec2f = transform(cellX, 0, input.position); - output.position = vec4f(transformed, 0.0, 1.0); - output.isFocused = select(FALSE, TRUE, checkColumnFocused(colIndex)); - output.isSelected = select(FALSE, TRUE, checkSelected(colIndex)); - - if(input.vertexIndex == 2u || input.vertexIndex == 4u || input.vertexIndex == 5u){ - output.position.y = 1.0; - } - if(input.vertexIndex == 0u || - input.vertexIndex == 1u || input.vertexIndex == 3u){ - output.position.y = -1.0; - } - return output; -} - -@vertex -fn vertexRowFocusSelect(input: VertexInput) -> VertexOutput{ - var output: VertexOutput; - let cellY: u32 = input.instanceIndex; - let top: u32 = u32(viewports[u32uni.viewportIndex].y); - let gridY: u32 = cellY + top; - let rowIndex: u32 = top + input.instanceIndex; - var transformed: vec2f = transform(0, cellY, input.position); - output.position = vec4f(transformed, 0.0, 1.0); - output.isFocused = select(FALSE, TRUE, checkRowFocused(rowIndex)); - output.isSelected = select(FALSE, TRUE, checkSelected(rowIndex)); - if(input.vertexIndex == 1u || input.vertexIndex == 2u || input.vertexIndex == 4u){ - output.position.x = 1.0; - } - if(input.vertexIndex == 0u || - input.vertexIndex == 3u || input.vertexIndex == 5u){ - output.position.x = -1.0; - } - return output; -} - -fn rectangleVertexPosition(vertexIndex: u32, left: f32, top: f32, right: f32, bottom: f32) -> vec4f { - switch(vertexIndex % 6){ - case 0, 3: { - return vec4f(left, bottom , 0, 1); - } - case 1: { - return vec4f(right, bottom, 0, 1); - } - case 2, 4: { - return vec4f(right, top, 0, 1); - } - case 5: { - return vec4f(left, top, 0, 1); - } - default: { - return vec4f(0, 0, 0, 1); - } - } -} - -@vertex -fn vertexScrollBarBackground(input: VertexInput) -> VertexOutput{ - var output: VertexOutput; - if(input.instanceIndex == 0){ // horizontal(bottom) - let left = -1.0 + 2 * f32uni.header.x / f32uni.canvasSize.x; - let right = 1.0; - let top = -1.0 + 2 * (scrollBarRadius * 2 + scrollBarMargin) / f32uni.canvasSize.y; - let bottom = -1.0 + 2 * scrollBarMargin / f32uni.canvasSize.y; - output.position = rectangleVertexPosition(input.vertexIndex, left, top, right, bottom); - output.isFocused = select(FALSE, TRUE, u32uni.scrollBarState == 1u || u32uni.scrollBarState == 3u); - }else{ //vertical - let left = 1.0 - 2 * (scrollBarRadius * 2 + scrollBarMargin) / f32uni.canvasSize.x; - let top = 1.0 - 2 * f32uni.header.y / f32uni.canvasSize.y; - let right = 1.0 - 2 * scrollBarMargin / f32uni.canvasSize.x; - let bottom = -1.0; - output.position = rectangleVertexPosition(input.vertexIndex, left, top, right, bottom); - output.isFocused = select(FALSE, TRUE, u32uni.scrollBarState == 2u || u32uni.scrollBarState == 3u); - } - return output; -} - -@vertex -fn vertexScrollBarBody(input: VertexInput) -> VertexOutput{ - var output: VertexOutput; - if(u32uni.scrollBarState == 99u){ - return output; - } - output.position = vec4f(input.position, 0.0, 1.0); - const baseIndex = 12; - const NUM_VERTICES_PER_POLYGON = 3; - if(input.instanceIndex == 0){ // horizontal scrollbar - output.isFocused = select(FALSE, TRUE, u32uni.scrollBarState == 1u || u32uni.scrollBarState == 3u); - let viewportLeft = viewports[u32uni.viewportIndex].x; - let viewportRight = viewports[u32uni.viewportIndex].z;//means right - let left: f32 = -1 + - 2 * ((f32uni.header.x - f32uni.overscroll.x + scrollBarRadius) / f32uni.canvasSize.x + - viewportLeft * - (f32uni.canvasSize.x - f32uni.header.x - scrollBarRadius * 2) / - f32uni.canvasSize.x / f32uni.gridSize.x); - let right: f32 = -1 + - 2 * ((f32uni.header.x - f32uni.overscroll.x + scrollBarRadius) / f32uni.canvasSize.x + - viewportRight * - (f32uni.canvasSize.x - f32uni.header.x - scrollBarRadius * 2) / - f32uni.canvasSize.x / f32uni.gridSize.x); - if(6 <= input.vertexIndex && input.vertexIndex < baseIndex){ - let top: f32 = -1 + 2 * (f32uni.overscroll.y + scrollBarMargin) / f32uni.canvasSize.y; - let bottom: f32 = -1 + 2 * (f32uni.overscroll.y + scrollBarMargin + scrollBarRadius * 2) / f32uni.canvasSize.y; - output.position = rectangleVertexPosition(input.vertexIndex - 6, left, top, right, bottom); - return output; - } else if(input.vertexIndex - baseIndex < 24 * 3){ - let horizontalLineCenter: f32 = -1 + 2 * (f32uni.overscroll.y + scrollBarMargin + scrollBarRadius) / f32uni.canvasSize.y; - let radius = 2 * scrollBarRadius / f32uni.canvasSize.y; - if(( input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 6) || (baseIndex + NUM_VERTICES_PER_POLYGON * 18 <= input.vertexIndex && input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 24)){ - let center = vec2f(right, horizontalLineCenter); - output.position = vec4f(input.position * radius + center, 0, 1); - }else if(baseIndex + NUM_VERTICES_PER_POLYGON * 6 <= input.vertexIndex && input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 18){ - let center = vec2f(left, horizontalLineCenter); - output.position = vec4f(input.position * radius + center, 0, 1); - } - return output; - } - - } else if(input.instanceIndex == 1){ // vertical scrollbar - output.isFocused = select(FALSE, TRUE, u32uni.scrollBarState == 2u || u32uni.scrollBarState == 3u); - let viewportTop = viewports[u32uni.viewportIndex].y; - let viewportBottom = viewports[u32uni.viewportIndex].w;//means bottom - let top: f32 = 1 - 2 * ((f32uni.header.y - f32uni.overscroll.y + scrollBarRadius) / f32uni.canvasSize.y + - viewportTop * - (f32uni.canvasSize.y - f32uni.header.y - scrollBarRadius * 2) / - f32uni.canvasSize.y / f32uni.gridSize.y); - let bottom: f32 = 1 - 2 * ((f32uni.header.y - f32uni.overscroll.y + scrollBarRadius) / f32uni.canvasSize.y + - viewportBottom * - (f32uni.canvasSize.y - f32uni.header.y- scrollBarRadius * 2) / f32uni.canvasSize.y / f32uni.gridSize.y); - - if(input.vertexIndex < baseIndex){ - let left:f32 = 1 - 2 * (scrollBarMargin + f32uni.overscroll.x) / f32uni.canvasSize.x; - let right:f32 = 1 - 2 * (scrollBarMargin + f32uni.overscroll.x + scrollBarRadius * 2) / f32uni.canvasSize.x; - output.position = rectangleVertexPosition(input.vertexIndex - 6, left, top, right, bottom); - return output; - } else { - let verticalLineCenter:f32 = 1 - 2 * (scrollBarMargin + f32uni.overscroll.x + scrollBarRadius) / f32uni.canvasSize.x; - let radius = 2 * scrollBarRadius / f32uni.canvasSize.x; - if(baseIndex <= input.vertexIndex && input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 12){ - let center = vec2f(verticalLineCenter, top); - output.position = vec4f(input.position * radius + center, 0, 1); - }else if(baseIndex + NUM_VERTICES_PER_POLYGON * 12 <= input.vertexIndex && input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 24){ - let center = vec2f(verticalLineCenter, bottom); - output.position = vec4f(input.position * radius + center, 0, 1); - } - return output; - } - } - return output; -} - - -@vertex -fn vertexViewportShadow(input: RectVertexInput) -> VertexOutput { - var output: VertexOutput; - if(u32uni.scrollBarState != 99u){ - return output; - } - let viewport: vec4f = viewports[input.instanceIndex]; - let left = viewport.x; - let top = viewport.y; - let right = viewport.z; - let bottom = viewport.w; - var rect: vec4f; - switch(u32(input.vertexIndex / 6)){ - case 1u: { - rect = vec4f(0, 0, f32uni.gridSize.x, top); - break; - } - case 2u: { - rect = vec4f(right, top, f32uni.gridSize.x, bottom); - break; - } - case 3u: { - rect = vec4f(0, bottom, f32uni.gridSize.x, f32uni.gridSize.y); - break; - } - case 4u: { - rect = vec4f(0, top, left, bottom); - break; - } - default: { - break; - } - } - let scale = vec2f(rect.z - rect.x, rect.w - rect.y); - let center = vec2f(rect.z + rect.x, rect.w + rect.y) / 2.0; - output.position = vec4f(transform2(center, scale, rectVertices[input.vertexIndex % 6]), 0.0, 1.0); - return output; -} - -// HSVからRGBへの変換を行う関数 -fn hsvToRgb(h: f32, s: f32, v: f32) -> vec3f { - if (s == 0.0) { - // If saturation is 0, the color is grayscale - return vec3f(v, v, v); - } else { - // Normalize hue to [0, 6) - var h_i: f32 = h * 6.0; - var i: u32 = u32(h_i) % 6; // Index for selecting calculation method - var f: f32 = h_i - f32(i); // Fractional part - - var p: f32 = v * (1.0 - s); - var q: f32 = v * (1.0 - (s * f)); - var t: f32 = v * (1.0 - (s * (1.0 - f))); - - // Calculate and return rgb based on i value - switch (i) { - case 0: { return vec3f(v, t, p);} - case 1: { return vec3f(q, v, p);} - case 2: { return vec3f(p, v, t);} - case 3: { return vec3f(p, q, v);} - case 4: { return vec3f(t, p, v);} - case 5: { return vec3f(v, p, q); } - default: { return vec3f(0.0, 0.0, 0.0);} // Should never reach here - } - } -} - -fn isTrue(value: u32) -> bool { - return value == 1u; -} - -fn isFalse(value: u32) -> bool { - return value == 0u; -} - -fn checkInfinity(value: f32) -> bool { - return value == value + 1.0 || value == value - 1.0; -} - -fn checkColumnFocused(columnIndex: u32) -> bool { - return focused[columnIndex] == 1u || focused[columnIndex] == 3u; -} -fn checkRowFocused(rowIndex: u32) -> bool { - return focused[rowIndex] == 2u || focused[rowIndex] == 3u; -} - -fn checkSelected(index: u32) -> bool { - return selected[index] == 1u; -} - -@fragment -fn fragmentLeftHeader(input: VertexOutput) -> @location(0) vec4f { - let focused = isTrue(input.isFocused); - let selected = isTrue(input.isSelected); - if(focused) { - if(selected){ - return vec4f(0.9, 0.9, 0.0, 1); - }else{ - return vec4f(0.7, 0.7, 0.7, 1); - } - }else{ - if(selected){ - return vec4f(0.8, 0.8, 0.6, 1); - }else{ - return vec4f(0.5, 0.5, 0.5, 1); - } - } -} - -@fragment -fn fragmentTopHeader(input: VertexOutput) -> @location(0) vec4f { - let focused = isTrue(input.isFocused); - let selected = isTrue(input.isSelected); - if(focused) { - if(selected){ - return vec4f(0.9, 0.9, 0.0, 1); - }else{ - return vec4f(0.7, 0.7, 0.7, 1); - } - }else{ - if(selected){ - return vec4f(0.8, 0.8, 0.6, 1); - }else{ - return vec4f(0.5, 0.5, 0.5, 1); - } - } -} - -@fragment -fn fragmentColumnFocusSelect(input: VertexOutput) -> @location(0) vec4f{ - let focused = isTrue(input.isFocused); - let selected = isTrue(input.isSelected); - if(focused) { - if(selected) { - return vec4f(0.9, 0.9, 0.6, 0.5); - }else{ - return vec4f(0.6, 0.6, 0.6, 0.5); - } - }else{ - if(selected) { - return vec4f(0.9, 0.9, 0.7, 0.5); - }else{ - return vec4f(1.0, 1.0, 1.0, 1.0); - } - } -} - -@fragment -fn fragmentRowFocusSelect(input: VertexOutput) -> @location(0) vec4f{ - let focused = isTrue(input.isFocused); - let selected = isTrue(input.isSelected); - if(focused) { - if(selected) { - return vec4f(0.9, 0.9, 0.6, 0.5); - }else{ - return vec4f(0.6, 0.6, 0.6, 0.5); - } - }else{ - if(selected) { - return vec4f(0.9, 0.9, 0.7, 0.5); - }else{ - return vec4f(1.0, 1.0, 1.0, 1.0); - } - } -} - -@fragment -fn fragmentScrollBarBackground(input: VertexOutput) -> @location(0) vec4f{ - if(isTrue(input.isFocused)){ - return vec4f(0.5, 0.5, 0.5, 0.6); - }else{ - return vec4f(0.8, 0.8, 0.8, 0.1); - } -} - -@fragment -fn fragmentScrollBarBody(input: VertexOutput) -> @location(0) vec4f{ - if(isTrue(input.isFocused)){ - return vec4f(0.1, 0.1, 0.1, 0.7); - }else{ - return vec4f(0.3, 0.3, 0.3, 0.6); - } -} - -@fragment -fn fragmentViewportShadow(input: VertexOutput) -> @location(0) vec4f { - return vec4f(0.1, 0.1, 0.1, 0.1); -}`,Kv=`struct VertexOutput { - @builtin(position) position: vec4f, - @location(0) @interpolate(flat) isFocused: u32, - @location(1) @interpolate(flat) isSelected: u32, - @location(2) @interpolate(flat) cellValue: f32, -}; - -@group(0) @binding(5) var gridData: array; - -@vertex -fn vertexBody( - input: VertexInput -) -> VertexOutput { - - let cellX: u32 = input.instanceIndex % u32uni.numColumnsToShow; - let cellY: u32 = input.instanceIndex / u32uni.numColumnsToShow; - let left = u32(viewports[u32uni.viewportIndex].x); - let top = u32(viewports[u32uni.viewportIndex].y); - let gridX: u32 = cellX + left; - let gridY: u32 = cellY + top; - let gridIndex = gridX + gridY * u32uni.gridSize.x; - let columnFocused = checkColumnFocused(gridX); - let rowFocused = checkRowFocused(gridY); - - var output: VertexOutput; - output.position = vec4f(transform(cellX, cellY, input.position), 0, 1); - output.isFocused = select(FALSE, TRUE, (!(columnFocused && rowFocused)) && (columnFocused || rowFocused)); - output.isSelected = select(FALSE, TRUE, checkSelected(gridX) || checkSelected(gridY)); - output.cellValue = gridData[gridIndex]; - return output; -} - -@fragment -fn fragmentBody(input: VertexOutput) -> @location(0) vec4f { - let isInfinity = select(FALSE, TRUE, checkInfinity(input.cellValue)); - if(isInfinity == TRUE) { - if(isTrue(input.isFocused)) { - if(isTrue(input.isSelected)) { - return vec4f(0.6, 0.6, 0.6, 0.9); - } else { - return vec4f(0.6, 0.6, 0.3, 0.9); - } - }else{ - if(isTrue(input.isSelected)) { - return vec4f(0.6, 0.3, 0.6, 0.9); - } else { - return vec4f(0.6, 0.3, 0.3, 0.9); - } - } - }else{ - if(isTrue(input.isFocused)) { - if(isTrue(input.isSelected)) { - let rgb = hsvToRgb(input.cellValue * 0.8, 0.5, 0.5); - return vec4f(rgb, 0.9); - } else { - let rgb = hsvToRgb(input.cellValue * 0.8, 1.0, 0.5); - return vec4f(rgb, 0.9); - } - } else { - if(isTrue(input.isSelected)) { - let rgb = hsvToRgb(input.cellValue * 0.8, 0.5, 1.0); - return vec4f(rgb, 0.9); - } else { - let rgb = hsvToRgb(input.cellValue * 0.8, 1.0, 1.0); - return vec4f(rgb, 0.9); - } - } - } -} -`,Qv=`override Inf: u32 = 99999; -struct VertexOutput { - @builtin(position) position: vec4f, - @location(0) @interpolate(flat) isFocused: u32, - @location(1) @interpolate(flat) isSelected: u32, - @location(2) @interpolate(flat) cellValue: u32, -}; - -@group(0) @binding(5) var gridData: array; - -@vertex -fn vertexBody( - input: VertexInput -) -> VertexOutput { - - let cellX: u32 = input.instanceIndex % u32uni.numColumnsToShow; - let cellY: u32 = input.instanceIndex / u32uni.numColumnsToShow; - let left = u32(viewports[u32uni.viewportIndex].x); - let top = u32(viewports[u32uni.viewportIndex].y); - let gridX: u32 = cellX + left; - let gridY: u32 = cellY + top; - let gridIndex = gridX + gridY * u32uni.gridSize.x; - let columnFocused = checkColumnFocused(gridX); - let rowFocused = checkRowFocused(gridY); - - var output: VertexOutput; - output.position = vec4f(transform(cellX, cellY, input.position), 0, 1); - output.isFocused = select(FALSE, TRUE, (!(columnFocused && rowFocused)) && (columnFocused || rowFocused)); - output.isSelected = select(FALSE, TRUE, checkSelected(gridX) || checkSelected(gridY)); - output.cellValue = gridData[gridIndex]; - return output; -} - -@fragment -fn fragmentBody(input: VertexOutput) -> @location(0) vec4f { - let s = select(1, 0.5, isTrue(input.isFocused)); - let v = select(1, 0.5, isTrue(input.isSelected)); - if(input.cellValue == Inf){ - let rgb = hsvToRgb(1.0, 0.0, 1.0); - return vec4f(rgb, 1.0); - } - let rgb = hsvToRgb(f32(input.cellValue) / 255, 0.9, 0.9); - return vec4f(rgb, 1.0); -} -`,Km=[-1,-1,1,-1,1,1,-1,-1,1,1,-1,1],qv=Km.map(e=>e*.95),pi=24,Pr=new Array(pi*nr*Hm);[...Array(pi).keys()].forEach(e=>{const t=Math.PI*2/pi*e,n=Math.PI*2/pi*(e+1),r=.95;let o=e*nr*Hm;Pr[o++]=0,Pr[o++]=0,Pr[o++]=Math.cos(n)*r,Pr[o++]=Math.sin(n)*r,Pr[o++]=Math.cos(t)*r,Pr[o++]=Math.sin(t)*r});const Qm=[...qv,...Km,...Pr],Zv=Qm.length*Ri,Ws=0,Nu=6,Jv=6,io={BODY:0,TOP_HEADER:1,LEFT_HEADER:2,SCROLLBAR_BACKGROUND:3,SCROLLBAR_BODY:4,VIEWPORT_SHADOW:5},fs=0,so=4,Ef=[2*nr,fs,Ws,0,2*nr,fs,Ws,0,2*nr,fs,Ws,0,2*nr,2,Nu,0,(2+pi)*nr,2,Jv,0,4*2*nr,fs,Nu,0],Zn=new Map(Array.from(Object.entries(io),([e,t])=>[e,t*so*sl])),ps=1,ey=2,ty=(e,t,n,r,o,i)=>{const s=Math.min((t.width-n.left)/r,(t.height-n.top)/o)<20?Nu:Ws;e[io.BODY*so+ps]=r*o,e[io.BODY*so+ey]=s,e[io.TOP_HEADER*so+ps]=r,e[io.LEFT_HEADER*so+ps]=o,e[io.VIEWPORT_SHADOW*so+ps]=i},ny={label:"Grid bindGroupLayout",entries:[{binding:0,visibility:GPUShaderStage.VERTEX,buffer:{type:"uniform"}},{binding:1,visibility:GPUShaderStage.VERTEX,buffer:{type:"uniform"}},{binding:2,visibility:GPUShaderStage.VERTEX,buffer:{type:"read-only-storage"}},{binding:3,visibility:GPUShaderStage.VERTEX,buffer:{type:"read-only-storage"}},{binding:4,visibility:GPUShaderStage.VERTEX,buffer:{type:"read-only-storage"}},{binding:5,visibility:GPUShaderStage.VERTEX|GPUShaderStage.COMPUTE,buffer:{type:"read-only-storage"}}]},$u=5,zu=2,kf=.8,Rf=.95;var cr=(e=>(e.HUE="HUE",e.RGBA="RGBA",e.CUSTOM="CUSTOM",e))(cr||{});class ry{constructor(t,n,r,o,i,s,l,a){var E,R;this.device=n,this.textureFormat=r,this.gpuCanvasContext=o,this.canvasContext=i;const u=n.createShaderModule({label:"Grid shader",code:Xv+(t===cr.HUE?Kv:t===cr.RGBA?Yv:Qv)}),d=n.createBindGroupLayout(ny),f=n.createPipelineLayout({label:"Grid renderer pipeline layout",bindGroupLayouts:[d]});this.canvasContext=i;const m=(T,g,I,z,F)=>{const $=i.multisample?{multisample:{count:i.multisample}}:{};return g.createRenderPipeline({label:T,layout:f,...$,vertex:{module:u,entryPoint:I,...F,buffers:[{arrayStride:8,attributes:[{format:"float32x2",offset:0,shaderLocation:0}]}]},fragment:{module:u,entryPoint:z,targets:[{format:r,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}}}]}})},x=m("columnFocusSelect",n,"vertexColumnFocusSelect","fragmentColumnFocusSelect"),S=m("rowFocusSelect",n,"vertexRowFocusSelect","fragmentRowFocusSelect"),y=m("body",n,"vertexBody","fragmentBody"),b=m("viewportShadow",n,"vertexViewportShadow","fragmentViewportShadow"),p=m("leftHeader",n,"vertexLeftHeader","fragmentLeftHeader"),h=m("topHeader",n,"vertexTopHeader","fragmentTopHeader"),c=m("scrollBarBackground",n,"vertexScrollBarBackground","fragmentScrollBarBackground"),w=m("scrollBarBody",n,"vertexScrollBarBody","fragmentScrollBarBody",{constants:{scrollBarRadius:((E=i.scrollBar)==null?void 0:E.radius)||$u,scrollBarMargin:((R=i.scrollBar)==null?void 0:R.margin)||zu}});this.drawIndirectBufferSource=new Uint32Array(Ef),this.u32UniformBufferSource=new Uint32Array(Xm),this.f32UniformBufferSource=new Float32Array(Ym),this.vertexBuffer=Uv("Vertices",n,Zv),Ir(this.device,this.vertexBuffer,new Float32Array(Qm)),this.drawIndirectBuffer=n.createBuffer({label:"DrawIndirect",size:Ef.length*sl,usage:GPUBufferUsage.INDIRECT|GPUBufferUsage.COPY_DST}),this.updateDrawIndirectBuffer(1,1,a),this.f32UniformBuffer=Cf("F32Uniforms",n,jv),this.u32UniformBuffer=Cf("U32Uniforms",n,Gv),this.viewportStateStorage=Hv("ViewportBuffer",n,a);const k=Math.max(l.numColumns,l.numRows)*Ri;this.focusedStateStorage=Gs("FocusedStateBuffer",n,k),this.selectedStateStorage=Gs("SelectedStateBuffer",n,k),this.gridDataBufferStorage=Gs("GridDataBuffer",n,l.numColumns*l.numRows*(t===cr.RGBA?sl:Ri)),this.bindGroup=this.createBindGroup("Grid BindGroup",d,this.f32UniformBuffer,this.u32UniformBuffer,this.viewportStateStorage,this.focusedStateStorage,this.selectedStateStorage,this.gridDataBufferStorage),this.columnFocusRenderBundle=this.createColumnFocusRenderBundle(x),this.rowFocusRenderBundle=this.createRowFocusRenderBundle(S),this.bodyRenderBundle=this.createBodyRenderBundle(y),this.viewportShadowRenderBundle=this.createViewportShadowRenderBundle(b),this.topHeaderRenderBundle=this.createTopHeaderRenderBundle(h),this.leftHeaderRenderBundle=this.createLeftHeaderRenderBundle(p),this.scrollBarBodyRenderBundle=this.createScrollBarBodyRenderBundle(w),this.scrollBarBackgroundRenderBundle=this.createScrollBarBackgroundRenderBundle(c)}updateF32UniformBuffer(t,n){Ir(this.device,this.f32UniformBuffer,Vv(this.f32UniformBufferSource,this.canvasContext,t,n))}updateViewportStateStorage(t){Ir(this.device,this.viewportStateStorage,t)}updateU32UniformBuffer(t,n,r,o){Ir(this.device,this.u32UniformBuffer,Wv(this.u32UniformBufferSource,t,n,r,o))}updateDataBufferStorage(t){Ir(this.device,this.gridDataBufferStorage,t)}updateFocusedStateStorage(t){Ir(this.device,this.focusedStateStorage,t)}updateSelectedStateStorage(t){Ir(this.device,this.selectedStateStorage,t)}createBindGroup(t,n,r,o,i,s,l,a){return this.device.createBindGroup({label:t,layout:n,entries:[{binding:0,resource:{buffer:r}},{binding:1,resource:{buffer:o}},{binding:2,resource:{buffer:i}},{binding:3,resource:{buffer:s}},{binding:4,resource:{buffer:l}},{binding:5,resource:{buffer:a}}]})}createRenderBundle(t,n,r){const o=this.device.createRenderBundleEncoder({label:t,colorFormats:[this.textureFormat]});return o.setPipeline(n),o.setVertexBuffer(0,this.vertexBuffer),o.setBindGroup(0,this.bindGroup),o.drawIndirect(this.drawIndirectBuffer,r),o.finish()}updateDrawIndirectBuffer(t,n,r){ty(this.drawIndirectBufferSource,this.canvasContext.canvasSize,this.canvasContext.headerOffset,t,n,r),this.device.queue.writeBuffer(this.drawIndirectBuffer,0,this.drawIndirectBufferSource)}createBodyRenderBundle(t){return this.createRenderBundle("body",t,Zn.get("BODY"))}createViewportShadowRenderBundle(t){return this.createRenderBundle("viewportShadow",t,Zn.get("VIEWPORT_SHADOW"))}createColumnFocusRenderBundle(t){return this.createRenderBundle("columnFocus",t,Zn.get("TOP_HEADER"))}createRowFocusRenderBundle(t){return this.createRenderBundle("rowFocus",t,Zn.get("LEFT_HEADER"))}createTopHeaderRenderBundle(t){return this.createRenderBundle("topHeader",t,Zn.get("TOP_HEADER"))}createLeftHeaderRenderBundle(t){return this.createRenderBundle("leftHeader",t,Zn.get("LEFT_HEADER"))}createScrollBarBackgroundRenderBundle(t){return this.createRenderBundle("scrollBarBackground",t,Zn.get("SCROLLBAR_BACKGROUND"))}createScrollBarBodyRenderBundle(t){return this.createRenderBundle("scrollBarBody",t,Zn.get("SCROLLBAR_BODY"))}createCommandBuffer(){const t=this.device.createCommandEncoder(),n=this.gpuCanvasContext.getCurrentTexture().createView(),r=t.beginRenderPass({colorAttachments:[{view:n,clearValue:{r:0,g:0,b:0,a:0},loadOp:"clear",storeOp:"store"}]}),o=[this.columnFocusRenderBundle,this.rowFocusRenderBundle,this.bodyRenderBundle,this.viewportShadowRenderBundle,this.topHeaderRenderBundle,this.leftHeaderRenderBundle,this.scrollBarBackgroundRenderBundle,this.scrollBarBodyRenderBundle];return r.executeBundles(o),r.end(),t.finish()}execute(){this.device.queue.submit([this.createCommandBuffer()])}}const fn=-1,Jn=-2,Xr=-3,Kr=-4,Qr=-5;var Ke=(e=>(e[e.NotFocused=0]="NotFocused",e[e.HorizontalFocused=1]="HorizontalFocused",e[e.VerticalFocused=2]="VerticalFocused",e[e.VerticalAndHorizontalFocused=3]="VerticalAndHorizontalFocused",e[e.OutOfFrame=99]="OutOfFrame",e))(Ke||{}),qt=(e=>(e[e.NotSelected=0]="NotSelected",e[e.Selected=1]="Selected",e))(qt||{});function oy(e,t,n,r,o){const i=o.right-o.left,s=o.bottom-o.top,l=n.width/n.height,a=e.numColumns/e.numRows,u=o.left<0,d=e.numColumnse.numColumns,S=s>e.numRows;let y={...o};if(x&&S){if(l===a)return y.left=0,y.right=e.numColumns,y.top=0,y.bottom=e.numRows,y;if(l>a){const b=(o.top+o.bottom)/2,p=e.numColumns/n.width*n.height/2;return y.left=0,y.right=e.numColumns,y.top=b-p,y.bottom=b+p,y}else{const b=(o.left+o.right)/2,p=e.numRows/n.height*n.width/2;return y.top=0,y.bottom=e.numRows,y.left=b-p,y.right=b+p,y}}return x?(y.top=(o.top+o.bottom-e.numRows)/2,y.bottom=(o.top+o.bottom+e.numRows)/2,u?(y.left=0,d?r:(y.right=o.right,y)):(y.right=e.numColumns,d?r:(y.left=o.left,y))):S?(y.left=(o.left+o.right-t.width)/2,y.right=(o.left+o.right+t.width)/2,f?(y.top=0,m?r:(y.bottom=o.bottom,y)):(y.bottom=e.numRows,d?(y.top=e.numRows-s,r):(y.top=o.top,y))):y}const iy=v.forwardRef((e,t)=>{const{focusedStates:n,selectedStates:r}=e,o=Jc(),i=Lv(),s=zv(),l=Dv(),a=qc(),u=Nv(),d=v.useRef(),f=v.useRef(-1),m=v.useRef(-1),x=v.useRef();v.useImperativeHandle(t,()=>({refreshData:O=>{I(O)},refreshFocusedState:(O,G,_)=>{z(O,G,_)},refreshSelectedState:(O,G,_)=>{F(O,G,_)},refreshViewportState:O=>{U(O)}}));const S=v.useRef(i.initialOverscroll||{x:0,y:0}),y=v.useRef({numColumnsToShow:0,numRowsToShow:0}),b=v.useRef(null),p=v.useRef({x:0,y:0}),h=v.useRef(!1),c=v.useRef(Ke.OutOfFrame),w=i.viewportIndex*4,k=()=>({left:i.viewportStates[w],top:i.viewportStates[w+1],right:i.viewportStates[w+2],bottom:i.viewportStates[w+3]}),E=({left:O,top:G,right:_,bottom:W})=>{O!==void 0&&(i.viewportStates[w]=O),G!==void 0&&(i.viewportStates[w+1]=G),_!==void 0&&(i.viewportStates[w+2]=_),W!==void 0&&(i.viewportStates[w+3]=W)},R=(O,G,_)=>{const W=_.left<0,Z=_.right>s.numColumns,K=_.top<0,le=_.bottom>s.numRows,de=c.current===Ke.NotFocused;W?(p.current.y=0,Z?(E({left:0,right:s.numColumns}),de&&(S.current.x=0)):(E({left:0,right:O.width}),de&&(S.current.x=_.left*G.width))):Z?(p.current.y=0,E({left:s.numColumns-O.width}),E({right:s.numColumns}),de&&(S.current.x=(_.right-s.numColumns)*G.width)):!le&&!K&&(E({left:_.left,right:_.right}),de&&(S.current.x=0)),K?(p.current.y=0,le?(E({top:0,bottom:s.numRows}),de&&(S.current.y=0)):(E({top:0,bottom:O.height}),de&&(S.current.y=_.top*G.height))):le?(p.current.y=0,E({top:s.numRows-O.height,bottom:s.numRows}),de&&(S.current.y=(_.bottom-s.numRows)*G.height)):!Z&&!W&&(E({top:_.top,bottom:_.bottom}),de&&(S.current.y=0));const{left:$e,top:P,right:A,bottom:J}=k();if(!(P<=J&&$e<=A))throw new Error(`viewport must be valid rectangle: top:${P} <= bottom:${J} && left:${$e} <= right:${A}}`)},T=()=>{if(b.current){const O=b.current.startViewport.right-b.current.startViewport.left,G=b.current.startViewport.bottom-b.current.startViewport.top,[_,W]=c.current===Ke.HorizontalFocused?[-1*(s.numColumns*b.current.delta.x)/(a.canvasSize.width-a.headerOffset.left),0]:c.current===Ke.VerticalFocused?[0,-1*(s.numRows*b.current.delta.y)/(a.canvasSize.height-a.headerOffset.top)]:[O*b.current.delta.x/(a.canvasSize.width-a.headerOffset.left),G*b.current.delta.y/(a.canvasSize.height-a.headerOffset.top)],Z={left:b.current.startViewport.left,right:b.current.startViewport.right,top:b.current.startViewport.top,bottom:b.current.startViewport.bottom},K={left:Z.left-_,right:Z.right-_,top:Z.top-W,bottom:Z.bottom-W};R(b.current.startViewportSize,b.current.startCellSize,K)}else{const{left:O,top:G,right:_,bottom:W}=k(),Z={width:_-O,height:W-G},K={left:O+p.current.x,right:_+p.current.x,top:G+p.current.y,bottom:W+p.current.y};R(Z,{width:(a.canvasSize.width-a.headerOffset.left)/Z.width,height:(a.canvasSize.height-a.headerOffset.top)/Z.height},c.current===Ke.HorizontalFocused||c.current===Ke.VerticalFocused?{left:O,top:G,right:_,bottom:W}:K)}},g=()=>{var O;(O=x.current)==null||O.updateU32UniformBuffer(s,y.current,c.current,i.viewportIndex)},I=O=>{var G,_;(G=x.current)==null||G.updateDataBufferStorage(s.data),Se(),O===i.viewportIndex&&((_=e.onDataChanged)==null||_.call(e,O,s.data))},z=(O,G,_)=>{var W,Z;G===f.current&&_===m.current||(n.fill(Ke.NotFocused),G!==-1&&_===-1?n[G]=Ke.HorizontalFocused:G===-1&&_!==-1?n[_]=Ke.VerticalFocused:G!==-1&&_!==-1&&(n[G]=Ke.HorizontalFocused,n[_]=Ke.VerticalFocused),f.current=G,m.current=_,(W=x.current)==null||W.updateFocusedStateStorage(n),Se(),O===i.viewportIndex&&((Z=e.onFocusedStatesChange)==null||Z.call(e,O,G,_)))},F=(O,G,_)=>{var W,Z;if(O===i.viewportIndex){if(G===fn)if(_===fn){const K=r.some(le=>le>0);r.fill(K?0:1)}else for(let K=0;K{const{left:O,top:G,right:_,bottom:W}=k(),Z=Math.min(Math.ceil(_)-Math.floor(O),s.numColumns),K=Math.min(Math.ceil(W)-Math.floor(G),s.numRows);y.current={numColumnsToShow:Z,numRowsToShow:K}},N=()=>{var O,G,_;x.current&&(x.current.updateF32UniformBuffer(s,S.current),x.current.updateU32UniformBuffer(s,y.current,c.current,i.viewportIndex),(O=x.current)==null||O.updateViewportStateStorage(i.viewportStates),(G=x.current)==null||G.updateDrawIndirectBuffer(y.current.numColumnsToShow,y.current.numRowsToShow,i.numViewports),(_=x.current)==null||_.execute())},U=O=>{O!==i.viewportIndex&&(T(),$(),N())},j=()=>{var O;T(),$(),N(),(O=e.onViewportStateChange)==null||O.call(e,i.viewportIndex)},H=(O,G)=>{var Ee,Be;const{left:_,top:W,right:Z,bottom:K}=k(),le=u==null?void 0:u.getBoundingClientRect();if(!le)throw new Error("canvasRefContext?.current? is null");const de=O-le.left,$e=G-le.top,P=(a.canvasSize.width-a.headerOffset.left)/(Z-_),A=(a.canvasSize.height-a.headerOffset.top)/(K-W),J=(de-S.current.x-a.headerOffset.left)/P,se=($e-S.current.y-a.headerOffset.top)/A,we=J>=0&&J+_=0&&se+W{if(!u||!u)throw new Error;const{left:_,top:W,right:Z,bottom:K}=k(),le=H(O,G);if((le.columnIndex===fn||le.rowIndex===fn)&&(u.style.cursor="grab",F(i.viewportIndex,le.columnIndex,le.rowIndex)),le.columnIndex>=0&&le.rowIndex>=0||le.columnIndex===fn||le.rowIndex===fn||le.columnIndex===Jn||le.rowIndex===Jn){u.style.cursor="grab",b.current={start:{x:O,y:G},previous:{x:O,y:G},startViewportSize:{width:Z-_,height:K-W},startCellSize:{width:(a.canvasSize.width-a.headerOffset.left)/(Z-_),height:(a.canvasSize.height-a.headerOffset.top)/(K-W)},startViewport:{top:W,bottom:K,left:_,right:Z},delta:{x:0,y:0},isMouseOut:!1};return}else le.columnIndex===Xr?_*2{B(O.clientX,O.clientY),j()},Y=O=>{B(O.touches[0].clientX,O.touches[0].clientY),j()},Q=()=>{u&&(u.style.cursor="default",b.current=null,z(i.viewportIndex,-1,-1))},he=()=>{Q()},ye=O=>{Q()},ae=O=>{u&&O.buttons===0&&(u.style.cursor="default",c.current=Ke.OutOfFrame,b.current&&(b.current.isMouseOut=!0),g(),z(i.viewportIndex,-1,-1),Se())},Ne=O=>{if(b.current&&(b.current.isMouseOut=!1),O.buttons===0){Q(),p.current={x:0,y:0};return}c.current=Ke.NotFocused,g(),j()},xe=(O,G,_,W)=>{if(!u||!b.current)throw new Error;const Z=O-b.current.start.x,K=G-b.current.start.y;b.current.delta={x:Z,y:K},p.current={x:-_*b.current.startViewportSize.width/a.canvasSize.width,y:-W*b.current.startViewportSize.height/a.canvasSize.height},Se()},Re=(O,G)=>{var W;if(!u)return;const _=H(O,G);_.columnIndex===Jn&&_.rowIndex===Jn?(u.style.cursor="pointer",c.current=Ke.HorizontalFocused|Ke.VerticalFocused):_.columnIndex===Jn?(u.style.cursor="pointer",c.current=Ke.HorizontalFocused):_.rowIndex===Jn?(u.style.cursor="pointer",c.current=Ke.VerticalFocused):_.columnIndex===Xr?(u.style.cursor="w-resize",c.current=Ke.HorizontalFocused):_.columnIndex===Kr?(u.style.cursor="e-resize",c.current=Ke.HorizontalFocused):_.rowIndex===Xr?(u.style.cursor="n-resize",c.current=Ke.VerticalFocused):_.rowIndex===Kr?(u.style.cursor="s-resize",c.current=Ke.VerticalFocused):(u.style.cursor="cell",c.current=Ke.NotFocused),(W=x.current)==null||W.updateU32UniformBuffer(s,y.current,c.current,i.viewportIndex),z(i.viewportIndex,_.columnIndex,_.rowIndex)},te=O=>{if(!u)throw new Error;b.current?(u.style.cursor="grabbing",xe(O.clientX,O.clientY,O.movementX,O.movementY)):(u.style.cursor="default",Re(O.clientX,O.clientY))},ce=O=>{if(!u)throw new Error;O.touches.length>=2&&b.current?(u.style.cursor="grabbing",xe(O.touches[0].clientX,O.touches[0].clientY,O.touches[0].clientX-b.current.previous.x,O.touches[0].clientY-b.current.previous.y),b.current.previous={x:O.touches[0].clientX,y:O.touches[0].clientY}):(u.style.cursor="default",Re(O.touches[0].clientX,O.touches[0].clientY))},q=O=>{var Be;if(O.preventDefault(),O.deltaY===0||!u)return;const G={width:a.canvasSize.width-a.headerOffset.left,height:a.canvasSize.height-a.headerOffset.top},_=k(),{left:W,top:Z,right:K,bottom:le}=_,de={width:K-W,height:le-Z},$e=O.deltaY>0?1.025:.975,P=u.getBoundingClientRect(),A=O.clientX-P.left-a.headerOffset.left,J=O.clientY-P.top-a.headerOffset.top,se=de.width*A/G.width+W,we=de.height*J/G.height+Z,fe={left:se+(W-se)*$e,right:se+(K-se)*$e,top:we+(Z-we)*$e,bottom:we+(le-we)*$e};p.current={x:0,y:0};const Ee=oy(s,de,G,_,fe);E(Ee),(Be=x.current)==null||Be.updateViewportStateStorage(i.viewportStates),j()},ue=O=>{b.current&&te(O)},oe=O=>{b.current!=null&&b.current.start!=null&&Q()},Se=()=>{d.current||(d.current=setInterval(()=>{if(!b.current){const O=()=>Math.abs(S.current.x)>.1||Math.abs(S.current.y)>.1?(S.current={x:S.current.x*kf,y:S.current.y*kf},!0):(S.current={x:0,y:0},!1),G=()=>Math.abs(p.current.x)>.01||Math.abs(p.current.y)>.01?(p.current.x*=Rf,p.current.y*=Rf,!0):(p.current.x=0,p.current.y=0,!1),_=O(),W=G();!_&&!W&&(clearInterval(d.current),d.current=void 0)}requestAnimationFrame(j)},16))};return v.useEffect(()=>(x.current=new ry(s.mode,o,l.textureFormat,l.gpuCanvasContext,a,l.texture,s,i.numViewports),u.addEventListener("mousedown",L,{passive:!0}),u.addEventListener("mousemove",te,{passive:!0}),u.addEventListener("mouseup",he,{passive:!0}),u.addEventListener("touchstart",Y,{passive:!0}),u.addEventListener("touchmove",ce,{passive:!0}),u.addEventListener("touchend",ye,{passive:!0}),u.addEventListener("mouseenter",Ne,{passive:!0}),u.addEventListener("mouseout",ae,{passive:!0}),u.addEventListener("wheel",q,{passive:!1}),document.addEventListener("mousemove",ue,{passive:!0}),document.addEventListener("mouseup",oe,{passive:!0}),h.current=!0,x.current.updateDataBufferStorage(s.data),x.current.updateSelectedStateStorage(r),x.current.updateFocusedStateStorage(n),j(),()=>{u&&(u.removeEventListener("mousedown",L),u.removeEventListener("mousemove",te),u.removeEventListener("mouseup",he),u.removeEventListener("touchstart",Y),u.removeEventListener("touchmove",ce),u.removeEventListener("touchend",ye),u.removeEventListener("mouseenter",Ne),u.removeEventListener("mouseout",ae),u.removeEventListener("wheel",q),document.removeEventListener("mousemove",ue),document.removeEventListener("mouseup",oe),h.current=!1)}),[o,l.textureFormat,l.gpuCanvasContext,l.texture,a,s,h.current,L,te,q,ue]),null}),qm=qe.memo(v.forwardRef((e,t)=>{const n=qe.useRef(null);return v.useImperativeHandle(t,()=>({refreshData:r=>{var o;(o=n.current)==null||o.refreshData(r)},refreshFocusedState:(r,o,i)=>{var s;(s=n.current)==null||s.refreshFocusedState(r,o,i)},refreshSelectedState:(r,o,i)=>{var s;(s=n.current)==null||s.refreshSelectedState(r,o,i)},refreshViewportState:r=>{var o;(o=n.current)==null||o.refreshViewportState(r)}})),C.jsx(Ov,{headerOffset:e.headerOffset,canvasSize:e.canvasSize,scrollBar:e.scrollBar,children:C.jsx(Mv,{children:C.jsx($v,{mode:e.mode,numColumns:e.numColumns,numRows:e.numRows,data:e.data,children:C.jsx(_v,{viewportIndex:e.viewportIndex,numViewports:e.numViewports,viewportStates:e.viewportStates,initialOverscroll:e.initialOverscroll,children:C.jsx(Fv,{children:C.jsx(iy,{ref:n,focusedStates:e.focusedStates,selectedStates:e.selectedStates,onFocusedStatesChange:e.onFocusedStateChange,onSelectedStatesChange:e.onSelectedStateChange,onViewportStateChange:e.onViewportStateChange})})})})})})})),ed=e=>{const t=[v.useRef(null),v.useRef(null),v.useRef(null)];return t.map((n,r)=>C.jsx(qm,{mode:e.mode,viewportIndex:r,ref:n,numViewports:t.length,canvasSize:e.canvasSizes[r],headerOffset:e.headerOffset,scrollBar:e.scrollBar,numColumns:e.numColumns,numRows:e.numRows,data:e.data,focusedStates:e.focusedStates,selectedStates:e.selectedStates,viewportStates:e.viewportStates,onFocusedStateChange:(o,i,s)=>{t.filter((l,a)=>a!==r).forEach(l=>{var a;return(a=l.current)==null?void 0:a.refreshFocusedState(o,i,s)})},onSelectedStateChange:(o,i,s)=>{t.filter((l,a)=>a!==r).forEach(l=>{var a;return(a=l.current)==null?void 0:a.refreshSelectedState(o,i,s)})},onViewportStateChange:o=>{t.filter((i,s)=>s!==r).forEach(i=>{var s;return(s=i.current)==null?void 0:s.refreshViewportState(o)})}},r))},sy=e=>{function t(s,l,a=0){const u=new Float32Array(s*l);for(let d=0;d{function t(l,a,u=.1){const d=new Uint32Array(l*a);for(let f=0;f{t.onload=l,t.onerror=a});const n=document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("Could not get 2D context");n.width=t.width,n.height=t.height,r.drawImage(t,0,0,t.width,t.height);const i=r.getImageData(0,0,t.width,t.height).data,s=new Uint32Array(t.width*t.height);for(let l=0;l{const[t,n]=v.useState();return v.useEffect(()=>{(async()=>{const{data:r,width:o,height:i}=await ay(e.src),s=o,l=i,a=Math.max(s,l),u=new Uint32Array(a),d=new Uint32Array(a),f=new Float32Array([0,0,s,l,0,0,s/2,l/2,0,20,220,220]);n({data:r,width:o,height:i,numColumns:s,numRows:l,focusedStates:u,selectedStates:d,viewportStates:f})})()},[e.src]),t?C.jsx(C.Fragment,{children:C.jsx(ed,{id:"rgba",mode:cr.RGBA,numColumns:t.numColumns,numRows:t.numRows,headerOffset:e.headerOffset,scrollBar:{radius:5,margin:2},canvasSizes:e.canvasSizes,data:t.data,focusedStates:t.focusedStates,selectedStates:t.selectedStates,viewportStates:t.viewportStates})}):null};var Ii=(e=>(e.CPU="CPU",e.GPU="GPU",e))(Ii||{});function Zm(e){let t=0;const n=e.map(r=>t+=r);if(n[n.length-1]<0||1{const r=n-t;return t=n,r})}const Ti={black:"#000",white:"#fff"},qr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Zr={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Jr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},eo={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},to={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ho={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},cy={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Gn(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n0?yt(Uo,--Dt):0,Bo--,lt===10&&(Bo=1,Gl--),lt}function Gt(){return lt=Dt2||Bi(lt)>3?"":" "}function Iy(e,t){for(;--t&&Gt()&&!(lt<48||lt>102||lt>57&<<65||lt>70&<<97););return es(e,Hs()+(t<6&&Bn()==32&&Gt()==32))}function Lu(e){for(;Gt();)switch(lt){case e:return Dt;case 34:case 39:e!==34&&e!==39&&Lu(lt);break;case 40:e===41&&Lu(e);break;case 92:Gt();break}return Dt}function Ty(e,t){for(;Gt()&&e+lt!==57;)if(e+lt===84&&Bn()===47)break;return"/*"+es(t,Dt-1)+"*"+Vl(e===47?e:Gt())}function Py(e){for(;!Bi(Bn());)Gt();return es(e,Dt)}function By(e){return ih(Xs("",null,null,null,[""],e=oh(e),0,[0],e))}function Xs(e,t,n,r,o,i,s,l,a){for(var u=0,d=0,f=s,m=0,x=0,S=0,y=1,b=1,p=1,h=0,c="",w=o,k=i,E=r,R=c;b;)switch(S=h,h=Gt()){case 40:if(S!=108&&yt(R,f-1)==58){_u(R+=Te(Ys(h),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:R+=Ys(h);break;case 9:case 10:case 13:case 32:R+=Ry(S);break;case 92:R+=Iy(Hs()-1,7);continue;case 47:switch(Bn()){case 42:case 47:ms(Oy(Ty(Gt(),Hs()),t,n),a);break;default:R+="/"}break;case 123*y:l[u++]=Rn(R)*p;case 125*y:case 59:case 0:switch(h){case 0:case 125:b=0;case 59+d:p==-1&&(R=Te(R,/\f/g,"")),x>0&&Rn(R)-f&&ms(x>32?Pf(R+";",r,n,f-1):Pf(Te(R," ","")+";",r,n,f-2),a);break;case 59:R+=";";default:if(ms(E=Tf(R,t,n,u,d,o,l,c,w=[],k=[],f),i),h===123)if(d===0)Xs(R,t,E,E,w,i,f,l,k);else switch(m===99&&yt(R,3)===110?100:m){case 100:case 108:case 109:case 115:Xs(e,E,E,r&&ms(Tf(e,E,E,0,0,o,l,c,o,w=[],f),k),o,k,f,l,r?w:k);break;default:Xs(R,E,E,E,[""],k,0,l,k)}}u=d=x=0,y=p=1,c=R="",f=s;break;case 58:f=1+Rn(R),x=S;default:if(y<1){if(h==123)--y;else if(h==125&&y++==0&&ky()==125)continue}switch(R+=Vl(h),h*y){case 38:p=d>0?1:(R+="\f",-1);break;case 44:l[u++]=(Rn(R)-1)*p,p=1;break;case 64:Bn()===45&&(R+=Ys(Gt())),m=Bn(),d=f=Rn(c=R+=Py(Hs())),h++;break;case 45:S===45&&Rn(R)==2&&(y=0)}}return i}function Tf(e,t,n,r,o,i,s,l,a,u,d){for(var f=o-1,m=o===0?i:[""],x=rd(m),S=0,y=0,b=0;S0?m[p]+" "+h:Te(h,/&\f/g,m[p])))&&(a[b++]=c);return Wl(e,t,n,o===0?td:l,a,u,d)}function Oy(e,t,n){return Wl(e,t,n,eh,Vl(Ey()),Pi(e,2,-2),0)}function Pf(e,t,n,r){return Wl(e,t,n,nd,Pi(e,0,r),Pi(e,r+1,-1),r)}function bo(e,t){for(var n="",r=rd(e),o=0;o6)switch(yt(e,t+1)){case 109:if(yt(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Ie+"$2-$3$1"+al+(yt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_u(e,"stretch")?sh(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(yt(e,t+1)!==115)break;case 6444:switch(yt(e,Rn(e)-3-(~_u(e,"!important")&&10))){case 107:return Te(e,":",":"+Ie)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ie+(yt(e,14)===45?"inline-":"")+"box$3$1"+Ie+"$2$3$1"+Et+"$2box$3")+e}break;case 5936:switch(yt(e,t+11)){case 114:return Ie+e+Et+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ie+e+Et+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ie+e+Et+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ie+e+Et+e+e}return e}var Dy=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case nd:t.return=sh(t.value,t.length);break;case th:return bo([Yo(t,{value:Te(t.value,"@","@"+Ie)})],o);case td:if(t.length)return Cy(t.props,function(i){switch(by(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bo([Yo(t,{props:[Te(i,/:(read-\w+)/,":"+al+"$1")]})],o);case"::placeholder":return bo([Yo(t,{props:[Te(i,/:(plac\w+)/,":"+Ie+"input-$1")]}),Yo(t,{props:[Te(i,/:(plac\w+)/,":"+al+"$1")]}),Yo(t,{props:[Te(i,/:(plac\w+)/,Et+"input-$1")]})],o)}return""})}},Uy=[Dy],jy=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var b=y.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||Uy,i={},s,l=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var b=y.getAttribute("data-emotion").split(" "),p=1;p=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var e1={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},t1=!1,n1=/[A-Z]|^ms/g,r1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ph=function(t){return t.charCodeAt(1)===45},Of=function(t){return t!=null&&typeof t!="boolean"},Ya=Jm(function(e){return ph(e)?e:e.replace(n1,"-$&").toLowerCase()}),Mf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(r1,function(r,o,i){return In={name:o,styles:i,next:In},o})}return e1[t]!==1&&!ph(t)&&typeof n=="number"&&n!==0?n+"px":n},o1="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Oi(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return In={name:o.name,styles:o.styles,next:In},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)In={name:s.name,styles:s.styles,next:In},s=s.next;var l=i.styles+";";return l}return i1(e,t,n)}case"function":{if(e!==void 0){var a=In,u=n(e);return In=a,Oi(e,t,u)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function i1(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o96?u1:c1},_f=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},d1=!1,f1=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return dh(n,r,o),l1(function(){return fh(n,r,o)}),null},p1=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,s;n!==void 0&&(i=n.label,s=n.target);var l=_f(t,n,r),a=l||zf(o),u=!a("as");return function(){var d=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{f.push(d[0][0]);for(var m=d.length,x=1;xt(h1(o)?n:o):t;return C.jsx(a1,{styles:r})}/** - * @mui/styled-engine v6.1.1 - * - * @license MIT - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */function vh(e,t){return Sr(e,t)}const v1=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function Tn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function yh(e){if(!Tn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=yh(e[n])}),t}function Rt(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Tn(e)&&Tn(t)&&Object.keys(t).forEach(o=>{Tn(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Tn(e[o])?r[o]=Rt(e[o],t[o],n):n.clone?r[o]=Tn(t[o])?yh(t[o]):t[o]:r[o]=t[o]}),r}const y1=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function S1(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=y1(t),s=Object.keys(i);function l(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n})`}function a(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-r/100}${n})`}function u(m,x){const S=s.indexOf(x);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${n}) and (max-width:${(S!==-1&&typeof t[s[S]]=="number"?t[s[S]]:x)-r/100}${n})`}function d(m){return s.indexOf(m)+1r.startsWith("@container")).sort((r,o)=>{var s,l;const i=/min-width:\s*([0-9.]+)/;return+(((s=r.match(i))==null?void 0:s[1])||0)-+(((l=o.match(i))==null?void 0:l[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function w1(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function b1(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function C1(e){const t=(i,s)=>i.replace("@media",s?`@container ${s}`:"@container");function n(i,s){i.up=(...l)=>t(e.breakpoints.up(...l),s),i.down=(...l)=>t(e.breakpoints.down(...l),s),i.between=(...l)=>t(e.breakpoints.between(...l),s),i.only=(...l)=>t(e.breakpoints.only(...l),s),i.not=(...l)=>{const a=t(e.breakpoints.not(...l),s);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const E1={borderRadius:4};function mi(e,t){return t?Rt(e,t,{clone:!1}):e}const na={xs:0,sm:600,md:900,lg:1200,xl:1536},Lf={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${na[e]}px)`},k1={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:na[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Wn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||Lf;return t.reduce((s,l,a)=>(s[i.up(i.keys[a])]=n(t[a]),s),{})}if(typeof t=="object"){const i=r.breakpoints||Lf;return Object.keys(t).reduce((s,l)=>{if(w1(i.keys,l)){const a=b1(r.containerQueries?r:k1,l);a&&(s[a]=n(t[l],l))}else if(Object.keys(i.values||na).includes(l)){const a=i.up(l);s[a]=n(t[l],l)}else{const a=l;s[a]=t[a]}return s},{})}return n(t)}function R1(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function I1(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function ie(e){if(typeof e!="string")throw new Error(Gn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ra(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function ul(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=ra(e,n)||r,t&&(o=t(o,r,e)),o}function it(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=s=>{if(s[t]==null)return null;const l=s[t],a=s.theme,u=ra(a,r)||{};return Wn(s,l,f=>{let m=ul(u,o,f);return f===m&&typeof f=="string"&&(m=ul(u,o,`${t}${f==="default"?"":ie(f)}`,f)),n===!1?m:{[n]:m}})};return i.propTypes={},i.filterProps=[t],i}function T1(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const P1={m:"margin",p:"padding"},B1={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Af={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},O1=T1(e=>{if(e.length>2)if(Af[e])e=Af[e];else return[e];const[t,n]=e.split(""),r=P1[t],o=B1[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),cd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],dd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...cd,...dd];function ns(e,t,n,r){const o=ra(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const s=Math.abs(i),l=o[s];return i>=0?l:typeof l=="number"?-l:`-${l}`}:typeof o=="function"?o:()=>{}}function fd(e){return ns(e,"spacing",8)}function rs(e,t){return typeof t=="string"||t==null?t:e(t)}function M1(e,t){return n=>e.reduce((r,o)=>(r[o]=rs(t,n),r),{})}function N1(e,t,n,r){if(!t.includes(n))return null;const o=O1(n),i=M1(o,r),s=e[n];return Wn(e,s,i)}function Sh(e,t){const n=fd(e.theme);return Object.keys(e).map(r=>N1(e,t,r,n)).reduce(mi,{})}function tt(e){return Sh(e,cd)}tt.propTypes={};tt.filterProps=cd;function nt(e){return Sh(e,dd)}nt.propTypes={};nt.filterProps=dd;function xh(e=8,t=fd({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const s=t(i);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function oa(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?mi(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function en(e){return typeof e!="number"?e:`${e}px solid`}function cn(e,t){return it({prop:e,themeKey:"borders",transform:t})}const $1=cn("border",en),z1=cn("borderTop",en),_1=cn("borderRight",en),L1=cn("borderBottom",en),A1=cn("borderLeft",en),F1=cn("borderColor"),D1=cn("borderTopColor"),U1=cn("borderRightColor"),j1=cn("borderBottomColor"),V1=cn("borderLeftColor"),G1=cn("outline",en),W1=cn("outlineColor"),ia=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ns(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:rs(t,r)});return Wn(e,e.borderRadius,n)}return null};ia.propTypes={};ia.filterProps=["borderRadius"];oa($1,z1,_1,L1,A1,F1,D1,U1,j1,V1,ia,G1,W1);const sa=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ns(e.theme,"spacing",8),n=r=>({gap:rs(t,r)});return Wn(e,e.gap,n)}return null};sa.propTypes={};sa.filterProps=["gap"];const la=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ns(e.theme,"spacing",8),n=r=>({columnGap:rs(t,r)});return Wn(e,e.columnGap,n)}return null};la.propTypes={};la.filterProps=["columnGap"];const aa=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ns(e.theme,"spacing",8),n=r=>({rowGap:rs(t,r)});return Wn(e,e.rowGap,n)}return null};aa.propTypes={};aa.filterProps=["rowGap"];const H1=it({prop:"gridColumn"}),Y1=it({prop:"gridRow"}),X1=it({prop:"gridAutoFlow"}),K1=it({prop:"gridAutoColumns"}),Q1=it({prop:"gridAutoRows"}),q1=it({prop:"gridTemplateColumns"}),Z1=it({prop:"gridTemplateRows"}),J1=it({prop:"gridTemplateAreas"}),eS=it({prop:"gridArea"});oa(sa,la,aa,H1,Y1,X1,K1,Q1,q1,Z1,J1,eS);function Co(e,t){return t==="grey"?t:e}const tS=it({prop:"color",themeKey:"palette",transform:Co}),nS=it({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Co}),rS=it({prop:"backgroundColor",themeKey:"palette",transform:Co});oa(tS,nS,rS);function jt(e){return e<=1&&e!==0?`${e*100}%`:e}const oS=it({prop:"width",transform:jt}),pd=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,s,l,a;const r=((s=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:s[n])||na[n];return r?((a=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:a.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:jt(n)}};return Wn(e,e.maxWidth,t)}return null};pd.filterProps=["maxWidth"];const iS=it({prop:"minWidth",transform:jt}),sS=it({prop:"height",transform:jt}),lS=it({prop:"maxHeight",transform:jt}),aS=it({prop:"minHeight",transform:jt});it({prop:"size",cssProperty:"width",transform:jt});it({prop:"size",cssProperty:"height",transform:jt});const uS=it({prop:"boxSizing"});oa(oS,pd,iS,sS,lS,aS,uS);const os={border:{themeKey:"borders",transform:en},borderTop:{themeKey:"borders",transform:en},borderRight:{themeKey:"borders",transform:en},borderBottom:{themeKey:"borders",transform:en},borderLeft:{themeKey:"borders",transform:en},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:en},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ia},color:{themeKey:"palette",transform:Co},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Co},backgroundColor:{themeKey:"palette",transform:Co},p:{style:nt},pt:{style:nt},pr:{style:nt},pb:{style:nt},pl:{style:nt},px:{style:nt},py:{style:nt},padding:{style:nt},paddingTop:{style:nt},paddingRight:{style:nt},paddingBottom:{style:nt},paddingLeft:{style:nt},paddingX:{style:nt},paddingY:{style:nt},paddingInline:{style:nt},paddingInlineStart:{style:nt},paddingInlineEnd:{style:nt},paddingBlock:{style:nt},paddingBlockStart:{style:nt},paddingBlockEnd:{style:nt},m:{style:tt},mt:{style:tt},mr:{style:tt},mb:{style:tt},ml:{style:tt},mx:{style:tt},my:{style:tt},margin:{style:tt},marginTop:{style:tt},marginRight:{style:tt},marginBottom:{style:tt},marginLeft:{style:tt},marginX:{style:tt},marginY:{style:tt},marginInline:{style:tt},marginInlineStart:{style:tt},marginInlineEnd:{style:tt},marginBlock:{style:tt},marginBlockStart:{style:tt},marginBlockEnd:{style:tt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:sa},rowGap:{style:aa},columnGap:{style:la},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:jt},maxWidth:{style:pd},minWidth:{transform:jt},height:{transform:jt},maxHeight:{transform:jt},minHeight:{transform:jt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function cS(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function dS(e,t){return typeof e=="function"?e(t):e}function fS(){function e(n,r,o,i){const s={[n]:r,theme:o},l=i[n];if(!l)return{[n]:r};const{cssProperty:a=n,themeKey:u,transform:d,style:f}=l;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const m=ra(o,u)||{};return f?f(s):Wn(s,r,S=>{let y=ul(m,d,S);return S===y&&typeof S=="string"&&(y=ul(m,d,`${n}${S==="default"?"":ie(S)}`,S)),a===!1?y:{[a]:y}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??os;function s(l){let a=l;if(typeof l=="function")a=l(o);else if(typeof l!="object")return l;if(!a)return null;const u=R1(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(a).forEach(m=>{const x=dS(a[m],o);if(x!=null)if(typeof x=="object")if(i[m])f=mi(f,e(m,x,o,i));else{const S=Wn({theme:o},x,y=>({[m]:y}));cS(S,x)?f[m]=t({sx:x,theme:o}):f=mi(f,S)}else f=mi(f,e(m,x,o,i))}),x1(o,I1(d,f))}return Array.isArray(r)?r.map(s):s(r)}return t}const jo=fS();jo.filterProps=["sx"];function pS(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function md(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=e,l=S1(n),a=xh(o);let u=Rt({breakpoints:l,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:a,shape:{...E1,...i}},s);return u=C1(u),u.applyStyles=pS,u=t.reduce((d,f)=>Rt(d,f),u),u.unstable_sxConfig={...os,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(f){return jo({sx:f,theme:this})},u}function mS(e){return Object.keys(e).length===0}function hS(e=null){const t=v.useContext(ad);return!t||mS(t)?e:t}const gS=md();function ua(e=gS){return hS(e)}function vS({styles:e,themeId:t,defaultTheme:n={}}){const r=ua(n),o=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(g1,{styles:o})}const yS=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??os;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function wh(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=yS(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...s)=>{const l=t(...s);return Tn(l)?{...r,...l}:r}:i={...r,...t},{...o,sx:i}}const Ff=e=>e,SS=()=>{let e=Ff;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ff}}},bh=SS();function Ch(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;tl!=="theme"&&l!=="sx"&&l!=="as"})(jo);return v.forwardRef(function(a,u){const d=ua(n),{className:f,component:m="div",...x}=wh(a);return C.jsx(i,{as:m,ref:u,className:me(f,o?o(r):r),theme:t&&d[t]||d,...x})})}const wS={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function je(e,t,n="Mui"){const r=wS[t];return r?`${n}-${r}`:`${bh.generate(e)}-${t}`}function Pe(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=je(e,o,n)}),r}var ze={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var hd=Symbol.for("react.element"),gd=Symbol.for("react.portal"),ca=Symbol.for("react.fragment"),da=Symbol.for("react.strict_mode"),fa=Symbol.for("react.profiler"),pa=Symbol.for("react.provider"),ma=Symbol.for("react.context"),bS=Symbol.for("react.server_context"),ha=Symbol.for("react.forward_ref"),ga=Symbol.for("react.suspense"),va=Symbol.for("react.suspense_list"),ya=Symbol.for("react.memo"),Sa=Symbol.for("react.lazy"),CS=Symbol.for("react.offscreen"),Eh;Eh=Symbol.for("react.module.reference");function dn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case hd:switch(e=e.type,e){case ca:case fa:case da:case ga:case va:return e;default:switch(e=e&&e.$$typeof,e){case bS:case ma:case ha:case Sa:case ya:case pa:return e;default:return t}}case gd:return t}}}ze.ContextConsumer=ma;ze.ContextProvider=pa;ze.Element=hd;ze.ForwardRef=ha;ze.Fragment=ca;ze.Lazy=Sa;ze.Memo=ya;ze.Portal=gd;ze.Profiler=fa;ze.StrictMode=da;ze.Suspense=ga;ze.SuspenseList=va;ze.isAsyncMode=function(){return!1};ze.isConcurrentMode=function(){return!1};ze.isContextConsumer=function(e){return dn(e)===ma};ze.isContextProvider=function(e){return dn(e)===pa};ze.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===hd};ze.isForwardRef=function(e){return dn(e)===ha};ze.isFragment=function(e){return dn(e)===ca};ze.isLazy=function(e){return dn(e)===Sa};ze.isMemo=function(e){return dn(e)===ya};ze.isPortal=function(e){return dn(e)===gd};ze.isProfiler=function(e){return dn(e)===fa};ze.isStrictMode=function(e){return dn(e)===da};ze.isSuspense=function(e){return dn(e)===ga};ze.isSuspenseList=function(e){return dn(e)===va};ze.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ca||e===fa||e===da||e===ga||e===va||e===CS||typeof e=="object"&&e!==null&&(e.$$typeof===Sa||e.$$typeof===ya||e.$$typeof===pa||e.$$typeof===ma||e.$$typeof===ha||e.$$typeof===Eh||e.getModuleId!==void 0)};ze.typeOf=dn;const ES=md();function Xa(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Au(e,t,n){return IS(t)?n:t[e]||t}const hs=Symbol("mui.processed_props");function gs(e,t,n){if(hs in e)return e[hs];const r={...e,theme:Au(t,e.theme,n)};return e[hs]=r,r[hs]=r,r}function kS(e){return e?(t,n)=>n[e]:null}function Ks(e,t){var r;const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(o=>Ks(o,t));if(Array.isArray(n==null?void 0:n.variants)){const{variants:o,...i}=n;let s=i,l;e:for(let a=0;ajo(gs(l,t,n));return i.__mui_systemSx=!0,(l,a={})=>{v1(l,E=>E.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:u,slot:d,skipVariantsResolver:f,skipSx:m,overridesResolver:x=kS(PS(d)),...S}=a,y=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,b=m||!1;let p,h=Xa;d==="Root"||d==="root"?h=r:d?h=o:TS(l)&&(h=void 0);const c=vh(l,{shouldForwardProp:h,label:p,...S}),w=E=>typeof E=="function"&&E.__emotion_real!==E||Tn(E)?R=>Ks(E,gs(R,t,n)):E,k=(E,...R)=>{let T=w(E);const g=R?R.map(w):[];u&&x&&g.push(F=>{const $=Au(t,F.theme,n);if(!$.components||!$.components[u]||!$.components[u].styleOverrides)return null;const N=$.components[u].styleOverrides,U={},j=gs(F,t,n);for(const H in N)U[H]=Ks(N[H],j);return x(F,U)}),u&&!y&&g.push(F=>{var U,j;const $=Au(t,F.theme,n),N=(j=(U=$==null?void 0:$.components)==null?void 0:U[u])==null?void 0:j.variants;return N?Ks({variants:N},gs(F,t,n)):null}),b||g.push(i);const I=g.length-R.length;if(Array.isArray(E)&&I>0){const F=new Array(I).fill("");T=[...E,...F],T.raw=[...E.raw,...F]}const z=c(T,...g);return l.muiName&&(z.muiName=l.muiName),z};return c.withConfig&&(k.withConfig=c.withConfig),k}}function IS(e){for(const t in e)return!1;return!0}function TS(e){return typeof e=="string"&&e.charCodeAt(0)>96}function PS(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Mi(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],s=t[o];if(!s)n[o]=i||{};else if(!i)n[o]=s;else{n[o]={...s};for(const l in i)if(Object.prototype.hasOwnProperty.call(i,l)){const a=l;n[o][a]=Mi(i[a],s[a])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function BS(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Mi(t.components[n].defaultProps,r)}function OS({props:e,name:t,defaultTheme:n,themeId:r}){let o=ua(n);return r&&(o=o[r]||o),BS({theme:o,name:t,props:e})}const Nn=typeof window<"u"?v.useLayoutEffect:v.useEffect;function lo(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function vd(e,t=0,n=1){return lo(e,t,n)}function MS(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function xr(e){if(e.type)return e;if(e.charAt(0)==="#")return xr(MS(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Gn(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(Gn(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const NS=e=>{const t=xr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},si=(e,t)=>{try{return NS(e)}catch{return e}};function xa(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function kh(e){e=xr(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=(u,d=(u+n/30)%12)=>o-i*Math.max(Math.min(d-3,9-d,1),-1);let l="rgb";const a=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",a.push(t[3])),xa({type:l,values:a})}function Fu(e){e=xr(e);let t=e.type==="hsl"||e.type==="hsla"?xr(kh(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function $S(e,t){const n=Fu(e),r=Fu(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Pt(e,t){return e=xr(e),t=vd(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,xa(e)}function vs(e,t,n){try{return Pt(e,t)}catch{return e}}function Ni(e,t){if(e=xr(e),t=vd(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return xa(e)}function _e(e,t,n){try{return Ni(e,t)}catch{return e}}function $i(e,t){if(e=xr(e),t=vd(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return xa(e)}function Le(e,t,n){try{return $i(e,t)}catch{return e}}function zS(e,t=.15){return Fu(e)>.5?Ni(e,t):$i(e,t)}function ys(e,t,n){try{return zS(e,t)}catch{return e}}function Df(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function wa(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Ka(e,t){var n,r,o;return v.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function pt(e){return e&&e.ownerDocument||document}function Hn(e){return pt(e).defaultView||window}function Du(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let Uf=0;function _S(e){const[t,n]=v.useState(e),r=t;return v.useEffect(()=>{t==null&&(Uf+=1,n(`mui-${Uf}`))},[t]),r}const LS={...Mu},jf=LS.useId;function AS(e){return jf!==void 0?jf():_S(e)}function Uu({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,s]=v.useState(t),l=o?e:i,a=v.useCallback(u=>{o||s(u)},[]);return[l,a]}function rn(e){const t=v.useRef(e);return Nn(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function ht(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Du(n,t)})},e)}const Vf={};function Rh(e,t){const n=v.useRef(Vf);return n.current===Vf&&(n.current=e(t)),n}const FS=[];function DS(e){v.useEffect(e,FS)}class yd{constructor(){Wo(this,"currentId",null);Wo(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Wo(this,"disposeEffect",()=>this.clear)}static create(){return new yd}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Ih(){const e=Rh(yd.create).current;return DS(e.disposeEffect),e}function cl(e){try{return e.matches(":focus-visible")}catch{}return!1}function Th(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function US(e){return v.Children.toArray(e).filter(t=>v.isValidElement(t))}const jS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Xe(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let s="",l=!0;for(let a=0;ar.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Gf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Bh(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const x=me(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),S={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...n,...o,...r};return x.length>0&&(y.className=x),Object.keys(S).length>0&&(y.style=S),{props:y,internalRef:void 0}}const s=hi({...o,...r}),l=Gf(r),a=Gf(o),u=t(s),d=me(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...u,...n,...a,...l};return d.length>0&&(m.className=d),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:u.ref}}function Oh(e,t,n){return typeof e=="function"?e(t,n):e}function $t(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,s=o?{}:Oh(n,r),{props:l,internalRef:a}=Bh({...i,externalSlotProps:s}),u=ht(a,s==null?void 0:s.ref,(f=e.additionalProps)==null?void 0:f.ref);return Ph(t,{...l,ref:u},r)}function is(e){return!e||!v.isValidElement(e)?null:e.props.propertyIsEnumerable("ref")?e.props.ref:e.ref}const GS=v.createContext(),ba=()=>v.useContext(GS)??!1,WS=v.createContext(void 0);function HS(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Mi(o.defaultProps,r):!o.styleOverrides&&!o.variants?Mi(o,r):r}function YS({props:e,name:t}){const n=v.useContext(WS);return HS({props:e,name:t,theme:{components:n}})}function XS(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const Wf=(e,t,n,r=[])=>{let o=e;t.forEach((i,s)=>{s===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},KS=(e,t,n)=>{function r(o,i=[],s=[]){Object.entries(o).forEach(([l,a])=>{(!n||n&&!n([...i,l]))&&a!=null&&(typeof a=="object"&&Object.keys(a).length>0?r(a,[...i,l],Array.isArray(a)?[...s,l]:s):t([...i,l],a,s))})}r(e)},QS=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Qa(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},s={};return KS(e,(l,a,u)=>{if((typeof a=="string"||typeof a=="number")&&(!r||!r(l,a))){const d=`--${n?`${n}-`:""}${l.join("-")}`,f=QS(l,a);Object.assign(o,{[d]:f}),Wf(i,l,`var(${d})`,u),Wf(s,l,`var(${d}, ${f})`,u)}},l=>l[0]==="vars"),{css:o,vars:i,varsWithDefaults:s}}function qS(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:s,defaultColorScheme:l="light",...a}=e,{vars:u,css:d,varsWithDefaults:f}=Qa(a,t);let m=f;const x={},{[l]:S,...y}=i;if(Object.entries(y||{}).forEach(([c,w])=>{const{vars:k,css:E,varsWithDefaults:R}=Qa(w,t);m=Rt(m,R),x[c]={css:E,vars:k}}),S){const{css:c,vars:w,varsWithDefaults:k}=Qa(S,t);m=Rt(m,k),x[l]={css:c,vars:w}}function b(c,w){var E,R;let k=o;if(o==="class"&&(k=".%s"),o==="data"&&(k="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(k=`[${o}="%s"]`),c){if(k==="media")return e.defaultColorScheme===c?":root":{[`@media (prefers-color-scheme: ${((R=(E=i[c])==null?void 0:E.palette)==null?void 0:R.mode)||c})`]:{":root":w}};if(k)return e.defaultColorScheme===c?`:root, ${k.replace("%s",String(c))}`:k.replace("%s",String(c))}return":root"}return{vars:m,generateThemeVars:()=>{let c={...u};return Object.entries(x).forEach(([,{vars:w}])=>{c=Rt(c,w)}),c},generateStyleSheets:()=>{var T,g;const c=[],w=e.defaultColorScheme||"light";function k(I,z){Object.keys(z).length&&c.push(typeof I=="string"?{[I]:{...z}}:I)}k(n(void 0,{...d}),d);const{[w]:E,...R}=x;if(E){const{css:I}=E,z=(g=(T=i[w])==null?void 0:T.palette)==null?void 0:g.mode,F=!r&&z?{colorScheme:z,...I}:{...I};k(n(w,{...F}),F)}return Object.entries(R).forEach(([I,{css:z}])=>{var N,U;const F=(U=(N=i[I])==null?void 0:N.palette)==null?void 0:U.mode,$=!r&&F?{colorScheme:F,...z}:{...z};k(n(I,{...$}),$)}),c}}}function ZS(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Hf={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ti.white,default:Ti.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},qa={text:{primary:Ti.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Ti.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Yf(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=$i(e.main,o):t==="dark"&&(e.dark=Ni(e.main,i)))}function JS(e="light"){return e==="dark"?{main:Jr[200],light:Jr[50],dark:Jr[400]}:{main:Jr[700],light:Jr[400],dark:Jr[800]}}function ex(e="light"){return e==="dark"?{main:Zr[200],light:Zr[50],dark:Zr[400]}:{main:Zr[500],light:Zr[300],dark:Zr[700]}}function tx(e="light"){return e==="dark"?{main:qr[500],light:qr[300],dark:qr[700]}:{main:qr[700],light:qr[400],dark:qr[800]}}function nx(e="light"){return e==="dark"?{main:eo[400],light:eo[300],dark:eo[700]}:{main:eo[700],light:eo[500],dark:eo[900]}}function rx(e="light"){return e==="dark"?{main:to[400],light:to[300],dark:to[700]}:{main:to[800],light:to[500],dark:to[900]}}function ox(e="light"){return e==="dark"?{main:Ho[400],light:Ho[300],dark:Ho[700]}:{main:"#ed6c02",light:Ho[500],dark:Ho[900]}}function Sd(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||JS(t),s=e.secondary||ex(t),l=e.error||tx(t),a=e.info||nx(t),u=e.success||rx(t),d=e.warning||ox(t);function f(y){return $S(y,qa.text.primary)>=n?qa.text.primary:Hf.text.primary}const m=({color:y,name:b,mainShade:p=500,lightShade:h=300,darkShade:c=700})=>{if(y={...y},!y.main&&y[p]&&(y.main=y[p]),!y.hasOwnProperty("main"))throw new Error(Gn(11,b?` (${b})`:"",p));if(typeof y.main!="string")throw new Error(Gn(12,b?` (${b})`:"",JSON.stringify(y.main)));return Yf(y,"light",h,r),Yf(y,"dark",c,r),y.contrastText||(y.contrastText=f(y.main)),y},x={dark:qa,light:Hf};return Rt({common:{...Ti},mode:t,primary:m({color:i,name:"primary"}),secondary:m({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:l,name:"error"}),warning:m({color:d,name:"warning"}),info:m({color:a,name:"info"}),success:m({color:u,name:"success"}),grey:cy,contrastThreshold:n,getContrastText:f,augmentColor:m,tonalOffset:r,...x[t]},o)}function ix(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function sx(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function lx(e){return Math.round(e*1e5)/1e5}const Xf={textTransform:"uppercase"},Kf='"Roboto", "Helvetica", "Arial", sans-serif';function ax(e,t){const{fontFamily:n=Kf,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:a=16,allVariants:u,pxToRem:d,...f}=typeof t=="function"?t(e):t,m=r/14,x=d||(b=>`${b/a*m}rem`),S=(b,p,h,c,w)=>({fontFamily:n,fontWeight:b,fontSize:x(p),lineHeight:h,...n===Kf?{letterSpacing:`${lx(c/p)}em`}:{},...w,...u}),y={h1:S(o,96,1.167,-1.5),h2:S(o,60,1.2,-.5),h3:S(i,48,1.167,0),h4:S(i,34,1.235,.25),h5:S(i,24,1.334,0),h6:S(s,20,1.6,.15),subtitle1:S(i,16,1.75,.15),subtitle2:S(s,14,1.57,.1),body1:S(i,16,1.5,.15),body2:S(i,14,1.43,.15),button:S(s,14,1.75,.4,Xf),caption:S(i,12,1.66,.4),overline:S(i,12,2.66,1,Xf),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Rt({htmlFontSize:a,pxToRem:x,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:l,...y},f,{clone:!1})}const ux=.2,cx=.14,dx=.12;function He(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${ux})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${cx})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${dx})`].join(",")}const fx=["none",He(0,2,1,-1,0,1,1,0,0,1,3,0),He(0,3,1,-2,0,2,2,0,0,1,5,0),He(0,3,3,-2,0,3,4,0,0,1,8,0),He(0,2,4,-1,0,4,5,0,0,1,10,0),He(0,3,5,-1,0,5,8,0,0,1,14,0),He(0,3,5,-1,0,6,10,0,0,1,18,0),He(0,4,5,-2,0,7,10,1,0,2,16,1),He(0,5,5,-3,0,8,10,1,0,3,14,2),He(0,5,6,-3,0,9,12,1,0,3,16,2),He(0,6,6,-3,0,10,14,1,0,4,18,3),He(0,6,7,-4,0,11,15,1,0,4,20,3),He(0,7,8,-4,0,12,17,2,0,5,22,4),He(0,7,8,-4,0,13,19,2,0,5,24,4),He(0,7,9,-4,0,14,21,2,0,5,26,4),He(0,8,9,-5,0,15,22,2,0,6,28,5),He(0,8,10,-5,0,16,24,2,0,6,30,5),He(0,8,11,-5,0,17,26,2,0,6,32,5),He(0,9,11,-5,0,18,28,2,0,7,34,6),He(0,9,12,-6,0,19,29,2,0,7,36,6),He(0,10,13,-6,0,20,31,3,0,8,38,7),He(0,10,13,-6,0,21,33,3,0,8,40,7),He(0,10,14,-6,0,22,35,3,0,8,42,7),He(0,11,14,-7,0,23,36,3,0,9,44,8),He(0,11,15,-7,0,24,38,3,0,9,46,8)],px={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},mx={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Qf(e){return`${Math.round(e)}ms`}function hx(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function gx(e){const t={...px,...e.easing},n={...mx,...e.duration};return{getAutoHeightDuration:hx,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:l=t.easeInOut,delay:a=0,...u}=i;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof s=="string"?s:Qf(s)} ${l} ${typeof a=="string"?a:Qf(a)}`).join(",")},...e,easing:t,duration:n}}const vx={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ju(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:s={},typography:l={},shape:a,...u}=e;if(e.vars)throw new Error(Gn(20));const d=Sd(i),f=md(e);let m=Rt(f,{mixins:sx(f.breakpoints,r),palette:d,shadows:fx.slice(),typography:ax(d,l),transitions:gx(s),zIndex:{...vx}});return m=Rt(m,u),m=t.reduce((x,S)=>Rt(x,S),m),m.unstable_sxConfig={...os,...u==null?void 0:u.unstable_sxConfig},m.unstable_sx=function(S){return jo({sx:S,theme:this})},m}function Vu(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const yx=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Vu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Mh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Nh(e){return e==="dark"?yx:[]}function Sx(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=Sd(t);return{palette:i,opacity:{...Mh(i.mode),...n},overlays:r||Nh(i.mode),...o}}function xx(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const wx=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],bx=e=>(t,n)=>{const r=e.colorSchemeSelector;let o=r;if(r==="class"&&(o=".%s"),r==="data"&&(o="[data-%s]"),r!=null&&r.startsWith("data-")&&!r.includes("%s")&&(o=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return wx(e.cssVarPrefix).forEach(s=>{i[s]=n[s],delete n[s]}),o==="media"?{":root":n,"@media (prefers-color-scheme: dark)":{":root":i}}:o?{[o.replace("%s",t)]:i,[`:root, ${o.replace("%s",t)}`]:n}:{":root":{...n,...i}}}if(o&&o!=="media")return`:root, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{":root":n}};if(o)return o.replace("%s",String(t))}return":root"};function Cx(e){return Tn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ex(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i{e[n]||(e[n]={})})}function M(e,t,n){!e[t]&&n&&(e[t]=n)}function li(e){return!e||!e.startsWith("hsl")?e:kh(e)}function An(e,t){`${t}Channel`in e||(e[`${t}Channel`]=si(li(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). -To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Rx(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const bn=e=>{try{return e()}catch{}},Ix=(e="mui")=>XS(e);function Za(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=Sx({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...s}=ju({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...Mh(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Nh(o)},s}function Tx(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:s=xx,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,...a}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),f=Ix(i),{[d]:m,light:x,dark:S,...y}=n,b={...y};let p=m;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(p=!0),!p)throw new Error(Gn(21,d));const h=Za(b,p,a,d);x&&!b.light&&Za(b,x,void 0,"light"),S&&!b.dark&&Za(b,S,void 0,"dark");let c={defaultColorScheme:d,...h,cssVarPrefix:i,colorSchemeSelector:l,getCssVar:f,colorSchemes:b,font:{...ix(h.typography),...h.font},spacing:Rx(a.spacing)};Object.keys(c.colorSchemes).forEach(T=>{const g=c.colorSchemes[T].palette,I=z=>{const F=z.split("-"),$=F[1],N=F[2];return f(z,g[$][N])};if(g.mode==="light"&&(M(g.common,"background","#fff"),M(g.common,"onBackground","#000")),g.mode==="dark"&&(M(g.common,"background","#000"),M(g.common,"onBackground","#fff")),kx(g,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),g.mode==="light"){M(g.Alert,"errorColor",_e(g.error.light,.6)),M(g.Alert,"infoColor",_e(g.info.light,.6)),M(g.Alert,"successColor",_e(g.success.light,.6)),M(g.Alert,"warningColor",_e(g.warning.light,.6)),M(g.Alert,"errorFilledBg",I("palette-error-main")),M(g.Alert,"infoFilledBg",I("palette-info-main")),M(g.Alert,"successFilledBg",I("palette-success-main")),M(g.Alert,"warningFilledBg",I("palette-warning-main")),M(g.Alert,"errorFilledColor",bn(()=>g.getContrastText(g.error.main))),M(g.Alert,"infoFilledColor",bn(()=>g.getContrastText(g.info.main))),M(g.Alert,"successFilledColor",bn(()=>g.getContrastText(g.success.main))),M(g.Alert,"warningFilledColor",bn(()=>g.getContrastText(g.warning.main))),M(g.Alert,"errorStandardBg",Le(g.error.light,.9)),M(g.Alert,"infoStandardBg",Le(g.info.light,.9)),M(g.Alert,"successStandardBg",Le(g.success.light,.9)),M(g.Alert,"warningStandardBg",Le(g.warning.light,.9)),M(g.Alert,"errorIconColor",I("palette-error-main")),M(g.Alert,"infoIconColor",I("palette-info-main")),M(g.Alert,"successIconColor",I("palette-success-main")),M(g.Alert,"warningIconColor",I("palette-warning-main")),M(g.AppBar,"defaultBg",I("palette-grey-100")),M(g.Avatar,"defaultBg",I("palette-grey-400")),M(g.Button,"inheritContainedBg",I("palette-grey-300")),M(g.Button,"inheritContainedHoverBg",I("palette-grey-A100")),M(g.Chip,"defaultBorder",I("palette-grey-400")),M(g.Chip,"defaultAvatarColor",I("palette-grey-700")),M(g.Chip,"defaultIconColor",I("palette-grey-700")),M(g.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),M(g.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),M(g.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),M(g.LinearProgress,"primaryBg",Le(g.primary.main,.62)),M(g.LinearProgress,"secondaryBg",Le(g.secondary.main,.62)),M(g.LinearProgress,"errorBg",Le(g.error.main,.62)),M(g.LinearProgress,"infoBg",Le(g.info.main,.62)),M(g.LinearProgress,"successBg",Le(g.success.main,.62)),M(g.LinearProgress,"warningBg",Le(g.warning.main,.62)),M(g.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.11)`),M(g.Slider,"primaryTrack",Le(g.primary.main,.62)),M(g.Slider,"secondaryTrack",Le(g.secondary.main,.62)),M(g.Slider,"errorTrack",Le(g.error.main,.62)),M(g.Slider,"infoTrack",Le(g.info.main,.62)),M(g.Slider,"successTrack",Le(g.success.main,.62)),M(g.Slider,"warningTrack",Le(g.warning.main,.62));const z=ys(g.background.default,.8);M(g.SnackbarContent,"bg",z),M(g.SnackbarContent,"color",bn(()=>g.getContrastText(z))),M(g.SpeedDialAction,"fabHoverBg",ys(g.background.paper,.15)),M(g.StepConnector,"border",I("palette-grey-400")),M(g.StepContent,"border",I("palette-grey-400")),M(g.Switch,"defaultColor",I("palette-common-white")),M(g.Switch,"defaultDisabledColor",I("palette-grey-100")),M(g.Switch,"primaryDisabledColor",Le(g.primary.main,.62)),M(g.Switch,"secondaryDisabledColor",Le(g.secondary.main,.62)),M(g.Switch,"errorDisabledColor",Le(g.error.main,.62)),M(g.Switch,"infoDisabledColor",Le(g.info.main,.62)),M(g.Switch,"successDisabledColor",Le(g.success.main,.62)),M(g.Switch,"warningDisabledColor",Le(g.warning.main,.62)),M(g.TableCell,"border",Le(vs(g.divider,1),.88)),M(g.Tooltip,"bg",vs(g.grey[700],.92))}if(g.mode==="dark"){M(g.Alert,"errorColor",Le(g.error.light,.6)),M(g.Alert,"infoColor",Le(g.info.light,.6)),M(g.Alert,"successColor",Le(g.success.light,.6)),M(g.Alert,"warningColor",Le(g.warning.light,.6)),M(g.Alert,"errorFilledBg",I("palette-error-dark")),M(g.Alert,"infoFilledBg",I("palette-info-dark")),M(g.Alert,"successFilledBg",I("palette-success-dark")),M(g.Alert,"warningFilledBg",I("palette-warning-dark")),M(g.Alert,"errorFilledColor",bn(()=>g.getContrastText(g.error.dark))),M(g.Alert,"infoFilledColor",bn(()=>g.getContrastText(g.info.dark))),M(g.Alert,"successFilledColor",bn(()=>g.getContrastText(g.success.dark))),M(g.Alert,"warningFilledColor",bn(()=>g.getContrastText(g.warning.dark))),M(g.Alert,"errorStandardBg",_e(g.error.light,.9)),M(g.Alert,"infoStandardBg",_e(g.info.light,.9)),M(g.Alert,"successStandardBg",_e(g.success.light,.9)),M(g.Alert,"warningStandardBg",_e(g.warning.light,.9)),M(g.Alert,"errorIconColor",I("palette-error-main")),M(g.Alert,"infoIconColor",I("palette-info-main")),M(g.Alert,"successIconColor",I("palette-success-main")),M(g.Alert,"warningIconColor",I("palette-warning-main")),M(g.AppBar,"defaultBg",I("palette-grey-900")),M(g.AppBar,"darkBg",I("palette-background-paper")),M(g.AppBar,"darkColor",I("palette-text-primary")),M(g.Avatar,"defaultBg",I("palette-grey-600")),M(g.Button,"inheritContainedBg",I("palette-grey-800")),M(g.Button,"inheritContainedHoverBg",I("palette-grey-700")),M(g.Chip,"defaultBorder",I("palette-grey-700")),M(g.Chip,"defaultAvatarColor",I("palette-grey-300")),M(g.Chip,"defaultIconColor",I("palette-grey-300")),M(g.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),M(g.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),M(g.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),M(g.LinearProgress,"primaryBg",_e(g.primary.main,.5)),M(g.LinearProgress,"secondaryBg",_e(g.secondary.main,.5)),M(g.LinearProgress,"errorBg",_e(g.error.main,.5)),M(g.LinearProgress,"infoBg",_e(g.info.main,.5)),M(g.LinearProgress,"successBg",_e(g.success.main,.5)),M(g.LinearProgress,"warningBg",_e(g.warning.main,.5)),M(g.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.13)`),M(g.Slider,"primaryTrack",_e(g.primary.main,.5)),M(g.Slider,"secondaryTrack",_e(g.secondary.main,.5)),M(g.Slider,"errorTrack",_e(g.error.main,.5)),M(g.Slider,"infoTrack",_e(g.info.main,.5)),M(g.Slider,"successTrack",_e(g.success.main,.5)),M(g.Slider,"warningTrack",_e(g.warning.main,.5));const z=ys(g.background.default,.98);M(g.SnackbarContent,"bg",z),M(g.SnackbarContent,"color",bn(()=>g.getContrastText(z))),M(g.SpeedDialAction,"fabHoverBg",ys(g.background.paper,.15)),M(g.StepConnector,"border",I("palette-grey-600")),M(g.StepContent,"border",I("palette-grey-600")),M(g.Switch,"defaultColor",I("palette-grey-300")),M(g.Switch,"defaultDisabledColor",I("palette-grey-600")),M(g.Switch,"primaryDisabledColor",_e(g.primary.main,.55)),M(g.Switch,"secondaryDisabledColor",_e(g.secondary.main,.55)),M(g.Switch,"errorDisabledColor",_e(g.error.main,.55)),M(g.Switch,"infoDisabledColor",_e(g.info.main,.55)),M(g.Switch,"successDisabledColor",_e(g.success.main,.55)),M(g.Switch,"warningDisabledColor",_e(g.warning.main,.55)),M(g.TableCell,"border",_e(vs(g.divider,1),.68)),M(g.Tooltip,"bg",vs(g.grey[700],.92))}An(g.background,"default"),An(g.background,"paper"),An(g.common,"background"),An(g.common,"onBackground"),An(g,"divider"),Object.keys(g).forEach(z=>{const F=g[z];F&&typeof F=="object"&&(F.main&&M(g[z],"mainChannel",si(li(F.main))),F.light&&M(g[z],"lightChannel",si(li(F.light))),F.dark&&M(g[z],"darkChannel",si(li(F.dark))),F.contrastText&&M(g[z],"contrastTextChannel",si(li(F.contrastText))),z==="text"&&(An(g[z],"primary"),An(g[z],"secondary")),z==="action"&&(F.active&&An(g[z],"active"),F.selected&&An(g[z],"selected")))})}),c=t.reduce((T,g)=>Rt(T,g),c);const w={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:bx(c)},{vars:k,generateThemeVars:E,generateStyleSheets:R}=qS(c,w);return c.vars=k,Object.entries(c.colorSchemes[c.defaultColorScheme]).forEach(([T,g])=>{c[T]=g}),c.generateThemeVars=E,c.generateStyleSheets=R,c.generateSpacing=function(){return xh(a.spacing,fd(this))},c.getColorSchemeSelector=ZS(l),c.spacing=c.generateSpacing(),c.shouldSkipGeneratingVar=s,c.unstable_sxConfig={...os,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(g){return jo({sx:g,theme:this})},c.toRuntimeSource=Ex,c}function qf(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Sd({...n===!0?{}:n.palette,mode:t})})}function $h(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...s}=e,l=i||"light",a=o==null?void 0:o[l],u={...o,...n?{[l]:{...typeof a!="boolean"&&a,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return ju(e,...t);let d=n;"palette"in e||u[l]&&(u[l]!==!0?d=u[l].palette:l==="dark"&&(d={mode:"dark"}));const f=ju({...e,palette:d},...t);return f.defaultColorScheme=l,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},qf(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},qf(f,"light",u.light)),f}return!n&&!("light"in u)&&l==="light"&&(u.light=!0),Tx({...s,colorSchemes:u,defaultColorScheme:l,...typeof r!="boolean"&&r},...t)}const Ca=$h();function Ea(){const e=ua(Ca);return e[Ji]||e}function zh({props:e,name:t}){return OS({props:e,name:t,defaultTheme:Ca,themeId:Ji})}function ka(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const wn=e=>ka(e)&&e!=="classes",re=RS({themeId:Ji,defaultTheme:Ca,rootShouldForwardProp:wn});function Px(e){return C.jsx(vS,{...e,defaultTheme:Ca,themeId:Ji})}function Bx(e){return function(n){return C.jsx(Px,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function Ox(){return wh}const Zf={theme:void 0};function Ae(e){let t,n;return r=>{let o=t;return(o===void 0||r.theme!==n)&&(Zf.theme=r.theme,o=e(Zf),t=o,n=r.theme),o}}function et(e){return YS(e)}function Mx(e){return je("MuiSvgIcon",e)}Pe("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nx=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${ie(t)}`,`fontSize${ie(n)}`]};return Xe(o,Mx,r)},$x=re("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ie(n.color)}`],t[`fontSize${ie(n.fontSize)}`]]}})(Ae(({theme:e})=>{var t,n,r,o,i,s,l,a,u,d,f,m,x,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:s.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((a=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:a.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,y])=>y&&y.main).map(([y])=>{var b,p;return{props:{color:y},style:{color:(p=(b=(e.vars??e).palette)==null?void 0:b[y])==null?void 0:p.main}}}),{props:{color:"action"},style:{color:(m=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(S=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),dl=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:l="svg",fontSize:a="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:m="0 0 24 24",...x}=r,S=v.isValidElement(o)&&o.type==="svg",y={...r,color:s,component:l,fontSize:a,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:m,hasSvgAsChild:S},b={};d||(b.viewBox=m);const p=Nx(y);return C.jsxs($x,{as:l,className:me(p.root,i),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...b,...x,...S&&o.props,ownerState:y,children:[S?o.props.children:o,f?C.jsx("title",{children:f}):null]})});dl&&(dl.muiName="SvgIcon");function $n(e,t){function n(r,o){return C.jsx(dl,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return n.muiName=dl.muiName,v.memo(v.forwardRef(n))}function _h(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Gu(e,t){return Gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Gu(e,t)}function Lh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Gu(e,t)}var Ah={exports:{}},Xt={},Fh={exports:{}},Dh={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(e){function t(B,L){var Y=B.length;B.push(L);e:for(;0>>1,he=B[Q];if(0>>1;Qo(Ne,Y))xeo(Re,Ne)?(B[Q]=Re,B[xe]=Y,Q=xe):(B[Q]=Ne,B[ae]=Y,Q=ae);else if(xeo(Re,Y))B[Q]=Re,B[xe]=Y,Q=xe;else break e}}return L}function o(B,L){var Y=B.sortIndex-L.sortIndex;return Y!==0?Y:B.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],d=1,f=null,m=3,x=!1,S=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function c(B){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=B)r(u),L.sortIndex=L.expirationTime,t(a,L);else break;L=n(u)}}function w(B){if(y=!1,c(B),!S)if(n(a)!==null)S=!0,j(k);else{var L=n(u);L!==null&&H(w,L.startTime-B)}}function k(B,L){S=!1,y&&(y=!1,p(T),T=-1),x=!0;var Y=m;try{for(c(L),f=n(a);f!==null&&(!(f.expirationTime>L)||B&&!z());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,m=f.priorityLevel;var he=Q(f.expirationTime<=L);L=e.unstable_now(),typeof he=="function"?f.callback=he:f===n(a)&&r(a),c(L)}else r(a);f=n(a)}if(f!==null)var ye=!0;else{var ae=n(u);ae!==null&&H(w,ae.startTime-L),ye=!1}return ye}finally{f=null,m=Y,x=!1}}var E=!1,R=null,T=-1,g=5,I=-1;function z(){return!(e.unstable_now()-IB||125Q?(B.sortIndex=Y,t(u,B),n(a)===null&&B===n(u)&&(y?(p(T),T=-1):y=!0,H(w,Y-Q))):(B.sortIndex=he,t(a,B),S||x||(S=!0,j(k))),B},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(B){var L=m;return function(){var Y=m;m=L;try{return B.apply(this,arguments)}finally{m=Y}}}})(Dh);Fh.exports=Dh;var zx=Fh.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Uh=v,Ht=zx;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wu=Object.prototype.hasOwnProperty,_x=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Jf={},ep={};function Lx(e){return Wu.call(ep,e)?!0:Wu.call(Jf,e)?!1:_x.test(e)?ep[e]=!0:(Jf[e]=!0,!1)}function Ax(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Fx(e,t,n,r){if(t===null||typeof t>"u"||Ax(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Mt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var xt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xt[e]=new Mt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xt[t]=new Mt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xt[e]=new Mt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xt[e]=new Mt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xt[e]=new Mt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xt[e]=new Mt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xt[e]=new Mt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xt[e]=new Mt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xt[e]=new Mt(e,5,!1,e.toLowerCase(),null,!1,!1)});var xd=/[\-:]([a-z])/g;function wd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xd,wd);xt[t]=new Mt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xd,wd);xt[t]=new Mt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xd,wd);xt[t]=new Mt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xt[e]=new Mt(e,1,!1,e.toLowerCase(),null,!1,!1)});xt.xlinkHref=new Mt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xt[e]=new Mt(e,1,!1,e.toLowerCase(),null,!0,!0)});function bd(e,t,n,r){var o=xt.hasOwnProperty(t)?xt[t]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` -`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{eu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ai(e):""}function Dx(e){switch(e.tag){case 5:return ai(e.type);case 16:return ai("Lazy");case 13:return ai("Suspense");case 19:return ai("SuspenseList");case 0:case 2:case 15:return e=tu(e.type,!1),e;case 11:return e=tu(e.type.render,!1),e;case 1:return e=tu(e.type,!0),e;default:return""}}function Ku(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case co:return"Fragment";case uo:return"Portal";case Hu:return"Profiler";case Cd:return"StrictMode";case Yu:return"Suspense";case Xu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gh:return(e.displayName||"Context")+".Consumer";case Vh:return(e._context.displayName||"Context")+".Provider";case Ed:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kd:return t=e.displayName||null,t!==null?t:Ku(e.type)||"Memo";case rr:t=e._payload,e=e._init;try{return Ku(e(t))}catch{}}return null}function Ux(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ku(t);case 8:return t===Cd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jx(e){var t=Hh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xs(e){e._valueTracker||(e._valueTracker=jx(e))}function Yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qu(e,t){var n=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function np(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xh(e,t){t=t.checked,t!=null&&bd(e,"checked",t,!1)}function qu(e,t){Xh(e,t);var n=wr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zu(e,t.type,wr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Zu(e,t,n){(t!=="number"||fl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ui=Array.isArray;function Eo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ws.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _i(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var gi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vx=["Webkit","ms","Moz","O"];Object.keys(gi).forEach(function(e){Vx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gi[t]=gi[e]})});function Zh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||gi.hasOwnProperty(e)&&gi[e]?(""+t).trim():t+"px"}function Jh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Zh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Gx=Je({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function tc(e,t){if(t){if(Gx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function nc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rc=null;function Rd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oc=null,ko=null,Ro=null;function sp(e){if(e=as(e)){if(typeof oc!="function")throw Error(V(280));var t=e.stateNode;t&&(t=Ba(t),oc(e.stateNode,e.type,t))}}function eg(e){ko?Ro?Ro.push(e):Ro=[e]:ko=e}function tg(){if(ko){var e=ko,t=Ro;if(Ro=ko=null,sp(e),t)for(e=0;e>>=0,e===0?32:31-(tw(e)/nw|0)|0}var bs=64,Cs=4194304;function ci(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=ci(l):(i&=s,i!==0&&(r=ci(i)))}else s=n&~o,s!==0?r=ci(s):i!==0&&(r=ci(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ss(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vn(t),e[t]=n}function sw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=yi),hp=" ",gp=!1;function wg(e,t){switch(e){case"keyup":return $w.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fo=!1;function _w(e,t){switch(e){case"compositionend":return bg(t);case"keypress":return t.which!==32?null:(gp=!0,hp);case"textInput":return e=t.data,e===hp&&gp?null:e;default:return null}}function Lw(e,t){if(fo)return e==="compositionend"||!$d&&wg(e,t)?(e=Sg(),qs=Od=ar=null,fo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xp(n)}}function Rg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ig(){for(var e=window,t=fl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fl(e.document)}return t}function zd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Hw(e){var t=Ig(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rg(n.ownerDocument.documentElement,n)){if(r!==null&&zd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=wp(n,i);var s=wp(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,po=null,cc=null,xi=null,dc=!1;function bp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;dc||po==null||po!==fl(r)||(r=po,"selectionStart"in r&&zd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xi&&ji(xi,r)||(xi=r,r=Sl(cc,"onSelect"),0go||(e.current=vc[go],vc[go]=null,go--)}function Ue(e,t){go++,vc[go]=e.current,e.current=t}var br={},It=Er(br),Lt=Er(!1),Ur=br;function Mo(e,t){var n=e.type.contextTypes;if(!n)return br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function At(e){return e=e.childContextTypes,e!=null}function wl(){Ge(Lt),Ge(It)}function Pp(e,t,n){if(It.current!==br)throw Error(V(168));Ue(It,t),Ue(Lt,n)}function _g(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(V(108,Ux(e)||"Unknown",o));return Je({},n,r)}function bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||br,Ur=It.current,Ue(It,e),Ue(Lt,Lt.current),!0}function Bp(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=_g(e,t,Ur),r.__reactInternalMemoizedMergedChildContext=e,Ge(Lt),Ge(It),Ue(It,e)):Ge(Lt),Ue(Lt,n)}var Dn=null,Oa=!1,hu=!1;function Lg(e){Dn===null?Dn=[e]:Dn.push(e)}function o2(e){Oa=!0,Lg(e)}function kr(){if(!hu&&Dn!==null){hu=!0;var e=0,t=Oe;try{var n=Dn;for(Oe=1;e>=s,o-=s,Un=1<<32-vn(t)+o|n<T?(g=R,R=null):g=R.sibling;var I=m(p,R,c[T],w);if(I===null){R===null&&(R=g);break}e&&R&&I.alternate===null&&t(p,R),h=i(I,h,T),E===null?k=I:E.sibling=I,E=I,R=g}if(T===c.length)return n(p,R),Ye&&Br(p,T),k;if(R===null){for(;TT?(g=R,R=null):g=R.sibling;var z=m(p,R,I.value,w);if(z===null){R===null&&(R=g);break}e&&R&&z.alternate===null&&t(p,R),h=i(z,h,T),E===null?k=z:E.sibling=z,E=z,R=g}if(I.done)return n(p,R),Ye&&Br(p,T),k;if(R===null){for(;!I.done;T++,I=c.next())I=f(p,I.value,w),I!==null&&(h=i(I,h,T),E===null?k=I:E.sibling=I,E=I);return Ye&&Br(p,T),k}for(R=r(p,R);!I.done;T++,I=c.next())I=x(R,p,T,I.value,w),I!==null&&(e&&I.alternate!==null&&R.delete(I.key===null?T:I.key),h=i(I,h,T),E===null?k=I:E.sibling=I,E=I);return e&&R.forEach(function(F){return t(p,F)}),Ye&&Br(p,T),k}function b(p,h,c,w){if(typeof c=="object"&&c!==null&&c.type===co&&c.key===null&&(c=c.props.children),typeof c=="object"&&c!==null){switch(c.$$typeof){case Ss:e:{for(var k=c.key,E=h;E!==null;){if(E.key===k){if(k=c.type,k===co){if(E.tag===7){n(p,E.sibling),h=o(E,c.props.children),h.return=p,p=h;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===rr&&Lp(k)===E.type){n(p,E.sibling),h=o(E,c.props),h.ref=Jo(p,E,c),h.return=p,p=h;break e}n(p,E);break}else t(p,E);E=E.sibling}c.type===co?(h=Fr(c.props.children,p.mode,w,c.key),h.return=p,p=h):(w=il(c.type,c.key,c.props,null,p.mode,w),w.ref=Jo(p,h,c),w.return=p,p=w)}return s(p);case uo:e:{for(E=c.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===c.containerInfo&&h.stateNode.implementation===c.implementation){n(p,h.sibling),h=o(h,c.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=Cu(c,p.mode,w),h.return=p,p=h}return s(p);case rr:return E=c._init,b(p,h,E(c._payload),w)}if(ui(c))return S(p,h,c,w);if(Xo(c))return y(p,h,c,w);Bs(p,c)}return typeof c=="string"&&c!==""||typeof c=="number"?(c=""+c,h!==null&&h.tag===6?(n(p,h.sibling),h=o(h,c),h.return=p,p=h):(n(p,h),h=bu(c,p.mode,w),h.return=p,p=h),s(p)):n(p,h)}return b}var $o=Wg(!0),Hg=Wg(!1),us={},Mn=Er(us),Hi=Er(us),Yi=Er(us);function _r(e){if(e===us)throw Error(V(174));return e}function Gd(e,t){switch(Ue(Yi,t),Ue(Hi,e),Ue(Mn,us),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ec(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ec(t,e)}Ge(Mn),Ue(Mn,t)}function zo(){Ge(Mn),Ge(Hi),Ge(Yi)}function Yg(e){_r(Yi.current);var t=_r(Mn.current),n=ec(t,e.type);t!==n&&(Ue(Hi,e),Ue(Mn,n))}function Wd(e){Hi.current===e&&(Ge(Mn),Ge(Hi))}var Qe=Er(0);function Tl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gu=[];function Hd(){for(var e=0;en?n:4,e(!0);var r=vu.transition;vu.transition={};try{e(!1),t()}finally{Oe=n,vu.transition=r}}function u0(){return un().memoizedState}function a2(e,t,n){var r=vr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},c0(e))d0(t,n);else if(n=Ug(e,t,n,r),n!==null){var o=Bt();yn(n,e,r,o),f0(n,t,r)}}function u2(e,t,n){var r=vr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(c0(e))d0(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Sn(l,s)){var a=t.interleaved;a===null?(o.next=o,jd(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=Ug(e,t,o,r),n!==null&&(o=Bt(),yn(n,e,r,o),f0(n,t,r))}}function c0(e){var t=e.alternate;return e===Ze||t!==null&&t===Ze}function d0(e,t){wi=Pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function f0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Td(e,n)}}var Bl={readContext:an,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},c2={readContext:an,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:Fp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,tl(4194308,4,o0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return tl(4194308,4,e,t)},useInsertionEffect:function(e,t){return tl(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=a2.bind(null,Ze,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:Ap,useDebugValue:qd,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=Ap(!1),t=e[0];return e=l2.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ze,o=kn();if(Ye){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),mt===null)throw Error(V(349));Vr&30||Qg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Fp(Zg.bind(null,r,i,e),[e]),r.flags|=2048,Qi(9,qg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=kn(),t=mt.identifierPrefix;if(Ye){var n=jn,r=Un;n=(r&~(1<<32-vn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Pn]=t,e[Wi]=r,w0(e,t,!1,!1),t.stateNode=e;e:{switch(s=nc(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),o=r;break;case"iframe":case"object":case"embed":Ve("load",e),o=r;break;case"video":case"audio":for(o=0;oLo&&(t.flags|=128,r=!0,ei(i,!1),t.lanes=4194304)}else{if(!r)if(e=Tl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ei(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ye)return Ct(t),null}else 2*ot()-i.renderingStartTime>Lo&&n!==1073741824&&(t.flags|=128,r=!0,ei(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ot(),t.sibling=null,n=Qe.current,Ue(Qe,r?n&1|2:n&1),t):(Ct(t),null);case 22:case 23:return rf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ut&1073741824&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function y2(e,t){switch(Ld(t),t.tag){case 1:return At(t.type)&&wl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zo(),Ge(Lt),Ge(It),Hd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wd(t),null;case 13:if(Ge(Qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));No()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Qe),null;case 4:return zo(),null;case 10:return Ud(t.type._context),null;case 22:case 23:return rf(),null;case 24:return null;default:return null}}var Ms=!1,kt=!1,S2=typeof WeakSet=="function"?WeakSet:Set,ee=null;function xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){rt(e,t,r)}else n.current=null}function Pc(e,t,n){try{n()}catch(r){rt(e,t,r)}}var Xp=!1;function x2(e,t){if(fc=vl,e=Ig(),zd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,d=0,f=e,m=null;t:for(;;){for(var x;f!==n||o!==0&&f.nodeType!==3||(l=s+o),f!==i||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(x=f.firstChild)!==null;)m=f,f=x;for(;;){if(f===e)break t;if(m===n&&++u===o&&(l=s),m===i&&++d===r&&(a=s),(x=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=x}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(pc={focusedElem:e,selectionRange:n},vl=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var y=S.memoizedProps,b=S.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:mn(t.type,y),b);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var c=t.stateNode.containerInfo;c.nodeType===1?c.textContent="":c.nodeType===9&&c.documentElement&&c.removeChild(c.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(w){rt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return S=Xp,Xp=!1,S}function bi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Pc(t,n,i)}o=o.next}while(o!==r)}}function $a(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Bc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function E0(e){var t=e.alternate;t!==null&&(e.alternate=null,E0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pn],delete t[Wi],delete t[gc],delete t[n2],delete t[r2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function k0(e){return e.tag===5||e.tag===3||e.tag===4}function Kp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||k0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Oc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xl));else if(r!==4&&(e=e.child,e!==null))for(Oc(e,t,n),e=e.sibling;e!==null;)Oc(e,t,n),e=e.sibling}function Mc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mc(e,t,n),e=e.sibling;e!==null;)Mc(e,t,n),e=e.sibling}var vt=null,hn=!1;function er(e,t,n){for(n=n.child;n!==null;)R0(e,t,n),n=n.sibling}function R0(e,t,n){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(Ra,n)}catch{}switch(n.tag){case 5:kt||xo(n,t);case 6:var r=vt,o=hn;vt=null,er(e,t,n),vt=r,hn=o,vt!==null&&(hn?(e=vt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):vt.removeChild(n.stateNode));break;case 18:vt!==null&&(hn?(e=vt,n=n.stateNode,e.nodeType===8?mu(e.parentNode,n):e.nodeType===1&&mu(e,n),Di(e)):mu(vt,n.stateNode));break;case 4:r=vt,o=hn,vt=n.stateNode.containerInfo,hn=!0,er(e,t,n),vt=r,hn=o;break;case 0:case 11:case 14:case 15:if(!kt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Pc(n,t,s),o=o.next}while(o!==r)}er(e,t,n);break;case 1:if(!kt&&(xo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){rt(n,t,l)}er(e,t,n);break;case 21:er(e,t,n);break;case 22:n.mode&1?(kt=(r=kt)||n.memoizedState!==null,er(e,t,n),kt=r):er(e,t,n);break;default:er(e,t,n)}}function Qp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new S2),t.forEach(function(r){var o=P2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function pn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=ot()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*b2(r/1960))-r,10e?16:e,ur===null)var r=!1;else{if(e=ur,ur=null,Nl=0,ke&6)throw Error(V(331));var o=ke;for(ke|=4,ee=e.current;ee!==null;){var i=ee,s=i.child;if(ee.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aot()-tf?Ar(e,0):ef|=n),Ft(e,t)}function $0(e,t){t===0&&(e.mode&1?(t=Cs,Cs<<=1,!(Cs&130023424)&&(Cs=4194304)):t=1);var n=Bt();e=Kn(e,t),e!==null&&(ss(e,t,n),Ft(e,n))}function T2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$0(e,n)}function P2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(V(314))}r!==null&&r.delete(t),$0(e,n)}var z0;z0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lt.current)_t=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _t=!1,g2(e,t,n);_t=!!(e.flags&131072)}else _t=!1,Ye&&t.flags&1048576&&Ag(t,El,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nl(e,t),e=t.pendingProps;var o=Mo(t,It.current);To(t,n),o=Xd(null,t,r,e,o,n);var i=Kd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,At(r)?(i=!0,bl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Vd(t),o.updater=Ma,t.stateNode=o,o._reactInternals=t,bc(t,r,e,n),t=kc(null,t,r,!0,i,n)):(t.tag=0,Ye&&i&&_d(t),Tt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=O2(r),e=mn(r,e),o){case 0:t=Ec(null,t,r,e,n);break e;case 1:t=Wp(null,t,r,e,n);break e;case 11:t=Vp(null,t,r,e,n);break e;case 14:t=Gp(null,t,r,mn(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:mn(r,o),Ec(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:mn(r,o),Wp(e,t,r,o,n);case 3:e:{if(y0(t),e===null)throw Error(V(387));r=t.pendingProps,i=t.memoizedState,o=i.element,jg(e,t),Il(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=_o(Error(V(423)),t),t=Hp(e,t,r,n,o);break e}else if(r!==o){o=_o(Error(V(424)),t),t=Hp(e,t,r,n,o);break e}else for(Vt=mr(t.stateNode.containerInfo.firstChild),Wt=t,Ye=!0,gn=null,n=Hg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(No(),r===o){t=Qn(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return Yg(t),e===null&&Sc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,mc(r,o)?s=null:i!==null&&mc(r,i)&&(t.flags|=32),v0(e,t),Tt(e,t,s,n),t.child;case 6:return e===null&&Sc(t),null;case 13:return S0(e,t,n);case 4:return Gd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$o(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:mn(r,o),Vp(e,t,r,o,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Ue(kl,r._currentValue),r._currentValue=s,i!==null)if(Sn(i.value,s)){if(i.children===o.children&&!Lt.current){t=Qn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Vn(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),xc(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(V(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),xc(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Tt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,To(t,n),o=an(o),r=r(o),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,o=mn(r,t.pendingProps),o=mn(r.type,o),Gp(e,t,r,o,n);case 15:return h0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:mn(r,o),nl(e,t),t.tag=1,At(r)?(e=!0,bl(t)):e=!1,To(t,n),Gg(t,r,o),bc(t,r,o,n),kc(null,t,r,!0,e,n);case 19:return x0(e,t,n);case 22:return g0(e,t,n)}throw Error(V(156,t.tag))};function _0(e,t){return ag(e,t)}function B2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,n,r){return new B2(e,t,n,r)}function sf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function O2(e){if(typeof e=="function")return sf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ed)return 11;if(e===kd)return 14}return 2}function yr(e,t){var n=e.alternate;return n===null?(n=on(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function il(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")sf(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case co:return Fr(n.children,o,i,t);case Cd:s=8,o|=8;break;case Hu:return e=on(12,n,t,o|2),e.elementType=Hu,e.lanes=i,e;case Yu:return e=on(13,n,t,o),e.elementType=Yu,e.lanes=i,e;case Xu:return e=on(19,n,t,o),e.elementType=Xu,e.lanes=i,e;case Wh:return _a(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Vh:s=10;break e;case Gh:s=9;break e;case Ed:s=11;break e;case kd:s=14;break e;case rr:s=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=on(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Fr(e,t,n,r){return e=on(7,e,r,t),e.lanes=n,e}function _a(e,t,n,r){return e=on(22,e,r,t),e.elementType=Wh,e.lanes=n,e.stateNode={isHidden:!1},e}function bu(e,t,n){return e=on(6,e,null,t),e.lanes=n,e}function Cu(e,t,n){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function M2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ru(0),this.expirationTimes=ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ru(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function lf(e,t,n,r,o,i,s,l,a){return e=new M2(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=on(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vd(i),e}function N2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(D0)}catch(e){console.error(e)}}D0(),Ah.exports=Xt;var df=Ah.exports;const zs=Bm(df),om={disabled:!1},_l=qe.createContext(null);var A2=function(t){return t.scrollTop},fi="unmounted",Mr="exited",Nr="entering",ao="entered",Lc="exiting",zn=function(e){Lh(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var s=o,l=s&&!s.isMounting?r.enter:r.appear,a;return i.appearStatus=null,r.in?l?(a=Mr,i.appearStatus=Nr):a=ao:r.unmountOnExit||r.mountOnEnter?a=fi:a=Mr,i.state={status:a},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===fi?{status:Mr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Nr&&s!==ao&&(i=Nr):(s===Nr||s===ao)&&(i=Lc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,l;return i=s=l=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,l=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:l}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Nr){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:zs.findDOMNode(this);s&&A2(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Mr&&this.setState({status:fi})},n.performEnter=function(o){var i=this,s=this.props.enter,l=this.context?this.context.isMounting:o,a=this.props.nodeRef?[l]:[zs.findDOMNode(this),l],u=a[0],d=a[1],f=this.getTimeouts(),m=l?f.appear:f.enter;if(!o&&!s||om.disabled){this.safeSetState({status:ao},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Nr},function(){i.props.onEntering(u,d),i.onTransitionEnd(m,function(){i.safeSetState({status:ao},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),l=this.props.nodeRef?void 0:zs.findDOMNode(this);if(!i||om.disabled){this.safeSetState({status:Mr},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Lc},function(){o.props.onExiting(l),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Mr},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(l){s&&(s=!1,i.nextCallback=null,o(l))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:zs.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!s||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=a[0],d=a[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===fi)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var l=_h(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return qe.createElement(_l.Provider,{value:null},typeof s=="function"?s(o,l):qe.cloneElement(qe.Children.only(s),l))},t}(qe.Component);zn.contextType=_l;zn.propTypes={};function ro(){}zn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ro,onEntering:ro,onEntered:ro,onExit:ro,onExiting:ro,onExited:ro};zn.UNMOUNTED=fi;zn.EXITED=Mr;zn.ENTERING=Nr;zn.ENTERED=ao;zn.EXITING=Lc;function F2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ff(e,t){var n=function(i){return t&&v.isValidElement(i)?t(i):i},r=Object.create(null);return e&&v.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function D2(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,l={};for(var a in t){if(r[a])for(s=0;se.scrollTop;function Ll(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function W2(e){return je("MuiPaper",e)}Pe("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const H2=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Xe(i,W2,o)},Y2=re("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Ae(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),X2=v.forwardRef(function(t,n){var x;const r=et({props:t,name:"MuiPaper"}),o=Ea(),{className:i,component:s="div",elevation:l=1,square:a=!1,variant:u="elevation",...d}=r,f={...r,component:s,elevation:l,square:a,variant:u},m=H2(f);return C.jsx(Y2,{as:s,ownerState:f,className:me(m.root,i),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[l],...o.vars&&{"--Paper-overlay":(x=o.vars.overlays)==null?void 0:x[l]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Pt("#fff",Vu(l))}, ${Pt("#fff",Vu(l))})`}},...d.style}})});function Ao(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:s,internalForwardedProps:l,...a}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...m}=i,x=d[e]||r,S=Oh(f[e],o),{props:{component:y,...b},internalRef:p}=Bh({className:n,...a,externalForwardedProps:e==="root"?m:void 0,externalSlotProps:S}),h=ht(p,S==null?void 0:S.ref,t.ref),c=s?s(b):{},w={...o,...c},k=e==="root"?y||u:y,E=Ph(x,{...e==="root"&&!u&&!d[e]&&l,...e!=="root"&&!d[e]&&l,...b,...k&&{as:k},ref:h},w);return Object.keys(c).forEach(R=>{delete E[R]}),[x,E]}class Al{constructor(){Wo(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new Al}static use(){const t=Rh(Al.create).current,[n,r]=v.useState(!1);return t.shouldMount=n,t.setShouldMount=r,v.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=Q2(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function K2(){return Al.use()}function Q2(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function q2(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:l,onExited:a,timeout:u}=e,[d,f]=v.useState(!1),m=me(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),x={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},S=me(n.child,d&&n.childLeaving,r&&n.childPulsate);return!l&&!d&&f(!0),v.useEffect(()=>{if(!l&&a!=null){const y=setTimeout(a,u);return()=>{clearTimeout(y)}}},[a,l,u]),C.jsx("span",{className:m,style:x,children:C.jsx("span",{className:S})})}const Zt=Pe("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Ac=550,Z2=80,J2=ts` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; - } -`,eb=ts` - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -`,tb=ts` - 0% { - transform: scale(1); - } - - 50% { - transform: scale(0.92); - } - - 100% { - transform: scale(1); - } -`,nb=re("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),rb=re(q2,{name:"MuiTouchRipple",slot:"Ripple"})` - opacity: 0; - position: absolute; - - &.${Zt.rippleVisible} { - opacity: 0.3; - transform: scale(1); - animation-name: ${J2}; - animation-duration: ${Ac}ms; - animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; - } - - &.${Zt.ripplePulsate} { - animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; - } - - & .${Zt.child} { - opacity: 1; - display: block; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: currentColor; - } - - & .${Zt.childLeaving} { - opacity: 0; - animation-name: ${eb}; - animation-duration: ${Ac}ms; - animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; - } - - & .${Zt.childPulsate} { - position: absolute; - /* @noflip */ - left: 0px; - top: 0; - animation-name: ${tb}; - animation-duration: 2500ms; - animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; - animation-iteration-count: infinite; - animation-delay: 200ms; - } -`,ob=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s,...l}=r,[a,u]=v.useState([]),d=v.useRef(0),f=v.useRef(null);v.useEffect(()=>{f.current&&(f.current(),f.current=null)},[a]);const m=v.useRef(!1),x=Ih(),S=v.useRef(null),y=v.useRef(null),b=v.useCallback(w=>{const{pulsate:k,rippleX:E,rippleY:R,rippleSize:T,cb:g}=w;u(I=>[...I,C.jsx(rb,{classes:{ripple:me(i.ripple,Zt.ripple),rippleVisible:me(i.rippleVisible,Zt.rippleVisible),ripplePulsate:me(i.ripplePulsate,Zt.ripplePulsate),child:me(i.child,Zt.child),childLeaving:me(i.childLeaving,Zt.childLeaving),childPulsate:me(i.childPulsate,Zt.childPulsate)},timeout:Ac,pulsate:k,rippleX:E,rippleY:R,rippleSize:T},d.current)]),d.current+=1,f.current=g},[i]),p=v.useCallback((w={},k={},E=()=>{})=>{const{pulsate:R=!1,center:T=o||k.pulsate,fakeElement:g=!1}=k;if((w==null?void 0:w.type)==="mousedown"&&m.current){m.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(m.current=!0);const I=g?null:y.current,z=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,$,N;if(T||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)F=Math.round(z.width/2),$=Math.round(z.height/2);else{const{clientX:U,clientY:j}=w.touches&&w.touches.length>0?w.touches[0]:w;F=Math.round(U-z.left),$=Math.round(j-z.top)}if(T)N=Math.sqrt((2*z.width**2+z.height**2)/3),N%2===0&&(N+=1);else{const U=Math.max(Math.abs((I?I.clientWidth:0)-F),F)*2+2,j=Math.max(Math.abs((I?I.clientHeight:0)-$),$)*2+2;N=Math.sqrt(U**2+j**2)}w!=null&&w.touches?S.current===null&&(S.current=()=>{b({pulsate:R,rippleX:F,rippleY:$,rippleSize:N,cb:E})},x.start(Z2,()=>{S.current&&(S.current(),S.current=null)})):b({pulsate:R,rippleX:F,rippleY:$,rippleSize:N,cb:E})},[o,b,x]),h=v.useCallback(()=>{p({},{pulsate:!0})},[p]),c=v.useCallback((w,k)=>{if(x.clear(),(w==null?void 0:w.type)==="touchend"&&S.current){S.current(),S.current=null,x.start(0,()=>{c(w,k)});return}S.current=null,u(E=>E.length>0?E.slice(1):E),f.current=k},[x]);return v.useImperativeHandle(n,()=>({pulsate:h,start:p,stop:c}),[h,p,c]),C.jsx(nb,{className:me(Zt.root,i.root,s),ref:y,...l,children:C.jsx(pf,{component:null,exit:!0,children:a})})});function ib(e){return je("MuiButtonBase",e)}const sb=Pe("MuiButtonBase",["root","disabled","focusVisible"]),lb=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s=Xe({root:["root",t&&"disabled",n&&"focusVisible"]},ib,o);return n&&r&&(s.root+=` ${r}`),s},ab=re("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${sb.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ua=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:l,component:a="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:m=!1,focusVisibleClassName:x,LinkComponent:S="a",onBlur:y,onClick:b,onContextMenu:p,onDragLeave:h,onFocus:c,onFocusVisible:w,onKeyDown:k,onKeyUp:E,onMouseDown:R,onMouseLeave:T,onMouseUp:g,onTouchEnd:I,onTouchMove:z,onTouchStart:F,tabIndex:$=0,TouchRippleProps:N,touchRippleRef:U,type:j,...H}=r,B=v.useRef(null),L=K2(),Y=ht(L.ref,U),[Q,he]=v.useState(!1);u&&Q&&he(!1),v.useImperativeHandle(o,()=>({focusVisible:()=>{he(!0),B.current.focus()}}),[]);const ye=L.shouldMount&&!d&&!u;v.useEffect(()=>{Q&&m&&!d&&L.pulsate()},[d,m,Q,L]);function ae(P,A,J=f){return rn(se=>(A&&A(se),J||L[P](se),!0))}const Ne=ae("start",R),xe=ae("stop",p),Re=ae("stop",h),te=ae("stop",g),ce=ae("stop",P=>{Q&&P.preventDefault(),T&&T(P)}),q=ae("start",F),ue=ae("stop",I),oe=ae("stop",z),Se=ae("stop",P=>{cl(P.target)||he(!1),y&&y(P)},!1),O=rn(P=>{B.current||(B.current=P.currentTarget),cl(P.target)&&(he(!0),w&&w(P)),c&&c(P)}),G=()=>{const P=B.current;return a&&a!=="button"&&!(P.tagName==="A"&&P.href)},_=rn(P=>{m&&!P.repeat&&Q&&P.key===" "&&L.stop(P,()=>{L.start(P)}),P.target===P.currentTarget&&G()&&P.key===" "&&P.preventDefault(),k&&k(P),P.target===P.currentTarget&&G()&&P.key==="Enter"&&!u&&(P.preventDefault(),b&&b(P))}),W=rn(P=>{m&&P.key===" "&&Q&&!P.defaultPrevented&&L.stop(P,()=>{L.pulsate(P)}),E&&E(P),b&&P.target===P.currentTarget&&G()&&P.key===" "&&!P.defaultPrevented&&b(P)});let Z=a;Z==="button"&&(H.href||H.to)&&(Z=S);const K={};Z==="button"?(K.type=j===void 0?"button":j,K.disabled=u):(!H.href&&!H.to&&(K.role="button"),u&&(K["aria-disabled"]=u));const le=ht(n,B),de={...r,centerRipple:i,component:a,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:m,tabIndex:$,focusVisible:Q},$e=lb(de);return C.jsxs(ab,{as:Z,className:me($e.root,l),ownerState:de,onBlur:Se,onClick:b,onContextMenu:xe,onFocus:O,onKeyDown:_,onKeyUp:W,onMouseDown:Ne,onMouseLeave:ce,onMouseUp:te,onDragLeave:Re,onTouchEnd:ue,onTouchMove:oe,onTouchStart:q,ref:le,tabIndex:u?-1:$,type:j,...K,...H,children:[s,ye?C.jsx(ob,{ref:Y,center:i,...N}):null]})});function ub(e){return typeof e.main=="string"}function cb(e,t=[]){if(!ub(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function xn(e=[]){return([,t])=>t&&cb(t,e)}function db(e){return je("MuiTypography",e)}Pe("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const fb={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},pb=Ox(),mb=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=e,l={root:["root",i,e.align!=="inherit"&&`align${ie(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Xe(l,db,s)},hb=re("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ie(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ae(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(xn()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${ie(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),im={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},j0=v.forwardRef(function(t,n){const{color:r,...o}=et({props:t,name:"MuiTypography"}),i=!fb[r],s=pb({...o,...i&&{color:r}}),{align:l="inherit",className:a,component:u,gutterBottom:d=!1,noWrap:f=!1,paragraph:m=!1,variant:x="body1",variantMapping:S=im,...y}=s,b={...s,align:l,color:r,className:a,component:u,gutterBottom:d,noWrap:f,paragraph:m,variant:x,variantMapping:S},p=u||(m?"p":S[x]||im[x])||"span",h=mb(b);return C.jsx(hb,{as:p,ref:n,className:me(h.root,a),...y,ownerState:b,style:{...l!=="inherit"&&{"--Typography-textAlign":l},...y.style}})});function gb(e){return typeof e=="function"?e():e}const vb=v.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[s,l]=v.useState(null),a=ht(is(r),n);if(Nn(()=>{i||l(gb(o)||document.body)},[o,i]),Nn(()=>{if(s&&!i)return Du(n,s),()=>{Du(n,null)}},[n,s,i]),i){if(v.isValidElement(r)){const u={ref:a};return v.cloneElement(r,u)}return C.jsx(v.Fragment,{children:r})}return C.jsx(v.Fragment,{children:s&&df.createPortal(r,s)})});function _s(e){return parseInt(e,10)||0}const yb={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Sb(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const xb=v.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:l,...a}=t,{current:u}=v.useRef(l!=null),d=v.useRef(null),f=ht(n,d),m=v.useRef(null),x=v.useRef(null),S=v.useCallback(()=>{const p=d.current,c=Hn(p).getComputedStyle(p);if(c.width==="0px")return{outerHeightStyle:0,overflowing:!1};const w=x.current;w.style.width=c.width,w.value=p.value||t.placeholder||"x",w.value.slice(-1)===` -`&&(w.value+=" ");const k=c.boxSizing,E=_s(c.paddingBottom)+_s(c.paddingTop),R=_s(c.borderBottomWidth)+_s(c.borderTopWidth),T=w.scrollHeight;w.value="x";const g=w.scrollHeight;let I=T;i&&(I=Math.max(Number(i)*g,I)),o&&(I=Math.min(Number(o)*g,I)),I=Math.max(I,g);const z=I+(k==="border-box"?E+R:0),F=Math.abs(I-T)<=1;return{outerHeightStyle:z,overflowing:F}},[o,i,t.placeholder]),y=v.useCallback(()=>{const p=S();if(Sb(p))return;const h=p.outerHeightStyle,c=d.current;m.current!==h&&(m.current=h,c.style.height=`${h}px`),c.style.overflow=p.overflowing?"hidden":""},[S]);Nn(()=>{const p=()=>{y()};let h;const c=wa(p),w=d.current,k=Hn(w);k.addEventListener("resize",c);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(p),E.observe(w)),()=>{c.clear(),cancelAnimationFrame(h),k.removeEventListener("resize",c),E&&E.disconnect()}},[S,y]),Nn(()=>{y()});const b=p=>{u||y(),r&&r(p)};return C.jsxs(v.Fragment,{children:[C.jsx("textarea",{value:l,onChange:b,ref:f,rows:i,style:s,...a}),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:x,tabIndex:-1,style:{...yb.shadow,...s,paddingTop:0,paddingBottom:0}})]})});function Dr(e){return typeof e=="string"}function mf({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const hf=v.createContext(void 0);function gf(){return v.useContext(hf)}function sm(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Fl(e,t=!1){return e&&(sm(e.value)&&e.value!==""||t&&sm(e.defaultValue)&&e.defaultValue!=="")}function wb(e){return e.startAdornment}function bb(e){return je("MuiInputBase",e)}const Fo=Pe("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var lm;const ja=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ie(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Va=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Cb=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:l,fullWidth:a,hiddenLabel:u,multiline:d,readOnly:f,size:m,startAdornment:x,type:S}=e,y={root:["root",`color${ie(n)}`,r&&"disabled",o&&"error",a&&"fullWidth",s&&"focused",l&&"formControl",m&&m!=="medium"&&`size${ie(m)}`,d&&"multiline",x&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",S==="search"&&"inputTypeSearch",d&&"inputMultiline",m==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",x&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return Xe(y,bb,t)},Ga=re("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ja})(Ae(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Fo.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Wa=re("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Va})(Ae(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Fo.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Fo.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),am=Bx({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),vf=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:s,className:l,color:a,components:u={},componentsProps:d={},defaultValue:f,disabled:m,disableInjectingGlobalStyles:x,endAdornment:S,error:y,fullWidth:b=!1,id:p,inputComponent:h="input",inputProps:c={},inputRef:w,margin:k,maxRows:E,minRows:R,multiline:T=!1,name:g,onBlur:I,onChange:z,onClick:F,onFocus:$,onKeyDown:N,onKeyUp:U,placeholder:j,readOnly:H,renderSuffix:B,rows:L,size:Y,slotProps:Q={},slots:he={},startAdornment:ye,type:ae="text",value:Ne,...xe}=r,Re=c.value!=null?c.value:Ne,{current:te}=v.useRef(Re!=null),ce=v.useRef(),q=v.useCallback(pe=>{},[]),ue=ht(ce,w,c.ref,q),[oe,Se]=v.useState(!1),O=gf(),G=mf({props:r,muiFormControl:O,states:["color","disabled","error","hiddenLabel","size","required","filled"]});G.focused=O?O.focused:oe,v.useEffect(()=>{!O&&m&&oe&&(Se(!1),I&&I())},[O,m,oe,I]);const _=O&&O.onFilled,W=O&&O.onEmpty,Z=v.useCallback(pe=>{Fl(pe)?_&&_():W&&W()},[_,W]);Nn(()=>{te&&Z({value:Re})},[Re,Z,te]);const K=pe=>{$&&$(pe),c.onFocus&&c.onFocus(pe),O&&O.onFocus?O.onFocus(pe):Se(!0)},le=pe=>{I&&I(pe),c.onBlur&&c.onBlur(pe),O&&O.onBlur?O.onBlur(pe):Se(!1)},de=(pe,...We)=>{if(!te){const wt=pe.target||ce.current;if(wt==null)throw new Error(Gn(1));Z({value:wt.value})}c.onChange&&c.onChange(pe,...We),z&&z(pe,...We)};v.useEffect(()=>{Z(ce.current)},[]);const $e=pe=>{ce.current&&pe.currentTarget===pe.target&&ce.current.focus(),F&&F(pe)};let P=h,A=c;T&&P==="input"&&(L?A={type:void 0,minRows:L,maxRows:L,...A}:A={type:void 0,maxRows:E,minRows:R,...A},P=xb);const J=pe=>{Z(pe.animationName==="mui-auto-fill-cancel"?ce.current:{value:"x"})};v.useEffect(()=>{O&&O.setAdornedStart(!!ye)},[O,ye]);const se={...r,color:G.color||"primary",disabled:G.disabled,endAdornment:S,error:G.error,focused:G.focused,formControl:O,fullWidth:b,hiddenLabel:G.hiddenLabel,multiline:T,size:G.size,startAdornment:ye,type:ae},we=Cb(se),fe=he.root||u.Root||Ga,Ee=Q.root||d.root||{},Be=he.input||u.Input||Wa;return A={...A,...Q.input??d.input},C.jsxs(v.Fragment,{children:[!x&&typeof am=="function"&&(lm||(lm=C.jsx(am,{}))),C.jsxs(fe,{...Ee,ref:n,onClick:$e,...xe,...!Dr(fe)&&{ownerState:{...se,...Ee.ownerState}},className:me(we.root,Ee.className,l,H&&"MuiInputBase-readOnly"),children:[ye,C.jsx(hf.Provider,{value:null,children:C.jsx(Be,{"aria-invalid":G.error,"aria-describedby":o,autoComplete:i,autoFocus:s,defaultValue:f,disabled:G.disabled,id:p,onAnimationStart:J,name:g,placeholder:j,readOnly:H,required:G.required,rows:L,value:Re,onKeyDown:N,onKeyUp:U,type:ae,...A,...!Dr(Be)&&{as:P,ownerState:{...se,...A.ownerState}},ref:ue,className:me(we.input,A.className,H&&"MuiInputBase-readOnly"),onBlur:le,onChange:de,onFocus:K})}),S,B?B({...G,startAdornment:ye}):null]})]})});function Eb(e){return je("MuiInput",e)}const ni={...Fo,...Pe("MuiInput",["root","underline","input"])};function kb(e){return je("MuiOutlinedInput",e)}const En={...Fo,...Pe("MuiOutlinedInput",["root","notchedOutline","input"])};function Rb(e){return je("MuiFilledInput",e)}const Tr={...Fo,...Pe("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Ib=$n(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Tb={entering:{opacity:1},entered:{opacity:1}},Pb=v.forwardRef(function(t,n){const r=Ea(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:l,easing:a,in:u,onEnter:d,onEntered:f,onEntering:m,onExit:x,onExited:S,onExiting:y,style:b,timeout:p=o,TransitionComponent:h=zn,...c}=t,w=v.useRef(null),k=ht(w,is(l),n),E=N=>U=>{if(N){const j=w.current;U===void 0?N(j):N(j,U)}},R=E(m),T=E((N,U)=>{U0(N);const j=Ll({style:b,timeout:p,easing:a},{mode:"enter"});N.style.webkitTransition=r.transitions.create("opacity",j),N.style.transition=r.transitions.create("opacity",j),d&&d(N,U)}),g=E(f),I=E(y),z=E(N=>{const U=Ll({style:b,timeout:p,easing:a},{mode:"exit"});N.style.webkitTransition=r.transitions.create("opacity",U),N.style.transition=r.transitions.create("opacity",U),x&&x(N)}),F=E(S),$=N=>{i&&i(w.current,N)};return C.jsx(h,{appear:s,in:u,nodeRef:w,onEnter:T,onEntered:g,onEntering:R,onExit:z,onExited:F,onExiting:I,addEndListener:$,timeout:p,...c,children:(N,U)=>v.cloneElement(l,{style:{opacity:0,visibility:N==="exited"&&!u?"hidden":void 0,...Tb[N],...b,...l.props.style},ref:k,...U})})});function Bb(e){return je("MuiBackdrop",e)}Pe("MuiBackdrop",["root","invisible"]);const Ob=e=>{const{ownerState:t,...n}=e;return n},Mb=e=>{const{classes:t,invisible:n}=e;return Xe({root:["root",n&&"invisible"]},Bb,t)},Nb=re("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),$b=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:s="div",invisible:l=!1,open:a,components:u={},componentsProps:d={},slotProps:f={},slots:m={},TransitionComponent:x,transitionDuration:S,...y}=r,b={...r,component:s,invisible:l},p=Mb(b),h={transition:x,root:u.Root,...m},c={...d,...f},w={slots:h,slotProps:c},[k,E]=Ao("root",{elementType:Nb,externalForwardedProps:w,className:me(p.root,i),ownerState:b}),[R,T]=Ao("transition",{elementType:Pb,externalForwardedProps:w,ownerState:b}),g=Ob(T);return C.jsx(R,{in:a,timeout:S,...y,...g,children:C.jsx(k,{"aria-hidden":!0,...E,classes:p,ref:n,children:o})})}),zb=Pe("MuiBox",["root"]),_b=$h(),Jt=xS({themeId:Ji,defaultTheme:_b,defaultClassName:zb.root,generateClassName:bh.generate});function Lb(e){return je("MuiButton",e)}const oo=Pe("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),V0=v.createContext({}),G0=v.createContext(void 0),Ab=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:s}=e,l={root:["root",i,`${i}${ie(t)}`,`size${ie(o)}`,`${i}Size${ie(o)}`,`color${ie(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${ie(o)}`],endIcon:["icon","endIcon",`iconSize${ie(o)}`]},a=Xe(l,Lb,s);return{...s,...a}},W0=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Fb=re(Ua,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ie(n.color)}`],t[`size${ie(n.size)}`],t[`${n.variant}Size${ie(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(Ae(({theme:e})=>{var r,o;const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${oo.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${oo.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${oo.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${oo.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(xn(["dark","contrastText"])).map(([i])=>({props:{color:i},style:{"--variant-textColor":(e.vars||e).palette[i].main,"--variant-outlinedColor":(e.vars||e).palette[i].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[i].mainChannel} / 0.5)`:Pt(e.palette[i].main,.5),"--variant-containedColor":(e.vars||e).palette[i].contrastText,"--variant-containedBg":(e.vars||e).palette[i].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[i].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[i].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pt(e.palette[i].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[i].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[i].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pt(e.palette[i].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{"--variant-containedColor":e.vars?e.vars.palette.text.primary:(o=(r=e.palette).getContrastText)==null?void 0:o.call(r,t),"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Pt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Pt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${oo.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oo.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}}]}})),Db=re("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${ie(n.size)}`]]}})({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},...W0]}),Ub=re("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${ie(n.size)}`]]}})({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},...W0]}),jb=v.forwardRef(function(t,n){const r=v.useContext(V0),o=v.useContext(G0),i=Mi(r,t),s=et({props:i,name:"MuiButton"}),{children:l,color:a="primary",component:u="button",className:d,disabled:f=!1,disableElevation:m=!1,disableFocusRipple:x=!1,endIcon:S,focusVisibleClassName:y,fullWidth:b=!1,size:p="medium",startIcon:h,type:c,variant:w="text",...k}=s,E={...s,color:a,component:u,disabled:f,disableElevation:m,disableFocusRipple:x,fullWidth:b,size:p,type:c,variant:w},R=Ab(E),T=h&&C.jsx(Db,{className:R.startIcon,ownerState:E,children:h}),g=S&&C.jsx(Ub,{className:R.endIcon,ownerState:E,children:S}),I=o||"";return C.jsxs(Fb,{ownerState:E,className:me(r.className,R.root,d,I),component:u,disabled:f,focusRipple:!x,focusVisibleClassName:me(R.focusVisible,y),ref:n,type:c,...k,classes:R,children:[T,l,g]})});function Vb(e){return je("MuiButtonGroup",e)}const ve=Pe("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),Gb=(e,t)=>{const{ownerState:n}=e;return[{[`& .${ve.grouped}`]:t.grouped},{[`& .${ve.grouped}`]:t[`grouped${ie(n.orientation)}`]},{[`& .${ve.grouped}`]:t[`grouped${ie(n.variant)}`]},{[`& .${ve.grouped}`]:t[`grouped${ie(n.variant)}${ie(n.orientation)}`]},{[`& .${ve.grouped}`]:t[`grouped${ie(n.variant)}${ie(n.color)}`]},{[`& .${ve.firstButton}`]:t.firstButton},{[`& .${ve.lastButton}`]:t.lastButton},{[`& .${ve.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},Wb=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:s,variant:l}=e,a={root:["root",l,s,i&&"fullWidth",o&&"disableElevation",`color${ie(n)}`],grouped:["grouped",`grouped${ie(s)}`,`grouped${ie(l)}`,`grouped${ie(l)}${ie(s)}`,`grouped${ie(l)}${ie(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Xe(a,Vb,t)},Hb=re("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:Gb})(Ae(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${ve.lastButton},& .${ve.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${ve.lastButton},& .${ve.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ve.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ve.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(xn()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:Pt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${ve.lastButton},& .${ve.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${ve.lastButton},& .${ve.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ve.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ve.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(xn(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${ve.firstButton},& .${ve.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${ve.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),Yb=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:s="primary",component:l="div",disabled:a=!1,disableElevation:u=!1,disableFocusRipple:d=!1,disableRipple:f=!1,fullWidth:m=!1,orientation:x="horizontal",size:S="medium",variant:y="outlined",...b}=r,p={...r,color:s,component:l,disabled:a,disableElevation:u,disableFocusRipple:d,disableRipple:f,fullWidth:m,orientation:x,size:S,variant:y},h=Wb(p),c=v.useMemo(()=>({className:h.grouped,color:s,disabled:a,disableElevation:u,disableFocusRipple:d,disableRipple:f,fullWidth:m,size:S,variant:y}),[s,a,u,d,f,m,S,y,h.grouped]),w=US(o),k=w.length,E=R=>{const T=R===0,g=R===k-1;return T&&g?"":T?h.firstButton:g?h.lastButton:h.middleButton};return C.jsx(Hb,{as:l,role:"group",className:me(h.root,i),ref:n,ownerState:p,...b,children:C.jsx(V0.Provider,{value:c,children:w.map((R,T)=>C.jsx(G0.Provider,{value:E(T),children:R},T))})})});function Xb(e){return je("MuiCircularProgress",e)}Pe("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const tr=44,Fc=ts` - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -`,Dc=ts` - 0% { - stroke-dasharray: 1px, 200px; - stroke-dashoffset: 0; - } - - 50% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -15px; - } - - 100% { - stroke-dasharray: 100px, 200px; - stroke-dashoffset: -125px; - } -`,Kb=typeof Fc!="string"?ud` - animation: ${Fc} 1.4s linear infinite; - `:null,Qb=typeof Dc!="string"?ud` - animation: ${Dc} 1.4s ease-in-out infinite; - `:null,qb=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${ie(r)}`],svg:["svg"],circle:["circle",`circle${ie(n)}`,o&&"circleDisableShrink"]};return Xe(i,Xb,t)},Zb=re("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ie(n.color)}`]]}})(Ae(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Kb||{animation:`${Fc} 1.4s linear infinite`}},...Object.entries(e.palette).filter(xn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Jb=re("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),eC=re("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ie(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ae(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Qb||{animation:`${Dc} 1.4s ease-in-out infinite`}}]}))),tC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:s=!1,size:l=40,style:a,thickness:u=3.6,value:d=0,variant:f="indeterminate",...m}=r,x={...r,color:i,disableShrink:s,size:l,thickness:u,value:d,variant:f},S=qb(x),y={},b={},p={};if(f==="determinate"){const h=2*Math.PI*((tr-u)/2);y.strokeDasharray=h.toFixed(3),p["aria-valuenow"]=Math.round(d),y.strokeDashoffset=`${((100-d)/100*h).toFixed(3)}px`,b.transform="rotate(-90deg)"}return C.jsx(Zb,{className:me(S.root,o),style:{width:l,height:l,...b,...a},ownerState:x,ref:n,role:"progressbar",...p,...m,children:C.jsx(Jb,{className:S.svg,ownerState:x,viewBox:`${tr/2} ${tr/2} ${tr} ${tr}`,children:C.jsx(eC,{className:S.circle,style:y,ownerState:x,cx:tr,cy:tr,r:(tr-u)/2,fill:"none",strokeWidth:u})})})});function nC(e){const t=pt(e);return t.body===e?Hn(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ki(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function um(e){return parseInt(Hn(e).getComputedStyle(e).paddingRight,10)||0}function rC(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function cm(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,s=>{const l=!i.includes(s),a=!rC(s);l&&a&&ki(s,o)})}function Eu(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function oC(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(nC(r)){const s=Th(pt(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${um(r)+s}px`;const l=pt(r).querySelectorAll(".mui-fixed");[].forEach.call(l,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${um(a)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=pt(r).body;else{const s=r.parentElement,l=Hn(r);i=(s==null?void 0:s.nodeName)==="HTML"&&l.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:l})=>{i?s.style.setProperty(l,i):s.style.removeProperty(l)})}}function iC(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class sC{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ki(t.modalRef,!1);const o=iC(n);cm(n,t.mount,t.modalRef,o,!0);const i=Eu(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Eu(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=oC(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Eu(this.containers,s=>s.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&ki(t.modalRef,n),cm(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&ki(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const lC=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function aC(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function uC(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function cC(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||uC(e))}function dC(e){const t=[],n=[];return Array.from(e.querySelectorAll(lC)).forEach((r,o)=>{const i=aC(r);i===-1||!cC(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function fC(){return!0}function pC(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=dC,isEnabled:s=fC,open:l}=e,a=v.useRef(!1),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),m=v.useRef(null),x=v.useRef(!1),S=v.useRef(null),y=ht(is(t),S),b=v.useRef(null);v.useEffect(()=>{!l||!S.current||(x.current=!n)},[n,l]),v.useEffect(()=>{if(!l||!S.current)return;const c=pt(S.current);return S.current.contains(c.activeElement)||(S.current.hasAttribute("tabIndex")||S.current.setAttribute("tabIndex","-1"),x.current&&S.current.focus()),()=>{o||(f.current&&f.current.focus&&(a.current=!0,f.current.focus()),f.current=null)}},[l]),v.useEffect(()=>{if(!l||!S.current)return;const c=pt(S.current),w=R=>{b.current=R,!(r||!s()||R.key!=="Tab")&&c.activeElement===S.current&&R.shiftKey&&(a.current=!0,d.current&&d.current.focus())},k=()=>{var g,I;const R=S.current;if(R===null)return;if(!c.hasFocus()||!s()||a.current){a.current=!1;return}if(R.contains(c.activeElement)||r&&c.activeElement!==u.current&&c.activeElement!==d.current)return;if(c.activeElement!==m.current)m.current=null;else if(m.current!==null)return;if(!x.current)return;let T=[];if((c.activeElement===u.current||c.activeElement===d.current)&&(T=i(S.current)),T.length>0){const z=!!((g=b.current)!=null&&g.shiftKey&&((I=b.current)==null?void 0:I.key)==="Tab"),F=T[0],$=T[T.length-1];typeof F!="string"&&typeof $!="string"&&(z?$.focus():F.focus())}else R.focus()};c.addEventListener("focusin",k),c.addEventListener("keydown",w,!0);const E=setInterval(()=>{c.activeElement&&c.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(E),c.removeEventListener("focusin",k),c.removeEventListener("keydown",w,!0)}},[n,r,o,s,l,i]);const p=c=>{f.current===null&&(f.current=c.relatedTarget),x.current=!0,m.current=c.target;const w=t.props.onFocus;w&&w(c)},h=c=>{f.current===null&&(f.current=c.relatedTarget),x.current=!0};return C.jsxs(v.Fragment,{children:[C.jsx("div",{tabIndex:l?0:-1,onFocus:h,ref:u,"data-testid":"sentinelStart"}),v.cloneElement(t,{ref:y,onFocus:p}),C.jsx("div",{tabIndex:l?0:-1,onFocus:h,ref:d,"data-testid":"sentinelEnd"})]})}function mC(e){return typeof e=="function"?e():e}function hC(e){return e?e.props.hasOwnProperty("in"):!1}const gC=new sC;function vC(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=gC,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:l,children:a,onClose:u,open:d,rootRef:f}=e,m=v.useRef({}),x=v.useRef(null),S=v.useRef(null),y=ht(S,f),[b,p]=v.useState(!d),h=hC(a);let c=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(c=!1);const w=()=>pt(x.current),k=()=>(m.current.modalRef=S.current,m.current.mount=x.current,m.current),E=()=>{o.mount(k(),{disableScrollLock:r}),S.current&&(S.current.scrollTop=0)},R=rn(()=>{const j=mC(t)||w().body;o.add(k(),j),S.current&&E()}),T=v.useCallback(()=>o.isTopModal(k()),[o]),g=rn(j=>{x.current=j,j&&(d&&T()?E():S.current&&ki(S.current,c))}),I=v.useCallback(()=>{o.remove(k(),c)},[c,o]);v.useEffect(()=>()=>{I()},[I]),v.useEffect(()=>{d?R():(!h||!i)&&I()},[d,I,h,i,R]);const z=j=>H=>{var B;(B=j.onKeyDown)==null||B.call(j,H),!(H.key!=="Escape"||H.which===229||!T())&&(n||(H.stopPropagation(),u&&u(H,"escapeKeyDown")))},F=j=>H=>{var B;(B=j.onClick)==null||B.call(j,H),H.target===H.currentTarget&&u&&u(H,"backdropClick")};return{getRootProps:(j={})=>{const H=hi(e);delete H.onTransitionEnter,delete H.onTransitionExited;const B={...H,...j};return{role:"presentation",...B,onKeyDown:z(B),ref:y}},getBackdropProps:(j={})=>{const H=j;return{"aria-hidden":!0,...H,onClick:F(H),open:d}},getTransitionProps:()=>{const j=()=>{p(!1),s&&s()},H=()=>{p(!0),l&&l(),i&&I()};return{onEnter:Df(j,a==null?void 0:a.props.onEnter),onExited:Df(H,a==null?void 0:a.props.onExited)}},rootRef:y,portalRef:g,isTopModal:T,exited:b,hasTransition:h}}function yC(e){return je("MuiModal",e)}Pe("MuiModal",["root","hidden","backdrop"]);const SC=e=>{const{open:t,exited:n,classes:r}=e;return Xe({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},yC,r)},xC=re("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ae(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),wC=re($b,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),bC=v.forwardRef(function(t,n){const r=et({name:"MuiModal",props:t}),{BackdropComponent:o=wC,BackdropProps:i,classes:s,className:l,closeAfterTransition:a=!1,children:u,container:d,component:f,components:m={},componentsProps:x={},disableAutoFocus:S=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:b=!1,disablePortal:p=!1,disableRestoreFocus:h=!1,disableScrollLock:c=!1,hideBackdrop:w=!1,keepMounted:k=!1,onBackdropClick:E,onClose:R,onTransitionEnter:T,onTransitionExited:g,open:I,slotProps:z={},slots:F={},theme:$,...N}=r,U={...r,closeAfterTransition:a,disableAutoFocus:S,disableEnforceFocus:y,disableEscapeKeyDown:b,disablePortal:p,disableRestoreFocus:h,disableScrollLock:c,hideBackdrop:w,keepMounted:k},{getRootProps:j,getBackdropProps:H,getTransitionProps:B,portalRef:L,isTopModal:Y,exited:Q,hasTransition:he}=vC({...U,rootRef:n}),ye={...U,exited:Q},ae=SC(ye),Ne={};if(u.props.tabIndex===void 0&&(Ne.tabIndex="-1"),he){const{onEnter:oe,onExited:Se}=B();Ne.onEnter=oe,Ne.onExited=Se}const xe={...N,slots:{root:m.Root,backdrop:m.Backdrop,...F},slotProps:{...x,...z}},[Re,te]=Ao("root",{elementType:xC,externalForwardedProps:xe,getSlotProps:j,additionalProps:{ref:n,as:f},ownerState:ye,className:me(l,ae==null?void 0:ae.root,!ye.open&&ye.exited&&(ae==null?void 0:ae.hidden))}),[ce,q]=Ao("backdrop",{elementType:o,externalForwardedProps:xe,additionalProps:i,getSlotProps:oe=>H({...oe,onClick:Se=>{E&&E(Se),oe!=null&&oe.onClick&&oe.onClick(Se)}}),className:me(i==null?void 0:i.className,ae==null?void 0:ae.backdrop),ownerState:ye}),ue=ht(i==null?void 0:i.ref,q.ref);return!k&&!I&&(!he||Q)?null:C.jsx(vb,{ref:L,container:d,disablePortal:p,children:C.jsxs(Re,{...te,children:[!w&&o?C.jsx(ce,{...q,ref:ue}):null,C.jsx(pC,{disableEnforceFocus:y,disableAutoFocus:S,disableRestoreFocus:h,isEnabled:Y,open:I,children:v.cloneElement(u,Ne)})]})})}),dm=Pe("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),CC=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:s,multiline:l}=e,a={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${ie(i)}`,s&&"hiddenLabel",l&&"multiline"],input:["input"]},u=Xe(a,Rb,t);return{...t,...u}},EC=re(Ga,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ja(e,t),!n.disableUnderline&&t.underline]}})(Ae(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Tr.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Tr.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Tr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Tr.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Tr.disabled}, .${Tr.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Tr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(xn()).map(([s])=>{var l;return{props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(l=(e.vars||e).palette[s])==null?void 0:l.main}`}}}}),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:l})=>s.multiline&&l==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),kC=re(Wa,{name:"MuiFilledInput",slot:"Input",overridesResolver:Va})(Ae(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Uc=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:l=!1,hiddenLabel:a,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:m={},type:x="text",...S}=r,y={...r,disableUnderline:o,fullWidth:l,inputComponent:u,multiline:d,type:x},b=CC(r),p={root:{ownerState:y},input:{ownerState:y}},h=f??s?Rt(p,f??s):p,c=m.root??i.Root??EC,w=m.input??i.Input??kC;return C.jsx(vf,{slots:{root:c,input:w},componentsProps:h,fullWidth:l,inputComponent:u,multiline:d,ref:n,type:x,...S,classes:b})});Uc&&(Uc.muiName="Input");function RC(e){return je("MuiFormControl",e)}Pe("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const IC=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${ie(n)}`,r&&"fullWidth"]};return Xe(o,RC,t)},TC=re("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${ie(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),PC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiFormControl"}),{children:o,className:i,color:s="primary",component:l="div",disabled:a=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:m=!1,margin:x="none",required:S=!1,size:y="medium",variant:b="outlined",...p}=r,h={...r,color:s,component:l,disabled:a,error:u,fullWidth:f,hiddenLabel:m,margin:x,required:S,size:y,variant:b},c=IC(h),[w,k]=v.useState(()=>{let $=!1;return o&&v.Children.forEach(o,N=>{if(!Ka(N,["Input","Select"]))return;const U=Ka(N,["Select"])?N.props.input:N;U&&wb(U.props)&&($=!0)}),$}),[E,R]=v.useState(()=>{let $=!1;return o&&v.Children.forEach(o,N=>{Ka(N,["Input","Select"])&&(Fl(N.props,!0)||Fl(N.props.inputProps,!0))&&($=!0)}),$}),[T,g]=v.useState(!1);a&&T&&g(!1);const I=d!==void 0&&!a?d:T;let z;v.useRef(!1);const F=v.useMemo(()=>({adornedStart:w,setAdornedStart:k,color:s,disabled:a,error:u,filled:E,focused:I,fullWidth:f,hiddenLabel:m,size:y,onBlur:()=>{g(!1)},onEmpty:()=>{R(!1)},onFilled:()=>{R(!0)},onFocus:()=>{g(!0)},registerEffect:z,required:S,variant:b}),[w,s,a,u,E,I,f,m,z,S,y,b]);return C.jsx(hf.Provider,{value:F,children:C.jsx(TC,{as:l,ownerState:h,className:me(c.root,i),ref:n,...p,children:o})})});function jc(e){return`scale(${e}, ${e**2})`}const BC={entering:{opacity:1,transform:jc(1)},entered:{opacity:1,transform:"none"}},ku=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Vc=v.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:l,onEnter:a,onEntered:u,onEntering:d,onExit:f,onExited:m,onExiting:x,style:S,timeout:y="auto",TransitionComponent:b=zn,...p}=t,h=Ih(),c=v.useRef(),w=Ea(),k=v.useRef(null),E=ht(k,is(i),n),R=U=>j=>{if(U){const H=k.current;j===void 0?U(H):U(H,j)}},T=R(d),g=R((U,j)=>{U0(U);const{duration:H,delay:B,easing:L}=Ll({style:S,timeout:y,easing:s},{mode:"enter"});let Y;y==="auto"?(Y=w.transitions.getAutoHeightDuration(U.clientHeight),c.current=Y):Y=H,U.style.transition=[w.transitions.create("opacity",{duration:Y,delay:B}),w.transitions.create("transform",{duration:ku?Y:Y*.666,delay:B,easing:L})].join(","),a&&a(U,j)}),I=R(u),z=R(x),F=R(U=>{const{duration:j,delay:H,easing:B}=Ll({style:S,timeout:y,easing:s},{mode:"exit"});let L;y==="auto"?(L=w.transitions.getAutoHeightDuration(U.clientHeight),c.current=L):L=j,U.style.transition=[w.transitions.create("opacity",{duration:L,delay:H}),w.transitions.create("transform",{duration:ku?L:L*.666,delay:ku?H:H||L*.333,easing:B})].join(","),U.style.opacity=0,U.style.transform=jc(.75),f&&f(U)}),$=R(m),N=U=>{y==="auto"&&h.start(c.current||0,U),r&&r(k.current,U)};return C.jsx(b,{appear:o,in:l,nodeRef:k,onEnter:g,onEntered:I,onEntering:T,onExit:F,onExited:$,onExiting:z,addEndListener:N,timeout:y==="auto"?null:y,...p,children:(U,j)=>v.cloneElement(i,{style:{opacity:0,transform:jc(.75),visibility:U==="exited"&&!l?"hidden":void 0,...BC[U],...S,...i.props.style},ref:E,...j})})});Vc&&(Vc.muiSupportAuto=!0);const OC=e=>{const{classes:t,disableUnderline:n}=e,o=Xe({root:["root",!n&&"underline"],input:["input"]},Eb,t);return{...t,...o}},MC=re(Ga,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ja(e,t),!n.disableUnderline&&t.underline]}})(Ae(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ni.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ni.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ni.disabled}, .${ni.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${ni.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(xn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),NC=re(Wa,{name:"MuiInput",slot:"Input",overridesResolver:Va})({}),Gc=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:l=!1,inputComponent:a="input",multiline:u=!1,slotProps:d,slots:f={},type:m="text",...x}=r,S=OC(r),b={root:{ownerState:{disableUnderline:o}}},p=d??s?Rt(d??s,b):b,h=f.root??i.Root??MC,c=f.input??i.Input??NC;return C.jsx(vf,{slots:{root:h,input:c},slotProps:p,fullWidth:l,inputComponent:a,multiline:u,ref:n,type:m,...x,classes:S})});Gc&&(Gc.muiName="Input");const Wc=v.createContext({});function $C(e){return je("MuiList",e)}Pe("MuiList",["root","padding","dense","subheader"]);const zC=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Xe({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},$C,t)},_C=re("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),LC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:l=!1,disablePadding:a=!1,subheader:u,...d}=r,f=v.useMemo(()=>({dense:l}),[l]),m={...r,component:s,dense:l,disablePadding:a},x=zC(m);return C.jsx(Wc.Provider,{value:f,children:C.jsxs(_C,{as:s,className:me(x.root,i),ref:n,ownerState:m,...d,children:[u,o]})})}),fm=Pe("MuiListItemIcon",["root","alignItemsFlexStart"]),pm=Pe("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Ru(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function mm(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function H0(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function ri(e,t,n,r,o,i){let s=!1,l=o(e,t,t?n:!1);for(;l;){if(l===e.firstChild){if(s)return!1;s=!0}const a=r?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!H0(l,i)||a)l=o(e,l,n);else return l.focus(),!0}return!1}const AC=v.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:l,disabledItemsFocusable:a=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...m}=t,x=v.useRef(null),S=v.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Nn(()=>{o&&x.current.focus()},[o]),v.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(c,{direction:w})=>{const k=!x.current.style.width;if(c.clientHeight{const w=x.current,k=c.key;if(c.ctrlKey||c.metaKey||c.altKey){d&&d(c);return}const R=pt(w).activeElement;if(k==="ArrowDown")c.preventDefault(),ri(w,R,u,a,Ru);else if(k==="ArrowUp")c.preventDefault(),ri(w,R,u,a,mm);else if(k==="Home")c.preventDefault(),ri(w,null,u,a,Ru);else if(k==="End")c.preventDefault(),ri(w,null,u,a,mm);else if(k.length===1){const T=S.current,g=k.toLowerCase(),I=performance.now();T.keys.length>0&&(I-T.lastTime>500?(T.keys=[],T.repeating=!0,T.previousKeyMatched=!0):T.repeating&&g!==T.keys[0]&&(T.repeating=!1)),T.lastTime=I,T.keys.push(g);const z=R&&!T.repeating&&H0(R,T);T.previousKeyMatched&&(z||ri(w,R,!1,a,Ru,T))?c.preventDefault():T.previousKeyMatched=!1}d&&d(c)},b=ht(x,n);let p=-1;v.Children.forEach(s,(c,w)=>{if(!v.isValidElement(c)){p===w&&(p+=1,p>=s.length&&(p=-1));return}c.props.disabled||(f==="selectedMenu"&&c.props.selected||p===-1)&&(p=w),p===w&&(c.props.disabled||c.props.muiSkipListHighlight||c.type.muiSkipListHighlight)&&(p+=1,p>=s.length&&(p=-1))});const h=v.Children.map(s,(c,w)=>{if(w===p){const k={};return i&&(k.autoFocus=!0),c.props.tabIndex===void 0&&f==="selectedMenu"&&(k.tabIndex=0),v.cloneElement(c,k)}return c});return C.jsx(LC,{role:"menu",ref:b,className:l,onKeyDown:y,tabIndex:o?0:-1,...m,children:h})});function FC(e){return je("MuiPopover",e)}Pe("MuiPopover",["root","paper"]);function hm(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function gm(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function vm(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Iu(e){return typeof e=="function"?e():e}const DC=e=>{const{classes:t}=e;return Xe({root:["root"],paper:["paper"]},FC,t)},UC=re(bC,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Y0=re(X2,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),jC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:a="anchorEl",children:u,className:d,container:f,elevation:m=8,marginThreshold:x=16,open:S,PaperProps:y={},slots:b={},slotProps:p={},transformOrigin:h={vertical:"top",horizontal:"left"},TransitionComponent:c=Vc,transitionDuration:w="auto",TransitionProps:{onEntering:k,...E}={},disableScrollLock:R=!1,...T}=r,g=(p==null?void 0:p.paper)??y,I=v.useRef(),z={...r,anchorOrigin:s,anchorReference:a,elevation:m,marginThreshold:x,externalPaperSlotProps:g,transformOrigin:h,TransitionComponent:c,transitionDuration:w,TransitionProps:E},F=DC(z),$=v.useCallback(()=>{if(a==="anchorPosition")return l;const q=Iu(i),oe=(q&&q.nodeType===1?q:pt(I.current).body).getBoundingClientRect();return{top:oe.top+hm(oe,s.vertical),left:oe.left+gm(oe,s.horizontal)}},[i,s.horizontal,s.vertical,l,a]),N=v.useCallback(q=>({vertical:hm(q,h.vertical),horizontal:gm(q,h.horizontal)}),[h.horizontal,h.vertical]),U=v.useCallback(q=>{const ue={width:q.offsetWidth,height:q.offsetHeight},oe=N(ue);if(a==="none")return{top:null,left:null,transformOrigin:vm(oe)};const Se=$();let O=Se.top-oe.vertical,G=Se.left-oe.horizontal;const _=O+ue.height,W=G+ue.width,Z=Hn(Iu(i)),K=Z.innerHeight-x,le=Z.innerWidth-x;if(x!==null&&OK){const de=_-K;O-=de,oe.vertical+=de}if(x!==null&&Gle){const de=W-le;G-=de,oe.horizontal+=de}return{top:`${Math.round(O)}px`,left:`${Math.round(G)}px`,transformOrigin:vm(oe)}},[i,a,$,N,x]),[j,H]=v.useState(S),B=v.useCallback(()=>{const q=I.current;if(!q)return;const ue=U(q);ue.top!==null&&q.style.setProperty("top",ue.top),ue.left!==null&&(q.style.left=ue.left),q.style.transformOrigin=ue.transformOrigin,H(!0)},[U]);v.useEffect(()=>(R&&window.addEventListener("scroll",B),()=>window.removeEventListener("scroll",B)),[i,R,B]);const L=(q,ue)=>{k&&k(q,ue),B()},Y=()=>{H(!1)};v.useEffect(()=>{S&&B()}),v.useImperativeHandle(o,()=>S?{updatePosition:()=>{B()}}:null,[S,B]),v.useEffect(()=>{if(!S)return;const q=wa(()=>{B()}),ue=Hn(i);return ue.addEventListener("resize",q),()=>{q.clear(),ue.removeEventListener("resize",q)}},[i,S,B]);let Q=w;w==="auto"&&!c.muiSupportAuto&&(Q=void 0);const he=f||(i?pt(Iu(i)).body:void 0),ye={slots:b,slotProps:{...p,paper:g}},[ae,Ne]=Ao("paper",{elementType:Y0,externalForwardedProps:ye,additionalProps:{elevation:m,className:me(F.paper,g==null?void 0:g.className),style:j?g.style:{...g.style,opacity:0}},ownerState:z}),[xe,{slotProps:Re,...te}]=Ao("root",{elementType:UC,externalForwardedProps:ye,additionalProps:{slotProps:{backdrop:{invisible:!0}},container:he,open:S},ownerState:z,className:me(F.root,d)}),ce=ht(I,Ne.ref);return C.jsx(xe,{...te,...!Dr(xe)&&{slotProps:Re,disableScrollLock:R},...T,ref:n,children:C.jsx(c,{appear:!0,in:S,onEntering:L,onExited:Y,timeout:Q,...E,children:C.jsx(ae,{...Ne,ref:ce,children:u})})})});function VC(e){return je("MuiMenu",e)}Pe("MuiMenu",["root","paper","list"]);const GC={vertical:"top",horizontal:"right"},WC={vertical:"top",horizontal:"left"},HC=e=>{const{classes:t}=e;return Xe({root:["root"],paper:["paper"],list:["list"]},VC,t)},YC=re(jC,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),XC=re(Y0,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),KC=re(AC,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),QC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:s,disableAutoFocusItem:l=!1,MenuListProps:a={},onClose:u,open:d,PaperProps:f={},PopoverClasses:m,transitionDuration:x="auto",TransitionProps:{onEntering:S,...y}={},variant:b="selectedMenu",slots:p={},slotProps:h={},...c}=r,w=ba(),k={...r,autoFocus:o,disableAutoFocusItem:l,MenuListProps:a,onEntering:S,PaperProps:f,transitionDuration:x,TransitionProps:y,variant:b},E=HC(k),R=o&&!l&&d,T=v.useRef(null),g=(j,H)=>{T.current&&T.current.adjustStyleForScrollbar(j,{direction:w?"rtl":"ltr"}),S&&S(j,H)},I=j=>{j.key==="Tab"&&(j.preventDefault(),u&&u(j,"tabKeyDown"))};let z=-1;v.Children.map(i,(j,H)=>{v.isValidElement(j)&&(j.props.disabled||(b==="selectedMenu"&&j.props.selected||z===-1)&&(z=H))});const F=p.paper??XC,$=h.paper??f,N=$t({elementType:p.root,externalSlotProps:h.root,ownerState:k,className:[E.root,s]}),U=$t({elementType:F,externalSlotProps:$,ownerState:k,className:E.paper});return C.jsx(YC,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?GC:WC,slots:{paper:F,root:p.root},slotProps:{root:N,paper:U},open:d,ref:n,transitionDuration:x,TransitionProps:{onEntering:g,...y},ownerState:k,...c,classes:m,children:C.jsx(KC,{onKeyDown:I,actions:T,autoFocus:o&&(z===-1||l),autoFocusItem:R,variant:b,...a,className:me(E.list,a.className),children:i})})});function qC(e){return je("MuiMenuItem",e)}const oi=Pe("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),ZC=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},JC=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=e,a=Xe({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},qC,s);return{...s,...a}},eE=re(Ua,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:ZC})(Ae(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${oi.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Pt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${oi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${oi.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Pt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${oi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${oi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${dm.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${dm.inset}`]:{marginLeft:52},[`& .${pm.root}`]:{marginTop:0,marginBottom:0},[`& .${pm.inset}`]:{paddingLeft:36},[`& .${fm.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${fm.root} svg`]:{fontSize:"1.25rem"}}}]}))),tE=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:l=!1,disableGutters:a=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:m,...x}=r,S=v.useContext(Wc),y=v.useMemo(()=>({dense:s||S.dense||!1,disableGutters:a}),[S.dense,s,a]),b=v.useRef(null);Nn(()=>{o&&b.current&&b.current.focus()},[o]);const p={...r,dense:y.dense,divider:l,disableGutters:a},h=JC(r),c=ht(b,n);let w;return r.disabled||(w=f!==void 0?f:-1),C.jsx(Wc.Provider,{value:y,children:C.jsx(eE,{ref:c,role:d,tabIndex:w,component:i,focusVisibleClassName:me(h.focusVisible,u),className:me(h.root,m),...x,ownerState:p,classes:h})})});function nE(e){return je("MuiNativeSelect",e)}const yf=Pe("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),rE=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${ie(n)}`,i&&"iconOpen",r&&"disabled"]};return Xe(l,nE,t)},X0=re("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${yf.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),oE=re(X0,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:wn,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${yf.multiple}`]:t.multiple}]}})({}),K0=re("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${yf.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),iE=re(K0,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ie(n.variant)}`],n.open&&t.iconOpen]}})({}),sE=v.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:s,inputRef:l,variant:a="standard",...u}=t,d={...t,disabled:o,variant:a,error:i},f=rE(d);return C.jsxs(v.Fragment,{children:[C.jsx(oE,{ownerState:d,className:me(f.select,r),disabled:o,ref:l||n,...u}),t.multiple?null:C.jsx(iE,{as:s,ownerState:d,className:f.icon})]})});var ym;const lE=re("fieldset",{shouldForwardProp:wn})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),aE=re("legend",{shouldForwardProp:wn})(Ae(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function uE(e){const{children:t,classes:n,className:r,label:o,notched:i,...s}=e,l=o!=null&&o!=="",a={...e,notched:i,withLabel:l};return C.jsx(lE,{"aria-hidden":!0,className:r,ownerState:a,...s,children:C.jsx(aE,{ownerState:a,children:l?C.jsx("span",{children:o}):ym||(ym=C.jsx("span",{className:"notranslate",children:"​"}))})})}const cE=e=>{const{classes:t}=e,r=Xe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},kb,t);return{...t,...r}},dE=re(Ga,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ja})(Ae(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${En.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},[`&.${En.focused} .${En.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(xn()).map(([n])=>({props:{color:n},style:{[`&.${En.focused} .${En.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{"@media (hover: none)":{[`&:hover .${En.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${En.error} .${En.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${En.disabled} .${En.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),fE=re(uE,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Ae(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),pE=re(Wa,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Va})(Ae(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Hc=v.forwardRef(function(t,n){var r;const o=et({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:s=!1,inputComponent:l="input",label:a,multiline:u=!1,notched:d,slots:f={},type:m="text",...x}=o,S=cE(o),y=gf(),b=mf({props:o,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),p={...o,color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:y,fullWidth:s,hiddenLabel:b.hiddenLabel,multiline:u,size:b.size,type:m},h=f.root??i.Root??dE,c=f.input??i.Input??pE;return C.jsx(vf,{slots:{root:h,input:c},renderSuffix:w=>C.jsx(fE,{ownerState:p,className:S.notchedOutline,label:a!=null&&a!==""&&b.required?r||(r=C.jsxs(v.Fragment,{children:[a," ","*"]})):a,notched:typeof d<"u"?d:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:s,inputComponent:l,multiline:u,ref:n,type:m,...x,classes:{...S,notchedOutline:null}})});Hc&&(Hc.muiName="Input");function mE(e){return je("MuiSelect",e)}const ii=Pe("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Sm;const hE=re(X0,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ii.select}`]:t.select},{[`&.${ii.select}`]:t[n.variant]},{[`&.${ii.error}`]:t.error},{[`&.${ii.multiple}`]:t.multiple}]}})({[`&.${ii.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),gE=re(K0,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ie(n.variant)}`],n.open&&t.iconOpen]}})({}),vE=re("input",{shouldForwardProp:e=>ka(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function xm(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function yE(e){return e==null||typeof e=="string"&&!e.trim()}const SE=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${ie(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Xe(l,mE,t)},xE=v.forwardRef(function(t,n){var wt;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:s,children:l,className:a,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:m,error:x=!1,IconComponent:S,inputRef:y,labelId:b,MenuProps:p={},multiple:h,name:c,onBlur:w,onChange:k,onClose:E,onFocus:R,onOpen:T,open:g,readOnly:I,renderValue:z,SelectDisplayProps:F={},tabIndex:$,type:N,value:U,variant:j="standard",...H}=t,[B,L]=Uu({controlled:U,default:d,name:"Select"}),[Y,Q]=Uu({controlled:g,default:u,name:"Select"}),he=v.useRef(null),ye=v.useRef(null),[ae,Ne]=v.useState(null),{current:xe}=v.useRef(g!=null),[Re,te]=v.useState(),ce=ht(n,y),q=v.useCallback(ne=>{ye.current=ne,ne&&Ne(ne)},[]),ue=ae==null?void 0:ae.parentNode;v.useImperativeHandle(ce,()=>({focus:()=>{ye.current.focus()},node:he.current,value:B}),[B]),v.useEffect(()=>{u&&Y&&ae&&!xe&&(te(s?null:ue.clientWidth),ye.current.focus())},[ae,s]),v.useEffect(()=>{i&&ye.current.focus()},[i]),v.useEffect(()=>{if(!b)return;const ne=pt(ye.current).getElementById(b);if(ne){const D=()=>{getSelection().isCollapsed&&ye.current.focus()};return ne.addEventListener("click",D),()=>{ne.removeEventListener("click",D)}}},[b]);const oe=(ne,D)=>{ne?T&&T(D):E&&E(D),xe||(te(s?null:ue.clientWidth),Q(ne))},Se=ne=>{ne.button===0&&(ne.preventDefault(),ye.current.focus(),oe(!0,ne))},O=ne=>{oe(!1,ne)},G=v.Children.toArray(l),_=ne=>{const D=G.find(X=>X.props.value===ne.target.value);D!==void 0&&(L(D.props.value),k&&k(ne,D))},W=ne=>D=>{let X;if(D.currentTarget.hasAttribute("tabindex")){if(h){X=Array.isArray(B)?B.slice():[];const ge=B.indexOf(ne.props.value);ge===-1?X.push(ne.props.value):X.splice(ge,1)}else X=ne.props.value;if(ne.props.onClick&&ne.props.onClick(D),B!==X&&(L(X),k)){const ge=D.nativeEvent||D,be=new ge.constructor(ge.type,ge);Object.defineProperty(be,"target",{writable:!0,value:{value:X,name:c}}),k(be,ne)}h||oe(!1,D)}},Z=ne=>{I||[" ","ArrowUp","ArrowDown","Enter"].includes(ne.key)&&(ne.preventDefault(),oe(!0,ne))},K=ae!==null&&Y,le=ne=>{!K&&w&&(Object.defineProperty(ne,"target",{writable:!0,value:{value:B,name:c}}),w(ne))};delete H["aria-invalid"];let de,$e;const P=[];let A=!1;(Fl({value:B})||m)&&(z?de=z(B):A=!0);const J=G.map(ne=>{if(!v.isValidElement(ne))return null;let D;if(h){if(!Array.isArray(B))throw new Error(Gn(2));D=B.some(X=>xm(X,ne.props.value)),D&&A&&P.push(ne.props.children)}else D=xm(B,ne.props.value),D&&A&&($e=ne.props.children);return v.cloneElement(ne,{"aria-selected":D?"true":"false",onClick:W(ne),onKeyUp:X=>{X.key===" "&&X.preventDefault(),ne.props.onKeyUp&&ne.props.onKeyUp(X)},role:"option",selected:D,value:void 0,"data-value":ne.props.value})});A&&(h?P.length===0?de=null:de=P.reduce((ne,D,X)=>(ne.push(D),X{const{classes:t}=e;return t},Sf={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>wn(e)&&e!=="variant",slot:"Root"},bE=re(Gc,Sf)(""),CE=re(Hc,Sf)(""),EE=re(Uc,Sf)(""),Q0=v.forwardRef(function(t,n){const r=zh({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:s={},className:l,defaultOpen:a=!1,displayEmpty:u=!1,IconComponent:d=Ib,id:f,input:m,inputProps:x,label:S,labelId:y,MenuProps:b,multiple:p=!1,native:h=!1,onClose:c,onOpen:w,open:k,renderValue:E,SelectDisplayProps:R,variant:T="outlined",...g}=r,I=h?sE:xE,z=gf(),F=mf({props:r,muiFormControl:z,states:["variant","error"]}),$=F.variant||T,N={...r,variant:$,classes:s},U=wE(N),{root:j,...H}=U,B=m||{standard:C.jsx(bE,{ownerState:N}),outlined:C.jsx(CE,{label:S,ownerState:N}),filled:C.jsx(EE,{ownerState:N})}[$],L=ht(n,is(B));return C.jsx(v.Fragment,{children:v.cloneElement(B,{inputComponent:I,inputProps:{children:i,error:F.error,IconComponent:d,variant:$,type:void 0,multiple:p,...h?{id:f}:{autoWidth:o,defaultOpen:a,displayEmpty:u,labelId:y,MenuProps:b,onClose:c,onOpen:w,open:k,renderValue:E,SelectDisplayProps:{id:f,...R}},...x,classes:x?Rt(H,x.classes):H,...m?m.props.inputProps:{}},...(p&&h||u)&&$==="outlined"?{notched:!0}:{},ref:L,className:me(B.props.className,l,U.root),...!m&&{variant:$},...g})})});Q0.muiName="Select";function kE(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const RE=2;function q0(e,t){return e-t}function wm(e,t){const{index:n}=e.reduce((r,o,i)=>{const s=Math.abs(t-o);return r===null||s({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},OE=e=>e;let Ds;function Cm(){return Ds===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Ds=CSS.supports("touch-action","none"):Ds=!0),Ds}function ME(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:i=!1,marks:s=!1,max:l=100,min:a=0,name:u,onChange:d,onChangeCommitted:f,orientation:m="horizontal",rootRef:x,scale:S=OE,step:y=1,shiftStep:b=10,tabIndex:p,value:h}=e,c=v.useRef(void 0),[w,k]=v.useState(-1),[E,R]=v.useState(-1),[T,g]=v.useState(!1),I=v.useRef(0),[z,F]=Uu({controlled:h,default:n??a,name:"Slider"}),$=d&&((P,A,J)=>{const se=P.nativeEvent||P,we=new se.constructor(se.type,se);Object.defineProperty(we,"target",{writable:!0,value:{value:A,name:u}}),d(we,A,J)}),N=Array.isArray(z);let U=N?z.slice().sort(q0):[z];U=U.map(P=>P==null?a:lo(P,a,l));const j=s===!0&&y!==null?[...Array(Math.floor((l-a)/y)+1)].map((P,A)=>({value:a+y*A})):s||[],H=j.map(P=>P.value),[B,L]=v.useState(-1),Y=v.useRef(null),Q=ht(x,Y),he=P=>A=>{var se;const J=Number(A.currentTarget.getAttribute("data-index"));cl(A.target)&&L(J),R(J),(se=P==null?void 0:P.onFocus)==null||se.call(P,A)},ye=P=>A=>{var J;cl(A.target)||L(-1),R(-1),(J=P==null?void 0:P.onBlur)==null||J.call(P,A)},ae=(P,A)=>{const J=Number(P.currentTarget.getAttribute("data-index")),se=U[J],we=H.indexOf(se);let fe=A;if(j&&y==null){const Ee=H[H.length-1];fe>Ee?fe=Ee:feA=>{var J;if(y!==null){const se=Number(A.currentTarget.getAttribute("data-index")),we=U[se];let fe=null;(A.key==="ArrowLeft"||A.key==="ArrowDown")&&A.shiftKey||A.key==="PageDown"?fe=Math.max(we-b,a):((A.key==="ArrowRight"||A.key==="ArrowUp")&&A.shiftKey||A.key==="PageUp")&&(fe=Math.min(we+b,l)),fe!==null&&(ae(A,fe),A.preventDefault())}(J=P==null?void 0:P.onKeyDown)==null||J.call(P,A)};Nn(()=>{var P;r&&Y.current.contains(document.activeElement)&&((P=document.activeElement)==null||P.blur())},[r]),r&&w!==-1&&k(-1),r&&B!==-1&&L(-1);const xe=P=>A=>{var J;(J=P.onChange)==null||J.call(P,A),ae(A,A.target.valueAsNumber)},Re=v.useRef(void 0);let te=m;i&&m==="horizontal"&&(te+="-reverse");const ce=({finger:P,move:A=!1})=>{const{current:J}=Y,{width:se,height:we,bottom:fe,left:Ee}=J.getBoundingClientRect();let Be;te.startsWith("vertical")?Be=(fe-P.y)/we:Be=(P.x-Ee)/se,te.includes("-reverse")&&(Be=1-Be);let pe;if(pe=IE(Be,a,l),y)pe=PE(pe,y,a);else{const wt=wm(H,pe);pe=H[wt]}pe=lo(pe,a,l);let We=0;if(N){A?We=Re.current:We=wm(U,pe),o&&(pe=lo(pe,U[We-1]||-1/0,U[We+1]||1/0));const wt=pe;pe=bm({values:U,newValue:pe,index:We}),o&&A||(We=pe.indexOf(wt),Re.current=We)}return{newValue:pe,activeIndex:We}},q=rn(P=>{const A=Ls(P,c);if(!A)return;if(I.current+=1,P.type==="mousemove"&&P.buttons===0){ue(P);return}const{newValue:J,activeIndex:se}=ce({finger:A,move:!0});As({sliderRef:Y,activeIndex:se,setActive:k}),F(J),!T&&I.current>RE&&g(!0),$&&!Fs(J,z)&&$(P,J,se)}),ue=rn(P=>{const A=Ls(P,c);if(g(!1),!A)return;const{newValue:J}=ce({finger:A,move:!0});k(-1),P.type==="touchend"&&R(-1),f&&f(P,J),c.current=void 0,Se()}),oe=rn(P=>{if(r)return;Cm()||P.preventDefault();const A=P.changedTouches[0];A!=null&&(c.current=A.identifier);const J=Ls(P,c);if(J!==!1){const{newValue:we,activeIndex:fe}=ce({finger:J});As({sliderRef:Y,activeIndex:fe,setActive:k}),F(we),$&&!Fs(we,z)&&$(P,we,fe)}I.current=0;const se=pt(Y.current);se.addEventListener("touchmove",q,{passive:!0}),se.addEventListener("touchend",ue,{passive:!0})}),Se=v.useCallback(()=>{const P=pt(Y.current);P.removeEventListener("mousemove",q),P.removeEventListener("mouseup",ue),P.removeEventListener("touchmove",q),P.removeEventListener("touchend",ue)},[ue,q]);v.useEffect(()=>{const{current:P}=Y;return P.addEventListener("touchstart",oe,{passive:Cm()}),()=>{P.removeEventListener("touchstart",oe),Se()}},[Se,oe]),v.useEffect(()=>{r&&Se()},[r,Se]);const O=P=>A=>{var we;if((we=P.onMouseDown)==null||we.call(P,A),r||A.defaultPrevented||A.button!==0)return;A.preventDefault();const J=Ls(A,c);if(J!==!1){const{newValue:fe,activeIndex:Ee}=ce({finger:J});As({sliderRef:Y,activeIndex:Ee,setActive:k}),F(fe),$&&!Fs(fe,z)&&$(A,fe,Ee)}I.current=0;const se=pt(Y.current);se.addEventListener("mousemove",q,{passive:!0}),se.addEventListener("mouseup",ue)},G=Dl(N?U[0]:a,a,l),_=Dl(U[U.length-1],a,l)-G,W=(P={})=>{const A=hi(P),J={onMouseDown:O(A||{})},se={...A,...J};return{...P,ref:Q,...se}},Z=P=>A=>{var se;(se=P.onMouseOver)==null||se.call(P,A);const J=Number(A.currentTarget.getAttribute("data-index"));R(J)},K=P=>A=>{var J;(J=P.onMouseLeave)==null||J.call(P,A),R(-1)};return{active:w,axis:te,axisProps:BE,dragging:T,focusedThumbIndex:B,getHiddenInputProps:(P={})=>{const A=hi(P),J={onChange:xe(A||{}),onFocus:he(A||{}),onBlur:ye(A||{}),onKeyDown:Ne(A||{})},se={...A,...J};return{tabIndex:p,"aria-labelledby":t,"aria-orientation":m,"aria-valuemax":S(l),"aria-valuemin":S(a),name:u,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:r,...P,...se,style:{...jS,direction:i?"rtl":"ltr",width:"100%",height:"100%"}}},getRootProps:W,getThumbProps:(P={})=>{const A=hi(P),J={onMouseOver:Z(A||{}),onMouseLeave:K(A||{})};return{...P,...A,...J}},marks:j,open:E,range:N,rootRef:Q,trackLeap:_,trackOffset:G,values:U,getThumbStyle:P=>({pointerEvents:w!==-1&&w!==P?"none":void 0})}}const NE=e=>!e||!Dr(e);function $E(e){return je("MuiSlider",e)}const sn=Pe("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),zE=e=>{const{open:t}=e;return{offset:me(t&&sn.valueLabelOpen),circle:sn.valueLabelCircle,label:sn.valueLabelLabel}};function _E(e){const{children:t,className:n,value:r}=e,o=zE(e);return t?v.cloneElement(t,{className:me(t.props.className)},C.jsxs(v.Fragment,{children:[t.props.children,C.jsx("span",{className:me(o.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:o.circle,children:C.jsx("span",{className:o.label,children:r})})})]})):null}function Em(e){return e}const LE=re("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${ie(n.color)}`],n.size!=="medium"&&t[`size${ie(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(Ae(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${sn.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${sn.dragging}`]:{[`& .${sn.thumb}, & .${sn.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(xn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),AE=re("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),FE=re("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(Ae(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(xn()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:$i(e.palette[t].main,.62),borderColor:$i(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:Ni(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:Ni(e.palette[t].main,.5)})}}}))]}))),DE=re("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${ie(n.color)}`],n.size!=="medium"&&t[`thumbSize${ie(n.size)}`]]}})(Ae(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${sn.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(xn()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${sn.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Pt(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${sn.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Pt(e.palette[t].main,.16)}`}}}}))]}))),UE=re(_E,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(Ae(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${sn.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${sn.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),jE=re("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>ka(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(Ae(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),VE=re("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>ka(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(Ae(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),GE=e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:i,classes:s,color:l,size:a}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",l&&`color${ie(l)}`,a&&`size${ie(a)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",a&&`thumbSize${ie(a)}`,l&&`thumbColor${ie(l)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Xe(u,$E,s)},WE=({children:e})=>e,Ul=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiSlider"}),o=ba(),{"aria-label":i,"aria-valuetext":s,"aria-labelledby":l,component:a="span",components:u={},componentsProps:d={},color:f="primary",classes:m,className:x,disableSwap:S=!1,disabled:y=!1,getAriaLabel:b,getAriaValueText:p,marks:h=!1,max:c=100,min:w=0,name:k,onChange:E,onChangeCommitted:R,orientation:T="horizontal",shiftStep:g=10,size:I="medium",step:z=1,scale:F=Em,slotProps:$,slots:N,tabIndex:U,track:j="normal",value:H,valueLabelDisplay:B="off",valueLabelFormat:L=Em,...Y}=r,Q={...r,isRtl:o,max:c,min:w,classes:m,disabled:y,disableSwap:S,orientation:T,marks:h,color:f,size:I,step:z,shiftStep:g,scale:F,track:j,valueLabelDisplay:B,valueLabelFormat:L},{axisProps:he,getRootProps:ye,getHiddenInputProps:ae,getThumbProps:Ne,open:xe,active:Re,axis:te,focusedThumbIndex:ce,range:q,dragging:ue,marks:oe,values:Se,trackOffset:O,trackLeap:G,getThumbStyle:_}=ME({...Q,rootRef:n});Q.marked=oe.length>0&&oe.some(De=>De.label),Q.dragging=ue,Q.focusedThumbIndex=ce;const W=GE(Q),Z=(N==null?void 0:N.root)??u.Root??LE,K=(N==null?void 0:N.rail)??u.Rail??AE,le=(N==null?void 0:N.track)??u.Track??FE,de=(N==null?void 0:N.thumb)??u.Thumb??DE,$e=(N==null?void 0:N.valueLabel)??u.ValueLabel??UE,P=(N==null?void 0:N.mark)??u.Mark??jE,A=(N==null?void 0:N.markLabel)??u.MarkLabel??VE,J=(N==null?void 0:N.input)??u.Input??"input",se=($==null?void 0:$.root)??d.root,we=($==null?void 0:$.rail)??d.rail,fe=($==null?void 0:$.track)??d.track,Ee=($==null?void 0:$.thumb)??d.thumb,Be=($==null?void 0:$.valueLabel)??d.valueLabel,pe=($==null?void 0:$.mark)??d.mark,We=($==null?void 0:$.markLabel)??d.markLabel,wt=($==null?void 0:$.input)??d.input,ne=$t({elementType:Z,getSlotProps:ye,externalSlotProps:se,externalForwardedProps:Y,additionalProps:{...NE(Z)&&{as:a}},ownerState:{...Q,...se==null?void 0:se.ownerState},className:[W.root,x]}),D=$t({elementType:K,externalSlotProps:we,ownerState:Q,className:W.rail}),X=$t({elementType:le,externalSlotProps:fe,additionalProps:{style:{...he[te].offset(O),...he[te].leap(G)}},ownerState:{...Q,...fe==null?void 0:fe.ownerState},className:W.track}),ge=$t({elementType:de,getSlotProps:Ne,externalSlotProps:Ee,ownerState:{...Q,...Ee==null?void 0:Ee.ownerState},className:W.thumb}),be=$t({elementType:$e,externalSlotProps:Be,ownerState:{...Q,...Be==null?void 0:Be.ownerState},className:W.valueLabel}),Fe=$t({elementType:P,externalSlotProps:pe,ownerState:Q,className:W.mark}),Nt=$t({elementType:A,externalSlotProps:We,ownerState:Q,className:W.markLabel}),_n=$t({elementType:J,getSlotProps:ae,externalSlotProps:wt,ownerState:Q});return C.jsxs(Z,{...ne,children:[C.jsx(K,{...D}),C.jsx(le,{...X}),oe.filter(De=>De.value>=w&&De.value<=c).map((De,st)=>{const Rr=Dl(De.value,w,c),cs=he[te].offset(Rr);let Ln;return j===!1?Ln=Se.includes(De.value):Ln=j==="normal"&&(q?De.value>=Se[0]&&De.value<=Se[Se.length-1]:De.value<=Se[0])||j==="inverted"&&(q?De.value<=Se[0]||De.value>=Se[Se.length-1]:De.value>=Se[0]),C.jsxs(v.Fragment,{children:[C.jsx(P,{"data-index":st,...Fe,...!Dr(P)&&{markActive:Ln},style:{...cs,...Fe.style},className:me(Fe.className,Ln&&W.markActive)}),De.label!=null?C.jsx(A,{"aria-hidden":!0,"data-index":st,...Nt,...!Dr(A)&&{markLabelActive:Ln},style:{...cs,...Nt.style},className:me(W.markLabel,Nt.className,Ln&&W.markLabelActive),children:De.label}):null]},st)}),Se.map((De,st)=>{const Rr=Dl(De,w,c),cs=he[te].offset(Rr),Ln=B==="off"?WE:$e;return C.jsx(Ln,{...!Dr(Ln)&&{valueLabelFormat:L,valueLabelDisplay:B,value:typeof L=="function"?L(F(De),st):L,index:st,open:xe===st||Re===st||B==="on",disabled:y},...be,children:C.jsx(de,{"data-index":st,...ge,className:me(W.thumb,ge.className,Re===st&&W.active,ce===st&&W.focusVisible),style:{...cs,..._(st),...ge.style},children:C.jsx(J,{"data-index":st,"aria-label":b?b(st):i,"aria-valuenow":F(De),"aria-labelledby":l,"aria-valuetext":p?p(F(De),st):s,value:Se[st],..._n})})},st)})]})});function HE(e){return je("MuiTab",e)}const Qt=Pe("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),YE=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:s,selected:l,disabled:a}=e,u={root:["root",i&&s&&"labelIcon",`textColor${ie(n)}`,r&&"fullWidth",o&&"wrapped",l&&"selected",a&&"disabled"],icon:["iconWrapper","icon"]};return Xe(u,HE,t)},XE=re(Ua,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${ie(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Qt.iconWrapper}`]:t.iconWrapper},{[`& .${Qt.icon}`]:t.icon}]}})(Ae(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${Qt.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${Qt.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${Qt.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${Qt.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Qt.selected}`]:{opacity:1},[`&.${Qt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Qt.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Qt.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Qt.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Qt.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Tu=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:s=!1,fullWidth:l,icon:a,iconPosition:u="top",indicator:d,label:f,onChange:m,onClick:x,onFocus:S,selected:y,selectionFollowsFocus:b,textColor:p="inherit",value:h,wrapped:c=!1,...w}=r,k={...r,disabled:i,disableFocusRipple:s,selected:y,icon:!!a,iconPosition:u,label:!!f,fullWidth:l,textColor:p,wrapped:c},E=YE(k),R=a&&f&&v.isValidElement(a)?v.cloneElement(a,{className:me(E.icon,a.props.className)}):a,T=I=>{!y&&m&&m(I,h),x&&x(I)},g=I=>{b&&!y&&m&&m(I,h),S&&S(I)};return C.jsxs(XE,{focusRipple:!s,className:me(E.root,o),ref:n,role:"tab","aria-selected":y,disabled:i,onClick:T,onFocus:g,ownerState:k,tabIndex:y?0:-1,...w,children:[u==="top"||u==="start"?C.jsxs(v.Fragment,{children:[R,f]}):C.jsxs(v.Fragment,{children:[f,R]}),d]})}),KE=$n(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),QE=$n(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function qE(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function ZE(e,t,n,r={},o=()=>{}){const{ease:i=qE,duration:s=300}=r;let l=null;const a=t[e];let u=!1;const d=()=>{u=!0},f=m=>{if(u){o(new Error("Animation cancelled"));return}l===null&&(l=m);const x=Math.min(1,(m-l)/s);if(t[e]=i(x)*(n-a)+a,x>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return a===n?(o(new Error("Element already at target position")),d):(requestAnimationFrame(f),d)}const JE={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ek(e){const{onChange:t,...n}=e,r=v.useRef(),o=v.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Nn(()=>{const s=wa(()=>{const a=r.current;i(),a!==r.current&&t(r.current)}),l=Hn(o.current);return l.addEventListener("resize",s),()=>{s.clear(),l.removeEventListener("resize",s)}},[t]),v.useEffect(()=>{i(),t(r.current)},[t]),C.jsx("div",{style:JE,ref:o,...n})}function tk(e){return je("MuiTabScrollButton",e)}const nk=Pe("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),rk=e=>{const{classes:t,orientation:n,disabled:r}=e;return Xe({root:["root",n,r&&"disabled"]},tk,t)},ok=re(Ua,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${nk.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),ik=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:s={},direction:l,orientation:a,disabled:u,...d}=r,f=ba(),m={isRtl:f,...r},x=rk(m),S=i.StartScrollButtonIcon??KE,y=i.EndScrollButtonIcon??QE,b=$t({elementType:S,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),p=$t({elementType:y,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return C.jsx(ok,{component:"div",className:me(x.root,o),ref:n,role:null,ownerState:m,tabIndex:null,...d,style:{...d.style,...a==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:l==="left"?C.jsx(S,{...b}):C.jsx(y,{...p})})});function sk(e){return je("MuiTabs",e)}const Pu=Pe("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),km=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Rm=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Us=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},lk=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:s,scrollButtonsHideMobile:l,classes:a}=e;return Xe({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},sk,a)},ak=re("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Pu.scrollButtons}`]:t.scrollButtons},{[`& .${Pu.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Ae(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${Pu.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),uk=re("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),ck=re("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),dk=re("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(Ae(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),fk=re(ek)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Im={},pk=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiTabs"}),o=Ea(),i=ba(),{"aria-label":s,"aria-labelledby":l,action:a,centered:u=!1,children:d,className:f,component:m="div",allowScrollButtonsMobile:x=!1,indicatorColor:S="primary",onChange:y,orientation:b="horizontal",ScrollButtonComponent:p=ik,scrollButtons:h="auto",selectionFollowsFocus:c,slots:w={},slotProps:k={},TabIndicatorProps:E={},TabScrollButtonProps:R={},textColor:T="primary",value:g,variant:I="standard",visibleScrollbar:z=!1,...F}=r,$=I==="scrollable",N=b==="vertical",U=N?"scrollTop":"scrollLeft",j=N?"top":"left",H=N?"bottom":"right",B=N?"clientHeight":"clientWidth",L=N?"height":"width",Y={...r,component:m,allowScrollButtonsMobile:x,indicatorColor:S,orientation:b,vertical:N,scrollButtons:h,textColor:T,variant:I,visibleScrollbar:z,fixed:!$,hideScrollbar:$&&!z,scrollableX:$&&!N,scrollableY:$&&N,centered:u&&!$,scrollButtonsHideMobile:!x},Q=lk(Y),he=$t({elementType:w.StartScrollButtonIcon,externalSlotProps:k.startScrollButtonIcon,ownerState:Y}),ye=$t({elementType:w.EndScrollButtonIcon,externalSlotProps:k.endScrollButtonIcon,ownerState:Y}),[ae,Ne]=v.useState(!1),[xe,Re]=v.useState(Im),[te,ce]=v.useState(!1),[q,ue]=v.useState(!1),[oe,Se]=v.useState(!1),[O,G]=v.useState({overflow:"hidden",scrollbarWidth:0}),_=new Map,W=v.useRef(null),Z=v.useRef(null),K=()=>{const D=W.current;let X;if(D){const be=D.getBoundingClientRect();X={clientWidth:D.clientWidth,scrollLeft:D.scrollLeft,scrollTop:D.scrollTop,scrollWidth:D.scrollWidth,top:be.top,bottom:be.bottom,left:be.left,right:be.right}}let ge;if(D&&g!==!1){const be=Z.current.children;if(be.length>0){const Fe=be[_.get(g)];ge=Fe?Fe.getBoundingClientRect():null}}return{tabsMeta:X,tabMeta:ge}},le=rn(()=>{const{tabsMeta:D,tabMeta:X}=K();let ge=0,be;N?(be="top",X&&D&&(ge=X.top-D.top+D.scrollTop)):(be=i?"right":"left",X&&D&&(ge=(i?-1:1)*(X[be]-D[be]+D.scrollLeft)));const Fe={[be]:ge,[L]:X?X[L]:0};if(typeof xe[be]!="number"||typeof xe[L]!="number")Re(Fe);else{const Nt=Math.abs(xe[be]-Fe[be]),_n=Math.abs(xe[L]-Fe[L]);(Nt>=1||_n>=1)&&Re(Fe)}}),de=(D,{animation:X=!0}={})=>{X?ZE(U,W.current,D,{duration:o.transitions.duration.standard}):W.current[U]=D},$e=D=>{let X=W.current[U];N?X+=D:X+=D*(i?-1:1),de(X)},P=()=>{const D=W.current[B];let X=0;const ge=Array.from(Z.current.children);for(let be=0;beD){be===0&&(X=D);break}X+=Fe[B]}return X},A=()=>{$e(-1*P())},J=()=>{$e(P())},se=v.useCallback(D=>{G({overflow:null,scrollbarWidth:D})},[]),we=()=>{const D={};D.scrollbarSizeListener=$?C.jsx(fk,{onChange:se,className:me(Q.scrollableX,Q.hideScrollbar)}):null;const ge=$&&(h==="auto"&&(te||q)||h===!0);return D.scrollButtonStart=ge?C.jsx(p,{slots:{StartScrollButtonIcon:w.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:he},orientation:b,direction:i?"right":"left",onClick:A,disabled:!te,...R,className:me(Q.scrollButtons,R.className)}):null,D.scrollButtonEnd=ge?C.jsx(p,{slots:{EndScrollButtonIcon:w.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ye},orientation:b,direction:i?"left":"right",onClick:J,disabled:!q,...R,className:me(Q.scrollButtons,R.className)}):null,D},fe=rn(D=>{const{tabsMeta:X,tabMeta:ge}=K();if(!(!ge||!X)){if(ge[j]X[H]){const be=X[U]+(ge[H]-X[H]);de(be,{animation:D})}}}),Ee=rn(()=>{$&&h!==!1&&Se(!oe)});v.useEffect(()=>{const D=wa(()=>{W.current&&le()});let X;const ge=Nt=>{Nt.forEach(_n=>{_n.removedNodes.forEach(De=>{X==null||X.unobserve(De)}),_n.addedNodes.forEach(De=>{X==null||X.observe(De)})}),D(),Ee()},be=Hn(W.current);be.addEventListener("resize",D);let Fe;return typeof ResizeObserver<"u"&&(X=new ResizeObserver(D),Array.from(Z.current.children).forEach(Nt=>{X.observe(Nt)})),typeof MutationObserver<"u"&&(Fe=new MutationObserver(ge),Fe.observe(Z.current,{childList:!0})),()=>{D.clear(),be.removeEventListener("resize",D),Fe==null||Fe.disconnect(),X==null||X.disconnect()}},[le,Ee]),v.useEffect(()=>{const D=Array.from(Z.current.children),X=D.length;if(typeof IntersectionObserver<"u"&&X>0&&$&&h!==!1){const ge=D[0],be=D[X-1],Fe={root:W.current,threshold:.99},Nt=Rr=>{ce(!Rr[0].isIntersecting)},_n=new IntersectionObserver(Nt,Fe);_n.observe(ge);const De=Rr=>{ue(!Rr[0].isIntersecting)},st=new IntersectionObserver(De,Fe);return st.observe(be),()=>{_n.disconnect(),st.disconnect()}}},[$,h,oe,d==null?void 0:d.length]),v.useEffect(()=>{Ne(!0)},[]),v.useEffect(()=>{le()}),v.useEffect(()=>{fe(Im!==xe)},[fe,xe]),v.useImperativeHandle(a,()=>({updateIndicator:le,updateScrollButtons:Ee}),[le,Ee]);const Be=C.jsx(dk,{...E,className:me(Q.indicator,E.className),ownerState:Y,style:{...xe,...E.style}});let pe=0;const We=v.Children.map(d,D=>{if(!v.isValidElement(D))return null;const X=D.props.value===void 0?pe:D.props.value;_.set(X,pe);const ge=X===g;return pe+=1,v.cloneElement(D,{fullWidth:I==="fullWidth",indicator:ge&&!ae&&Be,selected:ge,selectionFollowsFocus:c,onChange:y,textColor:T,value:X,...pe===1&&g===!1&&!D.props.tabIndex?{tabIndex:0}:{}})}),wt=D=>{const X=Z.current,ge=pt(X).activeElement;if(ge.getAttribute("role")!=="tab")return;let Fe=b==="horizontal"?"ArrowLeft":"ArrowUp",Nt=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&i&&(Fe="ArrowRight",Nt="ArrowLeft"),D.key){case Fe:D.preventDefault(),Us(X,ge,Rm);break;case Nt:D.preventDefault(),Us(X,ge,km);break;case"Home":D.preventDefault(),Us(X,null,km);break;case"End":D.preventDefault(),Us(X,null,Rm);break}},ne=we();return C.jsxs(ak,{className:me(Q.root,f),ownerState:Y,ref:n,as:m,...F,children:[ne.scrollButtonStart,ne.scrollbarSizeListener,C.jsxs(uk,{className:Q.scroller,ownerState:Y,style:{overflow:O.overflow,[N?`margin${i?"Left":"Right"}`:"marginBottom"]:z?void 0:-O.scrollbarWidth},ref:W,children:[C.jsx(ck,{"aria-label":s,"aria-labelledby":l,"aria-orientation":b==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:Y,onKeyDown:wt,ref:Z,role:"tablist",children:We}),ae&&Be]}),ne.scrollButtonEnd]})}),mk=$n(C.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"}),"GridOn"),hk=$n(C.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),gk=$n(C.jsx("path",{d:"M11 2v20c-5.07-.5-9-4.79-9-10s3.93-9.5 9-10m2.03 0v8.99H22c-.47-4.74-4.24-8.52-8.97-8.99m0 11.01V22c4.74-.47 8.5-4.25 8.97-8.99z"}),"PieChart"),vk=$n(C.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M9.5 16.5v-9l7 4.5z"}),"PlayCircle"),yk=$n(C.jsx("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91"}),"RestartAlt"),Sk=$n([C.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),C.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),C.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-6c-2.33 0-4.32 1.45-5.12 3.5h1.67c.69-1.19 1.97-2 3.45-2s2.75.81 3.45 2h1.67c-.8-2.05-2.79-3.5-5.12-3.5"},"2")],"SentimentVeryDissatisfied"),xk=$n(C.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"}),"SkipNext"),wk=e=>{const[t,n]=v.useState(e.splitValues.length),[r,o]=v.useState(e.splitValues),i=(u,d)=>{const f=parseInt(u.target.value);n(f);const m=Array(f).fill(0).map((x,S)=>(S+1)/(f+1));o(m),e.onChange(m)},s=(u,d)=>{const f=d;o(f),e.onChange(f)},l=Sr(Q0)` - margin: 2px; - padding: 0 8px 0 0; - `,a=u=>u.toFixed(2);return C.jsxs(Jt,{style:{display:"flex",columnGap:"16px",width:"100%",alignItems:"center"},children:[C.jsx(PC,{size:"small",children:C.jsx(l,{value:t,onChange:i,variant:"outlined",children:[1,2,3,4,5,6,7].map(u=>C.jsx(tE,{value:u,children:u},u))})}),C.jsx(Ul,{value:r,onChange:s,getAriaValueText:a,valueLabelFormat:a,valueLabelDisplay:"auto",step:.001,min:0,max:1,track:!1,disableSwap:!0})]})};var dt=(e=>(e[e.INITIALIZING=0]="INITIALIZING",e[e.INITIALIZED=1]="INITIALIZED",e[e.RUNNING=2]="RUNNING",e[e.STEP_RUNNING=3]="STEP_RUNNING",e[e.PAUSED=4]="PAUSED",e))(dt||{});const bk=Sr(Yb)` - margin: 4px; - padding-left: 12px; - padding-right: 12px; - border-collapse: separate; -`,Z0=Sr(jb)` - border-radius: 30px; - border-spacing: 1px; - border-style: solid; - border-color: lightgrey; - border-width: 1px; -`,Bu=Sr(Z0)` - padding: 2px 8px 2px 4px; -`,Ck=Sr(Z0)``,Ek=e=>{const t=(n,r)=>{e.onSpeedChange(r)};return C.jsxs(C.Fragment,{children:[C.jsxs(bk,{children:[C.jsxs(Bu,{variant:"contained",size:"small",onClick:e.onReset&&e.onReset,disabled:!e.isResettable,children:[C.jsx(yk,{}),"Reset"]}),C.jsxs(Bu,{variant:"contained",size:"small",onClick:e.onPause&&e.onPause,disabled:e.isPaused,children:[C.jsx(hk,{}),"Pause"]}),C.jsxs(Bu,{variant:"contained",size:"small",onClick:e.onStep&&e.onStep,disabled:!e.isStepped,children:[C.jsx(xk,{}),"Step"]}),C.jsxs(Ck,{variant:"contained",onClick:e.onPlay&&e.onPlay,disabled:e.isPlayed,children:[C.jsx(vk,{}),"Play"]})]}),C.jsxs(Jt,{style:{display:"flex",margin:"0 36px 0 36px",columnGap:"18px"},children:[C.jsxs(Jt,{style:{display:"flex",width:"90%",columnGap:"12px",padding:"1px 12px 1px 12px",borderRadius:"30px",borderStyle:"solid",borderWidth:"1px",borderColor:"#b3b3b3"},children:["🐢",C.jsx(Ul,{defaultValue:e.speed,"aria-label":"custom thumb label",valueLabelDisplay:"auto",step:.01,min:0,max:1,onChange:t}),"🐇"]}),C.jsx(j0,{fontSize:11,color:"grey",style:{alignSelf:"center",padding:"0 10px 0 10px",width:"10%"},children:e.frameCount})]})]})};function J0(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}}function kk(e){const t=[];for(let n=0;n{l(()=>0),r.current.updateInitialStateGridData(If(E),E)},[]),g=v.useCallback(te=>{r.current.setGridSize(te),T(),n.forEach(ce=>{var q,ue;(q=ce.current)==null||q.refreshData(0),(ue=ce.current)==null||ue.refreshViewportState(0)})},[]),I=v.useCallback((te,ce)=>{r.current.updateInitialStateGridData(te,ce),l(()=>0),n.forEach(q=>{var ue,oe;(ue=q.current)==null||ue.refreshData(0),(oe=q.current)==null||oe.refreshViewportState(0)})},[]),z=v.useCallback(te=>{r.current.setTolerance(te)},[]),F=v.useCallback((te,ce)=>{const q=ce;c(()=>q),p(()=>!1),g(q)},[E,w]),$=v.useCallback((te,ce)=>{u(()=>dt.INITIALIZING),F(te,ce)},[E,w]),N=v.useCallback((te,ce)=>{u(dt.INITIALIZED),F(te,ce)},[E,w]),U=v.useCallback(te=>{R(()=>te),p(()=>!1),u(dt.INITIALIZED),I(If(te),te)},[h,w]),j=v.useCallback((te,ce)=>{const q=ce;k(()=>q),z(q)},[]),H=async()=>(await r.current.updateGridData(),n==null||n.forEach((te,ce)=>{var q;(q=te.current)==null||q.refreshData(ce)}),e.iterations?s{if(a===dt.PAUSED||a===dt.INITIALIZED)return;(s==0||await H())&&(a===dt.RUNNING||a===dt.STEP_RUNNING)?(l(()=>s+1),a===dt.STEP_RUNNING&&u(dt.PAUSED)):Q()};v.useEffect(()=>{if(!t.current&&(a===dt.RUNNING||a===dt.STEP_RUNNING)){const te=Math.pow(1-o,2)*1e3;setTimeout(()=>t.current=requestAnimationFrame(B),te),t.current=null}return()=>{t.current&&cancelAnimationFrame(t.current),t.current=null}},[a,s]);const L=te=>{i(te)},Y=()=>{f(()=>!1),x(()=>!0),y(()=>!0),p(()=>!1),g(h),u(()=>dt.INITIALIZED)},Q=()=>{p(()=>!1),y(()=>!0),x(()=>!0),u(dt.PAUSED),f(()=>!0)},he=()=>{s===0&&(J0(r.current.getModel().gridData),r.current.getModel().emptyCellIndices=kk(r.current.getModel().gridData),r.current.sync(),n.forEach(te=>{var ce;(ce=te.current)==null||ce.refreshData(0)}))},ye=()=>{x(()=>!0),y(()=>!0),p(()=>!1),u(dt.STEP_RUNNING),f(()=>!0),he()},ae=()=>{x(()=>!1),y(()=>!1),p(()=>!0),u(dt.RUNNING),f(()=>!1),he()},Ne=v.useCallback(()=>(te,ce,q)=>{n.filter((ue,oe)=>oe!==0).forEach(ue=>{var oe;return(oe=ue.current)==null?void 0:oe.refreshFocusedState(te,ce,q)})},[]),xe=v.useCallback(()=>(te,ce,q)=>{n.filter((ue,oe)=>oe!==0).forEach(ue=>{var oe;return(oe=ue.current)==null?void 0:oe.refreshSelectedState(te,ce,q)})},[]),Re=v.useCallback(()=>te=>{n.filter((ce,q)=>q!==0).forEach(ce=>{var q;return(q=ce.current)==null?void 0:q.refreshViewportState(te)})},[]);return C.jsxs(C.Fragment,{children:[C.jsxs(Jt,{style:{borderWidth:"1px",borderStyle:"solid",borderColor:"#b3b3b3",borderRadius:"5px",padding:"8px 32px 8px 32px",margin:"2px 0 2px 0"},children:[C.jsxs(Jt,{style:{display:"flex",columnGap:"18px",alignItems:"center"},children:[C.jsx(Jt,{style:{marginBottom:"10px"},children:C.jsx(mk,{})}),C.jsx(Ul,{"aria-label":"grid size",value:h,min:8,max:512,step:null,marks:[{value:8,label:"8"},{value:16,label:""},{value:32,label:""},{value:64,label:"64"},{value:128,label:"128"},{value:256,label:"256"},{value:512,label:"512"}],onChange:$,onChangeCommitted:N,valueLabelDisplay:"auto"})]}),C.jsxs(Jt,{style:{display:"flex",columnGap:"18px",alignItems:"center"},children:[C.jsx(gk,{}),C.jsx(wk,{splitValues:E,onChange:U})]})]}),C.jsx(Jt,{style:{borderWidth:"1px",borderStyle:"solid",borderColor:"#b3b3b3",borderRadius:"5px",padding:"8px 32px 8px 32px",margin:"2px 0 2px 0"},children:C.jsx(Ek,{speed:.5,isResettable:d,isPaused:m,isStepped:S,isPlayed:b,onReset:Y,onPause:Q,onStep:ye,onPlay:ae,onSpeedChange:L,frameCount:s})}),C.jsxs(Jt,{style:{display:"flex",columnGap:"18px",padding:"16px"},children:[C.jsx(Sk,{}),C.jsx(Ul,{"aria-label":"tolerance",min:0,max:1,step:null,marks:[0,1,2,3,4,5,6,7,8].map(te=>({value:te/8,label:`${te} / 8`})),value:w,onChange:j,valueLabelDisplay:"auto"})]}),!r.current||a===dt.INITIALIZING?C.jsx(Jt,{style:{background:"rgba(255, 255, 255, 0.1)",display:"flex",width:e.canvasSize.width+"px",height:e.canvasSize.height+"px"},children:C.jsx(tC,{size:"64px",style:{margin:"auto"}})}):C.jsx(C.Fragment,{children:C.jsx(qm,{ref:n[0],numViewports:1,viewportIndex:0,mode:cr.CUSTOM,numColumns:h,numRows:h,headerOffset:e.headerOffset,scrollBar:Rk,canvasSize:e.canvasSize,data:r.current.getModel().gridData,focusedStates:r.current.getModel().focusedStates,selectedStates:r.current.getModel().selectedStates,viewportStates:r.current.getModel().viewportStates,onFocusedStateChange:Ne,onSelectedStateChange:xe,onViewportStateChange:Re})})]})}class tv{constructor(t){this.model=t}getModel(){return this.model}setGridSize(t){this.model.setGridSize(t)}updateInitialStateGridData(t,n){this.model.updateInitialStateGridData(t,n)}sync(){this.model.sync()}setTolerance(t){this.model.setTolerance(t)}}class Ik extends tv{constructor(){super(...arguments),this.updateGridData=async()=>{function t(n,r,o,i){return[[-1,-1],[0,-1],[1,-1],[-1,0],[1,0],[-1,1],[0,1],[1,1]].map(([l,a])=>{const u=(n+l+o)%o;return(r+a+i)%i*o+u})}for(let n=0;nthis.model.gridData[d]),a=l.filter(d=>d===i).length,u=l.filter(d=>d!==lr).length;if(u>0&&a/u grid: array; - -// シミュレーションパラメータ -@group(0) @binding(7) var params: Params; - -// 各ワークグループが処理するセグメントのインデックス (シャッフルされた配列) -@group(0) @binding(8) var randomSegmentIndices: array; - -// セグメントごとの空き地のインデックス管理 -@group(0) @binding(9) var emptyCellIndices: array; - -// セグメントごとの空き地の個数管理 -@group(0) @binding(10) var numEmptyCellsPerSegment: array; - -// ランダムテーブル (乱数値を0から1の範囲で格納した配列) -@group(0) @binding(11) var randomTable: array; - -// セグメント内の空き地の最大数を取得 -fn get_max_empty_cells_per_segment() -> u32 { - return u32(ceil(f32(arrayLength(&grid.values)) / f32(NUM_SEGMENTS))); -} - -// セグメント内の空き地情報を更新する関数 -fn update_empty_cells(segmentIndex: u32) { - let segmentWidth: u32 = params.width / 16; - let segmentHeight: u32 = params.height / 16; - let maxEmptyCells = get_max_empty_cells_per_segment(); - - let startX = (segmentIndex % 16) * segmentWidth; - let startY = (segmentIndex / 16) * segmentHeight; - let endX = startX + segmentWidth; - let endY = startY + segmentHeight; - - var emptyCellCount: u32 = 0; - let baseIndex = segmentIndex * maxEmptyCells; - - for (var y = startY; y < endY; y = y + 1) { - for (var x = startX; x < endX; x = x + 1) { - let index = y * params.width + x; - if (grid[index] == EMPTY_VALUE) { // 空き地なら - if (emptyCellCount < maxEmptyCells) { - emptyCellIndices[baseIndex + emptyCellCount] = index; - emptyCellCount = emptyCellCount + 1; - } - } - } - } - - numEmptyCellsPerSegment[segmentIndex] = emptyCellCount; -} - -fn getIndex(x: u32, y: u32, width: u32) -> u32 { - return y * width + x; -} - -fn getCell(x: u32, y: u32) -> u32 { - return grid.values[getIndex(x, y, params.width)]; -} - -fn countSimilarNeighbor(x: i32, y: i32, width: i32, height: i32, agentType: u32) -> vec2u { - let cell = getCell(u32((x + width) % width), u32((y + height) % height)); - return vec2u(select(0u, 1u, cell == agentType), select(0u, 1u, cell != EMPTY_VALUE)); -} - -fn randomChoice(size: u32, step: u32) -> u32 { - return u32(floor(randomTable[step] * f32(size))); -} - -fn countSimilarNeighbors(x: i32, y: i32, width: i32, height: i32, agentType: u32) -> vec2u { - return countSimilarNeighbor(x - 1, y - 1, width, height, agentType) + - countSimilarNeighbor(x, y - 1, width, height, agentType) + - countSimilarNeighbor(x + 1, y - 1, width, height, agentType) + - countSimilarNeighbor(x - 1, y, width, height, agentType) + - countSimilarNeighbor(x + 1, y, width, height, agentType) + - countSimilarNeighbor(x - 1, y + 1, width, height, agentType) + - countSimilarNeighbor(x, y + 1, width, height, agentType) + - countSimilarNeighbor(x + 1, y + 1, width, height, agentType); -} - -// セグメントのエージェントの引越しを行う関数 -fn move_agents_in_segments(segmentIndices: array, randomBaseIndex: u32) { - let maxEmptyCells = get_max_empty_cells_per_segment(); - - // 各セグメントのエージェントの移動を判定 - for (var i = 0u; i < SEGMENTS_PER_GROUP; i = i + 1u) { - let segmentIndex = segmentIndices[i]; - let segmentWidth: u32 = params.width / 16; - let segmentHeight: u32 = params.height / 16; - - let startX = (segmentIndex % 16) * segmentWidth; - let startY = (segmentIndex / 16) * segmentHeight; - let endX = startX + segmentWidth; - let endY = startY + segmentHeight; - let width = i32(params.width); - let height = i32(params.height); - - for (var y = startY; y < endY; y ++) { - for (var x = startX; x < endX; x++) { - let index = y * params.width + x; - let agent = grid[index]; - - if (agent == EMPTY_VALUE) { - continue; - } - - let neighbors = countSimilarNeighbors(i32(x), i32(y), width, height, agent); - let similarCount = neighbors.x; - let neighborCount = neighbors.y; - if (neighborCount > 0u && f32(similarCount) / f32(neighborCount) < params.tolerance) { - let totalEmptyCells = numEmptyCellsPerSegment[segmentIndex]; - if (totalEmptyCells > 0u) { - // ランダムテーブルから乱数を取得して引越し先を選択 - let randomValue = randomTable[randomBaseIndex + index]; - let randomIdx = u32(floor(randomValue * f32(totalEmptyCells))); - let emptyCellIndex = emptyCellIndices[segmentIndex * maxEmptyCells + randomIdx]; - - // 引越しを実行 - grid[emptyCellIndex] = agent; - grid[index] = EMPTY_VALUE; - - // 空き地情報を更新 - emptyCellIndices[segmentIndex * maxEmptyCells + randomIdx] = index; // 元の位置を新しい空き地にする - } - } - } - } - } -} - -// ワークグループサイズを 64 に設定 -@compute @workgroup_size(64) -fn main(@builtin(global_invocation_id) global_id: vec3) { - let workgroupIndex = global_id.x; - - // ワークグループに対応する 4 つのセグメントインデックスを取得 - let segmentIndex1 = randomSegmentIndices[workgroupIndex * SEGMENTS_PER_GROUP]; - let segmentIndex2 = randomSegmentIndices[workgroupIndex * SEGMENTS_PER_GROUP + 1]; - let segmentIndex3 = randomSegmentIndices[workgroupIndex * SEGMENTS_PER_GROUP + 2]; - let segmentIndex4 = randomSegmentIndices[workgroupIndex * SEGMENTS_PER_GROUP + 3]; - - let segmentIndices = array(segmentIndex1, segmentIndex2, segmentIndex3, segmentIndex4); - - // 空き地情報を更新 - update_empty_cells(segmentIndex1); - update_empty_cells(segmentIndex2); - update_empty_cells(segmentIndex3); - update_empty_cells(segmentIndex4); - - // エージェントの引越し処理 - let randomBaseIndex = workgroupIndex * params.width * params.height; // 各ワークグループに対するランダムテーブルのオフセット - move_agents_in_segments(segmentIndices, randomBaseIndex); -} -`,Tm={x:8,y:8};class Bk extends tv{constructor(t,n,r){super(t),this.device=n;const o=t.gridSize;this.paramBuffer=n.createBuffer({label:"S:ParamBuffer:"+o,size:12,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.randomSegmentIndicesBuffer=n.createBuffer({label:"S:RandomSegmentIndicesBuffer:"+o,size:16*16*4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),n.queue.writeBuffer(this.paramBuffer,0,new Uint32Array([o,o])),n.queue.writeBuffer(this.paramBuffer,8,new Float32Array([t.tolerance])),this.prepareBuffers(0,o),this.writeGridDataBuffer(),this.writeemptyCellIndicesBuffer(),this.computePipeline=this.device.createComputePipeline({label:"S:SchellingComputePipeline:"+o,layout:"auto",compute:{module:this.device.createShaderModule({label:"SchellingModelShader",code:Pk}),constants:{EMPTY_VALUE:lr,workgroupSizeX:Tm.x,workgroupSizeY:Tm.y},entryPoint:"main"}}),this.prepareBindGroup()}prepareBindGroup(){this.bindGroup=this.device.createBindGroup({label:"S:SchellingBindGroup:"+this.model.gridSize,layout:this.computePipeline.getBindGroupLayout(0),entries:[{binding:6,resource:{buffer:this.gridBuffer}},{binding:7,resource:{buffer:this.paramBuffer}},{binding:8,resource:{buffer:this.randomSegmentIndicesBuffer}},{binding:9,resource:{buffer:this.emptyCellIndicesBuffer}},{binding:10,resource:{buffer:this.randomTableBuffer}}]})}updateInitialStateGridData(t,n){const r=this.model.updateInitialStateGridData(t,n);this.device.queue.writeBuffer(this.paramBuffer,8,new Uint32Array([r]))}destroyBuffers(){var t,n,r,o;(t=this.gridBuffer)==null||t.destroy(),(n=this.emptyCellIndicesBuffer)==null||n.destroy(),(r=this.randomTableBuffer)==null||r.destroy(),(o=this.readerGridBuffer)==null||o.destroy()}prepareBuffers(t,n){t!==0&&t!==n&&this.destroyBuffers();const r=this.device,o=this.model,i=n*n;this.randomTable=new Float32Array(i),this.emptyCellIndicesBuffer=r.createBuffer({label:"S:EmptyCellsBuffer:"+n,size:i*4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),this.gridBuffer=r.createBuffer({label:"S:GridBuffer:"+n,size:o.gridData.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST|GPUBufferUsage.COPY_SRC}),this.randomTableBuffer=r.createBuffer({label:"S:RandomTableBuffer:"+n,size:i*4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),this.readerGridBuffer=r.createBuffer({label:"S:RetGridBuffer:"+n,size:o.gridData.byteLength,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ,mappedAtCreation:!1}),r.queue.writeBuffer(this.paramBuffer,0,new Uint32Array([n,n]))}writeGridDataBuffer(){this.device.queue.writeBuffer(this.gridBuffer,0,this.model.gridData.buffer)}writeemptyCellIndicesBuffer(){this.device.queue.writeBuffer(this.emptyCellIndicesBuffer,0,this.model.emptyCellIndices)}setGridSize(t){const n=this.model.gridSize;this.model.setGridSize(t),this.prepareBuffers(n,t),this.writeGridDataBuffer(),this.writeemptyCellIndicesBuffer(),this.prepareBindGroup()}sync(){this.writeGridDataBuffer(),this.writeemptyCellIndicesBuffer()}setTolerance(t){this.device.queue.writeBuffer(this.paramBuffer,8,new Float32Array([t]))}writeRandomSegmentIndicesBuffer(){const t=new Uint32Array(256);for(let n=0;nMath.floor(255*u)).concat(lr),o=this.gridSize*this.gridSize,i=t.map(u=>Math.floor(o*u)),s=o-i.reduce((u,d)=>u+d,0);if(s<0)throw console.error(this.gridSize,t),new Error("The sum of agentTypeShares is over 1.0");const l=s>0?i.concat(s):i;let a=0;r.forEach((u,d)=>{const f=l[d];this.gridData.fill(u,a,a+f),a+=f});for(let u=0;u{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function _k(e){const{children:t,value:n}=e,r=zk(),o=v.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(nv.Provider,{value:o,children:t})}function rv(){return v.useContext(nv)}function ov(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function iv(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const Lk=v.forwardRef(function(t,n){const{children:r,...o}=t,i=rv();if(i===null)throw new TypeError("No TabContext provided");const s=v.Children.map(r,l=>v.isValidElement(l)?v.cloneElement(l,{"aria-controls":ov(i,l.props.value),id:iv(i,l.props.value)}):null);return C.jsx(pk,{...o,ref:n,value:i.value,children:s})});function Ak(e){return je("MuiTabPanel",e)}Pe("MuiTabPanel",["root","hidden"]);const Fk=e=>{const{classes:t,hidden:n}=e;return $k({root:["root",n&&"hidden"]},Ak,t)},Dk=re("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),Ou=v.forwardRef(function(t,n){const r=zh({props:t,name:"MuiTabPanel"}),{children:o,className:i,value:s,keepMounted:l=!1,...a}=r,u={...r},d=Fk(u),f=rv();if(f===null)throw new TypeError("No TabContext provided");const m=ov(f,s),x=iv(f,s);return C.jsx(Dk,{"aria-labelledby":x,className:me(d.root,i),hidden:s!==f.value,id:m,ref:n,role:"tabpanel",ownerState:u,...a,children:(l||s===f.value)&&o})}),Uk=()=>{const[e,t]=qe.useState("1"),n=(r,o)=>{t(o)};return C.jsx(C.Fragment,{children:C.jsx(Av,{children:C.jsx(_k,{value:e,children:C.jsxs(Jt,{sx:{display:"flex"},children:[C.jsx(Jt,{sx:{borderBottom:1,borderColor:"divider",width:"20%"},children:C.jsxs(Lk,{onChange:n,"aria-label":"webgpu-react-bitmap-viewport examples",orientation:"vertical",children:[C.jsx(Tu,{label:"Synchronized Viewports of Static Image",value:"1"}),C.jsx(Tu,{label:"Synchronized Viewports of Dynamic Image",value:"2"}),C.jsx(Tu,{label:"Viewport of Multi Agent Simulation",value:"3"})]})}),C.jsxs(Ou,{value:"1",children:[C.jsx("h2",{children:'Synchronized Viewports of Static Image: "The Grate Wave off Kanagawa" from the series Thirty-six Views of Mount Fuji by Hokusai'}),C.jsx(uy,{src:"/webgpu-react-bitmap-viewport/The_Great_Wave_off_Kanagawa.jpg",canvasSizes:[{width:1044,height:726},{width:547,height:363},{width:220,height:220}],headerOffset:{left:20,top:20}})]}),C.jsxs(Ou,{value:"2",children:[C.jsxs("div",{children:[C.jsx("h2",{children:"Synchronized Viewports of Dynamic Image"}),C.jsx("h3",{children:"RGBARandomGrid"}),C.jsx(ly,{canvasSizes:[{width:520,height:520},{width:220,height:420},{width:220,height:120}],headerOffset:{left:20,top:20},numColumns:200,numRows:200,viewportStates:new Float32Array([0,0,200,200,50,50,100,150,0,100,100,150])})]}),C.jsxs("div",{children:[C.jsx("h3",{children:"HueGrid"}),C.jsx(sy,{canvasSizes:[{width:520,height:520},{width:220,height:420},{width:220,height:120}],headerOffset:{left:20,top:20},numColumns:200,numRows:200,viewportStates:new Float32Array([0,0,200,200,50,50,100,150,0,100,100,150])})]})]}),C.jsxs(Ou,{value:"3",children:[C.jsx("h2",{children:"Viewport of Multi Agent Simulation: Schelling's model of segregation"}),C.jsx("div",{style:{display:"flex",columnGap:"16px"},children:[Ii.CPU,Ii.GPU].map((r,o)=>C.jsxs("div",{children:[C.jsx(j0,{children:r}),C.jsx(Nk,{id:`schelling-${r}-${o}`,mode:r,tolerance:.5,agentTypeShares:[.5,.3,.1],canvasSize:{width:512,height:512},headerOffset:{left:0,top:0},gridSize:8})]},o))})]})]})})})})};var sv,Pm=df;sv=Pm.createRoot,Pm.hydrateRoot;const jk=sv(document.getElementById("root")),Vk=()=>{jk.render(C.jsx(Uk,{}))};Vk(); diff --git a/assets/main-DmQcnNbD.js b/assets/main-DmQcnNbD.js new file mode 100644 index 0000000..2c2db6c --- /dev/null +++ b/assets/main-DmQcnNbD.js @@ -0,0 +1,1084 @@ +var sv=Object.defineProperty;var av=(e,t,n)=>t in e?sv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Wo=(e,t,n)=>av(e,typeof t!="symbol"?t+"":t,n);function uv(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Pm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bm={exports:{}},js={},Om={exports:{}},Ee={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zi=Symbol.for("react.element"),cv=Symbol.for("react.portal"),dv=Symbol.for("react.fragment"),fv=Symbol.for("react.strict_mode"),pv=Symbol.for("react.profiler"),mv=Symbol.for("react.provider"),hv=Symbol.for("react.context"),gv=Symbol.for("react.forward_ref"),vv=Symbol.for("react.suspense"),yv=Symbol.for("react.memo"),Sv=Symbol.for("react.lazy"),wf=Symbol.iterator;function xv(e){return e===null||typeof e!="object"?null:(e=wf&&e[wf]||e["@@iterator"],typeof e=="function"?e:null)}var Mm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Nm=Object.assign,$m={};function Do(e,t,n){this.props=e,this.context=t,this.refs=$m,this.updater=n||Mm}Do.prototype.isReactComponent={};Do.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Do.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _m(){}_m.prototype=Do.prototype;function Xc(e,t,n){this.props=e,this.context=t,this.refs=$m,this.updater=n||Mm}var Kc=Xc.prototype=new _m;Kc.constructor=Xc;Nm(Kc,Do.prototype);Kc.isPureReactComponent=!0;var bf=Array.isArray,Am=Object.prototype.hasOwnProperty,Qc={current:null},Lm={key:!0,ref:!0,__self:!0,__source:!0};function zm(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Am.call(t,r)&&!Lm.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1{const t={...e};return C.jsx(Dm.Provider,{value:t,children:e.children})},qc=()=>{const e=v.useContext(Dm);if(!e)throw new Error("useCanvasContext must be used within a CanvasContextProvider");return e},Jc=v.createContext(null),Mv=({children:e})=>{const t=qc(),n=v.useRef(null),[r,o]=Ze.useState(null);return v.useEffect(()=>{n.current&&o(n.current)},[n.current]),C.jsxs(C.Fragment,{children:[C.jsx("canvas",{ref:n,width:t==null?void 0:t.canvasSize.width,height:t==null?void 0:t.canvasSize.height}),r&&C.jsx(Jc.Provider,{value:r,children:e})]})},Nv=()=>{const e=v.useContext(Jc);if(!e)throw new Error("useCanvasRefContext must be used within a CanvasRefProvider");return e},Um=Ze.createContext(null),$v=e=>{const t=e;return C.jsx(Um.Provider,{value:t,children:e.children})},_v=()=>{const e=Ze.useContext(Um);if(!e)throw new Error("useGridContext must be used within a GridContextProvider");return e},jm=Ze.createContext(null),Av=e=>{const t=e;return C.jsx(jm.Provider,{value:t,children:e.children})},Lv=()=>{const e=Ze.useContext(jm);if(!e)throw new Error("useViewportContext must be used within a ViewportContextProvider");return e},Vm=Ze.createContext(null),zv=({children:e})=>{const[t,n]=v.useState(null);return v.useLayoutEffect(()=>((async()=>await async function(o){const i=async()=>{try{const l=await navigator.gpu.requestAdapter();if(!l)throw new Error("No appropriate GPUAdapter found.");const s=await l.requestDevice();return s.lost.then(async a=>{if(console.error(`WebGPU device was lost: ${a.message}: ${a.reason}`),a.reason!=="destroyed")return console.error("Trying to recreate the device..."),o(await i())}),s}catch{return console.error("Trying to recreate the device..."),await i()}};o(await i())}(o=>{if(!navigator.gpu)throw new Error("WebGPU not supported on this browser.");n(o)}))(),()=>{t==null||t.destroy()}),[]),t?C.jsx(Vm.Provider,{value:t,children:e}):null},ed=()=>{const e=Ze.useContext(Vm);if(e==null)throw new Error("useWebGPUDeviceContext must be used within a WebGPUDeviceContextProvider");return e},Gm=Ze.createContext(null),Fv=({children:e})=>{const t=ed(),n=qc(),r=v.useContext(Jc),[o,i]=Ze.useState(null);return v.useEffect(()=>{if(!t)throw new Error("device is not configured.");if(!n)throw new Error("CanvasContext not found.");if(!r)throw new Error("CanvasRef not found.");const l=navigator.gpu.getPreferredCanvasFormat(),s=r.getContext("webgpu");if(!s)throw new Error("WebGPU not supported on this browser.");s.configure({device:t,format:l,alphaMode:"premultiplied"});const a=s.getCurrentTexture();return i({gpuCanvasContext:s,textureFormat:l,texture:a}),()=>{a==null||a.destroy()}},[t,n,r]),o&&C.jsx(Gm.Provider,{value:o,children:e})},Dv=()=>{const e=Ze.useContext(Gm);if(!e)throw new Error("useWebGPUCanvasContext must be used within a WebGPUCanvasContextProvider");return e},Wm=2,is=4,Ri=4,nr=3,sr=99999,Uv=(e,t,n)=>t.createBuffer({label:e,size:n,usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST}),Ef=(e,t,n)=>t.createBuffer({label:e,size:n,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),Vl=(e,t,n)=>t.createBuffer({label:e,size:n,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),Ir=(e,t,n)=>{e.queue.writeBuffer(t,0,n),t.unmap()},Hm=8,jv=Hm*Ri,Vv=(e,t,n,r)=>(e[0]=n.numColumns,e[1]=n.numRows,e[2]=t.canvasSize.width,e[3]=t.canvasSize.height,e[4]=t.headerOffset.left,e[5]=t.headerOffset.top,e[6]=r.x,e[7]=r.y,e),Ym=6,Gv=Ym*is,Wv=(e,t,n,r,o)=>(e[0]=t.numColumns,e[1]=t.numRows,e[2]=n.numColumnsToShow,e[3]=n.numRowsToShow,e[4]=r,e[5]=o,e),Hv=(e,t,n)=>Vl(e,t,n*4*Ri),Yv=`struct VertexOutput { + @builtin(position) position: vec4f, + @location(0) @interpolate(flat) isFocused: u32, + @location(1) @interpolate(flat) isSelected: u32, + @location(2) @interpolate(flat) rgba: vec4f, +}; +@group(0) @binding(5) var gridData: array; + +fn u32ToVec4f(value: u32) -> vec4 { + // Mask to isolate 8-bit segments + let mask: u32 = 0xFF; + + // Extract each 8-bit segment + let value0: f32 = f32((value >> 0) & mask); + let value1: f32 = f32((value >> 8) & mask); + let value2: f32 = f32((value >> 16) & mask); + let value3: f32 = f32((value >> 24) & mask); + + return vec4f(value0, value1, value2, value3); +} + +@vertex +fn vertexBody( + input: VertexInput +) -> VertexOutput { + let cellX: u32 = input.instanceIndex % u32uni.numColumnsToShow; + let cellY: u32 = input.instanceIndex / u32uni.numColumnsToShow; + let left = u32(viewports[u32uni.viewportIndex].x); + let top = u32(viewports[u32uni.viewportIndex].y); + let gridX: u32 = cellX + left; + let gridY: u32 = cellY + top; + let gridIndex = gridX + gridY * u32uni.gridSize.x; + let columnFocused = checkColumnFocused(gridX); + let rowFocused = checkRowFocused(gridY); + + var output: VertexOutput; + output.position = vec4f(transform(cellX, cellY, input.position), 0, 1); + output.isFocused = select(FALSE, TRUE, (!(columnFocused && rowFocused)) && (columnFocused || rowFocused)); + output.isSelected = select(FALSE, TRUE, checkSelected(gridX) || checkSelected(gridY)); + output.rgba = u32ToVec4f(gridData[gridIndex]) / 255.0; + return output; +} + +@fragment +fn fragmentBody(input: VertexOutput) -> @location(0) vec4f { + return input.rgba; +} +`,Xv=`const TRUE = 1u; +const FALSE = 0u; +override scrollBarRadius: f32 = 5.0; +override scrollBarMargin: f32 = 2.0; + +const rectVertices = array( + // X, Y, + // bottom right triangle (anti-clockwise) + // 0 left-bottom 1 right-bottom 2 right-top + vec2f(-1, -1), vec2f(1, -1), vec2f(1, 1), + // top left triangle (anti-clockwise) + // 3 left-bottom 4 right-top 5 left-top + vec2f(-1, -1), vec2f(1, 1), vec2f(-1, 1) +); + +/* +struct VertexOutput { + @builtin(position) position: vec4, + @location(0) texCoord: vec2, +} + +@vertex +fn main( + @builtin(vertex_index) VertexIndex : u32 +) -> VertexOutput { + var output : VertexOutput; + let x = f32((VertexIndex & 1) << 2); + let y = f32((VertexIndex & 2) << 1); + output.texCoord.x = x * 0.5; + output.texCoord.y = y * 0.5; + output.position = vec4(x - 1.0, y - 1.0, 0, 1); + return output; +} +*/ + +struct F32uni { + gridSize: vec2f, + canvasSize: vec2f, + header: vec2f, + overscroll: vec2f +}; +@group(0) @binding(0) var f32uni: F32uni; + +struct U32uni { + gridSize: vec2u, + numColumnsToShow: u32, + numRowsToShow: u32, + scrollBarState: u32, + viewportIndex: u32, +}; +@group(0) @binding(1) var u32uni: U32uni; +@group(0) @binding(2) var viewports: array; +@group(0) @binding(3) var focused: array; +@group(0) @binding(4) var selected: array; + +struct VertexInput { + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex: u32, + @location(0) position: vec2f, +}; +struct RectVertexInput { + @builtin(instance_index) instanceIndex: u32, + @builtin(vertex_index) vertexIndex: u32, +}; + +fn shapeToWorld(center: vec2f, scale: vec2f, position: vec2f) -> vec2f { + return center + (scale * position * vec2f(0.5, -0.5)); +} + +fn cellToWorld(cellX: u32, cellY: u32, position: vec2f) -> vec2f { + let cell = vec2f(f32(cellX), f32(cellY)); + return floor(viewports[u32uni.viewportIndex].xy) + (cell + (position * vec2f(0.5, -0.5) + 0.5) ); +} + +fn worldToViewport(world: vec2f) -> vec2f { + let viewportSize = viewports[u32uni.viewportIndex].zw - viewports[u32uni.viewportIndex].xy; + return (world - viewports[u32uni.viewportIndex].xy) / viewportSize; +} + +fn viewportToFrame(viewport: vec2f) -> vec2f { + return (f32uni.header * viewport + f32uni.canvasSize * (1 - viewport)) / f32uni.canvasSize; +} + +fn frameToCanvas(frame: vec2f) -> vec2f { + // return frame - ( f32uni.overscroll + f32uni.header) / f32uni.canvasSize; + return frame + ( f32uni.overscroll - f32uni.header) / f32uni.canvasSize; +} + +fn canvasToDimension(canvas: vec2f) -> vec2f { + return canvas * vec2f(-1, 1) + (1 - canvas) * vec2f(1, -1); +} + +fn transform(cellX: u32, cellY: u32, position: vec2f) -> vec2f { + let world = cellToWorld(cellX, cellY, position); // 0.0 - 1.0 + let viewport = worldToViewport(world); // 0.0 - 1.0 + let frame = viewportToFrame(viewport); // 0.0 - 1.0 + let canvas = frameToCanvas(frame); // 0.0 - 1.0 + // let dimension = canvasToDimension(world / f32uni.gridSize); // test 1 passed + // let dimension = canvasToDimension(viewport); // test 2 passed + // let dimension = canvasToDimension(frame); // test 3 passed + let dimension = canvasToDimension(canvas); + return dimension; +} + +fn transform2(center: vec2f, scale: vec2f, position: vec2f) -> vec2f { + let world = shapeToWorld(center, scale, position); // 0.0 - 1.0 + let viewport = worldToViewport(world); // 0.0 - 1.0 + let frame = viewportToFrame(viewport); // 0.0 - 1.0 + let canvas = frameToCanvas(frame); // 0.0 - 1.0 + let dimension = canvasToDimension(canvas); + return dimension; +} + +fn createPosition(instanceIndex: u32, position: vec2f) -> vec2f { + let cellX: u32 = instanceIndex % u32uni.numColumnsToShow; + let cellY: u32 = instanceIndex / u32uni.numColumnsToShow; + let left = u32(viewports[u32uni.viewportIndex].x); + let top = u32(viewports[u32uni.viewportIndex].y); + let gridX: u32 = cellX + left; + let gridY: u32 = cellY + top; + let gridIndex = gridX + gridY * u32uni.gridSize.x; + return transform(cellX, cellY, position); +} + + +@vertex +fn vertexLeftHeader(input: VertexInput) -> VertexOutput { + var output: VertexOutput; + let cellY: u32 = input.instanceIndex; + let top: u32 = u32(viewports[u32uni.viewportIndex].y); + let gridY: u32 = cellY + top; + let rowIndex: u32 = top + input.instanceIndex; + var transformed: vec2f = transform(0, cellY, input.position); + output.position = vec4f(transformed, 0.0, 1.0); + // output.vertexIndex = input.vertexIndex; + output.isFocused = select(FALSE, TRUE, checkRowFocused(rowIndex)); + output.isSelected = select(FALSE, TRUE, checkSelected(rowIndex)); + if(input.instanceIndex == 0){ + if(input.vertexIndex == 0u || input.vertexIndex == 3u || input.vertexIndex == 5u){ + output.position.x = -1.0; + }else{ + output.position.x = -1 + 2 * f32uni.header.x / f32uni.canvasSize.x; + } + if(input.vertexIndex == 2u || input.vertexIndex == 4u || input.vertexIndex == 5u){ + output.position.y = 1.0; + } + }else{ + if(input.vertexIndex == 0u || input.vertexIndex == 3u || input.vertexIndex == 5u){ + output.position.x = -1.0; + }else{ + output.position.x = -1 + 2 * f32uni.header.x / f32uni.canvasSize.x; + } + } + return output; +} + +@vertex +fn vertexTopHeader(input: VertexInput) -> VertexOutput { + var output: VertexOutput; + let cellX: u32 = input.instanceIndex; + let left: u32 = u32(viewports[u32uni.viewportIndex].x); + let gridX: u32 = cellX + left; + let colIndex = left + input.instanceIndex; + var transformed: vec2f = transform(cellX, 0, input.position); + output.position = vec4f(transformed, 0.0, 1.0); + // output.vertexIndex = input.vertexIndex; + output.isFocused = select(FALSE, TRUE, checkColumnFocused(colIndex)); + output.isSelected = select(FALSE, TRUE, checkSelected(colIndex)); + if(input.instanceIndex == 0){ + if(input.vertexIndex == 2u || input.vertexIndex == 3u || input.vertexIndex == 4u){ + output.position.y = 1.0; + //output.position.y = 1 - 2 * f32uni.header.y / f32uni.canvasSize.y; + }else{ + output.position.y = 1 - 2 * f32uni.header.y / f32uni.canvasSize.y; + } + if(input.vertexIndex == 0u || input.vertexIndex == 3u || input.vertexIndex == 5u){ + output.position.x = -1.0; + } + }else{ + if(input.vertexIndex == 2u || input.vertexIndex == 3u || input.vertexIndex == 4u){ + output.position.y = 1.0; + }else{ + output.position.y = 1 + -2 * f32uni.header.y / f32uni.canvasSize.y; + } + } + return output; +} + +@vertex +fn vertexColumnFocusSelect(input: VertexInput) -> VertexOutput{ + var output: VertexOutput; + let cellX: u32 = input.instanceIndex; + let left: u32 = u32(viewports[u32uni.viewportIndex].x); + let gridX: u32 = cellX + left; + let colIndex = left + input.instanceIndex; + var transformed: vec2f = transform(cellX, 0, input.position); + output.position = vec4f(transformed, 0.0, 1.0); + output.isFocused = select(FALSE, TRUE, checkColumnFocused(colIndex)); + output.isSelected = select(FALSE, TRUE, checkSelected(colIndex)); + + if(input.vertexIndex == 2u || input.vertexIndex == 4u || input.vertexIndex == 5u){ + output.position.y = 1.0; + } + if(input.vertexIndex == 0u || + input.vertexIndex == 1u || input.vertexIndex == 3u){ + output.position.y = -1.0; + } + return output; +} + +@vertex +fn vertexRowFocusSelect(input: VertexInput) -> VertexOutput{ + var output: VertexOutput; + let cellY: u32 = input.instanceIndex; + let top: u32 = u32(viewports[u32uni.viewportIndex].y); + let gridY: u32 = cellY + top; + let rowIndex: u32 = top + input.instanceIndex; + var transformed: vec2f = transform(0, cellY, input.position); + output.position = vec4f(transformed, 0.0, 1.0); + output.isFocused = select(FALSE, TRUE, checkRowFocused(rowIndex)); + output.isSelected = select(FALSE, TRUE, checkSelected(rowIndex)); + if(input.vertexIndex == 1u || input.vertexIndex == 2u || input.vertexIndex == 4u){ + output.position.x = 1.0; + } + if(input.vertexIndex == 0u || + input.vertexIndex == 3u || input.vertexIndex == 5u){ + output.position.x = -1.0; + } + return output; +} + +fn rectangleVertexPosition(vertexIndex: u32, left: f32, top: f32, right: f32, bottom: f32) -> vec4f { + switch(vertexIndex % 6){ + case 0, 3: { + return vec4f(left, bottom , 0, 1); + } + case 1: { + return vec4f(right, bottom, 0, 1); + } + case 2, 4: { + return vec4f(right, top, 0, 1); + } + case 5: { + return vec4f(left, top, 0, 1); + } + default: { + return vec4f(0, 0, 0, 1); + } + } +} + +@vertex +fn vertexScrollBarBackground(input: VertexInput) -> VertexOutput{ + var output: VertexOutput; + if(input.instanceIndex == 0){ // horizontal(bottom) + let left = -1.0 + 2 * f32uni.header.x / f32uni.canvasSize.x; + let right = 1.0; + let top = -1.0 + 2 * (scrollBarRadius * 2 + scrollBarMargin) / f32uni.canvasSize.y; + let bottom = -1.0 + 2 * scrollBarMargin / f32uni.canvasSize.y; + output.position = rectangleVertexPosition(input.vertexIndex, left, top, right, bottom); + output.isFocused = select(FALSE, TRUE, u32uni.scrollBarState == 1u || u32uni.scrollBarState == 3u); + }else{ //vertical + let left = 1.0 - 2 * (scrollBarRadius * 2 + scrollBarMargin) / f32uni.canvasSize.x; + let top = 1.0 - 2 * f32uni.header.y / f32uni.canvasSize.y; + let right = 1.0 - 2 * scrollBarMargin / f32uni.canvasSize.x; + let bottom = -1.0; + output.position = rectangleVertexPosition(input.vertexIndex, left, top, right, bottom); + output.isFocused = select(FALSE, TRUE, u32uni.scrollBarState == 2u || u32uni.scrollBarState == 3u); + } + return output; +} + +@vertex +fn vertexScrollBarBody(input: VertexInput) -> VertexOutput{ + var output: VertexOutput; + if(u32uni.scrollBarState == 99u){ + return output; + } + output.position = vec4f(input.position, 0.0, 1.0); + const baseIndex = 12; + const NUM_VERTICES_PER_POLYGON = 3; + if(input.instanceIndex == 0){ // horizontal scrollbar + output.isFocused = select(FALSE, TRUE, u32uni.scrollBarState == 1u || u32uni.scrollBarState == 3u); + let viewportLeft = viewports[u32uni.viewportIndex].x; + let viewportRight = viewports[u32uni.viewportIndex].z;//means right + let left: f32 = -1 + + 2 * ((f32uni.header.x - f32uni.overscroll.x + scrollBarRadius) / f32uni.canvasSize.x + + viewportLeft * + (f32uni.canvasSize.x - f32uni.header.x - scrollBarRadius * 2) / + f32uni.canvasSize.x / f32uni.gridSize.x); + let right: f32 = -1 + + 2 * ((f32uni.header.x - f32uni.overscroll.x + scrollBarRadius) / f32uni.canvasSize.x + + viewportRight * + (f32uni.canvasSize.x - f32uni.header.x - scrollBarRadius * 2) / + f32uni.canvasSize.x / f32uni.gridSize.x); + if(6 <= input.vertexIndex && input.vertexIndex < baseIndex){ + let top: f32 = -1 + 2 * (f32uni.overscroll.y + scrollBarMargin) / f32uni.canvasSize.y; + let bottom: f32 = -1 + 2 * (f32uni.overscroll.y + scrollBarMargin + scrollBarRadius * 2) / f32uni.canvasSize.y; + output.position = rectangleVertexPosition(input.vertexIndex - 6, left, top, right, bottom); + return output; + } else if(input.vertexIndex - baseIndex < 24 * 3){ + let horizontalLineCenter: f32 = -1 + 2 * (f32uni.overscroll.y + scrollBarMargin + scrollBarRadius) / f32uni.canvasSize.y; + let radius = 2 * scrollBarRadius / f32uni.canvasSize.y; + if(( input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 6) || (baseIndex + NUM_VERTICES_PER_POLYGON * 18 <= input.vertexIndex && input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 24)){ + let center = vec2f(right, horizontalLineCenter); + output.position = vec4f(input.position * radius + center, 0, 1); + }else if(baseIndex + NUM_VERTICES_PER_POLYGON * 6 <= input.vertexIndex && input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 18){ + let center = vec2f(left, horizontalLineCenter); + output.position = vec4f(input.position * radius + center, 0, 1); + } + return output; + } + + } else if(input.instanceIndex == 1){ // vertical scrollbar + output.isFocused = select(FALSE, TRUE, u32uni.scrollBarState == 2u || u32uni.scrollBarState == 3u); + let viewportTop = viewports[u32uni.viewportIndex].y; + let viewportBottom = viewports[u32uni.viewportIndex].w;//means bottom + let top: f32 = 1 - 2 * ((f32uni.header.y - f32uni.overscroll.y + scrollBarRadius) / f32uni.canvasSize.y + + viewportTop * + (f32uni.canvasSize.y - f32uni.header.y - scrollBarRadius * 2) / + f32uni.canvasSize.y / f32uni.gridSize.y); + let bottom: f32 = 1 - 2 * ((f32uni.header.y - f32uni.overscroll.y + scrollBarRadius) / f32uni.canvasSize.y + + viewportBottom * + (f32uni.canvasSize.y - f32uni.header.y- scrollBarRadius * 2) / f32uni.canvasSize.y / f32uni.gridSize.y); + + if(input.vertexIndex < baseIndex){ + let left:f32 = 1 - 2 * (scrollBarMargin + f32uni.overscroll.x) / f32uni.canvasSize.x; + let right:f32 = 1 - 2 * (scrollBarMargin + f32uni.overscroll.x + scrollBarRadius * 2) / f32uni.canvasSize.x; + output.position = rectangleVertexPosition(input.vertexIndex - 6, left, top, right, bottom); + return output; + } else { + let verticalLineCenter:f32 = 1 - 2 * (scrollBarMargin + f32uni.overscroll.x + scrollBarRadius) / f32uni.canvasSize.x; + let radius = 2 * scrollBarRadius / f32uni.canvasSize.x; + if(baseIndex <= input.vertexIndex && input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 12){ + let center = vec2f(verticalLineCenter, top); + output.position = vec4f(input.position * radius + center, 0, 1); + }else if(baseIndex + NUM_VERTICES_PER_POLYGON * 12 <= input.vertexIndex && input.vertexIndex < baseIndex + NUM_VERTICES_PER_POLYGON * 24){ + let center = vec2f(verticalLineCenter, bottom); + output.position = vec4f(input.position * radius + center, 0, 1); + } + return output; + } + } + return output; +} + + +@vertex +fn vertexViewportShadow(input: RectVertexInput) -> VertexOutput { + var output: VertexOutput; + if(u32uni.scrollBarState != 99u){ + return output; + } + let viewport: vec4f = viewports[input.instanceIndex]; + let left = viewport.x; + let top = viewport.y; + let right = viewport.z; + let bottom = viewport.w; + var rect: vec4f; + switch(u32(input.vertexIndex / 6)){ + case 1u: { + rect = vec4f(0, 0, f32uni.gridSize.x, top); + break; + } + case 2u: { + rect = vec4f(right, top, f32uni.gridSize.x, bottom); + break; + } + case 3u: { + rect = vec4f(0, bottom, f32uni.gridSize.x, f32uni.gridSize.y); + break; + } + case 4u: { + rect = vec4f(0, top, left, bottom); + break; + } + default: { + break; + } + } + let scale = vec2f(rect.z - rect.x, rect.w - rect.y); + let center = vec2f(rect.z + rect.x, rect.w + rect.y) / 2.0; + output.position = vec4f(transform2(center, scale, rectVertices[input.vertexIndex % 6]), 0.0, 1.0); + return output; +} + +// HSVからRGBへの変換を行う関数 +fn hsvToRgb(h: f32, s: f32, v: f32) -> vec3f { + if (s == 0.0) { + // If saturation is 0, the color is grayscale + return vec3f(v, v, v); + } else { + // Normalize hue to [0, 6) + var h_i: f32 = h * 6.0; + var i: u32 = u32(h_i) % 6; // Index for selecting calculation method + var f: f32 = h_i - f32(i); // Fractional part + + var p: f32 = v * (1.0 - s); + var q: f32 = v * (1.0 - (s * f)); + var t: f32 = v * (1.0 - (s * (1.0 - f))); + + // Calculate and return rgb based on i value + switch (i) { + case 0: { return vec3f(v, t, p);} + case 1: { return vec3f(q, v, p);} + case 2: { return vec3f(p, v, t);} + case 3: { return vec3f(p, q, v);} + case 4: { return vec3f(t, p, v);} + case 5: { return vec3f(v, p, q); } + default: { return vec3f(0.0, 0.0, 0.0);} // Should never reach here + } + } +} + +fn isTrue(value: u32) -> bool { + return value == 1u; +} + +fn isFalse(value: u32) -> bool { + return value == 0u; +} + +fn checkInfinity(value: f32) -> bool { + return value == value + 1.0 || value == value - 1.0; +} + +fn checkColumnFocused(columnIndex: u32) -> bool { + return focused[columnIndex] == 1u || focused[columnIndex] == 3u; +} +fn checkRowFocused(rowIndex: u32) -> bool { + return focused[rowIndex] == 2u || focused[rowIndex] == 3u; +} + +fn checkSelected(index: u32) -> bool { + return selected[index] == 1u; +} + +@fragment +fn fragmentLeftHeader(input: VertexOutput) -> @location(0) vec4f { + let focused = isTrue(input.isFocused); + let selected = isTrue(input.isSelected); + if(focused) { + if(selected){ + return vec4f(0.9, 0.9, 0.0, 1); + }else{ + return vec4f(0.7, 0.7, 0.7, 1); + } + }else{ + if(selected){ + return vec4f(0.8, 0.8, 0.6, 1); + }else{ + return vec4f(0.5, 0.5, 0.5, 1); + } + } +} + +@fragment +fn fragmentTopHeader(input: VertexOutput) -> @location(0) vec4f { + let focused = isTrue(input.isFocused); + let selected = isTrue(input.isSelected); + if(focused) { + if(selected){ + return vec4f(0.9, 0.9, 0.0, 1); + }else{ + return vec4f(0.7, 0.7, 0.7, 1); + } + }else{ + if(selected){ + return vec4f(0.8, 0.8, 0.6, 1); + }else{ + return vec4f(0.5, 0.5, 0.5, 1); + } + } +} + +@fragment +fn fragmentColumnFocusSelect(input: VertexOutput) -> @location(0) vec4f{ + let focused = isTrue(input.isFocused); + let selected = isTrue(input.isSelected); + if(focused) { + if(selected) { + return vec4f(0.9, 0.9, 0.6, 0.5); + }else{ + return vec4f(0.6, 0.6, 0.6, 0.5); + } + }else{ + if(selected) { + return vec4f(0.9, 0.9, 0.7, 0.5); + }else{ + return vec4f(1.0, 1.0, 1.0, 1.0); + } + } +} + +@fragment +fn fragmentRowFocusSelect(input: VertexOutput) -> @location(0) vec4f{ + let focused = isTrue(input.isFocused); + let selected = isTrue(input.isSelected); + if(focused) { + if(selected) { + return vec4f(0.9, 0.9, 0.6, 0.5); + }else{ + return vec4f(0.6, 0.6, 0.6, 0.5); + } + }else{ + if(selected) { + return vec4f(0.9, 0.9, 0.7, 0.5); + }else{ + return vec4f(1.0, 1.0, 1.0, 1.0); + } + } +} + +@fragment +fn fragmentScrollBarBackground(input: VertexOutput) -> @location(0) vec4f{ + if(isTrue(input.isFocused)){ + return vec4f(0.5, 0.5, 0.5, 0.6); + }else{ + return vec4f(0.8, 0.8, 0.8, 0.1); + } +} + +@fragment +fn fragmentScrollBarBody(input: VertexOutput) -> @location(0) vec4f{ + if(isTrue(input.isFocused)){ + return vec4f(0.1, 0.1, 0.1, 0.7); + }else{ + return vec4f(0.3, 0.3, 0.3, 0.6); + } +} + +@fragment +fn fragmentViewportShadow(input: VertexOutput) -> @location(0) vec4f { + return vec4f(0.1, 0.1, 0.1, 0.1); +}`,Kv=`struct VertexOutput { + @builtin(position) position: vec4f, + @location(0) @interpolate(flat) isFocused: u32, + @location(1) @interpolate(flat) isSelected: u32, + @location(2) @interpolate(flat) cellValue: f32, +}; + +@group(0) @binding(5) var gridData: array; + +@vertex +fn vertexBody( + input: VertexInput +) -> VertexOutput { + + let cellX: u32 = input.instanceIndex % u32uni.numColumnsToShow; + let cellY: u32 = input.instanceIndex / u32uni.numColumnsToShow; + let left = u32(viewports[u32uni.viewportIndex].x); + let top = u32(viewports[u32uni.viewportIndex].y); + let gridX: u32 = cellX + left; + let gridY: u32 = cellY + top; + let gridIndex = gridX + gridY * u32uni.gridSize.x; + let columnFocused = checkColumnFocused(gridX); + let rowFocused = checkRowFocused(gridY); + + var output: VertexOutput; + output.position = vec4f(transform(cellX, cellY, input.position), 0, 1); + output.isFocused = select(FALSE, TRUE, (!(columnFocused && rowFocused)) && (columnFocused || rowFocused)); + output.isSelected = select(FALSE, TRUE, checkSelected(gridX) || checkSelected(gridY)); + output.cellValue = gridData[gridIndex]; + return output; +} + +@fragment +fn fragmentBody(input: VertexOutput) -> @location(0) vec4f { + let isInfinity = select(FALSE, TRUE, checkInfinity(input.cellValue)); + if(isInfinity == TRUE) { + if(isTrue(input.isFocused)) { + if(isTrue(input.isSelected)) { + return vec4f(0.6, 0.6, 0.6, 0.9); + } else { + return vec4f(0.6, 0.6, 0.3, 0.9); + } + }else{ + if(isTrue(input.isSelected)) { + return vec4f(0.6, 0.3, 0.6, 0.9); + } else { + return vec4f(0.6, 0.3, 0.3, 0.9); + } + } + }else{ + if(isTrue(input.isFocused)) { + if(isTrue(input.isSelected)) { + let rgb = hsvToRgb(input.cellValue * 0.8, 0.5, 0.5); + return vec4f(rgb, 0.9); + } else { + let rgb = hsvToRgb(input.cellValue * 0.8, 1.0, 0.5); + return vec4f(rgb, 0.9); + } + } else { + if(isTrue(input.isSelected)) { + let rgb = hsvToRgb(input.cellValue * 0.8, 0.5, 1.0); + return vec4f(rgb, 0.9); + } else { + let rgb = hsvToRgb(input.cellValue * 0.8, 1.0, 1.0); + return vec4f(rgb, 0.9); + } + } + } +} +`,Qv=`override Inf: u32 = 99999; +struct VertexOutput { + @builtin(position) position: vec4f, + @location(0) @interpolate(flat) isFocused: u32, + @location(1) @interpolate(flat) isSelected: u32, + @location(2) @interpolate(flat) cellValue: u32, +}; + +@group(0) @binding(5) var gridData: array; + +@vertex +fn vertexBody( + input: VertexInput +) -> VertexOutput { + + let cellX: u32 = input.instanceIndex % u32uni.numColumnsToShow; + let cellY: u32 = input.instanceIndex / u32uni.numColumnsToShow; + let left = u32(viewports[u32uni.viewportIndex].x); + let top = u32(viewports[u32uni.viewportIndex].y); + let gridX: u32 = cellX + left; + let gridY: u32 = cellY + top; + let gridIndex = gridX + gridY * u32uni.gridSize.x; + let columnFocused = checkColumnFocused(gridX); + let rowFocused = checkRowFocused(gridY); + + var output: VertexOutput; + output.position = vec4f(transform(cellX, cellY, input.position), 0, 1); + output.isFocused = select(FALSE, TRUE, (!(columnFocused && rowFocused)) && (columnFocused || rowFocused)); + output.isSelected = select(FALSE, TRUE, checkSelected(gridX) || checkSelected(gridY)); + output.cellValue = gridData[gridIndex]; + return output; +} + +@fragment +fn fragmentBody(input: VertexOutput) -> @location(0) vec4f { + let s = select(1, 0.5, isTrue(input.isFocused)); + let v = select(1, 0.5, isTrue(input.isSelected)); + if(input.cellValue == Inf){ + let rgb = hsvToRgb(1.0, 0.0, 1.0); + return vec4f(rgb, 1.0); + } + let rgb = hsvToRgb(f32(input.cellValue) / 255, 0.9, 0.9); + return vec4f(rgb, 1.0); +} +`,Xm=[-1,-1,1,-1,1,1,-1,-1,1,1,-1,1],Zv=Xm.map(e=>e*.95),pi=24,Pr=new Array(pi*nr*Wm);[...Array(pi).keys()].forEach(e=>{const t=Math.PI*2/pi*e,n=Math.PI*2/pi*(e+1),r=.95;let o=e*nr*Wm;Pr[o++]=0,Pr[o++]=0,Pr[o++]=Math.cos(n)*r,Pr[o++]=Math.sin(n)*r,Pr[o++]=Math.cos(t)*r,Pr[o++]=Math.sin(t)*r});const Km=[...Zv,...Xm,...Pr],qv=Km.length*Ri,Gl=0,$u=6,Jv=6,io={BODY:0,TOP_HEADER:1,LEFT_HEADER:2,SCROLLBAR_BACKGROUND:3,SCROLLBAR_BODY:4,VIEWPORT_SHADOW:5},dl=0,lo=4,kf=[2*nr,dl,Gl,0,2*nr,dl,Gl,0,2*nr,dl,Gl,0,2*nr,2,$u,0,(2+pi)*nr,2,Jv,0,4*2*nr,dl,$u,0],qn=new Map(Array.from(Object.entries(io),([e,t])=>[e,t*lo*is])),fl=1,ey=2,ty=(e,t,n,r,o,i)=>{const l=Math.min((t.width-n.left)/r,(t.height-n.top)/o)<20?$u:Gl;e[io.BODY*lo+fl]=r*o,e[io.BODY*lo+ey]=l,e[io.TOP_HEADER*lo+fl]=r,e[io.LEFT_HEADER*lo+fl]=o,e[io.VIEWPORT_SHADOW*lo+fl]=i},ny={label:"Grid bindGroupLayout",entries:[{binding:0,visibility:GPUShaderStage.VERTEX,buffer:{type:"uniform"}},{binding:1,visibility:GPUShaderStage.VERTEX,buffer:{type:"uniform"}},{binding:2,visibility:GPUShaderStage.VERTEX,buffer:{type:"read-only-storage"}},{binding:3,visibility:GPUShaderStage.VERTEX,buffer:{type:"read-only-storage"}},{binding:4,visibility:GPUShaderStage.VERTEX,buffer:{type:"read-only-storage"}},{binding:5,visibility:GPUShaderStage.VERTEX|GPUShaderStage.COMPUTE,buffer:{type:"read-only-storage"}}]},_u=5,Au=2,Rf=.8,If=.95;var cr=(e=>(e.HUE="HUE",e.RGBA="RGBA",e.CUSTOM="CUSTOM",e))(cr||{});class ry{constructor(t,n,r,o,i,l,s,a){var E,R;this.device=n,this.textureFormat=r,this.gpuCanvasContext=o,this.canvasContext=i;const u=n.createShaderModule({label:"Grid shader",code:Xv+(t===cr.HUE?Kv:t===cr.RGBA?Yv:Qv)}),d=n.createBindGroupLayout(ny),f=n.createPipelineLayout({label:"Grid renderer pipeline layout",bindGroupLayouts:[d]});this.canvasContext=i;const p=(T,g,I,_,F)=>{const $=i.multisample?{multisample:{count:i.multisample}}:{};return g.createRenderPipeline({label:T,layout:f,...$,vertex:{module:u,entryPoint:I,...F,buffers:[{arrayStride:8,attributes:[{format:"float32x2",offset:0,shaderLocation:0}]}]},fragment:{module:u,entryPoint:_,targets:[{format:r,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}}}]}})},x=p("columnFocusSelect",n,"vertexColumnFocusSelect","fragmentColumnFocusSelect"),S=p("rowFocusSelect",n,"vertexRowFocusSelect","fragmentRowFocusSelect"),y=p("body",n,"vertexBody","fragmentBody"),b=p("viewportShadow",n,"vertexViewportShadow","fragmentViewportShadow"),m=p("leftHeader",n,"vertexLeftHeader","fragmentLeftHeader"),h=p("topHeader",n,"vertexTopHeader","fragmentTopHeader"),c=p("scrollBarBackground",n,"vertexScrollBarBackground","fragmentScrollBarBackground"),w=p("scrollBarBody",n,"vertexScrollBarBody","fragmentScrollBarBody",{constants:{scrollBarRadius:((E=i.scrollBar)==null?void 0:E.radius)||_u,scrollBarMargin:((R=i.scrollBar)==null?void 0:R.margin)||Au}});this.drawIndirectBufferSource=new Uint32Array(kf),this.u32UniformBufferSource=new Uint32Array(Ym),this.f32UniformBufferSource=new Float32Array(Hm),this.vertexBuffer=Uv("Vertices",n,qv),Ir(this.device,this.vertexBuffer,new Float32Array(Km)),this.drawIndirectBuffer=n.createBuffer({label:"DrawIndirect",size:kf.length*is,usage:GPUBufferUsage.INDIRECT|GPUBufferUsage.COPY_DST}),this.updateDrawIndirectBuffer(1,1,a),this.f32UniformBuffer=Ef("F32Uniforms",n,jv),this.u32UniformBuffer=Ef("U32Uniforms",n,Gv),this.viewportStateStorage=Hv("ViewportBuffer",n,a);const k=Math.max(s.numColumns,s.numRows)*Ri;this.focusedStateStorage=Vl("FocusedStateBuffer",n,k),this.selectedStateStorage=Vl("SelectedStateBuffer",n,k),this.gridDataBufferStorage=Vl("GridDataBuffer",n,s.numColumns*s.numRows*(t===cr.RGBA?is:Ri)),this.bindGroup=this.createBindGroup("Grid BindGroup",d,this.f32UniformBuffer,this.u32UniformBuffer,this.viewportStateStorage,this.focusedStateStorage,this.selectedStateStorage,this.gridDataBufferStorage),this.columnFocusRenderBundle=this.createColumnFocusRenderBundle(x),this.rowFocusRenderBundle=this.createRowFocusRenderBundle(S),this.bodyRenderBundle=this.createBodyRenderBundle(y),this.viewportShadowRenderBundle=this.createViewportShadowRenderBundle(b),this.topHeaderRenderBundle=this.createTopHeaderRenderBundle(h),this.leftHeaderRenderBundle=this.createLeftHeaderRenderBundle(m),this.scrollBarBodyRenderBundle=this.createScrollBarBodyRenderBundle(w),this.scrollBarBackgroundRenderBundle=this.createScrollBarBackgroundRenderBundle(c)}updateF32UniformBuffer(t,n){Ir(this.device,this.f32UniformBuffer,Vv(this.f32UniformBufferSource,this.canvasContext,t,n))}updateViewportStateStorage(t){Ir(this.device,this.viewportStateStorage,t)}updateU32UniformBuffer(t,n,r,o){Ir(this.device,this.u32UniformBuffer,Wv(this.u32UniformBufferSource,t,n,r,o))}updateDataBufferStorage(t){Ir(this.device,this.gridDataBufferStorage,t)}updateFocusedStateStorage(t){Ir(this.device,this.focusedStateStorage,t)}updateSelectedStateStorage(t){Ir(this.device,this.selectedStateStorage,t)}createBindGroup(t,n,r,o,i,l,s,a){return this.device.createBindGroup({label:t,layout:n,entries:[{binding:0,resource:{buffer:r}},{binding:1,resource:{buffer:o}},{binding:2,resource:{buffer:i}},{binding:3,resource:{buffer:l}},{binding:4,resource:{buffer:s}},{binding:5,resource:{buffer:a}}]})}createRenderBundle(t,n,r){const o=this.device.createRenderBundleEncoder({label:t,colorFormats:[this.textureFormat]});return o.setPipeline(n),o.setVertexBuffer(0,this.vertexBuffer),o.setBindGroup(0,this.bindGroup),o.drawIndirect(this.drawIndirectBuffer,r),o.finish()}updateDrawIndirectBuffer(t,n,r){ty(this.drawIndirectBufferSource,this.canvasContext.canvasSize,this.canvasContext.headerOffset,t,n,r),this.device.queue.writeBuffer(this.drawIndirectBuffer,0,this.drawIndirectBufferSource)}createBodyRenderBundle(t){return this.createRenderBundle("body",t,qn.get("BODY"))}createViewportShadowRenderBundle(t){return this.createRenderBundle("viewportShadow",t,qn.get("VIEWPORT_SHADOW"))}createColumnFocusRenderBundle(t){return this.createRenderBundle("columnFocus",t,qn.get("TOP_HEADER"))}createRowFocusRenderBundle(t){return this.createRenderBundle("rowFocus",t,qn.get("LEFT_HEADER"))}createTopHeaderRenderBundle(t){return this.createRenderBundle("topHeader",t,qn.get("TOP_HEADER"))}createLeftHeaderRenderBundle(t){return this.createRenderBundle("leftHeader",t,qn.get("LEFT_HEADER"))}createScrollBarBackgroundRenderBundle(t){return this.createRenderBundle("scrollBarBackground",t,qn.get("SCROLLBAR_BACKGROUND"))}createScrollBarBodyRenderBundle(t){return this.createRenderBundle("scrollBarBody",t,qn.get("SCROLLBAR_BODY"))}createCommandBuffer(){const t=this.device.createCommandEncoder(),n=this.gpuCanvasContext.getCurrentTexture().createView(),r=t.beginRenderPass({colorAttachments:[{view:n,clearValue:{r:0,g:0,b:0,a:0},loadOp:"clear",storeOp:"store"}]}),o=[this.columnFocusRenderBundle,this.rowFocusRenderBundle,this.bodyRenderBundle,this.viewportShadowRenderBundle,this.topHeaderRenderBundle,this.leftHeaderRenderBundle,this.scrollBarBackgroundRenderBundle,this.scrollBarBodyRenderBundle];return r.executeBundles(o),r.end(),t.finish()}execute(){this.device.queue.submit([this.createCommandBuffer()])}}const fn=-1,Jn=-2,Xr=-3,Kr=-4,Qr=-5;var Ke=(e=>(e[e.NotFocused=0]="NotFocused",e[e.HorizontalFocused=1]="HorizontalFocused",e[e.VerticalFocused=2]="VerticalFocused",e[e.VerticalAndHorizontalFocused=3]="VerticalAndHorizontalFocused",e[e.OutOfFrame=99]="OutOfFrame",e))(Ke||{}),qt=(e=>(e[e.NotSelected=0]="NotSelected",e[e.Selected=1]="Selected",e))(qt||{});function oy(e,t,n,r,o){const i=o.right-o.left,l=o.bottom-o.top,s=n.width/n.height,a=e.numColumns/e.numRows,u=o.left<0,d=e.numColumnse.numColumns,S=l>e.numRows;let y={...o};if(x&&S){if(s===a)return y.left=0,y.right=e.numColumns,y.top=0,y.bottom=e.numRows,y;if(s>a){const b=(o.top+o.bottom)/2,m=e.numColumns/n.width*n.height/2;return y.left=0,y.right=e.numColumns,y.top=b-m,y.bottom=b+m,y}else{const b=(o.left+o.right)/2,m=e.numRows/n.height*n.width/2;return y.top=0,y.bottom=e.numRows,y.left=b-m,y.right=b+m,y}}return x?(y.top=(o.top+o.bottom-e.numRows)/2,y.bottom=(o.top+o.bottom+e.numRows)/2,u?(y.left=0,d?r:(y.right=o.right,y)):(y.right=e.numColumns,d?r:(y.left=o.left,y))):S?(y.left=(o.left+o.right-t.width)/2,y.right=(o.left+o.right+t.width)/2,f?(y.top=0,p?r:(y.bottom=o.bottom,y)):(y.bottom=e.numRows,d?(y.top=e.numRows-l,r):(y.top=o.top,y))):y}const iy=v.forwardRef((e,t)=>{const{focusedStates:n,selectedStates:r}=e,o=ed(),i=Lv(),l=_v(),s=Dv(),a=qc(),u=Nv(),d=v.useRef(),f=v.useRef(-1),p=v.useRef(-1),x=v.useRef();v.useImperativeHandle(t,()=>({refreshData:O=>{I(O)},refreshFocusedState:(O,G,A)=>{_(O,G,A)},refreshSelectedState:(O,G,A)=>{F(O,G,A)},refreshViewportState:O=>{U(O)}}));const S=v.useRef(i.initialOverscroll||{x:0,y:0}),y=v.useRef({numColumnsToShow:0,numRowsToShow:0}),b=v.useRef(null),m=v.useRef({x:0,y:0}),h=v.useRef(!1),c=v.useRef(Ke.OutOfFrame),w=i.viewportIndex*4,k=()=>({left:i.viewportStates[w],top:i.viewportStates[w+1],right:i.viewportStates[w+2],bottom:i.viewportStates[w+3]}),E=({left:O,top:G,right:A,bottom:W})=>{O!==void 0&&(i.viewportStates[w]=O),G!==void 0&&(i.viewportStates[w+1]=G),A!==void 0&&(i.viewportStates[w+2]=A),W!==void 0&&(i.viewportStates[w+3]=W)},R=(O,G,A)=>{const W=A.left<0,Z=A.right>l.numColumns,K=A.top<0,se=A.bottom>l.numRows,ce=c.current===Ke.NotFocused;W?(m.current.y=0,Z?(E({left:0,right:l.numColumns}),ce&&(S.current.x=0)):(E({left:0,right:O.width}),ce&&(S.current.x=A.left*G.width))):Z?(m.current.y=0,E({left:l.numColumns-O.width}),E({right:l.numColumns}),ce&&(S.current.x=(A.right-l.numColumns)*G.width)):!se&&!K&&(E({left:A.left,right:A.right}),ce&&(S.current.x=0)),K?(m.current.y=0,se?(E({top:0,bottom:l.numRows}),ce&&(S.current.y=0)):(E({top:0,bottom:O.height}),ce&&(S.current.y=A.top*G.height))):se?(m.current.y=0,E({top:l.numRows-O.height,bottom:l.numRows}),ce&&(S.current.y=(A.bottom-l.numRows)*G.height)):!Z&&!W&&(E({top:A.top,bottom:A.bottom}),ce&&(S.current.y=0));const{left:$e,top:P,right:z,bottom:q}=k();if(!(P<=q&&$e<=z))throw new Error(`viewport must be valid rectangle: top:${P} <= bottom:${q} && left:${$e} <= right:${z}}`)},T=()=>{if(b.current){const O=b.current.startViewport.right-b.current.startViewport.left,G=b.current.startViewport.bottom-b.current.startViewport.top,[A,W]=c.current===Ke.HorizontalFocused?[-1*(l.numColumns*b.current.delta.x)/(a.canvasSize.width-a.headerOffset.left),0]:c.current===Ke.VerticalFocused?[0,-1*(l.numRows*b.current.delta.y)/(a.canvasSize.height-a.headerOffset.top)]:[O*b.current.delta.x/(a.canvasSize.width-a.headerOffset.left),G*b.current.delta.y/(a.canvasSize.height-a.headerOffset.top)],Z={left:b.current.startViewport.left,right:b.current.startViewport.right,top:b.current.startViewport.top,bottom:b.current.startViewport.bottom},K={left:Z.left-A,right:Z.right-A,top:Z.top-W,bottom:Z.bottom-W};R(b.current.startViewportSize,b.current.startCellSize,K)}else{const{left:O,top:G,right:A,bottom:W}=k(),Z={width:A-O,height:W-G},K={left:O+m.current.x,right:A+m.current.x,top:G+m.current.y,bottom:W+m.current.y};R(Z,{width:(a.canvasSize.width-a.headerOffset.left)/Z.width,height:(a.canvasSize.height-a.headerOffset.top)/Z.height},c.current===Ke.HorizontalFocused||c.current===Ke.VerticalFocused?{left:O,top:G,right:A,bottom:W}:K)}},g=()=>{var O;(O=x.current)==null||O.updateU32UniformBuffer(l,y.current,c.current,i.viewportIndex)},I=O=>{var G,A;(G=x.current)==null||G.updateDataBufferStorage(l.data),xe(),O===i.viewportIndex&&((A=e.onDataChanged)==null||A.call(e,O,l.data))},_=(O,G,A)=>{var W,Z;G===f.current&&A===p.current||(n.fill(Ke.NotFocused),G!==-1&&A===-1?n[G]=Ke.HorizontalFocused:G===-1&&A!==-1?n[A]=Ke.VerticalFocused:G!==-1&&A!==-1&&(n[G]=Ke.HorizontalFocused,n[A]=Ke.VerticalFocused),f.current=G,p.current=A,(W=x.current)==null||W.updateFocusedStateStorage(n),xe(),O===i.viewportIndex&&((Z=e.onFocusedStatesChange)==null||Z.call(e,O,G,A)))},F=(O,G,A)=>{var W,Z;if(O===i.viewportIndex){if(G===fn)if(A===fn){const K=r.some(se=>se>0);r.fill(K?0:1)}else for(let K=0;K{const{left:O,top:G,right:A,bottom:W}=k(),Z=Math.min(Math.ceil(A)-Math.floor(O),l.numColumns),K=Math.min(Math.ceil(W)-Math.floor(G),l.numRows);y.current={numColumnsToShow:Z,numRowsToShow:K}},N=()=>{var O,G,A;x.current&&(x.current.updateF32UniformBuffer(l,S.current),x.current.updateU32UniformBuffer(l,y.current,c.current,i.viewportIndex),(O=x.current)==null||O.updateViewportStateStorage(i.viewportStates),(G=x.current)==null||G.updateDrawIndirectBuffer(y.current.numColumnsToShow,y.current.numRowsToShow,i.numViewports),(A=x.current)==null||A.execute())},U=O=>{O!==i.viewportIndex&&(T(),$(),N())},j=()=>{var O;T(),$(),N(),(O=e.onViewportStateChange)==null||O.call(e,i.viewportIndex)},Y=(O,G)=>{var ke,Be;const{left:A,top:W,right:Z,bottom:K}=k(),se=u==null?void 0:u.getBoundingClientRect();if(!se)throw new Error("canvasRefContext?.current? is null");const ce=O-se.left,$e=G-se.top,P=(a.canvasSize.width-a.headerOffset.left)/(Z-A),z=(a.canvasSize.height-a.headerOffset.top)/(K-W),q=(ce-S.current.x-a.headerOffset.left)/P,ie=($e-S.current.y-a.headerOffset.top)/z,be=q>=0&&q+A=0&&ie+W{if(!u||!u)throw new Error;const{left:A,top:W,right:Z,bottom:K}=k(),se=Y(O,G);if((se.columnIndex===fn||se.rowIndex===fn)&&(u.style.cursor="grab",F(i.viewportIndex,se.columnIndex,se.rowIndex)),se.columnIndex>=0&&se.rowIndex>=0||se.columnIndex===fn||se.rowIndex===fn||se.columnIndex===Jn||se.rowIndex===Jn){u.style.cursor="grab",b.current={start:{x:O,y:G},previous:{x:O,y:G},startViewportSize:{width:Z-A,height:K-W},startCellSize:{width:(a.canvasSize.width-a.headerOffset.left)/(Z-A),height:(a.canvasSize.height-a.headerOffset.top)/(K-W)},startViewport:{top:W,bottom:K,left:A,right:Z},delta:{x:0,y:0},isMouseOut:!1};return}else se.columnIndex===Xr?A*2{B(O.clientX,O.clientY),j()},H=O=>{B(O.touches[0].clientX,O.touches[0].clientY),j()},Q=()=>{u&&(u.style.cursor="default",b.current=null,_(i.viewportIndex,-1,-1))},me=()=>{Q()},Se=O=>{Q()},ae=O=>{u&&O.buttons===0&&(u.style.cursor="default",c.current=Ke.OutOfFrame,b.current&&(b.current.isMouseOut=!0),g(),_(i.viewportIndex,-1,-1),xe())},Ne=O=>{if(b.current&&(b.current.isMouseOut=!1),O.buttons===0){Q(),m.current={x:0,y:0};return}c.current=Ke.NotFocused,g(),j()},J=(O,G,A,W)=>{if(!u||!b.current)throw new Error;const Z=O-b.current.start.x,K=G-b.current.start.y;b.current.delta={x:Z,y:K},m.current={x:-A*b.current.startViewportSize.width/a.canvasSize.width,y:-W*b.current.startViewportSize.height/a.canvasSize.height},xe()},ue=(O,G)=>{var W;if(!u)return;const A=Y(O,G);A.columnIndex===Jn&&A.rowIndex===Jn?(u.style.cursor="pointer",c.current=Ke.HorizontalFocused|Ke.VerticalFocused):A.columnIndex===Jn?(u.style.cursor="pointer",c.current=Ke.HorizontalFocused):A.rowIndex===Jn?(u.style.cursor="pointer",c.current=Ke.VerticalFocused):A.columnIndex===Xr?(u.style.cursor="w-resize",c.current=Ke.HorizontalFocused):A.columnIndex===Kr?(u.style.cursor="e-resize",c.current=Ke.HorizontalFocused):A.rowIndex===Xr?(u.style.cursor="n-resize",c.current=Ke.VerticalFocused):A.rowIndex===Kr?(u.style.cursor="s-resize",c.current=Ke.VerticalFocused):(u.style.cursor="cell",c.current=Ke.NotFocused),(W=x.current)==null||W.updateU32UniformBuffer(l,y.current,c.current,i.viewportIndex),_(i.viewportIndex,A.columnIndex,A.rowIndex)},le=O=>{if(!u)throw new Error;b.current?(u.style.cursor="grabbing",J(O.clientX,O.clientY,O.movementX,O.movementY)):(u.style.cursor="default",ue(O.clientX,O.clientY))},we=O=>{if(!u)throw new Error;O.touches.length>=2&&b.current?(u.style.cursor="grabbing",J(O.touches[0].clientX,O.touches[0].clientY,O.touches[0].clientX-b.current.previous.x,O.touches[0].clientY-b.current.previous.y),b.current.previous={x:O.touches[0].clientX,y:O.touches[0].clientY}):(u.style.cursor="default",ue(O.touches[0].clientX,O.touches[0].clientY))},oe=O=>{var Be;if(O.preventDefault(),O.deltaY===0||!u)return;const G={width:a.canvasSize.width-a.headerOffset.left,height:a.canvasSize.height-a.headerOffset.top},A=k(),{left:W,top:Z,right:K,bottom:se}=A,ce={width:K-W,height:se-Z},$e=O.deltaY>0?1.025:.975,P=u.getBoundingClientRect(),z=O.clientX-P.left-a.headerOffset.left,q=O.clientY-P.top-a.headerOffset.top,ie=ce.width*z/G.width+W,be=ce.height*q/G.height+Z,de={left:ie+(W-ie)*$e,right:ie+(K-ie)*$e,top:be+(Z-be)*$e,bottom:be+(se-be)*$e};m.current={x:0,y:0};const ke=oy(l,ce,G,A,de);E(ke),(Be=x.current)==null||Be.updateViewportStateStorage(i.viewportStates),j()},ve=O=>{b.current&&le(O)},he=O=>{b.current!=null&&b.current.start!=null&&Q()},xe=()=>{d.current||(d.current=setInterval(()=>{if(!b.current){const O=()=>Math.abs(S.current.x)>.1||Math.abs(S.current.y)>.1?(S.current={x:S.current.x*Rf,y:S.current.y*Rf},!0):(S.current={x:0,y:0},!1),G=()=>Math.abs(m.current.x)>.01||Math.abs(m.current.y)>.01?(m.current.x*=If,m.current.y*=If,!0):(m.current.x=0,m.current.y=0,!1),A=O(),W=G();!A&&!W&&(clearInterval(d.current),d.current=void 0)}requestAnimationFrame(j)},16))};return v.useEffect(()=>(x.current=new ry(l.mode,o,s.textureFormat,s.gpuCanvasContext,a,s.texture,l,i.numViewports),u.addEventListener("mousedown",L,{passive:!0}),u.addEventListener("mousemove",le,{passive:!0}),u.addEventListener("mouseup",me,{passive:!0}),u.addEventListener("touchstart",H,{passive:!0}),u.addEventListener("touchmove",we,{passive:!0}),u.addEventListener("touchend",Se,{passive:!0}),u.addEventListener("mouseenter",Ne,{passive:!0}),u.addEventListener("mouseout",ae,{passive:!0}),u.addEventListener("wheel",oe,{passive:!1}),document.addEventListener("mousemove",ve,{passive:!0}),document.addEventListener("mouseup",he,{passive:!0}),h.current=!0,x.current.updateDataBufferStorage(l.data),x.current.updateSelectedStateStorage(r),x.current.updateFocusedStateStorage(n),j(),()=>{u&&(u.removeEventListener("mousedown",L),u.removeEventListener("mousemove",le),u.removeEventListener("mouseup",me),u.removeEventListener("touchstart",H),u.removeEventListener("touchmove",we),u.removeEventListener("touchend",Se),u.removeEventListener("mouseenter",Ne),u.removeEventListener("mouseout",ae),u.removeEventListener("wheel",oe),document.removeEventListener("mousemove",ve),document.removeEventListener("mouseup",he),h.current=!1)}),[o,s.textureFormat,s.gpuCanvasContext,s.texture,a,l,h.current,L,le,oe,ve]),null}),Qm=Ze.memo(v.forwardRef((e,t)=>{const n=Ze.useRef(null);return v.useImperativeHandle(t,()=>({refreshData:r=>{var o;(o=n.current)==null||o.refreshData(r)},refreshFocusedState:(r,o,i)=>{var l;(l=n.current)==null||l.refreshFocusedState(r,o,i)},refreshSelectedState:(r,o,i)=>{var l;(l=n.current)==null||l.refreshSelectedState(r,o,i)},refreshViewportState:r=>{var o;(o=n.current)==null||o.refreshViewportState(r)}})),C.jsx(Ov,{headerOffset:e.headerOffset,canvasSize:e.canvasSize,scrollBar:e.scrollBar,children:C.jsx(Mv,{children:C.jsx($v,{mode:e.mode,numColumns:e.numColumns,numRows:e.numRows,data:e.data,children:C.jsx(Av,{viewportIndex:e.viewportIndex,numViewports:e.numViewports,viewportStates:e.viewportStates,initialOverscroll:e.initialOverscroll,children:C.jsx(Fv,{children:C.jsx(iy,{ref:n,focusedStates:e.focusedStates,selectedStates:e.selectedStates,onFocusedStatesChange:e.onFocusedStateChange,onSelectedStatesChange:e.onSelectedStateChange,onViewportStateChange:e.onViewportStateChange})})})})})})})),td=e=>{const t=[v.useRef(null),v.useRef(null),v.useRef(null)];return t.map((n,r)=>C.jsx(Qm,{mode:e.mode,viewportIndex:r,ref:n,numViewports:t.length,canvasSize:e.canvasSizes[r],headerOffset:e.headerOffset,scrollBar:e.scrollBar,numColumns:e.numColumns,numRows:e.numRows,data:e.data,focusedStates:e.focusedStates,selectedStates:e.selectedStates,viewportStates:e.viewportStates,onFocusedStateChange:(o,i,l)=>{t.filter((s,a)=>a!==r).forEach(s=>{var a;return(a=s.current)==null?void 0:a.refreshFocusedState(o,i,l)})},onSelectedStateChange:(o,i,l)=>{t.filter((s,a)=>a!==r).forEach(s=>{var a;return(a=s.current)==null?void 0:a.refreshSelectedState(o,i,l)})},onViewportStateChange:o=>{t.filter((i,l)=>l!==r).forEach(i=>{var l;return(l=i.current)==null?void 0:l.refreshViewportState(o)})}},r))},ly=e=>{function t(l,s,a=0){const u=new Float32Array(l*s);for(let d=0;d{function t(s,a,u=.1){const d=new Uint32Array(s*a);for(let f=0;f{t.onload=s,t.onerror=a});const n=document.createElement("canvas"),r=n.getContext("2d");if(!r)throw new Error("Could not get 2D context");n.width=t.width,n.height=t.height,r.drawImage(t,0,0,t.width,t.height);const i=r.getImageData(0,0,t.width,t.height).data,l=new Uint32Array(t.width*t.height);for(let s=0;s{const[t,n]=v.useState();return v.useEffect(()=>{(async()=>{const{data:r,width:o,height:i}=await ay(e.src),l=o,s=i,a=Math.max(l,s),u=new Uint32Array(a),d=new Uint32Array(a),f=new Float32Array([0,0,l,s,0,0,l/2,s/2,0,20,220,220]);n({data:r,width:o,height:i,numColumns:l,numRows:s,focusedStates:u,selectedStates:d,viewportStates:f})})()},[e.src]),t?C.jsx(C.Fragment,{children:C.jsx(td,{id:"rgba",mode:cr.RGBA,numColumns:t.numColumns,numRows:t.numRows,headerOffset:e.headerOffset,scrollBar:{radius:5,margin:2},canvasSizes:e.canvasSizes,data:t.data,focusedStates:t.focusedStates,selectedStates:t.selectedStates,viewportStates:t.viewportStates})}):null};var ls=(e=>(e.CPU="CPU",e.GPU="WebGPU Compute Shader(64 workgroups)",e))(ls||{});function Zm(e){let t=0;const n=e.map(r=>t+=r);if(n[n.length-1]<0||1{const r=n-t;return t=n,r})}const Ii={black:"#000",white:"#fff"},Zr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},qr={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Jr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},eo={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},to={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Ho={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},dy={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Gn(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n0?yt(Uo,--Dt):0,Bo--,st===10&&(Bo=1,Gs--),st}function Wt(){return st=Dt2||Pi(st)>3?"":" "}function Ty(e,t){for(;--t&&Wt()&&!(st<48||st>102||st>57&&st<65||st>70&&st<97););return Ji(e,Wl()+(t<6&&Bn()==32&&Wt()==32))}function zu(e){for(;Wt();)switch(st){case e:return Dt;case 34:case 39:e!==34&&e!==39&&zu(st);break;case 40:e===41&&zu(e);break;case 92:Wt();break}return Dt}function Py(e,t){for(;Wt()&&e+st!==57;)if(e+st===84&&Bn()===47)break;return"/*"+Ji(t,Dt-1)+"*"+Vs(e===47?e:Wt())}function By(e){for(;!Pi(Bn());)Wt();return Ji(e,Dt)}function Oy(e){return oh(Yl("",null,null,null,[""],e=rh(e),0,[0],e))}function Yl(e,t,n,r,o,i,l,s,a){for(var u=0,d=0,f=l,p=0,x=0,S=0,y=1,b=1,m=1,h=0,c="",w=o,k=i,E=r,R=c;b;)switch(S=h,h=Wt()){case 40:if(S!=108&&yt(R,f-1)==58){Lu(R+=Te(Hl(h),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:R+=Hl(h);break;case 9:case 10:case 13:case 32:R+=Iy(S);break;case 92:R+=Ty(Wl()-1,7);continue;case 47:switch(Bn()){case 42:case 47:pl(My(Py(Wt(),Wl()),t,n),a);break;default:R+="/"}break;case 123*y:s[u++]=Rn(R)*m;case 125*y:case 59:case 0:switch(h){case 0:case 125:b=0;case 59+d:m==-1&&(R=Te(R,/\f/g,"")),x>0&&Rn(R)-f&&pl(x>32?Pf(R+";",r,n,f-1):Pf(Te(R," ","")+";",r,n,f-2),a);break;case 59:R+=";";default:if(pl(E=Tf(R,t,n,u,d,o,s,c,w=[],k=[],f),i),h===123)if(d===0)Yl(R,t,E,E,w,i,f,s,k);else switch(p===99&&yt(R,3)===110?100:p){case 100:case 108:case 109:case 115:Yl(e,E,E,r&&pl(Tf(e,E,E,0,0,o,s,c,o,w=[],f),k),o,k,f,s,r?w:k);break;default:Yl(R,E,E,E,[""],k,0,s,k)}}u=d=x=0,y=m=1,c=R="",f=l;break;case 58:f=1+Rn(R),x=S;default:if(y<1){if(h==123)--y;else if(h==125&&y++==0&&Ry()==125)continue}switch(R+=Vs(h),h*y){case 38:m=d>0?1:(R+="\f",-1);break;case 44:s[u++]=(Rn(R)-1)*m,m=1;break;case 64:Bn()===45&&(R+=Hl(Wt())),p=Bn(),d=f=Rn(c=R+=By(Wl())),h++;break;case 45:S===45&&Rn(R)==2&&(y=0)}}return i}function Tf(e,t,n,r,o,i,l,s,a,u,d){for(var f=o-1,p=o===0?i:[""],x=od(p),S=0,y=0,b=0;S0?p[m]+" "+h:Te(h,/&\f/g,p[m])))&&(a[b++]=c);return Ws(e,t,n,o===0?nd:s,a,u,d)}function My(e,t,n){return Ws(e,t,n,Jm,Vs(ky()),Ti(e,2,-2),0)}function Pf(e,t,n,r){return Ws(e,t,n,rd,Ti(e,0,r),Ti(e,r+1,-1),r)}function bo(e,t){for(var n="",r=od(e),o=0;o6)switch(yt(e,t+1)){case 109:if(yt(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Ie+"$2-$3$1"+as+(yt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Lu(e,"stretch")?ih(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(yt(e,t+1)!==115)break;case 6444:switch(yt(e,Rn(e)-3-(~Lu(e,"!important")&&10))){case 107:return Te(e,":",":"+Ie)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ie+(yt(e,14)===45?"inline-":"")+"box$3$1"+Ie+"$2$3$1"+Et+"$2box$3")+e}break;case 5936:switch(yt(e,t+11)){case 114:return Ie+e+Et+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ie+e+Et+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ie+e+Et+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ie+e+Et+e+e}return e}var Uy=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case rd:t.return=ih(t.value,t.length);break;case eh:return bo([Yo(t,{value:Te(t.value,"@","@"+Ie)})],o);case nd:if(t.length)return Ey(t.props,function(i){switch(Cy(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bo([Yo(t,{props:[Te(i,/:(read-\w+)/,":"+as+"$1")]})],o);case"::placeholder":return bo([Yo(t,{props:[Te(i,/:(plac\w+)/,":"+Ie+"input-$1")]}),Yo(t,{props:[Te(i,/:(plac\w+)/,":"+as+"$1")]}),Yo(t,{props:[Te(i,/:(plac\w+)/,Et+"input-$1")]})],o)}return""})}},jy=[Uy],Vy=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var b=y.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||jy,i={},l,s=[];l=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var b=y.getAttribute("data-emotion").split(" "),m=1;m=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var t1={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},n1=!1,r1=/[A-Z]|^ms/g,o1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fh=function(t){return t.charCodeAt(1)===45},Of=function(t){return t!=null&&typeof t!="boolean"},Ya=qm(function(e){return fh(e)?e:e.replace(r1,"-$&").toLowerCase()}),Mf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(o1,function(r,o,i){return In={name:o,styles:i,next:In},o})}return t1[t]!==1&&!fh(t)&&typeof n=="number"&&n!==0?n+"px":n},i1="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Bi(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return In={name:o.name,styles:o.styles,next:In},o.name;var i=n;if(i.styles!==void 0){var l=i.next;if(l!==void 0)for(;l!==void 0;)In={name:l.name,styles:l.styles,next:In},l=l.next;var s=i.styles+";";return s}return l1(e,t,n)}case"function":{if(e!==void 0){var a=In,u=n(e);return In=a,Bi(e,t,u)}break}}var d=n;if(t==null)return d;var f=t[d];return f!==void 0?f:d}function l1(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o96?c1:d1},Af=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(l){return t.__emotion_forwardProp(l)&&i(l)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},f1=!1,p1=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return ch(n,r,o),a1(function(){return dh(n,r,o)}),null},m1=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,l;n!==void 0&&(i=n.label,l=n.target);var s=Af(t,n,r),a=s||_f(o),u=!a("as");return function(){var d=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{f.push(d[0][0]);for(var p=d.length,x=1;xt(g1(o)?n:o):t;return C.jsx(u1,{styles:r})}/** + * @mui/styled-engine v6.1.1 + * + * @license MIT + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */function gh(e,t){return Sr(e,t)}const y1=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function Tn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function vh(e){if(!Tn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=vh(e[n])}),t}function Rt(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Tn(e)&&Tn(t)&&Object.keys(t).forEach(o=>{Tn(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Tn(e[o])?r[o]=Rt(e[o],t[o],n):n.clone?r[o]=Tn(t[o])?vh(t[o]):t[o]:r[o]=t[o]}),r}const S1=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function x1(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=S1(t),l=Object.keys(i);function s(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function a(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function u(p,x){const S=l.indexOf(x);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(S!==-1&&typeof t[l[S]]=="number"?t[l[S]]:x)-r/100}${n})`}function d(p){return l.indexOf(p)+1r.startsWith("@container")).sort((r,o)=>{var l,s;const i=/min-width:\s*([0-9.]+)/;return+(((l=r.match(i))==null?void 0:l[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function b1(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function C1(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function E1(e){const t=(i,l)=>i.replace("@media",l?`@container ${l}`:"@container");function n(i,l){i.up=(...s)=>t(e.breakpoints.up(...s),l),i.down=(...s)=>t(e.breakpoints.down(...s),l),i.between=(...s)=>t(e.breakpoints.between(...s),l),i.only=(...s)=>t(e.breakpoints.only(...s),l),i.not=(...s)=>{const a=t(e.breakpoints.not(...s),l);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const k1={borderRadius:4};function mi(e,t){return t?Rt(e,t,{clone:!1}):e}const na={xs:0,sm:600,md:900,lg:1200,xl:1536},Lf={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${na[e]}px)`},R1={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:na[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Wn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||Lf;return t.reduce((l,s,a)=>(l[i.up(i.keys[a])]=n(t[a]),l),{})}if(typeof t=="object"){const i=r.breakpoints||Lf;return Object.keys(t).reduce((l,s)=>{if(b1(i.keys,s)){const a=C1(r.containerQueries?r:R1,s);a&&(l[a]=n(t[s],s))}else if(Object.keys(i.values||na).includes(s)){const a=i.up(s);l[a]=n(t[s],s)}else{const a=s;l[a]=t[a]}return l},{})}return n(t)}function I1(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function T1(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function re(e){if(typeof e!="string")throw new Error(Gn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ra(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function us(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=ra(e,n)||r,t&&(o=t(o,r,e)),o}function it(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=l=>{if(l[t]==null)return null;const s=l[t],a=l.theme,u=ra(a,r)||{};return Wn(l,s,f=>{let p=us(u,o,f);return f===p&&typeof f=="string"&&(p=us(u,o,`${t}${f==="default"?"":re(f)}`,f)),n===!1?p:{[n]:p}})};return i.propTypes={},i.filterProps=[t],i}function P1(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const B1={m:"margin",p:"padding"},O1={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},zf={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},M1=P1(e=>{if(e.length>2)if(zf[e])e=zf[e];else return[e];const[t,n]=e.split(""),r=B1[t],o=O1[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),dd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...dd,...fd];function tl(e,t,n,r){const o=ra(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const l=Math.abs(i),s=o[l];return i>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function pd(e){return tl(e,"spacing",8)}function nl(e,t){return typeof t=="string"||t==null?t:e(t)}function N1(e,t){return n=>e.reduce((r,o)=>(r[o]=nl(t,n),r),{})}function $1(e,t,n,r){if(!t.includes(n))return null;const o=M1(n),i=N1(o,r),l=e[n];return Wn(e,l,i)}function yh(e,t){const n=pd(e.theme);return Object.keys(e).map(r=>$1(e,t,r,n)).reduce(mi,{})}function tt(e){return yh(e,dd)}tt.propTypes={};tt.filterProps=dd;function nt(e){return yh(e,fd)}nt.propTypes={};nt.filterProps=fd;function Sh(e=8,t=pd({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const l=t(i);return typeof l=="number"?`${l}px`:l}).join(" ");return n.mui=!0,n}function oa(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?mi(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function en(e){return typeof e!="number"?e:`${e}px solid`}function cn(e,t){return it({prop:e,themeKey:"borders",transform:t})}const _1=cn("border",en),A1=cn("borderTop",en),L1=cn("borderRight",en),z1=cn("borderBottom",en),F1=cn("borderLeft",en),D1=cn("borderColor"),U1=cn("borderTopColor"),j1=cn("borderRightColor"),V1=cn("borderBottomColor"),G1=cn("borderLeftColor"),W1=cn("outline",en),H1=cn("outlineColor"),ia=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=tl(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:nl(t,r)});return Wn(e,e.borderRadius,n)}return null};ia.propTypes={};ia.filterProps=["borderRadius"];oa(_1,A1,L1,z1,F1,D1,U1,j1,V1,G1,ia,W1,H1);const la=e=>{if(e.gap!==void 0&&e.gap!==null){const t=tl(e.theme,"spacing",8),n=r=>({gap:nl(t,r)});return Wn(e,e.gap,n)}return null};la.propTypes={};la.filterProps=["gap"];const sa=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=tl(e.theme,"spacing",8),n=r=>({columnGap:nl(t,r)});return Wn(e,e.columnGap,n)}return null};sa.propTypes={};sa.filterProps=["columnGap"];const aa=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=tl(e.theme,"spacing",8),n=r=>({rowGap:nl(t,r)});return Wn(e,e.rowGap,n)}return null};aa.propTypes={};aa.filterProps=["rowGap"];const Y1=it({prop:"gridColumn"}),X1=it({prop:"gridRow"}),K1=it({prop:"gridAutoFlow"}),Q1=it({prop:"gridAutoColumns"}),Z1=it({prop:"gridAutoRows"}),q1=it({prop:"gridTemplateColumns"}),J1=it({prop:"gridTemplateRows"}),eS=it({prop:"gridTemplateAreas"}),tS=it({prop:"gridArea"});oa(la,sa,aa,Y1,X1,K1,Q1,Z1,q1,J1,eS,tS);function Co(e,t){return t==="grey"?t:e}const nS=it({prop:"color",themeKey:"palette",transform:Co}),rS=it({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Co}),oS=it({prop:"backgroundColor",themeKey:"palette",transform:Co});oa(nS,rS,oS);function Vt(e){return e<=1&&e!==0?`${e*100}%`:e}const iS=it({prop:"width",transform:Vt}),md=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,l,s,a;const r=((l=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:l[n])||na[n];return r?((a=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:a.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Vt(n)}};return Wn(e,e.maxWidth,t)}return null};md.filterProps=["maxWidth"];const lS=it({prop:"minWidth",transform:Vt}),sS=it({prop:"height",transform:Vt}),aS=it({prop:"maxHeight",transform:Vt}),uS=it({prop:"minHeight",transform:Vt});it({prop:"size",cssProperty:"width",transform:Vt});it({prop:"size",cssProperty:"height",transform:Vt});const cS=it({prop:"boxSizing"});oa(iS,md,lS,sS,aS,uS,cS);const rl={border:{themeKey:"borders",transform:en},borderTop:{themeKey:"borders",transform:en},borderRight:{themeKey:"borders",transform:en},borderBottom:{themeKey:"borders",transform:en},borderLeft:{themeKey:"borders",transform:en},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:en},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ia},color:{themeKey:"palette",transform:Co},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Co},backgroundColor:{themeKey:"palette",transform:Co},p:{style:nt},pt:{style:nt},pr:{style:nt},pb:{style:nt},pl:{style:nt},px:{style:nt},py:{style:nt},padding:{style:nt},paddingTop:{style:nt},paddingRight:{style:nt},paddingBottom:{style:nt},paddingLeft:{style:nt},paddingX:{style:nt},paddingY:{style:nt},paddingInline:{style:nt},paddingInlineStart:{style:nt},paddingInlineEnd:{style:nt},paddingBlock:{style:nt},paddingBlockStart:{style:nt},paddingBlockEnd:{style:nt},m:{style:tt},mt:{style:tt},mr:{style:tt},mb:{style:tt},ml:{style:tt},mx:{style:tt},my:{style:tt},margin:{style:tt},marginTop:{style:tt},marginRight:{style:tt},marginBottom:{style:tt},marginLeft:{style:tt},marginX:{style:tt},marginY:{style:tt},marginInline:{style:tt},marginInlineStart:{style:tt},marginInlineEnd:{style:tt},marginBlock:{style:tt},marginBlockStart:{style:tt},marginBlockEnd:{style:tt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:la},rowGap:{style:aa},columnGap:{style:sa},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Vt},maxWidth:{style:md},minWidth:{transform:Vt},height:{transform:Vt},maxHeight:{transform:Vt},minHeight:{transform:Vt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function dS(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function fS(e,t){return typeof e=="function"?e(t):e}function pS(){function e(n,r,o,i){const l={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:a=n,themeKey:u,transform:d,style:f}=s;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const p=ra(o,u)||{};return f?f(l):Wn(l,r,S=>{let y=us(p,d,S);return S===y&&typeof S=="string"&&(y=us(p,d,`${n}${S==="default"?"":re(S)}`,S)),a===!1?y:{[a]:y}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??rl;function l(s){let a=s;if(typeof s=="function")a=s(o);else if(typeof s!="object")return s;if(!a)return null;const u=I1(o.breakpoints),d=Object.keys(u);let f=u;return Object.keys(a).forEach(p=>{const x=fS(a[p],o);if(x!=null)if(typeof x=="object")if(i[p])f=mi(f,e(p,x,o,i));else{const S=Wn({theme:o},x,y=>({[p]:y}));dS(S,x)?f[p]=t({sx:x,theme:o}):f=mi(f,S)}else f=mi(f,e(p,x,o,i))}),w1(o,T1(d,f))}return Array.isArray(r)?r.map(l):l(r)}return t}const jo=pS();jo.filterProps=["sx"];function mS(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function hd(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...l}=e,s=x1(n),a=Sh(o);let u=Rt({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:a,shape:{...k1,...i}},l);return u=E1(u),u.applyStyles=mS,u=t.reduce((d,f)=>Rt(d,f),u),u.unstable_sxConfig={...rl,...l==null?void 0:l.unstable_sxConfig},u.unstable_sx=function(f){return jo({sx:f,theme:this})},u}function hS(e){return Object.keys(e).length===0}function gS(e=null){const t=v.useContext(ud);return!t||hS(t)?e:t}const vS=hd();function ua(e=vS){return gS(e)}function yS({styles:e,themeId:t,defaultTheme:n={}}){const r=ua(n),o=typeof e=="function"?e(t&&r[t]||r):e;return C.jsx(v1,{styles:o})}const SS=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??rl;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function xh(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=SS(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...l)=>{const s=t(...l);return Tn(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const Ff=e=>e,xS=()=>{let e=Ff;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ff}}},wh=xS();function bh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ts!=="theme"&&s!=="sx"&&s!=="as"})(jo);return v.forwardRef(function(a,u){const d=ua(n),{className:f,component:p="div",...x}=xh(a);return C.jsx(i,{as:p,ref:u,className:pe(f,o?o(r):r),theme:t&&d[t]||d,...x})})}const bS={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function je(e,t,n="Mui"){const r=bS[t];return r?`${n}-${r}`:`${wh.generate(e)}-${t}`}function Pe(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=je(e,o,n)}),r}var _e={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var gd=Symbol.for("react.element"),vd=Symbol.for("react.portal"),ca=Symbol.for("react.fragment"),da=Symbol.for("react.strict_mode"),fa=Symbol.for("react.profiler"),pa=Symbol.for("react.provider"),ma=Symbol.for("react.context"),CS=Symbol.for("react.server_context"),ha=Symbol.for("react.forward_ref"),ga=Symbol.for("react.suspense"),va=Symbol.for("react.suspense_list"),ya=Symbol.for("react.memo"),Sa=Symbol.for("react.lazy"),ES=Symbol.for("react.offscreen"),Ch;Ch=Symbol.for("react.module.reference");function dn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case gd:switch(e=e.type,e){case ca:case fa:case da:case ga:case va:return e;default:switch(e=e&&e.$$typeof,e){case CS:case ma:case ha:case Sa:case ya:case pa:return e;default:return t}}case vd:return t}}}_e.ContextConsumer=ma;_e.ContextProvider=pa;_e.Element=gd;_e.ForwardRef=ha;_e.Fragment=ca;_e.Lazy=Sa;_e.Memo=ya;_e.Portal=vd;_e.Profiler=fa;_e.StrictMode=da;_e.Suspense=ga;_e.SuspenseList=va;_e.isAsyncMode=function(){return!1};_e.isConcurrentMode=function(){return!1};_e.isContextConsumer=function(e){return dn(e)===ma};_e.isContextProvider=function(e){return dn(e)===pa};_e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===gd};_e.isForwardRef=function(e){return dn(e)===ha};_e.isFragment=function(e){return dn(e)===ca};_e.isLazy=function(e){return dn(e)===Sa};_e.isMemo=function(e){return dn(e)===ya};_e.isPortal=function(e){return dn(e)===vd};_e.isProfiler=function(e){return dn(e)===fa};_e.isStrictMode=function(e){return dn(e)===da};_e.isSuspense=function(e){return dn(e)===ga};_e.isSuspenseList=function(e){return dn(e)===va};_e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ca||e===fa||e===da||e===ga||e===va||e===ES||typeof e=="object"&&e!==null&&(e.$$typeof===Sa||e.$$typeof===ya||e.$$typeof===pa||e.$$typeof===ma||e.$$typeof===ha||e.$$typeof===Ch||e.getModuleId!==void 0)};_e.typeOf=dn;const kS=hd();function Xa(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Fu(e,t,n){return TS(t)?n:t[e]||t}const ml=Symbol("mui.processed_props");function hl(e,t,n){if(ml in e)return e[ml];const r={...e,theme:Fu(t,e.theme,n)};return e[ml]=r,r[ml]=r,r}function RS(e){return e?(t,n)=>n[e]:null}function Xl(e,t){var r;const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(o=>Xl(o,t));if(Array.isArray(n==null?void 0:n.variants)){const{variants:o,...i}=n;let l=i,s;e:for(let a=0;ajo(hl(s,t,n));return i.__mui_systemSx=!0,(s,a={})=>{y1(s,E=>E.filter(R=>!(R!=null&&R.__mui_systemSx)));const{name:u,slot:d,skipVariantsResolver:f,skipSx:p,overridesResolver:x=RS(BS(d)),...S}=a,y=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,b=p||!1;let m,h=Xa;d==="Root"||d==="root"?h=r:d?h=o:PS(s)&&(h=void 0);const c=gh(s,{shouldForwardProp:h,label:m,...S}),w=E=>typeof E=="function"&&E.__emotion_real!==E||Tn(E)?R=>Xl(E,hl(R,t,n)):E,k=(E,...R)=>{let T=w(E);const g=R?R.map(w):[];u&&x&&g.push(F=>{const $=Fu(t,F.theme,n);if(!$.components||!$.components[u]||!$.components[u].styleOverrides)return null;const N=$.components[u].styleOverrides,U={},j=hl(F,t,n);for(const Y in N)U[Y]=Xl(N[Y],j);return x(F,U)}),u&&!y&&g.push(F=>{var U,j;const $=Fu(t,F.theme,n),N=(j=(U=$==null?void 0:$.components)==null?void 0:U[u])==null?void 0:j.variants;return N?Xl({variants:N},hl(F,t,n)):null}),b||g.push(i);const I=g.length-R.length;if(Array.isArray(E)&&I>0){const F=new Array(I).fill("");T=[...E,...F],T.raw=[...E.raw,...F]}const _=c(T,...g);return s.muiName&&(_.muiName=s.muiName),_};return c.withConfig&&(k.withConfig=c.withConfig),k}}function TS(e){for(const t in e)return!1;return!0}function PS(e){return typeof e=="string"&&e.charCodeAt(0)>96}function BS(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Oi(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],l=t[o];if(!l)n[o]=i||{};else if(!i)n[o]=l;else{n[o]={...l};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const a=s;n[o][a]=Oi(i[a],l[a])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function OS(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Oi(t.components[n].defaultProps,r)}function MS({props:e,name:t,defaultTheme:n,themeId:r}){let o=ua(n);return r&&(o=o[r]||o),OS({theme:o,name:t,props:e})}const Nn=typeof window<"u"?v.useLayoutEffect:v.useEffect;function so(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function yd(e,t=0,n=1){return so(e,t,n)}function NS(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function xr(e){if(e.type)return e;if(e.charAt(0)==="#")return xr(NS(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Gn(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(Gn(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const $S=e=>{const t=xr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},li=(e,t)=>{try{return $S(e)}catch{return e}};function xa(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Eh(e){e=xr(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),l=(u,d=(u+n/30)%12)=>o-i*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const a=[Math.round(l(0)*255),Math.round(l(8)*255),Math.round(l(4)*255)];return e.type==="hsla"&&(s+="a",a.push(t[3])),xa({type:s,values:a})}function Du(e){e=xr(e);let t=e.type==="hsl"||e.type==="hsla"?xr(Eh(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function _S(e,t){const n=Du(e),r=Du(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Pt(e,t){return e=xr(e),t=yd(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,xa(e)}function gl(e,t,n){try{return Pt(e,t)}catch{return e}}function Mi(e,t){if(e=xr(e),t=yd(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return xa(e)}function Ae(e,t,n){try{return Mi(e,t)}catch{return e}}function Ni(e,t){if(e=xr(e),t=yd(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return xa(e)}function Le(e,t,n){try{return Ni(e,t)}catch{return e}}function AS(e,t=.15){return Du(e)>.5?Mi(e,t):Ni(e,t)}function vl(e,t,n){try{return AS(e,t)}catch{return e}}function Df(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function wa(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Ka(e,t){var n,r,o;return v.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function pt(e){return e&&e.ownerDocument||document}function Hn(e){return pt(e).defaultView||window}function Uu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let Uf=0;function LS(e){const[t,n]=v.useState(e),r=t;return v.useEffect(()=>{t==null&&(Uf+=1,n(`mui-${Uf}`))},[t]),r}const zS={...Nu},jf=zS.useId;function FS(e){return jf!==void 0?jf():LS(e)}function ju({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=v.useRef(e!==void 0),[i,l]=v.useState(t),s=o?e:i,a=v.useCallback(u=>{o||l(u)},[]);return[s,a]}function rn(e){const t=v.useRef(e);return Nn(()=>{t.current=e}),v.useRef((...n)=>(0,t.current)(...n)).current}function ht(...e){return v.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Uu(n,t)})},e)}const Vf={};function kh(e,t){const n=v.useRef(Vf);return n.current===Vf&&(n.current=e(t)),n}const DS=[];function US(e){v.useEffect(e,DS)}class Sd{constructor(){Wo(this,"currentId",null);Wo(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Wo(this,"disposeEffect",()=>this.clear)}static create(){return new Sd}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Rh(){const e=kh(Sd.create).current;return US(e.disposeEffect),e}function cs(e){try{return e.matches(":focus-visible")}catch{}return!1}function Ih(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function jS(e){return v.Children.toArray(e).filter(t=>v.isValidElement(t))}const VS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Xe(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let l="",s=!0;for(let a=0;ar.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Gf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Ph(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const x=pe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),S={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...n,...o,...r};return x.length>0&&(y.className=x),Object.keys(S).length>0&&(y.style=S),{props:y,internalRef:void 0}}const l=hi({...o,...r}),s=Gf(r),a=Gf(o),u=t(l),d=pe(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),f={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},p={...u,...n,...a,...s};return d.length>0&&(p.className=d),Object.keys(f).length>0&&(p.style=f),{props:p,internalRef:u.ref}}function Bh(e,t,n){return typeof e=="function"?e(t,n):e}function $t(e){var f;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,l=o?{}:Bh(n,r),{props:s,internalRef:a}=Ph({...i,externalSlotProps:l}),u=ht(a,l==null?void 0:l.ref,(f=e.additionalProps)==null?void 0:f.ref);return Th(t,{...s,ref:u},r)}function ol(e){return!e||!v.isValidElement(e)?null:e.props.propertyIsEnumerable("ref")?e.props.ref:e.ref}const WS=v.createContext(),ba=()=>v.useContext(WS)??!1,HS=v.createContext(void 0);function YS(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Oi(o.defaultProps,r):!o.styleOverrides&&!o.variants?Oi(o,r):r}function XS({props:e,name:t}){const n=v.useContext(HS);return YS({props:e,name:t,theme:{components:n}})}function KS(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const Wf=(e,t,n,r=[])=>{let o=e;t.forEach((i,l)=>{l===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},QS=(e,t,n)=>{function r(o,i=[],l=[]){Object.entries(o).forEach(([s,a])=>{(!n||n&&!n([...i,s]))&&a!=null&&(typeof a=="object"&&Object.keys(a).length>0?r(a,[...i,s],Array.isArray(a)?[...l,s]:l):t([...i,s],a,l))})}r(e)},ZS=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Qa(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},l={};return QS(e,(s,a,u)=>{if((typeof a=="string"||typeof a=="number")&&(!r||!r(s,a))){const d=`--${n?`${n}-`:""}${s.join("-")}`,f=ZS(s,a);Object.assign(o,{[d]:f}),Wf(i,s,`var(${d})`,u),Wf(l,s,`var(${d}, ${f})`,u)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:l}}function qS(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:l,defaultColorScheme:s="light",...a}=e,{vars:u,css:d,varsWithDefaults:f}=Qa(a,t);let p=f;const x={},{[s]:S,...y}=i;if(Object.entries(y||{}).forEach(([c,w])=>{const{vars:k,css:E,varsWithDefaults:R}=Qa(w,t);p=Rt(p,R),x[c]={css:E,vars:k}}),S){const{css:c,vars:w,varsWithDefaults:k}=Qa(S,t);p=Rt(p,k),x[s]={css:c,vars:w}}function b(c,w){var E,R;let k=o;if(o==="class"&&(k=".%s"),o==="data"&&(k="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(k=`[${o}="%s"]`),c){if(k==="media")return e.defaultColorScheme===c?":root":{[`@media (prefers-color-scheme: ${((R=(E=i[c])==null?void 0:E.palette)==null?void 0:R.mode)||c})`]:{":root":w}};if(k)return e.defaultColorScheme===c?`:root, ${k.replace("%s",String(c))}`:k.replace("%s",String(c))}return":root"}return{vars:p,generateThemeVars:()=>{let c={...u};return Object.entries(x).forEach(([,{vars:w}])=>{c=Rt(c,w)}),c},generateStyleSheets:()=>{var T,g;const c=[],w=e.defaultColorScheme||"light";function k(I,_){Object.keys(_).length&&c.push(typeof I=="string"?{[I]:{..._}}:I)}k(n(void 0,{...d}),d);const{[w]:E,...R}=x;if(E){const{css:I}=E,_=(g=(T=i[w])==null?void 0:T.palette)==null?void 0:g.mode,F=!r&&_?{colorScheme:_,...I}:{...I};k(n(w,{...F}),F)}return Object.entries(R).forEach(([I,{css:_}])=>{var N,U;const F=(U=(N=i[I])==null?void 0:N.palette)==null?void 0:U.mode,$=!r&&F?{colorScheme:F,..._}:{..._};k(n(I,{...$}),$)}),c}}}function JS(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Hf={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ii.white,default:Ii.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Za={text:{primary:Ii.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Ii.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Yf(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Ni(e.main,o):t==="dark"&&(e.dark=Mi(e.main,i)))}function ex(e="light"){return e==="dark"?{main:Jr[200],light:Jr[50],dark:Jr[400]}:{main:Jr[700],light:Jr[400],dark:Jr[800]}}function tx(e="light"){return e==="dark"?{main:qr[200],light:qr[50],dark:qr[400]}:{main:qr[500],light:qr[300],dark:qr[700]}}function nx(e="light"){return e==="dark"?{main:Zr[500],light:Zr[300],dark:Zr[700]}:{main:Zr[700],light:Zr[400],dark:Zr[800]}}function rx(e="light"){return e==="dark"?{main:eo[400],light:eo[300],dark:eo[700]}:{main:eo[700],light:eo[500],dark:eo[900]}}function ox(e="light"){return e==="dark"?{main:to[400],light:to[300],dark:to[700]}:{main:to[800],light:to[500],dark:to[900]}}function ix(e="light"){return e==="dark"?{main:Ho[400],light:Ho[300],dark:Ho[700]}:{main:"#ed6c02",light:Ho[500],dark:Ho[900]}}function xd(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||ex(t),l=e.secondary||tx(t),s=e.error||nx(t),a=e.info||rx(t),u=e.success||ox(t),d=e.warning||ix(t);function f(y){return _S(y,Za.text.primary)>=n?Za.text.primary:Hf.text.primary}const p=({color:y,name:b,mainShade:m=500,lightShade:h=300,darkShade:c=700})=>{if(y={...y},!y.main&&y[m]&&(y.main=y[m]),!y.hasOwnProperty("main"))throw new Error(Gn(11,b?` (${b})`:"",m));if(typeof y.main!="string")throw new Error(Gn(12,b?` (${b})`:"",JSON.stringify(y.main)));return Yf(y,"light",h,r),Yf(y,"dark",c,r),y.contrastText||(y.contrastText=f(y.main)),y},x={dark:Za,light:Hf};return Rt({common:{...Ii},mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:a,name:"info"}),success:p({color:u,name:"success"}),grey:dy,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...x[t]},o)}function lx(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function sx(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function ax(e){return Math.round(e*1e5)/1e5}const Xf={textTransform:"uppercase"},Kf='"Roboto", "Helvetica", "Arial", sans-serif';function ux(e,t){const{fontFamily:n=Kf,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:l=500,fontWeightBold:s=700,htmlFontSize:a=16,allVariants:u,pxToRem:d,...f}=typeof t=="function"?t(e):t,p=r/14,x=d||(b=>`${b/a*p}rem`),S=(b,m,h,c,w)=>({fontFamily:n,fontWeight:b,fontSize:x(m),lineHeight:h,...n===Kf?{letterSpacing:`${ax(c/m)}em`}:{},...w,...u}),y={h1:S(o,96,1.167,-1.5),h2:S(o,60,1.2,-.5),h3:S(i,48,1.167,0),h4:S(i,34,1.235,.25),h5:S(i,24,1.334,0),h6:S(l,20,1.6,.15),subtitle1:S(i,16,1.75,.15),subtitle2:S(l,14,1.57,.1),body1:S(i,16,1.5,.15),body2:S(i,14,1.43,.15),button:S(l,14,1.75,.4,Xf),caption:S(i,12,1.66,.4),overline:S(i,12,2.66,1,Xf),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Rt({htmlFontSize:a,pxToRem:x,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:l,fontWeightBold:s,...y},f,{clone:!1})}const cx=.2,dx=.14,fx=.12;function He(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${cx})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${dx})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${fx})`].join(",")}const px=["none",He(0,2,1,-1,0,1,1,0,0,1,3,0),He(0,3,1,-2,0,2,2,0,0,1,5,0),He(0,3,3,-2,0,3,4,0,0,1,8,0),He(0,2,4,-1,0,4,5,0,0,1,10,0),He(0,3,5,-1,0,5,8,0,0,1,14,0),He(0,3,5,-1,0,6,10,0,0,1,18,0),He(0,4,5,-2,0,7,10,1,0,2,16,1),He(0,5,5,-3,0,8,10,1,0,3,14,2),He(0,5,6,-3,0,9,12,1,0,3,16,2),He(0,6,6,-3,0,10,14,1,0,4,18,3),He(0,6,7,-4,0,11,15,1,0,4,20,3),He(0,7,8,-4,0,12,17,2,0,5,22,4),He(0,7,8,-4,0,13,19,2,0,5,24,4),He(0,7,9,-4,0,14,21,2,0,5,26,4),He(0,8,9,-5,0,15,22,2,0,6,28,5),He(0,8,10,-5,0,16,24,2,0,6,30,5),He(0,8,11,-5,0,17,26,2,0,6,32,5),He(0,9,11,-5,0,18,28,2,0,7,34,6),He(0,9,12,-6,0,19,29,2,0,7,36,6),He(0,10,13,-6,0,20,31,3,0,8,38,7),He(0,10,13,-6,0,21,33,3,0,8,40,7),He(0,10,14,-6,0,22,35,3,0,8,42,7),He(0,11,14,-7,0,23,36,3,0,9,44,8),He(0,11,15,-7,0,24,38,3,0,9,46,8)],mx={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},hx={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Qf(e){return`${Math.round(e)}ms`}function gx(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function vx(e){const t={...mx,...e.easing},n={...hx,...e.duration};return{getAutoHeightDuration:gx,create:(o=["all"],i={})=>{const{duration:l=n.standard,easing:s=t.easeInOut,delay:a=0,...u}=i;return(Array.isArray(o)?o:[o]).map(d=>`${d} ${typeof l=="string"?l:Qf(l)} ${s} ${typeof a=="string"?a:Qf(a)}`).join(",")},...e,easing:t,duration:n}}const yx={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Vu(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:l={},typography:s={},shape:a,...u}=e;if(e.vars)throw new Error(Gn(20));const d=xd(i),f=hd(e);let p=Rt(f,{mixins:sx(f.breakpoints,r),palette:d,shadows:px.slice(),typography:ux(d,s),transitions:vx(l),zIndex:{...yx}});return p=Rt(p,u),p=t.reduce((x,S)=>Rt(x,S),p),p.unstable_sxConfig={...rl,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(S){return jo({sx:S,theme:this})},p}function Gu(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Sx=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Gu(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Oh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Mh(e){return e==="dark"?Sx:[]}function xx(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=xd(t);return{palette:i,opacity:{...Oh(i.mode),...n},overlays:r||Mh(i.mode),...o}}function wx(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const bx=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Cx=e=>(t,n)=>{const r=e.colorSchemeSelector;let o=r;if(r==="class"&&(o=".%s"),r==="data"&&(o="[data-%s]"),r!=null&&r.startsWith("data-")&&!r.includes("%s")&&(o=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const i={};return bx(e.cssVarPrefix).forEach(l=>{i[l]=n[l],delete n[l]}),o==="media"?{":root":n,"@media (prefers-color-scheme: dark)":{":root":i}}:o?{[o.replace("%s",t)]:i,[`:root, ${o.replace("%s",t)}`]:n}:{":root":{...n,...i}}}if(o&&o!=="media")return`:root, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{":root":n}};if(o)return o.replace("%s",String(t))}return":root"};function Ex(e){return Tn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function kx(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i{e[n]||(e[n]={})})}function M(e,t,n){!e[t]&&n&&(e[t]=n)}function si(e){return!e||!e.startsWith("hsl")?e:Eh(e)}function zn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=li(si(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). +To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Ix(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const bn=e=>{try{return e()}catch{}},Tx=(e="mui")=>KS(e);function qa(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=xx({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...l}=Vu({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...Oh(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Mh(o)},l}function Px(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:l=wx,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,...a}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),f=Tx(i),{[d]:p,light:x,dark:S,...y}=n,b={...y};let m=p;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(m=!0),!m)throw new Error(Gn(21,d));const h=qa(b,m,a,d);x&&!b.light&&qa(b,x,void 0,"light"),S&&!b.dark&&qa(b,S,void 0,"dark");let c={defaultColorScheme:d,...h,cssVarPrefix:i,colorSchemeSelector:s,getCssVar:f,colorSchemes:b,font:{...lx(h.typography),...h.font},spacing:Ix(a.spacing)};Object.keys(c.colorSchemes).forEach(T=>{const g=c.colorSchemes[T].palette,I=_=>{const F=_.split("-"),$=F[1],N=F[2];return f(_,g[$][N])};if(g.mode==="light"&&(M(g.common,"background","#fff"),M(g.common,"onBackground","#000")),g.mode==="dark"&&(M(g.common,"background","#000"),M(g.common,"onBackground","#fff")),Rx(g,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),g.mode==="light"){M(g.Alert,"errorColor",Ae(g.error.light,.6)),M(g.Alert,"infoColor",Ae(g.info.light,.6)),M(g.Alert,"successColor",Ae(g.success.light,.6)),M(g.Alert,"warningColor",Ae(g.warning.light,.6)),M(g.Alert,"errorFilledBg",I("palette-error-main")),M(g.Alert,"infoFilledBg",I("palette-info-main")),M(g.Alert,"successFilledBg",I("palette-success-main")),M(g.Alert,"warningFilledBg",I("palette-warning-main")),M(g.Alert,"errorFilledColor",bn(()=>g.getContrastText(g.error.main))),M(g.Alert,"infoFilledColor",bn(()=>g.getContrastText(g.info.main))),M(g.Alert,"successFilledColor",bn(()=>g.getContrastText(g.success.main))),M(g.Alert,"warningFilledColor",bn(()=>g.getContrastText(g.warning.main))),M(g.Alert,"errorStandardBg",Le(g.error.light,.9)),M(g.Alert,"infoStandardBg",Le(g.info.light,.9)),M(g.Alert,"successStandardBg",Le(g.success.light,.9)),M(g.Alert,"warningStandardBg",Le(g.warning.light,.9)),M(g.Alert,"errorIconColor",I("palette-error-main")),M(g.Alert,"infoIconColor",I("palette-info-main")),M(g.Alert,"successIconColor",I("palette-success-main")),M(g.Alert,"warningIconColor",I("palette-warning-main")),M(g.AppBar,"defaultBg",I("palette-grey-100")),M(g.Avatar,"defaultBg",I("palette-grey-400")),M(g.Button,"inheritContainedBg",I("palette-grey-300")),M(g.Button,"inheritContainedHoverBg",I("palette-grey-A100")),M(g.Chip,"defaultBorder",I("palette-grey-400")),M(g.Chip,"defaultAvatarColor",I("palette-grey-700")),M(g.Chip,"defaultIconColor",I("palette-grey-700")),M(g.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),M(g.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),M(g.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),M(g.LinearProgress,"primaryBg",Le(g.primary.main,.62)),M(g.LinearProgress,"secondaryBg",Le(g.secondary.main,.62)),M(g.LinearProgress,"errorBg",Le(g.error.main,.62)),M(g.LinearProgress,"infoBg",Le(g.info.main,.62)),M(g.LinearProgress,"successBg",Le(g.success.main,.62)),M(g.LinearProgress,"warningBg",Le(g.warning.main,.62)),M(g.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.11)`),M(g.Slider,"primaryTrack",Le(g.primary.main,.62)),M(g.Slider,"secondaryTrack",Le(g.secondary.main,.62)),M(g.Slider,"errorTrack",Le(g.error.main,.62)),M(g.Slider,"infoTrack",Le(g.info.main,.62)),M(g.Slider,"successTrack",Le(g.success.main,.62)),M(g.Slider,"warningTrack",Le(g.warning.main,.62));const _=vl(g.background.default,.8);M(g.SnackbarContent,"bg",_),M(g.SnackbarContent,"color",bn(()=>g.getContrastText(_))),M(g.SpeedDialAction,"fabHoverBg",vl(g.background.paper,.15)),M(g.StepConnector,"border",I("palette-grey-400")),M(g.StepContent,"border",I("palette-grey-400")),M(g.Switch,"defaultColor",I("palette-common-white")),M(g.Switch,"defaultDisabledColor",I("palette-grey-100")),M(g.Switch,"primaryDisabledColor",Le(g.primary.main,.62)),M(g.Switch,"secondaryDisabledColor",Le(g.secondary.main,.62)),M(g.Switch,"errorDisabledColor",Le(g.error.main,.62)),M(g.Switch,"infoDisabledColor",Le(g.info.main,.62)),M(g.Switch,"successDisabledColor",Le(g.success.main,.62)),M(g.Switch,"warningDisabledColor",Le(g.warning.main,.62)),M(g.TableCell,"border",Le(gl(g.divider,1),.88)),M(g.Tooltip,"bg",gl(g.grey[700],.92))}if(g.mode==="dark"){M(g.Alert,"errorColor",Le(g.error.light,.6)),M(g.Alert,"infoColor",Le(g.info.light,.6)),M(g.Alert,"successColor",Le(g.success.light,.6)),M(g.Alert,"warningColor",Le(g.warning.light,.6)),M(g.Alert,"errorFilledBg",I("palette-error-dark")),M(g.Alert,"infoFilledBg",I("palette-info-dark")),M(g.Alert,"successFilledBg",I("palette-success-dark")),M(g.Alert,"warningFilledBg",I("palette-warning-dark")),M(g.Alert,"errorFilledColor",bn(()=>g.getContrastText(g.error.dark))),M(g.Alert,"infoFilledColor",bn(()=>g.getContrastText(g.info.dark))),M(g.Alert,"successFilledColor",bn(()=>g.getContrastText(g.success.dark))),M(g.Alert,"warningFilledColor",bn(()=>g.getContrastText(g.warning.dark))),M(g.Alert,"errorStandardBg",Ae(g.error.light,.9)),M(g.Alert,"infoStandardBg",Ae(g.info.light,.9)),M(g.Alert,"successStandardBg",Ae(g.success.light,.9)),M(g.Alert,"warningStandardBg",Ae(g.warning.light,.9)),M(g.Alert,"errorIconColor",I("palette-error-main")),M(g.Alert,"infoIconColor",I("palette-info-main")),M(g.Alert,"successIconColor",I("palette-success-main")),M(g.Alert,"warningIconColor",I("palette-warning-main")),M(g.AppBar,"defaultBg",I("palette-grey-900")),M(g.AppBar,"darkBg",I("palette-background-paper")),M(g.AppBar,"darkColor",I("palette-text-primary")),M(g.Avatar,"defaultBg",I("palette-grey-600")),M(g.Button,"inheritContainedBg",I("palette-grey-800")),M(g.Button,"inheritContainedHoverBg",I("palette-grey-700")),M(g.Chip,"defaultBorder",I("palette-grey-700")),M(g.Chip,"defaultAvatarColor",I("palette-grey-300")),M(g.Chip,"defaultIconColor",I("palette-grey-300")),M(g.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),M(g.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),M(g.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),M(g.LinearProgress,"primaryBg",Ae(g.primary.main,.5)),M(g.LinearProgress,"secondaryBg",Ae(g.secondary.main,.5)),M(g.LinearProgress,"errorBg",Ae(g.error.main,.5)),M(g.LinearProgress,"infoBg",Ae(g.info.main,.5)),M(g.LinearProgress,"successBg",Ae(g.success.main,.5)),M(g.LinearProgress,"warningBg",Ae(g.warning.main,.5)),M(g.Skeleton,"bg",`rgba(${I("palette-text-primaryChannel")} / 0.13)`),M(g.Slider,"primaryTrack",Ae(g.primary.main,.5)),M(g.Slider,"secondaryTrack",Ae(g.secondary.main,.5)),M(g.Slider,"errorTrack",Ae(g.error.main,.5)),M(g.Slider,"infoTrack",Ae(g.info.main,.5)),M(g.Slider,"successTrack",Ae(g.success.main,.5)),M(g.Slider,"warningTrack",Ae(g.warning.main,.5));const _=vl(g.background.default,.98);M(g.SnackbarContent,"bg",_),M(g.SnackbarContent,"color",bn(()=>g.getContrastText(_))),M(g.SpeedDialAction,"fabHoverBg",vl(g.background.paper,.15)),M(g.StepConnector,"border",I("palette-grey-600")),M(g.StepContent,"border",I("palette-grey-600")),M(g.Switch,"defaultColor",I("palette-grey-300")),M(g.Switch,"defaultDisabledColor",I("palette-grey-600")),M(g.Switch,"primaryDisabledColor",Ae(g.primary.main,.55)),M(g.Switch,"secondaryDisabledColor",Ae(g.secondary.main,.55)),M(g.Switch,"errorDisabledColor",Ae(g.error.main,.55)),M(g.Switch,"infoDisabledColor",Ae(g.info.main,.55)),M(g.Switch,"successDisabledColor",Ae(g.success.main,.55)),M(g.Switch,"warningDisabledColor",Ae(g.warning.main,.55)),M(g.TableCell,"border",Ae(gl(g.divider,1),.68)),M(g.Tooltip,"bg",gl(g.grey[700],.92))}zn(g.background,"default"),zn(g.background,"paper"),zn(g.common,"background"),zn(g.common,"onBackground"),zn(g,"divider"),Object.keys(g).forEach(_=>{const F=g[_];F&&typeof F=="object"&&(F.main&&M(g[_],"mainChannel",li(si(F.main))),F.light&&M(g[_],"lightChannel",li(si(F.light))),F.dark&&M(g[_],"darkChannel",li(si(F.dark))),F.contrastText&&M(g[_],"contrastTextChannel",li(si(F.contrastText))),_==="text"&&(zn(g[_],"primary"),zn(g[_],"secondary")),_==="action"&&(F.active&&zn(g[_],"active"),F.selected&&zn(g[_],"selected")))})}),c=t.reduce((T,g)=>Rt(T,g),c);const w={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:l,getSelector:Cx(c)},{vars:k,generateThemeVars:E,generateStyleSheets:R}=qS(c,w);return c.vars=k,Object.entries(c.colorSchemes[c.defaultColorScheme]).forEach(([T,g])=>{c[T]=g}),c.generateThemeVars=E,c.generateStyleSheets=R,c.generateSpacing=function(){return Sh(a.spacing,pd(this))},c.getColorSchemeSelector=JS(s),c.spacing=c.generateSpacing(),c.shouldSkipGeneratingVar=l,c.unstable_sxConfig={...rl,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(g){return jo({sx:g,theme:this})},c.toRuntimeSource=kx,c}function Zf(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:xd({...n===!0?{}:n.palette,mode:t})})}function Nh(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...l}=e,s=i||"light",a=o==null?void 0:o[s],u={...o,...n?{[s]:{...typeof a!="boolean"&&a,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Vu(e,...t);let d=n;"palette"in e||u[s]&&(u[s]!==!0?d=u[s].palette:s==="dark"&&(d={mode:"dark"}));const f=Vu({...e,palette:d},...t);return f.defaultColorScheme=s,f.colorSchemes=u,f.palette.mode==="light"&&(f.colorSchemes.light={...u.light!==!0&&u.light,palette:f.palette},Zf(f,"dark",u.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:f.palette},Zf(f,"light",u.light)),f}return!n&&!("light"in u)&&s==="light"&&(u.light=!0),Px({...l,colorSchemes:u,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Ca=Nh();function Ea(){const e=ua(Ca);return e[qi]||e}function $h({props:e,name:t}){return MS({props:e,name:t,defaultTheme:Ca,themeId:qi})}function ka(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const wn=e=>ka(e)&&e!=="classes",ne=IS({themeId:qi,defaultTheme:Ca,rootShouldForwardProp:wn});function Bx(e){return C.jsx(yS,{...e,defaultTheme:Ca,themeId:qi})}function Ox(e){return function(n){return C.jsx(Bx,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function Mx(){return xh}const qf={theme:void 0};function ze(e){let t,n;return r=>{let o=t;return(o===void 0||r.theme!==n)&&(qf.theme=r.theme,o=e(qf),t=o,n=r.theme),o}}function et(e){return XS(e)}function Nx(e){return je("MuiSvgIcon",e)}Pe("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const $x=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${re(t)}`,`fontSize${re(n)}`]};return Xe(o,Nx,r)},_x=ne("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${re(n.color)}`],t[`fontSize${re(n.fontSize)}`]]}})(ze(({theme:e})=>{var t,n,r,o,i,l,s,a,u,d,f,p,x,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((d=(u=e.typography)==null?void 0:u.pxToRem)==null?void 0:d.call(u,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,y])=>y&&y.main).map(([y])=>{var b,m;return{props:{color:y},style:{color:(m=(b=(e.vars??e).palette)==null?void 0:b[y])==null?void 0:m.main}}}),{props:{color:"action"},style:{color:(p=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:p.active}},{props:{color:"disabled"},style:{color:(S=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ds=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:l="inherit",component:s="svg",fontSize:a="medium",htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p="0 0 24 24",...x}=r,S=v.isValidElement(o)&&o.type==="svg",y={...r,color:l,component:s,fontSize:a,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:S},b={};d||(b.viewBox=p);const m=$x(y);return C.jsxs(_x,{as:s,className:pe(m.root,i),focusable:"false",color:u,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...b,...x,...S&&o.props,ownerState:y,children:[S?o.props.children:o,f?C.jsx("title",{children:f}):null]})});ds&&(ds.muiName="SvgIcon");function $n(e,t){function n(r,o){return C.jsx(ds,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return n.muiName=ds.muiName,v.memo(v.forwardRef(n))}function _h(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Wu(e,t){return Wu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Wu(e,t)}function Ah(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wu(e,t)}var Lh={exports:{}},Kt={},zh={exports:{}},Fh={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(B,L){var H=B.length;B.push(L);e:for(;0>>1,me=B[Q];if(0>>1;Qo(Ne,H))Jo(ue,Ne)?(B[Q]=ue,B[J]=H,Q=J):(B[Q]=Ne,B[ae]=H,Q=ae);else if(Jo(ue,H))B[Q]=ue,B[J]=H,Q=J;else break e}}return L}function o(B,L){var H=B.sortIndex-L.sortIndex;return H!==0?H:B.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],d=1,f=null,p=3,x=!1,S=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function c(B){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=B)r(u),L.sortIndex=L.expirationTime,t(a,L);else break;L=n(u)}}function w(B){if(y=!1,c(B),!S)if(n(a)!==null)S=!0,j(k);else{var L=n(u);L!==null&&Y(w,L.startTime-B)}}function k(B,L){S=!1,y&&(y=!1,m(T),T=-1),x=!0;var H=p;try{for(c(L),f=n(a);f!==null&&(!(f.expirationTime>L)||B&&!_());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,p=f.priorityLevel;var me=Q(f.expirationTime<=L);L=e.unstable_now(),typeof me=="function"?f.callback=me:f===n(a)&&r(a),c(L)}else r(a);f=n(a)}if(f!==null)var Se=!0;else{var ae=n(u);ae!==null&&Y(w,ae.startTime-L),Se=!1}return Se}finally{f=null,p=H,x=!1}}var E=!1,R=null,T=-1,g=5,I=-1;function _(){return!(e.unstable_now()-IB||125Q?(B.sortIndex=H,t(u,B),n(a)===null&&B===n(u)&&(y?(m(T),T=-1):y=!0,Y(w,H-Q))):(B.sortIndex=me,t(a,B),S||x||(S=!0,j(k))),B},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(B){var L=p;return function(){var H=p;p=L;try{return B.apply(this,arguments)}finally{p=H}}}})(Fh);zh.exports=Fh;var Ax=zh.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Dh=v,Yt=Ax;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hu=Object.prototype.hasOwnProperty,Lx=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Jf={},ep={};function zx(e){return Hu.call(ep,e)?!0:Hu.call(Jf,e)?!1:Lx.test(e)?ep[e]=!0:(Jf[e]=!0,!1)}function Fx(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Dx(e,t,n,r){if(t===null||typeof t>"u"||Fx(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Mt(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var xt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xt[e]=new Mt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xt[t]=new Mt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xt[e]=new Mt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xt[e]=new Mt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xt[e]=new Mt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xt[e]=new Mt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xt[e]=new Mt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xt[e]=new Mt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xt[e]=new Mt(e,5,!1,e.toLowerCase(),null,!1,!1)});var wd=/[\-:]([a-z])/g;function bd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(wd,bd);xt[t]=new Mt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(wd,bd);xt[t]=new Mt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(wd,bd);xt[t]=new Mt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xt[e]=new Mt(e,1,!1,e.toLowerCase(),null,!1,!1)});xt.xlinkHref=new Mt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xt[e]=new Mt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Cd(e,t,n,r){var o=xt.hasOwnProperty(t)?xt[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var a=` +`+o[l].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{eu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ai(e):""}function Ux(e){switch(e.tag){case 5:return ai(e.type);case 16:return ai("Lazy");case 13:return ai("Suspense");case 19:return ai("SuspenseList");case 0:case 2:case 15:return e=tu(e.type,!1),e;case 11:return e=tu(e.type.render,!1),e;case 1:return e=tu(e.type,!0),e;default:return""}}function Qu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case co:return"Fragment";case uo:return"Portal";case Yu:return"Profiler";case Ed:return"StrictMode";case Xu:return"Suspense";case Ku:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Vh:return(e.displayName||"Context")+".Consumer";case jh:return(e._context.displayName||"Context")+".Provider";case kd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Rd:return t=e.displayName||null,t!==null?t:Qu(e.type)||"Memo";case rr:t=e._payload,e=e._init;try{return Qu(e(t))}catch{}}return null}function jx(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qu(t);case 8:return t===Ed?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function wr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vx(e){var t=Wh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sl(e){e._valueTracker||(e._valueTracker=Vx(e))}function Hh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Zu(e,t){var n=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function np(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=wr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yh(e,t){t=t.checked,t!=null&&Cd(e,"checked",t,!1)}function qu(e,t){Yh(e,t);var n=wr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ju(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ju(e,t.type,wr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function rp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ju(e,t,n){(t!=="number"||fs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ui=Array.isArray;function Eo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=xl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _i(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var gi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gx=["Webkit","ms","Moz","O"];Object.keys(gi).forEach(function(e){Gx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gi[t]=gi[e]})});function Zh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||gi.hasOwnProperty(e)&&gi[e]?(""+t).trim():t+"px"}function qh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Zh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Wx=Je({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nc(e,t){if(t){if(Wx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function rc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var oc=null;function Id(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ic=null,ko=null,Ro=null;function lp(e){if(e=sl(e)){if(typeof ic!="function")throw Error(V(280));var t=e.stateNode;t&&(t=Ba(t),ic(e.stateNode,e.type,t))}}function Jh(e){ko?Ro?Ro.push(e):Ro=[e]:ko=e}function eg(){if(ko){var e=ko,t=Ro;if(Ro=ko=null,lp(e),t)for(e=0;e>>=0,e===0?32:31-(nw(e)/rw|0)|0}var wl=64,bl=4194304;function ci(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=ci(s):(i&=l,i!==0&&(r=ci(i)))}else l=n&~o,l!==0?r=ci(l):i!==0&&(r=ci(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function il(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vn(t),e[t]=n}function sw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=yi),hp=" ",gp=!1;function xg(e,t){switch(e){case"keyup":return _w.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fo=!1;function Lw(e,t){switch(e){case"compositionend":return wg(t);case"keypress":return t.which!==32?null:(gp=!0,hp);case"textInput":return e=t.data,e===hp&&gp?null:e;default:return null}}function zw(e,t){if(fo)return e==="compositionend"||!_d&&xg(e,t)?(e=yg(),Ql=Md=ar=null,fo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xp(n)}}function kg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rg(){for(var e=window,t=fs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fs(e.document)}return t}function Ad(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yw(e){var t=Rg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&kg(n.ownerDocument.documentElement,n)){if(r!==null&&Ad(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=wp(n,i);var l=wp(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,po=null,dc=null,xi=null,fc=!1;function bp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fc||po==null||po!==fs(r)||(r=po,"selectionStart"in r&&Ad(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xi&&Ui(xi,r)||(xi=r,r=Ss(dc,"onSelect"),0go||(e.current=yc[go],yc[go]=null,go--)}function Ue(e,t){go++,yc[go]=e.current,e.current=t}var br={},It=Er(br),Lt=Er(!1),Ur=br;function Mo(e,t){var n=e.type.contextTypes;if(!n)return br;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function zt(e){return e=e.childContextTypes,e!=null}function ws(){Ge(Lt),Ge(It)}function Pp(e,t,n){if(It.current!==br)throw Error(V(168));Ue(It,t),Ue(Lt,n)}function _g(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(V(108,jx(e)||"Unknown",o));return Je({},n,r)}function bs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||br,Ur=It.current,Ue(It,e),Ue(Lt,Lt.current),!0}function Bp(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=_g(e,t,Ur),r.__reactInternalMemoizedMergedChildContext=e,Ge(Lt),Ge(It),Ue(It,e)):Ge(Lt),Ue(Lt,n)}var Dn=null,Oa=!1,hu=!1;function Ag(e){Dn===null?Dn=[e]:Dn.push(e)}function i2(e){Oa=!0,Ag(e)}function kr(){if(!hu&&Dn!==null){hu=!0;var e=0,t=Oe;try{var n=Dn;for(Oe=1;e>=l,o-=l,Un=1<<32-vn(t)+o|n<T?(g=R,R=null):g=R.sibling;var I=p(m,R,c[T],w);if(I===null){R===null&&(R=g);break}e&&R&&I.alternate===null&&t(m,R),h=i(I,h,T),E===null?k=I:E.sibling=I,E=I,R=g}if(T===c.length)return n(m,R),Ye&&Br(m,T),k;if(R===null){for(;TT?(g=R,R=null):g=R.sibling;var _=p(m,R,I.value,w);if(_===null){R===null&&(R=g);break}e&&R&&_.alternate===null&&t(m,R),h=i(_,h,T),E===null?k=_:E.sibling=_,E=_,R=g}if(I.done)return n(m,R),Ye&&Br(m,T),k;if(R===null){for(;!I.done;T++,I=c.next())I=f(m,I.value,w),I!==null&&(h=i(I,h,T),E===null?k=I:E.sibling=I,E=I);return Ye&&Br(m,T),k}for(R=r(m,R);!I.done;T++,I=c.next())I=x(R,m,T,I.value,w),I!==null&&(e&&I.alternate!==null&&R.delete(I.key===null?T:I.key),h=i(I,h,T),E===null?k=I:E.sibling=I,E=I);return e&&R.forEach(function(F){return t(m,F)}),Ye&&Br(m,T),k}function b(m,h,c,w){if(typeof c=="object"&&c!==null&&c.type===co&&c.key===null&&(c=c.props.children),typeof c=="object"&&c!==null){switch(c.$$typeof){case yl:e:{for(var k=c.key,E=h;E!==null;){if(E.key===k){if(k=c.type,k===co){if(E.tag===7){n(m,E.sibling),h=o(E,c.props.children),h.return=m,m=h;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===rr&&Lp(k)===E.type){n(m,E.sibling),h=o(E,c.props),h.ref=Jo(m,E,c),h.return=m,m=h;break e}n(m,E);break}else t(m,E);E=E.sibling}c.type===co?(h=Fr(c.props.children,m.mode,w,c.key),h.return=m,m=h):(w=os(c.type,c.key,c.props,null,m.mode,w),w.ref=Jo(m,h,c),w.return=m,m=w)}return l(m);case uo:e:{for(E=c.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===c.containerInfo&&h.stateNode.implementation===c.implementation){n(m,h.sibling),h=o(h,c.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=Cu(c,m.mode,w),h.return=m,m=h}return l(m);case rr:return E=c._init,b(m,h,E(c._payload),w)}if(ui(c))return S(m,h,c,w);if(Xo(c))return y(m,h,c,w);Pl(m,c)}return typeof c=="string"&&c!==""||typeof c=="number"?(c=""+c,h!==null&&h.tag===6?(n(m,h.sibling),h=o(h,c),h.return=m,m=h):(n(m,h),h=bu(c,m.mode,w),h.return=m,m=h),l(m)):n(m,h)}return b}var $o=Gg(!0),Wg=Gg(!1),al={},Mn=Er(al),Wi=Er(al),Hi=Er(al);function Ar(e){if(e===al)throw Error(V(174));return e}function Wd(e,t){switch(Ue(Hi,t),Ue(Wi,e),Ue(Mn,al),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:tc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=tc(t,e)}Ge(Mn),Ue(Mn,t)}function _o(){Ge(Mn),Ge(Wi),Ge(Hi)}function Hg(e){Ar(Hi.current);var t=Ar(Mn.current),n=tc(t,e.type);t!==n&&(Ue(Wi,e),Ue(Mn,n))}function Hd(e){Wi.current===e&&(Ge(Mn),Ge(Wi))}var Qe=Er(0);function Ts(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gu=[];function Yd(){for(var e=0;en?n:4,e(!0);var r=vu.transition;vu.transition={};try{e(!1),t()}finally{Oe=n,vu.transition=r}}function a0(){return un().memoizedState}function u2(e,t,n){var r=vr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},u0(e))c0(t,n);else if(n=Dg(e,t,n,r),n!==null){var o=Bt();yn(n,e,r,o),d0(n,t,r)}}function c2(e,t,n){var r=vr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(u0(e))c0(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,Sn(s,l)){var a=t.interleaved;a===null?(o.next=o,Vd(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=Dg(e,t,o,r),n!==null&&(o=Bt(),yn(n,e,r,o),d0(n,t,r))}}function u0(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function c0(e,t){wi=Ps=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function d0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Pd(e,n)}}var Bs={readContext:an,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},d2={readContext:an,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:an,useEffect:Fp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,es(4194308,4,r0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){return es(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=u2.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:zp,useDebugValue:qd,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=zp(!1),t=e[0];return e=a2.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qe,o=kn();if(Ye){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),mt===null)throw Error(V(349));Vr&30||Kg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Fp(Zg.bind(null,r,i,e),[e]),r.flags|=2048,Ki(9,Qg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=kn(),t=mt.identifierPrefix;if(Ye){var n=jn,r=Un;n=(r&~(1<<32-vn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Pn]=t,e[Gi]=r,x0(e,t,!1,!1),t.stateNode=e;e:{switch(l=rc(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),o=r;break;case"iframe":case"object":case"embed":Ve("load",e),o=r;break;case"video":case"audio":for(o=0;oLo&&(t.flags|=128,r=!0,ei(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ts(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ei(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Ye)return Ct(t),null}else 2*ot()-i.renderingStartTime>Lo&&n!==1073741824&&(t.flags|=128,r=!0,ei(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ot(),t.sibling=null,n=Qe.current,Ue(Qe,r?n&1|2:n&1),t):(Ct(t),null);case 22:case 23:return of(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ut&1073741824&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function S2(e,t){switch(zd(t),t.tag){case 1:return zt(t.type)&&ws(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _o(),Ge(Lt),Ge(It),Yd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Hd(t),null;case 13:if(Ge(Qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));No()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Qe),null;case 4:return _o(),null;case 10:return jd(t.type._context),null;case 22:case 23:return of(),null;case 24:return null;default:return null}}var Ol=!1,kt=!1,x2=typeof WeakSet=="function"?WeakSet:Set,ee=null;function xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){rt(e,t,r)}else n.current=null}function Bc(e,t,n){try{n()}catch(r){rt(e,t,r)}}var Xp=!1;function w2(e,t){if(pc=vs,e=Rg(),Ad(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var x;f!==n||o!==0&&f.nodeType!==3||(s=l+o),f!==i||r!==0&&f.nodeType!==3||(a=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(x=f.firstChild)!==null;)p=f,f=x;for(;;){if(f===e)break t;if(p===n&&++u===o&&(s=l),p===i&&++d===r&&(a=l),(x=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=x}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(mc={focusedElem:e,selectionRange:n},vs=!1,ee=t;ee!==null;)if(t=ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ee=e;else for(;ee!==null;){t=ee;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var y=S.memoizedProps,b=S.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:mn(t.type,y),b);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var c=t.stateNode.containerInfo;c.nodeType===1?c.textContent="":c.nodeType===9&&c.documentElement&&c.removeChild(c.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(w){rt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ee=e;break}ee=t.return}return S=Xp,Xp=!1,S}function bi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Bc(t,n,i)}o=o.next}while(o!==r)}}function $a(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Oc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function C0(e){var t=e.alternate;t!==null&&(e.alternate=null,C0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pn],delete t[Gi],delete t[vc],delete t[r2],delete t[o2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function E0(e){return e.tag===5||e.tag===3||e.tag===4}function Kp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||E0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xs));else if(r!==4&&(e=e.child,e!==null))for(Mc(e,t,n),e=e.sibling;e!==null;)Mc(e,t,n),e=e.sibling}function Nc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Nc(e,t,n),e=e.sibling;e!==null;)Nc(e,t,n),e=e.sibling}var vt=null,hn=!1;function er(e,t,n){for(n=n.child;n!==null;)k0(e,t,n),n=n.sibling}function k0(e,t,n){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(Ra,n)}catch{}switch(n.tag){case 5:kt||xo(n,t);case 6:var r=vt,o=hn;vt=null,er(e,t,n),vt=r,hn=o,vt!==null&&(hn?(e=vt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):vt.removeChild(n.stateNode));break;case 18:vt!==null&&(hn?(e=vt,n=n.stateNode,e.nodeType===8?mu(e.parentNode,n):e.nodeType===1&&mu(e,n),Fi(e)):mu(vt,n.stateNode));break;case 4:r=vt,o=hn,vt=n.stateNode.containerInfo,hn=!0,er(e,t,n),vt=r,hn=o;break;case 0:case 11:case 14:case 15:if(!kt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Bc(n,t,l),o=o.next}while(o!==r)}er(e,t,n);break;case 1:if(!kt&&(xo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){rt(n,t,s)}er(e,t,n);break;case 21:er(e,t,n);break;case 22:n.mode&1?(kt=(r=kt)||n.memoizedState!==null,er(e,t,n),kt=r):er(e,t,n);break;default:er(e,t,n)}}function Qp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new x2),t.forEach(function(r){var o=B2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function pn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=ot()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*C2(r/1960))-r,10e?16:e,ur===null)var r=!1;else{if(e=ur,ur=null,Ns=0,Re&6)throw Error(V(331));var o=Re;for(Re|=4,ee=e.current;ee!==null;){var i=ee,l=i.child;if(ee.flags&16){var s=i.deletions;if(s!==null){for(var a=0;aot()-nf?zr(e,0):tf|=n),Ft(e,t)}function N0(e,t){t===0&&(e.mode&1?(t=bl,bl<<=1,!(bl&130023424)&&(bl=4194304)):t=1);var n=Bt();e=Kn(e,t),e!==null&&(il(e,t,n),Ft(e,n))}function P2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),N0(e,n)}function B2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(V(314))}r!==null&&r.delete(t),N0(e,n)}var $0;$0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Lt.current)At=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return At=!1,v2(e,t,n);At=!!(e.flags&131072)}else At=!1,Ye&&t.flags&1048576&&Lg(t,Es,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ts(e,t),e=t.pendingProps;var o=Mo(t,It.current);To(t,n),o=Kd(null,t,r,e,o,n);var i=Qd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zt(r)?(i=!0,bs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Gd(t),o.updater=Ma,t.stateNode=o,o._reactInternals=t,Cc(t,r,e,n),t=Rc(null,t,r,!0,i,n)):(t.tag=0,Ye&&i&&Ld(t),Tt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ts(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=M2(r),e=mn(r,e),o){case 0:t=kc(null,t,r,e,n);break e;case 1:t=Wp(null,t,r,e,n);break e;case 11:t=Vp(null,t,r,e,n);break e;case 14:t=Gp(null,t,r,mn(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:mn(r,o),kc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:mn(r,o),Wp(e,t,r,o,n);case 3:e:{if(v0(t),e===null)throw Error(V(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ug(e,t),Is(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ao(Error(V(423)),t),t=Hp(e,t,r,n,o);break e}else if(r!==o){o=Ao(Error(V(424)),t),t=Hp(e,t,r,n,o);break e}else for(Gt=mr(t.stateNode.containerInfo.firstChild),Ht=t,Ye=!0,gn=null,n=Wg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(No(),r===o){t=Qn(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return Hg(t),e===null&&xc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,hc(r,o)?l=null:i!==null&&hc(r,i)&&(t.flags|=32),g0(e,t),Tt(e,t,l,n),t.child;case 6:return e===null&&xc(t),null;case 13:return y0(e,t,n);case 4:return Wd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$o(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:mn(r,o),Vp(e,t,r,o,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Ue(ks,r._currentValue),r._currentValue=l,i!==null)if(Sn(i.value,l)){if(i.children===o.children&&!Lt.current){t=Qn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Vn(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),wc(i.return,n,t),s.lanes|=n;break}a=a.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(V(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),wc(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Tt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,To(t,n),o=an(o),r=r(o),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,o=mn(r,t.pendingProps),o=mn(r.type,o),Gp(e,t,r,o,n);case 15:return m0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:mn(r,o),ts(e,t),t.tag=1,zt(r)?(e=!0,bs(t)):e=!1,To(t,n),Vg(t,r,o),Cc(t,r,o,n),Rc(null,t,r,!0,e,n);case 19:return S0(e,t,n);case 22:return h0(e,t,n)}throw Error(V(156,t.tag))};function _0(e,t){return sg(e,t)}function O2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,n,r){return new O2(e,t,n,r)}function sf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function M2(e){if(typeof e=="function")return sf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===kd)return 11;if(e===Rd)return 14}return 2}function yr(e,t){var n=e.alternate;return n===null?(n=on(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function os(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")sf(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case co:return Fr(n.children,o,i,t);case Ed:l=8,o|=8;break;case Yu:return e=on(12,n,t,o|2),e.elementType=Yu,e.lanes=i,e;case Xu:return e=on(13,n,t,o),e.elementType=Xu,e.lanes=i,e;case Ku:return e=on(19,n,t,o),e.elementType=Ku,e.lanes=i,e;case Gh:return Aa(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jh:l=10;break e;case Vh:l=9;break e;case kd:l=11;break e;case Rd:l=14;break e;case rr:l=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=on(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Fr(e,t,n,r){return e=on(7,e,r,t),e.lanes=n,e}function Aa(e,t,n,r){return e=on(22,e,r,t),e.elementType=Gh,e.lanes=n,e.stateNode={isHidden:!1},e}function bu(e,t,n){return e=on(6,e,null,t),e.lanes=n,e}function Cu(e,t,n){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function N2(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ru(0),this.expirationTimes=ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ru(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function af(e,t,n,r,o,i,l,s,a){return e=new N2(e,t,n,s,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=on(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gd(i),e}function $2(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(F0)}catch(e){console.error(e)}}F0(),Lh.exports=Kt;var ff=Lh.exports;const $l=Pm(ff),om={disabled:!1},As=Ze.createContext(null);var F2=function(t){return t.scrollTop},fi="unmounted",Mr="exited",Nr="entering",ao="entered",zc="exiting",_n=function(e){Ah(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var l=o,s=l&&!l.isMounting?r.enter:r.appear,a;return i.appearStatus=null,r.in?s?(a=Mr,i.appearStatus=Nr):a=ao:r.unmountOnExit||r.mountOnEnter?a=fi:a=Mr,i.state={status:a},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var l=o.in;return l&&i.status===fi?{status:Mr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var l=this.state.status;this.props.in?l!==Nr&&l!==ao&&(i=Nr):(l===Nr||l===ao)&&(i=zc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,l,s;return i=l=s=o,o!=null&&typeof o!="number"&&(i=o.exit,l=o.enter,s=o.appear!==void 0?o.appear:l),{exit:i,enter:l,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Nr){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:$l.findDOMNode(this);l&&F2(l)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Mr&&this.setState({status:fi})},n.performEnter=function(o){var i=this,l=this.props.enter,s=this.context?this.context.isMounting:o,a=this.props.nodeRef?[s]:[$l.findDOMNode(this),s],u=a[0],d=a[1],f=this.getTimeouts(),p=s?f.appear:f.enter;if(!o&&!l||om.disabled){this.safeSetState({status:ao},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Nr},function(){i.props.onEntering(u,d),i.onTransitionEnd(p,function(){i.safeSetState({status:ao},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,l=this.getTimeouts(),s=this.props.nodeRef?void 0:$l.findDOMNode(this);if(!i||om.disabled){this.safeSetState({status:Mr},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:zc},function(){o.props.onExiting(s),o.onTransitionEnd(l.exit,function(){o.safeSetState({status:Mr},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,l=!0;return this.nextCallback=function(s){l&&(l=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var l=this.props.nodeRef?this.props.nodeRef.current:$l.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!l||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],u=a[0],d=a[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===fi)return null;var i=this.props,l=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=_h(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ze.createElement(As.Provider,{value:null},typeof l=="function"?l(o,s):Ze.cloneElement(Ze.Children.only(l),s))},t}(Ze.Component);_n.contextType=As;_n.propTypes={};function ro(){}_n.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ro,onEntering:ro,onEntered:ro,onExit:ro,onExiting:ro,onExited:ro};_n.UNMOUNTED=fi;_n.EXITED=Mr;_n.ENTERING=Nr;_n.ENTERED=ao;_n.EXITING=zc;function D2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pf(e,t){var n=function(i){return t&&v.isValidElement(i)?t(i):i},r=Object.create(null);return e&&v.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function U2(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var l,s={};for(var a in t){if(r[a])for(l=0;le.scrollTop;function Ls(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function H2(e){return je("MuiPaper",e)}Pe("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Y2=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Xe(i,H2,o)},X2=ne("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),K2=v.forwardRef(function(t,n){var x;const r=et({props:t,name:"MuiPaper"}),o=Ea(),{className:i,component:l="div",elevation:s=1,square:a=!1,variant:u="elevation",...d}=r,f={...r,component:l,elevation:s,square:a,variant:u},p=Y2(f);return C.jsx(X2,{as:l,ownerState:f,className:pe(p.root,i),ref:n,...d,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(x=o.vars.overlays)==null?void 0:x[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Pt("#fff",Gu(s))}, ${Pt("#fff",Gu(s))})`}},...d.style}})});function zo(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:l,internalForwardedProps:s,...a}=t,{component:u,slots:d={[e]:void 0},slotProps:f={[e]:void 0},...p}=i,x=d[e]||r,S=Bh(f[e],o),{props:{component:y,...b},internalRef:m}=Ph({className:n,...a,externalForwardedProps:e==="root"?p:void 0,externalSlotProps:S}),h=ht(m,S==null?void 0:S.ref,t.ref),c=l?l(b):{},w={...o,...c},k=e==="root"?y||u:y,E=Th(x,{...e==="root"&&!u&&!d[e]&&s,...e!=="root"&&!d[e]&&s,...b,...k&&{as:k},ref:h},w);return Object.keys(c).forEach(R=>{delete E[R]}),[x,E]}class zs{constructor(){Wo(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new zs}static use(){const t=kh(zs.create).current,[n,r]=v.useState(!1);return t.shouldMount=n,t.setShouldMount=r,v.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=Z2(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function Q2(){return zs.use()}function Z2(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function q2(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:l,in:s,onExited:a,timeout:u}=e,[d,f]=v.useState(!1),p=pe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),x={width:l,height:l,top:-(l/2)+i,left:-(l/2)+o},S=pe(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&f(!0),v.useEffect(()=>{if(!s&&a!=null){const y=setTimeout(a,u);return()=>{clearTimeout(y)}}},[a,s,u]),C.jsx("span",{className:p,style:x,children:C.jsx("span",{className:S})})}const Jt=Pe("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Fc=550,J2=80,eb=el` + 0% { + transform: scale(0); + opacity: 0.1; + } + + 100% { + transform: scale(1); + opacity: 0.3; + } +`,tb=el` + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +`,nb=el` + 0% { + transform: scale(1); + } + + 50% { + transform: scale(0.92); + } + + 100% { + transform: scale(1); + } +`,rb=ne("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),ob=ne(q2,{name:"MuiTouchRipple",slot:"Ripple"})` + opacity: 0; + position: absolute; + + &.${Jt.rippleVisible} { + opacity: 0.3; + transform: scale(1); + animation-name: ${eb}; + animation-duration: ${Fc}ms; + animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; + } + + &.${Jt.ripplePulsate} { + animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; + } + + & .${Jt.child} { + opacity: 1; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: currentColor; + } + + & .${Jt.childLeaving} { + opacity: 0; + animation-name: ${tb}; + animation-duration: ${Fc}ms; + animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; + } + + & .${Jt.childPulsate} { + position: absolute; + /* @noflip */ + left: 0px; + top: 0; + animation-name: ${nb}; + animation-duration: 2500ms; + animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; + animation-iteration-count: infinite; + animation-delay: 200ms; + } +`,ib=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:l,...s}=r,[a,u]=v.useState([]),d=v.useRef(0),f=v.useRef(null);v.useEffect(()=>{f.current&&(f.current(),f.current=null)},[a]);const p=v.useRef(!1),x=Rh(),S=v.useRef(null),y=v.useRef(null),b=v.useCallback(w=>{const{pulsate:k,rippleX:E,rippleY:R,rippleSize:T,cb:g}=w;u(I=>[...I,C.jsx(ob,{classes:{ripple:pe(i.ripple,Jt.ripple),rippleVisible:pe(i.rippleVisible,Jt.rippleVisible),ripplePulsate:pe(i.ripplePulsate,Jt.ripplePulsate),child:pe(i.child,Jt.child),childLeaving:pe(i.childLeaving,Jt.childLeaving),childPulsate:pe(i.childPulsate,Jt.childPulsate)},timeout:Fc,pulsate:k,rippleX:E,rippleY:R,rippleSize:T},d.current)]),d.current+=1,f.current=g},[i]),m=v.useCallback((w={},k={},E=()=>{})=>{const{pulsate:R=!1,center:T=o||k.pulsate,fakeElement:g=!1}=k;if((w==null?void 0:w.type)==="mousedown"&&p.current){p.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(p.current=!0);const I=g?null:y.current,_=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,$,N;if(T||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)F=Math.round(_.width/2),$=Math.round(_.height/2);else{const{clientX:U,clientY:j}=w.touches&&w.touches.length>0?w.touches[0]:w;F=Math.round(U-_.left),$=Math.round(j-_.top)}if(T)N=Math.sqrt((2*_.width**2+_.height**2)/3),N%2===0&&(N+=1);else{const U=Math.max(Math.abs((I?I.clientWidth:0)-F),F)*2+2,j=Math.max(Math.abs((I?I.clientHeight:0)-$),$)*2+2;N=Math.sqrt(U**2+j**2)}w!=null&&w.touches?S.current===null&&(S.current=()=>{b({pulsate:R,rippleX:F,rippleY:$,rippleSize:N,cb:E})},x.start(J2,()=>{S.current&&(S.current(),S.current=null)})):b({pulsate:R,rippleX:F,rippleY:$,rippleSize:N,cb:E})},[o,b,x]),h=v.useCallback(()=>{m({},{pulsate:!0})},[m]),c=v.useCallback((w,k)=>{if(x.clear(),(w==null?void 0:w.type)==="touchend"&&S.current){S.current(),S.current=null,x.start(0,()=>{c(w,k)});return}S.current=null,u(E=>E.length>0?E.slice(1):E),f.current=k},[x]);return v.useImperativeHandle(n,()=>({pulsate:h,start:m,stop:c}),[h,m,c]),C.jsx(rb,{className:pe(Jt.root,i.root,l),ref:y,...s,children:C.jsx(mf,{component:null,exit:!0,children:a})})});function lb(e){return je("MuiButtonBase",e)}const sb=Pe("MuiButtonBase",["root","disabled","focusVisible"]),ab=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,l=Xe({root:["root",t&&"disabled",n&&"focusVisible"]},lb,o);return n&&r&&(l.root+=` ${r}`),l},ub=ne("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${sb.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ua=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:l,className:s,component:a="button",disabled:u=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:p=!1,focusVisibleClassName:x,LinkComponent:S="a",onBlur:y,onClick:b,onContextMenu:m,onDragLeave:h,onFocus:c,onFocusVisible:w,onKeyDown:k,onKeyUp:E,onMouseDown:R,onMouseLeave:T,onMouseUp:g,onTouchEnd:I,onTouchMove:_,onTouchStart:F,tabIndex:$=0,TouchRippleProps:N,touchRippleRef:U,type:j,...Y}=r,B=v.useRef(null),L=Q2(),H=ht(L.ref,U),[Q,me]=v.useState(!1);u&&Q&&me(!1),v.useImperativeHandle(o,()=>({focusVisible:()=>{me(!0),B.current.focus()}}),[]);const Se=L.shouldMount&&!d&&!u;v.useEffect(()=>{Q&&p&&!d&&L.pulsate()},[d,p,Q,L]);function ae(P,z,q=f){return rn(ie=>(z&&z(ie),q||L[P](ie),!0))}const Ne=ae("start",R),J=ae("stop",m),ue=ae("stop",h),le=ae("stop",g),we=ae("stop",P=>{Q&&P.preventDefault(),T&&T(P)}),oe=ae("start",F),ve=ae("stop",I),he=ae("stop",_),xe=ae("stop",P=>{cs(P.target)||me(!1),y&&y(P)},!1),O=rn(P=>{B.current||(B.current=P.currentTarget),cs(P.target)&&(me(!0),w&&w(P)),c&&c(P)}),G=()=>{const P=B.current;return a&&a!=="button"&&!(P.tagName==="A"&&P.href)},A=rn(P=>{p&&!P.repeat&&Q&&P.key===" "&&L.stop(P,()=>{L.start(P)}),P.target===P.currentTarget&&G()&&P.key===" "&&P.preventDefault(),k&&k(P),P.target===P.currentTarget&&G()&&P.key==="Enter"&&!u&&(P.preventDefault(),b&&b(P))}),W=rn(P=>{p&&P.key===" "&&Q&&!P.defaultPrevented&&L.stop(P,()=>{L.pulsate(P)}),E&&E(P),b&&P.target===P.currentTarget&&G()&&P.key===" "&&!P.defaultPrevented&&b(P)});let Z=a;Z==="button"&&(Y.href||Y.to)&&(Z=S);const K={};Z==="button"?(K.type=j===void 0?"button":j,K.disabled=u):(!Y.href&&!Y.to&&(K.role="button"),u&&(K["aria-disabled"]=u));const se=ht(n,B),ce={...r,centerRipple:i,component:a,disabled:u,disableRipple:d,disableTouchRipple:f,focusRipple:p,tabIndex:$,focusVisible:Q},$e=ab(ce);return C.jsxs(ub,{as:Z,className:pe($e.root,s),ownerState:ce,onBlur:xe,onClick:b,onContextMenu:J,onFocus:O,onKeyDown:A,onKeyUp:W,onMouseDown:Ne,onMouseLeave:we,onMouseUp:le,onDragLeave:ue,onTouchEnd:ve,onTouchMove:he,onTouchStart:oe,ref:se,tabIndex:u?-1:$,type:j,...K,...Y,children:[l,Se?C.jsx(ib,{ref:H,center:i,...N}):null]})});function cb(e){return typeof e.main=="string"}function db(e,t=[]){if(!cb(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function xn(e=[]){return([,t])=>t&&db(t,e)}function fb(e){return je("MuiTypography",e)}Pe("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pb={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},mb=Mx(),hb=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:l}=e,s={root:["root",i,e.align!=="inherit"&&`align${re(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Xe(s,fb,l)},gb=ne("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${re(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(ze(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(xn()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${re(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),im={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},U0=v.forwardRef(function(t,n){const{color:r,...o}=et({props:t,name:"MuiTypography"}),i=!pb[r],l=mb({...o,...i&&{color:r}}),{align:s="inherit",className:a,component:u,gutterBottom:d=!1,noWrap:f=!1,paragraph:p=!1,variant:x="body1",variantMapping:S=im,...y}=l,b={...l,align:s,color:r,className:a,component:u,gutterBottom:d,noWrap:f,paragraph:p,variant:x,variantMapping:S},m=u||(p?"p":S[x]||im[x])||"span",h=hb(b);return C.jsx(gb,{as:m,ref:n,className:pe(h.root,a),...y,ownerState:b,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...y.style}})});function vb(e){return typeof e=="function"?e():e}const yb=v.forwardRef(function(t,n){const{children:r,container:o,disablePortal:i=!1}=t,[l,s]=v.useState(null),a=ht(ol(r),n);if(Nn(()=>{i||s(vb(o)||document.body)},[o,i]),Nn(()=>{if(l&&!i)return Uu(n,l),()=>{Uu(n,null)}},[n,l,i]),i){if(v.isValidElement(r)){const u={ref:a};return v.cloneElement(r,u)}return C.jsx(v.Fragment,{children:r})}return C.jsx(v.Fragment,{children:l&&ff.createPortal(r,l)})});function _l(e){return parseInt(e,10)||0}const Sb={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function xb(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const wb=v.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:l,value:s,...a}=t,{current:u}=v.useRef(s!=null),d=v.useRef(null),f=ht(n,d),p=v.useRef(null),x=v.useRef(null),S=v.useCallback(()=>{const m=d.current,c=Hn(m).getComputedStyle(m);if(c.width==="0px")return{outerHeightStyle:0,overflowing:!1};const w=x.current;w.style.width=c.width,w.value=m.value||t.placeholder||"x",w.value.slice(-1)===` +`&&(w.value+=" ");const k=c.boxSizing,E=_l(c.paddingBottom)+_l(c.paddingTop),R=_l(c.borderBottomWidth)+_l(c.borderTopWidth),T=w.scrollHeight;w.value="x";const g=w.scrollHeight;let I=T;i&&(I=Math.max(Number(i)*g,I)),o&&(I=Math.min(Number(o)*g,I)),I=Math.max(I,g);const _=I+(k==="border-box"?E+R:0),F=Math.abs(I-T)<=1;return{outerHeightStyle:_,overflowing:F}},[o,i,t.placeholder]),y=v.useCallback(()=>{const m=S();if(xb(m))return;const h=m.outerHeightStyle,c=d.current;p.current!==h&&(p.current=h,c.style.height=`${h}px`),c.style.overflow=m.overflowing?"hidden":""},[S]);Nn(()=>{const m=()=>{y()};let h;const c=wa(m),w=d.current,k=Hn(w);k.addEventListener("resize",c);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(m),E.observe(w)),()=>{c.clear(),cancelAnimationFrame(h),k.removeEventListener("resize",c),E&&E.disconnect()}},[S,y]),Nn(()=>{y()});const b=m=>{u||y(),r&&r(m)};return C.jsxs(v.Fragment,{children:[C.jsx("textarea",{value:s,onChange:b,ref:f,rows:i,style:l,...a}),C.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:x,tabIndex:-1,style:{...Sb.shadow,...l,paddingTop:0,paddingBottom:0}})]})});function Dr(e){return typeof e=="string"}function hf({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const gf=v.createContext(void 0);function vf(){return v.useContext(gf)}function lm(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Fs(e,t=!1){return e&&(lm(e.value)&&e.value!==""||t&&lm(e.defaultValue)&&e.defaultValue!=="")}function bb(e){return e.startAdornment}function Cb(e){return je("MuiInputBase",e)}const Fo=Pe("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var sm;const ja=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${re(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Va=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Eb=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:l,formControl:s,fullWidth:a,hiddenLabel:u,multiline:d,readOnly:f,size:p,startAdornment:x,type:S}=e,y={root:["root",`color${re(n)}`,r&&"disabled",o&&"error",a&&"fullWidth",l&&"focused",s&&"formControl",p&&p!=="medium"&&`size${re(p)}`,d&&"multiline",x&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",S==="search"&&"inputTypeSearch",d&&"inputMultiline",p==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",x&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return Xe(y,Cb,t)},Ga=ne("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ja})(ze(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Fo.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Wa=ne("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Va})(ze(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Fo.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Fo.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),am=Ox({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),yf=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:l,className:s,color:a,components:u={},componentsProps:d={},defaultValue:f,disabled:p,disableInjectingGlobalStyles:x,endAdornment:S,error:y,fullWidth:b=!1,id:m,inputComponent:h="input",inputProps:c={},inputRef:w,margin:k,maxRows:E,minRows:R,multiline:T=!1,name:g,onBlur:I,onChange:_,onClick:F,onFocus:$,onKeyDown:N,onKeyUp:U,placeholder:j,readOnly:Y,renderSuffix:B,rows:L,size:H,slotProps:Q={},slots:me={},startAdornment:Se,type:ae="text",value:Ne,...J}=r,ue=c.value!=null?c.value:Ne,{current:le}=v.useRef(ue!=null),we=v.useRef(),oe=v.useCallback(fe=>{},[]),ve=ht(we,w,c.ref,oe),[he,xe]=v.useState(!1),O=vf(),G=hf({props:r,muiFormControl:O,states:["color","disabled","error","hiddenLabel","size","required","filled"]});G.focused=O?O.focused:he,v.useEffect(()=>{!O&&p&&he&&(xe(!1),I&&I())},[O,p,he,I]);const A=O&&O.onFilled,W=O&&O.onEmpty,Z=v.useCallback(fe=>{Fs(fe)?A&&A():W&&W()},[A,W]);Nn(()=>{le&&Z({value:ue})},[ue,Z,le]);const K=fe=>{$&&$(fe),c.onFocus&&c.onFocus(fe),O&&O.onFocus?O.onFocus(fe):xe(!0)},se=fe=>{I&&I(fe),c.onBlur&&c.onBlur(fe),O&&O.onBlur?O.onBlur(fe):xe(!1)},ce=(fe,...We)=>{if(!le){const wt=fe.target||we.current;if(wt==null)throw new Error(Gn(1));Z({value:wt.value})}c.onChange&&c.onChange(fe,...We),_&&_(fe,...We)};v.useEffect(()=>{Z(we.current)},[]);const $e=fe=>{we.current&&fe.currentTarget===fe.target&&we.current.focus(),F&&F(fe)};let P=h,z=c;T&&P==="input"&&(L?z={type:void 0,minRows:L,maxRows:L,...z}:z={type:void 0,maxRows:E,minRows:R,...z},P=wb);const q=fe=>{Z(fe.animationName==="mui-auto-fill-cancel"?we.current:{value:"x"})};v.useEffect(()=>{O&&O.setAdornedStart(!!Se)},[O,Se]);const ie={...r,color:G.color||"primary",disabled:G.disabled,endAdornment:S,error:G.error,focused:G.focused,formControl:O,fullWidth:b,hiddenLabel:G.hiddenLabel,multiline:T,size:G.size,startAdornment:Se,type:ae},be=Eb(ie),de=me.root||u.Root||Ga,ke=Q.root||d.root||{},Be=me.input||u.Input||Wa;return z={...z,...Q.input??d.input},C.jsxs(v.Fragment,{children:[!x&&typeof am=="function"&&(sm||(sm=C.jsx(am,{}))),C.jsxs(de,{...ke,ref:n,onClick:$e,...J,...!Dr(de)&&{ownerState:{...ie,...ke.ownerState}},className:pe(be.root,ke.className,s,Y&&"MuiInputBase-readOnly"),children:[Se,C.jsx(gf.Provider,{value:null,children:C.jsx(Be,{"aria-invalid":G.error,"aria-describedby":o,autoComplete:i,autoFocus:l,defaultValue:f,disabled:G.disabled,id:m,onAnimationStart:q,name:g,placeholder:j,readOnly:Y,required:G.required,rows:L,value:ue,onKeyDown:N,onKeyUp:U,type:ae,...z,...!Dr(Be)&&{as:P,ownerState:{...ie,...z.ownerState}},ref:ve,className:pe(be.input,z.className,Y&&"MuiInputBase-readOnly"),onBlur:se,onChange:ce,onFocus:K})}),S,B?B({...G,startAdornment:Se}):null]})]})});function kb(e){return je("MuiInput",e)}const ni={...Fo,...Pe("MuiInput",["root","underline","input"])};function Rb(e){return je("MuiOutlinedInput",e)}const En={...Fo,...Pe("MuiOutlinedInput",["root","notchedOutline","input"])};function Ib(e){return je("MuiFilledInput",e)}const Tr={...Fo,...Pe("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Tb=$n(C.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Pb={entering:{opacity:1},entered:{opacity:1}},Bb=v.forwardRef(function(t,n){const r=Ea(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:l=!0,children:s,easing:a,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:x,onExited:S,onExiting:y,style:b,timeout:m=o,TransitionComponent:h=_n,...c}=t,w=v.useRef(null),k=ht(w,ol(s),n),E=N=>U=>{if(N){const j=w.current;U===void 0?N(j):N(j,U)}},R=E(p),T=E((N,U)=>{D0(N);const j=Ls({style:b,timeout:m,easing:a},{mode:"enter"});N.style.webkitTransition=r.transitions.create("opacity",j),N.style.transition=r.transitions.create("opacity",j),d&&d(N,U)}),g=E(f),I=E(y),_=E(N=>{const U=Ls({style:b,timeout:m,easing:a},{mode:"exit"});N.style.webkitTransition=r.transitions.create("opacity",U),N.style.transition=r.transitions.create("opacity",U),x&&x(N)}),F=E(S),$=N=>{i&&i(w.current,N)};return C.jsx(h,{appear:l,in:u,nodeRef:w,onEnter:T,onEntered:g,onEntering:R,onExit:_,onExited:F,onExiting:I,addEndListener:$,timeout:m,...c,children:(N,U)=>v.cloneElement(s,{style:{opacity:0,visibility:N==="exited"&&!u?"hidden":void 0,...Pb[N],...b,...s.props.style},ref:k,...U})})});function Ob(e){return je("MuiBackdrop",e)}Pe("MuiBackdrop",["root","invisible"]);const Mb=e=>{const{ownerState:t,...n}=e;return n},Nb=e=>{const{classes:t,invisible:n}=e;return Xe({root:["root",n&&"invisible"]},Ob,t)},$b=ne("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),_b=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:l="div",invisible:s=!1,open:a,components:u={},componentsProps:d={},slotProps:f={},slots:p={},TransitionComponent:x,transitionDuration:S,...y}=r,b={...r,component:l,invisible:s},m=Nb(b),h={transition:x,root:u.Root,...p},c={...d,...f},w={slots:h,slotProps:c},[k,E]=zo("root",{elementType:$b,externalForwardedProps:w,className:pe(m.root,i),ownerState:b}),[R,T]=zo("transition",{elementType:Bb,externalForwardedProps:w,ownerState:b}),g=Mb(T);return C.jsx(R,{in:a,timeout:S,...y,...g,children:C.jsx(k,{"aria-hidden":!0,...E,classes:m,ref:n,children:o})})}),Ab=Pe("MuiBox",["root"]),Lb=Nh(),jt=wS({themeId:qi,defaultTheme:Lb,defaultClassName:Ab.root,generateClassName:wh.generate});function zb(e){return je("MuiButton",e)}const oo=Pe("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),j0=v.createContext({}),V0=v.createContext(void 0),Fb=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:l}=e,s={root:["root",i,`${i}${re(t)}`,`size${re(o)}`,`${i}Size${re(o)}`,`color${re(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${re(o)}`],endIcon:["icon","endIcon",`iconSize${re(o)}`]},a=Xe(s,zb,l);return{...l,...a}},G0=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Db=ne(Ua,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${re(n.color)}`],t[`size${re(n.size)}`],t[`${n.variant}Size${re(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(ze(({theme:e})=>{var r,o;const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${oo.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${oo.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${oo.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${oo.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(xn(["dark","contrastText"])).map(([i])=>({props:{color:i},style:{"--variant-textColor":(e.vars||e).palette[i].main,"--variant-outlinedColor":(e.vars||e).palette[i].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[i].mainChannel} / 0.5)`:Pt(e.palette[i].main,.5),"--variant-containedColor":(e.vars||e).palette[i].contrastText,"--variant-containedBg":(e.vars||e).palette[i].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[i].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[i].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pt(e.palette[i].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[i].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[i].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Pt(e.palette[i].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{"--variant-containedColor":e.vars?e.vars.palette.text.primary:(o=(r=e.palette).getContrastText)==null?void 0:o.call(r,t),"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Pt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Pt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${oo.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${oo.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}}]}})),Ub=ne("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${re(n.size)}`]]}})({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},...G0]}),jb=ne("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${re(n.size)}`]]}})({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},...G0]}),Vb=v.forwardRef(function(t,n){const r=v.useContext(j0),o=v.useContext(V0),i=Oi(r,t),l=et({props:i,name:"MuiButton"}),{children:s,color:a="primary",component:u="button",className:d,disabled:f=!1,disableElevation:p=!1,disableFocusRipple:x=!1,endIcon:S,focusVisibleClassName:y,fullWidth:b=!1,size:m="medium",startIcon:h,type:c,variant:w="text",...k}=l,E={...l,color:a,component:u,disabled:f,disableElevation:p,disableFocusRipple:x,fullWidth:b,size:m,type:c,variant:w},R=Fb(E),T=h&&C.jsx(Ub,{className:R.startIcon,ownerState:E,children:h}),g=S&&C.jsx(jb,{className:R.endIcon,ownerState:E,children:S}),I=o||"";return C.jsxs(Db,{ownerState:E,className:pe(r.className,R.root,d,I),component:u,disabled:f,focusRipple:!x,focusVisibleClassName:pe(R.focusVisible,y),ref:n,type:c,...k,classes:R,children:[T,s,g]})});function Gb(e){return je("MuiButtonGroup",e)}const ye=Pe("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),Wb=(e,t)=>{const{ownerState:n}=e;return[{[`& .${ye.grouped}`]:t.grouped},{[`& .${ye.grouped}`]:t[`grouped${re(n.orientation)}`]},{[`& .${ye.grouped}`]:t[`grouped${re(n.variant)}`]},{[`& .${ye.grouped}`]:t[`grouped${re(n.variant)}${re(n.orientation)}`]},{[`& .${ye.grouped}`]:t[`grouped${re(n.variant)}${re(n.color)}`]},{[`& .${ye.firstButton}`]:t.firstButton},{[`& .${ye.lastButton}`]:t.lastButton},{[`& .${ye.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},Hb=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:l,variant:s}=e,a={root:["root",s,l,i&&"fullWidth",o&&"disableElevation",`color${re(n)}`],grouped:["grouped",`grouped${re(l)}`,`grouped${re(s)}`,`grouped${re(s)}${re(l)}`,`grouped${re(s)}${re(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Xe(a,Gb,t)},Yb=ne("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:Wb})(ze(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${ye.lastButton},& .${ye.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${ye.lastButton},& .${ye.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ye.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ye.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(xn()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:Pt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${ye.lastButton},& .${ye.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${ye.lastButton},& .${ye.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ye.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ye.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(xn(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${ye.firstButton},& .${ye.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${ye.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),Xb=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:l="primary",component:s="div",disabled:a=!1,disableElevation:u=!1,disableFocusRipple:d=!1,disableRipple:f=!1,fullWidth:p=!1,orientation:x="horizontal",size:S="medium",variant:y="outlined",...b}=r,m={...r,color:l,component:s,disabled:a,disableElevation:u,disableFocusRipple:d,disableRipple:f,fullWidth:p,orientation:x,size:S,variant:y},h=Hb(m),c=v.useMemo(()=>({className:h.grouped,color:l,disabled:a,disableElevation:u,disableFocusRipple:d,disableRipple:f,fullWidth:p,size:S,variant:y}),[l,a,u,d,f,p,S,y,h.grouped]),w=jS(o),k=w.length,E=R=>{const T=R===0,g=R===k-1;return T&&g?"":T?h.firstButton:g?h.lastButton:h.middleButton};return C.jsx(Yb,{as:s,role:"group",className:pe(h.root,i),ref:n,ownerState:m,...b,children:C.jsx(j0.Provider,{value:c,children:w.map((R,T)=>C.jsx(V0.Provider,{value:E(T),children:R},T))})})});function Kb(e){return je("MuiCircularProgress",e)}Pe("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const tr=44,Dc=el` + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +`,Uc=el` + 0% { + stroke-dasharray: 1px, 200px; + stroke-dashoffset: 0; + } + + 50% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -15px; + } + + 100% { + stroke-dasharray: 100px, 200px; + stroke-dashoffset: -125px; + } +`,Qb=typeof Dc!="string"?cd` + animation: ${Dc} 1.4s linear infinite; + `:null,Zb=typeof Uc!="string"?cd` + animation: ${Uc} 1.4s ease-in-out infinite; + `:null,qb=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${re(r)}`],svg:["svg"],circle:["circle",`circle${re(n)}`,o&&"circleDisableShrink"]};return Xe(i,Kb,t)},Jb=ne("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${re(n.color)}`]]}})(ze(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Qb||{animation:`${Dc} 1.4s linear infinite`}},...Object.entries(e.palette).filter(xn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),eC=ne("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),tC=ne("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${re(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(ze(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Zb||{animation:`${Uc} 1.4s ease-in-out infinite`}}]}))),nC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:l=!1,size:s=40,style:a,thickness:u=3.6,value:d=0,variant:f="indeterminate",...p}=r,x={...r,color:i,disableShrink:l,size:s,thickness:u,value:d,variant:f},S=qb(x),y={},b={},m={};if(f==="determinate"){const h=2*Math.PI*((tr-u)/2);y.strokeDasharray=h.toFixed(3),m["aria-valuenow"]=Math.round(d),y.strokeDashoffset=`${((100-d)/100*h).toFixed(3)}px`,b.transform="rotate(-90deg)"}return C.jsx(Jb,{className:pe(S.root,o),style:{width:s,height:s,...b,...a},ownerState:x,ref:n,role:"progressbar",...m,...p,children:C.jsx(eC,{className:S.svg,ownerState:x,viewBox:`${tr/2} ${tr/2} ${tr} ${tr}`,children:C.jsx(tC,{className:S.circle,style:y,ownerState:x,cx:tr,cy:tr,r:(tr-u)/2,fill:"none",strokeWidth:u})})})});function rC(e){const t=pt(e);return t.body===e?Hn(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ki(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function um(e){return parseInt(Hn(e).getComputedStyle(e).paddingRight,10)||0}function oC(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function cm(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,l=>{const s=!i.includes(l),a=!oC(l);s&&a&&ki(l,o)})}function Eu(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function iC(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(rC(r)){const l=Ih(pt(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${um(r)+l}px`;const s=pt(r).querySelectorAll(".mui-fixed");[].forEach.call(s,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${um(a)+l}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=pt(r).body;else{const l=r.parentElement,s=Hn(r);i=(l==null?void 0:l.nodeName)==="HTML"&&s.getComputedStyle(l).overflowY==="scroll"?l:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:l,property:s})=>{i?l.style.setProperty(s,i):l.style.removeProperty(s)})}}function lC(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class sC{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ki(t.modalRef,!1);const o=lC(n);cm(n,t.mount,t.modalRef,o,!0);const i=Eu(this.containers,l=>l.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Eu(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=iC(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Eu(this.containers,l=>l.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&ki(t.modalRef,n),cm(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const l=i.modals[i.modals.length-1];l.modalRef&&ki(l.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const aC=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function uC(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function cC(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function dC(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||cC(e))}function fC(e){const t=[],n=[];return Array.from(e.querySelectorAll(aC)).forEach((r,o)=>{const i=uC(r);i===-1||!dC(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function pC(){return!0}function mC(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=fC,isEnabled:l=pC,open:s}=e,a=v.useRef(!1),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),p=v.useRef(null),x=v.useRef(!1),S=v.useRef(null),y=ht(ol(t),S),b=v.useRef(null);v.useEffect(()=>{!s||!S.current||(x.current=!n)},[n,s]),v.useEffect(()=>{if(!s||!S.current)return;const c=pt(S.current);return S.current.contains(c.activeElement)||(S.current.hasAttribute("tabIndex")||S.current.setAttribute("tabIndex","-1"),x.current&&S.current.focus()),()=>{o||(f.current&&f.current.focus&&(a.current=!0,f.current.focus()),f.current=null)}},[s]),v.useEffect(()=>{if(!s||!S.current)return;const c=pt(S.current),w=R=>{b.current=R,!(r||!l()||R.key!=="Tab")&&c.activeElement===S.current&&R.shiftKey&&(a.current=!0,d.current&&d.current.focus())},k=()=>{var g,I;const R=S.current;if(R===null)return;if(!c.hasFocus()||!l()||a.current){a.current=!1;return}if(R.contains(c.activeElement)||r&&c.activeElement!==u.current&&c.activeElement!==d.current)return;if(c.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!x.current)return;let T=[];if((c.activeElement===u.current||c.activeElement===d.current)&&(T=i(S.current)),T.length>0){const _=!!((g=b.current)!=null&&g.shiftKey&&((I=b.current)==null?void 0:I.key)==="Tab"),F=T[0],$=T[T.length-1];typeof F!="string"&&typeof $!="string"&&(_?$.focus():F.focus())}else R.focus()};c.addEventListener("focusin",k),c.addEventListener("keydown",w,!0);const E=setInterval(()=>{c.activeElement&&c.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(E),c.removeEventListener("focusin",k),c.removeEventListener("keydown",w,!0)}},[n,r,o,l,s,i]);const m=c=>{f.current===null&&(f.current=c.relatedTarget),x.current=!0,p.current=c.target;const w=t.props.onFocus;w&&w(c)},h=c=>{f.current===null&&(f.current=c.relatedTarget),x.current=!0};return C.jsxs(v.Fragment,{children:[C.jsx("div",{tabIndex:s?0:-1,onFocus:h,ref:u,"data-testid":"sentinelStart"}),v.cloneElement(t,{ref:y,onFocus:m}),C.jsx("div",{tabIndex:s?0:-1,onFocus:h,ref:d,"data-testid":"sentinelEnd"})]})}function hC(e){return typeof e=="function"?e():e}function gC(e){return e?e.props.hasOwnProperty("in"):!1}const vC=new sC;function yC(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=vC,closeAfterTransition:i=!1,onTransitionEnter:l,onTransitionExited:s,children:a,onClose:u,open:d,rootRef:f}=e,p=v.useRef({}),x=v.useRef(null),S=v.useRef(null),y=ht(S,f),[b,m]=v.useState(!d),h=gC(a);let c=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(c=!1);const w=()=>pt(x.current),k=()=>(p.current.modalRef=S.current,p.current.mount=x.current,p.current),E=()=>{o.mount(k(),{disableScrollLock:r}),S.current&&(S.current.scrollTop=0)},R=rn(()=>{const j=hC(t)||w().body;o.add(k(),j),S.current&&E()}),T=v.useCallback(()=>o.isTopModal(k()),[o]),g=rn(j=>{x.current=j,j&&(d&&T()?E():S.current&&ki(S.current,c))}),I=v.useCallback(()=>{o.remove(k(),c)},[c,o]);v.useEffect(()=>()=>{I()},[I]),v.useEffect(()=>{d?R():(!h||!i)&&I()},[d,I,h,i,R]);const _=j=>Y=>{var B;(B=j.onKeyDown)==null||B.call(j,Y),!(Y.key!=="Escape"||Y.which===229||!T())&&(n||(Y.stopPropagation(),u&&u(Y,"escapeKeyDown")))},F=j=>Y=>{var B;(B=j.onClick)==null||B.call(j,Y),Y.target===Y.currentTarget&&u&&u(Y,"backdropClick")};return{getRootProps:(j={})=>{const Y=hi(e);delete Y.onTransitionEnter,delete Y.onTransitionExited;const B={...Y,...j};return{role:"presentation",...B,onKeyDown:_(B),ref:y}},getBackdropProps:(j={})=>{const Y=j;return{"aria-hidden":!0,...Y,onClick:F(Y),open:d}},getTransitionProps:()=>{const j=()=>{m(!1),l&&l()},Y=()=>{m(!0),s&&s(),i&&I()};return{onEnter:Df(j,a==null?void 0:a.props.onEnter),onExited:Df(Y,a==null?void 0:a.props.onExited)}},rootRef:y,portalRef:g,isTopModal:T,exited:b,hasTransition:h}}function SC(e){return je("MuiModal",e)}Pe("MuiModal",["root","hidden","backdrop"]);const xC=e=>{const{open:t,exited:n,classes:r}=e;return Xe({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},SC,r)},wC=ne("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(ze(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),bC=ne(_b,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),CC=v.forwardRef(function(t,n){const r=et({name:"MuiModal",props:t}),{BackdropComponent:o=bC,BackdropProps:i,classes:l,className:s,closeAfterTransition:a=!1,children:u,container:d,component:f,components:p={},componentsProps:x={},disableAutoFocus:S=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:b=!1,disablePortal:m=!1,disableRestoreFocus:h=!1,disableScrollLock:c=!1,hideBackdrop:w=!1,keepMounted:k=!1,onBackdropClick:E,onClose:R,onTransitionEnter:T,onTransitionExited:g,open:I,slotProps:_={},slots:F={},theme:$,...N}=r,U={...r,closeAfterTransition:a,disableAutoFocus:S,disableEnforceFocus:y,disableEscapeKeyDown:b,disablePortal:m,disableRestoreFocus:h,disableScrollLock:c,hideBackdrop:w,keepMounted:k},{getRootProps:j,getBackdropProps:Y,getTransitionProps:B,portalRef:L,isTopModal:H,exited:Q,hasTransition:me}=yC({...U,rootRef:n}),Se={...U,exited:Q},ae=xC(Se),Ne={};if(u.props.tabIndex===void 0&&(Ne.tabIndex="-1"),me){const{onEnter:he,onExited:xe}=B();Ne.onEnter=he,Ne.onExited=xe}const J={...N,slots:{root:p.Root,backdrop:p.Backdrop,...F},slotProps:{...x,..._}},[ue,le]=zo("root",{elementType:wC,externalForwardedProps:J,getSlotProps:j,additionalProps:{ref:n,as:f},ownerState:Se,className:pe(s,ae==null?void 0:ae.root,!Se.open&&Se.exited&&(ae==null?void 0:ae.hidden))}),[we,oe]=zo("backdrop",{elementType:o,externalForwardedProps:J,additionalProps:i,getSlotProps:he=>Y({...he,onClick:xe=>{E&&E(xe),he!=null&&he.onClick&&he.onClick(xe)}}),className:pe(i==null?void 0:i.className,ae==null?void 0:ae.backdrop),ownerState:Se}),ve=ht(i==null?void 0:i.ref,oe.ref);return!k&&!I&&(!me||Q)?null:C.jsx(yb,{ref:L,container:d,disablePortal:m,children:C.jsxs(ue,{...le,children:[!w&&o?C.jsx(we,{...oe,ref:ve}):null,C.jsx(mC,{disableEnforceFocus:y,disableAutoFocus:S,disableRestoreFocus:h,isEnabled:H,open:I,children:v.cloneElement(u,Ne)})]})})}),dm=Pe("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),EC=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:l,multiline:s}=e,a={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${re(i)}`,l&&"hiddenLabel",s&&"multiline"],input:["input"]},u=Xe(a,Ib,t);return{...t,...u}},kC=ne(Ga,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ja(e,t),!n.disableUnderline&&t.underline]}})(ze(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Tr.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Tr.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:l})=>!l.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Tr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Tr.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Tr.disabled}, .${Tr.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Tr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(xn()).map(([l])=>{var s;return{props:{disableUnderline:!1,color:l},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[l])==null?void 0:s.main}`}}}}),{props:({ownerState:l})=>l.startAdornment,style:{paddingLeft:12}},{props:({ownerState:l})=>l.endAdornment,style:{paddingRight:12}},{props:({ownerState:l})=>l.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:l,size:s})=>l.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:l})=>l.multiline&&l.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:l})=>l.multiline&&l.hiddenLabel&&l.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),RC=ne(Wa,{name:"MuiFilledInput",slot:"Input",overridesResolver:Va})(ze(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),jc=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:l,fullWidth:s=!1,hiddenLabel:a,inputComponent:u="input",multiline:d=!1,slotProps:f,slots:p={},type:x="text",...S}=r,y={...r,disableUnderline:o,fullWidth:s,inputComponent:u,multiline:d,type:x},b=EC(r),m={root:{ownerState:y},input:{ownerState:y}},h=f??l?Rt(m,f??l):m,c=p.root??i.Root??kC,w=p.input??i.Input??RC;return C.jsx(yf,{slots:{root:c,input:w},componentsProps:h,fullWidth:s,inputComponent:u,multiline:d,ref:n,type:x,...S,classes:b})});jc&&(jc.muiName="Input");function IC(e){return je("MuiFormControl",e)}Pe("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const TC=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${re(n)}`,r&&"fullWidth"]};return Xe(o,IC,t)},PC=ne("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${re(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),BC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiFormControl"}),{children:o,className:i,color:l="primary",component:s="div",disabled:a=!1,error:u=!1,focused:d,fullWidth:f=!1,hiddenLabel:p=!1,margin:x="none",required:S=!1,size:y="medium",variant:b="outlined",...m}=r,h={...r,color:l,component:s,disabled:a,error:u,fullWidth:f,hiddenLabel:p,margin:x,required:S,size:y,variant:b},c=TC(h),[w,k]=v.useState(()=>{let $=!1;return o&&v.Children.forEach(o,N=>{if(!Ka(N,["Input","Select"]))return;const U=Ka(N,["Select"])?N.props.input:N;U&&bb(U.props)&&($=!0)}),$}),[E,R]=v.useState(()=>{let $=!1;return o&&v.Children.forEach(o,N=>{Ka(N,["Input","Select"])&&(Fs(N.props,!0)||Fs(N.props.inputProps,!0))&&($=!0)}),$}),[T,g]=v.useState(!1);a&&T&&g(!1);const I=d!==void 0&&!a?d:T;let _;v.useRef(!1);const F=v.useMemo(()=>({adornedStart:w,setAdornedStart:k,color:l,disabled:a,error:u,filled:E,focused:I,fullWidth:f,hiddenLabel:p,size:y,onBlur:()=>{g(!1)},onEmpty:()=>{R(!1)},onFilled:()=>{R(!0)},onFocus:()=>{g(!0)},registerEffect:_,required:S,variant:b}),[w,l,a,u,E,I,f,p,_,S,y,b]);return C.jsx(gf.Provider,{value:F,children:C.jsx(PC,{as:s,ownerState:h,className:pe(c.root,i),ref:n,...m,children:o})})});function Vc(e){return`scale(${e}, ${e**2})`}const OC={entering:{opacity:1,transform:Vc(1)},entered:{opacity:1,transform:"none"}},ku=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Gc=v.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:l,in:s,onEnter:a,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:x,style:S,timeout:y="auto",TransitionComponent:b=_n,...m}=t,h=Rh(),c=v.useRef(),w=Ea(),k=v.useRef(null),E=ht(k,ol(i),n),R=U=>j=>{if(U){const Y=k.current;j===void 0?U(Y):U(Y,j)}},T=R(d),g=R((U,j)=>{D0(U);const{duration:Y,delay:B,easing:L}=Ls({style:S,timeout:y,easing:l},{mode:"enter"});let H;y==="auto"?(H=w.transitions.getAutoHeightDuration(U.clientHeight),c.current=H):H=Y,U.style.transition=[w.transitions.create("opacity",{duration:H,delay:B}),w.transitions.create("transform",{duration:ku?H:H*.666,delay:B,easing:L})].join(","),a&&a(U,j)}),I=R(u),_=R(x),F=R(U=>{const{duration:j,delay:Y,easing:B}=Ls({style:S,timeout:y,easing:l},{mode:"exit"});let L;y==="auto"?(L=w.transitions.getAutoHeightDuration(U.clientHeight),c.current=L):L=j,U.style.transition=[w.transitions.create("opacity",{duration:L,delay:Y}),w.transitions.create("transform",{duration:ku?L:L*.666,delay:ku?Y:Y||L*.333,easing:B})].join(","),U.style.opacity=0,U.style.transform=Vc(.75),f&&f(U)}),$=R(p),N=U=>{y==="auto"&&h.start(c.current||0,U),r&&r(k.current,U)};return C.jsx(b,{appear:o,in:s,nodeRef:k,onEnter:g,onEntered:I,onEntering:T,onExit:F,onExited:$,onExiting:_,addEndListener:N,timeout:y==="auto"?null:y,...m,children:(U,j)=>v.cloneElement(i,{style:{opacity:0,transform:Vc(.75),visibility:U==="exited"&&!s?"hidden":void 0,...OC[U],...S,...i.props.style},ref:E,...j})})});Gc&&(Gc.muiSupportAuto=!0);const MC=e=>{const{classes:t,disableUnderline:n}=e,o=Xe({root:["root",!n&&"underline"],input:["input"]},kb,t);return{...t,...o}},NC=ne(Ga,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ja(e,t),!n.disableUnderline&&t.underline]}})(ze(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ni.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ni.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ni.disabled}, .${ni.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${ni.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(xn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),$C=ne(Wa,{name:"MuiInput",slot:"Input",overridesResolver:Va})({}),Wc=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:l,fullWidth:s=!1,inputComponent:a="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...x}=r,S=MC(r),b={root:{ownerState:{disableUnderline:o}}},m=d??l?Rt(d??l,b):b,h=f.root??i.Root??NC,c=f.input??i.Input??$C;return C.jsx(yf,{slots:{root:h,input:c},slotProps:m,fullWidth:s,inputComponent:a,multiline:u,ref:n,type:p,...x,classes:S})});Wc&&(Wc.muiName="Input");const Hc=v.createContext({});function _C(e){return je("MuiList",e)}Pe("MuiList",["root","padding","dense","subheader"]);const AC=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return Xe({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},_C,t)},LC=ne("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),zC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiList"}),{children:o,className:i,component:l="ul",dense:s=!1,disablePadding:a=!1,subheader:u,...d}=r,f=v.useMemo(()=>({dense:s}),[s]),p={...r,component:l,dense:s,disablePadding:a},x=AC(p);return C.jsx(Hc.Provider,{value:f,children:C.jsxs(LC,{as:l,className:pe(x.root,i),ref:n,ownerState:p,...d,children:[u,o]})})}),fm=Pe("MuiListItemIcon",["root","alignItemsFlexStart"]),pm=Pe("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Ru(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function mm(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function W0(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function ri(e,t,n,r,o,i){let l=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(l)return!1;l=!0}const a=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!W0(s,i)||a)s=o(e,s,n);else return s.focus(),!0}return!1}const FC=v.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:l,className:s,disabledItemsFocusable:a=!1,disableListWrap:u=!1,onKeyDown:d,variant:f="selectedMenu",...p}=t,x=v.useRef(null),S=v.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Nn(()=>{o&&x.current.focus()},[o]),v.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(c,{direction:w})=>{const k=!x.current.style.width;if(c.clientHeight{const w=x.current,k=c.key;if(c.ctrlKey||c.metaKey||c.altKey){d&&d(c);return}const R=pt(w).activeElement;if(k==="ArrowDown")c.preventDefault(),ri(w,R,u,a,Ru);else if(k==="ArrowUp")c.preventDefault(),ri(w,R,u,a,mm);else if(k==="Home")c.preventDefault(),ri(w,null,u,a,Ru);else if(k==="End")c.preventDefault(),ri(w,null,u,a,mm);else if(k.length===1){const T=S.current,g=k.toLowerCase(),I=performance.now();T.keys.length>0&&(I-T.lastTime>500?(T.keys=[],T.repeating=!0,T.previousKeyMatched=!0):T.repeating&&g!==T.keys[0]&&(T.repeating=!1)),T.lastTime=I,T.keys.push(g);const _=R&&!T.repeating&&W0(R,T);T.previousKeyMatched&&(_||ri(w,R,!1,a,Ru,T))?c.preventDefault():T.previousKeyMatched=!1}d&&d(c)},b=ht(x,n);let m=-1;v.Children.forEach(l,(c,w)=>{if(!v.isValidElement(c)){m===w&&(m+=1,m>=l.length&&(m=-1));return}c.props.disabled||(f==="selectedMenu"&&c.props.selected||m===-1)&&(m=w),m===w&&(c.props.disabled||c.props.muiSkipListHighlight||c.type.muiSkipListHighlight)&&(m+=1,m>=l.length&&(m=-1))});const h=v.Children.map(l,(c,w)=>{if(w===m){const k={};return i&&(k.autoFocus=!0),c.props.tabIndex===void 0&&f==="selectedMenu"&&(k.tabIndex=0),v.cloneElement(c,k)}return c});return C.jsx(zC,{role:"menu",ref:b,className:s,onKeyDown:y,tabIndex:o?0:-1,...p,children:h})});function DC(e){return je("MuiPopover",e)}Pe("MuiPopover",["root","paper"]);function hm(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function gm(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function vm(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Iu(e){return typeof e=="function"?e():e}const UC=e=>{const{classes:t}=e;return Xe({root:["root"],paper:["paper"]},DC,t)},jC=ne(CC,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),H0=ne(K2,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),VC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:a="anchorEl",children:u,className:d,container:f,elevation:p=8,marginThreshold:x=16,open:S,PaperProps:y={},slots:b={},slotProps:m={},transformOrigin:h={vertical:"top",horizontal:"left"},TransitionComponent:c=Gc,transitionDuration:w="auto",TransitionProps:{onEntering:k,...E}={},disableScrollLock:R=!1,...T}=r,g=(m==null?void 0:m.paper)??y,I=v.useRef(),_={...r,anchorOrigin:l,anchorReference:a,elevation:p,marginThreshold:x,externalPaperSlotProps:g,transformOrigin:h,TransitionComponent:c,transitionDuration:w,TransitionProps:E},F=UC(_),$=v.useCallback(()=>{if(a==="anchorPosition")return s;const oe=Iu(i),he=(oe&&oe.nodeType===1?oe:pt(I.current).body).getBoundingClientRect();return{top:he.top+hm(he,l.vertical),left:he.left+gm(he,l.horizontal)}},[i,l.horizontal,l.vertical,s,a]),N=v.useCallback(oe=>({vertical:hm(oe,h.vertical),horizontal:gm(oe,h.horizontal)}),[h.horizontal,h.vertical]),U=v.useCallback(oe=>{const ve={width:oe.offsetWidth,height:oe.offsetHeight},he=N(ve);if(a==="none")return{top:null,left:null,transformOrigin:vm(he)};const xe=$();let O=xe.top-he.vertical,G=xe.left-he.horizontal;const A=O+ve.height,W=G+ve.width,Z=Hn(Iu(i)),K=Z.innerHeight-x,se=Z.innerWidth-x;if(x!==null&&OK){const ce=A-K;O-=ce,he.vertical+=ce}if(x!==null&&Gse){const ce=W-se;G-=ce,he.horizontal+=ce}return{top:`${Math.round(O)}px`,left:`${Math.round(G)}px`,transformOrigin:vm(he)}},[i,a,$,N,x]),[j,Y]=v.useState(S),B=v.useCallback(()=>{const oe=I.current;if(!oe)return;const ve=U(oe);ve.top!==null&&oe.style.setProperty("top",ve.top),ve.left!==null&&(oe.style.left=ve.left),oe.style.transformOrigin=ve.transformOrigin,Y(!0)},[U]);v.useEffect(()=>(R&&window.addEventListener("scroll",B),()=>window.removeEventListener("scroll",B)),[i,R,B]);const L=(oe,ve)=>{k&&k(oe,ve),B()},H=()=>{Y(!1)};v.useEffect(()=>{S&&B()}),v.useImperativeHandle(o,()=>S?{updatePosition:()=>{B()}}:null,[S,B]),v.useEffect(()=>{if(!S)return;const oe=wa(()=>{B()}),ve=Hn(i);return ve.addEventListener("resize",oe),()=>{oe.clear(),ve.removeEventListener("resize",oe)}},[i,S,B]);let Q=w;w==="auto"&&!c.muiSupportAuto&&(Q=void 0);const me=f||(i?pt(Iu(i)).body:void 0),Se={slots:b,slotProps:{...m,paper:g}},[ae,Ne]=zo("paper",{elementType:H0,externalForwardedProps:Se,additionalProps:{elevation:p,className:pe(F.paper,g==null?void 0:g.className),style:j?g.style:{...g.style,opacity:0}},ownerState:_}),[J,{slotProps:ue,...le}]=zo("root",{elementType:jC,externalForwardedProps:Se,additionalProps:{slotProps:{backdrop:{invisible:!0}},container:me,open:S},ownerState:_,className:pe(F.root,d)}),we=ht(I,Ne.ref);return C.jsx(J,{...le,...!Dr(J)&&{slotProps:ue,disableScrollLock:R},...T,ref:n,children:C.jsx(c,{appear:!0,in:S,onEntering:L,onExited:H,timeout:Q,...E,children:C.jsx(ae,{...Ne,ref:we,children:u})})})});function GC(e){return je("MuiMenu",e)}Pe("MuiMenu",["root","paper","list"]);const WC={vertical:"top",horizontal:"right"},HC={vertical:"top",horizontal:"left"},YC=e=>{const{classes:t}=e;return Xe({root:["root"],paper:["paper"],list:["list"]},GC,t)},XC=ne(VC,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),KC=ne(H0,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),QC=ne(FC,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),ZC=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:l,disableAutoFocusItem:s=!1,MenuListProps:a={},onClose:u,open:d,PaperProps:f={},PopoverClasses:p,transitionDuration:x="auto",TransitionProps:{onEntering:S,...y}={},variant:b="selectedMenu",slots:m={},slotProps:h={},...c}=r,w=ba(),k={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:a,onEntering:S,PaperProps:f,transitionDuration:x,TransitionProps:y,variant:b},E=YC(k),R=o&&!s&&d,T=v.useRef(null),g=(j,Y)=>{T.current&&T.current.adjustStyleForScrollbar(j,{direction:w?"rtl":"ltr"}),S&&S(j,Y)},I=j=>{j.key==="Tab"&&(j.preventDefault(),u&&u(j,"tabKeyDown"))};let _=-1;v.Children.map(i,(j,Y)=>{v.isValidElement(j)&&(j.props.disabled||(b==="selectedMenu"&&j.props.selected||_===-1)&&(_=Y))});const F=m.paper??KC,$=h.paper??f,N=$t({elementType:m.root,externalSlotProps:h.root,ownerState:k,className:[E.root,l]}),U=$t({elementType:F,externalSlotProps:$,ownerState:k,className:E.paper});return C.jsx(XC,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?WC:HC,slots:{paper:F,root:m.root},slotProps:{root:N,paper:U},open:d,ref:n,transitionDuration:x,TransitionProps:{onEntering:g,...y},ownerState:k,...c,classes:p,children:C.jsx(QC,{onKeyDown:I,actions:T,autoFocus:o&&(_===-1||s),autoFocusItem:R,variant:b,...a,className:pe(E.list,a.className),children:i})})});function qC(e){return je("MuiMenuItem",e)}const oi=Pe("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),JC=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},eE=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:l}=e,a=Xe({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},qC,l);return{...l,...a}},tE=ne(Ua,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:JC})(ze(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${oi.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Pt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${oi.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${oi.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Pt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Pt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${oi.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${oi.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${dm.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${dm.inset}`]:{marginLeft:52},[`& .${pm.root}`]:{marginTop:0,marginBottom:0},[`& .${pm.inset}`]:{paddingLeft:36},[`& .${fm.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${fm.root} svg`]:{fontSize:"1.25rem"}}}]}))),nE=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:l=!1,divider:s=!1,disableGutters:a=!1,focusVisibleClassName:u,role:d="menuitem",tabIndex:f,className:p,...x}=r,S=v.useContext(Hc),y=v.useMemo(()=>({dense:l||S.dense||!1,disableGutters:a}),[S.dense,l,a]),b=v.useRef(null);Nn(()=>{o&&b.current&&b.current.focus()},[o]);const m={...r,dense:y.dense,divider:s,disableGutters:a},h=eE(r),c=ht(b,n);let w;return r.disabled||(w=f!==void 0?f:-1),C.jsx(Hc.Provider,{value:y,children:C.jsx(tE,{ref:c,role:d,tabIndex:w,component:i,focusVisibleClassName:pe(h.focusVisible,u),className:pe(h.root,p),...x,ownerState:m,classes:h})})});function rE(e){return je("MuiNativeSelect",e)}const Sf=Pe("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),oE=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:l}=e,s={select:["select",n,r&&"disabled",o&&"multiple",l&&"error"],icon:["icon",`icon${re(n)}`,i&&"iconOpen",r&&"disabled"]};return Xe(s,rE,t)},Y0=ne("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Sf.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),iE=ne(Y0,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:wn,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Sf.multiple}`]:t.multiple}]}})({}),X0=ne("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Sf.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),lE=ne(X0,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${re(n.variant)}`],n.open&&t.iconOpen]}})({}),sE=v.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:l,inputRef:s,variant:a="standard",...u}=t,d={...t,disabled:o,variant:a,error:i},f=oE(d);return C.jsxs(v.Fragment,{children:[C.jsx(iE,{ownerState:d,className:pe(f.select,r),disabled:o,ref:s||n,...u}),t.multiple?null:C.jsx(lE,{as:l,ownerState:d,className:f.icon})]})});var ym;const aE=ne("fieldset",{shouldForwardProp:wn})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),uE=ne("legend",{shouldForwardProp:wn})(ze(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function cE(e){const{children:t,classes:n,className:r,label:o,notched:i,...l}=e,s=o!=null&&o!=="",a={...e,notched:i,withLabel:s};return C.jsx(aE,{"aria-hidden":!0,className:r,ownerState:a,...l,children:C.jsx(uE,{ownerState:a,children:s?C.jsx("span",{children:o}):ym||(ym=C.jsx("span",{className:"notranslate",children:"​"}))})})}const dE=e=>{const{classes:t}=e,r=Xe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Rb,t);return{...t,...r}},fE=ne(Ga,{shouldForwardProp:e=>wn(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ja})(ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${En.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},[`&.${En.focused} .${En.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(xn()).map(([n])=>({props:{color:n},style:{[`&.${En.focused} .${En.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{"@media (hover: none)":{[`&:hover .${En.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${En.error} .${En.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${En.disabled} .${En.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),pE=ne(cE,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),mE=ne(Wa,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Va})(ze(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Yc=v.forwardRef(function(t,n){var r;const o=et({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:l=!1,inputComponent:s="input",label:a,multiline:u=!1,notched:d,slots:f={},type:p="text",...x}=o,S=dE(o),y=vf(),b=hf({props:o,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),m={...o,color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:y,fullWidth:l,hiddenLabel:b.hiddenLabel,multiline:u,size:b.size,type:p},h=f.root??i.Root??fE,c=f.input??i.Input??mE;return C.jsx(yf,{slots:{root:h,input:c},renderSuffix:w=>C.jsx(pE,{ownerState:m,className:S.notchedOutline,label:a!=null&&a!==""&&b.required?r||(r=C.jsxs(v.Fragment,{children:[a," ","*"]})):a,notched:typeof d<"u"?d:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:l,inputComponent:s,multiline:u,ref:n,type:p,...x,classes:{...S,notchedOutline:null}})});Yc&&(Yc.muiName="Input");function hE(e){return je("MuiSelect",e)}const ii=Pe("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Sm;const gE=ne(Y0,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ii.select}`]:t.select},{[`&.${ii.select}`]:t[n.variant]},{[`&.${ii.error}`]:t.error},{[`&.${ii.multiple}`]:t.multiple}]}})({[`&.${ii.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),vE=ne(X0,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${re(n.variant)}`],n.open&&t.iconOpen]}})({}),yE=ne("input",{shouldForwardProp:e=>ka(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function xm(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function SE(e){return e==null||typeof e=="string"&&!e.trim()}const xE=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:l}=e,s={select:["select",n,r&&"disabled",o&&"multiple",l&&"error"],icon:["icon",`icon${re(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Xe(s,hE,t)},wE=v.forwardRef(function(t,n){var wt;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:l,children:s,className:a,defaultOpen:u,defaultValue:d,disabled:f,displayEmpty:p,error:x=!1,IconComponent:S,inputRef:y,labelId:b,MenuProps:m={},multiple:h,name:c,onBlur:w,onChange:k,onClose:E,onFocus:R,onOpen:T,open:g,readOnly:I,renderValue:_,SelectDisplayProps:F={},tabIndex:$,type:N,value:U,variant:j="standard",...Y}=t,[B,L]=ju({controlled:U,default:d,name:"Select"}),[H,Q]=ju({controlled:g,default:u,name:"Select"}),me=v.useRef(null),Se=v.useRef(null),[ae,Ne]=v.useState(null),{current:J}=v.useRef(g!=null),[ue,le]=v.useState(),we=ht(n,y),oe=v.useCallback(te=>{Se.current=te,te&&Ne(te)},[]),ve=ae==null?void 0:ae.parentNode;v.useImperativeHandle(we,()=>({focus:()=>{Se.current.focus()},node:me.current,value:B}),[B]),v.useEffect(()=>{u&&H&&ae&&!J&&(le(l?null:ve.clientWidth),Se.current.focus())},[ae,l]),v.useEffect(()=>{i&&Se.current.focus()},[i]),v.useEffect(()=>{if(!b)return;const te=pt(Se.current).getElementById(b);if(te){const D=()=>{getSelection().isCollapsed&&Se.current.focus()};return te.addEventListener("click",D),()=>{te.removeEventListener("click",D)}}},[b]);const he=(te,D)=>{te?T&&T(D):E&&E(D),J||(le(l?null:ve.clientWidth),Q(te))},xe=te=>{te.button===0&&(te.preventDefault(),Se.current.focus(),he(!0,te))},O=te=>{he(!1,te)},G=v.Children.toArray(s),A=te=>{const D=G.find(X=>X.props.value===te.target.value);D!==void 0&&(L(D.props.value),k&&k(te,D))},W=te=>D=>{let X;if(D.currentTarget.hasAttribute("tabindex")){if(h){X=Array.isArray(B)?B.slice():[];const ge=B.indexOf(te.props.value);ge===-1?X.push(te.props.value):X.splice(ge,1)}else X=te.props.value;if(te.props.onClick&&te.props.onClick(D),B!==X&&(L(X),k)){const ge=D.nativeEvent||D,Ce=new ge.constructor(ge.type,ge);Object.defineProperty(Ce,"target",{writable:!0,value:{value:X,name:c}}),k(Ce,te)}h||he(!1,D)}},Z=te=>{I||[" ","ArrowUp","ArrowDown","Enter"].includes(te.key)&&(te.preventDefault(),he(!0,te))},K=ae!==null&&H,se=te=>{!K&&w&&(Object.defineProperty(te,"target",{writable:!0,value:{value:B,name:c}}),w(te))};delete Y["aria-invalid"];let ce,$e;const P=[];let z=!1;(Fs({value:B})||p)&&(_?ce=_(B):z=!0);const q=G.map(te=>{if(!v.isValidElement(te))return null;let D;if(h){if(!Array.isArray(B))throw new Error(Gn(2));D=B.some(X=>xm(X,te.props.value)),D&&z&&P.push(te.props.children)}else D=xm(B,te.props.value),D&&z&&($e=te.props.children);return v.cloneElement(te,{"aria-selected":D?"true":"false",onClick:W(te),onKeyUp:X=>{X.key===" "&&X.preventDefault(),te.props.onKeyUp&&te.props.onKeyUp(X)},role:"option",selected:D,value:void 0,"data-value":te.props.value})});z&&(h?P.length===0?ce=null:ce=P.reduce((te,D,X)=>(te.push(D),X{const{classes:t}=e;return t},xf={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>wn(e)&&e!=="variant",slot:"Root"},CE=ne(Wc,xf)(""),EE=ne(Yc,xf)(""),kE=ne(jc,xf)(""),K0=v.forwardRef(function(t,n){const r=$h({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:l={},className:s,defaultOpen:a=!1,displayEmpty:u=!1,IconComponent:d=Tb,id:f,input:p,inputProps:x,label:S,labelId:y,MenuProps:b,multiple:m=!1,native:h=!1,onClose:c,onOpen:w,open:k,renderValue:E,SelectDisplayProps:R,variant:T="outlined",...g}=r,I=h?sE:wE,_=vf(),F=hf({props:r,muiFormControl:_,states:["variant","error"]}),$=F.variant||T,N={...r,variant:$,classes:l},U=bE(N),{root:j,...Y}=U,B=p||{standard:C.jsx(CE,{ownerState:N}),outlined:C.jsx(EE,{label:S,ownerState:N}),filled:C.jsx(kE,{ownerState:N})}[$],L=ht(n,ol(B));return C.jsx(v.Fragment,{children:v.cloneElement(B,{inputComponent:I,inputProps:{children:i,error:F.error,IconComponent:d,variant:$,type:void 0,multiple:m,...h?{id:f}:{autoWidth:o,defaultOpen:a,displayEmpty:u,labelId:y,MenuProps:b,onClose:c,onOpen:w,open:k,renderValue:E,SelectDisplayProps:{id:f,...R}},...x,classes:x?Rt(Y,x.classes):Y,...p?p.props.inputProps:{}},...(m&&h||u)&&$==="outlined"?{notched:!0}:{},ref:L,className:pe(B.props.className,s,U.root),...!p&&{variant:$},...g})})});K0.muiName="Select";function RE(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const IE=2;function Q0(e,t){return e-t}function wm(e,t){const{index:n}=e.reduce((r,o,i)=>{const l=Math.abs(t-o);return r===null||l({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},ME=e=>e;let Fl;function Cm(){return Fl===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Fl=CSS.supports("touch-action","none"):Fl=!0),Fl}function NE(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:o=!1,isRtl:i=!1,marks:l=!1,max:s=100,min:a=0,name:u,onChange:d,onChangeCommitted:f,orientation:p="horizontal",rootRef:x,scale:S=ME,step:y=1,shiftStep:b=10,tabIndex:m,value:h}=e,c=v.useRef(void 0),[w,k]=v.useState(-1),[E,R]=v.useState(-1),[T,g]=v.useState(!1),I=v.useRef(0),[_,F]=ju({controlled:h,default:n??a,name:"Slider"}),$=d&&((P,z,q)=>{const ie=P.nativeEvent||P,be=new ie.constructor(ie.type,ie);Object.defineProperty(be,"target",{writable:!0,value:{value:z,name:u}}),d(be,z,q)}),N=Array.isArray(_);let U=N?_.slice().sort(Q0):[_];U=U.map(P=>P==null?a:so(P,a,s));const j=l===!0&&y!==null?[...Array(Math.floor((s-a)/y)+1)].map((P,z)=>({value:a+y*z})):l||[],Y=j.map(P=>P.value),[B,L]=v.useState(-1),H=v.useRef(null),Q=ht(x,H),me=P=>z=>{var ie;const q=Number(z.currentTarget.getAttribute("data-index"));cs(z.target)&&L(q),R(q),(ie=P==null?void 0:P.onFocus)==null||ie.call(P,z)},Se=P=>z=>{var q;cs(z.target)||L(-1),R(-1),(q=P==null?void 0:P.onBlur)==null||q.call(P,z)},ae=(P,z)=>{const q=Number(P.currentTarget.getAttribute("data-index")),ie=U[q],be=Y.indexOf(ie);let de=z;if(j&&y==null){const ke=Y[Y.length-1];de>ke?de=ke:dez=>{var q;if(y!==null){const ie=Number(z.currentTarget.getAttribute("data-index")),be=U[ie];let de=null;(z.key==="ArrowLeft"||z.key==="ArrowDown")&&z.shiftKey||z.key==="PageDown"?de=Math.max(be-b,a):((z.key==="ArrowRight"||z.key==="ArrowUp")&&z.shiftKey||z.key==="PageUp")&&(de=Math.min(be+b,s)),de!==null&&(ae(z,de),z.preventDefault())}(q=P==null?void 0:P.onKeyDown)==null||q.call(P,z)};Nn(()=>{var P;r&&H.current.contains(document.activeElement)&&((P=document.activeElement)==null||P.blur())},[r]),r&&w!==-1&&k(-1),r&&B!==-1&&L(-1);const J=P=>z=>{var q;(q=P.onChange)==null||q.call(P,z),ae(z,z.target.valueAsNumber)},ue=v.useRef(void 0);let le=p;i&&p==="horizontal"&&(le+="-reverse");const we=({finger:P,move:z=!1})=>{const{current:q}=H,{width:ie,height:be,bottom:de,left:ke}=q.getBoundingClientRect();let Be;le.startsWith("vertical")?Be=(de-P.y)/be:Be=(P.x-ke)/ie,le.includes("-reverse")&&(Be=1-Be);let fe;if(fe=TE(Be,a,s),y)fe=BE(fe,y,a);else{const wt=wm(Y,fe);fe=Y[wt]}fe=so(fe,a,s);let We=0;if(N){z?We=ue.current:We=wm(U,fe),o&&(fe=so(fe,U[We-1]||-1/0,U[We+1]||1/0));const wt=fe;fe=bm({values:U,newValue:fe,index:We}),o&&z||(We=fe.indexOf(wt),ue.current=We)}return{newValue:fe,activeIndex:We}},oe=rn(P=>{const z=Al(P,c);if(!z)return;if(I.current+=1,P.type==="mousemove"&&P.buttons===0){ve(P);return}const{newValue:q,activeIndex:ie}=we({finger:z,move:!0});Ll({sliderRef:H,activeIndex:ie,setActive:k}),F(q),!T&&I.current>IE&&g(!0),$&&!zl(q,_)&&$(P,q,ie)}),ve=rn(P=>{const z=Al(P,c);if(g(!1),!z)return;const{newValue:q}=we({finger:z,move:!0});k(-1),P.type==="touchend"&&R(-1),f&&f(P,q),c.current=void 0,xe()}),he=rn(P=>{if(r)return;Cm()||P.preventDefault();const z=P.changedTouches[0];z!=null&&(c.current=z.identifier);const q=Al(P,c);if(q!==!1){const{newValue:be,activeIndex:de}=we({finger:q});Ll({sliderRef:H,activeIndex:de,setActive:k}),F(be),$&&!zl(be,_)&&$(P,be,de)}I.current=0;const ie=pt(H.current);ie.addEventListener("touchmove",oe,{passive:!0}),ie.addEventListener("touchend",ve,{passive:!0})}),xe=v.useCallback(()=>{const P=pt(H.current);P.removeEventListener("mousemove",oe),P.removeEventListener("mouseup",ve),P.removeEventListener("touchmove",oe),P.removeEventListener("touchend",ve)},[ve,oe]);v.useEffect(()=>{const{current:P}=H;return P.addEventListener("touchstart",he,{passive:Cm()}),()=>{P.removeEventListener("touchstart",he),xe()}},[xe,he]),v.useEffect(()=>{r&&xe()},[r,xe]);const O=P=>z=>{var be;if((be=P.onMouseDown)==null||be.call(P,z),r||z.defaultPrevented||z.button!==0)return;z.preventDefault();const q=Al(z,c);if(q!==!1){const{newValue:de,activeIndex:ke}=we({finger:q});Ll({sliderRef:H,activeIndex:ke,setActive:k}),F(de),$&&!zl(de,_)&&$(z,de,ke)}I.current=0;const ie=pt(H.current);ie.addEventListener("mousemove",oe,{passive:!0}),ie.addEventListener("mouseup",ve)},G=Ds(N?U[0]:a,a,s),A=Ds(U[U.length-1],a,s)-G,W=(P={})=>{const z=hi(P),q={onMouseDown:O(z||{})},ie={...z,...q};return{...P,ref:Q,...ie}},Z=P=>z=>{var ie;(ie=P.onMouseOver)==null||ie.call(P,z);const q=Number(z.currentTarget.getAttribute("data-index"));R(q)},K=P=>z=>{var q;(q=P.onMouseLeave)==null||q.call(P,z),R(-1)};return{active:w,axis:le,axisProps:OE,dragging:T,focusedThumbIndex:B,getHiddenInputProps:(P={})=>{const z=hi(P),q={onChange:J(z||{}),onFocus:me(z||{}),onBlur:Se(z||{}),onKeyDown:Ne(z||{})},ie={...z,...q};return{tabIndex:m,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":S(s),"aria-valuemin":S(a),name:u,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":e.step??void 0,disabled:r,...P,...ie,style:{...VS,direction:i?"rtl":"ltr",width:"100%",height:"100%"}}},getRootProps:W,getThumbProps:(P={})=>{const z=hi(P),q={onMouseOver:Z(z||{}),onMouseLeave:K(z||{})};return{...P,...z,...q}},marks:j,open:E,range:N,rootRef:Q,trackLeap:A,trackOffset:G,values:U,getThumbStyle:P=>({pointerEvents:w!==-1&&w!==P?"none":void 0})}}const $E=e=>!e||!Dr(e);function _E(e){return je("MuiSlider",e)}const ln=Pe("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),AE=e=>{const{open:t}=e;return{offset:pe(t&&ln.valueLabelOpen),circle:ln.valueLabelCircle,label:ln.valueLabelLabel}};function LE(e){const{children:t,className:n,value:r}=e,o=AE(e);return t?v.cloneElement(t,{className:pe(t.props.className)},C.jsxs(v.Fragment,{children:[t.props.children,C.jsx("span",{className:pe(o.offset,n),"aria-hidden":!0,children:C.jsx("span",{className:o.circle,children:C.jsx("span",{className:o.label,children:r})})})]})):null}function Em(e){return e}const zE=ne("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${re(n.color)}`],n.size!=="medium"&&t[`size${re(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(ze(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${ln.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${ln.dragging}`]:{[`& .${ln.thumb}, & .${ln.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(xn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),FE=ne("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),DE=ne("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(ze(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(xn()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:Ni(e.palette[t].main,.62),borderColor:Ni(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:Mi(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:Mi(e.palette[t].main,.5)})}}}))]}))),UE=ne("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${re(n.color)}`],n.size!=="medium"&&t[`thumbSize${re(n.size)}`]]}})(ze(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${ln.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(xn()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${ln.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Pt(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${ln.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${Pt(e.palette[t].main,.16)}`}}}}))]}))),jE=ne(LE,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(ze(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${ln.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${ln.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),VE=ne("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>ka(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(ze(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),GE=ne("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>ka(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(ze(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),WE=e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:i,classes:l,color:s,size:a}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",s&&`color${re(s)}`,a&&`size${re(a)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",a&&`thumbSize${re(a)}`,s&&`thumbColor${re(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Xe(u,_E,l)},HE=({children:e})=>e,Us=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiSlider"}),o=ba(),{"aria-label":i,"aria-valuetext":l,"aria-labelledby":s,component:a="span",components:u={},componentsProps:d={},color:f="primary",classes:p,className:x,disableSwap:S=!1,disabled:y=!1,getAriaLabel:b,getAriaValueText:m,marks:h=!1,max:c=100,min:w=0,name:k,onChange:E,onChangeCommitted:R,orientation:T="horizontal",shiftStep:g=10,size:I="medium",step:_=1,scale:F=Em,slotProps:$,slots:N,tabIndex:U,track:j="normal",value:Y,valueLabelDisplay:B="off",valueLabelFormat:L=Em,...H}=r,Q={...r,isRtl:o,max:c,min:w,classes:p,disabled:y,disableSwap:S,orientation:T,marks:h,color:f,size:I,step:_,shiftStep:g,scale:F,track:j,valueLabelDisplay:B,valueLabelFormat:L},{axisProps:me,getRootProps:Se,getHiddenInputProps:ae,getThumbProps:Ne,open:J,active:ue,axis:le,focusedThumbIndex:we,range:oe,dragging:ve,marks:he,values:xe,trackOffset:O,trackLeap:G,getThumbStyle:A}=NE({...Q,rootRef:n});Q.marked=he.length>0&&he.some(De=>De.label),Q.dragging=ve,Q.focusedThumbIndex=we;const W=WE(Q),Z=(N==null?void 0:N.root)??u.Root??zE,K=(N==null?void 0:N.rail)??u.Rail??FE,se=(N==null?void 0:N.track)??u.Track??DE,ce=(N==null?void 0:N.thumb)??u.Thumb??UE,$e=(N==null?void 0:N.valueLabel)??u.ValueLabel??jE,P=(N==null?void 0:N.mark)??u.Mark??VE,z=(N==null?void 0:N.markLabel)??u.MarkLabel??GE,q=(N==null?void 0:N.input)??u.Input??"input",ie=($==null?void 0:$.root)??d.root,be=($==null?void 0:$.rail)??d.rail,de=($==null?void 0:$.track)??d.track,ke=($==null?void 0:$.thumb)??d.thumb,Be=($==null?void 0:$.valueLabel)??d.valueLabel,fe=($==null?void 0:$.mark)??d.mark,We=($==null?void 0:$.markLabel)??d.markLabel,wt=($==null?void 0:$.input)??d.input,te=$t({elementType:Z,getSlotProps:Se,externalSlotProps:ie,externalForwardedProps:H,additionalProps:{...$E(Z)&&{as:a}},ownerState:{...Q,...ie==null?void 0:ie.ownerState},className:[W.root,x]}),D=$t({elementType:K,externalSlotProps:be,ownerState:Q,className:W.rail}),X=$t({elementType:se,externalSlotProps:de,additionalProps:{style:{...me[le].offset(O),...me[le].leap(G)}},ownerState:{...Q,...de==null?void 0:de.ownerState},className:W.track}),ge=$t({elementType:ce,getSlotProps:Ne,externalSlotProps:ke,ownerState:{...Q,...ke==null?void 0:ke.ownerState},className:W.thumb}),Ce=$t({elementType:$e,externalSlotProps:Be,ownerState:{...Q,...Be==null?void 0:Be.ownerState},className:W.valueLabel}),Fe=$t({elementType:P,externalSlotProps:fe,ownerState:Q,className:W.mark}),Nt=$t({elementType:z,externalSlotProps:We,ownerState:Q,className:W.markLabel}),An=$t({elementType:q,getSlotProps:ae,externalSlotProps:wt,ownerState:Q});return C.jsxs(Z,{...te,children:[C.jsx(K,{...D}),C.jsx(se,{...X}),he.filter(De=>De.value>=w&&De.value<=c).map((De,lt)=>{const Rr=Ds(De.value,w,c),ul=me[le].offset(Rr);let Ln;return j===!1?Ln=xe.includes(De.value):Ln=j==="normal"&&(oe?De.value>=xe[0]&&De.value<=xe[xe.length-1]:De.value<=xe[0])||j==="inverted"&&(oe?De.value<=xe[0]||De.value>=xe[xe.length-1]:De.value>=xe[0]),C.jsxs(v.Fragment,{children:[C.jsx(P,{"data-index":lt,...Fe,...!Dr(P)&&{markActive:Ln},style:{...ul,...Fe.style},className:pe(Fe.className,Ln&&W.markActive)}),De.label!=null?C.jsx(z,{"aria-hidden":!0,"data-index":lt,...Nt,...!Dr(z)&&{markLabelActive:Ln},style:{...ul,...Nt.style},className:pe(W.markLabel,Nt.className,Ln&&W.markLabelActive),children:De.label}):null]},lt)}),xe.map((De,lt)=>{const Rr=Ds(De,w,c),ul=me[le].offset(Rr),Ln=B==="off"?HE:$e;return C.jsx(Ln,{...!Dr(Ln)&&{valueLabelFormat:L,valueLabelDisplay:B,value:typeof L=="function"?L(F(De),lt):L,index:lt,open:J===lt||ue===lt||B==="on",disabled:y},...Ce,children:C.jsx(ce,{"data-index":lt,...ge,className:pe(W.thumb,ge.className,ue===lt&&W.active,we===lt&&W.focusVisible),style:{...ul,...A(lt),...ge.style},children:C.jsx(q,{"data-index":lt,"aria-label":b?b(lt):i,"aria-valuenow":F(De),"aria-labelledby":s,"aria-valuetext":m?m(F(De),lt):l,value:xe[lt],...An})})},lt)})]})});function YE(e){return je("MuiTab",e)}const Zt=Pe("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),XE=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:l,selected:s,disabled:a}=e,u={root:["root",i&&l&&"labelIcon",`textColor${re(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",a&&"disabled"],icon:["iconWrapper","icon"]};return Xe(u,YE,t)},KE=ne(Ua,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${re(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Zt.iconWrapper}`]:t.iconWrapper},{[`& .${Zt.icon}`]:t.icon}]}})(ze(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${Zt.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${Zt.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${Zt.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${Zt.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Zt.selected}`]:{opacity:1},[`&.${Zt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Zt.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Zt.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Zt.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Zt.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Tu=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:l=!1,fullWidth:s,icon:a,iconPosition:u="top",indicator:d,label:f,onChange:p,onClick:x,onFocus:S,selected:y,selectionFollowsFocus:b,textColor:m="inherit",value:h,wrapped:c=!1,...w}=r,k={...r,disabled:i,disableFocusRipple:l,selected:y,icon:!!a,iconPosition:u,label:!!f,fullWidth:s,textColor:m,wrapped:c},E=XE(k),R=a&&f&&v.isValidElement(a)?v.cloneElement(a,{className:pe(E.icon,a.props.className)}):a,T=I=>{!y&&p&&p(I,h),x&&x(I)},g=I=>{b&&!y&&p&&p(I,h),S&&S(I)};return C.jsxs(KE,{focusRipple:!l,className:pe(E.root,o),ref:n,role:"tab","aria-selected":y,disabled:i,onClick:T,onFocus:g,ownerState:k,tabIndex:y?0:-1,...w,children:[u==="top"||u==="start"?C.jsxs(v.Fragment,{children:[R,f]}):C.jsxs(v.Fragment,{children:[f,R]}),d]})}),QE=$n(C.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ZE=$n(C.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function qE(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function JE(e,t,n,r={},o=()=>{}){const{ease:i=qE,duration:l=300}=r;let s=null;const a=t[e];let u=!1;const d=()=>{u=!0},f=p=>{if(u){o(new Error("Animation cancelled"));return}s===null&&(s=p);const x=Math.min(1,(p-s)/l);if(t[e]=i(x)*(n-a)+a,x>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return a===n?(o(new Error("Element already at target position")),d):(requestAnimationFrame(f),d)}const ek={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function tk(e){const{onChange:t,...n}=e,r=v.useRef(),o=v.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Nn(()=>{const l=wa(()=>{const a=r.current;i(),a!==r.current&&t(r.current)}),s=Hn(o.current);return s.addEventListener("resize",l),()=>{l.clear(),s.removeEventListener("resize",l)}},[t]),v.useEffect(()=>{i(),t(r.current)},[t]),C.jsx("div",{style:ek,ref:o,...n})}function nk(e){return je("MuiTabScrollButton",e)}const rk=Pe("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),ok=e=>{const{classes:t,orientation:n,disabled:r}=e;return Xe({root:["root",n,r&&"disabled"]},nk,t)},ik=ne(Ua,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${rk.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),lk=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:l={},direction:s,orientation:a,disabled:u,...d}=r,f=ba(),p={isRtl:f,...r},x=ok(p),S=i.StartScrollButtonIcon??QE,y=i.EndScrollButtonIcon??ZE,b=$t({elementType:S,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),m=$t({elementType:y,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return C.jsx(ik,{component:"div",className:pe(x.root,o),ref:n,role:null,ownerState:p,tabIndex:null,...d,style:{...d.style,...a==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:s==="left"?C.jsx(S,{...b}):C.jsx(y,{...m})})});function sk(e){return je("MuiTabs",e)}const Pu=Pe("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),km=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Rm=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Dl=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},ak=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:l,scrollButtonsHideMobile:s,classes:a}=e;return Xe({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",l&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},sk,a)},uk=ne("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Pu.scrollButtons}`]:t.scrollButtons},{[`& .${Pu.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(ze(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${Pu.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),ck=ne("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),dk=ne("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),fk=ne("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(ze(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),pk=ne(tk)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Im={},mk=v.forwardRef(function(t,n){const r=et({props:t,name:"MuiTabs"}),o=Ea(),i=ba(),{"aria-label":l,"aria-labelledby":s,action:a,centered:u=!1,children:d,className:f,component:p="div",allowScrollButtonsMobile:x=!1,indicatorColor:S="primary",onChange:y,orientation:b="horizontal",ScrollButtonComponent:m=lk,scrollButtons:h="auto",selectionFollowsFocus:c,slots:w={},slotProps:k={},TabIndicatorProps:E={},TabScrollButtonProps:R={},textColor:T="primary",value:g,variant:I="standard",visibleScrollbar:_=!1,...F}=r,$=I==="scrollable",N=b==="vertical",U=N?"scrollTop":"scrollLeft",j=N?"top":"left",Y=N?"bottom":"right",B=N?"clientHeight":"clientWidth",L=N?"height":"width",H={...r,component:p,allowScrollButtonsMobile:x,indicatorColor:S,orientation:b,vertical:N,scrollButtons:h,textColor:T,variant:I,visibleScrollbar:_,fixed:!$,hideScrollbar:$&&!_,scrollableX:$&&!N,scrollableY:$&&N,centered:u&&!$,scrollButtonsHideMobile:!x},Q=ak(H),me=$t({elementType:w.StartScrollButtonIcon,externalSlotProps:k.startScrollButtonIcon,ownerState:H}),Se=$t({elementType:w.EndScrollButtonIcon,externalSlotProps:k.endScrollButtonIcon,ownerState:H}),[ae,Ne]=v.useState(!1),[J,ue]=v.useState(Im),[le,we]=v.useState(!1),[oe,ve]=v.useState(!1),[he,xe]=v.useState(!1),[O,G]=v.useState({overflow:"hidden",scrollbarWidth:0}),A=new Map,W=v.useRef(null),Z=v.useRef(null),K=()=>{const D=W.current;let X;if(D){const Ce=D.getBoundingClientRect();X={clientWidth:D.clientWidth,scrollLeft:D.scrollLeft,scrollTop:D.scrollTop,scrollWidth:D.scrollWidth,top:Ce.top,bottom:Ce.bottom,left:Ce.left,right:Ce.right}}let ge;if(D&&g!==!1){const Ce=Z.current.children;if(Ce.length>0){const Fe=Ce[A.get(g)];ge=Fe?Fe.getBoundingClientRect():null}}return{tabsMeta:X,tabMeta:ge}},se=rn(()=>{const{tabsMeta:D,tabMeta:X}=K();let ge=0,Ce;N?(Ce="top",X&&D&&(ge=X.top-D.top+D.scrollTop)):(Ce=i?"right":"left",X&&D&&(ge=(i?-1:1)*(X[Ce]-D[Ce]+D.scrollLeft)));const Fe={[Ce]:ge,[L]:X?X[L]:0};if(typeof J[Ce]!="number"||typeof J[L]!="number")ue(Fe);else{const Nt=Math.abs(J[Ce]-Fe[Ce]),An=Math.abs(J[L]-Fe[L]);(Nt>=1||An>=1)&&ue(Fe)}}),ce=(D,{animation:X=!0}={})=>{X?JE(U,W.current,D,{duration:o.transitions.duration.standard}):W.current[U]=D},$e=D=>{let X=W.current[U];N?X+=D:X+=D*(i?-1:1),ce(X)},P=()=>{const D=W.current[B];let X=0;const ge=Array.from(Z.current.children);for(let Ce=0;CeD){Ce===0&&(X=D);break}X+=Fe[B]}return X},z=()=>{$e(-1*P())},q=()=>{$e(P())},ie=v.useCallback(D=>{G({overflow:null,scrollbarWidth:D})},[]),be=()=>{const D={};D.scrollbarSizeListener=$?C.jsx(pk,{onChange:ie,className:pe(Q.scrollableX,Q.hideScrollbar)}):null;const ge=$&&(h==="auto"&&(le||oe)||h===!0);return D.scrollButtonStart=ge?C.jsx(m,{slots:{StartScrollButtonIcon:w.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:me},orientation:b,direction:i?"right":"left",onClick:z,disabled:!le,...R,className:pe(Q.scrollButtons,R.className)}):null,D.scrollButtonEnd=ge?C.jsx(m,{slots:{EndScrollButtonIcon:w.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Se},orientation:b,direction:i?"left":"right",onClick:q,disabled:!oe,...R,className:pe(Q.scrollButtons,R.className)}):null,D},de=rn(D=>{const{tabsMeta:X,tabMeta:ge}=K();if(!(!ge||!X)){if(ge[j]X[Y]){const Ce=X[U]+(ge[Y]-X[Y]);ce(Ce,{animation:D})}}}),ke=rn(()=>{$&&h!==!1&&xe(!he)});v.useEffect(()=>{const D=wa(()=>{W.current&&se()});let X;const ge=Nt=>{Nt.forEach(An=>{An.removedNodes.forEach(De=>{X==null||X.unobserve(De)}),An.addedNodes.forEach(De=>{X==null||X.observe(De)})}),D(),ke()},Ce=Hn(W.current);Ce.addEventListener("resize",D);let Fe;return typeof ResizeObserver<"u"&&(X=new ResizeObserver(D),Array.from(Z.current.children).forEach(Nt=>{X.observe(Nt)})),typeof MutationObserver<"u"&&(Fe=new MutationObserver(ge),Fe.observe(Z.current,{childList:!0})),()=>{D.clear(),Ce.removeEventListener("resize",D),Fe==null||Fe.disconnect(),X==null||X.disconnect()}},[se,ke]),v.useEffect(()=>{const D=Array.from(Z.current.children),X=D.length;if(typeof IntersectionObserver<"u"&&X>0&&$&&h!==!1){const ge=D[0],Ce=D[X-1],Fe={root:W.current,threshold:.99},Nt=Rr=>{we(!Rr[0].isIntersecting)},An=new IntersectionObserver(Nt,Fe);An.observe(ge);const De=Rr=>{ve(!Rr[0].isIntersecting)},lt=new IntersectionObserver(De,Fe);return lt.observe(Ce),()=>{An.disconnect(),lt.disconnect()}}},[$,h,he,d==null?void 0:d.length]),v.useEffect(()=>{Ne(!0)},[]),v.useEffect(()=>{se()}),v.useEffect(()=>{de(Im!==J)},[de,J]),v.useImperativeHandle(a,()=>({updateIndicator:se,updateScrollButtons:ke}),[se,ke]);const Be=C.jsx(fk,{...E,className:pe(Q.indicator,E.className),ownerState:H,style:{...J,...E.style}});let fe=0;const We=v.Children.map(d,D=>{if(!v.isValidElement(D))return null;const X=D.props.value===void 0?fe:D.props.value;A.set(X,fe);const ge=X===g;return fe+=1,v.cloneElement(D,{fullWidth:I==="fullWidth",indicator:ge&&!ae&&Be,selected:ge,selectionFollowsFocus:c,onChange:y,textColor:T,value:X,...fe===1&&g===!1&&!D.props.tabIndex?{tabIndex:0}:{}})}),wt=D=>{const X=Z.current,ge=pt(X).activeElement;if(ge.getAttribute("role")!=="tab")return;let Fe=b==="horizontal"?"ArrowLeft":"ArrowUp",Nt=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&i&&(Fe="ArrowRight",Nt="ArrowLeft"),D.key){case Fe:D.preventDefault(),Dl(X,ge,Rm);break;case Nt:D.preventDefault(),Dl(X,ge,km);break;case"Home":D.preventDefault(),Dl(X,null,km);break;case"End":D.preventDefault(),Dl(X,null,Rm);break}},te=be();return C.jsxs(uk,{className:pe(Q.root,f),ownerState:H,ref:n,as:p,...F,children:[te.scrollButtonStart,te.scrollbarSizeListener,C.jsxs(ck,{className:Q.scroller,ownerState:H,style:{overflow:O.overflow,[N?`margin${i?"Left":"Right"}`:"marginBottom"]:_?void 0:-O.scrollbarWidth},ref:W,children:[C.jsx(dk,{"aria-label":l,"aria-labelledby":s,"aria-orientation":b==="vertical"?"vertical":null,className:Q.flexContainer,ownerState:H,onKeyDown:wt,ref:Z,role:"tablist",children:We}),ae&&Be]}),te.scrollButtonEnd]})}),hk=$n(C.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"}),"GridOn"),gk=$n(C.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),vk=$n(C.jsx("path",{d:"M11 2v20c-5.07-.5-9-4.79-9-10s3.93-9.5 9-10m2.03 0v8.99H22c-.47-4.74-4.24-8.52-8.97-8.99m0 11.01V22c4.74-.47 8.5-4.25 8.97-8.99z"}),"PieChart"),yk=$n(C.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M9.5 16.5v-9l7 4.5z"}),"PlayCircle"),Sk=$n(C.jsx("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91"}),"RestartAlt"),xk=$n([C.jsx("circle",{cx:"15.5",cy:"9.5",r:"1.5"},"0"),C.jsx("circle",{cx:"8.5",cy:"9.5",r:"1.5"},"1"),C.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 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m0-6c-2.33 0-4.32 1.45-5.12 3.5h1.67c.69-1.19 1.97-2 3.45-2s2.75.81 3.45 2h1.67c-.8-2.05-2.79-3.5-5.12-3.5"},"2")],"SentimentVeryDissatisfied"),wk=$n(C.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"}),"SkipNext"),bk=e=>{const[t,n]=v.useState(e.splitValues.length),[r,o]=v.useState(e.splitValues),i=(u,d)=>{const f=parseInt(u.target.value);n(f);const p=Array(f).fill(0).map((x,S)=>(S+1)/(f+1));o(p),e.onChange(p)},l=(u,d)=>{const f=d;o(f),e.onChange(f)},s=Sr(K0)` + margin: 2px; + padding: 0 8px 0 0; + `,a=u=>u.toFixed(2);return C.jsxs(jt,{style:{display:"flex",columnGap:"16px",width:"100%",alignItems:"center"},children:[C.jsx(BC,{size:"small",children:C.jsx(s,{name:"splitCount",value:t,onChange:i,variant:"outlined",children:[1,2,3,4,5,6,7].map(u=>C.jsx(nE,{value:u,children:u},u))})}),C.jsx(Us,{value:r,onChange:l,getAriaValueText:a,valueLabelFormat:a,valueLabelDisplay:"auto",step:.001,min:0,max:1,track:!1,disableSwap:!0})]})};var dt=(e=>(e[e.INITIALIZING=0]="INITIALIZING",e[e.INITIALIZED=1]="INITIALIZED",e[e.RUNNING=2]="RUNNING",e[e.STEP_RUNNING=3]="STEP_RUNNING",e[e.PAUSED=4]="PAUSED",e))(dt||{});const Ck=Sr(Xb)` + margin: 4px; + padding-left: 12px; + padding-right: 12px; + border-collapse: separate; +`,Z0=Sr(Vb)` + border-radius: 30px; + border-spacing: 1px; + border-style: solid; + border-color: lightgrey; + border-width: 1px; +`,Bu=Sr(Z0)` + padding: 2px 8px 2px 4px; +`,Ek=Sr(Z0)``,kk=e=>{const t=(n,r)=>{e.onSpeedChange(r)};return C.jsxs(C.Fragment,{children:[C.jsxs(Ck,{children:[C.jsxs(Bu,{variant:"contained",size:"small",onClick:e.onReset&&e.onReset,disabled:!e.isResettable,children:[C.jsx(Sk,{}),"Reset"]}),C.jsxs(Bu,{variant:"contained",size:"small",onClick:e.onPause&&e.onPause,disabled:e.isPaused,children:[C.jsx(gk,{}),"Pause"]}),C.jsxs(Bu,{variant:"contained",size:"small",onClick:e.onStep&&e.onStep,disabled:!e.isStepped,children:[C.jsx(wk,{}),"Step"]}),C.jsxs(Ek,{variant:"contained",onClick:e.onPlay&&e.onPlay,disabled:e.isPlayed,children:[C.jsx(yk,{}),"Play"]})]}),C.jsxs(jt,{style:{display:"flex",margin:"0 36px 0 36px",columnGap:"18px"},children:[C.jsxs(jt,{style:{display:"flex",width:"90%",columnGap:"12px",padding:"1px 12px 1px 12px",borderRadius:"30px",borderStyle:"solid",borderWidth:"1px",borderColor:"#b3b3b3"},children:["🐢",C.jsx(Us,{defaultValue:e.speed,"aria-label":"custom thumb label",valueLabelDisplay:"auto",step:.01,min:0,max:1,onChange:t}),"🐇"]}),C.jsx(U0,{fontSize:11,color:"grey",style:{alignSelf:"center",padding:"0 10px 0 10px",width:"10%"},children:e.frameCount})]})]})};function q0(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}}function Rk(e,t){const n=[];for(let r=0;r{r.current.updateInitialStateGridData(J,E),n.forEach(ue=>{var le,we;(le=ue.current)==null||le.refreshData(0),(we=ue.current)==null||we.refreshViewportState(0)})},[E]),g=v.useCallback(J=>{r.current.updateInitialStateGridData(h,J),n.forEach(ue=>{var le,we;(le=ue.current)==null||le.refreshData(0),(we=ue.current)==null||we.refreshViewportState(0)})},[h]),I=v.useCallback(J=>{r.current.setTolerance(J)},[]),_=v.useCallback((J,ue)=>{u(dt.INITIALIZING),c(ue)},[]),F=v.useCallback((J,ue)=>{u(dt.INITIALIZED);const le=ue;c(le),s(0),m(!1),T(le)},[T]),$=v.useCallback(J=>{u(dt.INITIALIZED),R(J),s(0),m(!1),g(J)},[g]),N=v.useCallback((J,ue)=>{const le=ue;k(le),I(le)},[I]),U=async()=>(await r.current.updateGridData(),n==null||n.forEach((J,ue)=>{var le;(le=J.current)==null||le.refreshData(ue)}),e.iterations?l{if(a===dt.PAUSED||a===dt.INITIALIZED)return;(l==0||await U())&&(a===dt.RUNNING||a===dt.STEP_RUNNING)?(s(()=>l+1),a===dt.STEP_RUNNING&&u(dt.PAUSED)):L()};v.useEffect(()=>{if(!t.current&&(a===dt.RUNNING||a===dt.STEP_RUNNING)){const J=Math.pow(1-o,2)*1e3;setTimeout(()=>t.current=requestAnimationFrame(j),J),t.current=null}return()=>{t.current&&cancelAnimationFrame(t.current),t.current=null}},[a,l]),v.useEffect(()=>{e.autoStart&&me()},[]);const Y=J=>{i(J)},B=()=>{f(()=>!1),x(()=>!0),y(()=>!0),m(()=>!1),T(h),u(()=>dt.INITIALIZED)},L=()=>{m(()=>!1),y(()=>!0),x(()=>!0),u(dt.PAUSED),f(()=>!0)},H=()=>{l===0&&(q0(r.current.getModel().gridData),r.current.getModel().cellIndices=Rk(r.current.getModel().gridData,sr),r.current.sync(),n.forEach(J=>{var ue;(ue=J.current)==null||ue.refreshData(0)}))},Q=()=>{x(()=>!0),y(()=>!0),m(()=>!1),u(dt.STEP_RUNNING),f(()=>!0),H()},me=()=>{x(()=>!1),y(()=>!1),m(()=>!0),u(dt.RUNNING),f(()=>!1),H()},Se=v.useCallback(()=>(J,ue,le)=>{n.filter((we,oe)=>oe!==0).forEach(we=>{var oe;return(oe=we.current)==null?void 0:oe.refreshFocusedState(J,ue,le)})},[]),ae=v.useCallback(()=>(J,ue,le)=>{n.filter((we,oe)=>oe!==0).forEach(we=>{var oe;return(oe=we.current)==null?void 0:oe.refreshSelectedState(J,ue,le)})},[]),Ne=v.useCallback(()=>J=>{n.filter((ue,le)=>le!==0).forEach(ue=>{var le;return(le=ue.current)==null?void 0:le.refreshViewportState(J)})},[]);return C.jsxs(C.Fragment,{children:[C.jsxs(jt,{style:{borderWidth:"1px",borderStyle:"solid",borderColor:"#b3b3b3",borderRadius:"5px",padding:"8px 32px 8px 32px",margin:"2px 0 2px 0"},children:[C.jsxs(jt,{style:{display:"flex",columnGap:"18px",alignItems:"center"},children:[C.jsx(jt,{style:{marginBottom:"10px"},children:C.jsx(hk,{})}),C.jsx(Us,{"aria-label":"grid size",value:h,min:8,max:512,step:null,marks:[{value:8,label:"8"},{value:16,label:""},{value:32,label:""},{value:64,label:"64"},{value:128,label:"128"},{value:192,label:"192"},{value:256,label:"256"},{value:320,label:"320"},{value:384,label:"384"},{value:448,label:"438"},{value:512,label:"512"}],onChange:_,onChangeCommitted:F,valueLabelDisplay:"auto"})]}),C.jsxs(jt,{style:{display:"flex",columnGap:"18px",alignItems:"center"},children:[C.jsx(vk,{}),C.jsx(bk,{splitValues:E,onChange:$})]})]}),C.jsx(jt,{style:{borderWidth:"1px",borderStyle:"solid",borderColor:"#b3b3b3",borderRadius:"5px",padding:"8px 32px 8px 32px",margin:"2px 0 2px 0"},children:C.jsx(kk,{speed:o,isResettable:d,isPaused:p,isStepped:S,isPlayed:b,onReset:B,onPause:L,onStep:Q,onPlay:me,onSpeedChange:Y,frameCount:l})}),C.jsxs(jt,{style:{display:"flex",columnGap:"18px",padding:"16px"},children:[C.jsx(xk,{}),C.jsx(Us,{"aria-label":"tolerance",min:0,max:1,step:null,marks:[0,1,2,3,4,5,6,7,8].map(J=>({value:J/8,label:`${J} / 8`})),value:w,onChange:N,valueLabelDisplay:"auto"})]}),C.jsx(jt,{children:C.jsx(jt,{style:{background:"rgba(255, 255, 255, 0.1)",display:"flex",width:e.canvasSize.width+"px",height:e.canvasSize.height+"px"},children:!r.current||a===dt.INITIALIZING?C.jsx(nC,{size:"64px",style:{margin:"auto"}}):C.jsx(Qm,{ref:n[0],numViewports:1,viewportIndex:0,mode:cr.CUSTOM,numColumns:h,numRows:h,headerOffset:e.headerOffset,scrollBar:Ik,canvasSize:e.canvasSize,data:r.current.getModel().gridData,focusedStates:r.current.getModel().focusedStates,selectedStates:r.current.getModel().selectedStates,viewportStates:r.current.getModel().viewportStates,onFocusedStateChange:Se,onSelectedStateChange:ae,onViewportStateChange:Ne})})})]})}class ev{constructor(t){this.model=t}getModel(){return this.model}setTolerance(t){this.model.setTolerance(t)}updateInitialStateGridData(t,n){this.model.updateInitialStateGridData(t,n)}sync(){this.model.sync()}}class Tk extends ev{constructor(){super(...arguments),this.updateGridData=async()=>{function t(n,r,o,i){return[[-1,-1],[0,-1],[1,-1],[-1,0],[1,0],[-1,1],[0,1],[1,1]].map(([s,a])=>{const u=(n+s+o)%o;return(r+a+i)%i*o+u})}for(let n=0;nthis.model.gridData[d]),a=s.filter(d=>d===i).length,u=s.filter(d=>d!==sr).length;if(u>0&&a/u params: Params; +// 2次元グリッドのエージェント情報 +@group(0) @binding(7) var grid: array; +// ランダムテーブル (乱数値を0から1の範囲で格納した配列) +@group(0) @binding(8) var randomTable: array; +// 各ワークグループが処理するセグメントのインデックス (シャッフルされた配列) +@group(0) @binding(9) var randomSegmentIndices: array; + +// @group(0) @binding(10) var debug: array; + +fn shuffle(startIndex: u32, length: u32, cellIndices: ptr>) { + for (var i = 0u; i < length; i++) { + //let j = randomChoice(startIndex + i, length); + let j = u32(floor(randomTable[startIndex + i] * f32(length))); + let value = (*cellIndices)[startIndex + i]; + (*cellIndices)[startIndex + i] = (*cellIndices)[startIndex + j]; + (*cellIndices)[startIndex + j] = value; + } +} + +fn getIndex(x: u32, y: u32, width: u32) -> u32 { + return y * width + x; +} + +fn getCell(x: u32, y: u32) -> u32 { + return grid[getIndex(x, y, WIDTH)]; +} + +fn countSimilarNeighbor(x: u32, y: u32, dx: i32, dy: i32, agentType: u32) -> vec2u { + let height = i32(HEIGHT); + let width = i32(WIDTH); + let cell = getCell(u32((i32(x) + dx + width) % width), u32((i32(y) + dy + height) % height)); + return vec2u(select(0u, 1u, cell == agentType), select(0u, 1u, cell != EMPTY_VALUE)); +} + +fn randomChoice(index: u32, size: u32) -> u32 { + return u32(floor(randomTable[index] * f32(size))); +} + +fn countSimilarNeighbors(x: u32, y: u32, agentType: u32) -> vec2u { + return countSimilarNeighbor(x, y, -1, -1, agentType) + + countSimilarNeighbor(x, y, 0, -1, agentType) + + countSimilarNeighbor(x, y, 1, -1, agentType) + + + countSimilarNeighbor(x, y, -1, 0, agentType) + + countSimilarNeighbor(x, y, 1, 0, agentType) + + + countSimilarNeighbor(x, y, -1, 1, agentType) + + countSimilarNeighbor(x, y, 0, 1, agentType) + + countSimilarNeighbor(x, y, 1, 1, agentType); +} + +// 指定されたセグメント内の空き地情報・移動予定エージェントを更新する関数 +fn updateCellIndices(workGroupSegmentIndex: u32, segmentIndex: u32, + cellIndices: ptr>, + movingAgentsCounter: ptr>, + emptyCellsCounter: ptr>) { + + var emptyCellsCount: u32 = 0u; + var movingAgentsCount: u32 = 0u; + let cellSize = WIDTH * HEIGHT; + let agentIndexBase = segmentIndex * CELLS_PER_SEGMENT; + var i = 0u; + for (var agentIndex = agentIndexBase; agentIndex < agentIndexBase + CELLS_PER_SEGMENT /* && agentIndex < cellSize*/; agentIndex++) { + let agent = grid[agentIndex]; + if (agent == EMPTY_VALUE) { + (*cellIndices)[workGroupSegmentIndex * SEGMENT_SIZE + emptyCellsCount] = agentIndex; + emptyCellsCount++; + }else{ + let x = agentIndex % WIDTH; + let y = agentIndex / WIDTH; + let neighbors = countSimilarNeighbors(x, y, agent); + let similarCount = neighbors.x; + let neighborCount = neighbors.y; + if (neighborCount > 0u && f32(similarCount) / f32(neighborCount) < params.tolerance) { + movingAgentsCount++; + (*cellIndices)[workGroupSegmentIndex * SEGMENT_SIZE + SEGMENT_SIZE - movingAgentsCount] = agentIndex; + } + } + } + + (*emptyCellsCounter)[workGroupSegmentIndex] = emptyCellsCount; + (*movingAgentsCounter)[workGroupSegmentIndex] = movingAgentsCount; + + shuffle(workGroupSegmentIndex * SEGMENT_SIZE, emptyCellsCount, cellIndices); + shuffle(workGroupSegmentIndex * SEGMENT_SIZE + SEGMENT_SIZE - movingAgentsCount - 1, movingAgentsCount, cellIndices); +} + +fn getEmptyCellObject(targetIndex: u32, + workgroupSegmentIndices: ptr>, + emptyCellsCounter: ptr>) -> vec2u { + var accumulatedEmptyCells: u32 = 0; + for (var workgroupSegmentIndex = 0u; workgroupSegmentIndex < SEGMENTS_PER_GROUP; workgroupSegmentIndex++) { + let emptyCellsCount = (*emptyCellsCounter)[(*workgroupSegmentIndices)[workgroupSegmentIndex]]; + if (targetIndex < accumulatedEmptyCells + emptyCellsCount) { + return vec2u( + targetIndex - accumulatedEmptyCells, + (*workgroupSegmentIndices)[workgroupSegmentIndex] + ); + } + accumulatedEmptyCells += emptyCellsCount; + } + return vec2u(0, 0); // ここには到達しない +} + +fn moveAgentsInSegment(segmentIndex: u32, + workgroupSegmentIndices: ptr>, + totalEmptyCells: f32, + cellIndices: ptr>, + movingAgentsCounter: ptr>, + emptyCellsCounter: ptr>) { + let movingAgentsCount = (*movingAgentsCounter)[segmentIndex]; + let indexBase = segmentIndex * SEGMENT_SIZE; + for (var i = 0u; i < movingAgentsCount; i++) { + + let movingAgentIndex = (*cellIndices)[indexBase + SEGMENT_SIZE - 1u - i]; + let agent = grid[movingAgentIndex]; + + let randomFactor = (*cellIndices)[indexBase + i]; // ここの選び方が悪い可能性? + let randomValueAsAccumulatedIndex = u32(floor(randomTable[randomFactor] * totalEmptyCells)); + + // どのセグメントに該当するかを決定 + let emptyCellObject = getEmptyCellObject(randomValueAsAccumulatedIndex, workgroupSegmentIndices, emptyCellsCounter); + let emptyCellIndexInSegment = emptyCellObject[0]; + let emptyCellSegmentIndex = emptyCellObject[1]; + let emptyCellPointer = emptyCellSegmentIndex * SEGMENT_SIZE + (*emptyCellsCounter)[emptyCellSegmentIndex] - 1u - emptyCellIndexInSegment; + let emptyCellIndex = (*cellIndices)[emptyCellPointer]; + + // 選択されたセグメント内の空き地インデックスを取得 + if(grid[emptyCellIndex] == EMPTY_VALUE){ + // 引越しを実行 + grid[emptyCellIndex] = agent; + grid[movingAgentIndex] = EMPTY_VALUE; + (*emptyCellsCounter)[emptyCellSegmentIndex]--; + (*emptyCellsCounter)[segmentIndex]++; + } + } +} + +fn clear(){ + for(var y = 0u; y < HEIGHT; y++){ + for(var x = 0u; x < WIDTH; x++){ + grid[x + y * WIDTH] = EMPTY_VALUE; + } + } +} + +@compute @workgroup_size(WORKGROUP_SIZE) +fn main(@builtin(workgroup_id) workgroup_id: vec3) { + let workgroupIndex = workgroup_id.x; + + var cellIndices: array; + var emptyCellsCounter: array; + var movingAgentsCounter: array; + var workgroupSegmentIndices: array;//SEGMENTS_PER_GROUP + + if(64u < WIDTH * HEIGHT){ + // ワークグループに対応する 4 つのセグメントインデックスを取得 + workgroupSegmentIndices[0] = randomSegmentIndices[workgroupIndex * SEGMENTS_PER_GROUP]; + workgroupSegmentIndices[1] = randomSegmentIndices[workgroupIndex * SEGMENTS_PER_GROUP + 1u]; + workgroupSegmentIndices[2] = randomSegmentIndices[workgroupIndex * SEGMENTS_PER_GROUP + 2u]; + workgroupSegmentIndices[3] = randomSegmentIndices[workgroupIndex * SEGMENTS_PER_GROUP + 3u]; + + for(var i = 0u; i < SEGMENTS_PER_GROUP; i++){ + updateCellIndices(i, workgroupSegmentIndices[i], &cellIndices, &movingAgentsCounter, &emptyCellsCounter); + } + + workgroupBarrier(); + + var totalEmptyCells = 0.0; + for(var i = 0u; i < SEGMENTS_PER_GROUP; i++){ + totalEmptyCells += f32(emptyCellsCounter[i]); + } + + for(var i = 0u; i < SEGMENTS_PER_GROUP; i++){ + moveAgentsInSegment(workgroupSegmentIndices[i], &workgroupSegmentIndices, totalEmptyCells, &cellIndices, &movingAgentsCounter, &emptyCellsCounter); + } + + }else if(workgroupIndex == 0){ + updateCellIndices(0, 0, &cellIndices, &movingAgentsCounter, &emptyCellsCounter); + let totalEmptyCells = f32(emptyCellsCounter[0]); + workgroupSegmentIndices[0] = 0; + moveAgentsInSegment(0, &workgroupSegmentIndices, totalEmptyCells, &cellIndices, &movingAgentsCounter, &emptyCellsCounter); + } +} +`,tv=64,Ok=4,Ou=tv*Ok;class Mk extends ev{constructor(t,n){super(t),this.device=n;const r=t.gridSize;this.paramsBuffer=n.createBuffer({label:`S:ParamsBuffer(gridSize=${r})`,size:4,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.randomSegmentIndicesBuffer=n.createBuffer({label:`S:RandomSegmentIndicesBuffer(gridSize=${r})`,size:Ou*4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),n.queue.writeBuffer(this.paramsBuffer,0,new Float32Array([t.tolerance])),this.prepareBuffers(0,r),this.writeGridDataBuffer(),this.prepareBindGroup(r)}createComputePipeline(t){function n(u,d){return Object.entries(d).reduce((f,[p,x])=>f.replaceAll(new RegExp(`const ${p}\\: u32 = (\\d+)\\;`,"g"),`const ${p}: u32 = ${x};`),u)}const r=t*t<=64?1:tv,o=t*t<=64?t*t:Ou,i=t*t<=64?1:4,l=Math.ceil(t*t/r),s=l*i,a=n(Bk,{WORKGROUP_SIZE:r,SEGMENT_SIZE:o,SEGMENTS_PER_GROUP:i,CELLS_PER_SEGMENT:l,CELLS_PER_GROUP:s});return this.device.createComputePipeline({label:`S:SchellingComputePipeline(gridSize=${t})`,layout:"auto",compute:{module:this.device.createShaderModule({label:"SchellingModelShader",code:a}),constants:{EMPTY_VALUE:sr,WIDTH:t,HEIGHT:t},entryPoint:"main"}})}prepareBindGroup(t){this.computePipeline=this.createComputePipeline(t),this.bindGroup=this.device.createBindGroup({label:`S:SchellingBindGroup(gridSize=${this.model.gridSize})`,layout:this.computePipeline.getBindGroupLayout(0),entries:[{binding:6,resource:{buffer:this.paramsBuffer}},{binding:7,resource:{buffer:this.gridBuffer}},{binding:8,resource:{buffer:this.randomTableBuffer}},{binding:9,resource:{buffer:this.randomSegmentIndicesBuffer}}].concat([])})}destroyBuffers(){var t,n,r,o;(t=this.gridBuffer)==null||t.destroy(),(n=this.cellIndicesBuffer)==null||n.destroy(),(r=this.randomTableBuffer)==null||r.destroy(),(o=this.readerBuffer)==null||o.destroy()}prepareBuffers(t,n){t!==0&&t!==n&&this.destroyBuffers();const r=this.device,o=this.model,i=n*n;this.randomTable=new Float32Array(i),this.cellIndicesBuffer=r.createBuffer({label:`S:CellIndicesBuffer(gridSize=${n})`,size:i*4,usage:GPUBufferUsage.STORAGE}),this.gridBuffer=r.createBuffer({label:`S:GridBuffer(gridSize=${n})`,size:o.gridData.byteLength,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST|GPUBufferUsage.COPY_SRC}),this.randomTableBuffer=r.createBuffer({label:`S:RandomTableBuffer(gridSize=${n})`,size:i*4,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST}),this.readerBuffer=r.createBuffer({label:`S:ReaderBuffer(gridSize=${n})`,size:o.gridData.byteLength,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ,mappedAtCreation:!1})}writeGridDataBuffer(){this.device.queue.writeBuffer(this.gridBuffer,0,this.model.gridData.buffer)}sync(){this.writeGridDataBuffer()}setTolerance(t){this.device.queue.writeBuffer(this.paramsBuffer,0,new Float32Array([t]))}writeRandomSegmentIndicesBuffer(t){const n=new Uint32Array(t);for(let r=0;rMath.floor(255*u)).concat(sr),i=cy(n).map(u=>Math.floor(r*u)),l=r-i.reduce((u,d)=>u+d,0);if(l<0)throw console.error(this.gridSize,n),new Error("The sum of agentTypeShares is over 1.0");const s=l>0?i.concat(l):i;let a=0;o.forEach((u,d)=>{const f=s[d];this.gridData.fill(u,a,a+f),a+=f});for(let u=0;u{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function zk(e){const{children:t,value:n}=e,r=Lk(),o=v.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return C.jsx(nv.Provider,{value:o,children:t})}function rv(){return v.useContext(nv)}function ov(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-P-${t}`}function iv(e,t){const{idPrefix:n}=e;return n===null?null:`${e.idPrefix}-T-${t}`}const Fk=v.forwardRef(function(t,n){const{children:r,...o}=t,i=rv();if(i===null)throw new TypeError("No TabContext provided");const l=v.Children.map(r,s=>v.isValidElement(s)?v.cloneElement(s,{"aria-controls":ov(i,s.props.value),id:iv(i,s.props.value)}):null);return C.jsx(mk,{...o,ref:n,value:i.value,children:l})});function Dk(e){return je("MuiTabPanel",e)}Pe("MuiTabPanel",["root","hidden"]);const Uk=e=>{const{classes:t,hidden:n}=e;return Ak({root:["root",n&&"hidden"]},Dk,t)},jk=ne("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),Mu=v.forwardRef(function(t,n){const r=$h({props:t,name:"MuiTabPanel"}),{children:o,className:i,value:l,keepMounted:s=!1,...a}=r,u={...r},d=Uk(u),f=rv();if(f===null)throw new TypeError("No TabContext provided");const p=ov(f,l),x=iv(f,l);return C.jsx(jk,{"aria-labelledby":x,className:pe(d.root,i),hidden:l!==f.value,id:p,ref:n,role:"tabpanel",ownerState:u,...a,children:(s||l===f.value)&&o})}),Vk=()=>{const[e,t]=Ze.useState("1"),n=(r,o)=>{t(o)};return C.jsx(C.Fragment,{children:C.jsx(zv,{children:C.jsx(zk,{value:e,children:C.jsxs(jt,{sx:{display:"flex"},children:[C.jsx(jt,{sx:{borderBottom:1,borderColor:"divider",width:"20%"},children:C.jsxs(Fk,{onChange:n,"aria-label":"webgpu-react-bitmap-viewport examples",orientation:"vertical",children:[C.jsx(Tu,{label:"Synchronized Viewports of Static Image",value:"1"}),C.jsx(Tu,{label:"Synchronized Viewports of Dynamic Image",value:"2"}),C.jsx(Tu,{label:"Viewport of Multi Agent Simulation",value:"3"})]})}),C.jsxs(Mu,{value:"1",children:[C.jsx("h2",{children:'Synchronized Viewports of Static Image: "The Grate Wave off Kanagawa" from the series Thirty-six Views of Mount Fuji by Hokusai'}),C.jsx(uy,{src:"/webgpu-react-bitmap-viewport/The_Great_Wave_off_Kanagawa.jpg",canvasSizes:[{width:1044,height:726},{width:547,height:363},{width:220,height:220}],headerOffset:{left:20,top:20}})]}),C.jsxs(Mu,{value:"2",children:[C.jsxs("div",{children:[C.jsx("h2",{children:"Synchronized Viewports of Dynamic Image"}),C.jsx("h3",{children:"RGBARandomGrid"}),C.jsx(sy,{canvasSizes:[{width:520,height:520},{width:220,height:420},{width:220,height:120}],headerOffset:{left:20,top:20},numColumns:200,numRows:200,viewportStates:new Float32Array([0,0,200,200,50,50,100,150,0,100,100,150])})]}),C.jsxs("div",{children:[C.jsx("h3",{children:"HueGrid"}),C.jsx(ly,{canvasSizes:[{width:520,height:520},{width:220,height:420},{width:220,height:120}],headerOffset:{left:20,top:20},numColumns:200,numRows:200,viewportStates:new Float32Array([0,0,200,200,50,50,100,150,0,100,100,150])})]})]}),C.jsxs(Mu,{value:"3",children:[C.jsx("h2",{children:"Viewport of Multi Agent Simulation: Schelling's model of segregation"}),C.jsx("div",{style:{display:"flex",columnGap:"16px"},children:[ls.CPU].map((r,o)=>C.jsxs("div",{children:[C.jsx(U0,{children:r}),C.jsx(_k,{id:`schelling-${r}-${o}`,mode:r,gridSize:256,agentTypeShares:[.5,.3,.1],speed:1,tolerance:.5,canvasSize:{width:512,height:512},headerOffset:{left:0,top:0},autoStart:!0})]},o))})]})]})})})})};var lv,Tm=ff;lv=Tm.createRoot,Tm.hydrateRoot;const Gk=lv(document.getElementById("root")),Wk=()=>{Gk.render(C.jsx(Vk,{}))};Wk(); diff --git a/enums/GridShaderMode.html b/enums/GridShaderMode.html index a2b183d..ff10a42 100644 --- a/enums/GridShaderMode.html +++ b/enums/GridShaderMode.html @@ -1,4 +1,4 @@ -GridShaderMode | webgpu-react-bitmap-viewport

Enumeration Members

CUSTOM +GridShaderMode | webgpu-react-bitmap-viewport

Enumeration Members

Enumeration Members

CUSTOM: "CUSTOM"
HUE: "HUE"
RGBA: "RGBA"
+

Enumeration Members

CUSTOM: "CUSTOM"
HUE: "HUE"
RGBA: "RGBA"
diff --git a/enums/ScrollBarStateValues.html b/enums/ScrollBarStateValues.html index 6068fd0..598c662 100644 --- a/enums/ScrollBarStateValues.html +++ b/enums/ScrollBarStateValues.html @@ -1,6 +1,6 @@ -ScrollBarStateValues | webgpu-react-bitmap-viewport

Enumeration ScrollBarStateValuesConst

Enumeration Members

HorizontalFocused +ScrollBarStateValues | webgpu-react-bitmap-viewport

Enumeration ScrollBarStateValuesConst

Enumeration Members

HorizontalFocused: 1
NotFocused: 0
OutOfFrame: 99
VerticalAndHorizontalFocused: 3
VerticalFocused: 2
+

Enumeration Members

HorizontalFocused: 1
NotFocused: 0
OutOfFrame: 99
VerticalAndHorizontalFocused: 3
VerticalFocused: 2
diff --git a/enums/SelectedStateValues.html b/enums/SelectedStateValues.html index 6c6475d..c4d36e9 100644 --- a/enums/SelectedStateValues.html +++ b/enums/SelectedStateValues.html @@ -1,3 +1,3 @@ -SelectedStateValues | webgpu-react-bitmap-viewport

Enumeration SelectedStateValuesConst

Enumeration Members

NotSelected +SelectedStateValues | webgpu-react-bitmap-viewport

Enumeration SelectedStateValuesConst

Enumeration Members

Enumeration Members

NotSelected: 0
Selected: 1
+

Enumeration Members

NotSelected: 0
Selected: 1
diff --git a/examples/index.html b/examples/index.html index b6b5342..a8b0d9f 100644 --- a/examples/index.html +++ b/examples/index.html @@ -6,7 +6,7 @@ - +
diff --git a/functions/Grid.html b/functions/Grid.html index f436f00..4b98460 100644 --- a/functions/Grid.html +++ b/functions/Grid.html @@ -2,7 +2,7 @@

The properties for the Grid component.

A React component that renders a grid.

Properties

Parameters

Returns ReactNode

Properties

$$typeof: symbol
displayName?: string
type: ForwardRefExoticComponent<GridProps & RefAttributes<GridHandles>>
diff --git a/functions/WebGPUDeviceContextProvider.html b/functions/WebGPUDeviceContextProvider.html index 0c32b80..e6fc79d 100644 --- a/functions/WebGPUDeviceContextProvider.html +++ b/functions/WebGPUDeviceContextProvider.html @@ -1 +1 @@ -WebGPUDeviceContextProvider | webgpu-react-bitmap-viewport
  • Parameters

    • __namedParameters: {
          children?: ReactNode;
      }
      • Optionalchildren?: ReactNode

    Returns null | Element

+WebGPUDeviceContextProvider | webgpu-react-bitmap-viewport
  • Parameters

    • __namedParameters: {
          children?: ReactNode;
      }
      • Optionalchildren?: ReactNode

    Returns null | Element

diff --git a/functions/WebGPUDisplayContextProvider.html b/functions/WebGPUDisplayContextProvider.html index ad98fbd..5d8ef07 100644 --- a/functions/WebGPUDisplayContextProvider.html +++ b/functions/WebGPUDisplayContextProvider.html @@ -1 +1 @@ -WebGPUDisplayContextProvider | webgpu-react-bitmap-viewport
+WebGPUDisplayContextProvider | webgpu-react-bitmap-viewport
diff --git a/functions/useWebGPUDeviceContext.html b/functions/useWebGPUDeviceContext.html index f17fd06..a6f5c1b 100644 --- a/functions/useWebGPUDeviceContext.html +++ b/functions/useWebGPUDeviceContext.html @@ -1 +1 @@ -useWebGPUDeviceContext | webgpu-react-bitmap-viewport
+useWebGPUDeviceContext | webgpu-react-bitmap-viewport
diff --git a/functions/useWebGPUDisplayContext.html b/functions/useWebGPUDisplayContext.html index 21fafa2..3f27c7b 100644 --- a/functions/useWebGPUDisplayContext.html +++ b/functions/useWebGPUDisplayContext.html @@ -1 +1 @@ -useWebGPUDisplayContext | webgpu-react-bitmap-viewport
+useWebGPUDisplayContext | webgpu-react-bitmap-viewport
diff --git a/types/GridHandles.html b/types/GridHandles.html index d9fa587..55e9eaf 100644 --- a/types/GridHandles.html +++ b/types/GridHandles.html @@ -1 +1 @@ -GridHandles | webgpu-react-bitmap-viewport
GridHandles: {
    refreshData: ((sourceIndex: number) => void);
    refreshFocusedState: ((sourceIndex: number, columnIndex: number, rowIndex: number) => void);
    refreshSelectedState: ((sourceIndex: number, columnIndex: number, rowIndex: number) => void);
    refreshViewportState: ((sourceIndex: number) => void);
}
+GridHandles | webgpu-react-bitmap-viewport
GridHandles: {
    refreshData: ((sourceIndex: number) => void);
    refreshFocusedState: ((sourceIndex: number, columnIndex: number, rowIndex: number) => void);
    refreshSelectedState: ((sourceIndex: number, columnIndex: number, rowIndex: number) => void);
    refreshViewportState: ((sourceIndex: number) => void);
}
diff --git a/types/GridProps.html b/types/GridProps.html index efa478e..25f6a10 100644 --- a/types/GridProps.html +++ b/types/GridProps.html @@ -21,4 +21,4 @@
  • selectedStates: Uint32Array

    The selected states of the grid, stored in a Uint32Array: notSelected=0, verticalSelected=1, horizontalSelected=2, verticalAndHorizontalSelected=3

  • viewportIndex: number

    The ID of the canvas element.

  • viewportStates: Float32Array

    The set of viewport left,top,right,bottom values for the grid in a Float32Array.

    -
  • +
    diff --git a/variables/EMPTY_VALUE.html b/variables/EMPTY_VALUE.html index 33ac444..7026d6a 100644 --- a/variables/EMPTY_VALUE.html +++ b/variables/EMPTY_VALUE.html @@ -1 +1 @@ -EMPTY_VALUE | webgpu-react-bitmap-viewport
    EMPTY_VALUE: 99999 = 99999
    +EMPTY_VALUE | webgpu-react-bitmap-viewport
    EMPTY_VALUE: 99999 = 99999
    diff --git a/variables/WebGPUDeviceContext.html b/variables/WebGPUDeviceContext.html index b1cbe41..5476a0a 100644 --- a/variables/WebGPUDeviceContext.html +++ b/variables/WebGPUDeviceContext.html @@ -1 +1 @@ -WebGPUDeviceContext | webgpu-react-bitmap-viewport

    Variable WebGPUDeviceContextConst

    WebGPUDeviceContext: Context<WebGPUDeviceContextType> = ...
    +WebGPUDeviceContext | webgpu-react-bitmap-viewport

    Variable WebGPUDeviceContextConst

    WebGPUDeviceContext: Context<WebGPUDeviceContextType> = ...
    diff --git a/variables/WebGPUDisplayContext.html b/variables/WebGPUDisplayContext.html index c64ae67..ead410b 100644 --- a/variables/WebGPUDisplayContext.html +++ b/variables/WebGPUDisplayContext.html @@ -1 +1 @@ -WebGPUDisplayContext | webgpu-react-bitmap-viewport

    Variable WebGPUDisplayContextConst

    WebGPUDisplayContext: Context<null | WebGPUDisplayContextType> = ...
    +WebGPUDisplayContext | webgpu-react-bitmap-viewport

    Variable WebGPUDisplayContextConst

    WebGPUDisplayContext: Context<null | WebGPUDisplayContextType> = ...