@aistrike-dev/ui-shell-dev 1.0.5 → 1.0.6

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 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./chunks/ui-C1fKYgH9.js","./chunks/preload-helper-CYtfOYgs.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./chunks/preload-helper-CYtfOYgs.js";var t=t=>{let n,r=0;return{nav:[{label:`Settings`,path:`/`,icon:`settings`}],commands:[{id:`profile`,title:`Settings: Profile`,href:`/settings/profile`,keywords:[`account`,`name`]},{id:`appearance`,title:`Settings: Appearance`,href:`/settings/appearance`,keywords:[`theme`,`brand`,`colour`,`color`]},{id:`notifications`,title:`Settings: Notifications`,href:`/settings/notifications`},{id:`shortcuts`,title:`Settings: Keyboard shortcuts`,href:`/settings/shortcuts`,keywords:[`keys`,`bindings`]}],async mount(i){r+=1;let a=r;n?.(),n=void 0;let{mountUi:o}=await e(async()=>{let{mountUi:e}=await import(`./chunks/ui-C1fKYgH9.js`);return{mountUi:e}},__vite__mapDeps([0,1]),import.meta.url);a===r&&(n=o(i,t))},unmount(){r+=1,n?.(),n=void 0}}};export{t as activate};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./chunks/ui-CaZXUNTb.js","./chunks/preload-helper-CYtfOYgs.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./chunks/preload-helper-CYtfOYgs.js";var t=t=>{let n,r=0;return{nav:[{label:`Settings`,path:`/`,icon:`settings`}],commands:[{id:`profile`,title:`Settings: Profile`,href:`/settings/profile`,keywords:[`account`,`name`]},{id:`appearance`,title:`Settings: Appearance`,href:`/settings/appearance`,keywords:[`theme`,`brand`,`colour`,`color`]},{id:`notifications`,title:`Settings: Notifications`,href:`/settings/notifications`},{id:`shortcuts`,title:`Settings: Keyboard shortcuts`,href:`/settings/shortcuts`,keywords:[`keys`,`bindings`]}],async mount(i){r+=1;let a=r;n?.(),n=void 0;let{mountUi:o}=await e(async()=>{let{mountUi:e}=await import(`./chunks/ui-CaZXUNTb.js`);return{mountUi:e}},__vite__mapDeps([0,1]),import.meta.url);a===r&&(n=o(i,t))},unmount(){r+=1,n?.(),n=void 0}}};export{t as activate};
@@ -0,0 +1,2 @@
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 _,Mt as v,N as y,Nt as b,O as x,Ot as S,P as C,Pt as w,Q as T,R as E,S as D,St as ee,T as O,Tt as k,U as A,V as te,W as ne,X as j,Y as re,Z as M,_ as N,_t as P,a as F,at as I,b as ie,bt as L,c as R,ct as z,d as ae,dt as oe,et as B,f as V,ft as H,g as se,gt as ce,h as le,ht as U,i as ue,it as de,j as fe,jt as pe,k as me,kt as he,l as ge,lt as _e,m as ve,mt as W,n as ye,nt as G,o as be,ot as xe,p as Se,pt as K,q as Ce,r as we,rt as Te,s as Ee,st as De,t as Oe,tt as q,u as J,ut as ke,v as Ae,vt as Y,w as je,wt as Me,x as Ne,xt as Pe,y as Fe,yt as Ie,z as Le}from"./index-ko8gjR0r.js";function Re(e){return W(`MuiCheckbox`,e)}var ze=K(`MuiCheckbox`,[`root`,`checked`,`disabled`,`indeterminate`,`colorPrimary`,`colorSecondary`,`sizeSmall`,`sizeMedium`]);function Be(e){return W(`MuiSlider`,e)}var X=K(`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 W(`MuiToggleButton`,e)}var He=K(`MuiToggleButton`,[`root`,`disabled`,`selected`,`standard`,`primary`,`secondary`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`fullWidth`]);function Ue(e){return W(`PrivateSwitchBase`,e)}K(`PrivateSwitchBase`,[`root`,`checked`,`disabled`,`input`,`edgeStart`,`edgeEnd`]);var Z=w(Ie(),1),Q=Pe(),We=e=>{let{classes:t,checked:n,disabled:r,edge:i}=e,a={root:[`root`,n&&`checked`,r&&`disabled`,i&&`edge${L(i)}`],input:[`input`]};return P(a,Ue,t)},Ge=q(o,{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=q(`input`,{name:`MuiSwitchBase`,shouldForwardProp:G})({cursor:`inherit`,position:`absolute`,opacity:0,width:`100%`,height:`100%`,top:0,left:0,margin:0,padding:0,zIndex:1}),qe=Z.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:a,defaultChecked:o,disabled:s,disableFocusRipple:c=!1,edge:l=!1,icon:u,id:d,name:f,onBlur:p,onChange:m,onFocus:h,readOnly:g,required:_=!1,tabIndex:v,type:b,value:x,slots:S={},slotProps:C={},...w}=e,{nativeButton:T,...E}=w,[D,ee]=A({controlled:r,default:!!o,name:`SwitchBase`,state:`checked`}),O=y(),k=e=>{h&&h(e),O&&O.onFocus&&O.onFocus(e)},te=e=>{p&&p(e),O&&O.onBlur&&O.onBlur(e)},ne=e=>{if(e.nativeEvent.defaultPrevented||g)return;let t=e.target.checked;ee(t),m&&m(e,t)},j=s;O&&j===void 0&&(j=O.disabled);let re=b===`checkbox`||b===`radio`,M={...e,checked:D,disabled:j,disableFocusRipple:c,edge:l},N=We(M),P={slots:S,slotProps:C},[F,I]=i(`root`,{ref:t,elementType:Ge,className:N.root,shouldForwardComponentProp:!0,externalForwardedProps:{...P,component:`span`,...E},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),k(t)},onBlur:t=>{e.onBlur?.(t),te(t)}}),ownerState:M,additionalProps:{centerRipple:!0,focusRipple:!c,role:void 0,tabIndex:null,internalDisabledThemeFocusVisible:!0}}),[ie,L]=i(`input`,{elementType:Ke,className:N.input,externalForwardedProps:P,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),ne(t)}}),ownerState:M,additionalProps:{autoFocus:n,checked:r,defaultChecked:o,disabled:j,id:re?d:void 0,name:f,readOnly:g,required:_,tabIndex:v,type:b,...b===`checkbox`&&x===void 0?{}:{value:x}}});return(0,Q.jsxs)(F,{...I,children:[(0,Q.jsx)(ie,{...L}),D?a:u]})}),Je=M((0,Q.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=M((0,Q.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=M((0,Q.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${L(r)}`,`size${L(i)}`]},o=P(a,Re,t);return{...t,...o}},Qe=q(qe,{shouldForwardProp:e=>G(e)||e===`classes`,name:`MuiCheckbox`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${L(n.size)}`],n.color!=="default"&&t[`color${L(n.color)}`]]}})(B(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.focusVisible&&{[`&.${x.focusVisible} svg:first-of-type`]:{...De,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(c()).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(c()).map(([t])=>({props:{color:t},style:{[`&.${ze.checked}, &.${ze.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${ze.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:`transparent`}}}}]}))),$e=(0,Q.jsx)(Ye,{}),et=(0,Q.jsx)(Je,{}),tt=(0,Q.jsx)(Xe,{}),nt=Z.forwardRef(function(t,n){let r=e({props:t,name:`MuiCheckbox`}),{checkedIcon:a=$e,color:o=`primary`,icon:s=et,indeterminate:c=!1,indeterminateIcon:l=tt,size:u=`medium`,disableRipple:d=!1,className:f,slots:p={},slotProps:m={},...h}=r,g=c?l:s,_=c?l:a,v={...r,disableRipple:d,color:o,indeterminate:c,size:u},y=Ze(v),b=m.input,[x,S]=i(`root`,{ref:n,elementType:Qe,className:Y(y.root,f),shouldForwardComponentProp:!0,externalForwardedProps:{slots:p,slotProps:m,...h},ownerState:v,additionalProps:{type:`checkbox`,icon:Z.cloneElement(g,{fontSize:g.props.fontSize??u}),checkedIcon:Z.cloneElement(_,{fontSize:_.props.fontSize??u}),disableRipple:r.disableRipple,slots:p,slotProps:{input:E(typeof b==`function`?b(v):b,{"data-indeterminate":c,"aria-checked":c?`mixed`:void 0})}}});return(0,Q.jsx)(x,{...S,classes:y})}),rt={border:0,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`};function it(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}var at=2,ot=[],st={};function ct(e,t,n,r,i){return n===1?Math.min(e+t,i):Math.max(e-t,r)}function lt(e,t){return e-t}function ut(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)??st;return r==null?r:n>=0&&e[n]===e[r]?n:r}function dt(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 ft(e,t,n){return(e-t)*100/(n-t)}function pt(e,t,n){return(n-t)*e+t}function mt(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 ht(e,t,n){let r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(mt(t)))}function gt(e,t,n){let r=e.slice();return r[n]=t,r.sort(lt)}function _t(e,t,n,r){let i=m(e.current),a=re(i);if(!le(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 vt(e,t){return typeof e==`number`&&typeof t==`number`?e===t:typeof e==`object`&&typeof t==`object`&&it(e,t)}var yt={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}%`})}},bt=e=>e;function xt(e){let{"aria-labelledby":t,defaultValue:n,disabled:i=!1,disableSwap:a=!1,isRtl:o=!1,marks:s=!1,max:c=100,min:l=0,name:u,onChange:d,onChangeCommitted:p,orientation:h=`horizontal`,rootRef:g,scale:_=bt,step:v=1,shiftStep:y=10,tabIndex:b,value:x}=e,S=Z.useRef(void 0),C=Z.useRef(null),[w,T]=Z.useState(-1),[E,D]=Z.useState(-1),[ee,O]=Z.useState(!1),k=Z.useRef(0),A=Z.useRef(-1),te=Z.useRef(!1),j=Z.useRef(-1),M=f(()=>{C.current!=null&&(cancelAnimationFrame(C.current),C.current=null)}),N=Z.useRef(null),[P,F]=ne({controlled:x,default:n??l,name:`Slider`}),I=f((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}}),N.current=t,d?.(i,t,n)}),ie=Array.isArray(P),L=Z.useMemo(()=>{if(typeof P==`number`)return[ke(P,l,c)];if(P==null)return[l];let e=P.slice().sort(lt);for(let t=0;t<e.length;t+=1){let n=e[t];e[t]=n==null?l:ke(n,l,c)}return e},[P,l,c]),R=Z.useMemo(()=>{if(s===!0&&v!=null){let e=Array(Math.floor((c-l)/v)+1);for(let t=0;t<e.length;t+=1)e[t]={value:l+v*t};return e}return Array.isArray(s)?s:ot},[s,v,l,c]),z=Z.useMemo(()=>{let e=Array(R.length);for(let t=0;t<R.length;t+=1)e[t]=R[t].value;return e},[R]),[ae,B]=Z.useState(-1),V=Z.useRef(null),H=r(g,V),se=e=>t=>{let n=Number(t.currentTarget.getAttribute(`data-index`));fe(t.target)&&B(n),D(n),e?.onFocus?.(t)},ce=e=>t=>{fe(t.target)||B(-1),D(-1),e?.onBlur?.(t)},U=(e,t)=>{let n=Number(e.currentTarget.getAttribute(`data-index`)),r=L[n],i=z.indexOf(r),o=t;if(R&&v==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=ke(o,l,c),ie){a&&(o=ke(o,L[n-1]||-1/0,L[n+1]||1/0));let e=o;o=gt(L,o,n);let t=n;a||(t=o.indexOf(e)),_t(V,t)}F(o),B(n),d&&!vt(o,P)&&I(e,o,n),p&&p(e,N.current??o)},ue=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(v!=null){let e=t.shiftKey?y:v;switch(t.key){case`ArrowUp`:r=ct(n,e,1,l,c);break;case`ArrowRight`:r=ct(n,e,o?-1:1,l,c);break;case`ArrowDown`:r=ct(n,e,-1,l,c);break;case`ArrowLeft`:r=ct(n,e,o?1:-1,l,c);break;case`PageUp`:r=ct(n,y,1,l,c);break;case`PageDown`:r=ct(n,y,-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&&U(t,r)}e?.onKeyDown?.(t)};oe(()=>{let e=re(m(V.current));i&&le(V.current,e)&&e!=null&&`blur`in e&&e.blur()},[i]),i&&w!==-1&&T(-1),i&&ae!==-1&&B(-1);let de=e=>t=>{e.onChange?.(t),U(t,t.currentTarget.valueAsNumber)},pe=Z.useRef(void 0),me=h;o&&h===`horizontal`&&(me+=`-reverse`);let he=e=>{let{current:t}=V;if(!t)return null;let{width:n,height:r,bottom:i,left:o}=t.getBoundingClientRect(),s;s=me.startsWith(`vertical`)?(i-e.y)/r:(e.x-o)/n,me.includes(`-reverse`)&&(s=1-s);let u;if(u=pt(s,l,c),v)u=ht(u,v,l);else{let e=ut(z,u);u=z[e]}u=ke(u,l,c);let d=0;if(ie){let e=pe.current!==-1;d=e?pe.current:ut(L,u,A.current),a&&(u=ke(u,L[d-1]||-1/0,L[d+1]||1/0));let t=u;u=gt(L,u,d),a&&e||(d=u.indexOf(t),pe.current=d)}return{newValue:u,activeIndex:d}},ge=f(e=>{if(`pointerId`in e&&e.pointerId!==j.current)return;let t=dt(e,S);if(!t)return;if(k.current+=1,e.type===`pointermove`&&e.buttons===0){_e(e);return}let n=he(t);n&&(_t(V,n.activeIndex,T,!1),A.current=n.activeIndex,F(n.newValue),!ee&&k.current>at&&O(!0),d&&!vt(n.newValue,P)&&I(e,n.newValue,n.activeIndex))}),_e=f(e=>{if(`pointerId`in e&&e.pointerId!==j.current)return;let t=dt(e,S);if(O(!1),!t)return;let n=he(t);T(-1),e.type===`touchend`&&D(-1),n&&p&&p(e,N.current??n.newValue),`pointerType`in e&&V.current?.hasPointerCapture(e.pointerId)&&V.current.releasePointerCapture(e.pointerId),S.current=void 0,j.current=-1,W()}),ve=f(e=>{if(i)return;if(te.current){te.current=!1;let t=e.changedTouches[0];t!=null&&(S.current=t.identifier);return}let t=e.changedTouches[0];t!=null&&(S.current=t.identifier);let n=dt(e,S);if(n!==!1){pe.current=-1;let t=he(n);t&&(_t(V,t.activeIndex,T,!1),A.current=t.activeIndex,F(t.newValue),d&&!vt(t.newValue,P)&&I(e,t.newValue,t.activeIndex))}k.current=0;let r=m(V.current);r.addEventListener(`touchmove`,ge,{passive:!0}),r.addEventListener(`touchend`,_e,{passive:!0})}),W=Z.useCallback(()=>{let e=m(V.current);e.removeEventListener(`pointermove`,ge),e.removeEventListener(`pointerup`,_e),e.removeEventListener(`touchmove`,ge),e.removeEventListener(`touchend`,_e)},[_e,ge]);Z.useEffect(()=>{let e=V.current;if(e)return e.addEventListener(`touchstart`,ve,{passive:!0}),()=>{e.removeEventListener(`touchstart`,ve),M(),W()}},[W,ve,M]),Z.useEffect(()=>{i&&(W(),M())},[i,W,M]);let ye=e=>t=>{if(e.onPointerDown?.(t),t.pointerType===`touch`&&(te.current=!0),i||t.defaultPrevented||t.button!==0)return;let n=dt(t,S);if(n!==!1){pe.current=-1;let e=he(n);if(e){let n=V.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),r=m(V.current),i=n!=null&&n===re(r);T(e.activeIndex),A.current=e.activeIndex,i?t.preventDefault():(M(),C.current=requestAnimationFrame(()=>{C.current=null,_t(V,e.activeIndex,void 0,!1)})),F(e.newValue),d&&!vt(e.newValue,P)&&I(t,e.newValue,e.activeIndex)}}k.current=0,j.current=t.pointerId;let r=m(V.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}r.addEventListener(`pointermove`,ge,{passive:!0}),r.addEventListener(`pointerup`,_e)},G=ft(ie?L[0]:l,l,c),be=ft(L[L.length-1],l,c)-G,xe=(e=st)=>{let t=je(e),n={onPointerDown:ye(t)},r={...t,...n};return{...e,ref:H,...r}},Se=e=>t=>{e.onMouseOver?.(t);let n=Number(t.currentTarget.getAttribute(`data-index`));D(n)},K=e=>t=>{e.onMouseLeave?.(t),D(-1)},Ce=(e=st)=>{let t=je(e),n={onMouseOver:Se(t),onMouseLeave:K(t)};return{...e,...t,...n}},we=e=>{let t;return ie?w===e?t=2:A.current===e&&(t=1):w===e&&(t=1),{pointerEvents:w!==-1&&w!==e?`none`:void 0,zIndex:t}},Te;return h===`vertical`&&(Te=o?`vertical-rl`:`vertical-lr`),{active:w,axis:me,axisProps:yt,dragging:ee,focusedThumbIndex:ae,getHiddenInputProps:(n=st)=>{let r=je(n),a={onChange:de(r),onFocus:se(r),onBlur:ce(r),onKeyDown:ue(r)},s={...r,...a};return{tabIndex:b,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":_(c),"aria-valuemin":_(l),name:u,type:`range`,min:e.min,max:e.max,step:e.step===null&&e.marks?`any`:e.step??void 0,disabled:i,...n,...s,style:{...rt,direction:o?`rtl`:`ltr`,width:`100%`,height:`100%`,writingMode:Te}}},getRootProps:xe,getThumbProps:Ce,marks:R,open:E,range:ie,rootRef:H,trackLeap:be,trackOffset:G,values:L,getThumbStyle:we}}var St=e=>{let{open:t}=e;return{offset:Y(t&&X.valueLabelOpen),circle:X.valueLabelCircle,label:X.valueLabelLabel}};function Ct(e){let{children:t,className:n,value:r}=e,i=St(e);return t?Z.cloneElement(t,{className:t.props.className},(0,Q.jsxs)(Z.Fragment,{children:[t.props.children,(0,Q.jsx)(`span`,{className:Y(i.offset,n),"aria-hidden":!0,children:(0,Q.jsx)(`span`,{className:i.circle,children:(0,Q.jsx)(`span`,{className:i.label,children:r})})})]})):null}function wt(e){return e}var Tt=q(`span`,{name:`MuiSlider`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${L(n.color)}`],n.size!==`medium`&&t[`size${L(n.size)}`],n.marked&&t.marked,n.orientation===`vertical`&&t.vertical,n.track===`inverted`&&t.trackInverted,n.track===!1&&t.trackFalse]}})(B(({theme:e})=>({borderRadius:12,boxSizing:`content-box`,display:`inline-block`,position:`relative`,cursor:`pointer`,touchAction:`none`,WebkitTapHighlightColor:`transparent`,"@media print":{colorAdjust:`exact`},[`&.${X.disabled}`]:{pointerEvents:`none`,cursor:`default`,color:(e.vars||e).palette.grey[400]},[`&.${X.dragging}`]:{[`& .${X.thumb}, & .${X.track}`]:{transition:`none`}},variants:[...Object.entries(e.palette).filter(c()).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}}]}))),Et=q(`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}}]}),Dt=q(`span`,{name:`MuiSlider`,slot:`Track`})(B(({theme:e})=>({display:`block`,position:`absolute`,borderRadius:`inherit`,border:`1px solid currentColor`,backgroundColor:`currentColor`,...T(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(c()).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)})}}}))]}))),Ot=q(`span`,{name:`MuiSlider`,slot:`Thumb`})(B(({theme:e})=>({position:`absolute`,width:20,height:20,boxSizing:`border-box`,borderRadius:`50%`,outline:0,backgroundColor:`currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,...T(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%)`},[`&.${X.disabled}`]:{"&:hover":{boxShadow:`none`}},...e.focusVisible&&{[`&.${X.focusVisible}`]:{...De,...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(c()).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&&{[`&.${X.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:`none`}}},[`&.${X.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),kt=q(Ct,{name:`MuiSlider`,slot:`ValueLabel`})(B(({theme:e})=>({zIndex:1,whiteSpace:`nowrap`,...e.typography.body2,fontWeight:500,...T(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%`},[`&.${X.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%`},[`&.${X.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`}}]}))),At=q(`span`,{name:`MuiSlider`,slot:`Mark`,shouldForwardProp:e=>Te(e)&&e!==`markActive`,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(B(({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}}]}))),jt=q(`span`,{name:`MuiSlider`,slot:`MarkLabel`,shouldForwardProp:e=>Te(e)&&e!==`markLabelActive`})(B(({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}}]}))),Mt=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${L(s)}`,c&&`size${L(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 P(l,Be,o)},Nt=({children:e})=>e,Pt=Z.forwardRef(function(t,n){let r=e({props:t,name:`MuiSlider`}),a=z(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":c,color:l=`primary`,classes:u,className:d,disableSwap:f=!1,disabled:p=!1,getAriaLabel:m,getAriaValueText:h,marks:g=!1,max:_=100,min:v=0,name:y,onChange:b,onChangeCommitted:x,orientation:S=`horizontal`,shiftStep:w=10,size:T=`medium`,step:E=1,scale:D=wt,slotProps:ee={},slots:O={},tabIndex:k,track:A=`normal`,value:te,valueLabelDisplay:ne=`off`,valueLabelFormat:j=wt,...re}=r,M={...r,isRtl:a,max:_,min:v,classes:u,disabled:p,disableSwap:f,orientation:S,marks:g,color:l,size:T,step:E,shiftStep:w,scale:D,track:A,valueLabelDisplay:ne,valueLabelFormat:j},{axisProps:N,getRootProps:P,getHiddenInputProps:F,getThumbProps:I,open:ie,active:L,axis:R,focusedThumbIndex:ae,range:oe,dragging:B,marks:V,values:H,trackOffset:se,trackLeap:ce,getThumbStyle:le}=xt({...M,rootRef:n});M.marked=V.length>0&&V.some(e=>e.label),M.dragging=B,M.focusedThumbIndex=ae;let U=Mt(M),ue={slots:O,slotProps:ee},[de,fe]=i(`root`,{elementType:Tt,getSlotProps:P,externalForwardedProps:{...ue,...re},ownerState:M,className:[U.root,d]}),[pe,me]=i(`rail`,{elementType:Et,externalForwardedProps:ue,ownerState:M,className:U.rail}),[he,ge]=i(`track`,{elementType:Dt,externalForwardedProps:ue,additionalProps:{style:{...N[R].offset(se),...N[R].leap(ce)}},ownerState:M,className:U.track}),[_e,ve]=i(`thumb`,{elementType:Ot,getSlotProps:I,externalForwardedProps:ue,ownerState:M,className:U.thumb}),[W,ye]=i(`valueLabel`,{elementType:kt,externalForwardedProps:ue,ownerState:M,className:U.valueLabel}),[G,be]=i(`mark`,{elementType:At,externalForwardedProps:ue,ownerState:M,className:U.mark}),[xe,Se]=i(`markLabel`,{elementType:jt,externalForwardedProps:ue,ownerState:M,className:U.markLabel}),[K,Ce]=i(`input`,{elementType:`input`,getSlotProps:F,externalForwardedProps:ue,ownerState:M});return(0,Q.jsxs)(de,{...fe,children:[(0,Q.jsx)(pe,{...me}),(0,Q.jsx)(he,{...ge}),V.filter(e=>e.value>=v&&e.value<=_).map((e,t)=>{let n=ft(e.value,v,_),r=N[R].offset(n),i;return i=A===!1?H.includes(e.value):A===`normal`&&(oe?e.value>=H[0]&&e.value<=H[H.length-1]:e.value<=H[0])||A===`inverted`&&(oe?e.value<=H[0]||e.value>=H[H.length-1]:e.value>=H[0]),(0,Q.jsxs)(Z.Fragment,{children:[(0,Q.jsx)(G,{"data-index":t,...be,...!C(G)&&{markActive:i},style:{...r,...be.style},className:Y(be.className,i&&U.markActive)}),e.label==null?null:(0,Q.jsx)(xe,{"aria-hidden":!0,"data-index":t,...Se,...!C(xe)&&{markLabelActive:i},style:{...r,...Se.style},className:Y(U.markLabel,Se.className,i&&U.markLabelActive),children:e.label})]},t)}),H.map((e,t)=>{let n=ft(e,v,_),r=N[R].offset(n),i=ne===`off`?Nt:W;return(0,Q.jsx)(i,{...!C(i)&&{valueLabelFormat:j,valueLabelDisplay:ne,value:typeof j==`function`?j(D(e),t):j,index:t,open:ie===t||L===t||ne===`on`,disabled:p},...ye,children:(0,Q.jsx)(_e,{"data-index":t,...ve,className:Y(U.thumb,ve.className,L===t&&U.active,ae===t&&U.focusVisible),style:{...r,...le(t),...ve.style},children:(0,Q.jsx)(K,{"data-index":t,"aria-label":m?m(t):o,"aria-valuenow":D(e),"aria-labelledby":c,"aria-valuetext":h?h(D(e),t):s,value:H[t],...Ce})})},t)})]})}),Ft=Z.createContext({}),It=Z.createContext(void 0);function Lt(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}function Rt(e,t){let{children:n,disabled:r=!1,selected:i=!1,value:a}=e,o=ie(),s=N({id:a,ref:t,disabled:r,selected:i}),c=o.getItemMap().size===0&&i?0:s.tabIndex;return Z.cloneElement(Z.Children.only(n),{...s,tabIndex:n.props.tabIndex??c})}var zt=Z.forwardRef(Rt),Bt=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${L(a)}`,o]};return P(s,Ve,t)},Vt=q(o,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${L(n.size)}`]]}})(B(({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(c()).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)}}]}))),Ht=Z.forwardRef(function(t,n){let{value:r,isRovingTabIndex:i,...a}=Z.useContext(Ft),o=Z.useContext(It),s=H({...a,selected:Lt(t.value,r)},t),c=e({props:s,name:`MuiToggleButton`}),{children:l,className:u,color:d=`standard`,disabled:f=!1,disableFocusRipple:p=!1,fullWidth:m=!1,onChange:h,onClick:g,selected:_,size:v=`medium`,value:y,...b}=c,x={...c,color:d,disabled:f,disableFocusRipple:p,fullWidth:m,size:v},S=Bt(x),C=e=>{g&&(g(e,y),e.defaultPrevented)||h&&h(e,y)},w=o||``,T=(0,Q.jsx)(Vt,{className:Y(a.className,S.root,u,w),internalNativeButton:!0,disabled:f,focusRipple:!p,ref:i?void 0:n,onClick:C,onChange:h,value:y,ownerState:x,"aria-pressed":_,...b,children:l});return i?(0,Q.jsx)(zt,{disabled:f,selected:_,ref:n,value:y,children:T}):T});function Ut(e){return Z.Children.toArray(e).filter(e=>Z.isValidElement(e))}function Wt(e){return W(`MuiToggleButtonGroup`,e)}var $=K(`MuiToggleButtonGroup`,[`root`,`selected`,`horizontal`,`vertical`,`disabled`,`grouped`,`fullWidth`,`firstButton`,`lastButton`,`middleButton`]),Gt=e=>{let{classes:t,orientation:n,fullWidth:r,disabled:i}=e;return P({root:[`root`,n,r&&`fullWidth`],grouped:[`grouped`,i&&`disabled`],firstButton:[`firstButton`],lastButton:[`lastButton`],middleButton:[`middleButton`]},Wt,t)},Kt=q(`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]}})(B(({theme:e})=>({display:`inline-flex`,borderRadius:(e.vars||e).shape.borderRadius,...e.focusVisible&&{[`& .${$.grouped}.${x.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`}}}]}))),qt=Z.forwardRef(function(t,n){let r=e({props:t,name:`MuiToggleButtonGroup`}),{children:i,className:a,color:o=`standard`,disabled:s=!1,exclusive:c=!1,fullWidth:l=!1,onChange:u,orientation:d=`horizontal`,size:f=`medium`,value:p,...m}=r,h={...r,disabled:s,fullWidth:l,orientation:d,size:f},g=Gt(h),_=z(),v=Z.useCallback((e,t)=>{if(!u)return;let n=p&&p.indexOf(t),r;p&&n>=0?(r=p.slice(),r.splice(n,1)):r=p?p.concat(t):[t],u(e,r)},[u,p]),y=Z.useCallback((e,t)=>{u&&u(e,p===t?null:t)},[u,p]),b=Z.useMemo(()=>({className:g.grouped,onChange:c?y:v,value:p,size:f,fullWidth:l,color:o,disabled:s,isRovingTabIndex:!0}),[g.grouped,c,y,v,p,f,l,o,s]),x=Ut(i),S=x.length,C=e=>{let t=e===0,n=e===S-1;return t&&n?``:t?g.firstButton:n?g.lastButton:g.middleButton},w=Ae({orientation:d,isRtl:_}),T=w.getContainerProps(n,m.onFocus,m.onKeyDown);return(0,Q.jsx)(Kt,{role:`group`,className:Y(g.root,a),ownerState:h,...m,...T,children:(0,Q.jsx)(Fe.Provider,{value:w,children:(0,Q.jsx)(Ft.Provider,{value:b,children:x.map((e,t)=>(0,Q.jsx)(It.Provider,{value:C(t),children:e},t))})})})});function Jt(e={}){let{autoHideDuration:n=null,disableWindowBlurListener:r=!1,onClose:i,open:a,resumeHideDuration:o}=e,s=t();Z.useEffect(()=>{if(!a)return;function e(e){e.defaultPrevented||e.key===`Escape`&&i?.(e,`escapeKeyDown`)}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[a,i]);let c=f((e,t)=>{i?.(e,t)}),l=f(e=>{i&&e!=null&&s.start(e,()=>{c(null,`timeout`)})});Z.useEffect(()=>(a&&l(n),s.clear),[a,n,l,s]);let u=e=>{i?.(e,`clickaway`)},d=s.clear,p=Z.useCallback(()=>{n!=null&&l(o??n*.5)},[n,o,l]),m=e=>t=>{let n=e.onBlur;n?.(t),p()},h=e=>t=>{let n=e.onFocus;n?.(t),d()},g=e=>t=>{let n=e.onMouseEnter;n?.(t),d()},_=e=>t=>{let n=e.onMouseLeave;n?.(t),p()};return Z.useEffect(()=>{if(!r&&a)return window.addEventListener(`focus`,p),window.addEventListener(`blur`,d),()=>{window.removeEventListener(`focus`,p),window.removeEventListener(`blur`,d)}},[r,a,p,d]),{getRootProps:(t={})=>{let n={...je(e),...je(t)};return{role:`presentation`,...t,...n,onBlur:m(n),onFocus:h(n),onMouseEnter:g(n),onMouseLeave:_(n)}},onClickAway:u}}function Yt(e){return e.substring(2).toLowerCase()}function Xt(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Zt(e){let{children:t,disableReactTree:n=!1,mouseEvent:i=`onClick`,onClickAway:a,touchEvent:o=`onTouchEnd`}=e,s=Z.useRef(!1),c=Z.useRef(null),l=Z.useRef(!1),u=Z.useRef(!1);Z.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);let d=r(D(t),c),p=f(e=>{let t=u.current;u.current=!1;let r=m(c.current);if(!l.current||!c.current||`clientX`in e&&Xt(e,r))return;if(s.current){s.current=!1;return}let i;i=e.composedPath?e.composedPath().includes(c.current):!se(r.documentElement,e.target)||se(c.current,e.target),!i&&(n||!t)&&a(e)}),h=e=>n=>{u.current=!0;let r=t.props[e];r&&r(n)},g={ref:d};return o!==!1&&(g[o]=h(o)),Z.useEffect(()=>{if(o!==!1){let e=Yt(o),t=m(c.current),n=()=>{s.current=!0};return t.addEventListener(e,p),t.addEventListener(`touchmove`,n),()=>{t.removeEventListener(e,p),t.removeEventListener(`touchmove`,n)}}},[p,o]),i!==!1&&(g[i]=h(i)),Z.useEffect(()=>{if(i!==!1){let e=Yt(i),t=m(c.current);return t.addEventListener(e,p),()=>{t.removeEventListener(e,p)}}},[p,i]),Z.cloneElement(t,g)}function Qt(e){return W(`MuiSnackbarContent`,e)}K(`MuiSnackbarContent`,[`root`,`message`,`action`]);var $t=e=>{let{classes:t}=e;return P({root:[`root`],action:[`action`],message:[`message`]},Qt,t)},en=q(V,{name:`MuiSnackbarContent`,slot:`Root`})(B(({theme:e})=>{let t=e.palette.mode===`light`?.8:.98;return{...e.focusVisible&&I(`0 0 0 4px ${(e.vars||e).palette.background.default}`),...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(_e(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:_e(e.palette.background.default,t),display:`flex`,alignItems:`center`,flexWrap:`wrap`,padding:`6px 16px`,flexGrow:1,[e.breakpoints.up(`sm`)]:{flexGrow:`initial`,minWidth:288}}})),tn=q(`div`,{name:`MuiSnackbarContent`,slot:`Message`})({padding:`8px 0`}),nn=q(`div`,{name:`MuiSnackbarContent`,slot:`Action`})({display:`flex`,alignItems:`center`,marginLeft:`auto`,paddingLeft:16,marginRight:-8}),rn=Z.forwardRef(function(t,n){let r=e({props:t,name:`MuiSnackbarContent`}),{action:i,className:a,message:o,role:s=`alert`,...c}=r,l=r,u=$t(l);return(0,Q.jsxs)(en,{role:s,elevation:6,className:Y(u.root,a),ownerState:l,ref:n,...c,children:[(0,Q.jsx)(tn,{className:u.message,ownerState:l,children:o}),i?(0,Q.jsx)(nn,{className:u.action,ownerState:l,children:i}):null]})});function an(e){return W(`MuiSnackbar`,e)}K(`MuiSnackbar`,[`root`,`anchorOriginTopCenter`,`anchorOriginBottomCenter`,`anchorOriginTopRight`,`anchorOriginBottomRight`,`anchorOriginTopLeft`,`anchorOriginBottomLeft`]);var on=e=>{let{classes:t,anchorOrigin:n}=e,r={root:[`root`,`anchorOrigin${L(n.vertical)}${L(n.horizontal)}`]};return P(r,an,t)},sn=q(`div`,{name:`MuiSnackbar`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`anchorOrigin${L(n.anchorOrigin.vertical)}${L(n.anchorOrigin.horizontal)}`]]}})(B(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:`fixed`,display:`flex`,left:8,right:8,justifyContent:`center`,alignItems:`center`,variants:[{props:({ownerState:e})=>e.anchorOrigin.vertical===`top`,style:{top:8,[e.breakpoints.up(`sm`)]:{top:24}}},{props:({ownerState:e})=>e.anchorOrigin.vertical!==`top`,style:{bottom:8,[e.breakpoints.up(`sm`)]:{bottom:24}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`left`,style:{justifyContent:`flex-start`,[e.breakpoints.up(`sm`)]:{left:24,right:`auto`}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`right`,style:{justifyContent:`flex-end`,[e.breakpoints.up(`sm`)]:{right:24,left:`auto`}}},{props:({ownerState:e})=>e.anchorOrigin.horizontal===`center`,style:{[e.breakpoints.up(`sm`)]:{left:`50%`,right:`auto`,transform:`translateX(-50%)`}}}]}))),cn=Z.forwardRef(function(t,n){let r=e({props:t,name:`MuiSnackbar`}),a=de(),o={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:c,horizontal:l}={vertical:`bottom`,horizontal:`left`},autoHideDuration:u=null,children:d,className:f,disableWindowBlurListener:p=!1,message:m,onBlur:h,onClose:g,onFocus:_,onMouseEnter:v,onMouseLeave:y,open:b,resumeHideDuration:x,slots:S={},slotProps:C={},transitionDuration:w=o,...T}=r,E={...r,anchorOrigin:{vertical:c,horizontal:l},autoHideDuration:u,disableWindowBlurListener:p,transitionDuration:w},D=on(E),{getRootProps:ee,onClickAway:O}=Jt(E),[k,A]=Z.useState(!0),te={slots:S,slotProps:C},[ne,j]=i(`root`,{ref:n,className:[D.root,f],elementType:sn,getSlotProps:ee,externalForwardedProps:{...te,...T},ownerState:E}),[re,{ownerState:M,...N}]=i(`clickAwayListener`,{elementType:Zt,externalForwardedProps:te,getSlotProps:e=>({onClickAway:(...t)=>{let n=t[0];e.onClickAway?.(...t),!n?.defaultMuiPrevented&&O(...t)}}),ownerState:E}),[P,F]=i(`content`,{elementType:rn,shouldForwardComponentProp:!0,externalForwardedProps:te,additionalProps:{message:m,action:s},ownerState:E}),[I,ie]=i(`transition`,{elementType:ve,externalForwardedProps:te,getSlotProps:e=>({onEnter:(...t)=>{e.onEnter?.(...t),A(!1)},onExited:(...t)=>{e.onExited?.(...t),A(!0)}}),additionalProps:{appear:!0,in:b,timeout:w,direction:c===`top`?`down`:`up`},ownerState:E});return!b&&k?null:(0,Q.jsx)(re,{...N,...S.clickAwayListener&&{ownerState:M},children:(0,Q.jsx)(ne,{...j,children:(0,Q.jsx)(I,{...ie,children:d||(0,Q.jsx)(P,{...F})})})})});function ln(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function un(e,t,n,r={},i=()=>{}){let{ease:a=ln,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 dn={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`,pointerEvents:`none`};function fn(e){let{onChange:t,...n}=e,r=Z.useRef(),i=Z.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return d(()=>{let e=j(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=h(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),Z.useEffect(()=>{a(),t(r.current)},[t]),(0,Q.jsx)(`div`,{style:dn,...n,ref:i})}var pn=M((0,Q.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),mn=M((0,Q.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function hn(e){return W(`MuiTabScrollButton`,e)}var gn=K(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),_n=e=>{let{classes:t,orientation:n,disabled:r}=e;return P({root:[`root`,n,r&&`disabled`]},hn,t)},vn=q(o,{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,[`&.${gn.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),yn=Z.forwardRef(function(t,n){let r=e({props:t,name:`MuiTabScrollButton`}),{className:i,slots:a={},slotProps:o={},direction:s,orientation:c,disabled:l,...u}=r,{nativeButton:d,...f}=u,p=z(),m={isRtl:p,...r},h=_n(m),g=a.StartScrollButtonIcon??pn,_=a.EndScrollButtonIcon??mn,v=Ne({elementType:g,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:m}),y=Ne({elementType:_,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:m});return(0,Q.jsx)(vn,{component:`div`,className:Y(h.root,i),ref:n,role:null,ownerState:m,tabIndex:null,...f,style:{...f.style,...c===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${p?-90:90}deg)`}},children:s===`left`?(0,Q.jsx)(g,{...v}):(0,Q.jsx)(_,{...y})})});function bn(e){return W(`MuiTabs`,e)}var xn=K(`MuiTabs`,[`root`,`vertical`,`list`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),Sn=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return P({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`]},bn,c)},Cn=q(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${xn.scrollButtons}`]:t.scrollButtons},{[`& .${xn.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(B(({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:{[`& .${xn.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),wn=q(`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`}}]}),Tn=q(`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`}}]}),En=q(`span`,{name:`MuiTabs`,slot:`Indicator`})(B(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,...T(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}}]}))),Dn=q(fn)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),On={},kn=Z.forwardRef(function(t,n){let r=e({props:t,name:`MuiTabs`}),a=de(),o=z(),s=me(a.motion.reducedMotion,!1),{"aria-label":c,"aria-labelledby":l,action:u,centered:d=!1,children:f,className:p,component:m=`div`,allowScrollButtonsMobile:g=!1,indicatorColor:_=`primary`,onChange:v,orientation:y=`horizontal`,scrollButtons:b=`auto`,selectionFollowsFocus:x,slots:S={},slotProps:C={},textColor:w=`primary`,value:T,variant:E=`standard`,visibleScrollbar:D=!1,...ee}=r,O=E===`scrollable`,k=y===`vertical`,A=k?`scrollTop`:`scrollLeft`,ne=k?`top`:`left`,M=k?`bottom`:`right`,N=k?`clientHeight`:`clientWidth`,P=k?`height`:`width`,F={...r,component:m,allowScrollButtonsMobile:g,indicatorColor:_,orientation:y,vertical:k,scrollButtons:b,textColor:w,variant:E,visibleScrollbar:D,fixed:!O,hideScrollbar:O&&!D,scrollableX:O&&!k,scrollableY:O&&k,centered:d&&!O,scrollButtonsHideMobile:!g},I=Sn(F),ie=Ne({elementType:S.startScrollButtonIcon,externalSlotProps:C.startScrollButtonIcon,ownerState:F}),L=Ne({elementType:S.endScrollButtonIcon,externalSlotProps:C.endScrollButtonIcon,ownerState:F}),[R,ae]=Z.useState(!1),[oe,B]=Z.useState(On),[V,H]=Z.useState(!1),[se,ce]=Z.useState(!1),[U,ue]=Z.useState(!1),fe=T===!1?null:T,[pe,he]=Z.useState(!1),[ge,_e]=Z.useState({overflow:`hidden`,scrollbarWidth:0}),ve=new Map,W=Z.useRef(null),ye=Z.useRef(null),G={slots:S,slotProps:C},be=()=>{let e=W.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&&T!==!1){let e=ye.current.children;if(e.length>0){let t=e[ve.get(T)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},xe=te(()=>{let{tabsMeta:e,tabMeta:t}=be(),n=0,r;k?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=o?`right`:`left`,t&&e&&(n=(o?-1:1)*(t[r]-e[r]+e.scrollLeft)));let i={[r]:n,[P]:t?t[P]:0};if(typeof oe[r]!=`number`||typeof oe[P]!=`number`)B(i);else{let e=Math.abs(oe[r]-i[r]),t=Math.abs(oe[P]-i[P]);(e>=1||t>=1)&&B(i)}}),Se=(e,{animation:t=!0}={})=>{t&&!s.shouldReduceMotion?un(A,W.current,e,{duration:a.transitions.duration.standard}):W.current[A]=e},K=e=>{let t=W.current[A];t+=k?e:e*(o?-1:1),Se(t)},we=()=>{let e=W.current[N],t=0,n=Array.from(ye.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[N]>e){r===0&&(t=e);break}t+=i[N]}return t},Te=()=>{K(-1*we())},Ee=()=>{K(we())},[De,{onChange:Oe,...q}]=i(`scrollbar`,{className:Y(I.scrollableX,I.hideScrollbar),elementType:Dn,shouldForwardComponentProp:!0,externalForwardedProps:G,ownerState:F}),J=Z.useCallback(e=>{Oe?.(e),_e({overflow:null,scrollbarWidth:e})},[Oe]),[ke,je]=i(`scrollButtons`,{className:I.scrollButtons,elementType:yn,externalForwardedProps:G,ownerState:F,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:S.startScrollButtonIcon,EndScrollButtonIcon:S.endScrollButtonIcon},slotProps:{startScrollButtonIcon:ie,endScrollButtonIcon:L}}}),Me=()=>{let e={};e.scrollbarSizeListener=O?(0,Q.jsx)(De,{...q,onChange:J}):null;let t=O&&(b===`auto`&&(V||se)||b===!0);return e.scrollButtonStart=t?(0,Q.jsx)(ke,{direction:o?`right`:`left`,onClick:Te,disabled:!V,...je}):null,e.scrollButtonEnd=t?(0,Q.jsx)(ke,{direction:o?`left`:`right`,onClick:Ee,disabled:!se,...je}):null,e},Pe=te(e=>{let{tabsMeta:t,tabMeta:n}=be();if(n&&t){if(n[ne]<t[ne]){let r=t[A]+(n[ne]-t[ne]);Se(r,{animation:e})}else if(n[M]>t[M]){let r=t[A]+(n[M]-t[M]);Se(r,{animation:e})}}}),Ie=te(()=>{O&&b!==!1&&ue(!U)});Z.useEffect(()=>{let e=j(()=>{W.current&&xe()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Ie()},r=h(W.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,Ie]),Z.useEffect(()=>{let e=Array.from(ye.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&O&&b!==!1){let n=e[0],r=e[t-1],i={root:W.current,threshold:.99},a=new IntersectionObserver(e=>{H(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{ce(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[O,b,U,f?.length]),Z.useEffect(()=>{ae(!0)},[]),Z.useEffect(()=>{xe()}),Z.useEffect(()=>{Pe(On!==oe)},[Pe,oe]),Z.useImperativeHandle(u,()=>({updateIndicator:xe,updateScrollButtons:Ie}),[xe,Ie]);let[Re,ze]=i(`indicator`,{className:I.indicator,elementType:En,externalForwardedProps:G,ownerState:F,additionalProps:{style:oe}}),Be=(0,Q.jsx)(Re,{...ze}),X=Ae({activeItemId:pe?void 0:fe,orientation:y,isRtl:o}),Ve=X.getContainerProps(),He=Z.Children.toArray(f).filter(Z.isValidElement).map((e,t)=>{let n=e.props.value===void 0?t:e.props.value;return ve.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===T;return Z.cloneElement(e,{fullWidth:E===`fullWidth`,indicator:n&&!R&&Be,selected:n,selectionFollowsFocus:x,onChange:v,textColor:w,value:t})}),Ue=Me(),[We,Ge]=i(`root`,{ref:n,className:Y(I.root,p),elementType:Cn,externalForwardedProps:{...G,...ee,component:m},ownerState:F}),[Ke,qe]=i(`scroller`,{ref:W,className:I.scroller,elementType:wn,externalForwardedProps:G,ownerState:F,additionalProps:{style:{overflow:ge.overflow,[k?`margin${o?`Left`:`Right`}`:`marginBottom`]:D?void 0:-ge.scrollbarWidth}}}),Je=Le(Ve.ref,ye),Ye=e=>{let t=ye.current;re(Ce(t))?.getAttribute(`role`)===`tab`&&Ve.onKeyDown(e)},[Xe,Ze]=i(`list`,{ref:Je,className:I.list,elementType:Tn,externalForwardedProps:G,ownerState:F,getSlotProps:e=>({...e,onBlur:t=>{le(t.currentTarget,t.relatedTarget)||he(!1),e.onBlur?.(t)},onKeyDown:t=>{Ye(t),e.onKeyDown?.(t)},onFocus:t=>{he(!0),Ve.onFocus(t),e.onFocus?.(t)}})});return(0,Q.jsxs)(We,{...Ge,children:[Ue.scrollButtonStart,Ue.scrollbarSizeListener,(0,Q.jsxs)(Ke,{...qe,children:[(0,Q.jsx)(Xe,{"aria-label":c,"aria-labelledby":l,"aria-orientation":y===`vertical`?`vertical`:null,role:`tablist`,...Ze,children:(0,Q.jsx)(Fe.Provider,{value:X,children:He})}),R&&Be]}),Ue.scrollButtonEnd]})});function An(e){return W(`MuiTab`,e)}var jn=K(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`icon`]),Mn=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${L(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`icon`]};return P(l,An,t)},Nn=q(o,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${L(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${jn.icon}`]:t.icon}]}})(B(({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&&xe(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:{[`& > .${jn.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${jn.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${jn.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${jn.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${jn.selected}`]:{opacity:1},...e.focusVisible&&{[`&.${x.focusVisible}`]:{opacity:1}},[`&.${jn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${jn.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${jn.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${jn.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${jn.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)}}]}))),Pn=Z.forwardRef(function(t,n){let r=e({props:t,name:`MuiTab`}),{className:i,disabled:a=!1,disableFocusRipple:o=!1,fullWidth:s,icon:c,iconPosition:l=`top`,indicator:u,label:d,onChange:f,onClick:p,onFocus:m,selected:h,selectionFollowsFocus:g,textColor:_=`inherit`,value:v,wrapped:y=!1,...b}=r,x=ie(),S=N({id:v,ref:n,disabled:a,selected:h}),C=x.getItemMap().size===0&&h?0:S.tabIndex,w={...r,disabled:a,disableFocusRipple:o,selected:h,icon:!!c,iconPosition:l,label:!!d,fullWidth:s,textColor:_,wrapped:y},T=Mn(w),E=c&&d&&Z.isValidElement(c)?Z.cloneElement(c,{className:Y(T.icon,c.props.className)}):c;return(0,Q.jsxs)(Nn,{internalNativeButton:!0,focusRipple:!o,className:Y(T.root,i),ref:S.ref,role:`tab`,"aria-selected":h,disabled:a,onClick:e=>{!h&&f&&f(e,v),p&&p(e)},onFocus:e=>{g&&!h&&f&&f(e,v),m&&m(e)},tabIndex:C,ownerState:w,...b,children:[l===`top`||l===`start`?(0,Q.jsxs)(Z.Fragment,{children:[E,d]}):(0,Q.jsxs)(Z.Fragment,{children:[d,E]}),u]})}),Fn=`<!-- octopus-revision -->`,In=e=>String(e).padStart(2,`0`);function Ln(e){return`lab-lock-${`${e.getUTCFullYear()}${In(e.getUTCMonth()+1)}${In(e.getUTCDate())}T${In(e.getUTCHours())}${In(e.getUTCMinutes())}${In(e.getUTCSeconds())}Z`}.md`}var Rn=w(Se(),1),zn={width:340,height:640},Bn=`This browser can't open a Picture-in-Picture window.`;function Vn(e=globalThis){return`documentPictureInPicture`in e}function Hn(e=globalThis){let t=e.documentPictureInPicture;return t?t.requestWindow(zn):Promise.reject(Error(Bn))}var Un=[{id:`page`,label:`Page`},{id:`labels`,label:`Labels`},{id:`lists`,label:`Lists`},{id:`assistant`,label:`Assistant`}],Wn=[{id:`pageGutterMin`,kind:`slider`,group:`page`,label:`Gutter, at least`,hook:`pageGutterMin`,min:8,max:parseFloat(ee.max),step:2,unit:`px`,default:parseFloat(ee.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(s),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(l),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:n.light.band.opacity,dark:n.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:n.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(a),question:`How long a change of theme or mode crossfades, the whole page at once. 0 swaps it in a single frame.`}],Gn=[{id:`countStyle`,kind:`choice`,group:`labels`,label:`Count drawing`,attr:`countStyle`,default:S,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:p.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; ${p.kbd} is the kbd radius it defaults to.`}],Kn=[{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(pe),question:`How big a row's icon is beside its 14px label. Investigations drew 20px.`}],qn=[{id:`seamBlur`,kind:`slider`,group:`assistant`,label:`Seam shadow blur`,hook:`seamBlur`,min:0,max:40,step:1,unit:`px`,default:parseFloat(k.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.`}],Jn=[...Wn,...Gn,...Kn,...qn];function Yn(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 Xn(e,t){return(0,Z.useSyncExternalStore)(e.subscribe,()=>t(e.get()),()=>t(e.get()))}var Zn=`aistrike.lab`,Qn=[`light`,`dark`],$n=`data-ds-mode`;function er(e){return e.kind===`slider`&&typeof e.default==`object`}function tr(e,t){if(!er(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 nr(e){return e.getAttribute($n)===`light`?`light`:`dark`}function rr(e){if(e.kind===`slider`&&typeof e.default==`object`){let t=e.default;return Qn.map(n=>({key:tr(e,n),fallback:t[n]}))}return[{key:e.id,fallback:e.default}]}function ir(e,t){return e.kind===`slider`&&typeof e.default==`object`?e.default[t]:e.default}function ar(e){return Object.fromEntries(e.flatMap(rr).map(({key:e,fallback:t})=>[e,t]))}function or(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 sr(e,t){let n=typeof e==`object`&&e&&!Array.isArray(e)?e:{};return Object.fromEntries(t.flatMap(e=>rr(e).map(({key:t,fallback:r})=>{let i=n[t];return[t,or(e,i)?i:r]})))}function cr(e,t=localStorage){try{return sr(JSON.parse(t.getItem(`aistrike.lab`)??`null`),e)}catch{return ar(e)}}function lr(e,t=localStorage){try{t.setItem(Zn,JSON.stringify(e))}catch{}}function ur(e,t,n=document.documentElement,r=nr(n)){for(let i of t)if(i.kind===`choice`)i.attr!==void 0&&n.setAttribute(he[i.attr],String(e[i.id]??i.default));else if(i.hook!==void 0){let t=b[i.hook],a=ir(i,r),o=e[tr(i,r)]??a;o===a?n.style.removeProperty(t):n.style.setProperty(t,`${o}${i.kind===`slider`?i.unit:``}`)}}function dr(e,t=document.documentElement){for(let n of e)n.kind===`choice`?n.attr!==void 0&&t.removeAttribute(he[n.attr]):n.hook!==void 0&&t.style.removeProperty(b[n.hook])}var fr=(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:[$n]}),()=>{n.disconnect()}};function pr(e){let{controls:t}=e,n=e.root??document.documentElement,r=e.storage??localStorage,i=new Map(t.map(e=>[e.id,e])),a=Yn(cr(t,r));ur(a.get(),t,n);let o=e=>{ur(e,t,n),lr(e,r),a.set(e)},s=(e.observeMode??fr)(n,()=>{ur(a.get(),t,n),a.set({...a.get()})});return{store:a,set(e,t,r){let s=i.get(e);s===void 0||!or(s,t)||o({...a.get(),[tr(s,r??nr(n))]:t})},reset(){o(ar(t))},dispose(){s()}}}var mr=`docs/decisions/2026-10-21-design-lab-in-octopus.md`,hr=[`light`,`dark`],gr=(e,t)=>`${t}${e.kind===`slider`?e.unit:``}`;function _r(e){return e.kind===`choice`?e.attr===void 0?`—`:he[e.attr]:e.hook===void 0?`—`:b[e.hook]}function vr(e,t,n){return t.filter(e=>n.includes(e.id)).flatMap(t=>{let n=(n,r)=>{let i=tr(t,n??void 0);return{id:t.id,label:t.label,hook:_r(t),mode:n,old:gr(t,r),next:gr(t,e[i]??r)}};if(t.kind===`slider`&&typeof t.default==`object`&&er(t)){let e=t.default;return hr.map(t=>n(t,e[t]))}return[n(null,t.default)]})}function yr({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}${Fn}, ${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",`${mr}. Leave the change uncommitted.`,``,`## Clarifications`,``,`## Progress`,``].join(`
2
+ `)}var br={light:`Light`,dark:`Dark`},xr=e=>e.old!==e.next;function Sr(e){return e.map(e=>{let t=xr(e)?`${e.old} → ${e.next}`:`keep`;return e.mode===null?t:`${br[e.mode]}: ${t}`}).join(` · `)}function Cr({values:e,controls:t,onCancel:n,onConfirm:r}){let i=new Map(t.map(t=>[t.id,vr(e,[t],[t.id])])),[a,o]=(0,Z.useState)(()=>new Set(t.filter(e=>i.get(e.id)?.some(xr)).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,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ee,{children:`Lock in`}),(0,Q.jsxs)(be,{children:[(0,Q.jsx)(J,{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.`}),Un.map(e=>{let n=t.filter(t=>t.group===e.id);return n.length===0?null:(0,Q.jsxs)(O,{component:`section`,"aria-label":e.label,sx:{mb:1.5},children:[(0,Q.jsx)(J,{variant:`overline`,component:`h3`,sx:{display:`block`},children:e.label}),n.map(e=>(0,Q.jsxs)(O,{component:`label`,sx:{display:`flex`,alignItems:`center`,gap:1,cursor:`pointer`},children:[(0,Q.jsx)(nt,{size:`small`,checked:a.has(e.id),onChange:()=>s(e.id),slotProps:{input:{"aria-label":e.label}}}),(0,Q.jsx)(J,{variant:`body2`,component:`span`,sx:{flex:1},children:e.label}),(0,Q.jsx)(J,{variant:`caption`,component:`span`,sx:{fontFamily:v.mono,color:`var(--ds-text-quiet)`,textAlign:`right`},children:Sr(i.get(e.id)??[])})]},e.id))]},e.id)})]}),(0,Q.jsxs)(ue,{children:[(0,Q.jsx)(we,{variant:`ghost`,onClick:n,children:`Cancel`}),(0,Q.jsx)(we,{variant:`primary`,disabled:c===0,onClick:()=>r(t.filter(e=>a.has(e.id)).map(e=>e.id)),children:`Lock ${c}`})]})]})}function wr({open:e,onCancel:t,container:n,...r}){return(0,Q.jsx)(R,{open:e,onClose:t,container:n,fullWidth:!0,maxWidth:`sm`,children:(0,Q.jsx)(Cr,{...r,onCancel:t})})}var Tr=`style[data-ds-theme]`,Er=[`fonts.googleapis.com`,`fonts.bunny.net`,`use.typekit.net`,`fonts.adobe.com`];function Dr(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 Or(e,t){let n=e.head.querySelector(Tr),r=t.head.querySelector(Tr);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 kr=`data-ds-mirror-font`;function Ar(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[${kr}]`)){let e=t.createElement(`style`);e.setAttribute(kr,``),e.textContent=r,t.head.appendChild(e)}let i=new Set(Array.from(t.head.querySelectorAll(`link[${kr}]`),e=>e.href));for(let r of Array.from(e.head.querySelectorAll(`link[rel="stylesheet"]`))){if(!Er.some(e=>r.href.includes(e))||n.has(r.href)||i.has(r.href))continue;let e=t.createElement(`link`);e.setAttribute(kr,``),e.rel=`stylesheet`,e.href=r.href,t.head.appendChild(e),i.add(r.href)}}function jr(e,t){let n=()=>{Dr(e.documentElement,t.documentElement),Or(e,t)};n(),Ar(e,t);let r=new MutationObserver(n);r.observe(e.documentElement,{attributes:!0});let i=()=>Or(e,t),a=e.defaultView;return a?.addEventListener(u,i),()=>{r.disconnect(),a?.removeEventListener(u,i)}}var Mr=new Set([404,405]);function Nr(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 Pr(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 Fr(e,t,n){let{endpoint:r,fetch:i=fetch,download:a=Nr}=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 Pr(n),!n.ok&&!Mr.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 Ir=`6.0.0-alpha.10`,Lr=`/__octopus/lab/lock`;function Rr(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 zr=4,Br=`aria-label`,Vr={light:`Light`,dark:`Dark`},Hr=`var(--ds-text-quiet)`,Ur=e=>(String(e).split(`.`)[1]??``).length;function Wr(e,t){let n=Math.round((t-e.min)/e.step),r=Number((e.min+n*e.step).toFixed(Math.max(Ur(e.step),Ur(e.min))));return Math.min(e.max,Math.max(e.min,r))}function Gr({label:e,question:t}){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(J,{variant:`subtitle2`,component:`span`,children:e}),(0,Q.jsx)(J,{variant:`caption`,component:`p`,sx:{m:0,mb:.75,color:Hr},children:t})]})}function Kr({control:e,label:t,value:n,other:r,onChange:i}){return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`baseline`},children:[(0,Q.jsx)(J,{variant:`subtitle2`,component:`span`,children:t}),(0,Q.jsx)(J,{variant:`caption`,component:`span`,sx:{fontVariantNumeric:`tabular-nums`},children:`${n}${e.unit}`})]}),(0,Q.jsx)(J,{variant:`caption`,component:`p`,sx:{m:0,color:Hr},children:e.question}),(0,Q.jsx)(Pt,{size:`small`,"aria-label":t,min:e.min,max:e.max,step:e.step,value:n,onChange:(...[,t])=>i(Wr(e,Array.isArray(t)?t[0]??n:t))}),r===void 0?null:(0,Q.jsx)(J,{variant:`caption`,component:`p`,sx:{m:0,color:Hr,fontVariantNumeric:`tabular-nums`},children:`${Vr[r.mode]}: ${r.value}${e.unit}`})]})}function qr({control:e,value:t,onChange:n}){return e.options.length>zr?(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Gr,{label:e.label,question:e.question}),(0,Q.jsx)(ae,{fullWidth:!0,size:`small`,value:t,onChange:e=>n(String(e.target.value)),SelectDisplayProps:{[Br]:e.label},children:e.options.map(e=>(0,Q.jsx)(ge,{value:e.value,children:e.label},e.value))})]}):(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Gr,{label:e.label,question:e.question}),(0,Q.jsx)(qt,{exclusive:!0,fullWidth:!0,size:`small`,"aria-label":e.label,value:t,onChange:(...[,e])=>{e!==null&&n(e)},children:e.options.map(e=>(0,Q.jsx)(Ht,{value:e.value,sx:{textTransform:`none`,py:.25},children:e.label},e.value))})]})}function Jr({control:e,values:t,mode:n,set:r}){if(e.kind===`choice`)return(0,Q.jsx)(qr,{control:e,value:String(t[e.id]??e.default),onChange:t=>r(e.id,t)});if(er(e)&&typeof e.default==`object`){let i=n===`light`?`dark`:`light`;return(0,Q.jsx)(Kr,{control:e,label:`${e.label} (${n})`,value:Number(t[tr(e,n)]??e.default[n]),other:{mode:i,value:Number(t[tr(e,i)]??e.default[i])},onChange:t=>r(e.id,t,n)})}return(0,Q.jsx)(Kr,{control:e,label:e.label,value:Number(t[e.id]??e.default),onChange:t=>r(e.id,t)})}function Yr(){return typeof location>`u`?{url:``,host:``}:{url:location.href,host:location.host}}function Xr({lab:e,controls:t,lockEndpoint:n,submit:r,container:i}){let a=Xn(e.store,e=>e),o=nr(document.documentElement),[s,c]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(null),d=Un.filter(e=>t.some(t=>t.group===e.id)),[f,p]=(0,Z.useState)(null),m=d.find(e=>e.id===f)?.id??d[0]?.id,h=async i=>{c(!1);try{let a=new Date;u(Rr(await r(yr({rows:vr(e.store.get(),t,i),...Yr(),version:Ir,lockedAt:a}),Ln(a),{endpoint:n})))}catch(e){u(`Lock failed: ${e instanceof Error?e.message:String(e)}`)}};return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(ye,{rung:`raised`,component:`section`,"aria-label":`Design Lab`,sx:{height:`100vh`,display:`flex`,flexDirection:`column`,borderRadius:0},children:[(0,Q.jsx)(`div`,{style:{padding:`8px 12px`},children:(0,Q.jsx)(kn,{value:m??!1,"aria-label":`Control groups`,onChange:(...[,e])=>p(e),children:d.map(e=>(0,Q.jsx)(Pn,{value:e.id,label:e.label},e.id))})}),(0,Q.jsx)(`div`,{role:`tabpanel`,"aria-label":d.find(e=>e.id===m)?.label,style:{flex:1,minHeight:0,overflowY:`auto`,padding:`4px 16px 12px`,display:`grid`,alignContent:`start`,gap:14},children:t.filter(e=>e.group===m).map(t=>(0,Q.jsx)(Jr,{control:t,values:a,mode:o,set:e.set},t.id))}),(0,Q.jsxs)(`div`,{style:{padding:`10px 16px 12px`,display:`flex`,gap:8,justifyContent:`flex-end`,borderTop:`1px solid var(--ds-separator)`},children:[(0,Q.jsx)(we,{variant:`ghost`,size:`small`,onClick:()=>e.reset(),children:`Reset`}),(0,Q.jsx)(we,{variant:`primary`,size:`small`,onClick:()=>c(!0),children:`Lock in`})]})]}),(0,Q.jsx)(wr,{open:s,values:a,controls:t,container:i,onCancel:()=>c(!1),onConfirm:e=>{h(e)}}),(0,Q.jsx)(cn,{open:l!==null,message:l??``,autoHideDuration:8e3,anchorOrigin:{vertical:`bottom`,horizontal:`right`},onClose:(...[,e])=>{e!==`clickaway`&&u(null)}})]})}var Zr={disableNestedContext:!0};function Qr(e){return e.title=`Design Lab`,jr(document,e)}function $r({lab:e,target:t,controls:n=Jn,lockEndpoint:r=Lr,submit:i=Fr}){let a=(0,Z.useMemo)(()=>ce({key:`lab`,container:t.document.head}),[t]);(0,Z.useLayoutEffect)(()=>Qr(t.document),[t]);let o=t.document.body;return(0,Rn.createPortal)((0,Q.jsx)(U,{value:a,children:(0,Q.jsxs)(F,{theme:Oe,...Zr,children:[(0,Q.jsx)(_,{}),(0,Q.jsx)(Xr,{lab:e,controls:n,lockEndpoint:r,submit:i,container:o})]})}),o)}var ei=1250;function ti({lab:e,controls:t,lockEndpoint:n,submit:r,open:i=Hn,supported:a=Vn()}){let[o,s]=(0,Z.useState)(null),[c,l]=(0,Z.useState)(!1),u=(0,Z.useRef)(!0);return(0,Z.useEffect)(()=>(u.current=!0,()=>{u.current=!1}),[]),(0,Z.useEffect)(()=>{if(o===null)return;let e=!1,t=()=>{e=!0,s(null)};return o.addEventListener(`pagehide`,t),()=>{o.removeEventListener(`pagehide`,t),e||o.close()}},[o]),o===null?(0,Q.jsxs)(`div`,{style:{position:`fixed`,left:100,bottom:14,zIndex:ei,display:`flex`,alignItems:`center`,gap:8},children:[(0,Q.jsx)(we,{variant:`secondary`,size:`small`,startIcon:(0,Q.jsx)(g,{}),"aria-label":`Open Design Lab`,disabled:!a||c,onClick:()=>{l(!0),i().then(e=>{if(!u.current){e.close();return}l(!1),s(e)},e=>{u.current&&l(!1),console.warn(`Design Lab: the window did not open.`,e)})},children:`Design Lab`}),a?null:(0,Q.jsx)(J,{variant:`caption`,component:`span`,sx:{color:`var(--ds-text-quiet)`},children:Bn})]}):(0,Q.jsx)($r,{lab:e,target:o,controls:t,lockEndpoint:n,submit:r})}var ni;function ri(){return ni===void 0&&Vn()&&(ni=pr({controls:Jn})),ni}function ii(){ni?.dispose(),ni=void 0,dr(Jn)}function ai(){return pr({controls:Jn,root:document.createElement(`html`),storage:{getItem:()=>null,setItem:()=>void 0,removeItem:()=>void 0},observeMode:()=>()=>void 0})}function oi(){let e=ri();return e===void 0?(0,Q.jsx)(ti,{lab:ai(),supported:!1}):(0,Q.jsx)(ti,{lab:e})}export{oi as default,ii as dropLab,ri as getLab};