@aistrike-dev/ui-shell-dev 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +0,0 @@
1
- import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,G as d,H as f,I as p,J as m,K as h,L as g,M as _,N as v,O as y,Ot as b,P as x,Q as S,R as C,S as w,St as T,T as E,Tt as D,U as ee,V as O,W as k,X as A,Y as te,Z as j,_ as M,_t as N,a as P,at as F,b as I,bt as ne,c as re,ct as ie,d as L,dt as R,et as z,f as ae,ft as oe,g as se,gt as B,h as ce,ht as V,i as le,it as ue,j as H,jt as U,k as de,kt as W,l as fe,lt as pe,m as me,mt as G,n as he,nt as ge,o as _e,ot as ve,p as K,pt as ye,q,r as J,rt as be,s as xe,st as Se,t as Ce,tt as we,u as Te,ut as Ee,v as De,vt as Oe,w as ke,wt as Ae,x as je,xt as Me,y as Ne,yt as Pe,z as Fe}from"./index-ocy7db1a.js";function Ie(e){return R(`MuiCheckbox`,e)}var Le=Ee(`MuiCheckbox`,[`root`,`checked`,`disabled`,`indeterminate`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`]);function Re(e){return R(`MuiFormControlLabel`,e)}var ze=Ee(`MuiFormControlLabel`,[`root`,`labelPlacementStart`,`labelPlacementEnd`,`labelPlacementTop`,`labelPlacementBottom`,`disabled`,`label`,`error`,`required`,`asterisk`]);function Be(e){return R(`MuiSlider`,e)}var Y=Ee(`MuiSlider`,`root.active.colorPrimary.colorSecondary.colorError.colorInfo.colorSuccess.colorWarning.disabled.dragging.focusVisible.mark.markActive.marked.markLabel.markLabelActive.rail.sizeSmall.thumb.track.trackInverted.trackFalse.valueLabel.valueLabelOpen.valueLabelCircle.valueLabelLabel.vertical`.split(`.`));function Ve(e){return R(`MuiToggleButton`,e)}var He=Ee(`MuiToggleButton`,[`root`,`disabled`,`selected`,`standard`,`primary`,`secondary`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`fullWidth`]);function Ue(e){return R(`PrivateSwitchBase`,e)}Ee(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var X=U(B(),1),Z=Oe(),We=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e,a={root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${N(i)}`],input:[`input`]};return G(a,Ue,t)},Ge=z(c,{name:`MuiSwitchBase`})({padding:9,borderRadius:`50%`,variants:[{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e===`start`&&t.size!==`small`,style:{marginLeft:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e===`end`&&t.size!==`small`,style:{marginRight:-12}}]}),Ke=z(`input`,{name:`MuiSwitchBase`,shouldForwardProp:we})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),qe=X.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:a,disabled:o,disableFocusRipple:s=!1,edge:c=!1,icon:l,id:u,name:d,onBlur:p,onChange:m,onFocus:h,readOnly:g,required:_=!1,tabIndex:v,type:y,value:b,slots:x={},slotProps:S={},...C}=e,{nativeButton:T,...E}=C,[D,ee]=f({controlled:r,default:!!a,name:`SwitchBase`,state:`checked`}),O=H(),k=e=>{h&&h(e),O&&O.onFocus&&O.onFocus(e)},A=e=>{p&&p(e),O&&O.onBlur&&O.onBlur(e)},te=e=>{if(e.nativeEvent.defaultPrevented||g)return;let t=e.target.checked;ee(t),m&&m(e,t)},j=o;O&&j===void 0&&(j=O.disabled);let M=y===`checkbox`||y===`radio`,N={...e,checked:D,disabled:j,disableFocusRipple:s,edge:c},P=We(N),F={slots:x,slotProps:S},[I,ne]=w(`root`,{ref:t,elementType:Ge,className:P.root,shouldForwardComponentProp:!0,externalForwardedProps:{...F,component:`span`,...E},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),k(t)},onBlur:t=>{e.onBlur?.(t),A(t)}}),ownerState:N,additionalProps:{centerRipple:!0,focusRipple:!s,role:void 0,tabIndex:null,internalDisabledThemeFocusVisible:!0}}),[re,ie]=w(`input`,{elementType:Ke,className:P.input,externalForwardedProps:F,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),te(t)}}),ownerState:N,additionalProps:{autoFocus:n,checked:r,defaultChecked:a,disabled:j,id:M?u:void 0,name:d,readOnly:g,required:_,tabIndex:v,type:y,...y===`checkbox`&&b===void 0?{}:{value:b}}});return(0,Z.jsxs)(I,{...ne,children:[(0,Z.jsx)(re,{...ie}),D?i:l]})}),Je=A((0,Z.jsx)(`path`,{d:`M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z`}),`CheckBoxOutlineBlank`),Ye=A((0,Z.jsx)(`path`,{d:`M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z`}),`CheckBox`),Xe=A((0,Z.jsx)(`path`,{d:`M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z`}),`IndeterminateCheckBox`),Ze=e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,a={root:[`root`,n&&`indeterminate`,`color${N(r)}`,`size${N(i)}`]},o=G(a,Ie,t);return{...t,...o}},Qe=z(qe,{shouldForwardProp:e=>we(e)||e===`classes`,name:`MuiCheckbox`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${N(n.size)}`],n.color!=="default"&&t[`color${N(n.color)}`]]}})(e(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.focusVisible&&{[`&.${o.focusVisible} svg:first-of-type`]:{...F,borderRadius:(e.vars||e).shape.borderRadius,...e.focusVisible}},variants:[{props:{color:`default`,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(E()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(E()).map(([t])=>({props:{color:t},style:{[`&.${Le.checked}, &.${Le.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Le.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),$e=(0,Z.jsx)(Ye,{}),et=(0,Z.jsx)(Je,{}),tt=(0,Z.jsx)(Xe,{}),nt=X.forwardRef(function(e,t){let n=S({props:e,name:`MuiCheckbox`}),{checkedIcon:r=$e,color:i=`primary`,icon:a=et,indeterminate:o=!1,indeterminateIcon:s=tt,size:c=`medium`,disableRipple:l=!1,className:u,slots:d={},slotProps:f={},...p}=n,m=o?s:a,h=o?s:r,_={...n,disableRipple:l,color:i,indeterminate:o,size:c},v=Ze(_),y=f.input,[b,x]=w(`root`,{ref:t,elementType:Qe,className:V(v.root,u),shouldForwardComponentProp:!0,externalForwardedProps:{slots:d,slotProps:f,...p},ownerState:_,additionalProps:{type:`checkbox`,icon:X.cloneElement(m,{fontSize:m.props.fontSize??c}),checkedIcon:X.cloneElement(h,{fontSize:h.props.fontSize??c}),disableRipple:n.disableRipple,slots:d,slotProps:{input:g(typeof y==`function`?y(_):y,{"data-indeterminate":o,"aria-checked":o?`mixed`:void 0})}}});return(0,Z.jsx)(b,{...x,classes:v})});function rt(e){return R(`MuiSwitch`,e)}var Q=Ee(`MuiSwitch`,[`root`,`edgeStart`,`edgeEnd`,`switchBase`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`,`checked`,`disabled`,`input`,`thumb`,`track`]),it=e=>{let{classes:t,edge:n,size:r,color:i,checked:a,disabled:o}=e,s={root:[`root`,n&&`edge${N(n)}`,`size${N(r)}`],switchBase:[`switchBase`,`color${N(i)}`,a&&`checked`,o&&`disabled`],thumb:[`thumb`],track:[`track`],input:[`input`]},c=G(s,rt,t);return{...t,...c}},at=z(`span`,{name:`MuiSwitch`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.edge&&t[`edge${N(n.edge)}`],t[`size${N(n.size)}`]]}})({display:`inline-flex`,width:58,height:38,overflow:`hidden`,padding:12,boxSizing:`border-box`,position:`relative`,flexShrink:0,zIndex:0,verticalAlign:`middle`,"@media print":{colorAdjust:`exact`},variants:[{props:{edge:`start`},style:{marginLeft:-8}},{props:{edge:`end`},style:{marginRight:-8}},{props:{size:`small`},style:{width:40,height:24,padding:7,[`& .${Q.thumb}`]:{width:16,height:16},[`& .${Q.switchBase}`]:{padding:4,[`&.${Q.checked}`]:{transform:`translateX(16px)`}}}}]}),ot=z(qe,{name:`MuiSwitch`,slot:`SwitchBase`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.switchBase,{[`& .${Q.input}`]:t.input},n.color!=="default"&&t[`color${N(n.color)}`]]}})(e(({theme:e})=>({position:`absolute`,top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode===`light`?e.palette.common.white:e.palette.grey[300]}`,...j(e,[`left`,`transform`],{duration:e.transitions.duration.shortest}),[`&.${Q.checked}`]:{transform:`translateX(20px)`},[`&.${Q.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode===`light`?e.palette.grey[100]:e.palette.grey[600]}`},...e.focusVisible?{[`&.${o.focusVisible} ~ .${Q.track}`]:{...F,...e.focusVisible},[`&.${Q.checked} + .${Q.track}`]:{backgroundColor:e.alpha(e.vars?e.vars.palette.common.onBackground:`${e.palette.mode===`light`?e.palette.common.black:e.palette.common.white}`,.5)},[`&.${Q.disabled} + .${Q.track}`]:{backgroundColor:e.alpha(e.vars?e.vars.palette.common.onBackground:`${e.palette.mode===`light`?e.palette.common.black:e.palette.common.white}`,e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode===`light`?.12:.2}`)}}:{[`&.${Q.checked} + .${Q.track}`]:{opacity:.5},[`&.${Q.disabled} + .${Q.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode===`light`?.12:.2}`}},[`& .${Q.input}`]:{left:`-100%`,width:`300%`}})),e(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[...Object.entries(e.palette).filter(E([`light`])).map(([t])=>({props:{color:t},style:{[`&.${Q.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${Q.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${Q.checked} + .${Q.track}`]:{backgroundColor:(e.vars||e).palette[t].main},...e.focusVisible&&{[`&.${Q.checked} + .${Q.track}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,.5)},[`&.${Q.disabled} + .${Q.track}`]:{backgroundColor:e.alpha(e.vars?e.vars.palette.common.onBackground:`${e.palette.mode===`light`?e.palette.common.black:e.palette.common.white}`,e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode===`light`?.12:.2}`)},[`&.${Q.checked}.${Q.disabled} + .${Q.track}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode===`light`?.12:.2}`)}}}}))]}))),st=z(`span`,{name:`MuiSwitch`,slot:`Track`})(e(({theme:e})=>({height:`100%`,width:`100%`,borderRadius:7,zIndex:-1,...j(e,[`opacity`,`background-color`],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{boxSizing:`border-box`,border:`1px solid ButtonBorder`},...e.focusVisible?{backgroundColor:e.alpha(e.vars?e.vars.palette.common.onBackground:`${e.palette.mode===`light`?e.palette.common.black:e.palette.common.white}`,e.vars?e.vars.opacity.switchTrack:`${e.palette.mode===`light`?.38:.3}`)}:{backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode===`light`?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode===`light`?.38:.3}`}}))),ct=z(`span`,{name:`MuiSwitch`,slot:`Thumb`})(e(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:`currentColor`,boxSizing:`border-box`,border:`1px solid transparent`,width:20,height:20,borderRadius:`50%`}))),lt=X.forwardRef(function(e,t){let n=S({props:e,name:`MuiSwitch`}),{className:r,color:i=`primary`,edge:a=!1,size:o=`medium`,sx:s,slots:c={},slotProps:l={},...u}=n,d={...n,color:i,edge:a,size:o},f=it(d),p=l.input,m={slots:c,slotProps:l},[h,_]=w(`root`,{className:V(f.root,r),elementType:at,externalForwardedProps:m,ownerState:d,additionalProps:{sx:s}}),[v,y]=w(`thumb`,{className:f.thumb,elementType:ct,externalForwardedProps:m,ownerState:d}),b=(0,Z.jsx)(v,{...y}),[x,C]=w(`track`,{className:f.track,elementType:st,externalForwardedProps:m,ownerState:d});return(0,Z.jsxs)(h,{..._,children:[(0,Z.jsx)(ot,{type:`checkbox`,icon:b,checkedIcon:b,ref:t,ownerState:d,...u,classes:{...f,root:f.switchBase},slots:{...c.switchBase&&{root:c.switchBase},...c.input&&{input:c.input}},slotProps:{...l.switchBase&&{root:typeof l.switchBase==`function`?l.switchBase(d):l.switchBase},input:g(typeof p==`function`?p(d):p,{role:`switch`})}}),(0,Z.jsx)(x,{...C})]})}),ut={border:0,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};function dt(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var ft=2,pt=[],mt={};function ht(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function gt(e,t){return e-t}function _t(e,t,n=-1){let{index:r}=e.reduce((e,n,r)=>{let i=Math.abs(t-n);return e==null||i<=e.distance?{distance:i,index:r}:e},null)??mt;return r==null?r:n>=0&&e[n]===e[r]?n:r}function vt(e,t){if(t.current!=null&&e.changedTouches){let n=e;for(let e=0;e<n.changedTouches.length;e+=1){let r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function yt(e,t,n){return(e-t)*100/(n-t)}function bt(e,t,n){return(n-t)*e+t}function xt(e){if(Math.abs(e)<1){let t=e.toExponential().split(`e-`),n=t[0].split(`.`)[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(`.`)[1];return t?t.length:0}function St(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(xt(t)))}function Ct(e,t,n){let r=e.slice();return r[n]=t,r.sort(gt)}function wt(e,t,n,r){let i=q(e.current),a=m(i);if(!se(e.current,a)||Number(a?.getAttribute(`data-index`))!==t){let n=e.current?.querySelector(`[type="range"][data-index="${t}"]`);n!=null&&(r==null?n.focus({preventScroll:!0}):n.focus({preventScroll:!0,focusVisible:r}))}n&&n(t)}function Tt(e,t){return typeof e==`number`&&typeof t==`number`?e===t:typeof e==`object`&&typeof t==`object`&&dt(e,t)}var Et={horizontal:{offset:e=>({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}%`})}},Dt=e=>e;function Ot(e){let{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:a=!1,isRtl:o=!1,marks:s=!1,max:c=100,min:l=0,name:u,onChange:d,onChangeCommitted:f,orientation:p=`horizontal`,rootRef:h,scale:g=Dt,step:_=1,shiftStep:v=10,tabIndex:y,value:b}=e,x=X.useRef(void 0),S=X.useRef(null),[C,w]=X.useState(-1),[T,E]=X.useState(-1),[D,k]=X.useState(!1),A=X.useRef(0),te=X.useRef(-1),j=X.useRef(!1),M=X.useRef(-1),N=O(()=>{S.current!=null&&(cancelAnimationFrame(S.current),S.current=null)}),P=X.useRef(null),[F,I]=ee({controlled:b,default:n??l,name:`Slider`}),ne=O((e,t,n)=>{let r=`nativeEvent`in e?e.nativeEvent:e,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:u}}),P.current=t,d?.(i,t,n)}),re=Array.isArray(F),L=X.useMemo(()=>{if(typeof F==`number`)return[Se(F,l,c)];if(F==null)return[l];let e=F.slice().sort(gt);for(let t=0;t<e.length;t+=1){let n=e[t];e[t]=n==null?l:Se(n,l,c)}return e},[F,l,c]),R=X.useMemo(()=>{if(s===!0&&_!=null){let e=Array(Math.floor((c-l)/_)+1);for(let t=0;t<e.length;t+=1)e[t]={value:l+_*t};return e}return Array.isArray(s)?s:pt},[s,_,l,c]),z=X.useMemo(()=>{let e=Array(R.length);for(let t=0;t<R.length;t+=1)e[t]=R[t].value;return e},[R]),[ae,oe]=X.useState(-1),B=X.useRef(null),ce=Fe(h,B),V=e=>t=>{let n=Number(t.currentTarget.getAttribute(`data-index`));de(t.target)&&oe(n),E(n),e?.onFocus?.(t)},le=e=>t=>{de(t.target)||oe(-1),E(-1),e?.onBlur?.(t)},ue=(e,t)=>{let n=Number(e.currentTarget.getAttribute(`data-index`)),r=L[n],i=z.indexOf(r),o=t;if(R&&_==null){let e=z[z.length-1];o=o>=e?e:o<=z[0]?z[0]:o<r?z[i-1]:z[i+1]}if(o=Se(o,l,c),re){a&&(o=Se(o,L[n-1]||-1/0,L[n+1]||1/0));let e=o;o=Ct(L,o,n);let t=n;a||(t=o.indexOf(e)),wt(B,t)}I(o),oe(n),d&&!Tt(o,F)&&ne(e,o,n),f&&f(e,P.current??o)},H=e=>t=>{if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`].includes(t.key)){t.preventDefault();let e=Number(t.currentTarget.getAttribute(`data-index`)),n=L[e],r=null;if(_!=null){let e=t.shiftKey?v:_;switch(t.key){case`ArrowUp`:r=ht(n,e,1,l,c);break;case`ArrowRight`:r=ht(n,e,o?-1:1,l,c);break;case`ArrowDown`:r=ht(n,e,-1,l,c);break;case`ArrowLeft`:r=ht(n,e,o?1:-1,l,c);break;case`PageUp`:r=ht(n,v,1,l,c);break;case`PageDown`:r=ht(n,v,-1,l,c);break;case`Home`:r=l;break;case`End`:r=c}}else if(R){let e=z[z.length-1],i=z.indexOf(n),a=[o?`ArrowRight`:`ArrowLeft`,`ArrowDown`,`PageDown`,`Home`],s=[o?`ArrowLeft`:`ArrowRight`,`ArrowUp`,`PageUp`,`End`];a.includes(t.key)?r=i===0?z[0]:z[i-1]:s.includes(t.key)&&(r=i===z.length-1?e:z[i+1])}r!=null&&ue(t,r)}e?.onKeyDown?.(t)};ie(()=>{let e=m(q(B.current));r&&se(B.current,e)&&e!=null&&`blur`in e&&e.blur()},[r]),r&&C!==-1&&w(-1),r&&ae!==-1&&oe(-1);let U=e=>t=>{e.onChange?.(t),ue(t,t.currentTarget.valueAsNumber)},W=X.useRef(void 0),fe=p;o&&p===`horizontal`&&(fe+=`-reverse`);let pe=e=>{let{current:t}=B;if(!t)return null;let{width:n,height:r,bottom:i,left:o}=t.getBoundingClientRect(),s;s=fe.startsWith(`vertical`)?(i-e.y)/r:(e.x-o)/n,fe.includes(`-reverse`)&&(s=1-s);let u;if(u=bt(s,l,c),_)u=St(u,_,l);else{let e=_t(z,u);u=z[e]}u=Se(u,l,c);let d=0;if(re){let e=W.current!==-1;d=e?W.current:_t(L,u,te.current),a&&(u=Se(u,L[d-1]||-1/0,L[d+1]||1/0));let t=u;u=Ct(L,u,d),a&&e||(d=u.indexOf(t),W.current=d)}return{newValue:u,activeIndex:d}},me=O(e=>{if(`pointerId`in e&&e.pointerId!==M.current)return;let t=vt(e,x);if(!t)return;if(A.current+=1,e.type===`pointermove`&&e.buttons===0){G(e);return}let n=pe(t);n&&(wt(B,n.activeIndex,w,!1),te.current=n.activeIndex,I(n.newValue),!D&&A.current>ft&&k(!0),d&&!Tt(n.newValue,F)&&ne(e,n.newValue,n.activeIndex))}),G=O(e=>{if(`pointerId`in e&&e.pointerId!==M.current)return;let t=vt(e,x);if(k(!1),!t)return;let n=pe(t);w(-1),e.type===`touchend`&&E(-1),n&&f&&f(e,P.current??n.newValue),`pointerType`in e&&B.current?.hasPointerCapture(e.pointerId)&&B.current.releasePointerCapture(e.pointerId),x.current=void 0,M.current=-1,ge()}),he=O(e=>{if(r)return;if(j.current){j.current=!1;let t=e.changedTouches[0];t!=null&&(x.current=t.identifier);return}let t=e.changedTouches[0];t!=null&&(x.current=t.identifier);let n=vt(e,x);if(n!==!1){W.current=-1;let t=pe(n);t&&(wt(B,t.activeIndex,w,!1),te.current=t.activeIndex,I(t.newValue),d&&!Tt(t.newValue,F)&&ne(e,t.newValue,t.activeIndex))}A.current=0;let i=q(B.current);i.addEventListener(`touchmove`,me,{passive:!0}),i.addEventListener(`touchend`,G,{passive:!0})}),ge=X.useCallback(()=>{let e=q(B.current);e.removeEventListener(`pointermove`,me),e.removeEventListener(`pointerup`,G),e.removeEventListener(`touchmove`,me),e.removeEventListener(`touchend`,G)},[G,me]);X.useEffect(()=>{let e=B.current;if(e)return e.addEventListener(`touchstart`,he,{passive:!0}),()=>{e.removeEventListener(`touchstart`,he),N(),ge()}},[ge,he,N]),X.useEffect(()=>{r&&(ge(),N())},[r,ge,N]);let _e=e=>t=>{if(e.onPointerDown?.(t),t.pointerType===`touch`&&(j.current=!0),r||t.defaultPrevented||t.button!==0)return;let n=vt(t,x);if(n!==!1){W.current=-1;let e=pe(n);if(e){let n=B.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),r=q(B.current),i=n!=null&&n===m(r);w(e.activeIndex),te.current=e.activeIndex,i?t.preventDefault():(N(),S.current=requestAnimationFrame(()=>{S.current=null,wt(B,e.activeIndex,void 0,!1)})),I(e.newValue),d&&!Tt(e.newValue,F)&&ne(t,e.newValue,e.activeIndex)}}A.current=0,M.current=t.pointerId;let i=q(B.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}i.addEventListener(`pointermove`,me,{passive:!0}),i.addEventListener(`pointerup`,G)},ve=yt(re?L[0]:l,l,c),K=yt(L[L.length-1],l,c)-ve,ye=(e=mt)=>{let t=i(e),n={onPointerDown:_e(t)},r={...t,...n};return{...e,ref:ce,...r}},J=e=>t=>{e.onMouseOver?.(t);let n=Number(t.currentTarget.getAttribute(`data-index`));E(n)},be=e=>t=>{e.onMouseLeave?.(t),E(-1)},xe=(e=mt)=>{let t=i(e),n={onMouseOver:J(t),onMouseLeave:be(t)};return{...e,...t,...n}},Ce=e=>{let t;return re?C===e?t=2:te.current===e&&(t=1):C===e&&(t=1),{pointerEvents:C!==-1&&C!==e?`none`:void 0,zIndex:t}},we;return p===`vertical`&&(we=o?`vertical-rl`:`vertical-lr`),{active:C,axis:fe,axisProps:Et,dragging:D,focusedThumbIndex:ae,getHiddenInputProps:(n=mt)=>{let a=i(n),s={onChange:U(a),onFocus:V(a),onBlur:le(a),onKeyDown:H(a)},d={...a,...s};return{tabIndex:y,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":g(c),"aria-valuemin":g(l),name:u,type:`range`,min:e.min,max:e.max,step:e.step===null&&e.marks?`any`:e.step??void 0,disabled:r,...n,...d,style:{...ut,direction:o?`rtl`:`ltr`,width:`100%`,height:`100%`,writingMode:we}}},getRootProps:ye,getThumbProps:xe,marks:R,open:T,range:re,rootRef:ce,trackLeap:K,trackOffset:ve,values:L,getThumbStyle:Ce}}var kt=e=>{let{open:t}=e;return{offset:V(t&&Y.valueLabelOpen),circle:Y.valueLabelCircle,label:Y.valueLabelLabel}};function At(e){let{children:t,className:n,value:r}=e,i=kt(e);return t?X.cloneElement(t,{className:t.props.className},(0,Z.jsxs)(X.Fragment,{children:[t.props.children,(0,Z.jsx)(`span`,{className:V(i.offset,n),"aria-hidden":!0,children:(0,Z.jsx)(`span`,{className:i.circle,children:(0,Z.jsx)(`span`,{className:i.label,children:r})})})]})):null}function jt(e){return e}var Mt=z(`span`,{name:`MuiSlider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${N(n.color)}`],n.size!==`medium`&&t[`size${N(n.size)}`],n.marked&&t.marked,n.orientation===`vertical`&&t.vertical,n.track===`inverted`&&t.trackInverted,n.track===!1&&t.trackFalse]}})(e(({theme:e})=>({borderRadius:12,boxSizing:`content-box`,display:`inline-block`,position:`relative`,cursor:`pointer`,touchAction:`none`,WebkitTapHighlightColor:`transparent`,"@media print":{colorAdjust:`exact`},[`&.${Y.disabled}`]:{pointerEvents:`none`,cursor:`default`,color:(e.vars||e).palette.grey[400]},[`&.${Y.dragging}`]:{[`& .${Y.thumb}, & .${Y.track}`]:{transition:`none`}},variants:[...Object.entries(e.palette).filter(E()).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}}]}))),Nt=z(`span`,{name:`MuiSlider`,slot:`Rail`})({display:`block`,position:`absolute`,borderRadius:`inherit`,backgroundColor:`currentColor`,opacity:.38,"@media (forced-colors: active)":{border:`1px solid transparent`,boxSizing:`border-box`},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}}]}),Pt=z(`span`,{name:`MuiSlider`,slot:`Track`})(e(({theme:e})=>({display:`block`,position:`absolute`,borderRadius:`inherit`,border:`1px solid currentColor`,backgroundColor:`currentColor`,...j(e,[`left`,`width`,`bottom`,`height`],{duration:e.transitions.duration.shortest}),variants:[{props:{size:`small`},style:{"@media (forced-colors: none)":{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(E()).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:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles(`dark`,{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles(`dark`,{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),Ft=z(`span`,{name:`MuiSlider`,slot:`Thumb`})(e(({theme:e})=>({position:`absolute`,width:20,height:20,boxSizing:`border-box`,borderRadius:`50%`,outline:0,backgroundColor:`currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,...j(e,[`box-shadow`,`left`,`bottom`],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{border:`1px solid ButtonBorder`},"&::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%)`},[`&.${Y.disabled}`]:{"&:hover":{boxShadow:`none`}},...e.focusVisible&&{[`&.${Y.focusVisible}`]:{...F,...e.focusVisible}},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(E()).map(([t])=>({props:{color:t},style:{"&:hover":{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}},...!e.focusVisible&&{[`&.${Y.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}}},[`&.${Y.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),It=z(At,{name:`MuiSlider`,slot:`ValueLabel`})(e(({theme:e})=>({zIndex:1,whiteSpace:`nowrap`,...e.typography.body2,fontWeight:500,...j(e,[`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%`},[`&.${Y.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%`},[`&.${Y.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`}}]}))),Lt=z(`span`,{name:`MuiSlider`,slot:`Mark`,shouldForwardProp:e=>ge(e)&&e!==`markActive`,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(e(({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}}]}))),Rt=z(`span`,{name:`MuiSlider`,slot:`MarkLabel`,shouldForwardProp:e=>ge(e)&&e!==`markLabelActive`})(e(({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}}]}))),zt=e=>{let{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:c}=e,l={root:[`root`,t&&`disabled`,n&&`dragging`,r&&`marked`,i===`vertical`&&`vertical`,a===`inverted`&&`trackInverted`,a===!1&&`trackFalse`,s&&`color${N(s)}`,c&&`size${N(c)}`],rail:[`rail`],track:[`track`],mark:[`mark`],markActive:[`markActive`],markLabel:[`markLabel`],markLabelActive:[`markLabelActive`],valueLabel:[`valueLabel`],thumb:[`thumb`,t&&`disabled`],active:[`active`],disabled:[`disabled`],focusVisible:[`focusVisible`]};return G(l,Be,o)},Bt=({children:e})=>e,Vt=X.forwardRef(function(e,t){let n=S({props:e,name:`MuiSlider`}),r=ve(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":o,color:s=`primary`,classes:c,className:l,disableSwap:u=!1,disabled:d=!1,getAriaLabel:f,getAriaValueText:p,marks:m=!1,max:h=100,min:g=0,name:_,onChange:y,onChangeCommitted:b,orientation:x=`horizontal`,shiftStep:C=10,size:T=`medium`,step:E=1,scale:D=jt,slotProps:ee={},slots:O={},tabIndex:k,track:A=`normal`,value:te,valueLabelDisplay:j=`off`,valueLabelFormat:M=jt,...N}=n,P={...n,isRtl:r,max:h,min:g,classes:c,disabled:d,disableSwap:u,orientation:x,marks:m,color:s,size:T,step:E,shiftStep:C,scale:D,track:A,valueLabelDisplay:j,valueLabelFormat:M},{axisProps:F,getRootProps:I,getHiddenInputProps:ne,getThumbProps:re,open:ie,active:L,axis:R,focusedThumbIndex:z,range:ae,dragging:oe,marks:se,values:B,trackOffset:ce,trackLeap:le,getThumbStyle:ue}=Ot({...P,rootRef:t});P.marked=se.length>0&&se.some(e=>e.label),P.dragging=oe,P.focusedThumbIndex=z;let H=zt(P),U={slots:O,slotProps:ee},[de,W]=w(`root`,{elementType:Mt,getSlotProps:I,externalForwardedProps:{...U,...N},ownerState:P,className:[H.root,l]}),[fe,pe]=w(`rail`,{elementType:Nt,externalForwardedProps:U,ownerState:P,className:H.rail}),[me,G]=w(`track`,{elementType:Pt,externalForwardedProps:U,additionalProps:{style:{...F[R].offset(ce),...F[R].leap(le)}},ownerState:P,className:H.track}),[he,ge]=w(`thumb`,{elementType:Ft,getSlotProps:re,externalForwardedProps:U,ownerState:P,className:H.thumb}),[_e,K]=w(`valueLabel`,{elementType:It,externalForwardedProps:U,ownerState:P,className:H.valueLabel}),[ye,q]=w(`mark`,{elementType:Lt,externalForwardedProps:U,ownerState:P,className:H.mark}),[J,be]=w(`markLabel`,{elementType:Rt,externalForwardedProps:U,ownerState:P,className:H.markLabel}),[xe,Se]=w(`input`,{elementType:`input`,getSlotProps:ne,externalForwardedProps:U,ownerState:P});return(0,Z.jsxs)(de,{...W,children:[(0,Z.jsx)(fe,{...pe}),(0,Z.jsx)(me,{...G}),se.filter(e=>e.value>=g&&e.value<=h).map((e,t)=>{let n=yt(e.value,g,h),r=F[R].offset(n),i;return i=A===!1?B.includes(e.value):A===`normal`&&(ae?e.value>=B[0]&&e.value<=B[B.length-1]:e.value<=B[0])||A===`inverted`&&(ae?e.value<=B[0]||e.value>=B[B.length-1]:e.value>=B[0]),(0,Z.jsxs)(X.Fragment,{children:[(0,Z.jsx)(ye,{"data-index":t,...q,...!v(ye)&&{markActive:i},style:{...r,...q.style},className:V(q.className,i&&H.markActive)}),e.label==null?null:(0,Z.jsx)(J,{"aria-hidden":!0,"data-index":t,...be,...!v(J)&&{markLabelActive:i},style:{...r,...be.style},className:V(H.markLabel,be.className,i&&H.markLabelActive),children:e.label})]},t)}),B.map((e,t)=>{let n=yt(e,g,h),r=F[R].offset(n),s=j===`off`?Bt:_e;return(0,Z.jsx)(s,{...!v(s)&&{valueLabelFormat:M,valueLabelDisplay:j,value:typeof M==`function`?M(D(e),t):M,index:t,open:ie===t||L===t||j===`on`,disabled:d},...K,children:(0,Z.jsx)(he,{"data-index":t,...ge,className:V(H.thumb,ge.className,L===t&&H.active,z===t&&H.focusVisible),style:{...r,...ue(t),...ge.style},children:(0,Z.jsx)(xe,{"data-index":t,"aria-label":f?f(t):i,"aria-valuenow":D(e),"aria-labelledby":o,"aria-valuetext":p?p(D(e),t):a,value:B[t],...Se})})},t)})]})}),Ht=X.createContext({}),Ut=X.createContext(void 0);function Wt(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}function Gt(e,t){let{children:n,disabled:r=!1,selected:i=!1,value:a}=e,o=I(),s=M({id:a,ref:t,disabled:r,selected:i}),c=o.getItemMap().size===0&&i?0:s.tabIndex;return X.cloneElement(X.Children.only(n),{...s,tabIndex:n.props.tabIndex??c})}var Kt=X.forwardRef(Gt),qt=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e,s={root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${N(a)}`,o]};return G(s,Ve,t)},Jt=z(c,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${N(n.size)}`]]}})(e(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${He.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:`none`,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[{props:{color:`standard`},style:{[`&.${He.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(E()).map(([t])=>({props:{color:t},style:{[`&.${He.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Yt=X.forwardRef(function(e,t){let{value:n,isRovingTabIndex:r,...i}=X.useContext(Ht),a=X.useContext(Ut),o=pe({...i,selected:Wt(e.value,n)},e),s=S({props:o,name:`MuiToggleButton`}),{children:c,className:l,color:u=`standard`,disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:m,onClick:h,selected:g,size:_=`medium`,value:v,...y}=s,b={...s,color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:_},x=qt(b),C=e=>{h&&(h(e,v),e.defaultPrevented)||m&&m(e,v)},w=a||``,T=(0,Z.jsx)(Jt,{className:V(i.className,x.root,l,w),internalNativeButton:!0,disabled:d,focusRipple:!f,ref:r?void 0:t,onClick:C,onChange:m,value:v,ownerState:b,"aria-pressed":g,...y,children:c});return r?(0,Z.jsx)(Kt,{disabled:d,selected:g,ref:t,value:v,children:T}):T});function Xt(e){return X.Children.toArray(e).filter(e=>X.isValidElement(e))}function Zt(e){return R(`MuiToggleButtonGroup`,e)}var $=Ee(`MuiToggleButtonGroup`,[`root`,`selected`,`horizontal`,`vertical`,`disabled`,`grouped`,`fullWidth`,`firstButton`,`lastButton`,`middleButton`]),Qt=e=>{let{classes:t,orientation:n,fullWidth:r,disabled:i}=e;return G({root:[`root`,n,r&&`fullWidth`],grouped:[`grouped`,i&&`disabled`],firstButton:[`firstButton`],lastButton:[`lastButton`],middleButton:[`middleButton`]},Zt,t)},$t=z(`div`,{name:`MuiToggleButtonGroup`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${$.grouped}`]:t.grouped},{[`& .${$.firstButton}`]:t.firstButton},{[`& .${$.lastButton}`]:t.lastButton},{[`& .${$.middleButton}`]:t.middleButton},t.root,n.orientation===`vertical`&&t.vertical,n.fullWidth&&t.fullWidth]}})(e(({theme:e})=>({display:`inline-flex`,borderRadius:(e.vars||e).shape.borderRadius,...e.focusVisible&&{[`& .${$.grouped}.${o.focusVisible}`]:{zIndex:1}},variants:[{props:{orientation:`vertical`},style:{flexDirection:`column`,[`& .${$.grouped}`]:{[`&.${$.selected} + .${$.grouped}.${$.selected}`]:{borderTop:0,marginTop:0}},[`& .${$.firstButton},& .${$.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${$.lastButton},& .${$.middleButton}`]:{marginTop:-1,borderTop:`1px solid transparent`,borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${$.lastButton}.${He.disabled},& .${$.middleButton}.${He.disabled}`]:{borderTop:`1px solid transparent`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{orientation:`horizontal`},style:{[`& .${$.grouped}`]:{[`&.${$.selected} + .${$.grouped}.${$.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${$.firstButton},& .${$.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${$.lastButton},& .${$.middleButton}`]:{marginLeft:-1,borderLeft:`1px solid transparent`,borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${$.lastButton}.${He.disabled},& .${$.middleButton}.${He.disabled}`]:{borderLeft:`1px solid transparent`}}}]}))),en=X.forwardRef(function(e,t){let n=S({props:e,name:`MuiToggleButtonGroup`}),{children:r,className:i,color:a=`standard`,disabled:o=!1,exclusive:s=!1,fullWidth:c=!1,onChange:l,orientation:u=`horizontal`,size:d=`medium`,value:f,...p}=n,m={...n,disabled:o,fullWidth:c,orientation:u,size:d},h=Qt(m),g=ve(),_=X.useCallback((e,t)=>{if(!l)return;let n=f&&f.indexOf(t),r;f&&n>=0?(r=f.slice(),r.splice(n,1)):r=f?f.concat(t):[t],l(e,r)},[l,f]),v=X.useCallback((e,t)=>{l&&l(e,f===t?null:t)},[l,f]),y=X.useMemo(()=>({className:h.grouped,onChange:s?v:_,value:f,size:d,fullWidth:c,color:a,disabled:o,isRovingTabIndex:!0}),[h.grouped,s,v,_,f,d,c,a,o]),b=Xt(r),x=b.length,C=e=>{let t=e===0,n=e===x-1;return t&&n?``:t?h.firstButton:n?h.lastButton:h.middleButton},w=De({orientation:u,isRtl:g}),T=w.getContainerProps(t,p.onFocus,p.onKeyDown);return(0,Z.jsx)($t,{role:`group`,className:V(h.root,i),ownerState:m,...p,...T,children:(0,Z.jsx)(Ne.Provider,{value:w,children:(0,Z.jsx)(Ht.Provider,{value:y,children:b.map((e,t)=>(0,Z.jsx)(Ut.Provider,{value:C(t),children:e},t))})})})}),tn=e=>{let{classes:t,disabled:n,labelPlacement:r,error:i,required:a}=e,o={root:[`root`,n&&`disabled`,`labelPlacement${N(r)}`,i&&`error`,a&&`required`],label:[`label`,n&&`disabled`],asterisk:[`asterisk`,i&&`error`]};return G(o,Re,t)},nn=z(`label`,{name:`MuiFormControlLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${ze.label}`]:t.label},t.root,t[`labelPlacement${N(n.labelPlacement)}`]]}})(e(({theme:e})=>({display:`inline-flex`,alignItems:`center`,cursor:`pointer`,verticalAlign:`middle`,WebkitTapHighlightColor:`transparent`,marginLeft:-11,marginRight:16,[`&.${ze.disabled}`]:{cursor:`default`},[`& .${ze.label}`]:{[`&.${ze.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:`start`},style:{flexDirection:`row-reverse`,marginRight:-11}},{props:{labelPlacement:`top`},style:{flexDirection:`column-reverse`}},{props:{labelPlacement:`bottom`},style:{flexDirection:`column`}},{props:({labelPlacement:e})=>e===`start`||e===`top`||e===`bottom`,style:{marginLeft:16}}]}))),rn=z(`span`,{name:`MuiFormControlLabel`,slot:`Asterisk`})(e(({theme:e})=>({[`&.${ze.error}`]:{color:(e.vars||e).palette.error.main}}))),an=X.forwardRef(function(e,t){let n=S({props:e,name:`MuiFormControlLabel`}),{checked:r,className:i,control:a,disabled:o,disableTypography:s,inputRef:c,label:l,labelPlacement:u=`end`,name:d,onChange:f,required:p,slots:m={},slotProps:h={},value:g,...v}=n,[y,b]=_({props:n,states:[`error`]}),x=o??a.props.disabled??b?.disabled,C=p??a.props.required,T={disabled:x,required:C};[`checked`,`name`,`onChange`,`value`,`inputRef`].forEach(e=>{a.props[e]===void 0&&n[e]!==void 0&&(T[e]=n[e])});let E={...n,disabled:x,labelPlacement:u,required:C,error:y.error},D=tn(E),[ee,O]=w(`typography`,{elementType:K,externalForwardedProps:{slots:m,slotProps:h},ownerState:E}),k=l;return k!=null&&k.type!==K&&!s&&(k=(0,Z.jsx)(ee,{component:`span`,...O,className:V(D.label,O?.className),children:k})),(0,Z.jsxs)(nn,{className:V(D.root,i),ownerState:E,ref:t,...v,children:[X.cloneElement(a,T),C?(0,Z.jsxs)(`div`,{children:[k,(0,Z.jsxs)(rn,{ownerState:E,"aria-hidden":!0,className:D.asterisk,children:[` `,`*`]})]}):k]})});function on(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function sn(e,t,n,r={},i=()=>{}){let{ease:a=on,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var cn={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function ln(e){let{onChange:t,...n}=e,r=X.useRef(),i=X.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return k(()=>{let e=te(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=d(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),X.useEffect(()=>{a(),t(r.current)},[t]),(0,Z.jsx)(`div`,{style:cn,...n,ref:i})}var un=A((0,Z.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),dn=A((0,Z.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function fn(e){return R(`MuiTabScrollButton`,e)}var pn=Ee(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),mn=e=>{let{classes:t,orientation:n,disabled:r}=e;return G({root:[`root`,n,r&&`disabled`]},fn,t)},hn=z(c,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${pn.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),gn=X.forwardRef(function(e,t){let n=S({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,{nativeButton:u,...d}=l,f=ve(),p={isRtl:f,...n},m=mn(p),h=i.StartScrollButtonIcon??un,g=i.EndScrollButtonIcon??dn,_=je({elementType:h,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p}),v=je({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:p});return(0,Z.jsx)(hn,{component:`div`,className:V(m.root,r),ref:t,role:null,ownerState:p,tabIndex:null,...d,style:{...d.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${f?-90:90}deg)`}},children:o===`left`?(0,Z.jsx)(h,{..._}):(0,Z.jsx)(g,{...v})})});function _n(e){return R(`MuiTabs`,e)}var vn=Ee(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),yn=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return G({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},_n,c)},bn=z(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${vn.scrollButtons}`]:t.scrollButtons},{[`& .${vn.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(e(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${vn.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),xn=z(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{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`}}]}),Sn=z(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),Cn=z(`span`,{name:`MuiTabs`,slot:`Indicator`})(e(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,...j(e),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),wn=z(ln)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),Tn={},En=X.forwardRef(function(e,t){let n=S({props:e,name:`MuiTabs`}),i=be(),a=ve(),o=y(i.motion.reducedMotion,!1),{"aria-label":s,"aria-labelledby":c,action:l,centered:u=!1,children:f,className:p,component:g=`div`,allowScrollButtonsMobile:_=!1,indicatorColor:v=`primary`,onChange:b,orientation:x=`horizontal`,scrollButtons:T=`auto`,selectionFollowsFocus:E,slots:D={},slotProps:ee={},textColor:O=`primary`,value:k,variant:A=`standard`,visibleScrollbar:j=!1,...M}=n,N=A===`scrollable`,P=x===`vertical`,F=P?`scrollTop`:`scrollLeft`,I=P?`top`:`left`,ne=P?`bottom`:`right`,re=P?`clientHeight`:`clientWidth`,ie=P?`height`:`width`,L={...n,component:g,allowScrollButtonsMobile:_,indicatorColor:v,orientation:x,vertical:P,scrollButtons:T,textColor:O,variant:A,visibleScrollbar:j,fixed:!N,hideScrollbar:N&&!j,scrollableX:N&&!P,scrollableY:N&&P,centered:u&&!N,scrollButtonsHideMobile:!_},R=yn(L),z=je({elementType:D.startScrollButtonIcon,externalSlotProps:ee.startScrollButtonIcon,ownerState:L}),ae=je({elementType:D.endScrollButtonIcon,externalSlotProps:ee.endScrollButtonIcon,ownerState:L}),[oe,B]=X.useState(!1),[ce,le]=X.useState(Tn),[ue,H]=X.useState(!1),[U,de]=X.useState(!1),[W,fe]=X.useState(!1),pe=k===!1?null:k,[me,G]=X.useState(!1),[he,ge]=X.useState({overflow:`hidden`,scrollbarWidth:0}),_e=new Map,K=X.useRef(null),ye=X.useRef(null),q={slots:D,slotProps:ee},J=()=>{let e=K.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&k!==!1){let e=ye.current.children;if(e.length>0){let t=e[_e.get(k)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},xe=r(()=>{let{tabsMeta:e,tabMeta:t}=J(),n=0,r;P?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=a?`right`:`left`,t&&e&&(n=(a?-1:1)*(t[r]-e[r]+e.scrollLeft)));let i={[r]:n,[ie]:t?t[ie]:0};if(typeof ce[r]!=`number`||typeof ce[ie]!=`number`)le(i);else{let e=Math.abs(ce[r]-i[r]),t=Math.abs(ce[ie]-i[ie]);(e>=1||t>=1)&&le(i)}}),Se=(e,{animation:t=!0}={})=>{t&&!o.shouldReduceMotion?sn(F,K.current,e,{duration:i.transitions.duration.standard}):K.current[F]=e},Ce=e=>{let t=K.current[F];t+=P?e:e*(a?-1:1),Se(t)},we=()=>{let e=K.current[re],t=0,n=Array.from(ye.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[re]>e){r===0&&(t=e);break}t+=i[re]}return t},Te=()=>{Ce(-1*we())},Ee=()=>{Ce(we())},[Oe,{onChange:ke,...Ae}]=w(`scrollbar`,{className:V(R.scrollableX,R.hideScrollbar),elementType:wn,shouldForwardComponentProp:!0,externalForwardedProps:q,ownerState:L}),Me=X.useCallback(e=>{ke?.(e),ge({overflow:null,scrollbarWidth:e})},[ke]),[Pe,Fe]=w(`scrollButtons`,{className:R.scrollButtons,elementType:gn,externalForwardedProps:q,ownerState:L,additionalProps:{orientation:x,slots:{StartScrollButtonIcon:D.startScrollButtonIcon,EndScrollButtonIcon:D.endScrollButtonIcon},slotProps:{startScrollButtonIcon:z,endScrollButtonIcon:ae}}}),Ie=()=>{let e={};e.scrollbarSizeListener=N?(0,Z.jsx)(Oe,{...Ae,onChange:Me}):null;let t=N&&(T===`auto`&&(ue||U)||T===!0);return e.scrollButtonStart=t?(0,Z.jsx)(Pe,{direction:a?`right`:`left`,onClick:Te,disabled:!ue,...Fe}):null,e.scrollButtonEnd=t?(0,Z.jsx)(Pe,{direction:a?`left`:`right`,onClick:Ee,disabled:!U,...Fe}):null,e},Le=r(e=>{let{tabsMeta:t,tabMeta:n}=J();if(n&&t){if(n[I]<t[I]){let r=t[F]+(n[I]-t[I]);Se(r,{animation:e})}else if(n[ne]>t[ne]){let r=t[F]+(n[ne]-t[ne]);Se(r,{animation:e})}}}),Re=r(()=>{N&&T!==!1&&fe(!W)});X.useEffect(()=>{let e=te(()=>{K.current&&xe()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Re()},r=d(K.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(ye.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(ye.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[xe,Re]),X.useEffect(()=>{let e=Array.from(ye.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&N&&T!==!1){let n=e[0],r=e[t-1],i={root:K.current,threshold:.99},a=new IntersectionObserver(e=>{H(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{de(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[N,T,W,f?.length]),X.useEffect(()=>{B(!0)},[]),X.useEffect(()=>{xe()}),X.useEffect(()=>{Le(Tn!==ce)},[Le,ce]),X.useImperativeHandle(l,()=>({updateIndicator:xe,updateScrollButtons:Re}),[xe,Re]);let[ze,Be]=w(`indicator`,{className:R.indicator,elementType:Cn,externalForwardedProps:q,ownerState:L,additionalProps:{style:ce}}),Y=(0,Z.jsx)(ze,{...Be}),Ve=De({activeItemId:me?void 0:pe,orientation:x,isRtl:a}),He=Ve.getContainerProps(),Ue=X.Children.toArray(f).filter(X.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return _e.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===k;return X.cloneElement(e,{fullWidth:A===`fullWidth`,indicator:n&&!oe&&Y,selected:n,selectionFollowsFocus:E,onChange:b,textColor:O,value:t})}),We=Ie(),[Ge,Ke]=w(`root`,{ref:t,className:V(R.root,p),elementType:bn,externalForwardedProps:{...q,...M,component:g},ownerState:L}),[qe,Je]=w(`scroller`,{ref:K,className:R.scroller,elementType:xn,externalForwardedProps:q,ownerState:L,additionalProps:{style:{overflow:he.overflow,[P?`margin${a?`Left`:`Right`}`:`marginBottom`]:j?void 0:-he.scrollbarWidth}}}),Ye=C(He.ref,ye),Xe=e=>{let t=ye.current;m(h(t))?.getAttribute(`role`)===`tab`&&He.onKeyDown(e)},[Ze,Qe]=w(`list`,{ref:Ye,className:R.list,elementType:Sn,externalForwardedProps:q,ownerState:L,getSlotProps:e=>({...e,onBlur:t=>{se(t.currentTarget,t.relatedTarget)||G(!1),e.onBlur?.(t)},onKeyDown:t=>{Xe(t),e.onKeyDown?.(t)},onFocus:t=>{G(!0),He.onFocus(t),e.onFocus?.(t)}})});return(0,Z.jsxs)(Ge,{...Ke,children:[We.scrollButtonStart,We.scrollbarSizeListener,(0,Z.jsxs)(qe,{...Je,children:[(0,Z.jsx)(Ze,{"aria-label":s,"aria-labelledby":c,"aria-orientation":x===`vertical`?`vertical`:null,role:`tablist`,...Qe,children:(0,Z.jsx)(Ne.Provider,{value:Ve,children:Ue})}),oe&&Y]}),We.scrollButtonEnd]})});function Dn(e){return R(`MuiTab`,e)}var On=Ee(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),kn=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e,l={root:[`root`,a&&o&&`labelIcon`,`textColor${N(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]};return G(l,Dn,t)},An=z(c,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${N(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${On.icon}`]:t.icon}]}})(e(({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,...e.focusVisible&&ue(3),variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${On.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${On.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${On.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${On.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${On.selected}`]:{opacity:1},...e.focusVisible&&{[`&.${o.focusVisible}`]:{opacity:1}},[`&.${On.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${On.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${On.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${On.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${On.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),jn=X.forwardRef(function(e,t){let n=S({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b=I(),x=M({id:_,ref:t,disabled:i,selected:m}),C=b.getItemMap().size===0&&m?0:x.tabIndex,w={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},T=kn(w),E=s&&u&&X.isValidElement(s)?X.cloneElement(s,{className:V(T.icon,s.props.className)}):s;return(0,Z.jsxs)(An,{internalNativeButton:!0,focusRipple:!a,className:V(T.root,r),ref:x.ref,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},tabIndex:C,ownerState:w,...y,children:[c===`top`||c===`start`?(0,Z.jsxs)(X.Fragment,{children:[E,u]}):(0,Z.jsxs)(X.Fragment,{children:[u,E]}),l]})}),Mn=`<!-- octopus-revision -->`,Nn=e=>String(e).padStart(2,`0`);function Pn(e){return`lab-lock-${`${e.getUTCFullYear()}${Nn(e.getUTCMonth()+1)}${Nn(e.getUTCDate())}T${Nn(e.getUTCHours())}${Nn(e.getUTCMinutes())}${Nn(e.getUTCSeconds())}Z`}.md`}var Fn=U(ce(),1),In={width:340,height:640},Ln=`This browser can't open a Picture-in-Picture window.`;function Rn(e=globalThis){return`documentPictureInPicture`in e}function zn(e=globalThis){let t=e.documentPictureInPicture;return t?t.requestWindow(In):Promise.reject(Error(Ln))}var Bn=[{id:`page`,label:`Page`},{id:`labels`,label:`Labels`},{id:`lists`,label:`Lists`},{id:`assistant`,label:`Assistant`}],Vn=[{id:`pageGutterMin`,kind:`slider`,group:`page`,label:`Gutter, at least`,hook:`pageGutterMin`,min:8,max:parseFloat(Pe.max),step:2,unit:`px`,default:parseFloat(Pe.min),question:`The page gutter where room is scarce: the runway's side padding, the masthead's, and the gap between the Overview's columns. 24px is where it was before it grew with the viewport.`},{id:`tabsScrollFade`,kind:`slider`,group:`page`,label:`Fade under the tabs`,hook:`tabsScrollFade`,min:0,max:64,step:2,unit:`px`,default:parseFloat(Ae),question:`How far below the tab strip the page's content dissolves as it scrolls under. 0 cuts it at the seam, as before.`},{id:`railFoot`,kind:`slider`,group:`page`,label:`Rail foot`,hook:`railFoot`,min:0,max:32,step:1,unit:`px`,default:parseFloat(a),question:`The space under the rail's last item (the settings cog) down to the window's edge. It was 22px.`},{id:`bandGlassOpacity`,kind:`slider`,group:`page`,label:`Header band wash`,hook:`bandGlassOpacity`,min:0,max:1,step:.05,unit:``,default:{light:s.light.band.opacity,dark:s.dark.band.opacity},question:`How much of the page's ground tone a table header's band lays over what scrolls under it. Each mode keeps its own value; the slider moves the one for the mode in view.`},{id:`bandGlassBlur`,kind:`slider`,group:`page`,label:`Header band blur`,hook:`bandGlassBlur`,min:0,max:16,step:1,unit:`px`,default:s.light.band.blur,question:`How far a table header's band blurs what scrolls under it.`},{id:`themeFade`,kind:`slider`,group:`page`,label:`Switch fade`,hook:`appearanceFade`,min:0,max:1e3,step:50,unit:`ms`,default:parseFloat(ne),question:`How long a change of theme or mode crossfades, the whole page at once. 0 swaps it in a single frame.`}],Hn=[{id:`countStyle`,kind:`choice`,group:`labels`,label:`Count drawing`,attr:`countStyle`,default:D,question:`The figure beside a tab's or heading's label ("Analysis 9"): a tinted label, an outlined one, or the bare figure.`,options:[{value:`fill`,label:`Fill`},{value:`outline`,label:`Outline`},{value:`plain`,label:`Plain`}]},{id:`countRadius`,kind:`slider`,group:`labels`,label:`Count radius`,hook:`countRadius`,min:0,max:6,step:1,unit:``,default:u.kbd,question:`How rounded the count label's corners are, as a radius token before the radius scale. 6 is a full pill at its height; ${u.kbd} is the kbd radius it defaults to.`}],Un=[{id:`rowIconGap`,kind:`slider`,group:`lists`,label:`Row icon gap`,hook:`rowIconGap`,min:0,max:20,step:1,unit:`px`,default:8,question:`The space between a row's icon (the settings cog, the agent) and its label. Investigations drew about 18px.`},{id:`rowIconSize`,kind:`slider`,group:`lists`,label:`Row icon size`,hook:`rowIconSize`,min:12,max:24,step:1,unit:`px`,default:parseFloat(b),question:`How big a row's icon is beside its 14px label. Investigations drew 20px.`}],Wn=[{id:`seamBlur`,kind:`slider`,group:`assistant`,label:`Seam shadow blur`,hook:`seamBlur`,min:0,max:40,step:1,unit:`px`,default:parseFloat(T.blur),question:`The shadow the plane casts onto the assistant's pane along their seam: how far it spreads. It was 12px.`},{id:`seamStrength`,kind:`slider`,group:`assistant`,label:`Seam shadow strength`,hook:`seamStrength`,min:0,max:2,step:.05,unit:``,default:1,question:`How dark that shadow is, as a share of the designed opacity (0.14 in light, 0.5 in dark; light was 0.18). It falls over the pane's content, the assistant's header rule included.`},{id:`assistantScrollFade`,kind:`slider`,group:`assistant`,label:`Conversation fade`,hook:`assistantScrollFade`,min:0,max:48,step:2,unit:`px`,default:parseFloat(Me),question:`How far the conversation dissolves at its top and bottom edges, under the header and above the composer. 0 cuts it.`}],Gn=[...Vn,...Hn,...Un,...Wn];function Kn(e){let t=e,n=new Set;return{get:()=>t,set(e){t=typeof e==`function`?e(t):e;for(let e of[...n])e()},subscribe(e){return n.add(e),()=>{n.delete(e)}}}}function qn(e,t){return(0,X.useSyncExternalStore)(e.subscribe,()=>t(e.get()),()=>t(e.get()))}var Jn=`aistrike.lab`,Yn=[`light`,`dark`],Xn=`data-ds-mode`;function Zn(e){return e.kind===`slider`&&typeof e.default==`object`}function Qn(e,t){if(!Zn(e))return e.id;if(t===void 0)throw Error(`The lab control ${e.id} holds a value per mode; name the mode`);return`${e.id}.${t}`}function $n(e){return e.getAttribute(Xn)===`light`?`light`:`dark`}function er(e){if(e.kind===`slider`&&typeof e.default==`object`){let t=e.default;return Yn.map(n=>({key:Qn(e,n),fallback:t[n]}))}return[{key:e.id,fallback:e.default}]}function tr(e,t){return e.kind===`slider`&&typeof e.default==`object`?e.default[t]:e.default}function nr(e){return Object.fromEntries(e.flatMap(er).map(({key:e,fallback:t})=>[e,t]))}function rr(e,t){return e.kind===`slider`?typeof t==`number`&&Number.isFinite(t)&&t>=e.min&&t<=e.max:typeof t==`string`&&e.options.some(e=>e.value===t)}function ir(e,t){let n=typeof e==`object`&&e&&!Array.isArray(e)?e:{};return Object.fromEntries(t.flatMap(e=>er(e).map(({key:t,fallback:r})=>{let i=n[t];return[t,rr(e,i)?i:r]})))}function ar(e,t=localStorage){try{return ir(JSON.parse(t.getItem(`aistrike.lab`)??`null`),e)}catch{return nr(e)}}function or(e,t=localStorage){try{t.setItem(Jn,JSON.stringify(e))}catch{}}function sr(e,t,r=document.documentElement,i=$n(r)){for(let a of t)if(a.kind===`choice`)a.attr!==void 0&&r.setAttribute(l[a.attr],String(e[a.id]??a.default));else if(a.hook!==void 0){let t=n[a.hook],o=tr(a,i),s=e[Qn(a,i)]??o;s===o?r.style.removeProperty(t):r.style.setProperty(t,`${s}${a.kind===`slider`?a.unit:``}`)}}function cr(e,t=document.documentElement){for(let r of e)r.kind===`choice`?r.attr!==void 0&&t.removeAttribute(l[r.attr]):r.hook!==void 0&&t.style.removeProperty(n[r.hook])}var lr=(e,t)=>{if(typeof MutationObserver>`u`||typeof Node>`u`||!(e instanceof Node))return()=>void 0;let n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:[Xn]}),()=>{n.disconnect()}};function ur(e){let{controls:t}=e,n=e.root??document.documentElement,r=e.storage??localStorage,i=e.experiments??Ce(),a=new Map(t.map(e=>[e.id,e])),o=Kn(ar(t,r)),s=i.isPaused(),c=e=>{s?cr(t,n):sr(e,t,n)};c(o.get());let l=e=>{c(e),or(e,r),o.set(e)},u=(e.observeMode??lr)(n,()=>{c(o.get()),o.set({...o.get()})}),d=i.subscribe(()=>{i.isPaused()!==s&&(s=i.isPaused(),c(o.get()))}),f=()=>{u(),d()};return{store:o,set(e,t,r){let i=a.get(e);i===void 0||!rr(i,t)||l({...o.get(),[Qn(i,r??$n(n))]:t})},reset(){l(nr(t))},dispose(){f()}}}var dr=`docs/decisions/2026-10-21-design-lab-in-octopus.md`,fr=[`light`,`dark`],pr=(e,t)=>`${t}${e.kind===`slider`?e.unit:``}`;function mr(e){return e.kind===`choice`?e.attr===void 0?`—`:l[e.attr]:e.hook===void 0?`—`:n[e.hook]}function hr(e,t,n){return t.filter(e=>n.includes(e.id)).flatMap(t=>{let n=(n,r)=>{let i=Qn(t,n??void 0);return{id:t.id,label:t.label,hook:mr(t),mode:n,old:pr(t,r),next:pr(t,e[i]??r)}};if(t.kind===`slider`&&typeof t.default==`object`&&Zn(t)){let e=t.default;return fr.map(t=>n(t,e[t]))}return[n(null,t.default)]})}function gr({rows:e,url:t,host:n,version:r,lockedAt:i}){let a=[...new Set(e.map(e=>e.id))],o=i.toISOString(),s=e.map(e=>`| ${e.id} | ${e.hook} | ${e.mode??`—`} | ${e.old} | ${e.next} |`);return[`---`,`status: new`,`type: background`,`title: Promote lab lock ${o.slice(0,16)}Z`,`summary: Settle ${a.length} lab controls: ${a.join(`, `)}`,`depends:`,`groomed:`,`worktree:`,`dev:`,`---`,``,`## Request`,``,`Design Lab lock from ${t} (${n}), judged against @aistrike-dev/ui ${r}${Mn}, ${o}.`,``,`| Control | Hook | Mode | Old | New |`,`| --- | --- | --- | --- | --- |`,...s,``,`Promote: set each control's Octopus default to New; remove the control from the lab; remove its hook from`,"`DS_HOOKS` and every read of it (the value becomes the constant); record the decision in",`${dr}. Leave the change uncommitted.`,``,`## Clarifications`,``,`## Progress`,``].join(`
2
- `)}var _r={light:`Light`,dark:`Dark`},vr=e=>e.old!==e.next;function yr(e){return e.map(e=>{let t=vr(e)?`${e.old} → ${e.next}`:`keep`;return e.mode===null?t:`${_r[e.mode]}: ${t}`}).join(` · `)}function br({values:e,controls:t,onCancel:n,onConfirm:r}){let i=new Map(t.map(t=>[t.id,hr(e,[t],[t.id])])),[a,o]=(0,X.useState)(()=>new Set(t.filter(e=>i.get(e.id)?.some(vr)).map(e=>e.id))),s=e=>{o(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})},c=t.filter(e=>a.has(e.id)).length;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(fe,{children:`Lock in`}),(0,Z.jsxs)(re,{children:[(0,Z.jsx)(K,{variant:`body2`,sx:{mb:1.5,color:`var(--ds-text-quiet)`},children:`Tick what this lock settles. Each becomes a row of a backlog item that promotes it to the design system's default.`}),Bn.map(e=>{let n=t.filter(t=>t.group===e.id);return n.length===0?null:(0,Z.jsxs)(ke,{component:`section`,"aria-label":e.label,sx:{mb:1.5},children:[(0,Z.jsx)(K,{variant:`overline`,component:`h3`,sx:{display:`block`},children:e.label}),n.map(e=>(0,Z.jsxs)(ke,{component:`label`,sx:{display:`flex`,alignItems:`center`,gap:1,cursor:`pointer`},children:[(0,Z.jsx)(nt,{size:`small`,checked:a.has(e.id),onChange:()=>s(e.id),slotProps:{input:{"aria-label":e.label}}}),(0,Z.jsx)(K,{variant:`body2`,component:`span`,sx:{flex:1},children:e.label}),(0,Z.jsx)(K,{variant:`caption`,component:`span`,sx:{fontFamily:W.mono,color:`var(--ds-text-quiet)`,textAlign:`right`},children:yr(i.get(e.id)??[])})]},e.id))]},e.id)})]}),(0,Z.jsxs)(le,{children:[(0,Z.jsx)(J,{variant:`ghost`,onClick:n,children:`Cancel`}),(0,Z.jsx)(J,{variant:`primary`,disabled:c===0,onClick:()=>r(t.filter(e=>a.has(e.id)).map(e=>e.id)),children:`Lock ${c}`})]})]})}function xr({open:e,onCancel:t,container:n,...r}){return(0,Z.jsx)(Te,{open:e,onClose:t,container:n,fullWidth:!0,maxWidth:`sm`,children:(0,Z.jsx)(br,{...r,onCancel:t})})}var Sr=`style[data-ds-theme]`,Cr=[`fonts.googleapis.com`,`fonts.bunny.net`,`use.typekit.net`,`fonts.adobe.com`];function wr(e,t){for(let{name:n}of Array.from(t.attributes))e.hasAttribute(n)||t.removeAttribute(n);for(let{name:n,value:r}of Array.from(e.attributes))t.getAttribute(n)!==r&&t.setAttribute(n,r)}function Tr(e,t){let n=e.head.querySelector(Sr),r=t.head.querySelector(Sr);if(!n){r?.remove();return}r||(r=t.createElement(`style`),r.setAttribute(`data-ds-theme`,``),t.head.appendChild(r)),r.textContent!==n.textContent&&(r.textContent=n.textContent)}var Er=`data-ds-mirror-font`;function Dr(e,t){let n=new Set,r=``;for(let t of Array.from(e.styleSheets)){let e;try{e=t.cssRules}catch{continue}t.href&&n.add(t.href);for(let t of Array.from(e))t instanceof CSSFontFaceRule&&(r+=`${t.cssText}\n`)}if(r&&!t.head.querySelector(`style[${Er}]`)){let e=t.createElement(`style`);e.setAttribute(Er,``),e.textContent=r,t.head.appendChild(e)}let i=new Set(Array.from(t.head.querySelectorAll(`link[${Er}]`),e=>e.href));for(let r of Array.from(e.head.querySelectorAll(`link[rel="stylesheet"]`))){if(!Cr.some(e=>r.href.includes(e))||n.has(r.href)||i.has(r.href))continue;let e=t.createElement(`link`);e.setAttribute(Er,``),e.rel=`stylesheet`,e.href=r.href,t.head.appendChild(e),i.add(r.href)}}function Or(e,t){let n=()=>{wr(e.documentElement,t.documentElement),Tr(e,t)};n(),Dr(e,t);let r=new MutationObserver(n);r.observe(e.documentElement,{attributes:!0});let i=()=>Tr(e,t),a=e.defaultView;return a?.addEventListener(x,i),()=>{r.disconnect(),a?.removeEventListener(x,i)}}var kr=new Set([404,405]);function Ar(e,t){let n=URL.createObjectURL(new Blob([t],{type:`text/markdown`})),r=document.createElement(`a`);r.href=n,r.download=e,r.style.display=`none`,document.body.append(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),0)}async function jr(e){if(e.status!==200)return null;try{let t=await e.json(),n=typeof t==`object`&&t?t.file:void 0;return typeof n==`string`&&n!==``?n:null}catch{return null}}async function Mr(e,t,n){let{endpoint:r,fetch:i=fetch,download:a=Ar}=n,o=null,s;try{let n=await i(r,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fileName:t,markdown:e})});o=await jr(n),!n.ok&&!kr.has(n.status)&&(s=n.status)}catch{}return o===null?(a(t,e),s===void 0?{kind:`downloaded`,file:t}:{kind:`downloaded`,file:t,refused:s}):{kind:`written`,file:o}}var Nr=e=>{window.history.pushState(null,``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},Pr=`var(--ds-text-quiet)`,Fr=`aria-label`,Ir=500;function Lr(){return(0,X.useSyncExternalStore)(e=>{window.addEventListener(`popstate`,e);let t=window.setInterval(e,Ir);return()=>{window.removeEventListener(`popstate`,e),window.clearInterval(t)}},()=>window.location.pathname)}var Rr=e=>e.options.length===2&&e.options[0]?.id===`off`&&e.options[1]?.id===`on`;function zr({definition:e,session:t,copy:n,go:r}){let i=t.picked(e.id)??e.baseline,a=e.options.find(e=>e.id===i),o=Rr(e);return(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8},children:[(0,Z.jsx)(K,{variant:`subtitle2`,component:`span`,sx:{flex:1,minWidth:0},children:e.title}),(0,Z.jsx)(J,{variant:`ghost`,size:`small`,title:`Copy the id`,"aria-label":`Copy ${e.id}`,onClick:()=>n(e.id,e.id),sx:{fontFamily:W.mono,textTransform:`none`,minWidth:0,px:.5,color:Pr},children:e.id})]}),e.description===void 0?null:(0,Z.jsx)(K,{variant:`caption`,component:`p`,sx:{m:0,mb:.75,color:Pr},children:e.description}),(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[o?(0,Z.jsx)(an,{sx:{flex:1,m:0},label:i===`on`?`On`:`Off`,control:(0,Z.jsx)(lt,{size:`small`,checked:i===`on`,slotProps:{input:{[Fr]:e.title}},onChange:(...[,n])=>t.set(e.id,n?`on`:`off`)})}):(0,Z.jsx)(me,{fullWidth:!0,size:`small`,value:i,onChange:n=>t.set(e.id,String(n.target.value)),SelectDisplayProps:{[Fr]:e.title},children:e.options.map(t=>(0,Z.jsx)(ae,{value:t.id,children:t.id===e.baseline?`${t.label} (ships)`:t.label},t.id))}),r===void 0?null:(0,Z.jsx)(J,{variant:`secondary`,size:`small`,onClick:r,children:`Go`})]}),o?null:(0,Z.jsxs)(K,{variant:`caption`,component:`p`,sx:{m:0,mt:.5,color:Pr},children:[(0,Z.jsx)(`span`,{style:{fontFamily:W.mono},children:i}),a?.description===void 0?null:` · ${a.description}`]})]})}var Br={experiment:{one:`experiment`,many:`Experiments`,register:`registerExperiment`},scenario:{one:`scenario`,many:`Scenarios`,register:`registerScenario`}};function Vr({kind:e,session:t,navigate:n,copy:r}){(0,X.useSyncExternalStore)(t.subscribe,()=>t.shared.revision);let i=Lr(),[a,o]=(0,X.useState)(!1),s=t.definitions(e),c=s.filter(e=>t.applies(e,i)),l=s.filter(e=>!c.includes(e)),u=Br[e],d=e=>{let r=t.hrefOf(e);if(r!==void 0||e.when!==void 0)return()=>{t.setMany(e.when??{}),r!==void 0&&n(r)}},f=(e,n)=>e.map(e=>(0,Z.jsx)(zr,{definition:e,session:t,copy:r,go:n?d(e):void 0},e.id)),p=e===`experiment`?he(t):``;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{role:`tabpanel`,"aria-label":u.many,style:{flex:1,minHeight:0,overflowY:`auto`,padding:`4px 16px 12px`,display:`grid`,alignContent:`start`,gap:14},children:s.length===0?(0,Z.jsxs)(K,{variant:`body2`,component:`p`,sx:{m:0,color:Pr},children:[`No ${u.one} is registered. An app declares one with `,(0,Z.jsx)(`span`,{style:{fontFamily:W.mono},children:u.register}),` from `,(0,Z.jsx)(`span`,{style:{fontFamily:W.mono},children:`@aistrike-dev/ui/experiments`}),`.`]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(K,{variant:`overline`,component:`h2`,sx:{m:0,color:Pr},children:`On this page`}),c.length===0?(0,Z.jsx)(K,{variant:`caption`,component:`p`,sx:{m:0,color:Pr},children:`No ${u.one} applies here.`}):f(c,!1),l.length===0?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(J,{variant:`ghost`,size:`small`,"aria-expanded":a,onClick:()=>o(e=>!e),sx:{justifySelf:`start`},children:`${a?`Hide`:`Show`} library (${l.length})`}),a?f(l,!0):null]})]})}),(0,Z.jsxs)(`div`,{style:{padding:`10px 16px 12px`,display:`flex`,gap:8,justifyContent:`flex-end`,borderTop:`1px solid var(--ds-separator)`},children:[(0,Z.jsx)(J,{variant:`ghost`,size:`small`,onClick:()=>t.reset(e),children:`Reset`}),e===`experiment`?(0,Z.jsx)(J,{variant:`primary`,size:`small`,disabled:p===``,onClick:()=>r(p,`the picks`),children:`Copy picks`}):null]})]})}var Hr=`6.0.0-alpha.12`,Ur=`/__octopus/lab/lock`;function Wr(e){return e.kind===`written`?`Locked: ${e.file}`:e.refused===void 0?`Downloaded ${e.file}: no design-system checkout is configured`:`Downloaded ${e.file}: the dev server refused the lock (${e.refused})`}var Gr=[{id:`design`,label:`Design`},{id:`experiment`,label:`Experiments`},{id:`scenario`,label:`Scenarios`}],Kr=4,qr=`aria-label`,Jr={light:`Light`,dark:`Dark`},Yr=`var(--ds-text-quiet)`,Xr=e=>(String(e).split(`.`)[1]??``).length;function Zr(e,t){let n=Math.round((t-e.min)/e.step),r=Number((e.min+n*e.step).toFixed(Math.max(Xr(e.step),Xr(e.min))));return Math.min(e.max,Math.max(e.min,r))}function Qr({label:e,question:t}){return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(K,{variant:`subtitle2`,component:`span`,children:e}),(0,Z.jsx)(K,{variant:`caption`,component:`p`,sx:{m:0,mb:.75,color:Yr},children:t})]})}function $r({control:e,label:t,value:n,other:r,onChange:i}){return(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,Z.jsx)(K,{variant:`subtitle2`,component:`span`,children:t}),(0,Z.jsx)(K,{variant:`caption`,component:`span`,sx:{fontVariantNumeric:`tabular-nums`},children:`${n}${e.unit}`})]}),(0,Z.jsx)(K,{variant:`caption`,component:`p`,sx:{m:0,color:Yr},children:e.question}),(0,Z.jsx)(Vt,{size:`small`,"aria-label":t,min:e.min,max:e.max,step:e.step,value:n,onChange:(...[,t])=>i(Zr(e,Array.isArray(t)?t[0]??n:t))}),r===void 0?null:(0,Z.jsx)(K,{variant:`caption`,component:`p`,sx:{m:0,color:Yr,fontVariantNumeric:`tabular-nums`},children:`${Jr[r.mode]}: ${r.value}${e.unit}`})]})}function ei({control:e,value:t,onChange:n}){return e.options.length>Kr?(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Qr,{label:e.label,question:e.question}),(0,Z.jsx)(me,{fullWidth:!0,size:`small`,value:t,onChange:e=>n(String(e.target.value)),SelectDisplayProps:{[qr]:e.label},children:e.options.map(e=>(0,Z.jsx)(ae,{value:e.value,children:e.label},e.value))})]}):(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Qr,{label:e.label,question:e.question}),(0,Z.jsx)(en,{exclusive:!0,fullWidth:!0,size:`small`,"aria-label":e.label,value:t,onChange:(...[,e])=>{e!==null&&n(e)},children:e.options.map(e=>(0,Z.jsx)(Yt,{value:e.value,sx:{textTransform:`none`,py:.25},children:e.label},e.value))})]})}function ti({control:e,values:t,mode:n,set:r}){if(e.kind===`choice`)return(0,Z.jsx)(ei,{control:e,value:String(t[e.id]??e.default),onChange:t=>r(e.id,t)});if(Zn(e)&&typeof e.default==`object`){let i=n===`light`?`dark`:`light`;return(0,Z.jsx)($r,{control:e,label:`${e.label} (${n})`,value:Number(t[Qn(e,n)]??e.default[n]),other:{mode:i,value:Number(t[Qn(e,i)]??e.default[i])},onChange:t=>r(e.id,t,n)})}return(0,Z.jsx)($r,{control:e,label:e.label,value:Number(t[e.id]??e.default),onChange:t=>r(e.id,t)})}function ni(){return typeof location>`u`?{url:``,host:``}:{url:location.href,host:location.host}}function ri({lab:e,controls:t,lockEndpoint:n,submit:r,experiments:i,navigate:a,container:o}){let s=qn(e.store,e=>e),c=(0,X.useSyncExternalStore)(i.subscribe,()=>i.isPaused()),[l,u]=(0,X.useState)(`design`),d=$n(document.documentElement),[f,p]=(0,X.useState)(!1),[m,h]=(0,X.useState)(null),g=Bn.filter(e=>t.some(t=>t.group===e.id)),[_,v]=(0,X.useState)(null),y=g.find(e=>e.id===_)?.id??g[0]?.id,b=async i=>{p(!1);try{let a=new Date;h(Wr(await r(gr({rows:hr(e.store.get(),t,i),...ni(),version:Hr,lockedAt:a}),Pn(a),{endpoint:n})))}catch(e){h(`Lock failed: ${e instanceof Error?e.message:String(e)}`)}},x=(e,t)=>{let n=o.ownerDocument.defaultView?.navigator.clipboard;(n===void 0?Promise.reject(Error(`no clipboard`)):n.writeText(e)).then(()=>h(`Copied ${t}`),()=>h(e))},S=(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{style:{padding:`4px 16px 8px`},children:(0,Z.jsx)(me,{fullWidth:!0,size:`small`,value:y??``,onChange:e=>v(e.target.value),SelectDisplayProps:{[qr]:`Control group`},children:g.map(e=>(0,Z.jsx)(ae,{value:e.id,children:e.label},e.id))})}),(0,Z.jsx)(`div`,{role:`tabpanel`,"aria-label":g.find(e=>e.id===y)?.label,style:{flex:1,minHeight:0,overflowY:`auto`,padding:`4px 16px 12px`,display:`grid`,alignContent:`start`,gap:14},children:t.filter(e=>e.group===y).map(t=>(0,Z.jsx)(ti,{control:t,values:s,mode:d,set:e.set},t.id))}),(0,Z.jsxs)(`div`,{style:{padding:`10px 16px 12px`,display:`flex`,gap:8,justifyContent:`flex-end`,borderTop:`1px solid var(--ds-separator)`},children:[(0,Z.jsx)(J,{variant:`ghost`,size:`small`,onClick:()=>e.reset(),children:`Reset`}),(0,Z.jsx)(J,{variant:`primary`,size:`small`,onClick:()=>p(!0),children:`Lock in`})]})]});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(P,{rung:`raised`,component:`section`,"aria-label":`Design Lab`,sx:{height:`100vh`,display:`flex`,flexDirection:`column`,borderRadius:0},children:[(0,Z.jsx)(`div`,{style:{padding:`10px 16px 4px`,display:`grid`},children:(0,Z.jsx)(an,{sx:{m:0,justifyContent:`space-between`},labelPlacement:`start`,label:(0,Z.jsx)(K,{variant:`subtitle2`,component:`span`,children:c?`Overrides off: as it ships`:`Overrides on`}),control:(0,Z.jsx)(lt,{size:`small`,checked:!c,slotProps:{input:{[qr]:`Overrides`}},onChange:(...[,e])=>i.setPaused(!e)})})}),(0,Z.jsx)(`div`,{style:{padding:`0 16px 8px`},children:(0,Z.jsx)(En,{value:l,variant:`fullWidth`,sx:{display:`flex`},"aria-label":`Lab sections`,onChange:(...[,e])=>u(e),children:Gr.map(e=>(0,Z.jsx)(jn,{value:e.id,label:e.label},e.id))})}),l===`design`?S:(0,Z.jsx)(Vr,{kind:l,session:i,navigate:a,copy:x})]}),(0,Z.jsx)(xr,{open:f,values:s,controls:t,container:o,onCancel:()=>p(!1),onConfirm:e=>{b(e)}}),(0,Z.jsx)(L,{open:m!==null,message:m??``,autoHideDuration:8e3,anchorOrigin:{vertical:`bottom`,horizontal:`right`},onClose:(...[,e])=>{e!==`clickaway`&&h(null)}})]})}var ii={disableNestedContext:!0};function ai(e){return e.title=`Design Lab`,Or(document,e)}function oi({lab:e,target:n,controls:r=Gn,lockEndpoint:i=Ur,submit:a=Mr,experiments:o=Ce(),navigate:s=Nr}){let c=(0,X.useMemo)(()=>ye({key:`lab`,container:n.document.head}),[n]);(0,X.useLayoutEffect)(()=>ai(n.document),[n]);let l=n.document.body;return(0,Fn.createPortal)((0,Z.jsx)(oe,{value:c,children:(0,Z.jsxs)(_e,{theme:xe,...ii,children:[(0,Z.jsx)(t,{}),(0,Z.jsx)(ri,{lab:e,controls:r,lockEndpoint:i,submit:a,experiments:o,navigate:s,container:l})]})}),l)}var si=1250;function ci({lab:e,controls:t,lockEndpoint:n,submit:r,open:i=zn,supported:a=Rn(),experiments:o=Ce(),navigate:s}){(0,X.useLayoutEffect)(()=>{o.activate()},[o]);let[c,l]=(0,X.useState)(null),[u,d]=(0,X.useState)(!1),f=(0,X.useRef)(!0);return(0,X.useEffect)(()=>(f.current=!0,()=>{f.current=!1}),[]),(0,X.useEffect)(()=>{if(c===null)return;let e=!1,t=()=>{e=!0,l(null)};return c.addEventListener(`pagehide`,t),()=>{c.removeEventListener(`pagehide`,t),e||c.close()}},[c]),c===null?(0,Z.jsxs)(`div`,{style:{position:`fixed`,left:100,bottom:14,zIndex:si,display:`flex`,alignItems:`center`,gap:8},children:[(0,Z.jsx)(J,{variant:`secondary`,size:`small`,startIcon:(0,Z.jsx)(p,{}),"aria-label":`Open Design Lab`,disabled:!a||u,onClick:()=>{d(!0),i().then(e=>{if(!f.current){e.close();return}d(!1),l(e)},e=>{f.current&&d(!1),console.warn(`Design Lab: the window did not open.`,e)})},children:`Design Lab`}),a?null:(0,Z.jsx)(K,{variant:`caption`,component:`span`,sx:{color:`var(--ds-text-quiet)`},children:Ln})]}):(0,Z.jsx)(oi,{lab:e,target:c,controls:t,lockEndpoint:n,submit:r,experiments:o,navigate:s})}var li;function ui(){return li===void 0&&Rn()&&(li=ur({controls:Gn})),li}function di(){li?.dispose(),li=void 0,cr(Gn)}function fi(){return ur({controls:Gn,root:document.createElement(`html`),storage:{getItem:()=>null,setItem:()=>void 0,removeItem:()=>void 0},observeMode:()=>()=>void 0})}function pi(){let e=ui();return e===void 0?(0,Z.jsx)(ci,{lab:fi(),supported:!1}):(0,Z.jsx)(ci,{lab:e})}export{pi as default,di as dropLab,ui as getLab};